Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
291ce18c
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
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看板
提交
291ce18c
编写于
4月 22, 2009
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ASoC: Implement WM8903 digital sidetone support
Signed-off-by:
N
Mark Brown
<
broonie@opensource.wolfsonmicro.com
>
上级
727fb909
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
30 addition
and
0 deletion
+30
-0
sound/soc/codecs/wm8903.c
sound/soc/codecs/wm8903.c
+30
-0
未找到文件。
sound/soc/codecs/wm8903.c
浏览文件 @
291ce18c
...
...
@@ -533,6 +533,7 @@ static int wm8903_class_w_put(struct snd_kcontrol *kcontrol,
/* ALSA can only do steps of .01dB */
static
const
DECLARE_TLV_DB_SCALE
(
digital_tlv
,
-
7200
,
75
,
1
);
static
const
DECLARE_TLV_DB_SCALE
(
digital_sidetone_tlv
,
-
3600
,
300
,
0
);
static
const
DECLARE_TLV_DB_SCALE
(
out_tlv
,
-
5700
,
100
,
0
);
static
const
DECLARE_TLV_DB_SCALE
(
drc_tlv_thresh
,
0
,
75
,
0
);
...
...
@@ -651,6 +652,16 @@ static const struct soc_enum rinput_inv_enum =
SOC_ENUM_SINGLE
(
WM8903_ANALOGUE_RIGHT_INPUT_1
,
4
,
3
,
rinput_mux_text
);
static
const
char
*
sidetone_text
[]
=
{
"None"
,
"Left"
,
"Right"
};
static
const
struct
soc_enum
lsidetone_enum
=
SOC_ENUM_SINGLE
(
WM8903_DAC_DIGITAL_0
,
2
,
3
,
sidetone_text
);
static
const
struct
soc_enum
rsidetone_enum
=
SOC_ENUM_SINGLE
(
WM8903_DAC_DIGITAL_0
,
0
,
3
,
sidetone_text
);
static
const
struct
snd_kcontrol_new
wm8903_snd_controls
[]
=
{
/* Input PGAs - No TLV since the scale depends on PGA mode */
...
...
@@ -694,6 +705,9 @@ SOC_DOUBLE_R_TLV("Digital Capture Volume", WM8903_ADC_DIGITAL_VOLUME_LEFT,
SOC_ENUM
(
"ADC Companding Mode"
,
adc_companding
),
SOC_SINGLE
(
"ADC Companding Switch"
,
WM8903_AUDIO_INTERFACE_0
,
3
,
1
,
0
),
SOC_DOUBLE_TLV
(
"Digital Sidetone Volume"
,
WM8903_DAC_DIGITAL_0
,
4
,
8
,
12
,
0
,
digital_sidetone_tlv
),
/* DAC */
SOC_DOUBLE_R_TLV
(
"Digital Playback Volume"
,
WM8903_DAC_DIGITAL_VOLUME_LEFT
,
WM8903_DAC_DIGITAL_VOLUME_RIGHT
,
1
,
120
,
0
,
digital_tlv
),
...
...
@@ -756,6 +770,12 @@ static const struct snd_kcontrol_new rinput_mux =
static
const
struct
snd_kcontrol_new
rinput_inv_mux
=
SOC_DAPM_ENUM
(
"Right Inverting Input Mux"
,
rinput_inv_enum
);
static
const
struct
snd_kcontrol_new
lsidetone_mux
=
SOC_DAPM_ENUM
(
"DACL Sidetone Mux"
,
lsidetone_enum
);
static
const
struct
snd_kcontrol_new
rsidetone_mux
=
SOC_DAPM_ENUM
(
"DACR Sidetone Mux"
,
rsidetone_enum
);
static
const
struct
snd_kcontrol_new
left_output_mixer
[]
=
{
SOC_DAPM_SINGLE
(
"DACL Switch"
,
WM8903_ANALOGUE_LEFT_MIX_0
,
3
,
1
,
0
),
SOC_DAPM_SINGLE
(
"DACR Switch"
,
WM8903_ANALOGUE_LEFT_MIX_0
,
2
,
1
,
0
),
...
...
@@ -822,6 +842,9 @@ SND_SOC_DAPM_PGA("Right Input PGA", WM8903_POWER_MANAGEMENT_0, 0, 0, NULL, 0),
SND_SOC_DAPM_ADC
(
"ADCL"
,
"Left HiFi Capture"
,
WM8903_POWER_MANAGEMENT_6
,
1
,
0
),
SND_SOC_DAPM_ADC
(
"ADCR"
,
"Right HiFi Capture"
,
WM8903_POWER_MANAGEMENT_6
,
0
,
0
),
SND_SOC_DAPM_MUX
(
"DACL Sidetone"
,
SND_SOC_NOPM
,
0
,
0
,
&
lsidetone_mux
),
SND_SOC_DAPM_MUX
(
"DACR Sidetone"
,
SND_SOC_NOPM
,
0
,
0
,
&
rsidetone_mux
),
SND_SOC_DAPM_DAC
(
"DACL"
,
"Left Playback"
,
WM8903_POWER_MANAGEMENT_6
,
3
,
0
),
SND_SOC_DAPM_DAC
(
"DACR"
,
"Right Playback"
,
WM8903_POWER_MANAGEMENT_6
,
2
,
0
),
...
...
@@ -910,7 +933,14 @@ static const struct snd_soc_dapm_route intercon[] = {
{
"ADCR"
,
NULL
,
"Right Input PGA"
},
{
"ADCR"
,
NULL
,
"CLK_DSP"
},
{
"DACL Sidetone"
,
"Left"
,
"ADCL"
},
{
"DACL Sidetone"
,
"Right"
,
"ADCR"
},
{
"DACR Sidetone"
,
"Left"
,
"ADCL"
},
{
"DACR Sidetone"
,
"Right"
,
"ADCR"
},
{
"DACL"
,
NULL
,
"DACL Sidetone"
},
{
"DACL"
,
NULL
,
"CLK_DSP"
},
{
"DACR"
,
NULL
,
"DACR Sidetone"
},
{
"DACR"
,
NULL
,
"CLK_DSP"
},
{
"Left Output Mixer"
,
"Left Bypass Switch"
,
"Left Input PGA"
},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录