summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZidan Wang <zidan.wang@freescale.com>2015-02-13 15:37:41 +0800
committerZidan Wang <zidan.wang@freescale.com>2015-02-13 16:10:12 +0800
commitbe541a025daa94c0a73be7d8dcf2d49702f75ab9 (patch)
treeb6399f178becad332894a226063cbbd6100b7408
parentbce49f6b88b86ee164a1ac82f77eae9290581613 (diff)
MLK-10273 ASoC: imx-wm8958: using set pll help function instead of directly writing registers
Set pll helper function will not set FLL when FLL source, FLL in and out frequency is not been changed. So using set pll helper function to set FLL source, FLL in and out to 0 in hw_free(), which also disable the FLL. Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
-rw-r--r--sound/soc/fsl/imx-wm8958.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/sound/soc/fsl/imx-wm8958.c b/sound/soc/fsl/imx-wm8958.c
index 91a203637236..061eee0750cd 100644
--- a/sound/soc/fsl/imx-wm8958.c
+++ b/sound/soc/fsl/imx-wm8958.c
@@ -162,14 +162,6 @@ static int imx_hifi_hw_params(struct snd_pcm_substream *substream,
} else {
data->sr_stream[tx] = params_rate(params);
- /*
- * Set pll helper function will not set FLL when FLL source,
- * FLL in and out frequency is not been changed. So for first
- * stream, we should enable FLL.
- */
- if (data->sr_stream[!tx] == 0)
- snd_soc_update_bits(codec, WM8994_FLL1_CONTROL_1, 1, 1);
-
pll_out = data->sr_stream[tx] * 256;
ret = snd_soc_dai_set_pll(codec_dai, WM8994_FLL1,
@@ -207,7 +199,6 @@ static int imx_hifi_hw_free(struct snd_pcm_substream *substream)
{
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_dai *codec_dai = rtd->codec_dai;
- struct snd_soc_codec *codec = rtd->codec;
struct snd_soc_card *card = rtd->card;
struct imx_wm8958_data *data = snd_soc_card_get_drvdata(card);
bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK;
@@ -223,7 +214,7 @@ static int imx_hifi_hw_free(struct snd_pcm_substream *substream)
data->clk_frequency, SND_SOC_CLOCK_OUT);
/* Disable FLL1 after all stream finished. */
- snd_soc_update_bits(codec, WM8994_FLL1_CONTROL_1, 1, 0);
+ snd_soc_dai_set_pll(codec_dai, WM8994_FLL1, 0, 0, 0);
}
data->sr_stream[tx] = 0;