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

Commit 75c26871 authored by Yandong Yang's avatar Yandong Yang Committed by Gerrit - the friendly Code Review server
Browse files

Asoc: wcd: mbhc: Report SW_JACK_PHYSICAL_INSERT



Report SW_JACK_PHYSICAL_INSERT
when headset or headphone insertion

CRs-Fixed: 847625
Change-Id: I67aafd9361ec6dacd8d76f67f709cb5f7de0f90d
Signed-off-by: default avatarWalter Yang <yandongy@codeaurora.org>
parent cbd32df3
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -43,7 +43,8 @@

#define WCD9XXX_JACK_MASK (SND_JACK_HEADSET | SND_JACK_OC_HPHL | \
			   SND_JACK_OC_HPHR | SND_JACK_LINEOUT | \
			   SND_JACK_UNSUPPORTED | SND_JACK_MICROPHONE2)
			   SND_JACK_UNSUPPORTED | SND_JACK_MICROPHONE2 | \
			   SND_JACK_MECHANICAL)
#define WCD9XXX_JACK_BUTTON_MASK (SND_JACK_BTN_0 | SND_JACK_BTN_1 | \
				  SND_JACK_BTN_2 | SND_JACK_BTN_3 | \
				  SND_JACK_BTN_4 | SND_JACK_BTN_5 | \
@@ -962,7 +963,8 @@ static void wcd9xxx_report_plug(struct wcd9xxx_mbhc *mbhc, int insertion,
		pr_debug("%s: Reporting insertion %d(%x)\n", __func__,
			 jack_type, mbhc->hph_status);
		wcd9xxx_jack_report(mbhc, &mbhc->headset_jack,
				    mbhc->hph_status, WCD9XXX_JACK_MASK);
				    (mbhc->hph_status | SND_JACK_MECHANICAL),
				    WCD9XXX_JACK_MASK);
		/*
		 * if PA is already on, switch micbias
		 * source to VDDIO