summaryrefslogtreecommitdiff
path: root/sound
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-09 13:31:51 +0100
commit9617001adfc9b402d7d80ef53c4cebf0c94624d7 (patch)
treec0077a2f91770c7ee8aa0a1c62564c6bbd9b4c7d /sound
parentcf29cbf61cf2d914d4877b5e09c47cb19e744e3d (diff)
downloadlinux-9617001adfc9b402d7d80ef53c4cebf0c94624d7.tar.gz
linux-9617001adfc9b402d7d80ef53c4cebf0c94624d7.tar.bz2
linux-9617001adfc9b402d7d80ef53c4cebf0c94624d7.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')
-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 5a4a7d0b7cca..bb94f119869a 100644
--- a/sound/core/ump.c
+++ b/sound/core/ump.c
@@ -1245,8 +1245,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]");
}
}