diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2011-09-15 08:39:28 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-09-19 18:15:58 -0400 |
commit | 2c27ff41d8f81fa4967936151ece9fc16db96dce (patch) | |
tree | acb4d84be109adcfc87a6b15e18a569bb4ce67df /sound/soc/codecs/twl6040.c | |
parent | a52762eee97d42344691c190cf8786dd9edde4d7 (diff) |
ASoC: twl6040: Use chip defaults in the initial reg_cache
Reset the twl6040_reg array to hold the chip default values.
The only changed values were for the microphone input selection.
Select no input for the microphones in the twl6040_init_chip function.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/twl6040.c')
-rw-r--r-- | sound/soc/codecs/twl6040.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c index 8bbd46a9bfd5..987d9c9c9dfd 100644 --- a/sound/soc/codecs/twl6040.c +++ b/sound/soc/codecs/twl6040.c | |||
@@ -118,8 +118,8 @@ static const u8 twl6040_reg[TWL6040_CACHEREGNUM] = { | |||
118 | 0x4A, /* TWL6040_LPPLLDIV 0x09 */ | 118 | 0x4A, /* TWL6040_LPPLLDIV 0x09 */ |
119 | 0x00, /* TWL6040_AMICBCTL 0x0A */ | 119 | 0x00, /* TWL6040_AMICBCTL 0x0A */ |
120 | 0x00, /* TWL6040_DMICBCTL 0x0B */ | 120 | 0x00, /* TWL6040_DMICBCTL 0x0B */ |
121 | 0x18, /* TWL6040_MICLCTL 0x0C - No input selected on Left Mic */ | 121 | 0x00, /* TWL6040_MICLCTL 0x0C */ |
122 | 0x18, /* TWL6040_MICRCTL 0x0D - No input selected on Right Mic */ | 122 | 0x00, /* TWL6040_MICRCTL 0x0D */ |
123 | 0x00, /* TWL6040_MICGAIN 0x0E */ | 123 | 0x00, /* TWL6040_MICGAIN 0x0E */ |
124 | 0x1B, /* TWL6040_LINEGAIN 0x0F */ | 124 | 0x1B, /* TWL6040_LINEGAIN 0x0F */ |
125 | 0x00, /* TWL6040_HSLCTL 0x10 */ | 125 | 0x00, /* TWL6040_HSLCTL 0x10 */ |
@@ -265,6 +265,10 @@ static void twl6040_init_chip(struct snd_soc_codec *codec) | |||
265 | val = twl6040_get_revid(twl6040); | 265 | val = twl6040_get_revid(twl6040); |
266 | twl6040_write_reg_cache(codec, TWL6040_REG_ASICREV, val); | 266 | twl6040_write_reg_cache(codec, TWL6040_REG_ASICREV, val); |
267 | 267 | ||
268 | /* Change chip defaults */ | ||
269 | /* No imput selected for microphone amplifiers */ | ||
270 | twl6040_write_reg_cache(codec, TWL6040_REG_MICLCTL, 0x18); | ||
271 | twl6040_write_reg_cache(codec, TWL6040_REG_MICRCTL, 0x18); | ||
268 | } | 272 | } |
269 | 273 | ||
270 | static void twl6040_restore_regs(struct snd_soc_codec *codec) | 274 | static void twl6040_restore_regs(struct snd_soc_codec *codec) |