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

Commit f10181dc authored by Simmi Pateriya's avatar Simmi Pateriya
Browse files

ASoC: wcd9xxx: Setup internal micbias for headset detection



If recording is also using internal micbias, then after recording
ends, the dapm widget power down callback will reset the state of
internal micbias in codec register. To avoid such issues make sure
internal micbias is setup whenever detection occurs.

CRs-Fixed: 551575
Change-Id: I92ec4f622677fd9f57e75c64617f13f3cb741442
Signed-off-by: default avatarSimmi Pateriya <simmip@codeaurora.org>
parent 1695f1b0
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -1084,6 +1084,18 @@ static short wcd9xxx_mbhc_setup_hs_polling(struct wcd9xxx_mbhc *mbhc,
	if (mbhc->mbhc_cb && mbhc->mbhc_cb->enable_mb_source)
		mbhc->mbhc_cb->enable_mb_source(codec, true);

	/*
	 * setup internal micbias if codec uses internal micbias for
	 * headset detection
	 */
	if (mbhc->mbhc_cfg->use_int_rbias) {
		if (mbhc->mbhc_cb && mbhc->mbhc_cb->setup_int_rbias)
			mbhc->mbhc_cb->setup_int_rbias(codec, true);
	else
		pr_err("%s: internal bias is requested but codec did not provide callback\n",
			 __func__);
	}

	/*
	 * Request BG and clock.
	 * These will be released by wcd9xxx_cleanup_hs_polling