spa: make a function to make a channel short name

Make a function that can generate and parse a short name for
the positions that are not in the type list, like the AUX channels.
This commit is contained in:
Wim Taymans 2025-10-22 13:04:53 +02:00
parent 7177f8269d
commit 11f1298f53
16 changed files with 74 additions and 38 deletions

View file

@ -761,11 +761,13 @@ int message_dump(enum spa_log_level level, const char *prefix, struct message *m
case TAG_CHANNEL_MAP:
{
struct channel_map map;
char pos[8];
if ((res = read_channel_map(m, &map)) < 0)
return res;
pw_log(level, "%s %u: channelmap: channels:%u", prefix, o, map.channels);
for (i = 0; i < map.channels; i++)
pw_log(level, "%s %d: %s", prefix, i, channel_id2name(map.map[i]));
pw_log(level, "%s %d: %s", prefix, i,
channel_id2name(map.map[i], pos, sizeof(pos)));
break;
}
case TAG_CVOLUME: