1*4882a593Smuzhiyun=================================== 2*4882a593SmuzhiyunSerial UART 16450/16550 MIDI driver 3*4882a593Smuzhiyun=================================== 4*4882a593Smuzhiyun 5*4882a593SmuzhiyunThe adaptor module parameter allows you to select either: 6*4882a593Smuzhiyun 7*4882a593Smuzhiyun* 0 - Roland Soundcanvas support (default) 8*4882a593Smuzhiyun* 1 - Midiator MS-124T support (1) 9*4882a593Smuzhiyun* 2 - Midiator MS-124W S/A mode (2) 10*4882a593Smuzhiyun* 3 - MS-124W M/B mode support (3) 11*4882a593Smuzhiyun* 4 - Generic device with multiple input support (4) 12*4882a593Smuzhiyun 13*4882a593SmuzhiyunFor the Midiator MS-124W, you must set the physical M-S and A-B 14*4882a593Smuzhiyunswitches on the Midiator to match the driver mode you select. 15*4882a593Smuzhiyun 16*4882a593SmuzhiyunIn Roland Soundcanvas mode, multiple ALSA raw MIDI substreams are supported 17*4882a593Smuzhiyun(midiCnD0-midiCnD15). Whenever you write to a different substream, the driver 18*4882a593Smuzhiyunsends the nonstandard MIDI command sequence F5 NN, where NN is the substream 19*4882a593Smuzhiyunnumber plus 1. Roland modules use this command to switch between different 20*4882a593Smuzhiyun"parts", so this feature lets you treat each part as a distinct raw MIDI 21*4882a593Smuzhiyunsubstream. The driver provides no way to send F5 00 (no selection) or to not 22*4882a593Smuzhiyunsend the F5 NN command sequence at all; perhaps it ought to. 23*4882a593Smuzhiyun 24*4882a593SmuzhiyunUsage example for simple serial converter: 25*4882a593Smuzhiyun:: 26*4882a593Smuzhiyun 27*4882a593Smuzhiyun /sbin/setserial /dev/ttyS0 uart none 28*4882a593Smuzhiyun /sbin/modprobe snd-serial-u16550 port=0x3f8 irq=4 speed=115200 29*4882a593Smuzhiyun 30*4882a593SmuzhiyunUsage example for Roland SoundCanvas with 4 MIDI ports: 31*4882a593Smuzhiyun:: 32*4882a593Smuzhiyun 33*4882a593Smuzhiyun /sbin/setserial /dev/ttyS0 uart none 34*4882a593Smuzhiyun /sbin/modprobe snd-serial-u16550 port=0x3f8 irq=4 outs=4 35*4882a593Smuzhiyun 36*4882a593SmuzhiyunIn MS-124T mode, one raw MIDI substream is supported (midiCnD0); the outs 37*4882a593Smuzhiyunmodule parameter is automatically set to 1. The driver sends the same data to 38*4882a593Smuzhiyunall four MIDI Out connectors. Set the A-B switch and the speed module 39*4882a593Smuzhiyunparameter to match (A=19200, B=9600). 40*4882a593Smuzhiyun 41*4882a593SmuzhiyunUsage example for MS-124T, with A-B switch in A position: 42*4882a593Smuzhiyun:: 43*4882a593Smuzhiyun 44*4882a593Smuzhiyun /sbin/setserial /dev/ttyS0 uart none 45*4882a593Smuzhiyun /sbin/modprobe snd-serial-u16550 port=0x3f8 irq=4 adaptor=1 \ 46*4882a593Smuzhiyun speed=19200 47*4882a593Smuzhiyun 48*4882a593SmuzhiyunIn MS-124W S/A mode, one raw MIDI substream is supported (midiCnD0); 49*4882a593Smuzhiyunthe outs module parameter is automatically set to 1. The driver sends 50*4882a593Smuzhiyunthe same data to all four MIDI Out connectors at full MIDI speed. 51*4882a593Smuzhiyun 52*4882a593SmuzhiyunUsage example for S/A mode: 53*4882a593Smuzhiyun:: 54*4882a593Smuzhiyun 55*4882a593Smuzhiyun /sbin/setserial /dev/ttyS0 uart none 56*4882a593Smuzhiyun /sbin/modprobe snd-serial-u16550 port=0x3f8 irq=4 adaptor=2 57*4882a593Smuzhiyun 58*4882a593SmuzhiyunIn MS-124W M/B mode, the driver supports 16 ALSA raw MIDI substreams; 59*4882a593Smuzhiyunthe outs module parameter is automatically set to 16. The substream 60*4882a593Smuzhiyunnumber gives a bitmask of which MIDI Out connectors the data should be 61*4882a593Smuzhiyunsent to, with midiCnD1 sending to Out 1, midiCnD2 to Out 2, midiCnD4 to 62*4882a593SmuzhiyunOut 3, and midiCnD8 to Out 4. Thus midiCnD15 sends the data to all 4 ports. 63*4882a593SmuzhiyunAs a special case, midiCnD0 also sends to all ports, since it is not useful 64*4882a593Smuzhiyunto send the data to no ports. M/B mode has extra overhead to select the MIDI 65*4882a593SmuzhiyunOut for each byte, so the aggregate data rate across all four MIDI Outs is 66*4882a593Smuzhiyunat most one byte every 520 us, as compared with the full MIDI data rate of 67*4882a593Smuzhiyunone byte every 320 us per port. 68*4882a593Smuzhiyun 69*4882a593SmuzhiyunUsage example for M/B mode: 70*4882a593Smuzhiyun:: 71*4882a593Smuzhiyun 72*4882a593Smuzhiyun /sbin/setserial /dev/ttyS0 uart none 73*4882a593Smuzhiyun /sbin/modprobe snd-serial-u16550 port=0x3f8 irq=4 adaptor=3 74*4882a593Smuzhiyun 75*4882a593SmuzhiyunThe MS-124W hardware's M/A mode is currently not supported. This mode allows 76*4882a593Smuzhiyunthe MIDI Outs to act independently at double the aggregate throughput of M/B, 77*4882a593Smuzhiyunbut does not allow sending the same byte simultaneously to multiple MIDI Outs. 78*4882a593SmuzhiyunThe M/A protocol requires the driver to twiddle the modem control lines under 79*4882a593Smuzhiyuntiming constraints, so it would be a bit more complicated to implement than 80*4882a593Smuzhiyunthe other modes. 81*4882a593Smuzhiyun 82*4882a593SmuzhiyunMidiator models other than MS-124W and MS-124T are currently not supported. 83*4882a593SmuzhiyunNote that the suffix letter is significant; the MS-124 and MS-124B are not 84*4882a593Smuzhiyuncompatible, nor are the other known models MS-101, MS-101B, MS-103, and MS-114. 85*4882a593SmuzhiyunI do have documentation (tim.mann@compaq.com) that partially covers these models, 86*4882a593Smuzhiyunbut no units to experiment with. The MS-124W support is tested with a real unit. 87*4882a593SmuzhiyunThe MS-124T support is untested, but should work. 88*4882a593Smuzhiyun 89*4882a593SmuzhiyunThe Generic driver supports multiple input and output substreams over a single 90*4882a593Smuzhiyunserial port. Similar to Roland Soundcanvas mode, F5 NN is used to select the 91*4882a593Smuzhiyunappropriate input or output stream (depending on the data direction). 92*4882a593SmuzhiyunAdditionally, the CTS signal is used to regulate the data flow. The number of 93*4882a593Smuzhiyuninputs is specified by the ins parameter. 94