ASoC: wm8994: Report any low impedance accessory as a headphone
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 26 Jan 2012 18:33:24 +0000 (18:33 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 26 Jan 2012 18:41:03 +0000 (18:41 +0000)
Report any accessory with a low impedance as a headphone, previously
anything other than a short or microphone would not be reported at all.
The most likely reason is a microphone with incorrect polarity.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/wm8994.c

index b047bfada709bf0da0597cd81ee57d122c652f6c..11ca19b72d7d5a453ced0f7154d7c7fcf898e28a 100644 (file)
@@ -3089,7 +3089,7 @@ static void wm8958_default_micdet(u16 status, void *data)
        }
 
 
-       if (wm8994->mic_detecting && status & 0x4) {
+       if (wm8994->mic_detecting && status & 0xfc) {
                dev_dbg(codec->dev, "Detected headphone\n");
                wm8994->mic_detecting = false;