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

Commit f882b8bf authored by Phani Kumar Uppalapati's avatar Phani Kumar Uppalapati
Browse files

ASoC: wcd9xxx: Disable current source in error scenarios



Sometimes during removal, fake electrical removal interrupt
can also get generated. In that case, current source needs
to be disabled after a round of DCE measurements. Otherwise,
next time when the plug is re-inserted, measurements can go
wrong and hence plug type can be wrongly detected.

CRs-Fixed: 759634
Change-Id: I6be5ab5891bd73f63acf2ec0f03c98ccd3938936
Signed-off-by: default avatarPhani Kumar Uppalapati <phaniu@codeaurora.org>
parent dbd2b72e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2471,6 +2471,11 @@ static void wcd9xxx_mbhc_decide_swch_plug(struct wcd9xxx_mbhc *mbhc)
	}

	if (wcd9xxx_swch_level_remove(mbhc)) {
		if (current_source_enable && mbhc->is_cs_enabled) {
			wcd9xxx_turn_onoff_current_source(mbhc,
					&mbhc->mbhc_bias_regs,
					false, false);
		}
		pr_debug("%s: Switch level is low when determining plug\n",
			 __func__);
		return;