Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/5] ASoC: Fix missing channel fixup for codec end of ch_map
@ 2026-09-10 11:44 Richard Fitzgerald
  2026-09-10 11:44 ` [PATCH 1/5] ASoC: Rename snd_soc_dai_link_ch_map.ch_mask to cpu_ch_mask Richard Fitzgerald
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Richard Fitzgerald @ 2026-09-10 11:44 UTC (permalink / raw)
  To: broonie; +Cc: yung-chuan.liao, linux-sound, linux-kernel, patches

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-09-10 11:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-10 11:44 [PATCH 0/5] ASoC: Fix missing channel fixup for codec end of ch_map Richard Fitzgerald
2026-09-10 11:44 ` [PATCH 1/5] ASoC: Rename snd_soc_dai_link_ch_map.ch_mask to cpu_ch_mask Richard Fitzgerald
2026-09-10 11:44 ` [PATCH 2/5] ASoC: Add codec_ch_mask to snd_soc_dai_link_ch_map Richard Fitzgerald
2026-09-10 11:44 ` [PATCH 3/5] ASoC: soc-pcm: Apply snd_soc_dai_link_ch_map.codec_ch_mask to codec params Richard Fitzgerald
2026-09-10 11:44 ` [PATCH 4/5] ASoC: sdw_utils: Set snd_soc_dai_link_ch_map.codec_ch_mask for capture Richard Fitzgerald
2026-09-10 11:45 ` [PATCH 5/5] ASoC: sdw_utils: cs_amp: Delete bogus and incorrect capture channel fixup Richard Fitzgerald

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox