[PATCH] ASoC: soc-core: Increase the channel map size

From: Ravulapati Vishnuvardhan Rao

Date: Tue Nov 03 2026 - 06:27:43 EST


As per the need for new OEMs it is needed to increase the
number of channels size as some of the OEM have ten mics
and one speaker.
So for this it is important to make sure that channel map
needs to be increased.

Signed-off-by: Ravulapati Vishnuvardhan Rao <visr@xxxxxxxxxxxxxxxx>
---
The ASoC core currently provides default channel connection maps for up to
8 channels. Newer OEM designs can exceed this (for example, topologies with
10 microphones plus speaker paths), which makes the default maps too small.

Increase MAX_DEFAULT_CH_MAP_SIZE from 8 to 12 and extend the default
sync/1cpu/1codec mapping tables accordingly.

This keeps existing behaviour unchanged for <=8 channels while allowing
larger channel maps to be represented by default.
---
sound/soc/soc-core.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 97269b4ee..f5660245f 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -859,7 +859,7 @@ static int soc_dai_link_sanity_check(struct snd_soc_card *card,
return -EINVAL;
}

-#define MAX_DEFAULT_CH_MAP_SIZE 8
+#define MAX_DEFAULT_CH_MAP_SIZE 12
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 },
@@ -869,6 +869,10 @@ static struct snd_soc_dai_link_ch_map default_ch_map_sync[MAX_DEFAULT_CH_MAP_SIZ
{ .cpu = 5, .codec = 5 },
{ .cpu = 6, .codec = 6 },
{ .cpu = 7, .codec = 7 },
+ { .cpu = 8, .codec = 8 },
+ { .cpu = 9, .codec = 9 },
+ { .cpu = 10, .codec = 10 },
+ { .cpu = 11, .codec = 11 },
};
static struct snd_soc_dai_link_ch_map default_ch_map_1cpu[MAX_DEFAULT_CH_MAP_SIZE] = {
{ .cpu = 0, .codec = 0 },
@@ -879,6 +883,10 @@ static struct snd_soc_dai_link_ch_map default_ch_map_1cpu[MAX_DEFAULT_CH_MAP_SIZ
{ .cpu = 0, .codec = 5 },
{ .cpu = 0, .codec = 6 },
{ .cpu = 0, .codec = 7 },
+ { .cpu = 0, .codec = 8 },
+ { .cpu = 0, .codec = 9 },
+ { .cpu = 0, .codec = 10 },
+ { .cpu = 0, .codec = 11 },
};
static struct snd_soc_dai_link_ch_map default_ch_map_1codec[MAX_DEFAULT_CH_MAP_SIZE] = {
{ .cpu = 0, .codec = 0 },
@@ -889,6 +897,10 @@ static struct snd_soc_dai_link_ch_map default_ch_map_1codec[MAX_DEFAULT_CH_MAP_S
{ .cpu = 5, .codec = 0 },
{ .cpu = 6, .codec = 0 },
{ .cpu = 7, .codec = 0 },
+ { .cpu = 8, .codec = 0 },
+ { .cpu = 9, .codec = 0 },
+ { .cpu = 10, .codec = 0 },
+ { .cpu = 11, .codec = 0 },
};
static int snd_soc_compensate_channel_connection_map(struct snd_soc_card *card,
struct snd_soc_dai_link *dai_link)

---
base-commit: 11ae63bd9030349a0136fb2edd1622a4a029edc8
change-id: 20261103-for-next-25143eed7477

Best regards,
--
Ravulapati Vishnuvardhan Rao <visr@xxxxxxxxxxxxxxxx>