From 3a650ee65b737aeb8df0698ad28b13c64d5ad389 Mon Sep 17 00:00:00 2001 From: Shengjiu Wang <shengjiu.wang@nxp.com> Date: Mon, 18 Apr 2022 09:57:16 +0800 Subject: [PATCH] LF-5909-2: ASoC: imx-card: fix DSD mclk frequency The DSD rate not only DSD64/128/256/512, which are the multiple rate of 44.1kHz, but also support the multiple rate of 48kHz, so can't force all mclk frequency to be 22579200Hz Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Chancel Liu <chancel.liu@nxp.com> --- sound/soc/fsl/imx-card.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/fsl/imx-card.c b/sound/soc/fsl/imx-card.c index db947180617a6..be9c2c911b773 100644 --- a/sound/soc/fsl/imx-card.c +++ b/sound/soc/fsl/imx-card.c @@ -354,7 +354,7 @@ static int imx_aif_hw_params(struct snd_pcm_substream *substream, else mclk_freq = params_rate(params) * slots * slot_width; /* Use the maximum freq from DSD512 (512*44100 = 22579200) */ - if (format_is_dsd(params)) + if (format_is_dsd(params) && (params_rate(params) % 44100 == 0)) mclk_freq = 22579200; ret = snd_soc_dai_set_sysclk(cpu_dai, link_data->cpu_sysclk_id, mclk_freq, -- GitLab