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

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

Merge "asoc: wcd937x: Fix pop on headphone playback start"

parents 6f9a94c8 248273c9
Loading
Loading
Loading
Loading
+12 −12
Original line number Original line Diff line number Diff line
@@ -542,6 +542,9 @@ static int wcd937x_codec_enable_hphr_pa(struct snd_soc_dapm_widget *w,
	case SND_SOC_DAPM_PRE_PMU:
	case SND_SOC_DAPM_PRE_PMU:
		snd_soc_update_bits(codec, WCD937X_ANA_HPH, 0x10, 0x10);
		snd_soc_update_bits(codec, WCD937X_ANA_HPH, 0x10, 0x10);
		usleep_range(100, 110);
		usleep_range(100, 110);
		ret = swr_slvdev_datapath_control(wcd937x->rx_swr_dev,
					    wcd937x->rx_swr_dev->dev_num,
					    true);
		break;
		break;
	case SND_SOC_DAPM_POST_PMU:
	case SND_SOC_DAPM_POST_PMU:
		usleep_range(7000, 7010);
		usleep_range(7000, 7010);
@@ -549,9 +552,6 @@ static int wcd937x_codec_enable_hphr_pa(struct snd_soc_dapm_widget *w,
				    0x02, 0x02);
				    0x02, 0x02);
		snd_soc_update_bits(codec, WCD937X_ANA_RX_SUPPLIES,
		snd_soc_update_bits(codec, WCD937X_ANA_RX_SUPPLIES,
				    0x02, 0x02);
				    0x02, 0x02);
		ret = swr_slvdev_datapath_control(wcd937x->rx_swr_dev,
					    wcd937x->rx_swr_dev->dev_num,
					    true);
		if (wcd937x->update_wcd_event)
		if (wcd937x->update_wcd_event)
			wcd937x->update_wcd_event(wcd937x->handle,
			wcd937x->update_wcd_event(wcd937x->handle,
						WCD_BOLERO_EVT_RX_MUTE,
						WCD_BOLERO_EVT_RX_MUTE,
@@ -589,6 +589,9 @@ static int wcd937x_codec_enable_hphl_pa(struct snd_soc_dapm_widget *w,
	case SND_SOC_DAPM_PRE_PMU:
	case SND_SOC_DAPM_PRE_PMU:
		snd_soc_update_bits(codec, WCD937X_ANA_HPH, 0x20, 0x20);
		snd_soc_update_bits(codec, WCD937X_ANA_HPH, 0x20, 0x20);
		usleep_range(100, 110);
		usleep_range(100, 110);
		ret = swr_slvdev_datapath_control(wcd937x->rx_swr_dev,
				    wcd937x->rx_swr_dev->dev_num,
				    true);
		break;
		break;
	case SND_SOC_DAPM_POST_PMU:
	case SND_SOC_DAPM_POST_PMU:
		usleep_range(7000, 7010);
		usleep_range(7000, 7010);
@@ -596,9 +599,6 @@ static int wcd937x_codec_enable_hphl_pa(struct snd_soc_dapm_widget *w,
				    0x02, 0x02);
				    0x02, 0x02);
		snd_soc_update_bits(codec, WCD937X_ANA_RX_SUPPLIES,
		snd_soc_update_bits(codec, WCD937X_ANA_RX_SUPPLIES,
				    0x02, 0x02);
				    0x02, 0x02);
		ret = swr_slvdev_datapath_control(wcd937x->rx_swr_dev,
				    wcd937x->rx_swr_dev->dev_num,
				    true);
		if (wcd937x->update_wcd_event)
		if (wcd937x->update_wcd_event)
			wcd937x->update_wcd_event(wcd937x->handle,
			wcd937x->update_wcd_event(wcd937x->handle,
						WCD_BOLERO_EVT_RX_MUTE,
						WCD_BOLERO_EVT_RX_MUTE,
@@ -642,14 +642,14 @@ static int wcd937x_codec_enable_aux_pa(struct snd_soc_dapm_widget *w,
		usleep_range(500, 510);
		usleep_range(500, 510);
		snd_soc_update_bits(codec, WCD937X_CLASSH_MODE_2, 0xFF, 0x3A);
		snd_soc_update_bits(codec, WCD937X_CLASSH_MODE_2, 0xFF, 0x3A);
		usleep_range(500, 510);
		usleep_range(500, 510);
		ret = swr_slvdev_datapath_control(wcd937x->rx_swr_dev,
			    wcd937x->rx_swr_dev->dev_num,
			    true);
		break;
		break;
	case SND_SOC_DAPM_POST_PMU:
	case SND_SOC_DAPM_POST_PMU:
		usleep_range(1000, 1010);
		usleep_range(1000, 1010);
		snd_soc_update_bits(codec, WCD937X_ANA_RX_SUPPLIES,
		snd_soc_update_bits(codec, WCD937X_ANA_RX_SUPPLIES,
				    0x20, 0x20);
				    0x20, 0x20);
		ret = swr_slvdev_datapath_control(wcd937x->rx_swr_dev,
			    wcd937x->rx_swr_dev->dev_num,
			    true);
		if (wcd937x->update_wcd_event)
		if (wcd937x->update_wcd_event)
			wcd937x->update_wcd_event(wcd937x->handle,
			wcd937x->update_wcd_event(wcd937x->handle,
						WCD_BOLERO_EVT_RX_MUTE,
						WCD_BOLERO_EVT_RX_MUTE,
@@ -687,14 +687,14 @@ static int wcd937x_codec_enable_ear_pa(struct snd_soc_dapm_widget *w,
		usleep_range(500, 510);
		usleep_range(500, 510);
		snd_soc_update_bits(codec, WCD937X_CLASSH_MODE_2, 0xFF, 0x3A);
		snd_soc_update_bits(codec, WCD937X_CLASSH_MODE_2, 0xFF, 0x3A);
		usleep_range(500, 510);
		usleep_range(500, 510);
		ret = swr_slvdev_datapath_control(wcd937x->rx_swr_dev,
			    wcd937x->rx_swr_dev->dev_num,
			    true);
		break;
		break;
	case SND_SOC_DAPM_POST_PMU:
	case SND_SOC_DAPM_POST_PMU:
		usleep_range(6000, 6010);
		usleep_range(6000, 6010);
		snd_soc_update_bits(codec, WCD937X_ANA_RX_SUPPLIES,
		snd_soc_update_bits(codec, WCD937X_ANA_RX_SUPPLIES,
				    0x02, 0x02);
				    0x02, 0x02);
		ret = swr_slvdev_datapath_control(wcd937x->rx_swr_dev,
			    wcd937x->rx_swr_dev->dev_num,
			    true);
		if (wcd937x->update_wcd_event)
		if (wcd937x->update_wcd_event)
			wcd937x->update_wcd_event(wcd937x->handle,
			wcd937x->update_wcd_event(wcd937x->handle,
						WCD_BOLERO_EVT_RX_MUTE,
						WCD_BOLERO_EVT_RX_MUTE,