ASoC: twl6040: Set default gains to minimun value
authorOlaya, Margarita <magi.olaya@ti.com>
Wed, 15 Dec 2010 01:18:36 +0000 (19:18 -0600)
committerLiam Girdwood <lrg@slimlogic.co.uk>
Wed, 15 Dec 2010 21:35:57 +0000 (21:35 +0000)
Updated default values to improve power consumption.

Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
sound/soc/codecs/twl6040.c

index 9dfe208e653907cca45d98ba88dd266f188341db..b252cf8f0ce1b990459a147a5a758841b32e04cb 100644 (file)
@@ -806,6 +806,15 @@ static int twl6040_set_bias_level(struct snd_soc_codec *codec,
 
                /* initialize vdd/vss registers with reg_cache */
                twl6040_init_vdd_regs(codec);
+
+               /* Set external boost GPO */
+               twl6040_write(codec, TWL6040_REG_GPOCTL, 0x02);
+
+               /* Set initial minimal gain values */
+               twl6040_write(codec, TWL6040_REG_HSGAIN, 0xFF);
+               twl6040_write(codec, TWL6040_REG_EARCTL, 0x1E);
+               twl6040_write(codec, TWL6040_REG_HFLGAIN, 0x1D);
+               twl6040_write(codec, TWL6040_REG_HFRGAIN, 0x1D);
                break;
        case SND_SOC_BIAS_OFF:
                if (!priv->codec_powered)