MLK-17034-3: ASoC: imx-wm8960: remove clk operation in startup/shutdown
authorShengjiu Wang <shengjiu.wang@nxp.com>
Tue, 28 Nov 2017 09:02:22 +0000 (17:02 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Tue, 20 Mar 2018 19:49:47 +0000 (14:49 -0500)
In imx8 when systerm enter suspend state, the power of subsystem will be
off, the clock enable state will be lost after resume, the startup
function isn't called after resume, so the clock will be enabled after
resume, the clock operation should be moved to pm runtime resume function.
For the mclk is for codec, this clock enablement and disablement will be
move to code driver's runtime resume and runtime suspend

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
sound/soc/fsl/imx-wm8960.c

index 8dbf997..0951e47 100644 (file)
@@ -313,12 +313,6 @@ static int imx_hifi_startup(struct snd_pcm_substream *substream)
                        return ret;
        }
 
-       ret = clk_prepare_enable(data->codec_clk);
-       if (ret) {
-               dev_err(card->dev, "Failed to enable MCLK: %d\n", ret);
-               return ret;
-       }
-
        return ret;
 }
 
@@ -329,8 +323,6 @@ static void imx_hifi_shutdown(struct snd_pcm_substream *substream)
        struct imx_wm8960_data *data = snd_soc_card_get_drvdata(card);
        bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK;
 
-       clk_disable_unprepare(data->codec_clk);
-
        data->is_stream_opened[tx] = false;
 }