[PATCH 0/5] ASoC: Fix missing channel fixup for codec end of ch_map

From: Richard Fitzgerald

Date: Thu Sep 10 2026 - 07:49:33 EST


Struct snd_soc_dai_link_ch_map had a single mask member to set the
CPU channel masks. But no fixup was done to the codec end of the link.

For example if a 4-channel CPU capture DAI was made from two codecs both
supplying 2 channels, the hw_params() of the codec would be passed a
channel count of 4.

On SoundWire this could cause multiple codecs to send data in the same
bits of a frame because the unused channels were not disabled.

The changes in this series are:
- Separate channel masks for CPU and codec in struct
snd_soc_dai_link_ch_map .

- Apply the codec channel mask as a channel count fixup if the machine
drive has not set a TDM mask.

- Set the codec channel mask in the SoundWire machine driver.

- Remove the workaround from the cs_amp machine driver.

Richard Fitzgerald (5):
ASoC: Rename snd_soc_dai_link_ch_map.ch_mask to cpu_ch_mask
ASoC: Add codec_ch_mask to snd_soc_dai_link_ch_map
ASoC: soc-pcm: Apply snd_soc_dai_link_ch_map.codec_ch_mask to codec
params
ASoC: sdw_utils: Set snd_soc_dai_link_ch_map.codec_ch_mask for capture
ASoC: sdw_utils: cs_amp: Delete bogus and incorrect capture channel
fixup

include/sound/soc.h | 3 +-
include/sound/soc_sdw_utils.h | 2 --
sound/soc/sdw_utils/soc_sdw_cs_amp.c | 46 ----------------------------
sound/soc/sdw_utils/soc_sdw_utils.c | 24 +++++++++------
sound/soc/soc-pcm.c | 18 ++++++++---
5 files changed, 29 insertions(+), 64 deletions(-)

--
2.47.3