From 6db3939dbf640f2f03ca61c7f42c26942fc41e05 Mon Sep 17 00:00:00 2001 From: Phani Kumar Uppalapati Date: Mon, 7 Nov 2016 19:15:48 -0800 Subject: [PATCH] ASoC: wcd934x: Fix fake button press for headset insertion Fix fake button press when headset is inserted by properly disabling micbias after the detection is completed. CRs-Fixed: 1086418 Change-Id: I241a49dd36746c083b410a58c8c899ee0e9390ad Signed-off-by: Phani Kumar Uppalapati --- sound/soc/codecs/wcd934x/wcd934x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wcd934x/wcd934x.c b/sound/soc/codecs/wcd934x/wcd934x.c index 5d6119c6d86a..15780ca624d7 100644 --- a/sound/soc/codecs/wcd934x/wcd934x.c +++ b/sound/soc/codecs/wcd934x/wcd934x.c @@ -4182,7 +4182,7 @@ int tavil_micbias_control(struct snd_soc_codec *codec, post_dapm_on, &tavil->mbhc->wcd_mbhc); break; case MICB_DISABLE: - if (tavil->pullup_ref[micb_index] > 0) + if (tavil->micb_ref[micb_index] > 0) tavil->micb_ref[micb_index]--; if ((tavil->micb_ref[micb_index] == 0) && (tavil->pullup_ref[micb_index] > 0))