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

Commit 05f83b68 authored by Phani Kumar Uppalapati's avatar Phani Kumar Uppalapati Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: wcd9xxx: Avoid micbias glitches during audio playback



During audio playback over headset, micbias output is switched
to vddio and it's parameters are programmed so that it will do
button polling with a voltage equal to vddio (1.8v). It is observed
that during this polling interval there is a drop in micbias
voltage which would cause issues with button press. Avoid this
voltage drop by disabling mbhc micbias when vddio switch is enabled.

CRs-Fixed: 705060
Change-Id: I0c2f6a0224760aef1f8e51b1ae34c77fc9863b52
Signed-off-by: default avatarPhani Kumar Uppalapati <phaniu@codeaurora.org>
parent a206d164
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -323,6 +323,11 @@ static bool __wcd9xxx_switch_micbias(struct wcd9xxx_mbhc *mbhc,
			   0x04;
		if (!override)
			wcd9xxx_turn_onoff_override(mbhc, true);

		snd_soc_update_bits(codec, WCD9XXX_A_MAD_ANA_CTRL,
				    0x10, 0x00);
		snd_soc_update_bits(codec, WCD9XXX_A_LDO_H_MODE_1,
				    0x20, 0x00);
		/* Adjust threshold if Mic Bias voltage changes */
		if (d->micb_mv != VDDIO_MICBIAS_MV) {
			cfilt_k_val = __wcd9xxx_resmgr_get_k_val(mbhc,
@@ -384,6 +389,11 @@ static bool __wcd9xxx_switch_micbias(struct wcd9xxx_mbhc *mbhc,
		if ((!checkpolling || mbhc->polling_active) &&
		    restartpolling)
			wcd9xxx_pause_hs_polling(mbhc);

			snd_soc_update_bits(codec, WCD9XXX_A_MAD_ANA_CTRL,
					    0x10, 0x10);
			snd_soc_update_bits(codec, WCD9XXX_A_LDO_H_MODE_1,
					    0x20, 0x20);
		/* Reprogram thresholds */
		if (d->micb_mv != VDDIO_MICBIAS_MV) {
			cfilt_k_val =