All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Add generic serial MIDI driver using serial bus API
@ 2022-04-20 19:47 ` Daniel Kaehn
  0 siblings, 0 replies; 10+ messages in thread
From: Daniel Kaehn @ 2022-04-20 19:47 UTC (permalink / raw)
  To: tiwai; +Cc: alsa-devel, devicetree


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
3.125 kBaud. Supports DeviceTree configuration.

The need for this driver arose from a project using a Raspberry Pi4 which
needed to receive and send raw MIDI with low latency. The pl011 UART
used is not compatible with the existing serial MIDI driver made for
u16550-style devices. Using a userspace program such as ttymidi to feed
input from the TTY device to a virtual ALSA MIDI device was functional,
but not ideal.

I am not sure if a MIDI driver needing the mentioned 'hack' to clock
38.4 kBaud down to the standard MIDI baud is permissible in the mainline
kernel, but am submitting nevertheless in case it is useful. To my knowledge,
it doesn't seem that there would be any way for this driver to manually
configure a serial port to 3.125 kBaud using the serial bus API (please 
correct me f I'm wrong). In my use case, I am actually configuring one port
to run at 115.2 kBaud for faster communication with a custom onboard MIDI controller.

Daniel Kaehn (2):
  dt-bindings: sound: Add generic serial MIDI device
  Add generic serial MIDI driver using serial bus API

 .../devicetree/bindings/sound/serialmidi.yaml |  41 +++
 sound/drivers/Kconfig                         |  17 +
 sound/drivers/Makefile                        |   2 +
 sound/drivers/serial-generic.c                | 344 ++++++++++++++++++
 4 files changed, 404 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/serialmidi.yaml
 create mode 100644 sound/drivers/serial-generic.c

-- 
2.32.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-04-25 17:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-20 19:47 [PATCH 0/2] Add generic serial MIDI driver using serial bus API Daniel Kaehn
2022-04-20 19:47 ` Daniel Kaehn
2022-04-20 19:47 ` [PATCH 1/2] dt-bindings: sound: Add generic serial MIDI device Daniel Kaehn
2022-04-20 19:47   ` Daniel Kaehn
2022-04-20 19:47 ` [PATCH 2/2] Add generic serial MIDI driver using serial bus API Daniel Kaehn
2022-04-20 19:47   ` Daniel Kaehn
2022-04-21  6:45   ` kernel test robot
2022-04-21  6:45     ` kernel test robot
2022-04-25 17:24   ` kernel test robot
2022-04-25 17:24     ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.