From: Takashi Iwai Date: Fri, 29 Nov 2024 09:45:43 +0000 (+0100) Subject: ALSA: ump: Indicate the inactive group in legacy substream names X-Git-Tag: v6.13-rc2~16^2~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e29e504e7890b9ee438ca6370d0180d607c473f9;p=thirdparty%2Flinux.git ALSA: ump: Indicate the inactive group in legacy substream names Since the legacy rawmidi has no proper way to know the inactive group, indicate it in the rawmidi substream names with "[Inactive]" suffix when the corresponding UMP group is inactive. Link: https://patch.msgid.link/20241129094546.32119-3-tiwai@suse.de Signed-off-by: Takashi Iwai --- diff --git a/sound/core/ump.c b/sound/core/ump.c index 9f9ad106107f7..7b00a957e5489 100644 --- a/sound/core/ump.c +++ b/sound/core/ump.c @@ -1256,8 +1256,9 @@ static void fill_substream_names(struct snd_ump_endpoint *ump, name = ump->groups[idx].name; if (!*name) name = ump->info.name; - snprintf(s->name, sizeof(s->name), "Group %d (%.16s)", - idx + 1, name); + snprintf(s->name, sizeof(s->name), "Group %d (%.16s)%s", + idx + 1, name, + ump->groups[idx].active ? "" : " [Inactive]"); } }