[linux-audio-dev] Audio/Midi system - RT prios..

Pedro Lopez-Cabanillas pedro.lopez.cabanillas at gmail.com
Sat Dec 31 16:14:14 UTC 2005


On Saturday 31 December 2005 00:52, Florian Schmidt wrote:
> All of this depends on whether physical port midi activity is really
> handled by IRQ's too. Anyone know more?

I don't know every MIDI interface details, but there are many different  
variations. Please, somebody with better knowledge could provide additional 
info and correct my very probable mistakes.

USB MIDI interfaces don't generate interrupts. Instead, this is done by the 
USB host controller (EHCI/OHCI/UHCI). The driver for these devices provide an 
interrupt handler not directly, but indirectly (the in/out URB completion 
handlers). So yes, this device type may be considered interrupt-driven.

The oldest MIDI interface for PCs was the Roland MPU-401. It had two  
operational modes: Intelligent and UART mode. Intelligent mode was necessary 
because the low power of early personal computers CPUs. This intelligent mode 
required IRQ handlers for both MIDI input and output operations, and to 
control the internal timer used for hardware scheduling and event 
timestamping, and also for external MTC/SMPTE synchronization. It was a 
rather sofisticated piece of hardware, but there is not an ALSA driver for 
these devices (and I don't know a single manufacturer selling it nowadays). 

The MPU-401 UART mode doesn't provide an interrupt signal to finish the  
output completion, so you must use polling for output (it provides an 
interrupt only for incoming events). There is an ALSA driver for this mode, 
that is used also by many consumer sound cards emulating the MPU-401. I 
wouldn't recommend to use these MIDI interfaces.

Other chips, as the Ensoniq 1370/1371 used in some cheap SoundBlaster 
products, included a better UART mode, providing interrupts for both 
reception and transmission. There is also an ALSA driver for the 16550 UART, 
that can be used with a few external devices like the Roland Canvas and the 
Midiator devices.

Regards,
Pedro



More information about the Linux-audio-dev mailing list