summaryrefslogtreecommitdiff
path: root/sound/usb/Kconfig
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2023-05-23 09:53:30 +0200
committerTakashi Iwai <tiwai@suse.de>2023-05-23 12:11:02 +0200
commitff49d1df79aef7580fe3ac99d17c3f886655d080 (patch)
tree041644baee19272edcb6398a5196428655113cf6 /sound/usb/Kconfig
parentf8ddb0fb3289dfb6f064b1f0573fd4f032189e9e (diff)
ALSA: usb-audio: USB MIDI 2.0 UMP support
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>
Diffstat (limited to 'sound/usb/Kconfig')
-rw-r--r--sound/usb/Kconfig11
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/usb/Kconfig b/sound/usb/Kconfig
index 059242f15d75..4a9569a3a39a 100644
--- a/sound/usb/Kconfig
+++ b/sound/usb/Kconfig
@@ -15,6 +15,7 @@ config SND_USB_AUDIO
select SND_HWDEP
select SND_RAWMIDI
select SND_PCM
+ select SND_UMP if SND_USB_AUDIO_MIDI_V2
select BITREVERSE
select SND_USB_AUDIO_USE_MEDIA_CONTROLLER if MEDIA_CONTROLLER && (MEDIA_SUPPORT=y || MEDIA_SUPPORT=SND_USB_AUDIO)
help
@@ -24,6 +25,16 @@ config SND_USB_AUDIO
To compile this driver as a module, choose M here: the module
will be called snd-usb-audio.
+config SND_USB_AUDIO_MIDI_V2
+ bool "MIDI 2.0 support by USB Audio driver"
+ depends on SND_USB_AUDIO
+ help
+ Say Y here to include the support for MIDI 2.0 by USB Audio driver.
+ When the config is set, the driver tries to probe MIDI 2.0 interface
+ at first, then falls back to MIDI 1.0 interface as default.
+ The MIDI 2.0 support can be disabled dynamically via midi2_enable
+ module option, too.
+
config SND_USB_AUDIO_USE_MEDIA_CONTROLLER
bool