hdsp and midi problems
Hi,
I have written a simple application that continuously reads one byte from midi in on my hdsp multiface and prints the result to the console. This is done with a plain loop without any calls to poll() or select(). When I run this loop as fast as I can, with 100% processor load, I loose lots of bytes sent over midi. When I run the loop slower, I loose one byte occasionally. Can this behaviour be explained? What should I do to be sure to not loose any bytes? Is this a bug?
Marcus
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
More information,
when I run the program with 100% load using my VIA motherboard midi, I loose no bytes as far as I can see.
I use alsa 0.9.4
Marcus
Quoted 13 lines · Marcus Andersson
Hi,
I have written a simple application that continuously reads one byte from midi in on my hdsp multiface and prints the result to the console. This is done with a plain loop without any calls to
poll()orselect(). When I run this loop as fast as I can, with 100% processor load, I loose lots of bytes sent over midi. When I run the loop slower, I loose one byte occasionally. Can this behaviour be explained? What should I do to be sure to not loose any bytes? Is this a bug?Marcus
Quoted 9 lines
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
Quoted 10 lines
More information,
when I run the program with 100% load using my VIA motherboard midi, I loose no bytes as far as I can see.
I use alsa 0.9.4
Marcus
Marcus,
The HDSP 9652 MIDI interface has (for me under Linux) always dropped lots
of notes. Mostly I find it interesting that it drops note off information and doesn't seem to drop note-on. I cannot be sure how well it handles controller information.
The same machine booted into Windows runs perfectly, so I'm pretty sure
it's not a hardware issue.
Mark
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
Quoted 5 lines · Mark Knecht
Marcus,
The HDSP 9652 MIDI interface has (for me under Linux) always dropped lots
of notes. Mostly I find it interesting that it drops note off information and doesn't seem to drop note-on.
That is probably just a conincident depending on the read pattern/processor load of your applications. Now it's just a matter of convincing someone to debug it. I might even do it myself. If the ALSA CVS would just compile. I have never experienced a project that cares so little about code checked in being compilable. Frustrating.
Quoted 2 lines
The same machine booted into Windows runs perfectly, so I'm pretty sure
it's not a hardware issue.
Mine works as well.
Marcus
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
At Mon, 23 Jun 2003 06:38:20 -0700,
Quoted 10 lines · Mark Knecht
Quoted 10 lines
More information,
when I run the program with 100% load using my VIA motherboard midi, I loose no bytes as far as I can see.
I use alsa 0.9.4
Quoted 7 lines
Quoted 1 line
Marcus
Marcus,
The HDSP 9652 MIDI interface has (for me under Linux) always dropped lots
of notes. Mostly I find it interesting that it drops note off information and doesn't seem to drop note-on. I cannot be sure how well it handles controller information.
do you mean dropping notes in reading MIDI?
well, IIRC, you reported also that the behavior of MIDI out is strange... oh sigh.
Quoted 3 lines
The same machine booted into Windows runs perfectly, so I'm pretty sure
it's not a hardware issue.
dropping a note is surely a bug of the driver. unless the FIFO overflows, no dropping should happen.
btw, could you try the attached patch?
(and in-advance-scheduled excuse if it causes a hang-up :)
Takashi
At Mon, 23 Jun 2003 17:53:07 +0200,
Quoted 8 lines · Marcus Andersson
Quoted 5 lines · Mark Knecht
Marcus,
The HDSP 9652 MIDI interface has (for me under Linux) always dropped lots
of notes. Mostly I find it interesting that it drops note off information and doesn't seem to drop note-on.
Quoted 5 lines
That is probably just a conincident depending on the read pattern/processor load of your applications. Now it's just a matter of convincing someone to debug it. I might even do it myself. If the ALSA CVS would just compile. I have never experienced a project that cares so little about code checked in being compilable. Frustrating.
hmm, i have no problem at all for compiling. what problem do you have?
except for known compiler-check problem in the configure script, i've not heard much about it. at least, not reported to alsa-devel ML. (a few days ago, there was a missing file, but it was already fixed.)
ciao,
Takashi
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
Quoted 3 lines · Takashi Iwai
hmm, i have no problem at all for compiling. what problem do you have?
True, I don't know what the current CVS status is.
Quoted 3 lines
except for known compiler-check problem in the configure script, i've not heard much about it. at least, not reported to alsa-devel ML. (a few days ago, there was a missing file, but it was already fixed.)
Then this probably hit me the last time I tried to update. The problem with alsa cvs is that, according to my experience, more often than not it will not compile. This makes me think twice before I update my tree. Developers should make an effort and check their code an extra time, because a mistake affects so many.
Marcus
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
Quoted 16 lines · Takashi Iwai
At Mon, 23 Jun 2003 17:53:07 +0200,
Quoted 8 lines · Marcus Andersson
Quoted 5 lines · Mark Knecht
Marcus,
The HDSP 9652 MIDI interface has (for me under Linux) always dropped lots
of notes. Mostly I find it interesting that it drops note off information and doesn't seem to drop note-on.Quoted 5 lines
That is probably just a conincident depending on the read pattern/processor load of your applications. Now it's just a matter of convincing someone to debug it. I might even do it myself. If the ALSA CVS would just compile. I have never experienced a project that cares so little about code checked in being compilable. Frustrating.
Quoted 4 lines
hmm, i have no problem at all for compiling. what problem do you have?
except for known compiler-check problem in the configure script, i've
The last issue should be fixed as well.
Jaroslav
-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
At Mon, 23 Jun 2003 18:46:36 +0200 (CEST),
Quoted 19 lines · Jaroslav
Quoted 16 lines · Takashi Iwai
At Mon, 23 Jun 2003 17:53:07 +0200,
Quoted 13 lines · Marcus Andersson
Quoted 5 lines · Mark Knecht
Marcus,
The HDSP 9652 MIDI interface has (for me under Linux) always dropped lots
of notes. Mostly I find it interesting that it drops note off information and doesn't seem to drop note-on.That is probably just a conincident depending on the read pattern/processor load of your applications. Now it's just a matter of convincing someone to debug it. I might even do it myself. If the ALSA CVS would just compile. I have never experienced a project that cares so little about code checked in being compilable. Frustrating.
Quoted 6 lines
Quoted 4 lines
hmm, i have no problem at all for compiling. what problem do you have?
except for known compiler-check problem in the configure script, i've
The last issue should be fixed as well.
i think another buglet in gentoo's list is not solved yet. either gcc -v or compiler.h says something like
xxxx-gcc-x.yz (GCC) x.yz (xxxx)
whether we handle only the case gcc-x.yz (GCC) (xxx).
won't it better to add and option to prevent the gcc version check? of course, the version check should be enabled as default, though.
Takashi
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
Quoted 11 lines
Marcus,
Quoted 1 line
The HDSP 9652 MIDI interface has (for me under Linux) always
dropped lots
Quoted 1 line
of notes. Mostly I find it interesting that it drops note off
information
Quoted 2 lines
and doesn't seem to drop note-on. I cannot be sure how well it handles controller information.
do you mean dropping notes in reading MIDI?
well, IIRC, you reported also that the behavior of MIDI out is strange... oh sigh.
Yes, but I tested Alsa (a long time ago) with both MIDI-IN driving soft synths, and then MIDI-IN/MIDI-OUT driving hardware synths and got the same 'note stuck on' problem. For that reason I say it's a 'MIDI-IN dropped note' problem, but certainly I do not know this for sure.
Quoted 7 lines
dropping a note is surely a bug of the driver. unless the FIFO overflows, no dropping should happen.
btw, could you try the attached patch?
(and in-advance-scheduled excuse if it causes a hang-up :)
I would be happy to try a bit of patching. However, I am on Redhat/PlanetCCRMA and Gentoo, both of which provide prebuilt Alsa environments. I can try patching the Gentoo one which is pretty recent, but it may take a few days before I can get back to you.
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
At Mon, 23 Jun 2003 18:46:35 +0200,
Quoted 12 lines · Marcus Andersson
Quoted 3 lines · Takashi Iwai
hmm, i have no problem at all for compiling. what problem do you have?
True, I don't know what the current CVS status is.
Quoted 3 lines
except for known compiler-check problem in the configure script, i've not heard much about it. at least, not reported to alsa-devel ML. (a few days ago, there was a missing file, but it was already fixed.)
Quoted 5 lines
Then this probably hit me the last time I tried to update. The problem with alsa cvs is that, according to my experience, more often than not it will not compile. This makes me think twice before I update my tree. Developers should make an effort and check their code an extra time, because a mistake affects so many.
yeah, that's true.
however, the most case in which the compilation breaks is a missing check-in of some files (just like above). and it's difficult to fix, because forgetfulness is a nature of human being :)
such a problem may be reduced if we go to bitkeeper. (or, even subvesion would help much in this regard?)
ciao,
Takashi
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
Quoted 2 lines · Takashi Iwai
btw, could you try the attached patch?
(and in-advance-scheduled excuse if it causes a hang-up :)
I will try it. Do you think I can safely apply it to 0.9.4, or should I use cvs?
Marcus
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
Quoted 3 lines · Takashi Iwai
however, the most case in which the compilation breaks is a missing check-in of some files (just like above). and it's difficult to fix, because forgetfulness is a nature of human being :)
Yes, I know it's easy to forget things. But why not automate the checking? That's what we use computers for, automate difficult things. Missing files are marked with a question mark, and changed files can be checked with status.
Marcus
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
Quoted 7 lines · Marcus Andersson
Quoted 2 lines · Takashi Iwai
btw, could you try the attached patch?
(and in-advance-scheduled excuse if it causes a hang-up :)I will try it. Do you think I can safely apply it to 0.9.4, or should I use cvs?
Tested with current cvs. It locks up my computer. I used alsa-lib 0.9.4, as I can't build the latest:
mkdir .libs
rm -fr .libs/libcontrol.la .libs/libcontrol.* .libs/libcontrol.* (cd . && ln -s cards.lo cards.lo)
(cd . && ln -s hcontrol.lo hcontrol.lo)
(cd . && ln -s control.lo control.lo)
(cd . && ln -s control_hw.lo control_hw.lo)
(cd . && ln -s control_shm.lo control_shm.lo)
(cd . && ln -s setup.lo setup.lo)
(cd . && ln -s control_symbols.lo control_symbols.lo)
ar cru .libs/libcontrol.al cards.lo hcontrol.lo control.lo control_hw.lo control_shm.lo setup.lo control_symbols.lo
ar: cards.lo: Too many levels of symbolic links
make[2]: *** [libcontrol.la] Error 1
make[2]: Leaving directory `/usr/local/src/alsa/alsa-lib/src/control' make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/alsa/alsa-lib/src'
make: *** [all-recursive] Error 1 debian:/usr/local/src/alsa/alsa-lib#
Probably my system configuration that is screwed up.
But I don't think it matters, as I open() the device directly.
Marcus
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php