]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ALSA: usb-audio: Accept multiple protocols in GTBs
authorTakashi Iwai <tiwai@suse.de>
Wed, 7 Aug 2024 09:22:57 +0000 (11:22 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 7 Aug 2024 09:31:37 +0000 (11:31 +0200)
commitb28654233f654cc16134b72751bf371c7bf0ce3a
treeb15411bb57fa0554014c363339fa9c32fd4b1335
parent08713dcc49060f2d0870483932c6d68ef8430acf
ALSA: usb-audio: Accept multiple protocols in GTBs

It's valid to give different protocols via multiple GTBs; e.g. a MIDI
1.0 port is embedded in a MIDI 2.0 device that talks with MIDI 2.0
protocol.  However, the current driver implementation assumes only a
single protocol over the whole Endpoint, and it can't handle such a
scenario.

This patch changes the driver's behavior to parse GTBs to accept
multiple protocols.  Instead of switching to the last given protocol,
it adds the protocol capability bits now.  Meanwhile, the default
protocol is chosen by the first given protocol in GTBs.

Practically seen, this should be a minor issue, as new devices should
specify the protocols properly via UMP Endpoint Info messages, so this
is rather just covering a corner case.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20240807092303.1935-3-tiwai@suse.de
sound/usb/midi2.c