Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
4633fa48
cloud-kernel
项目概览
openanolis
/
cloud-kernel
接近 2 年 前同步成功
通知
170
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
4633fa48
编写于
11月 08, 2011
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'for-3.2' into for-3.3
Conflicts: sound/soc/codecs/wm8940.c
上级
03431972
19940b3d
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
81 addition
and
33 deletion
+81
-33
MAINTAINERS
MAINTAINERS
+1
-1
include/linux/mfd/wm8994/registers.h
include/linux/mfd/wm8994/registers.h
+15
-0
sound/soc/codecs/tlv320aic23.c
sound/soc/codecs/tlv320aic23.c
+1
-0
sound/soc/codecs/tlv320aic3x.c
sound/soc/codecs/tlv320aic3x.c
+1
-0
sound/soc/codecs/wm5100.c
sound/soc/codecs/wm5100.c
+8
-4
sound/soc/codecs/wm8711.c
sound/soc/codecs/wm8711.c
+2
-2
sound/soc/codecs/wm8904.c
sound/soc/codecs/wm8904.c
+1
-1
sound/soc/codecs/wm8940.c
sound/soc/codecs/wm8940.c
+3
-1
sound/soc/codecs/wm8962.c
sound/soc/codecs/wm8962.c
+20
-10
sound/soc/codecs/wm8994.c
sound/soc/codecs/wm8994.c
+29
-14
未找到文件。
MAINTAINERS
浏览文件 @
4633fa48
...
@@ -6001,7 +6001,7 @@ F: sound/
...
@@ -6001,7 +6001,7 @@ F: sound/
SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEMENT (ASoC)
SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEMENT (ASoC)
M: Liam Girdwood <lrg@ti.com>
M: Liam Girdwood <lrg@ti.com>
M: Mark Brown <broonie@opensource.wolfsonmicro.com>
M: Mark Brown <broonie@opensource.wolfsonmicro.com>
T: git git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound
-2.6
.git
T: git git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
W: http://alsa-project.org/main/index.php/ASoC
W: http://alsa-project.org/main/index.php/ASoC
S: Supported
S: Supported
...
...
include/linux/mfd/wm8994/registers.h
浏览文件 @
4633fa48
...
@@ -1962,6 +1962,21 @@
...
@@ -1962,6 +1962,21 @@
#define WM8958_MICB2_DISCH_SHIFT 0
/* MICB2_DISCH */
#define WM8958_MICB2_DISCH_SHIFT 0
/* MICB2_DISCH */
#define WM8958_MICB2_DISCH_WIDTH 1
/* MICB2_DISCH */
#define WM8958_MICB2_DISCH_WIDTH 1
/* MICB2_DISCH */
/*
* R210 (0xD2) - Mic Detect 3
*/
#define WM8958_MICD_LVL_MASK 0x07FC
/* MICD_LVL - [10:2] */
#define WM8958_MICD_LVL_SHIFT 2
/* MICD_LVL - [10:2] */
#define WM8958_MICD_LVL_WIDTH 9
/* MICD_LVL - [10:2] */
#define WM8958_MICD_VALID 0x0002
/* MICD_VALID */
#define WM8958_MICD_VALID_MASK 0x0002
/* MICD_VALID */
#define WM8958_MICD_VALID_SHIFT 1
/* MICD_VALID */
#define WM8958_MICD_VALID_WIDTH 1
/* MICD_VALID */
#define WM8958_MICD_STS 0x0001
/* MICD_STS */
#define WM8958_MICD_STS_MASK 0x0001
/* MICD_STS */
#define WM8958_MICD_STS_SHIFT 0
/* MICD_STS */
#define WM8958_MICD_STS_WIDTH 1
/* MICD_STS */
/*
/*
* R76 (0x4C) - Charge Pump (1)
* R76 (0x4C) - Charge Pump (1)
*/
*/
...
...
sound/soc/codecs/tlv320aic23.c
浏览文件 @
4633fa48
...
@@ -430,6 +430,7 @@ static int tlv320aic23_set_dai_fmt(struct snd_soc_dai *codec_dai,
...
@@ -430,6 +430,7 @@ static int tlv320aic23_set_dai_fmt(struct snd_soc_dai *codec_dai,
iface_reg
|=
TLV320AIC23_MS_MASTER
;
iface_reg
|=
TLV320AIC23_MS_MASTER
;
break
;
break
;
case
SND_SOC_DAIFMT_CBS_CFS
:
case
SND_SOC_DAIFMT_CBS_CFS
:
iface_reg
&=
~
TLV320AIC23_MS_MASTER
;
break
;
break
;
default:
default:
return
-
EINVAL
;
return
-
EINVAL
;
...
...
sound/soc/codecs/tlv320aic3x.c
浏览文件 @
4633fa48
...
@@ -1021,6 +1021,7 @@ static int aic3x_set_dai_fmt(struct snd_soc_dai *codec_dai,
...
@@ -1021,6 +1021,7 @@ static int aic3x_set_dai_fmt(struct snd_soc_dai *codec_dai,
break
;
break
;
case
SND_SOC_DAIFMT_CBS_CFS
:
case
SND_SOC_DAIFMT_CBS_CFS
:
aic3x
->
master
=
0
;
aic3x
->
master
=
0
;
iface_areg
&=
~
(
BIT_CLK_MASTER
|
WORD_CLK_MASTER
);
break
;
break
;
default:
default:
return
-
EINVAL
;
return
-
EINVAL
;
...
...
sound/soc/codecs/wm5100.c
浏览文件 @
4633fa48
...
@@ -2361,13 +2361,17 @@ static int wm5100_gpio_direction_out(struct gpio_chip *chip,
...
@@ -2361,13 +2361,17 @@ static int wm5100_gpio_direction_out(struct gpio_chip *chip,
{
{
struct
wm5100_priv
*
wm5100
=
gpio_to_wm5100
(
chip
);
struct
wm5100_priv
*
wm5100
=
gpio_to_wm5100
(
chip
);
struct
snd_soc_codec
*
codec
=
wm5100
->
codec
;
struct
snd_soc_codec
*
codec
=
wm5100
->
codec
;
int
val
;
int
val
,
ret
;
val
=
(
1
<<
WM5100_GP1_FN_SHIFT
)
|
(
!!
value
<<
WM5100_GP1_LVL_SHIFT
);
val
=
(
1
<<
WM5100_GP1_FN_SHIFT
)
|
(
!!
value
<<
WM5100_GP1_LVL_SHIFT
);
return
snd_soc_update_bits
(
codec
,
WM5100_GPIO_CTRL_1
+
offset
,
ret
=
snd_soc_update_bits
(
codec
,
WM5100_GPIO_CTRL_1
+
offset
,
WM5100_GP1_FN_MASK
|
WM5100_GP1_DIR
|
WM5100_GP1_FN_MASK
|
WM5100_GP1_DIR
|
WM5100_GP1_LVL
,
val
);
WM5100_GP1_LVL
,
val
);
if
(
ret
<
0
)
return
ret
;
else
return
0
;
}
}
static
int
wm5100_gpio_get
(
struct
gpio_chip
*
chip
,
unsigned
offset
)
static
int
wm5100_gpio_get
(
struct
gpio_chip
*
chip
,
unsigned
offset
)
...
...
sound/soc/codecs/wm8711.c
浏览文件 @
4633fa48
...
@@ -151,7 +151,7 @@ static int wm8711_hw_params(struct snd_pcm_substream *substream,
...
@@ -151,7 +151,7 @@ static int wm8711_hw_params(struct snd_pcm_substream *substream,
{
{
struct
snd_soc_codec
*
codec
=
dai
->
codec
;
struct
snd_soc_codec
*
codec
=
dai
->
codec
;
struct
wm8711_priv
*
wm8711
=
snd_soc_codec_get_drvdata
(
codec
);
struct
wm8711_priv
*
wm8711
=
snd_soc_codec_get_drvdata
(
codec
);
u16
iface
=
snd_soc_read
(
codec
,
WM8711_IFACE
)
&
0xfff
c
;
u16
iface
=
snd_soc_read
(
codec
,
WM8711_IFACE
)
&
0xfff
3
;
int
i
=
get_coeff
(
wm8711
->
sysclk
,
params_rate
(
params
));
int
i
=
get_coeff
(
wm8711
->
sysclk
,
params_rate
(
params
));
u16
srate
=
(
coeff_div
[
i
].
sr
<<
2
)
|
u16
srate
=
(
coeff_div
[
i
].
sr
<<
2
)
|
(
coeff_div
[
i
].
bosr
<<
1
)
|
coeff_div
[
i
].
usb
;
(
coeff_div
[
i
].
bosr
<<
1
)
|
coeff_div
[
i
].
usb
;
...
@@ -232,7 +232,7 @@ static int wm8711_set_dai_fmt(struct snd_soc_dai *codec_dai,
...
@@ -232,7 +232,7 @@ static int wm8711_set_dai_fmt(struct snd_soc_dai *codec_dai,
unsigned
int
fmt
)
unsigned
int
fmt
)
{
{
struct
snd_soc_codec
*
codec
=
codec_dai
->
codec
;
struct
snd_soc_codec
*
codec
=
codec_dai
->
codec
;
u16
iface
=
0
;
u16
iface
=
snd_soc_read
(
codec
,
WM8711_IFACE
)
&
0x000c
;
/* set master/slave audio interface */
/* set master/slave audio interface */
switch
(
fmt
&
SND_SOC_DAIFMT_MASTER_MASK
)
{
switch
(
fmt
&
SND_SOC_DAIFMT_MASTER_MASK
)
{
...
...
sound/soc/codecs/wm8904.c
浏览文件 @
4633fa48
...
@@ -867,7 +867,7 @@ SOC_ENUM("Right Capture Mode", rin_mode),
...
@@ -867,7 +867,7 @@ SOC_ENUM("Right Capture Mode", rin_mode),
SOC_DOUBLE_R
(
"Capture Volume"
,
WM8904_ANALOGUE_LEFT_INPUT_0
,
SOC_DOUBLE_R
(
"Capture Volume"
,
WM8904_ANALOGUE_LEFT_INPUT_0
,
WM8904_ANALOGUE_RIGHT_INPUT_0
,
0
,
31
,
0
),
WM8904_ANALOGUE_RIGHT_INPUT_0
,
0
,
31
,
0
),
SOC_DOUBLE_R
(
"Capture Switch"
,
WM8904_ANALOGUE_LEFT_INPUT_0
,
SOC_DOUBLE_R
(
"Capture Switch"
,
WM8904_ANALOGUE_LEFT_INPUT_0
,
WM8904_ANALOGUE_RIGHT_INPUT_0
,
7
,
1
,
0
),
WM8904_ANALOGUE_RIGHT_INPUT_0
,
7
,
1
,
1
),
SOC_SINGLE
(
"High Pass Filter Switch"
,
WM8904_ADC_DIGITAL_0
,
4
,
1
,
0
),
SOC_SINGLE
(
"High Pass Filter Switch"
,
WM8904_ADC_DIGITAL_0
,
4
,
1
,
0
),
SOC_ENUM
(
"High Pass Filter Mode"
,
hpf_mode
),
SOC_ENUM
(
"High Pass Filter Mode"
,
hpf_mode
),
...
...
sound/soc/codecs/wm8940.c
浏览文件 @
4633fa48
...
@@ -488,6 +488,8 @@ static int wm8940_set_bias_level(struct snd_soc_codec *codec,
...
@@ -488,6 +488,8 @@ static int wm8940_set_bias_level(struct snd_soc_codec *codec,
break
;
break
;
}
}
codec
->
dapm
.
bias_level
=
level
;
return
ret
;
return
ret
;
}
}
...
@@ -619,7 +621,7 @@ static int wm8940_set_dai_clkdiv(struct snd_soc_dai *codec_dai,
...
@@ -619,7 +621,7 @@ static int wm8940_set_dai_clkdiv(struct snd_soc_dai *codec_dai,
switch
(
div_id
)
{
switch
(
div_id
)
{
case
WM8940_BCLKDIV
:
case
WM8940_BCLKDIV
:
reg
=
snd_soc_read
(
codec
,
WM8940_CLOCK
)
&
0xF
EF
3
;
reg
=
snd_soc_read
(
codec
,
WM8940_CLOCK
)
&
0xF
FE
3
;
ret
=
snd_soc_write
(
codec
,
WM8940_CLOCK
,
reg
|
(
div
<<
2
));
ret
=
snd_soc_write
(
codec
,
WM8940_CLOCK
,
reg
|
(
div
<<
2
));
break
;
break
;
case
WM8940_MCLKDIV
:
case
WM8940_MCLKDIV
:
...
...
sound/soc/codecs/wm8962.c
浏览文件 @
4633fa48
...
@@ -1961,7 +1961,13 @@ static int wm8962_readable_register(struct snd_soc_codec *codec, unsigned int re
...
@@ -1961,7 +1961,13 @@ static int wm8962_readable_register(struct snd_soc_codec *codec, unsigned int re
static
int
wm8962_reset
(
struct
snd_soc_codec
*
codec
)
static
int
wm8962_reset
(
struct
snd_soc_codec
*
codec
)
{
{
return
snd_soc_write
(
codec
,
WM8962_SOFTWARE_RESET
,
0x6243
);
int
ret
;
ret
=
snd_soc_write
(
codec
,
WM8962_SOFTWARE_RESET
,
0x6243
);
if
(
ret
!=
0
)
return
ret
;
return
snd_soc_write
(
codec
,
WM8962_PLL_SOFTWARE_RESET
,
0
);
}
}
static
const
DECLARE_TLV_DB_SCALE
(
inpga_tlv
,
-
2325
,
75
,
0
);
static
const
DECLARE_TLV_DB_SCALE
(
inpga_tlv
,
-
2325
,
75
,
0
);
...
@@ -2360,15 +2366,14 @@ static int sysclk_event(struct snd_soc_dapm_widget *w,
...
@@ -2360,15 +2366,14 @@ static int sysclk_event(struct snd_soc_dapm_widget *w,
snd_soc_update_bits
(
codec
,
WM8962_FLL_CONTROL_1
,
snd_soc_update_bits
(
codec
,
WM8962_FLL_CONTROL_1
,
WM8962_FLL_ENA
,
WM8962_FLL_ENA
);
WM8962_FLL_ENA
,
WM8962_FLL_ENA
);
if
(
wm8962
->
irq
)
{
timeout
=
msecs_to_jiffies
(
5
);
timeout
=
msecs_to_jiffies
(
5
);
timeout
=
wait_for_completion_timeout
(
&
wm8962
->
fll_lock
,
timeout
=
wait_for_completion_timeout
(
&
wm8962
->
fll_lock
,
timeout
);
timeout
);
if
(
timeout
==
0
)
if
(
wm8962
->
irq
&&
timeout
==
0
)
dev_err
(
codec
->
dev
,
dev_err
(
codec
->
dev
,
"Timed out starting FLL
\n
"
);
"Timed out starting FLL
\n
"
);
}
}
}
break
;
break
;
...
@@ -4049,6 +4054,11 @@ static int wm8962_probe(struct snd_soc_codec *codec)
...
@@ -4049,6 +4054,11 @@ static int wm8962_probe(struct snd_soc_codec *codec)
snd_soc_update_bits
(
codec
,
WM8962_CLOCKING2
,
snd_soc_update_bits
(
codec
,
WM8962_CLOCKING2
,
WM8962_CLKREG_OVD
,
WM8962_CLKREG_OVD
);
WM8962_CLKREG_OVD
,
WM8962_CLKREG_OVD
);
/* Ensure that the oscillator and PLLs are disabled */
snd_soc_update_bits
(
codec
,
WM8962_PLL2
,
WM8962_OSC_ENA
|
WM8962_PLL2_ENA
|
WM8962_PLL3_ENA
,
0
);
regulator_bulk_disable
(
ARRAY_SIZE
(
wm8962
->
supplies
),
wm8962
->
supplies
);
regulator_bulk_disable
(
ARRAY_SIZE
(
wm8962
->
supplies
),
wm8962
->
supplies
);
if
(
pdata
)
{
if
(
pdata
)
{
...
...
sound/soc/codecs/wm8994.c
浏览文件 @
4633fa48
...
@@ -56,7 +56,7 @@ static int wm8994_retune_mobile_base[] = {
...
@@ -56,7 +56,7 @@ static int wm8994_retune_mobile_base[] = {
static
int
wm8994_readable
(
struct
snd_soc_codec
*
codec
,
unsigned
int
reg
)
static
int
wm8994_readable
(
struct
snd_soc_codec
*
codec
,
unsigned
int
reg
)
{
{
struct
wm8994_priv
*
wm8994
=
snd_soc_codec_get_drvdata
(
codec
);
struct
wm8994_priv
*
wm8994
=
snd_soc_codec_get_drvdata
(
codec
);
struct
wm8994
*
control
=
wm8994
->
control_data
;
struct
wm8994
*
control
=
codec
->
control_data
;
switch
(
reg
)
{
switch
(
reg
)
{
case
WM8994_GPIO_1
:
case
WM8994_GPIO_1
:
...
@@ -3030,19 +3030,34 @@ static irqreturn_t wm8958_mic_irq(int irq, void *data)
...
@@ -3030,19 +3030,34 @@ static irqreturn_t wm8958_mic_irq(int irq, void *data)
{
{
struct
wm8994_priv
*
wm8994
=
data
;
struct
wm8994_priv
*
wm8994
=
data
;
struct
snd_soc_codec
*
codec
=
wm8994
->
codec
;
struct
snd_soc_codec
*
codec
=
wm8994
->
codec
;
int
reg
;
int
reg
,
count
;
reg
=
snd_soc_read
(
codec
,
WM8958_MIC_DETECT_3
);
/* We may occasionally read a detection without an impedence
if
(
reg
<
0
)
{
* range being provided - if that happens loop again.
dev_err
(
codec
->
dev
,
"Failed to read mic detect status: %d
\n
"
,
*/
reg
);
count
=
10
;
return
IRQ_NONE
;
do
{
}
reg
=
snd_soc_read
(
codec
,
WM8958_MIC_DETECT_3
);
if
(
reg
<
0
)
{
dev_err
(
codec
->
dev
,
"Failed to read mic detect status: %d
\n
"
,
reg
);
return
IRQ_NONE
;
}
if
(
!
(
reg
&
WM8958_MICD_VALID
))
{
if
(
!
(
reg
&
WM8958_MICD_VALID
))
{
dev_dbg
(
codec
->
dev
,
"Mic detect data not valid
\n
"
);
dev_dbg
(
codec
->
dev
,
"Mic detect data not valid
\n
"
);
goto
out
;
goto
out
;
}
}
if
(
!
(
reg
&
WM8958_MICD_STS
)
||
(
reg
&
WM8958_MICD_LVL_MASK
))
break
;
msleep
(
1
);
}
while
(
count
--
);
if
(
count
==
0
)
dev_warn
(
codec
->
dev
,
"No impedence range reported for jack
\n
"
);
#ifndef CONFIG_SND_SOC_WM8994_MODULE
#ifndef CONFIG_SND_SOC_WM8994_MODULE
trace_snd_soc_jack_irq
(
dev_name
(
codec
->
dev
));
trace_snd_soc_jack_irq
(
dev_name
(
codec
->
dev
));
...
@@ -3180,9 +3195,9 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec)
...
@@ -3180,9 +3195,9 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec)
wm8994_request_irq
(
codec
->
control_data
,
WM8994_IRQ_FIFOS_ERR
,
wm8994_request_irq
(
codec
->
control_data
,
WM8994_IRQ_FIFOS_ERR
,
wm8994_fifo_error
,
"FIFO error"
,
codec
);
wm8994_fifo_error
,
"FIFO error"
,
codec
);
wm8994_request_irq
(
wm8994
->
control_data
,
WM8994_IRQ_TEMP_WARN
,
wm8994_request_irq
(
codec
->
control_data
,
WM8994_IRQ_TEMP_WARN
,
wm8994_temp_warn
,
"Thermal warning"
,
codec
);
wm8994_temp_warn
,
"Thermal warning"
,
codec
);
wm8994_request_irq
(
wm8994
->
control_data
,
WM8994_IRQ_TEMP_SHUT
,
wm8994_request_irq
(
codec
->
control_data
,
WM8994_IRQ_TEMP_SHUT
,
wm8994_temp_shut
,
"Thermal shutdown"
,
codec
);
wm8994_temp_shut
,
"Thermal shutdown"
,
codec
);
ret
=
wm8994_request_irq
(
codec
->
control_data
,
WM8994_IRQ_DCS_DONE
,
ret
=
wm8994_request_irq
(
codec
->
control_data
,
WM8994_IRQ_DCS_DONE
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录