diff options
author | Peter Ujfalusi <peter.ujfalusi@nokia.com> | 2008-12-01 03:03:45 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2008-12-01 14:58:52 -0500 |
commit | 381a22b564ff5a7ada09ad9a0831246da1dc5513 (patch) | |
tree | 6387f8eb293590d4bf2fa78f95d0c01f1491a873 /sound | |
parent | fa5c76978cee331b25e6d271482cf8e76f51e68b (diff) |
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: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/twl4030.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c index f3e9e591b52f..4b7a2d173a4a 100644 --- a/sound/soc/codecs/twl4030.c +++ b/sound/soc/codecs/twl4030.c | |||
@@ -360,6 +360,12 @@ static DECLARE_TLV_DB_SCALE(master_tlv, -6300, 100, 1); | |||
360 | */ | 360 | */ |
361 | static DECLARE_TLV_DB_SCALE(master_coarse_tlv, 0, 600, 0); | 361 | static DECLARE_TLV_DB_SCALE(master_coarse_tlv, 0, 600, 0); |
362 | 362 | ||
363 | /* | ||
364 | * Capture gain after the ADCs | ||
365 | * from 0 dB to 31 dB in 1 dB steps | ||
366 | */ | ||
367 | static DECLARE_TLV_DB_SCALE(digital_capture_tlv, 0, 100, 0); | ||
368 | |||
363 | static const struct snd_kcontrol_new twl4030_snd_controls[] = { | 369 | static const struct snd_kcontrol_new twl4030_snd_controls[] = { |
364 | SOC_DOUBLE_R_TLV("Master Playback Volume", | 370 | SOC_DOUBLE_R_TLV("Master Playback Volume", |
365 | TWL4030_REG_ARXL2PGA, TWL4030_REG_ARXR2PGA, | 371 | TWL4030_REG_ARXL2PGA, TWL4030_REG_ARXR2PGA, |
@@ -367,9 +373,11 @@ static const struct snd_kcontrol_new twl4030_snd_controls[] = { | |||
367 | SOC_DOUBLE_R_TLV("Master PCM Playback Volume", | 373 | SOC_DOUBLE_R_TLV("Master PCM Playback Volume", |
368 | TWL4030_REG_ARXL2PGA, TWL4030_REG_ARXR2PGA, | 374 | TWL4030_REG_ARXL2PGA, TWL4030_REG_ARXR2PGA, |
369 | 6, 0x2, 0, master_coarse_tlv), | 375 | 6, 0x2, 0, master_coarse_tlv), |
370 | SOC_DOUBLE_R("Capture Volume", | 376 | |
371 | TWL4030_REG_ATXL1PGA, TWL4030_REG_ATXR1PGA, | 377 | /* Common capture gain controls */ |
372 | 0, 0x1f, 0), | 378 | SOC_DOUBLE_R_TLV("Capture Volume", |
379 | TWL4030_REG_ATXL1PGA, TWL4030_REG_ATXR1PGA, | ||
380 | 0, 0x1f, 0, digital_capture_tlv), | ||
373 | }; | 381 | }; |
374 | 382 | ||
375 | /* add non dapm controls */ | 383 | /* add non dapm controls */ |