summaryrefslogtreecommitdiff
path: root/sound/usb
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2023-06-12 11:10:53 +0300
committerTakashi Iwai <tiwai@suse.de>2023-06-12 19:22:34 +0300
commit01dfa8e969dbbc72fc4564e8d61c905c4f3a2352 (patch)
treef8c3181d29e56c08ac6026a2d58f4495fd830900 /sound/usb
parent6a8b4800ae54e9ceb8d017bcfb61d04ff0da90f2 (diff)
downloadlinux-01dfa8e969dbbc72fc4564e8d61c905c4f3a2352.tar.xz
ALSA: ump: Add info flag bit for static blocks
UMP v1.1 spec allows to inform whether the function blocks are static and not dynamically updated. Add a new flag bit to snd_ump_endpoint_info to reflect that attribute, too. The flag is set when a USB MIDI device is still in the old MIDI 2.0 without UMP 1.1 support. Then the driver falls back to GTBs, and they are supposed to be static-only. Link: https://lore.kernel.org/r/20230612081054.17200-10-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb')
-rw-r--r--sound/usb/midi2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/usb/midi2.c b/sound/usb/midi2.c
index 13fa1978267a..ee2835741479 100644
--- a/sound/usb/midi2.c
+++ b/sound/usb/midi2.c
@@ -888,6 +888,8 @@ static int create_blocks_from_gtb(struct snd_usb_midi2_interface *umidi)
/* Blocks have been already created? */
if (rmidi->ump_parsed || rmidi->ump->info.num_blocks)
continue;
+ /* GTB is static-only */
+ rmidi->ump->info.flags |= SNDRV_UMP_EP_INFO_STATIC_BLOCKS;
/* loop over GTBs */
for (dir = 0; dir < 2; dir++) {
if (!rmidi->eps[dir])