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

Commit 0a95e221 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: wcd9xxx: Avoid micbias glitches during audio playback"

parents 07df734f 05f83b68
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 =