From fa2768aca5141e2bdd0552d46adc0bde0ac4af63 Mon Sep 17 00:00:00 2001 From: Shengjiu Wang Date: Tue, 23 Oct 2018 15:58:24 +0800 Subject: MLK-20034-1: ASoC: imx-ak4458: constrain the mclk rate for DSD When enable DSD for ak4458 with imx8mm platform, in DSD256 mode the mclk calculated from ak4458_get_mclk_rate is 256fs, but the codec require the mclk should be 512fs. so just hard code the clock to be 512fs in DSD mode. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/imx-ak4458.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sound/soc/fsl/imx-ak4458.c') diff --git a/sound/soc/fsl/imx-ak4458.c b/sound/soc/fsl/imx-ak4458.c index f99c9d71229c..6628f8c12e51 100644 --- a/sound/soc/fsl/imx-ak4458.c +++ b/sound/soc/fsl/imx-ak4458.c @@ -201,6 +201,8 @@ static int imx_aif_hw_params(struct snd_pcm_substream *substream, /* set MCLK freq */ mclk_freq = ak4458_get_mclk_rate(substream, params); + if (is_dsd) + mclk_freq = 22579200; ret = snd_soc_dai_set_sysclk(cpu_dai, FSL_SAI_CLK_MAST1, mclk_freq, SND_SOC_CLOCK_OUT); if (ret < 0) -- cgit v1.2.3