From the ALSA wiki
|The FAQs have been reorganized. The new location of this question is FAQ#How do I enable MIDI I/O (MPU401 etc.)?|
How do I enable MIDI I/O (MPU401 etc.)?
This Question is not about MIDI Synthesis (making MIDI files produce sounds with your Computer Hardware).
A: Gameport Support (in 2.6 Kernels: Device Drivers/Input Devices Support/Hardware I/O Ports, Gameport Support) must be enabled (M or Y). This is not obvious. For some cards, you might need an additional module, some appear here. Sound/ALSA/Generic devices/Generic MPU-401 driver might be worth a shot.
Even without Gameport Support (even without the necissary modules) Midi devices might appear in /proc/asound/..., /dev/midi might work, no error be visible at all except for that it doesn't work. (dev hint: go and fix that! Its deceiving!)