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

Commit 69343db5 authored by Laxminath Kasam's avatar Laxminath Kasam Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: msm8x16-wcd: Fix hph pop in switching usecase



In device switch from bongo speaker to HPH, observe
pop in headset. Since the PA select bit is changed
to HPH before DAC disable when tearing down bongo
speaker, this can result in pop in headset. Move
the PA selection bit to be changed to HPH after
PA and DAC disable.

Change-Id: Idb4f96f03880563e4bb81b98f623b6b05f27da8e
Signed-off-by: default avatarLaxminath Kasam <lkasam@codeaurora.org>
parent 7ead457a
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -1895,6 +1895,13 @@ static int msm8x16_wcd_codec_enable_charge_pump(struct snd_soc_dapm_widget *w,
					__func__, msm8x16_wcd->boost_option);
				msm8x16_wcd_boost_mode_sequence(codec, EAR_PMD);
			}
			/*
			 * Reset pa select bit from ear to hph after ear pa
			 * is disabled and HPH DAC disable to reduce ear
			 * turn off pop and avoid HPH pop in concurrency
			 */
			snd_soc_update_bits(codec,
				MSM8X16_WCD_A_ANALOG_RX_EAR_CTL, 0x80, 0x00);
		} else {
			snd_soc_update_bits(codec,
					MSM8X16_WCD_A_DIGITAL_CDC_DIG_CLK_CTL,
@@ -4651,12 +4658,6 @@ static int msm8x16_wcd_codec_enable_ear_pa(struct snd_soc_dapm_widget *w,
		snd_soc_update_bits(codec, MSM8X16_WCD_A_ANALOG_RX_EAR_CTL,
			    0x40, 0x00);
		usleep_range(7000, 7100);
		/*
		 * Reset pa select bit from ear to hph after ear pa
		 * is disabled to reduce ear turn off pop
		 */
		snd_soc_update_bits(codec, MSM8X16_WCD_A_ANALOG_RX_EAR_CTL,
			    0x80, 0x00);
		if (get_codec_version(msm8x16_wcd) < CONGA)
			snd_soc_update_bits(codec,
			MSM8X16_WCD_A_ANALOG_RX_HPH_CNP_WG_TIME, 0xFF, 0x16);