ALSA: usb-audio: Update UMP group attributes for GTB blocks, too

BugLink: https://bugs.launchpad.net/bugs/2102118

commit ebaa86c0bddd2c47c516bf2096b17c0bed71d914 upstream.

When a FB is created from a GTB instead of UMP FB Info inquiry, we
missed the update of the corresponding UMP Group attributes.
Export the call of updater and let it be called from the USB driver.

Fixes: 0642a3c5cacc ("ALSA: ump: Update substream name from assigned FB names")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20240807092303.1935-5-tiwai@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Koichiro Den <koichiro.den@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
This commit is contained in:
Takashi Iwai
2025-03-12 22:51:00 +09:00
committed by Stefan Bader
parent 336f1781e9
commit a463861077
3 changed files with 8 additions and 4 deletions
+1
View File
@@ -122,6 +122,7 @@ static inline int snd_ump_attach_legacy_rawmidi(struct snd_ump_endpoint *ump,
int snd_ump_receive_ump_val(struct snd_ump_endpoint *ump, u32 val);
int snd_ump_switch_protocol(struct snd_ump_endpoint *ump, unsigned int protocol);
void snd_ump_update_group_attrs(struct snd_ump_endpoint *ump);
/*
* Some definitions for UMP
+5 -4
View File
@@ -525,7 +525,7 @@ static void snd_ump_proc_read(struct snd_info_entry *entry,
}
/* update dir_bits and active flag for all groups in the client */
static void update_group_attrs(struct snd_ump_endpoint *ump)
void snd_ump_update_group_attrs(struct snd_ump_endpoint *ump)
{
struct snd_ump_block *fb;
struct snd_ump_group *group;
@@ -575,6 +575,7 @@ static void update_group_attrs(struct snd_ump_endpoint *ump)
}
}
}
EXPORT_SYMBOL_GPL(snd_ump_update_group_attrs);
/*
* UMP endpoint and function block handling
@@ -848,7 +849,7 @@ static int ump_handle_fb_info_msg(struct snd_ump_endpoint *ump,
if (fb) {
fill_fb_info(ump, &fb->info, buf);
if (ump->parsed) {
update_group_attrs(ump);
snd_ump_update_group_attrs(ump);
seq_notify_fb_change(ump, fb);
}
}
@@ -880,7 +881,7 @@ static int ump_handle_fb_name_msg(struct snd_ump_endpoint *ump,
buf->raw, 3);
/* notify the FB name update to sequencer, too */
if (ret > 0 && ump->parsed) {
update_group_attrs(ump);
snd_ump_update_group_attrs(ump);
seq_notify_fb_change(ump, fb);
}
return ret;
@@ -1055,7 +1056,7 @@ int snd_ump_parse_endpoint(struct snd_ump_endpoint *ump)
}
/* initialize group attributions */
update_group_attrs(ump);
snd_ump_update_group_attrs(ump);
error:
ump->parsed = true;
+2
View File
@@ -873,6 +873,8 @@ static int create_gtb_block(struct snd_usb_midi2_ump *rmidi, int dir, int blk)
fb->info.flags |= SNDRV_UMP_BLOCK_IS_MIDI1 |
SNDRV_UMP_BLOCK_IS_LOWSPEED;
snd_ump_update_group_attrs(rmidi->ump);
usb_audio_dbg(umidi->chip,
"Created a UMP block %d from GTB, name=%s\n",
blk, fb->info.name);