diff options
author | V Sujith Kumar Reddy <vsujithk@codeaurora.org> | 2020-09-18 18:54:33 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-09-25 21:50:40 +0200 |
commit | 7e6799d8f87d7ab7ae55a229654d161b5bfae874 (patch) | |
tree | 4ddc729d7c103feabee7a03fc46ad5251c333c78 /sound/soc/qcom/lpass-cpu.c | |
parent | ASoC: fsl: imx-audmix: Use devm_kcalloc() instead of devm_kzalloc() (diff) | |
download | linux-7e6799d8f87d7ab7ae55a229654d161b5bfae874.tar.xz linux-7e6799d8f87d7ab7ae55a229654d161b5bfae874.zip |
ASoC: qcom: lpass-cpu: Enable MI2S BCLK and LRCLK together
Update lpass-cpu.c to enable I2S BCLK and LRCLK together.
Remove BCLK enable in lpass_cpu_daiops_startup and
add in lpass_cpu_daiops_trigger API.
Signed-off-by: V Sujith Kumar Reddy <vsujithk@codeaurora.org>
Signed-off-by: Srinivasa Rao Mandadapu <srivasam@codeaurora.org>
Link: https://lore.kernel.org/r/1600448073-6709-1-git-send-email-srivasam@codeaurora.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/qcom/lpass-cpu.c')
-rw-r--r-- | sound/soc/qcom/lpass-cpu.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sound/soc/qcom/lpass-cpu.c b/sound/soc/qcom/lpass-cpu.c index 1ee6d8b3f550..0718a0fff9cb 100644 --- a/sound/soc/qcom/lpass-cpu.c +++ b/sound/soc/qcom/lpass-cpu.c @@ -80,14 +80,6 @@ static int lpass_cpu_daiops_startup(struct snd_pcm_substream *substream, dev_err(dai->dev, "error in enabling mi2s osr clk: %d\n", ret); return ret; } - - ret = clk_prepare_enable(drvdata->mi2s_bit_clk[dai->driver->id]); - if (ret) { - dev_err(dai->dev, "error in enabling mi2s bit clk: %d\n", ret); - clk_disable_unprepare(drvdata->mi2s_osr_clk[dai->driver->id]); - return ret; - } - return 0; } @@ -310,6 +302,14 @@ static int lpass_cpu_daiops_trigger(struct snd_pcm_substream *substream, if (ret) dev_err(dai->dev, "error writing to i2sctl reg: %d\n", ret); + + ret = clk_prepare_enable(drvdata->mi2s_bit_clk[id]); + if (ret) { + dev_err(dai->dev, "error in enabling mi2s bit clk: %d\n", ret); + clk_disable_unprepare(drvdata->mi2s_osr_clk[id]); + return ret; + } + break; case SNDRV_PCM_TRIGGER_STOP: case SNDRV_PCM_TRIGGER_SUSPEND: |