More MIDI 2.0 Code Being Worked On For The Linux Kernel
Merged for Linux 6.5 was initial MIDI 2.0 support for the necessary USB audio and raw MIDI drivers to support this major MIDI update. Being worked on now for merging into a future kernel release is the USB gadget driver support around MIDI 2.0.
Takashi Iwai of SUSE who maintains the Linux kernel's sound subsystem and worked on the original MIDI 2.0 enablement patches is also the one working on this USB gadget driver support. Within sound.git he's published topic/midi20-gadget where he's queuing his work around the MIDI 2.0 USB gadget driver support. In those patches he explains:
Or put more simply by the new Kconfig text for this MIDI 2.0 gadget support:
We'll see how this evolves and if the work manages to get into shape for merging as part of the USB changes come the time of the Linux v6.6 merge window.
Takashi Iwai of SUSE who maintains the Linux kernel's sound subsystem and worked on the original MIDI 2.0 enablement patches is also the one working on this USB gadget driver support. Within sound.git he's published topic/midi20-gadget where he's queuing his work around the MIDI 2.0 USB gadget driver support. In those patches he explains:
This patch adds the support for USB MIDI 2.0 gadget function driver. The driver emulates a USB MIDI 2.0 interface with one or more UMP Endpoints, where each of UMP Endpoint is a pair of MIDI Endpoints for handling MIDI 2.0 UMP packets. When the function driver is bound, the driver creates an ALSA card object with UMP rawmidi devices. This is a kind of loop-back where the incoming and upcoming UMP packets from/to the MIDI 2.0 UMP Endpoints are transferred as-is. In addition, legacy (MIDI 1.0) rawmidi devices are created, so that legacy applications can work in the gadget side, too.
When a USB MIDI 2.0 gadget interface appears, the connected host can use it with the snd-usb-audio driver where MIDI 2.0 support is enabled. Both gadget and connected hosts will have the similar UMP Endpoint and Function Block (or Group Terminal Block) information. Slight differences are the direction and UI-hint bits; it's due to the nature of gadget driver, and the input/output direction is swapped in both sides (the input for gadget is the output for host, and vice versa).
The driver supports the brand-new UMP v1.1 feature, including the UMP Stream message handling for providing UMP Endpoint and Function Block information as well as dealing with the MIDI protocol switch. The driver responds to UMP Stream messages by itself. OTOH, MIDI-CI message handling isn't implemented in the kernel driver; it should be processed in the user-space through the loopback UMP device.
Or put more simply by the new Kconfig text for this MIDI 2.0 gadget support:
The MIDI 2.0 function driver provides the generic emulated USB MIDI 2.0 interface, looped back to ALSA UMP rawmidi device on the gadget host. It supports UMP 1.1 spec and responds UMP Stream messages for UMP Endpoint and Function Block information / configuration.
We'll see how this evolves and if the work manages to get into shape for merging as part of the USB changes come the time of the Linux v6.6 merge window.
Add A Comment