aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-02-28 19:03:37 +0000
committerAndreas Blaesius <skate4life@gmx.de>2016-04-30 11:03:52 +0200
commitabb9a40e01dcce61d998f51300e945b1ed15a4ef (patch)
tree6e2c3f3cfe5371274491753a2e06fbffd813bded
parent5ba89e9f3e297a29671082119a43130e702b3dc2 (diff)
downloadkernel_samsung_espresso10-abb9a40e01dcce61d998f51300e945b1ed15a4ef.zip
kernel_samsung_espresso10-abb9a40e01dcce61d998f51300e945b1ed15a4ef.tar.gz
kernel_samsung_espresso10-abb9a40e01dcce61d998f51300e945b1ed15a4ef.tar.bz2
ASoC: wm8994: Make sure we don't have MICBIAS on during jackdet mode
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--sound/soc/codecs/wm8994.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index d950345..e806b9a 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -3192,9 +3192,6 @@ static void wm8958_default_micdet(u16 status, void *data)
snd_soc_update_bits(codec, WM8958_MIC_DETECT_1,
WM8958_MICD_ENA, 0);
- wm1811_jackdet_set_mode(codec,
- WM1811_JACKDET_MODE_JACK);
-
if (wm8994->pdata->jd_ext_cap) {
mutex_lock(&codec->mutex);
snd_soc_dapm_disable_pin(&codec->dapm,
@@ -3202,6 +3199,9 @@ static void wm8958_default_micdet(u16 status, void *data)
snd_soc_dapm_sync(&codec->dapm);
mutex_unlock(&codec->mutex);
}
+
+ wm1811_jackdet_set_mode(codec,
+ WM1811_JACKDET_MODE_JACK);
}
}
@@ -3257,23 +3257,24 @@ static irqreturn_t wm1811_jackdet_irq(int irq, void *data)
snd_soc_update_bits(codec, WM8958_MICBIAS2,
WM8958_MICB2_DISCH, 0);
- /* If required for an external cap force MICBIAS on */
- if (wm8994->pdata->jd_ext_cap) {
- mutex_lock(&codec->mutex);
- snd_soc_dapm_force_enable_pin(&codec->dapm,
- "MICBIAS2");
- snd_soc_dapm_sync(&codec->dapm);
- mutex_unlock(&codec->mutex);
- }
-
/*
* Start off measument of microphone impedence to find
* out what's actually there.
*/
wm8994->mic_detecting = true;
wm1811_jackdet_set_mode(codec, WM1811_JACKDET_MODE_MIC);
+
snd_soc_update_bits(codec, WM8958_MIC_DETECT_1,
WM8958_MICD_ENA, WM8958_MICD_ENA);
+
+ /* If required for an external cap force MICBIAS on */
+ if (wm8994->pdata->jd_ext_cap) {
+ mutex_lock(&codec->mutex);
+ snd_soc_dapm_force_enable_pin(&codec->dapm,
+ "MICBIAS2");
+ snd_soc_dapm_sync(&codec->dapm);
+ mutex_unlock(&codec->mutex);
+ }
} else {
dev_dbg(codec->dev, "Jack not detected\n");