[PlanetCCRMA] midisport 2x2 only opening 1 port ??
Fernando Pablo Lopez-Lezcano
nando@ccrma.Stanford.EDU
Sun Jun 8 11:01:02 2003
> My Midisport 2x2 seems to be hotplugging ok but I only get 1 port ie if
> I do" pd -mididev 2,3" only port 2 shows up. I've tried other combos like
> "pd -mididev 1,2" etc. but only port 2 seems to work.
Pd still uses midi oss emulation, it does not have a native alsa midi
driver so it does not see the second (or third or more) port. I'm
including a post from Clemens Ladish to alsa-users about this problem
with a workaround.
-- Fernando
Re: [Alsa-user] More Midisport 2x2 troubles
* From: Clemens Ladisch
* Subject: Re: [Alsa-user] More Midisport 2x2 troubles
* Date: Thu, 03 Apr 2003 00:04:12 -0800
Ivica Bukvic wrote:
> The firmware loads fine, and the midisport is properly recognized. The
> problem is that I only have one MIDI port available even though this
> is the 2x2 version (I had 2 ports in Mdk 9.0, usually /dev/midi(0) and
> /dev/midi1). Now I only have /dev/midi.
>
> The interesting thing is that the /proc/asound/card1/midi0 lists the
> following:
>
> Output 0
> Tx bytes : 0
> Output 1
> Tx bytes : 0
> Input 0
> Rx bytes : 5 (this number changes, most likely because
> it's the only port that has anything hooked up to it)
> Input 1
> Rx bytes : 0
>
> So, it seems that there are 2 I and 2 O ports, but they are all
> allocated within the midi0 device according to the proc stuff (or
> /dev/midi1 according to the dev stuff).
For multiport USB MIDI interfaces, the ports are subdevices of one midi
device. This isn't a problem with programs using the ALSA API, but when
you want to use the OSS-compatible /dev/midiX ports, you cannot access
any subdevices other than the first directly.
The mapping of OSS MIDI devices to ALSA MIDI devices is as follows:
/dev/midi0 -> card 0, device 0, subdevice 0
/dev/amidi0 -> card 0, device 1, subdevice 0
/dev/midi1 -> card 1, device 0, subdevice 0
/dev/amidi1 -> card 1, device 1, subdevice 0
/dev/midi2 -> card 2, device 0, subdevice 0
/dev/amidi2 -> card 2, device 1, subdevice 0
...
> If this is the case, then how do I access the second port.
You can load the snd-virmidi driver to create a virtual soundcard having
its own MIDI device, and then connect this port to the 2x2's second MIDI
port (with aconnect).
> In this situation the hdsp is not in use, so midisport assumes the 2nd
> card position.
> ...
> options snd-usb-audio vid=0x763 pid=0x1001 index=2
It shouldn't, because the above options line tells the driver to load at
index 2. And if you'd use 0x1110 as product ID, it actually would. ;-)
(0x1001 is the ID of the device without firmware.)
HTH
Clemens