Commit 54235050 authored by Daniel Kaehn's avatar Daniel Kaehn Committed by Takashi Iwai

ALSA: Add generic serial MIDI driver using serial bus API

Generic serial MIDI driver adding support for using serial devices
compatible with the serial bus as raw MIDI devices, allowing using
additional serial devices not compatible with the existing
serial-u16550 driver. Supports only setting standard serial baudrates on
the underlying serial device; however, the underlying serial device can
be configured so that a requested 38.4 kBaud is actually the standard MIDI
31.25 kBaud. Supports DeviceTree configuration.
Signed-off-by: default avatarDaniel Kaehn <kaehndan@gmail.com>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220509145933.1161526-3-kaehndan@gmail.comSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 1e5a7462
...@@ -165,6 +165,24 @@ config SND_SERIAL_U16550 ...@@ -165,6 +165,24 @@ config SND_SERIAL_U16550
To compile this driver as a module, choose M here: the module To compile this driver as a module, choose M here: the module
will be called snd-serial-u16550. will be called snd-serial-u16550.
config SND_SERIAL_GENERIC
tristate "Generic serial MIDI driver"
depends on SERIAL_DEV_BUS
depends on OF
select SND_RAWMIDI
help
To include support for mapping generic serial devices as raw
ALSA MIDI devices, say Y here. The driver only supports setting
the serial port to standard baudrates. To attain the standard MIDI
baudrate of 31.25 kBaud, configure the clock of the underlying serial
device so that a requested 38.4 kBaud will result in the standard speed.
Use this devicetree binding to configure serial port mapping
<file:Documentation/devicetree/bindings/sound/serial-midi.yaml>
To compile this driver as a module, choose M here: the module
will be called snd-serial-generic.
config SND_MPU401 config SND_MPU401
tristate "Generic MPU-401 UART driver" tristate "Generic MPU-401 UART driver"
select SND_MPU401_UART select SND_MPU401_UART
......
...@@ -10,6 +10,7 @@ snd-mtpav-objs := mtpav.o ...@@ -10,6 +10,7 @@ snd-mtpav-objs := mtpav.o
snd-mts64-objs := mts64.o snd-mts64-objs := mts64.o
snd-portman2x4-objs := portman2x4.o snd-portman2x4-objs := portman2x4.o
snd-serial-u16550-objs := serial-u16550.o snd-serial-u16550-objs := serial-u16550.o
snd-serial-generic-objs := serial-generic.o
snd-virmidi-objs := virmidi.o snd-virmidi-objs := virmidi.o
# Toplevel Module Dependency # Toplevel Module Dependency
...@@ -17,6 +18,7 @@ obj-$(CONFIG_SND_DUMMY) += snd-dummy.o ...@@ -17,6 +18,7 @@ obj-$(CONFIG_SND_DUMMY) += snd-dummy.o
obj-$(CONFIG_SND_ALOOP) += snd-aloop.o obj-$(CONFIG_SND_ALOOP) += snd-aloop.o
obj-$(CONFIG_SND_VIRMIDI) += snd-virmidi.o obj-$(CONFIG_SND_VIRMIDI) += snd-virmidi.o
obj-$(CONFIG_SND_SERIAL_U16550) += snd-serial-u16550.o obj-$(CONFIG_SND_SERIAL_U16550) += snd-serial-u16550.o
obj-$(CONFIG_SND_SERIAL_GENERIC) += snd-serial-generic.o
obj-$(CONFIG_SND_MTPAV) += snd-mtpav.o obj-$(CONFIG_SND_MTPAV) += snd-mtpav.o
obj-$(CONFIG_SND_MTS64) += snd-mts64.o obj-$(CONFIG_SND_MTS64) += snd-mts64.o
obj-$(CONFIG_SND_PORTMAN2X4) += snd-portman2x4.o obj-$(CONFIG_SND_PORTMAN2X4) += snd-portman2x4.o
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment