summaryrefslogtreecommitdiff
path: root/sound/core
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2024-11-29 10:45:43 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-01-02 10:34:17 +0100
commit9dc4b8a8a415d3d6528648b4e4c7dc9ea7686ee0 (patch)
tree9b47bf91d60ee41b737570da222b43ea8c717f0c /sound/core
parentfc98df1d7a9e58fd29590eebccb2d5013e2053ea (diff)
downloadlinux-9dc4b8a8a415d3d6528648b4e4c7dc9ea7686ee0.tar.gz
linux-9dc4b8a8a415d3d6528648b4e4c7dc9ea7686ee0.tar.bz2
linux-9dc4b8a8a415d3d6528648b4e4c7dc9ea7686ee0.zip
ALSA: ump: Indicate the inactive group in legacy substream names
[ Upstream commit e29e504e7890b9ee438ca6370d0180d607c473f9 ] 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 <tiwai@suse.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/ump.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/core/ump.c b/sound/core/ump.c
index 0ade67d6b089..55d5d8af5e44 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]");
}
}