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 <phaniu@codeaurora.org>
This commit is contained in:
Phani Kumar Uppalapati 2016-11-07 19:15:48 -08:00
parent 30b895d9f1
commit 6db3939dbf

View file

@ -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))