ASoC: TWL4030: Do not alter the Headset output volume on power-up/down
authorPeter Ujfalusi <peter.ujfalusi@nokia.com>
Tue, 9 Dec 2008 10:35:52 +0000 (12:35 +0200)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 9 Dec 2008 10:49:25 +0000 (10:49 +0000)
There is a separate gain control for the Headset output already.
Do not reset the gain to 0 dB at power up.
In power-down, there is no need to set the Headset output gain
to power-down mode, since if the CODECPDZ is in powered off this
setting has no effect.

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

index d0612a4ca456403cfc84ea419049c1358182bf2c..358aa2b1aae2301faa8a0758862f50cc1ae1f3d6 100644 (file)
@@ -887,7 +887,7 @@ static int twl4030_add_widgets(struct snd_soc_codec *codec)
 
 static void twl4030_power_up(struct snd_soc_codec *codec)
 {
-       u8 anamicl, regmisc1, byte, popn, hsgain;
+       u8 anamicl, regmisc1, byte, popn;
        int i = 0;
 
        /* set CODECPDZ to turn on codec */
@@ -925,10 +925,6 @@ static void twl4030_power_up(struct snd_soc_codec *codec)
        popn |= TWL4030_VMID_EN;
        twl4030_write(codec, TWL4030_REG_HS_POPN_SET, popn);
 
-       /* enable output stage and gain setting */
-       hsgain = TWL4030_HSR_GAIN_0DB | TWL4030_HSL_GAIN_0DB;
-       twl4030_write(codec, TWL4030_REG_HS_GAIN_SET, hsgain);
-
        /* enable anti-pop ramp */
        popn |= TWL4030_RAMP_EN;
        twl4030_write(codec, TWL4030_REG_HS_POPN_SET, popn);
@@ -936,17 +932,13 @@ static void twl4030_power_up(struct snd_soc_codec *codec)
 
 static void twl4030_power_down(struct snd_soc_codec *codec)
 {
-       u8 popn, hsgain;
+       u8 popn;
 
        /* disable anti-pop ramp */
        popn = twl4030_read_reg_cache(codec, TWL4030_REG_HS_POPN_SET);
        popn &= ~TWL4030_RAMP_EN;
        twl4030_write(codec, TWL4030_REG_HS_POPN_SET, popn);
 
-       /* disable output stage and gain setting */
-       hsgain = TWL4030_HSR_GAIN_PWR_DOWN | TWL4030_HSL_GAIN_PWR_DOWN;
-       twl4030_write(codec, TWL4030_REG_HS_GAIN_SET, hsgain);
-
        /* disable bias out */
        popn &= ~TWL4030_VMID_EN;
        twl4030_write(codec, TWL4030_REG_HS_POPN_SET, popn);