[PATCH 3/5] ASoC: fsl-asoc-card: add channel and rate constraints for CS42888
Mark Brown
broonie at kernel.org
Sat Apr 25 02:09:32 AEST 2026
On Fri, Apr 24, 2026 at 06:38:04PM +0800, Shengjiu Wang wrote:
> The CS42888 codec has 4 I2S lanes with 2 channels per lane. Using odd
> channel counts (3, 5, 7) causes data misalignment in the I2S frame,
> resulting in incorrect channel mapping. Only mono and even channel
> counts (1, 2, 4, 6, 8) work correctly.
> +static int fsl_asoc_card_startup(struct snd_pcm_substream *substream)
> +{
> + struct snd_soc_pcm_runtime *rtd = substream->private_data;
> + struct fsl_asoc_card_priv *priv = snd_soc_card_get_drvdata(rtd->card);
> + struct snd_pcm_runtime *runtime = substream->runtime;
> + static struct snd_pcm_hw_constraint_list constraint_rates;
> + static struct snd_pcm_hw_constraint_list constraint_channels;
This makes the constraints global for all substreams, given that the
Freescale SoCs tend to have multiple DAIs and have things like direct
PDM inputs I'd expect it'd be relatively common to have disjoint
constraints.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20260424/66a08a08/attachment.sig>
More information about the Linuxppc-dev
mailing list