Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7c3c9194 authored by Phani Kumar Uppalapati's avatar Phani Kumar Uppalapati
Browse files

ASoC: wcd-mbhc: Avoid fake headset report during headphone remove



When headphone is removed while 3 second polling is still in progress,
mbhc hs comparator result will be read as "0" and this causes reporting
a fake headset insert event to user-space followed by headphone removal.
Avoid sending this fake headset insert event to user-space by checking
for the microphone clamp bit from codec mbhc hardware.

CRs-fixed: 941089
Change-Id: I96d96dca92a6c99bbb25ab70a2706e730c28818b
Signed-off-by: default avatarPhani Kumar Uppalapati <phaniu@codeaurora.org>
parent 753b4916
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1312,6 +1312,7 @@ correct_plug_type:
				      MBHC_PLUG_TYPE_HEADSET) &&
				     (mbhc->current_plug !=
				      MBHC_PLUG_TYPE_ANC_HEADPHONE)) &&
				    !wcd_swch_level_remove(mbhc) &&
				    !mbhc->btn_press_intr) {
					pr_debug("%s: cable is %sheadset\n",
						__func__,