[PATCH v3 01/24] ASoC: soc-core: bump MAX_DEFAULT_CH_MAP_SIZE to 18

From: Srinivas Kandagatla

Date: Mon Nov 30 2026 - 16:23:19 EST


The WSA Playback BE on glymur-crd carries 4 WSA speakers plus their V/I
sense feedback for speaker protection, which works out to 18 codec DAIs
on one link (4 speakers x 2 DAIs + 8 SoundWire ports + 2 WSA-macro
DAIs). The current 12-entry default ch_maps reject the link up front.

Grow the three default tables and the cap from 12 to 18.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxxxxxxxx>
---
sound/soc/soc-core.c | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 894a81b2d983..29b1e7254f90 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -766,7 +766,7 @@ static int soc_dai_link_sanity_check(struct snd_soc_card *card,
return -EINVAL;
}

-#define MAX_DEFAULT_CH_MAP_SIZE 12
+#define MAX_DEFAULT_CH_MAP_SIZE 18
static struct snd_soc_dai_link_ch_map default_ch_map_sync[MAX_DEFAULT_CH_MAP_SIZE] = {
{ .cpu = 0, .codec = 0 },
{ .cpu = 1, .codec = 1 },
@@ -780,6 +780,12 @@ static struct snd_soc_dai_link_ch_map default_ch_map_sync[MAX_DEFAULT_CH_MAP_SIZ
{ .cpu = 9, .codec = 9 },
{ .cpu = 10, .codec = 10 },
{ .cpu = 11, .codec = 11 },
+ { .cpu = 12, .codec = 12 },
+ { .cpu = 13, .codec = 13 },
+ { .cpu = 14, .codec = 14 },
+ { .cpu = 15, .codec = 15 },
+ { .cpu = 16, .codec = 16 },
+ { .cpu = 17, .codec = 17 },
};
static struct snd_soc_dai_link_ch_map default_ch_map_1cpu[MAX_DEFAULT_CH_MAP_SIZE] = {
{ .cpu = 0, .codec = 0 },
@@ -794,6 +800,12 @@ static struct snd_soc_dai_link_ch_map default_ch_map_1cpu[MAX_DEFAULT_CH_MAP_SIZ
{ .cpu = 0, .codec = 9 },
{ .cpu = 0, .codec = 10 },
{ .cpu = 0, .codec = 11 },
+ { .cpu = 0, .codec = 12 },
+ { .cpu = 0, .codec = 13 },
+ { .cpu = 0, .codec = 14 },
+ { .cpu = 0, .codec = 15 },
+ { .cpu = 0, .codec = 16 },
+ { .cpu = 0, .codec = 17 },
};
static struct snd_soc_dai_link_ch_map default_ch_map_1codec[MAX_DEFAULT_CH_MAP_SIZE] = {
{ .cpu = 0, .codec = 0 },
@@ -808,6 +820,12 @@ static struct snd_soc_dai_link_ch_map default_ch_map_1codec[MAX_DEFAULT_CH_MAP_S
{ .cpu = 9, .codec = 0 },
{ .cpu = 10, .codec = 0 },
{ .cpu = 11, .codec = 0 },
+ { .cpu = 12, .codec = 0 },
+ { .cpu = 13, .codec = 0 },
+ { .cpu = 14, .codec = 0 },
+ { .cpu = 15, .codec = 0 },
+ { .cpu = 16, .codec = 0 },
+ { .cpu = 17, .codec = 0 },
};
static int snd_soc_compensate_channel_connection_map(struct snd_soc_card *card,
struct snd_soc_dai_link *dai_link)
--
2.53.0