From: Stephen Warren Date: Thu, 10 Feb 2011 22:37:14 +0000 (-0700) Subject: ASoC: WM8903: Fix mic detection enable logic X-Git-Tag: v3.0~1651^2~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3088e3b4963d26d6f6f54987f595b974ed6d48d8;p=platform%2Fkernel%2Flinux-amlogic.git ASoC: WM8903: Fix mic detection enable logic The mic detection HW should be enabled when either mic or short detection is required, not when only both are required. Signed-off-by: Stephen Warren Acked-by: Liam Girdwood Signed-off-by: Mark Brown Cc: stable@kernel.org --- diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c index 987476a..017d99c 100644 --- a/sound/soc/codecs/wm8903.c +++ b/sound/soc/codecs/wm8903.c @@ -1482,7 +1482,7 @@ int wm8903_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack, WM8903_MICDET_EINT | WM8903_MICSHRT_EINT, irq_mask); - if (det && shrt) { + if (det || shrt) { /* Enable mic detection, this may not have been set through * platform data (eg, if the defaults are OK). */ snd_soc_update_bits(codec, WM8903_WRITE_SEQUENCER_0,