usb: gadget: midi2: Dynamically create MIDI 1.0 altset descriptors
authorTakashi Iwai <tiwai@suse.de>
Tue, 25 Jul 2023 06:22:02 +0000 (08:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Jul 2023 04:38:14 +0000 (06:38 +0200)
commit856fa444b0982746f95e801bab0e586533eb29a3
tree1b7236c68f917cc69b3e130c859c512050cade16
parent29ee7a4dddd5caa18d1cef000f20c6af43f762f1
usb: gadget: midi2: Dynamically create MIDI 1.0 altset descriptors

This patch extends MIDI 2.0 function driver to deal with more MIDI1
Jacks depending on the given Block configuration.

For MIDI 1.0, we take the configuration given in Function Block 0, and
create MIDI Jacks and Endpoints depending on the definition there.
That is, when more UMP Groups are defined in the Block 0, the
corresponding MIDI1 Jacks will be created.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20230725062206.9674-4-tiwai@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/f_midi2.c