From: Olaya, Margarita Date: Wed, 15 Dec 2010 01:18:36 +0000 (-0600) Subject: ASoC: twl6040: Set default gains to minimun value X-Git-Tag: MMI-PSA29.97-13-9~16612^2~1226^2~144^2^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=65b7cecc85b9bb7bb8ce74c6a3b280464b00c86c;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git ASoC: twl6040: Set default gains to minimun value Updated default values to improve power consumption. Signed-off-by: Jorge Eduardo Candelaria Signed-off-by: Margarita Olaya Cabrera Acked-by: Mark Brown Signed-off-by: Liam Girdwood --- diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c index 9dfe208e6539..b252cf8f0ce1 100644 --- a/sound/soc/codecs/twl6040.c +++ b/sound/soc/codecs/twl6040.c @@ -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)