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

Commit e765f0c9 authored by Santosh Mardi's avatar Santosh Mardi
Browse files

ASoC: msm8x16-wcd: disable mclk enable flag during device down



MCLK enable flag has to be made false during device down in SSR
this will make sure that in device up before accesing digital
core the MCLK is enabled.

CRs-Fixed: 723134
Change-Id: I3aa7f7cf3a196803bd54bdafcbab679ba827ca92
Signed-off-by: default avatarSantosh Mardi <gsantosh@codeaurora.org>
parent b40d25c8
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3519,6 +3519,9 @@ static struct regulator *wcd8x16_wcd_codec_find_regulator(

static int msm8x16_wcd_device_down(struct snd_soc_codec *codec)
{
	struct msm8916_asoc_mach_data *pdata = NULL;

	pdata = snd_soc_card_get_drvdata(codec->card);
	dev_dbg(codec->dev, "%s: device down!\n", __func__);
	msm8x16_wcd_write(codec,
		MSM8X16_WCD_A_ANALOG_TX_1_EN, 0x3);
@@ -3535,6 +3538,7 @@ static int msm8x16_wcd_device_down(struct snd_soc_codec *codec)

	msm8x16_wcd_write(codec, MSM8X16_WCD_A_DIGITAL_PERPH_RESET_CTL4, 0x1);
	msm8x16_wcd_write(codec, MSM8X16_WCD_A_ANALOG_PERPH_RESET_CTL4, 0x1);
	atomic_set(&pdata->mclk_enabled, false);
	snd_soc_card_change_online_state(codec->card, 0);
	return 0;
}