Skip to content
Snippets Groups Projects
Commit 66881d14 authored by Shengjiu Wang's avatar Shengjiu Wang Committed by Jason Liu
Browse files

LF-6072: ASoC: imx-card: Assign clock rate for PDM format


Previously we only assigned clock rate for 44kHz series sample rate.
But meet issue on i.MX8MM 16KHz case, the calculated mclk_freq is
512KHz, but because root clock divider range limitation, the smallest
mclk rate is 768Hkz, then cause issue. so also assign mclk_freq
for 48kHz series sample rates

Fixes: 3a650ee6 ("LF-5909-2: ASoC: imx-card: fix DSD mclk frequency")
Signed-off-by: default avatarShengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: default avatarChancel Liu <chancel.liu@nxp.com>
Acked-by: default avatarJason Liu <jason.hui.liu@nxp.com>
parent 8ef1ad8d
No related branches found
No related tags found
1 merge request!455CI: Update gitlab-ci
...@@ -354,8 +354,12 @@ static int imx_aif_hw_params(struct snd_pcm_substream *substream, ...@@ -354,8 +354,12 @@ static int imx_aif_hw_params(struct snd_pcm_substream *substream,
else else
mclk_freq = params_rate(params) * slots * slot_width; mclk_freq = params_rate(params) * slots * slot_width;
/* Use the maximum freq from DSD512 (512*44100 = 22579200) */ /* Use the maximum freq from DSD512 (512*44100 = 22579200) */
if (format_is_dsd(params) && (params_rate(params) % 44100 == 0)) if (format_is_dsd(params)) {
mclk_freq = 22579200; if (params_rate(params) % 11025 == 0)
mclk_freq = 22579200;
else
mclk_freq = 24576000;
}
ret = snd_soc_dai_set_sysclk(cpu_dai, link_data->cpu_sysclk_id, mclk_freq, ret = snd_soc_dai_set_sysclk(cpu_dai, link_data->cpu_sysclk_id, mclk_freq,
SND_SOC_CLOCK_OUT); SND_SOC_CLOCK_OUT);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment