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

Commit 9de62865 authored by Phani Kumar Uppalapati's avatar Phani Kumar Uppalapati
Browse files

ASoC: wcd9xxx: Reset MBHC registers upon plug removal



Reset MBHC Scaling mux and release detect when mechanical
plug removal is detected. This is to ensure that there is
no micbias voltage present when plug is removed immediately
after insertion.

CRs-fixed: 564412
Change-Id: Ie116017b81f1ecd41e3bc080b798d6d9a51a5e70
Signed-off-by: default avatarPhani Kumar Uppalapati <phaniu@codeaurora.org>
parent 6badacdb
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2907,6 +2907,11 @@ static void wcd9xxx_swch_irq_handler(struct wcd9xxx_mbhc *mbhc)
		}

		if (is_removed) {
			snd_soc_write(codec, WCD9XXX_A_MBHC_SCALING_MUX_1,
				      0x00);
			snd_soc_update_bits(codec, WCD9XXX_A_CDC_MBHC_B1_CTL,
					    0x02, 0x00);

			/* Enable Mic Bias pull down and HPH Switch to GND */
			snd_soc_update_bits(codec,
					mbhc->mbhc_bias_regs.ctl_reg, 0x01,