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

Commit 1bd3374c 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 upon insertion of HS/HPH.

CRs-Fixed: 847638
Change-Id: Ie395e095a1224270f5831e1be389d00247c06b4a
Signed-off-by: default avatarWalter Yang <yandongy@codeaurora.org>
parent 783bbd7d
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@

#define WCD_MBHC_JACK_MASK (SND_JACK_HEADSET | SND_JACK_OC_HPHL | \
			   SND_JACK_OC_HPHR | SND_JACK_LINEOUT | \
			   SND_JACK_UNSUPPORTED)
			   SND_JACK_UNSUPPORTED | SND_JACK_MECHANICAL)
#define WCD_MBHC_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 | \
@@ -631,7 +631,8 @@ static void wcd_mbhc_report_plug(struct wcd_mbhc *mbhc, int insertion,
		pr_debug("%s: Reporting insertion %d(%x)\n", __func__,
			 jack_type, mbhc->hph_status);
		wcd_mbhc_jack_report(mbhc, &mbhc->headset_jack,
				    mbhc->hph_status, WCD_MBHC_JACK_MASK);
				    (mbhc->hph_status | SND_JACK_MECHANICAL),
				    WCD_MBHC_JACK_MASK);
		wcd_mbhc_clr_and_turnon_hph_padac(mbhc);
	}
	pr_debug("%s: leave hph_status %x\n", __func__, mbhc->hph_status);