All of lore.kernel.org
 help / color / mirror / Atom feed
* problems with external MIDI port
@ 2002-09-18 21:10 Ivan Middleton
  2002-09-19 15:49 ` Takashi Iwai
  0 siblings, 1 reply; 7+ messages in thread
From: Ivan Middleton @ 2002-09-18 21:10 UTC (permalink / raw)
  To: alsa-devel

Hi all,

I'm having a problem with the ALSA sequencer.  First I was using
0.9.0rc2, and then I switched to cvs, hoping that things would be fixed
there.  But alas, the problems occur in both.  I was going to try the
0.5 release, but it didn't want to compile for me.

The problem is as follows: I am running a program (called Linux Pipe
Organ) which reads from the external MIDI port (64:0) via an ALSA
sequencer connection, and which also starts a TiMidity process and
sends events to it via ALSA sequencer connections.  (Basically, the
program is just relaying MIDI events, after some modifications.)  This
works fine for a few minutes, and then suddenly... nothing.  The ALSA
sequencer stops relaying events from the external MIDI port.  Now, my
digital piano is connected to the MIDI port, and it sends something
like 30 MIDI events per second (I don't know exactly what these are)
even when no keys are being pressed.  The problem I just described
occurs even if I never press any keys on the piano; I can tell by
watching /proc/asound/seq/clients, looking at the following lines

Client 132 : "Linux Organ" [User]
  Port   0 : "Linux Organ" (rWe-)
    Connected From: 64:0
  Input pool :
    Pool size          : 200
    Cells in use       : 0
    Peak cells in use  : 30
    Alloc success      : 27513
    Alloc failures     : 0

and noticing that after a while the "Alloc success" number stops
changing (when everything is working it goes up by about 30 every
second).

Now, I wanted to test whether this problem is the fault of Linux Pipe
Organ (hereafter LPO) or the ALSA sequencer.  So I recompiled LPO to
have it listen to T. Iwai's Virtual Keyboard instead of the external
MIDI port.  I then ran those programs, while simultaneously having
'aseqview' listen to 64:0 (the external MIDI port).  The same thing
happened again--after a little while, 'aseqview' stopped registering
anything from the MIDI port, even though LPO, Virtual Keyboard, and
TiMidity hadn't been communicating at all, only sitting there with
established connections.  After this, LPO was still listening to the
Virtual Keyboard just fine, meaning that the ALSA sequencer wasn't
completely trashed or anything.  When I had 'aseqview' listen to 64:0
in the absence of LPO, it seemed to work fine indefinitely.

So it seems that the ALSA sequencer has problems with the external MIDI
port in the presence of too many sequencer clients (8-10 in my
situation).  I really have no idea what's going on here.  I should
mention that my kernel is 2.5.33 and my sound card is sbawe.  Another
funny thing I found was that in order to get the external MIDI port
working again, I had to unload and reload the ALSA modules *twice* (I
think this was the case every time, anyway).

I'm hoping that the developers can reproduce this or at least have
ideas for things I should try in order to probe this problem some more.

Thanks for your time,
Ivan Middleton


__________________________________________________
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com


-------------------------------------------------------
This SF.NET email is sponsored by: AMD - Your access to the experts
on Hammer Technology! Open Source & Linux Developers, register now
for the AMD Developer Symposium. Code: EX8664
http://www.developwithamd.com/developerlab

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: problems with external MIDI port
  2002-09-18 21:10 problems with external MIDI port Ivan Middleton
@ 2002-09-19 15:49 ` Takashi Iwai
  2002-09-20  3:14   ` Ivan Middleton
  0 siblings, 1 reply; 7+ messages in thread
From: Takashi Iwai @ 2002-09-19 15:49 UTC (permalink / raw)
  To: ivan_middleton; +Cc: alsa-devel

Hi,

At Wed, 18 Sep 2002 14:10:19 -0700 (PDT),
Ivan Middleton wrote:
> 
> Hi all,
> 
> I'm having a problem with the ALSA sequencer.  First I was using
> 0.9.0rc2, and then I switched to cvs, hoping that things would be fixed
> there.  But alas, the problems occur in both.  I was going to try the
> 0.5 release, but it didn't want to compile for me.
> 
> The problem is as follows: I am running a program (called Linux Pipe
> Organ) which reads from the external MIDI port (64:0) via an ALSA
> sequencer connection, and which also starts a TiMidity process and
> sends events to it via ALSA sequencer connections.  (Basically, the
> program is just relaying MIDI events, after some modifications.)  This
> works fine for a few minutes, and then suddenly... nothing.  The ALSA
> sequencer stops relaying events from the external MIDI port.  Now, my
> digital piano is connected to the MIDI port, and it sends something
> like 30 MIDI events per second (I don't know exactly what these are)
> even when no keys are being pressed.  The problem I just described
> occurs even if I never press any keys on the piano; I can tell by
> watching /proc/asound/seq/clients, looking at the following lines
> 
> Client 132 : "Linux Organ" [User]
>   Port   0 : "Linux Organ" (rWe-)
>     Connected From: 64:0
>   Input pool :
>     Pool size          : 200
>     Cells in use       : 0
>     Peak cells in use  : 30
>     Alloc success      : 27513
>     Alloc failures     : 0
> 
> and noticing that after a while the "Alloc success" number stops
> changing (when everything is working it goes up by about 30 every
> second).

this could be due to the timer routine.
could you check /proc/asound/seq/queue and /proc/asound/seq/timer
whether the timer and queue are still running correctly in such a
situation?


thanks,

Takashi


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: problems with external MIDI port
@ 2002-09-19 16:09 Ivan Middleton
  0 siblings, 0 replies; 7+ messages in thread
From: Ivan Middleton @ 2002-09-19 16:09 UTC (permalink / raw)
  To: alsa-devel

Just a follow-up to my previous email:  I now think that the problem
I'm experiencing may be the fault of timidity, or is at least related
to something that timidity is doing.  I set up a bunch of copies of
vkeybd (virtual keyboard), each connected to a copy of aseqview, and
then had a copy of aseqview listening to the external MIDI port, and
this never caused any problems.  So it doesn't seem to be the sheer
number of sequencer clients that's causing the problem.  Perhaps the
problem has something to do with the fact that timidity (when running
as an ALSA sequencer client) sets up multiple sequencer ports under a
single client.  (I recompiled timidity to set up 4 ports instead of 2,
so that running 'timidity -iA' sets it up listening on 128:0, 128:1,
128:2, 128:3 for example.)

Ivan


__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: problems with external MIDI port
  2002-09-19 15:49 ` Takashi Iwai
@ 2002-09-20  3:14   ` Ivan Middleton
  2002-09-20  9:55     ` Takashi Iwai
  0 siblings, 1 reply; 7+ messages in thread
From: Ivan Middleton @ 2002-09-20  3:14 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

--- Takashi Iwai <tiwai@suse.de> wrote:
> Hi,
> 
> At Wed, 18 Sep 2002 14:10:19 -0700 (PDT),
> Ivan Middleton wrote:
> > 
> > Hi all,
> > 
> > I'm having a problem with the ALSA sequencer.  First I was using
> > 0.9.0rc2, and then I switched to cvs, hoping that things would be
> fixed
> > there.  But alas, the problems occur in both.  I was going to try
> the
> > 0.5 release, but it didn't want to compile for me.
> > 
> > The problem is as follows: I am running a program (called Linux
> Pipe
> > Organ) which reads from the external MIDI port (64:0) via an ALSA
> > sequencer connection, and which also starts a TiMidity process and
> > sends events to it via ALSA sequencer connections.  (Basically, the
> > program is just relaying MIDI events, after some modifications.) 
> This
> > works fine for a few minutes, and then suddenly... nothing.  The
> ALSA
> > sequencer stops relaying events from the external MIDI port.  Now,
> my
> > digital piano is connected to the MIDI port, and it sends something
> > like 30 MIDI events per second (I don't know exactly what these
> are)
> > even when no keys are being pressed.  The problem I just described
> > occurs even if I never press any keys on the piano; I can tell by
> > watching /proc/asound/seq/clients, looking at the following lines
> > 
> > Client 132 : "Linux Organ" [User]
> >   Port   0 : "Linux Organ" (rWe-)
> >     Connected From: 64:0
> >   Input pool :
> >     Pool size          : 200
> >     Cells in use       : 0
> >     Peak cells in use  : 30
> >     Alloc success      : 27513
> >     Alloc failures     : 0
> > 
> > and noticing that after a while the "Alloc success" number stops
> > changing (when everything is working it goes up by about 30 every
> > second).
> 
> this could be due to the timer routine.
> could you check /proc/asound/seq/queue and /proc/asound/seq/timer
> whether the timer and queue are still running correctly in such a
> situation?

am I doing something wrong?  I don't see anything in either
/proc/asound/seq/queue or /proc/asound/seq/timer, no matter what.

Ivan


__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: problems with external MIDI port
  2002-09-20  3:14   ` Ivan Middleton
@ 2002-09-20  9:55     ` Takashi Iwai
  0 siblings, 0 replies; 7+ messages in thread
From: Takashi Iwai @ 2002-09-20  9:55 UTC (permalink / raw)
  To: ivan_middleton; +Cc: alsa-devel

At Thu, 19 Sep 2002 20:14:00 -0700 (PDT),
Ivan Middleton wrote:
> 
> > could you check /proc/asound/seq/queue and /proc/asound/seq/timer
> > whether the timer and queue are still running correctly in such a
> > situation?
> 
> am I doing something wrong?  I don't see anything in either
> /proc/asound/seq/queue or /proc/asound/seq/timer, no matter what.

sorry, /proc/asound/seq/queues
                             ^
both files are empty when no timer is running, that is, no sequencer
client is playing.


ciao,

Takashi


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

^ permalink raw reply	[flat|nested] 7+ messages in thread

* problems with external MIDI port
@ 2002-10-29  2:17 Ivan Middleton
  2002-10-29 18:59 ` Peter L Jones
  0 siblings, 1 reply; 7+ messages in thread
From: Ivan Middleton @ 2002-10-29  2:17 UTC (permalink / raw)
  To: alsa-devel

This is a follow-up to my postings of a few weeks ago.  I recently
submitted the following as bug #629284:

After just a few minutes of using a program (Linux Pipe Organ,
http://orgue.com/linux_organ/index-e.shtml) which reads from the
external MIDI port, the ALSA mpu401 driver barfs:

Oct 26 20:22:43 localhost kernel: ALSA
../../alsa-kernel/drivers/mpu401/mpu401_uart.c:168: cmd: 0xff failed at
0x330 (status = 0xff, data = 0xff)
Oct 26 20:22:43 localhost kernel: ALSA
../../alsa-kernel/drivers/mpu401/mpu401_uart.c:168: cmd: 0x3f failed at
0x330 (status = 0xff, data = 0xff)

The aforementioned program communicates heavily with another program
(Timidity) over the ALSA sequencer interface, and I believe this may be
related somehow to the problem, since in the absence of these programs
I
can read from the external MIDI port as long as I want. When the error
occurs, the sequencer interface (and everything else) seems to continue
working fine; only the external port can't be read from anymore. I'm
using 0.9.0rc5, and here's my soundcard:

0 [card0 ]: SB AWE - Sound Blaster 16
Sound Blaster 16 at 0x220, irq 5, dma 1&5

Any help with how to proceed debugging this further would be greatly
appreciated.  Thanks,

Ivan


__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: problems with external MIDI port
  2002-10-29  2:17 Ivan Middleton
@ 2002-10-29 18:59 ` Peter L Jones
  0 siblings, 0 replies; 7+ messages in thread
From: Peter L Jones @ 2002-10-29 18:59 UTC (permalink / raw)
  To: ivan_middleton, alsa-devel

On Tuesday 29 Oct 2002 02:17, Ivan Middleton wrote:
> This is a follow-up to my postings of a few weeks ago.  I recently
> submitted the following as bug #629284:
>
> After just a few minutes of using a program (Linux Pipe Organ,
> http://orgue.com/linux_organ/index-e.shtml) which reads from the
> external MIDI port, the ALSA mpu401 driver barfs:
>
> Oct 26 20:22:43 localhost kernel: ALSA
> ../../alsa-kernel/drivers/mpu401/mpu401_uart.c:168: cmd: 0xff failed at
> 0x330 (status = 0xff, data = 0xff)
> Oct 26 20:22:43 localhost kernel: ALSA
> ../../alsa-kernel/drivers/mpu401/mpu401_uart.c:168: cmd: 0x3f failed at
> 0x330 (status = 0xff, data = 0xff)
>
> The aforementioned program communicates heavily with another program
> (Timidity) over the ALSA sequencer interface, and I believe this may be
> related somehow to the problem, since in the absence of these programs
> I
> can read from the external MIDI port as long as I want. When the error
> occurs, the sequencer interface (and everything else) seems to continue
> working fine; only the external port can't be read from anymore. I'm
> using 0.9.0rc5, and here's my soundcard:
>
> 0 [card0 ]: SB AWE - Sound Blaster 16
> Sound Blaster 16 at 0x220, irq 5, dma 1&5
>
> Any help with how to proceed debugging this further would be greatly
> appreciated.  Thanks,
>
> Ivan

Can you aconnect the keyboard directly to TiMidity++ without problems?

-- Peter



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-10-29 18:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-18 21:10 problems with external MIDI port Ivan Middleton
2002-09-19 15:49 ` Takashi Iwai
2002-09-20  3:14   ` Ivan Middleton
2002-09-20  9:55     ` Takashi Iwai
  -- strict thread matches above, loose matches on Subject: below --
2002-09-19 16:09 Ivan Middleton
2002-10-29  2:17 Ivan Middleton
2002-10-29 18:59 ` Peter L Jones

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.