]> git.hungrycats.org Git - linux/commitdiff
ASoC: WM8903: Fix mic detection enable logic
authorStephen Warren <swarren@nvidia.com>
Thu, 10 Feb 2011 22:37:14 +0000 (15:37 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 24 Feb 2011 22:54:40 +0000 (14:54 -0800)
commit 3088e3b4963d26d6f6f54987f595b974ed6d48d8 upstream.

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 <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
sound/soc/codecs/wm8903.c

index 622b60238a824e084099b3f290dc0dda6ebf6767..8b87e0419eb0e6c2099dd998f403dd0d41d3623e 100644 (file)
@@ -1479,7 +1479,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,