Skip to content

Commit

Permalink
ALSA: ump: Indicate the inactive group in legacy substream names
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Takashi Iwai committed Nov 29, 2024
1 parent 3978d53 commit e29e504
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sound/core/ump.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]");
}
}

Expand Down

0 comments on commit e29e504

Please sign in to comment.