* Re: More Midisport 2x2 troubles
@ 2003-04-03 12:00 Ivica Bukvic
2003-04-03 14:50 ` Clemens Ladisch
0 siblings, 1 reply; 5+ messages in thread
From: Ivica Bukvic @ 2003-04-03 12:00 UTC (permalink / raw)
To: alsa-devel; +Cc: 'Clemens Ladisch'
Guys, I am forwarding this to you as well from the alsa-user list since
right now I am looking for example code how to access the 2nd set of I/O
MIDI ports on my Midisport 2x2 (seems that having /dev/midi and
/dev/midi1 does not work any more for some reason, even though it worked
just fine in 0.9.1). Any help on this issue is greatly appreciated!
P.S. One thing I just realized is that there is something rather unclear
to me in the explanation generously provided by Clemens:
> /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
since none of the amidi devices does not work on my setup (see my last
e-mail for more info) and it seems as if it should. Furthermore, what
happens when the midi interface has more than 2 I/O ports?
Ico
-----Original Message-----
Thanks for your help!
However, I am a bit confused, since this feature with /dev/midi stuff
worked like a charm just a couple weeks ago (ver. 0.9.1). So, did
something change dramatically since?
Can you also point me in the right direction where I can see a simple
ALSA code to accessing the both of the MIDI raw ports?
Thanks!
Ico
> 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
>
-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re: More Midisport 2x2 troubles
2003-04-03 12:00 More Midisport 2x2 troubles Ivica Bukvic
@ 2003-04-03 14:50 ` Clemens Ladisch
2003-04-04 0:23 ` More Midisport 2x2 troubles (help from the Alsa developers is greatly appreciated!) Ivica Bukvic
0 siblings, 1 reply; 5+ messages in thread
From: Clemens Ladisch @ 2003-04-03 14:50 UTC (permalink / raw)
To: Ivica Bukvic; +Cc: alsa-devel
Ivica Bukvic wrote:
> However, I am a bit confused, since this feature with /dev/midi stuff
> worked like a charm just a couple weeks ago (ver. 0.9.1). So, did
> something change dramatically since?
No. The USB MIDI driver has behaved in this way since 0.9.0rc4.
> Can you also point me in the right direction where I can see a simple
> ALSA code to accessing the both of the MIDI raw ports?
alsa-lib/test/rawmidi.c does some operations with both OSS and ALSA ports.
When using two ports, you'd call snd_rawmidi_open() twice and then have
two handles, similar to two file handles.
alsa-lib/test/control.c enumerates rawmidi devices.
BTW: Are you soure you want to use rawmidi ports? Many software
synthesizers create sequencer ports only.
> P.S. One thing I just realized is that there is something rather unclear
> to me in the explanation generously provided by Clemens:
>
> > /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
>
> since none of the amidi devices does not work on my setup (see my last
> e-mail for more info) and it seems as if it should.
Your two ports are subdevices 0 and 1 of card 1, device 0.
/dev/amidi1 points to device 1 which doesn't exist.
> Furthermore, what happens when the midi interface has more than 2 I/O
> ports?
If the ports are subdevices of one device, only the first can be accessed
with the OSS /dev/midiX file.
If each port is a seperate device, the first two ports can be accessed
with /dev/midiX and /dev/amidiX.
Drivers for multiport interfaces usually use the first alternative (one
device with subdevices) because there is a limit of 8 rawmidi devices per
card.
HTH
Clemens
-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: More Midisport 2x2 troubles (help from the Alsa developers is greatly appreciated!)
2003-04-03 14:50 ` Clemens Ladisch
@ 2003-04-04 0:23 ` Ivica Bukvic
2003-04-04 2:04 ` Ivica Bukvic
0 siblings, 1 reply; 5+ messages in thread
From: Ivica Bukvic @ 2003-04-04 0:23 UTC (permalink / raw)
To: 'Clemens Ladisch', linux-audio-user; +Cc: alsa-devel, alsa-user
Hmm, I've tried running the alsa-lib/test/ramidi test and tried using it
as:
rawmidi -i hw:2,0
This starts it up but I don't get any events in. Can anyone tell me why?
Any other setting (i.e. hw:2,1) reports an error that such a device was
not found.
Interesting thing is that when I do ./rawmidi -o hw:2,0 I get the
note-on/off signal on the midisport, which means that the send part of
it works ok.
However, when I do -i nothing comes into the cpu.
Same is with the ./rawmidi -I /dev/midi2 (there are no errors, but no
input either).
cat /dev/midi2 works just fine.
My /dev/snd/ only has 1 midi device (midiC2D0), so it does seem like
it's a problem with Alsa.
Running latency in the same dir freezes the machine with a loud sound
going on.
I am using MDK 9.1 on Inspiron 8200. Any help is greatly appreciated!
Any other suggestions?
Ico
> -----Original Message-----
> From: aezr4@studcom.urz.uni-halle.de [mailto:aezr4@studcom.urz.uni-
> halle.de] On Behalf Of Clemens Ladisch
> Sent: Thursday, April 03, 2003 9:50 AM
> To: Ivica Bukvic
> Cc: alsa-devel@lists.sourceforge.net
> Subject: Re: [Alsa-devel] Re: More Midisport 2x2 troubles
>
> Ivica Bukvic wrote:
> > However, I am a bit confused, since this feature with /dev/midi
stuff
> > worked like a charm just a couple weeks ago (ver. 0.9.1). So, did
> > something change dramatically since?
>
> No. The USB MIDI driver has behaved in this way since 0.9.0rc4.
>
> > Can you also point me in the right direction where I can see a
simple
> > ALSA code to accessing the both of the MIDI raw ports?
>
> alsa-lib/test/rawmidi.c does some operations with both OSS and ALSA
ports.
> When using two ports, you'd call snd_rawmidi_open() twice and then
have
> two handles, similar to two file handles.
> alsa-lib/test/control.c enumerates rawmidi devices.
>
> BTW: Are you soure you want to use rawmidi ports? Many software
> synthesizers create sequencer ports only.
>
> > P.S. One thing I just realized is that there is something rather
unclear
> > to me in the explanation generously provided by Clemens:
> >
> > > /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
> >
> > since none of the amidi devices does not work on my setup (see my
last
> > e-mail for more info) and it seems as if it should.
>
> Your two ports are subdevices 0 and 1 of card 1, device 0.
> /dev/amidi1 points to device 1 which doesn't exist.
>
> > Furthermore, what happens when the midi interface has more than 2
I/O
> > ports?
>
> If the ports are subdevices of one device, only the first can be
accessed
> with the OSS /dev/midiX file.
> If each port is a seperate device, the first two ports can be accessed
> with /dev/midiX and /dev/amidiX.
>
> Drivers for multiport interfaces usually use the first alternative
(one
> device with subdevices) because there is a limit of 8 rawmidi devices
per
> card.
>
>
> HTH
> Clemens
>
-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: More Midisport 2x2 troubles (help from the Alsa developers is greatly appreciated!)
2003-04-04 0:23 ` More Midisport 2x2 troubles (help from the Alsa developers is greatly appreciated!) Ivica Bukvic
@ 2003-04-04 2:04 ` Ivica Bukvic
2003-04-04 6:30 ` [Alsa-user] [linux-audio-user] " Clemens Ladisch
0 siblings, 1 reply; 5+ messages in thread
From: Ivica Bukvic @ 2003-04-04 2:04 UTC (permalink / raw)
To: linux-audio-user, 'Clemens Ladisch'; +Cc: alsa-devel, alsa-user
Actually please disregard the part about not receiving input using
rawmidi. Forgot to include -v option for verbose.
Yet, I still cannot get the second port of the Midisport 2x2 to become
available no matter what. /proc/asound/cards lists only one midisport
2x2 device (which is ok, I guess, since even Fernando's webpage mentions
that this is the case with the latest CVS stuff), but even in the
/proc/asound/card2 (which is indexed as such) it only lists one midi
port. Same is the case with the /dev/snd/midi* stuff.
I would at this point like to know if this is a bug (so that I can stop
wasting time on it) and if so, will it be addressed any time soon, and
furthermore what will be the future approach to this issue, will the
notion of assigning one /dev/midi device for each port prevail, or will
we have to access other ports on the same device through alsa's
hw:0,<subdevice> kind of approach, or perhaps something completely
different.
This is rather important to me since now I am in process of implementing
multiple midi i/o port monitoring capability in my app and am currently
stuck waiting for this issue to be resolved, so before I can proceed I
would like to know what will be the best way of implementing that. This
will ensure that I do not end up having to revise a large body of my
code.
Apologies for the cross-posts, just trying to get to the bottom of this
issue that seemed fixed as of the ver.0.9.1 and now is back with a
vengeance. :-(
Again, any help on this matter is greatly appreciated! Sincerely,
Ico
> -----Original Message-----
> From: linux-audio-user-admin@music.columbia.edu
[mailto:linux-audio-user-
> admin@music.columbia.edu] On Behalf Of Ivica Bukvic
> Sent: Thursday, April 03, 2003 7:24 PM
> To: 'Clemens Ladisch'; linux-audio-user@music.columbia.edu
> Cc: alsa-devel@lists.sourceforge.net; alsa-user@lists.sourceforge.net
> Subject: [linux-audio-user] Re: More Midisport 2x2 troubles (help from
the
> Alsa developers is greatly appreciated!)
>
>
> Hmm, I've tried running the alsa-lib/test/ramidi test and tried using
it
> as:
>
> rawmidi -i hw:2,0
>
> This starts it up but I don't get any events in. Can anyone tell me
why?
>
> Any other setting (i.e. hw:2,1) reports an error that such a device
was
> not found.
>
> Interesting thing is that when I do ./rawmidi -o hw:2,0 I get the
> note-on/off signal on the midisport, which means that the send part of
> it works ok.
>
> However, when I do -i nothing comes into the cpu.
> Same is with the ./rawmidi -I /dev/midi2 (there are no errors, but no
> input either).
>
> cat /dev/midi2 works just fine.
>
> My /dev/snd/ only has 1 midi device (midiC2D0), so it does seem like
> it's a problem with Alsa.
>
> Running latency in the same dir freezes the machine with a loud sound
> going on.
>
> I am using MDK 9.1 on Inspiron 8200. Any help is greatly appreciated!
>
> Any other suggestions?
>
> Ico
>
-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Alsa-user] [linux-audio-user] Re: More Midisport 2x2 troubles (help from the Alsa developers is greatly appreciated!)
2003-04-04 2:04 ` Ivica Bukvic
@ 2003-04-04 6:30 ` Clemens Ladisch
0 siblings, 0 replies; 5+ messages in thread
From: Clemens Ladisch @ 2003-04-04 6:30 UTC (permalink / raw)
To: Ivica Bukvic; +Cc: linux-audio-user, alsa-devel, alsa-user
Ivica Bukvic wrote:
> Hmm, I've tried running the alsa-lib/test/ramidi test and tried using it
> as:
> rawmidi -i hw:2,0
> ...
> Any other setting (i.e. hw:2,1) reports an error that such a device was
> not found.
The first number is the card number, the second is the device number, and
the third is the subdevice number. Your two ports are "hw:2,0,0" and
"hw:2,0,1", respectively.
HTH
Clemens
-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-04-04 6:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-03 12:00 More Midisport 2x2 troubles Ivica Bukvic
2003-04-03 14:50 ` Clemens Ladisch
2003-04-04 0:23 ` More Midisport 2x2 troubles (help from the Alsa developers is greatly appreciated!) Ivica Bukvic
2003-04-04 2:04 ` Ivica Bukvic
2003-04-04 6:30 ` [Alsa-user] [linux-audio-user] " Clemens Ladisch
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.