Unverified Commit 9f4d0899 authored by Chancel Liu's avatar Chancel Liu Committed by Mark Brown
Browse files

ASoC: fsl_sai: Constrain sample rates from audio PLLs only in master mode



If SAI works in master mode it will generate clocks for external codec
from audio PLLs. Thus sample rates should be constrained according to
audio PLL clocks. While SAI works in slave mode which means clocks are
generated externally then constraints are independent of audio PLLs.

Fixes: 4edc9859 ("ASoC: fsl_sai: Add sample rate constraint")
Signed-off-by: default avatarChancel Liu <chancel.liu@nxp.com>
Link: https://patch.msgid.link/20251210062109.2577735-1-chancel.liu@nxp.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 20c734cb
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -917,8 +917,14 @@ static int fsl_sai_startup(struct snd_pcm_substream *substream,
					   tx ? sai->dma_params_tx.maxburst :
					   sai->dma_params_rx.maxburst);

	if (sai->is_consumer_mode[tx])
		ret = snd_pcm_hw_constraint_list(substream->runtime, 0,
						 SNDRV_PCM_HW_PARAM_RATE,
						 &fsl_sai_rate_constraints);
	else
		ret = snd_pcm_hw_constraint_list(substream->runtime, 0,
					 SNDRV_PCM_HW_PARAM_RATE, &sai->constraint_rates);
						 SNDRV_PCM_HW_PARAM_RATE,
						 &sai->constraint_rates);

	return ret;
}