ALSA: Add MIDI 2.0 support
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest36 patches 49 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/36 | ALSA: rawmidi: Pass rawmidi directly to snd_rawmidi_kernel_open()include/ sound/ sound/ | +9 | 1 reply | |
| 2/36 | ALSA: rawmidi: Add ioctl callback to snd_rawmidi_global_opsinclude/ sound/ | +5 | 1 reply | |
| 3/36 | ALSA: rawmidi: UMP supportinclude/ include/ include/ +5 more | +530 | 7 replies | |
| 4/36 | ALSA: rawmidi: Skip UMP devices at SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICEinclude/ sound/ | +37 | 2 replies | |
| 5/36 | ALSA: ump: Additional proc outputinclude/ sound/ sound/ | +54 | 1 reply | |
| 6/36 | ALSA: usb-audio: Manage number of rawmidis globallysound/ sound/ sound/ +2 more | +16 | 1 reply | |
| 7/36 | ALSA: usb-audio: Define USB MIDI 2.0 specsinclude/ | +94 | 2 replies | |
| 8/36 | ALSA: usb-audio: USB MIDI 2.0 UMP supportsound/ sound/ sound/ +4 more | +1109 | 1 reply | |
| 9/36 | ALSA: usb-audio: Get UMP EP name string from USB interfacesound/ | +27 | 1 reply | |
| 10/36 | ALSA: usb-audio: Trim superfluous "MIDI" suffix from UMP EP namesound/ | +7 | 1 reply | |
| 11/36 | ALSA: usb-audio: Create UMP blocks from USB MIDI GTBssound/ | +93 | 1 reply | |
| 12/36 | ALSA: ump: Redirect rawmidi substream access via own helpersinclude/ sound/ sound/ | +149 | 1 reply | |
| 13/36 | ALSA: ump: Add legacy raw MIDI supportinclude/ include/ sound/ +4 more | +1406 | 1 reply | |
| 14/36 | ALSA: usb-audio: Enable the legacy raw MIDI supportsound/ | +26 | 1 reply | |
| 15/36 | ALSA: usb-audio: Inform inconsistent protocols in GTBssound/ | +21 | 1 reply | |
| 16/36 | ALSA: seq: Clear padded bytes at expanding eventssound/ | +9 | 1 reply | |
| 17/36 | ALSA: seq: Add snd_seq_expand_var_event_at() helperinclude/ sound/ | +69 | 1 reply | |
| 18/36 | ALSA: seq: Treat snd_seq_client object directly in client driverssound/ sound/ | +19 | 1 reply | |
| 19/36 | ALSA: seq: Drop dead code for the old broadcast supportsound/ | +1 | 1 reply | |
| 20/36 | ALSA: seq: Check the conflicting port at port creationsound/ sound/ sound/ | +27 | 1 reply | |
| 21/36 | ALSA: seq: Check validity before creating a port objectsound/ | +2 | 1 reply | |
| 22/36 | ALSA: seq: Prohibit creating ports with special numberssound/ | +2 | 1 reply | |
| 23/36 | ALSA: seq: Introduce SNDRV_SEQ_IOCTL_USER_PVERSION ioctlinclude/ sound/ sound/ +1 more | +11 | 1 reply | |
| 24/36 | ALSA: seq: Add UMP supportinclude/ include/ include/ +5 more | +194 | 4 replies | |
| 25/36 | ALSA: seq: Add port inactive flaginclude/ sound/ sound/ | +7 | 1 reply | |
| 26/36 | ALSA: seq: Support MIDI 2.0 UMP Endpoint portinclude/ sound/ sound/ | +41 | 1 reply | |
| 27/36 | ALSA: seq: Add port direction to snd_seq_port_infoinclude/ sound/ sound/ +4 more | +43 | 1 reply | |
| 28/36 | ALSA: seq: Add UMP group number to snd_seq_port_infoinclude/ sound/ sound/ | +11 | 1 reply | |
| 29/36 | ALSA: seq: Automatic conversion of UMP eventssound/ sound/ sound/ +4 more | +1280 | 1 reply | |
| 30/36 | ALSA: seq: Allow suppressing UMP conversionsinclude/ sound/ sound/ | +19 | 1 reply | |
| 31/36 | ALSA: seq: Bind UMP deviceinclude/ include/ include/ +4 more | +439 | 1 reply | |
| 32/36 | ALSA: seq: ump: Create UMP Endpoint port for broadcastsound/ | +60 | 1 reply | |
| 33/36 | ALSA: seq: Add ioctls for client UMP info query and setupinclude/ sound/ sound/ +2 more | +153 | 1 reply | |
| 34/36 | ALSA: seq: Print UMP Endpoint and Block information in proc outputssound/ | +30 | 1 reply | |
| 35/36 | ALSA: seq: Add UMP group filterinclude/ sound/ sound/ +1 more | +18 | 1 reply | |
| 36/36 | ALSA: docs: Add MIDI 2.0 documentationDocumentation/ Documentation/ | +343 | 3 replies |
Reviews trailers per patch
All 36 patches have a Reviewed-by or Acked-by.
| Patch | Greg Kroah-Hartman | Jaroslav Kysela |
|---|---|---|
| 1/36 | R-b | |
| 2/36 | R-b | |
| 3/36 | R-b | |
| 4/36 | R-b | |
| 5/36 | R-b | |
| 6/36 | R-b | |
| 7/36 | A-b | A-b |
| 8/36 | R-b | |
| 9/36 | R-b | |
| 10/36 | R-b | |
| 11/36 | R-b | |
| 12/36 | R-b | |
| 13/36 | R-b | |
| 14/36 | R-b | |
| 15/36 | R-b | |
| 16/36 | R-b | |
| 17/36 | R-b | |
| 18/36 | R-b | |
| 19/36 | R-b | |
| 20/36 | R-b | |
| 21/36 | R-b | |
| 22/36 | R-b | |
| 23/36 | R-b | |
| 24/36 | R-b | |
| 25/36 | R-b | |
| 26/36 | R-b | |
| 27/36 | R-b | |
| 28/36 | R-b | |
| 29/36 | R-b | |
| 30/36 | R-b | |
| 31/36 | R-b | |
| 32/36 | R-b | |
| 33/36 | R-b | |
| 34/36 | R-b | |
| 35/36 | R-b | |
| 36/36 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 00/36] ALSA: Add MIDI 2.0 support
Hi,
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.
Roughly speaking, the first half of this patch set is for extending the rawmidi and USB-audio, and the second half is for extending the ALSA sequencer interface.
The patch set is based on 6.4-rc2 kernel, but all patches can be cleanly applicable on 6.2 and 6.3 kernels, too (while 6.1 and older kernels would need minor adjustment for uapi header changes).
The updates for alsa-lib and alsa-utils will follow shortly later.
The author thanks members of MIDI Association OS/API Working Group, especially Andrew Mee, for great helps for the initial design and debugging / testing the drivers.
Takashi
---
Takashi Iwai (36):
ALSA: rawmidi: Pass rawmidi directly to snd_rawmidi_kernel_open()
ALSA: rawmidi: Add ioctl callback to snd_rawmidi_global_ops
ALSA: rawmidi: UMP support
ALSA: rawmidi: Skip UMP devices at SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE
ALSA: ump: Additional proc output
ALSA: usb-audio: Manage number of rawmidis globally
ALSA: usb-audio: Define USB MIDI 2.0 specs
ALSA: usb-audio: USB MIDI 2.0 UMP support
ALSA: usb-audio: Get UMP EP name string from USB interface
ALSA: usb-audio: Trim superfluous "MIDI" suffix from UMP EP name
ALSA: usb-audio: Create UMP blocks from USB MIDI GTBs
ALSA: ump: Redirect rawmidi substream access via own helpers
ALSA: ump: Add legacy raw MIDI support
ALSA: usb-audio: Enable the legacy raw MIDI support
ALSA: usb-audio: Inform inconsistent protocols in GTBs
ALSA: seq: Clear padded bytes at expanding events
ALSA: seq: Add snd_seq_expand_var_event_at() helper
ALSA: seq: Treat snd_seq_client object directly in client drivers
ALSA: seq: Drop dead code for the old broadcast support
ALSA: seq: Check the conflicting port at port creation
ALSA: seq: Check validity before creating a port object
ALSA: seq: Prohibit creating ports with special numbers
ALSA: seq: Introduce SNDRV_SEQ_IOCTL_USER_PVERSION ioctl
ALSA: seq: Add UMP support
ALSA: seq: Add port inactive flag
ALSA: seq: Support MIDI 2.0 UMP Endpoint port
ALSA: seq: Add port direction to snd_seq_port_info
ALSA: seq: Add UMP group number to snd_seq_port_info
ALSA: seq: Automatic conversion of UMP events
ALSA: seq: Allow suppressing UMP conversions
ALSA: seq: Bind UMP device
ALSA: seq: ump: Create UMP Endpoint port for broadcast
ALSA: seq: Add ioctls for client UMP info query and setup
ALSA: seq: Print UMP Endpoint and Block information in proc outputs
ALSA: seq: Add UMP group filter
ALSA: docs: Add MIDI 2.0 documentation
Documentation/sound/designs/index.rst | 1 + Documentation/sound/designs/midi-2.0.rst | 342 ++++++ include/linux/usb/midi-v2.h | 94 ++ include/sound/asequencer.h | 4 + include/sound/rawmidi.h | 16 +- include/sound/seq_device.h | 1 + include/sound/seq_kernel.h | 10 + include/sound/ump.h | 175 ++++ include/sound/ump_msg.h | 540 ++++++++++ include/uapi/sound/asequencer.h | 83 +- include/uapi/sound/asound.h | 58 +- sound/core/Kconfig | 13 + sound/core/Makefile | 3 + sound/core/rawmidi.c | 233 +++-- sound/core/rawmidi_compat.c | 4 + sound/core/seq/Kconfig | 14 + sound/core/seq/Makefile | 3 + sound/core/seq/seq_clientmgr.c | 577 +++++++---- sound/core/seq/seq_clientmgr.h | 27 +- sound/core/seq/seq_compat.c | 3 + sound/core/seq/seq_dummy.c | 9 + sound/core/seq/seq_memory.c | 98 +- sound/core/seq/seq_memory.h | 19 +- sound/core/seq/seq_midi.c | 12 +- sound/core/seq/seq_ports.c | 46 +- sound/core/seq/seq_ports.h | 23 +- sound/core/seq/seq_ump_client.c | 464 +++++++++ sound/core/seq/seq_ump_convert.c | 1203 ++++++++++++++++++++++ sound/core/seq/seq_ump_convert.h | 22 + sound/core/seq/seq_virmidi.c | 1 + sound/core/ump.c | 677 ++++++++++++ sound/core/ump_convert.c | 520 ++++++++++ sound/core/ump_convert.h | 43 + sound/usb/Kconfig | 11 + sound/usb/Makefile | 1 + sound/usb/card.c | 12 +- sound/usb/midi.c | 7 +- sound/usb/midi.h | 5 +- sound/usb/midi2.c | 1189 +++++++++++++++++++++ sound/usb/midi2.h | 33 + sound/usb/quirks.c | 8 +- sound/usb/usbaudio.h | 2 + 42 files changed, 6274 insertions(+), 332 deletions(-) create mode 100644 Documentation/sound/designs/midi-2.0.rst create mode 100644 include/linux/usb/midi-v2.h create mode 100644 include/sound/ump.h create mode 100644 include/sound/ump_msg.h create mode 100644 sound/core/seq/seq_ump_client.c create mode 100644 sound/core/seq/seq_ump_convert.c create mode 100644 sound/core/seq/seq_ump_convert.h create mode 100644 sound/core/ump.c create mode 100644 sound/core/ump_convert.c create mode 100644 sound/core/ump_convert.h create mode 100644 sound/usb/midi2.c create mode 100644 sound/usb/midi2.h
Signature · 1 line
2.35.3