提交 381a22b5 编写于 作者: P Peter Ujfalusi 提交者: Mark Brown

ASoC: TWL4030: Change the capture volume control to TLV

The digital Capture gain control has a range:
0 to 31 dB in 1 dB steps.
Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 fa5c7697
...@@ -360,6 +360,12 @@ static DECLARE_TLV_DB_SCALE(master_tlv, -6300, 100, 1); ...@@ -360,6 +360,12 @@ static DECLARE_TLV_DB_SCALE(master_tlv, -6300, 100, 1);
*/ */
static DECLARE_TLV_DB_SCALE(master_coarse_tlv, 0, 600, 0); static DECLARE_TLV_DB_SCALE(master_coarse_tlv, 0, 600, 0);
/*
* Capture gain after the ADCs
* from 0 dB to 31 dB in 1 dB steps
*/
static DECLARE_TLV_DB_SCALE(digital_capture_tlv, 0, 100, 0);
static const struct snd_kcontrol_new twl4030_snd_controls[] = { static const struct snd_kcontrol_new twl4030_snd_controls[] = {
SOC_DOUBLE_R_TLV("Master Playback Volume", SOC_DOUBLE_R_TLV("Master Playback Volume",
TWL4030_REG_ARXL2PGA, TWL4030_REG_ARXR2PGA, TWL4030_REG_ARXL2PGA, TWL4030_REG_ARXR2PGA,
...@@ -367,9 +373,11 @@ static const struct snd_kcontrol_new twl4030_snd_controls[] = { ...@@ -367,9 +373,11 @@ static const struct snd_kcontrol_new twl4030_snd_controls[] = {
SOC_DOUBLE_R_TLV("Master PCM Playback Volume", SOC_DOUBLE_R_TLV("Master PCM Playback Volume",
TWL4030_REG_ARXL2PGA, TWL4030_REG_ARXR2PGA, TWL4030_REG_ARXL2PGA, TWL4030_REG_ARXR2PGA,
6, 0x2, 0, master_coarse_tlv), 6, 0x2, 0, master_coarse_tlv),
SOC_DOUBLE_R("Capture Volume",
TWL4030_REG_ATXL1PGA, TWL4030_REG_ATXR1PGA, /* Common capture gain controls */
0, 0x1f, 0), SOC_DOUBLE_R_TLV("Capture Volume",
TWL4030_REG_ATXL1PGA, TWL4030_REG_ATXR1PGA,
0, 0x1f, 0, digital_capture_tlv),
}; };
/* add non dapm controls */ /* add non dapm controls */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册