[alsa-devel] MIDI port using UART interface

Francesco Lavra francescolavra.fl at gmail.com
Sat Sep 19 15:35:16 CEST 2015


Hi,
I'm looking to use an UART interface as a MIDI in/out port.
Since MIDI is an asynchronous serial interface just like UART, and 
provided a given UART controller is able to operate at 31.25 kbps (in my 
case, it is) a UART port can be transformed into a MIDI port by adding 
some hardware components (e.g. an optocopuler) to it, I would have 
expected to find a generic MIDI<->UART adapter layer in the kernel that 
bridges the ALSA MIDI interface with UART drivers and allows to operate 
UARTs as MIDI ports. But apparently there is no such generic adapter, 
the closest driver I found is for the UART 16550 but this is specific to 
a type of UART controller different from the one in the platform I'm 
using (which is i.MX6).
So how would you approach the task of writing a MIDI driver that uses 
UART behind the scenes? Am I correct in assuming that I have to use the 
RawMIDI interface (as the UART 16550 driver does) to make my MIDI port 
available to ALSA applications? Or is there a better alternative?

Thanks,
Francesco


More information about the Alsa-devel mailing list