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

Commit fbee6e07 authored by Aravind Kumar's avatar Aravind Kumar Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: msm8x16-wcd: remove pdm and mclk disable for tx path



When rx and tx path are concurrently active, tearing down
the tx path brings down the pdm and mclk along with it. This
also causes pop in voice call scenarios.
Remove the disable of these clocks from tx path to ensure
that they are disabled in the disable function common
to the tx and rx path.

CRs-Fixed: 776426
Change-Id: I58964b203e4389a192c0a53e7640336bdd45a4b7
Signed-off-by: default avatarAravind Kumar <akumark@codeaurora.org>
parent 388cfdf9
Loading
Loading
Loading
Loading
+2 −23
Original line number Diff line number Diff line
/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1953,27 +1953,6 @@ static int msm8x16_wcd_codec_enable_spk_pa(struct snd_soc_dapm_widget *w,
	return 0;
}

static int msm8x16_wcd_tx_disable_pdm_clk(struct snd_soc_dapm_widget *w,
				struct snd_kcontrol *kcontrol, int event)
{
	struct snd_soc_codec *codec = w->codec;
	struct msm8916_asoc_mach_data *pdata = NULL;

	pdata = snd_soc_card_get_drvdata(codec->card);

	dev_dbg(w->codec->dev, "%s event %d w->name %s\n", __func__,
			event, w->name);
	switch (event) {
	case SND_SOC_DAPM_POST_PMD:
		if (atomic_read(&pdata->mclk_rsc_ref) == 0)
			snd_soc_update_bits(codec,
				MSM8X16_WCD_A_CDC_CLK_PDM_CTL,
				0x03, 0x00);
		break;
	}
	return 0;
}

static int msm8x16_wcd_codec_enable_dig_clk(struct snd_soc_dapm_widget *w,
				     struct snd_kcontrol *kcontrol, int event)
{
@@ -3526,7 +3505,7 @@ static const struct snd_soc_dapm_widget msm8x16_wcd_dapm_widgets[] = {
		MSM8X16_WCD_A_CDC_CLK_RX_I2S_CTL,	4, 0, NULL, 0),
	SND_SOC_DAPM_SUPPLY("TX_I2S_CLK",
		MSM8X16_WCD_A_CDC_CLK_TX_I2S_CTL, 4, 0,
		msm8x16_wcd_tx_disable_pdm_clk, SND_SOC_DAPM_POST_PMD),
		NULL, 0),
};

static const struct msm8x16_wcd_reg_mask_val msm8x16_wcd_reg_defaults[] = {