mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 04:38:03 +00:00
ALSA: usb-audio: Update UMP group attributes for GTB blocks, too
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: 0642a3c5ca
("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
This commit is contained in:
parent
ac3a9185bd
commit
ebaa86c0bd
@ -123,6 +123,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
|
||||
|
@ -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;
|
||||
@ -578,6 +578,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
|
||||
@ -863,7 +864,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);
|
||||
}
|
||||
}
|
||||
@ -895,7 +896,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;
|
||||
@ -1065,7 +1066,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;
|
||||
|
@ -877,6 +877,8 @@ static int create_gtb_block(struct snd_usb_midi2_ump *rmidi, int dir, int blk)
|
||||
}
|
||||
}
|
||||
|
||||
snd_ump_update_group_attrs(rmidi->ump);
|
||||
|
||||
usb_audio_dbg(umidi->chip,
|
||||
"Created a UMP block %d from GTB, name=%s, flags=0x%x\n",
|
||||
blk, fb->info.name, fb->info.flags);
|
||||
|
Loading…
Reference in New Issue
Block a user