ASoC: Tegra: WAR to avoid incorrect mic detection event
Sumit Bhattacharya [Mon, 5 Dec 2011 13:21:58 +0000 (18:21 +0530)]
When 3-pin pin is interted in cardhu headset port mic short interrupts
get asserted which also triggers mic detection interrupt. As a result
ALSA detects presence of mic mistakenly. For cardhu register WM8903
mic short event for mic detection so that mic detection interrupt
generated during mic short event gets cancelled.

Bug 906524

Change-Id: Icfd9d9d26d171b075eac6e76f35227e43c928e0e
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-on: http://git-master/r/68229
Reviewed-by: Scott Peterson <speterson@nvidia.com>
Tested-by: Scott Peterson <speterson@nvidia.com>

Rebase-Id: Re1780ad2c6a5c2ee37ba07b20651203e8e33215e

sound/soc/tegra/tegra_wm8903.c

index 016a0bb..5aaa423 100644 (file)
@@ -594,7 +594,7 @@ static int tegra_wm8903_init(struct snd_soc_pcm_runtime *rtd)
                              ARRAY_SIZE(tegra_wm8903_mic_jack_pins),
                              tegra_wm8903_mic_jack_pins);
        wm8903_mic_detect(codec, &tegra_wm8903_mic_jack, SND_JACK_MICROPHONE,
-                               0);
+                         machine_is_cardhu() ? SND_JACK_MICROPHONE : 0);
 
        snd_soc_dapm_force_enable_pin(dapm, "MICBIAS");