Commit f7348c5e authored by Takashi Iwai's avatar Takashi Iwai Committed by Wen Zhiwei
Browse files

ALSA: ump: Indicate the inactive group in legacy substream names

stable inclusion
from stable-v6.6.70
commit 9617001adfc9b402d7d80ef53c4cebf0c94624d7
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IBOHV1

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9617001adfc9b402d7d80ef53c4cebf0c94624d7

--------------------------------

[ 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: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarWen Zhiwei <wenzhiwei@kylinos.cn>
parent 243ac474
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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]");
	}
}