Skip to content

ASoC: Fix missing channel fixup for codec end of ch_map

Richard Fitzgerald linux-sound lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5ASoC: Rename snd_soc_dai_link_ch_map.ch_mask to cpu_ch_maskinclude/sound/soc.h sound/soc/sdw_utils/soc_sdw_utils.c sound/soc/soc-pcm.c+3 -30 replies
2/5ASoC: Add codec_ch_mask to snd_soc_dai_link_ch_mapinclude/sound/soc.h+1 -00 replies
3/5ASoC: soc-pcm: Apply snd_soc_dai_link_ch_map.codec_ch_mask to codec paramssound/soc/soc-pcm.c+12 -40 replies
4/5ASoC: sdw_utils: Set snd_soc_dai_link_ch_map.codec_ch_mask for capturesound/soc/sdw_utils/soc_sdw_utils.c+14 -60 replies
5/5ASoC: sdw_utils: cs_amp: Delete bogus and incorrect capture channel fixupinclude/sound/soc_sdw_utils.h sound/soc/sdw_utils/soc_sdw_cs_amp.c sound/soc/sdw_utils/soc_sdw_utils.c+0 -520 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

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(-)
Signature · 1 line
2.47.3