ASoC: Fix for master playback/capture volume range for TWL4030 codec
authorPeter Ujfalusi <peter.ujfalusi@nokia.com>
Fri, 14 Nov 2008 06:57:28 +0000 (08:57 +0200)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 17 Nov 2008 11:02:21 +0000 (11:02 +0000)
FGAIN for playback is in range of 0-0x3f, while for capture GAIN it
is in the range of 0-0x1f.
The original value of 128 (0x7f) would modify the CGAIN also for
playback.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/twl4030.c

index c1893d23703d7e0a72e2775883066673149a1b7d..c778eb446a5b5f4d0548e730ed5702026f073a2b 100644 (file)
@@ -192,10 +192,10 @@ static void twl4030_init_chip(struct snd_soc_codec *codec)
 static const struct snd_kcontrol_new twl4030_snd_controls[] = {
        SOC_DOUBLE_R("Master Playback Volume",
                 TWL4030_REG_ARXL2PGA, TWL4030_REG_ARXR2PGA,
-               0, 127, 0),
+               0, 0x3f, 0),
        SOC_DOUBLE_R("Capture Volume",
                 TWL4030_REG_ATXL1PGA, TWL4030_REG_ATXR1PGA,
-               0, 127, 0),
+               0, 0x1f, 0),
 };
 
 /* add non dapm controls */