ff49d1df79
This patch provides a basic support for USB MIDI 2.0. As of this patch, the driver creates a UMP device per MIDI I/O endpoints, which serves as a dumb terminal to read/write UMP streams. A new Kconfig CONFIG_SND_USB_AUDIO_MIDI_V2 manages whether to enable or disable the MIDI 2.0 support. Also, the driver provides a new module option, midi2_enable, to allow disabling the MIDI 2.0 at runtime, too. When MIDI 2.0 support is disabled, the driver tries to fall back to the already existing MIDI 1.0 device (each MIDI 2.0 device is supposed to provide the MIDI 1.0 interface at the altset 0). For now, the driver doesn't manage any MIDI-CI or other protocol setups by itself, but relies on the default protocol given via the group terminal block descriptors. The MIDI 1.0 messages on MIDI 2.0 device will be automatically converted in ALSA sequencer in a later patch. As of this commit, the driver accepts merely the rawmidi UMP accesses. The driver builds up the topology in the following way: - Create an object for each MIDI endpoint belonging to the USB interface - Find MIDI EP "pairs" that share the same GTB; note that MIDI EP is unidirectional, while UMP is (normally) bidirectional, so two MIDI EPs can form a single UMP EP - A UMP endpoint object is created for each I/O pair - For remaining "solo" MIDI EPs, create unidirectional UMP EPs - Finally, parse GTBs and fill the protocol bits on each UMP So the driver may support multiple UMP Endpoints in theory, although most devices are supposed to have a single UMP EP that can contain up to 16 groups -- which should be large enough. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Link: https://lore.kernel.org/r/20230523075358.9672-10-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
39 lines
874 B
Makefile
39 lines
874 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Makefile for ALSA
|
|
#
|
|
|
|
snd-usb-audio-objs := card.o \
|
|
clock.o \
|
|
endpoint.o \
|
|
format.o \
|
|
helper.o \
|
|
implicit.o \
|
|
mixer.o \
|
|
mixer_quirks.o \
|
|
mixer_scarlett.o \
|
|
mixer_scarlett_gen2.o \
|
|
mixer_us16x08.o \
|
|
mixer_s1810c.o \
|
|
pcm.o \
|
|
power.o \
|
|
proc.o \
|
|
quirks.o \
|
|
stream.o \
|
|
validate.o
|
|
|
|
snd-usb-audio-$(CONFIG_SND_USB_AUDIO_MIDI_V2) += midi2.o
|
|
snd-usb-audio-$(CONFIG_SND_USB_AUDIO_USE_MEDIA_CONTROLLER) += media.o
|
|
|
|
snd-usbmidi-lib-objs := midi.o
|
|
|
|
# Toplevel Module Dependency
|
|
obj-$(CONFIG_SND_USB_AUDIO) += snd-usb-audio.o snd-usbmidi-lib.o
|
|
|
|
obj-$(CONFIG_SND_USB_UA101) += snd-usbmidi-lib.o
|
|
obj-$(CONFIG_SND_USB_USX2Y) += snd-usbmidi-lib.o
|
|
obj-$(CONFIG_SND_USB_US122L) += snd-usbmidi-lib.o
|
|
|
|
obj-$(CONFIG_SND) += misc/ usx2y/ caiaq/ 6fire/ hiface/ bcd2000/
|
|
obj-$(CONFIG_SND_USB_LINE6) += line6/
|