diff options
author | Misael Lopez Cruz <misael.lopez@ti.com> | 2011-08-01 23:13:48 -0500 |
---|---|---|
committer | Simon Wilson <simonwilson@google.com> | 2011-08-02 11:12:03 -0700 |
commit | 58ef152b968342dac4e7ac89b377d641547eb25f (patch) | |
tree | 2cf134c4ffd751c76c4a72b976ee1b754283442d /sound/soc/codecs | |
parent | 496ea6d28355c27aedde2c9d72e2f8d94acd3b4f (diff) | |
download | kernel_samsung_tuna-58ef152b968342dac4e7ac89b377d641547eb25f.zip kernel_samsung_tuna-58ef152b968342dac4e7ac89b377d641547eb25f.tar.gz kernel_samsung_tuna-58ef152b968342dac4e7ac89b377d641547eb25f.tar.bz2 |
ASoC: twl6040: Detach gains and GPOs init from bias setting
Analog gains should be initialized only when TWL6040 hardware is
initialized/probed, they are not associated to device bias state.
After initialization, gains are controlled by ramp up/down
mechanism and don't need to be reinitialized anymore.
GPOs don't have any specific functionality preassigned, platforms
can use them for different purposes, so shouldn't be initialized
in CODEC driver.
Change-Id: I31c60fa680021dcffe918e720d7a42d4d18b7afc
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r-- | sound/soc/codecs/twl6040.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c index 8724e48..879bd6e 100644 --- a/sound/soc/codecs/twl6040.c +++ b/sound/soc/codecs/twl6040.c @@ -131,12 +131,12 @@ static const u8 twl6040_reg[TWL6040_CACHEREGNUM] = { 0x1B, /* TWL6040_LINEGAIN 0x0F */ 0x00, /* TWL6040_HSLCTL 0x10 */ 0x00, /* TWL6040_HSRCTL 0x11 */ - 0x00, /* TWL6040_HSGAIN 0x12 */ - 0x00, /* TWL6040_EARCTL 0x13 */ + 0xFF, /* TWL6040_HSGAIN 0x12 */ + 0x1E, /* TWL6040_EARCTL 0x13 */ 0x00, /* TWL6040_HFLCTL 0x14 */ - 0x00, /* TWL6040_HFLGAIN 0x15 */ + 0x1D, /* TWL6040_HFLGAIN 0x15 */ 0x00, /* TWL6040_HFRCTL 0x16 */ - 0x00, /* TWL6040_HFRGAIN 0x17 */ + 0x1D, /* TWL6040_HFRGAIN 0x17 */ 0x00, /* TWL6040_VIBCTLL 0x18 */ 0x00, /* TWL6040_VIBDATL 0x19 */ 0x00, /* TWL6040_VIBCTLR 0x1A */ @@ -1359,14 +1359,6 @@ 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) |