diff options
author | Takashi Iwai <tiwai@suse.de> | 2024-11-29 10:45:43 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2024-11-29 11:07:37 +0100 |
commit | e29e504e7890b9ee438ca6370d0180d607c473f9 (patch) | |
tree | 26499c41aaa1d14e00e35c4efc821ac42a3ba892 /sound | |
parent | 3978d53df7236f0a517c2abeb43ddf6ac162cdd8 (diff) | |
download | lwn-e29e504e7890b9ee438ca6370d0180d607c473f9.tar.gz lwn-e29e504e7890b9ee438ca6370d0180d607c473f9.zip |
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 <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/ump.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/core/ump.c b/sound/core/ump.c index 9f9ad106107f..7b00a957e548 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]"); } } |