linux/sound/soc/rockchip
Alexey Charkov 8a6391ec66
ASoC: rockchip: rockchip_sai: Set slot width for non-TDM mode
Currently the slot width in non-TDM mode is always kept at the POR value
of 32 bits, regardless of the sample width, which doesn't work well for
some codecs such as NAU8822.

Set the slot width according to the sample width in non-TDM mode, which
is what other CPU DAI drivers do.

Tested on the following RK3576 configurations:
- SAI2 + NAU8822 (codec as the clock master), custom board
- SAI1 + ES8388 (codec as the clock master), RK3576 EVB1
- SAI2 + RT5616 (SAI as the clock master), FriendlyElec NanoPi M5

NAU8822 didn't work prior to this patch but works after the patch. Other
two configurations work both before and after the patch.

Fixes: cc78d1eaab ("ASoC: rockchip: add Serial Audio Interface (SAI) driver")
Signed-off-by: Alexey Charkov <alchark@flipper.net>
Tested-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Link: https://patch.msgid.link/20260318-sai-slot-width-v1-1-1f68186f71e3@flipper.net
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-03-25 16:58:24 +00:00
..
Kconfig ASoC: rockchip: spdif: Fill IEC958 CS info per params 2026-02-05 18:46:47 +00:00
Makefile ASoC: rockchip: add Serial Audio Interface (SAI) driver 2025-04-22 15:35:17 +01:00
rk3288_hdmi_analog.c ASoC: rockchip: rk3288_hdmi_analog: convert to snd_soc_dapm_xxx() 2025-11-17 00:18:04 +00:00
rk3399_gru_sound.c ASoC: rockchip: rk3399_gru_sound: use inclusive language for SND_SOC_DAIFMT_CBx_CFx 2025-03-03 12:59:35 +00:00
rockchip_i2s_tdm.c ASoC: rockchip: i2s-tdm: Use param rate if not provided by set_sysclk 2026-02-19 11:45:49 +00:00
rockchip_i2s_tdm.h ASoC: rockchip: i2s-tdm: switch to FIELD_PREP_WM16_CONST macro 2025-09-02 20:06:47 -04:00
rockchip_i2s.c ASoC: rockchip: Convert to RUNTIME_PM_OPS() & co 2025-03-17 10:14:53 +00:00
rockchip_i2s.h ASoC: rockchip: i2s: Add support for frame inversion 2021-08-26 13:59:40 +01:00
rockchip_max98090.c ASoC: rockchip: rockchip_max98090: convert to snd_soc_dapm_xxx() 2025-11-17 00:18:05 +00:00
rockchip_pdm.c ASoC: rockchip: Fix Wvoid-pointer-to-enum-cast warning (again) 2025-12-03 14:54:38 +00:00
rockchip_pdm.h ASoC: rockchip: pdm: Add support for path map 2021-09-13 01:44:10 +01:00
rockchip_rt5645.c ASoC: rockchip: rockchip_rt5645: use inclusive language for SND_SOC_DAIFMT_CBx_CFx 2025-03-03 12:59:36 +00:00
rockchip_sai.c ASoC: rockchip: rockchip_sai: Set slot width for non-TDM mode 2026-03-25 16:58:24 +00:00
rockchip_sai.h ASoC: rockchip: add Serial Audio Interface (SAI) driver 2025-04-22 15:35:17 +01:00
rockchip_spdif.c ASoC: rockchip: spdif: Convert to FIELD_PREP 2026-02-05 18:46:48 +00:00
rockchip_spdif.h ASoC: rockchip: spdif: Convert to FIELD_PREP 2026-02-05 18:46:48 +00:00