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

This commit is contained in:
Linux Build Service Account 2014-11-03 02:35:07 -08:00 committed by Gerrit - the friendly Code Review server
commit 5cc4d2ca70

View file

@ -3642,6 +3642,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);
@ -3658,6 +3661,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;
}