Nearly forty years after the MIDI digital music protocol was first introduced, in 2020 the MIDI 2.0 protocol was announced as a major overhaul for this widely used standard by musical devices. A big patch series sent out today prepares the Linux kernel sound drivers for MIDI 2.0.
MIDI 2.0 allows for higher resolution, better articulation, the Universal MIDI Packet (UMP) for packaging up multiple MIDI messages for easier transport, less jitter, and various other new features and improvements. The MIDI 2.0 specifications have been available from the MIDI Association at MIDI.org while this morning is the first time seeing the Linux kernel drivers being extended for MIDI 2.0.
Linux sound subsystem maintainer Takashi Iwai of SUSE sent out the set of 36 patches -- and roughly six thousand lines of new code -- for preparing the kernel for MIDI 2.0 primarily with the USB Audio and raw MIDI drivers.
Takashi Iwai explained in the patch series:
"This is a (largish) patch set for adding the support of MIDI 2.0 functionality, mainly targeted for USB devices. MIDI 2.0 is a complete overhaul of the 40-years old MIDI 1.0. Unlike MIDI 1.0 byte stream, MIDI 2.0 uses packets in 32bit words for Universal MIDI Packet (UMP) protocol. It supports both MIDI 1.0 commands for compatibility and the extended MIDI 2.0 commands for higher resolutions and more functions.
For supporting the UMP, the patch set extends the existing ALSA rawmidi and sequencer interfaces, and adds the USB MIDI 2.0 support to the standard USB-audio driver.
The rawmidi for UMP has a different device name (/dev/snd/umpC*D*) and it reads/writes UMP packet data in 32bit CPU-native endianness. For the old MIDI 1.0 applications, the legacy rawmidi interface is provided, too.
As default, USB-audio driver will take the alternate setting for MIDI 2.0 interface, and the compatibility with MIDI 1.0 is provided via the rawmidi common layer. However, user may let the driver falling back to the old MIDI 1.0 interface by a module option, too.
A UMP-capable rawmidi device can create the corresponding ALSA sequencer client(s) to support the UMP Endpoint and UMP Group connections. As a nature of ALSA sequencer, arbitrary connections between clients/ports are allowed, and the ALSA sequencer core performs the automatic conversions for the connections between a new UMP sequencer client and a legacy MIDI 1.0 sequencer client. It allows the existing application to use MIDI 2.0 devices without changes.
The MIDI-CI, which is another major extension in MIDI 2.0, isn't covered by this patch set. It would be implemented rather in user-space."
The MIDI 2.0 code for the Linux kernel is now under review and if all goes well could potentially be mainlined for the v6.5 cycle this summer.
from Hacker News https://ift.tt/Rp0Wbn8
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.