aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-02-21 13:45:53 +0000
committerAndreas Blaesius <skate4life@gmx.de>2016-04-30 11:03:51 +0200
commite8ffd9f962ecc6b7dde9e0cd1e438ac35b183347 (patch)
tree43f0bddd037e6f3609bcd6fe42da0aacfc1d7ce9 /sound
parent7f66e33f9e90ca98fd4f96f5dae0f024a6f7f9e8 (diff)
downloadkernel_samsung_espresso10-e8ffd9f962ecc6b7dde9e0cd1e438ac35b183347.zip
kernel_samsung_espresso10-e8ffd9f962ecc6b7dde9e0cd1e438ac35b183347.tar.gz
kernel_samsung_espresso10-e8ffd9f962ecc6b7dde9e0cd1e438ac35b183347.tar.bz2
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')
-rw-r--r--sound/soc/codecs/wm8994.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index 9f5be87..4dc815c 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -3246,6 +3246,9 @@ static irqreturn_t wm1811_jackdet_irq(int irq, void *data)
snd_soc_jack_report(wm8994->micdet[0].jack,
SND_JACK_MECHANICAL, SND_JACK_MECHANICAL);
+ snd_soc_update_bits(codec, WM8958_MICBIAS2,
+ WM8958_MICB2_DISCH, 0);
+
/*
* Start off measument of microphone impedence to find
* out what's actually there.
@@ -3257,6 +3260,9 @@ static irqreturn_t wm1811_jackdet_irq(int irq, void *data)
} else {
dev_dbg(codec->dev, "Jack not detected\n");
+ snd_soc_update_bits(codec, WM8958_MICBIAS2,
+ WM8958_MICB2_DISCH, WM8958_MICB2_DISCH);
+
snd_soc_jack_report(wm8994->micdet[0].jack, 0,
SND_JACK_MECHANICAL | SND_JACK_HEADSET |
wm8994->btn_mask);
@@ -3342,6 +3348,9 @@ int wm8958_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack,
* otherwise jump straight to microphone detection.
*/
if (wm8994->jackdet) {
+ snd_soc_update_bits(codec, WM8958_MICBIAS2,
+ WM8958_MICB2_DISCH,
+ WM8958_MICB2_DISCH);
snd_soc_update_bits(codec, WM8994_LDO_1,
WM8994_LDO1_DISCH, 0);
wm1811_jackdet_set_mode(codec,