Hi,
This is a patch set for adding a USB gadget function driver for USB MIDI 2.0 interface. The MIDI 2.0 support in the host side was already enabled since 6.5 kernel in snd-usb-audio driver. Now, this provides a similar gadget functionality using the existing ALSA UMP helper functions.
The gadget driver provides both MIDI 2.0 and MIDI 1.0 fallback interfaces with one or more loopback UMP rawmidi devices. The configfs implementation is flexible enough to allow users to set up multiple UMP Endpoints and Function Blocks.
The first patch adds the bare f_midi2 driver without configfs support, followed by the configfs support, MIDI 1.0 interface support and a few other extensions and documentation.
Takashi
===
Takashi Iwai (7): usb: gadget: Add support for USB MIDI 2.0 function driver usb: gadget: midi2: Add configfs support usb: gadget: midi2: Dynamically create MIDI 1.0 altset descriptors usb: gadget: midi2: MIDI 1.0 interface (altset 0) support usb: gadget: midi2: Add testing documentation usb: gadget: midi2: Add "Operation Mode" control usb: gadget: midi2: More flexible MIDI 1.0 configuration
.../ABI/testing/configfs-usb-gadget-midi2 | 54 + Documentation/usb/gadget-testing.rst | 154 + drivers/usb/gadget/Kconfig | 18 + drivers/usb/gadget/function/Makefile | 2 + drivers/usb/gadget/function/f_midi2.c | 2883 +++++++++++++++++ drivers/usb/gadget/function/u_midi2.h | 81 + 6 files changed, 3192 insertions(+) create mode 100644 Documentation/ABI/testing/configfs-usb-gadget-midi2 create mode 100644 drivers/usb/gadget/function/f_midi2.c create mode 100644 drivers/usb/gadget/function/u_midi2.h