When I use emagic mt4 (USB-MIDI interface) on Linux, there are some minor problems. 1. mt4 never switches to computer mode until PC receives mt4's response to initialization command. Mt4 has two mode, patch mode and computer mode. When connected to PC, it is in patch mode. To use as MIDI interface, mt4 must switch to computer mode. Linux drvier sends commnad "F0 00 20 31 64 0B 00 00 F7" to make mt4 switch to computer mode. But mt4 is still in patch mode after having received the command. It switches to computer mode when PC receives the response from mt4. I must run the below command to make mt4 really ready for use as MIDI interface. $ amidi -l Dir Device Name IO hw:2,0,0 MT4 MIDI 1 IO hw:2,0,1 MT4 MIDI 2 IO hw:2,0,2 MT4 MIDI 3 O hw:2,0,3 MT4 MIDI 4 O hw:2,0,4 MT4 Broadcast $ amidi -p hw:2,0,0 -r /dev/null -t 1 According to Kurt Arnlund's web page (*1), emagic devices accept "Set Computer Mode" command ("F0 00 20 31 64 0F 00 7F F7"), and actually mt4 switches to computer mode with this command immidiately and receiving mt4's response is not needed. (*1) http://www.potm.org/software/Unitor/mididata/ 2. Outputs to MIDI 1 are broadcasted. After switching to computer mode by the above procedure, output to MIDI 1 is broadcasted as if outputted to broadcast port. The current output port in driver's internal state is initialized to port 0 (MIDI 1). But actual device's current port is initialized to port 4 (broadcast port). So output to MIDI 1 doesn't make driver send port switch command until output to other port occurs. I think driver's current port state should be initialized to 4 (for mt4) or larger number. I worte the patch for the problems (to linux kernel 3.16), but I don't know it works with other emagic devices such as amt4, unitor8. If there is anyone has emagic device, please test the below command on unpatched kernel to check whether the device accepts "Set Computer Mode" command. $ amidi -p hw:2,0,0 -r /dev/null -t 1 $ amidi -p hw:2,0,0 -S 'F0 00 20 31 64 10 00 7F 00 F7' $ amidi -p hw:2,0,0 -S 'F0 00 20 31 64 0F 00 7F F7' My mt4 swithes to computer mode with the first amidi command, and returns to patch mode with second command, and finally re-enters in computer mode with the last command. -- Kazuhiro Ito
Attachment:
midi.c.diff
Description: Binary data
_______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel