diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-02-21 08:45:53 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-02-21 11:49:49 -0500 |
commit | 55a27786856458a785e1ed7221aee22a06def877 (patch) | |
tree | 0778da0c221c9e9600fcb1eda1d63dac33f885c9 /sound/soc/codecs | |
parent | 29fdc3605c947d037f3333afe3c295f8708640b0 (diff) |
ASoC: wm8994: Actively discharge idle MICBIAS with jack detect
This minimises the chance of any external capacitors that are fitted
being discharged into headphones as they insert.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r-- | sound/soc/codecs/wm8994.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index e9a405a1fdaf..77085c1047d5 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
@@ -3224,6 +3224,9 @@ static irqreturn_t wm1811_jackdet_irq(int irq, void *data) | |||
3224 | snd_soc_jack_report(wm8994->micdet[0].jack, | 3224 | snd_soc_jack_report(wm8994->micdet[0].jack, |
3225 | SND_JACK_MECHANICAL, SND_JACK_MECHANICAL); | 3225 | SND_JACK_MECHANICAL, SND_JACK_MECHANICAL); |
3226 | 3226 | ||
3227 | snd_soc_update_bits(codec, WM8958_MICBIAS2, | ||
3228 | WM8958_MICB2_DISCH, 0); | ||
3229 | |||
3227 | /* | 3230 | /* |
3228 | * Start off measument of microphone impedence to find | 3231 | * Start off measument of microphone impedence to find |
3229 | * out what's actually there. | 3232 | * out what's actually there. |
@@ -3235,6 +3238,9 @@ static irqreturn_t wm1811_jackdet_irq(int irq, void *data) | |||
3235 | } else { | 3238 | } else { |
3236 | dev_dbg(codec->dev, "Jack not detected\n"); | 3239 | dev_dbg(codec->dev, "Jack not detected\n"); |
3237 | 3240 | ||
3241 | snd_soc_update_bits(codec, WM8958_MICBIAS2, | ||
3242 | WM8958_MICB2_DISCH, WM8958_MICB2_DISCH); | ||
3243 | |||
3238 | snd_soc_jack_report(wm8994->micdet[0].jack, 0, | 3244 | snd_soc_jack_report(wm8994->micdet[0].jack, 0, |
3239 | SND_JACK_MECHANICAL | SND_JACK_HEADSET | | 3245 | SND_JACK_MECHANICAL | SND_JACK_HEADSET | |
3240 | wm8994->btn_mask); | 3246 | wm8994->btn_mask); |
@@ -3320,6 +3326,9 @@ int wm8958_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack, | |||
3320 | * otherwise jump straight to microphone detection. | 3326 | * otherwise jump straight to microphone detection. |
3321 | */ | 3327 | */ |
3322 | if (wm8994->jackdet) { | 3328 | if (wm8994->jackdet) { |
3329 | snd_soc_update_bits(codec, WM8958_MICBIAS2, | ||
3330 | WM8958_MICB2_DISCH, | ||
3331 | WM8958_MICB2_DISCH); | ||
3323 | snd_soc_update_bits(codec, WM8994_LDO_1, | 3332 | snd_soc_update_bits(codec, WM8994_LDO_1, |
3324 | WM8994_LDO1_DISCH, 0); | 3333 | WM8994_LDO1_DISCH, 0); |
3325 | wm1811_jackdet_set_mode(codec, | 3334 | wm1811_jackdet_set_mode(codec, |