]> git.ipfire.org Git - thirdparty/linux.git/commit
ASoC: fsl-asoc-card: add channel and rate constraints for CS42888
authorShengjiu Wang <shengjiu.wang@nxp.com>
Wed, 29 Apr 2026 10:00:25 +0000 (18:00 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 30 Apr 2026 12:07:57 +0000 (21:07 +0900)
commite78abe395d30e8be8effc538e6983e27aa289602
tree371e1e9bc35a0846f8968fb753f363166f877c26
parentd611feb52de8c0d599487d98a6dd3bbb86e20c60
ASoC: fsl-asoc-card: add channel and rate constraints for CS42888

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.

Additionally, the fixed system clock on i.MX platforms limits supported
sample rates. With 12.288 MHz MCLK, only 48kHz family rates (48k, 96k,
192k) achieve valid MCLK:LRCK ratios. With 11.2896 MHz MCLK, only 44k
family rates are supported.

Add a startup callback to apply PCM constraints for both channels and
rates, preventing userspace from requesting unsupported configurations.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/20260429100028.2739711-4-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/fsl-asoc-card.c