summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/imx-ak4458.c
diff options
context:
space:
mode:
authorShengjiu Wang <shengjiu.wang@nxp.com>2018-10-23 15:58:24 +0800
committerDong Aisheng <aisheng.dong@nxp.com>2019-11-25 15:50:45 +0800
commitfa2768aca5141e2bdd0552d46adc0bde0ac4af63 (patch)
tree8520bc43ef18293b3acae1220b51c5b3172e8d9b /sound/soc/fsl/imx-ak4458.c
parenta0cdb67b919054404a54355c1f652ec2a0f90f91 (diff)
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 <shengjiu.wang@nxp.com>
Diffstat (limited to 'sound/soc/fsl/imx-ak4458.c')
-rw-r--r--sound/soc/fsl/imx-ak4458.c2
1 files changed, 2 insertions, 0 deletions
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)