summaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@nokia.com>2008-11-24 13:49:36 +0200
committerMark Brown <broonie@opensource.wolfsonmicro.com>2008-11-24 14:05:40 +0000
commit0d33ea0b0f954dddd3996597c663c111249d4df9 (patch)
treef11fb64ae0508866ffd34055c2a8f8ffa5e259ea /sound/soc
parentc10b82cf085c38f2568609ffb10a6d725130f389 (diff)
downloadtalos-obmc-linux-0d33ea0b0f954dddd3996597c663c111249d4df9.tar.gz
talos-obmc-linux-0d33ea0b0f954dddd3996597c663c111249d4df9.zip
ASoC: TWL4030: Add CGAIN volume control
Add CGAIN (Coarse gain control) to TWL4030 codec. The range of the CGAIN is: 0 dB to 12 dB in 6 dB steps. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/twl4030.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
index 498c42f7c6e0..91effd341c0b 100644
--- a/sound/soc/codecs/twl4030.c
+++ b/sound/soc/codecs/twl4030.c
@@ -196,10 +196,20 @@ static void twl4030_init_chip(struct snd_soc_codec *codec)
*/
static DECLARE_TLV_DB_SCALE(master_tlv, -6300, 100, 1);
+/*
+ * CGAIN volume control:
+ * 0 dB to 12 dB in 6 dB steps
+ * value 2 and 3 means 12 dB
+ */
+static DECLARE_TLV_DB_SCALE(master_coarse_tlv, 0, 600, 0);
+
static const struct snd_kcontrol_new twl4030_snd_controls[] = {
SOC_DOUBLE_R_TLV("Master Playback Volume",
TWL4030_REG_ARXL2PGA, TWL4030_REG_ARXR2PGA,
0, 0x3f, 0, master_tlv),
+ SOC_DOUBLE_R_TLV("Master PCM Playback Volume",
+ TWL4030_REG_ARXL2PGA, TWL4030_REG_ARXR2PGA,
+ 6, 0x2, 0, master_coarse_tlv),
SOC_DOUBLE_R("Capture Volume",
TWL4030_REG_ATXL1PGA, TWL4030_REG_ATXR1PGA,
0, 0x1f, 0),
OpenPOWER on IntegriCloud