From alsa-devel-owner@alsa.jcu.cz  Wed Jan 13 01:55:45 1999
Received: from post.mail.demon.net (finch-post-10.mail.demon.net [194.217.242.38])
	by marvin.jcu.cz (8.9.1a/8.9.1) with ESMTP id BAA05174
	for <alsa-devel@alsa.jcu.cz>; Wed, 13 Jan 1999 01:54:02 +0100
Received: from [212.228.182.246] (helo=ariel.sr.home)
	by post.mail.demon.net with esmtp (Exim 2.10 #1)
	id 100EZL-0006vH-00
	for alsa-devel@alsa.jcu.cz; Wed, 13 Jan 1999 00:54:00 +0000
Received: (from steve@localhost)
	by ariel.sr.home (8.8.7/8.8.7) id AAA05638
	for alsa-devel@alsa.jcu.cz; Wed, 13 Jan 1999 00:50:01 GMT
Date: Wed, 13 Jan 1999 00:50:01 GMT
From: Steve Ratcliffe <steve@parabola.demon.co.uk>
Message-Id: <199901130050.AAA05638@ariel.sr.home>
To: alsa-devel@alsa.jcu.cz
Subject: Re: Ultrasound Midi.
Reply-To: alsa-devel@alsa.jcu.cz
Sender: alsa-devel-owner@alsa.jcu.cz
Precedence: list

> problems with it, except for the midi. I know it is still under
> development, but whenever I try raw midi, or the sequencer, my whole
> system locks up. I have an Gravis Ultrasound PnP Pro card. I have recently
> ran the test programs included in the alsa-lib. The decoder bit worked,
> but the sender locked everything. Any ideas of what might be going wrong?

Is that straight away, or after a while?

This is what happens for me:

First I applied the appended patch so that reads return as soon as there
is some data.

The decoder works fine, and I get an event printed every time that I
hit a key on my keyboard.

Sender works at first and I get the ECHO event printed every second until
about 200 seconds after alsa was loaded, when the whole system locks up
completely.  However this only happens when my midi keyboard is switched on,
it does not appear to lock up when it is switched off.

It could be that the active sensing signals are piling up somewhere and
causing a problem when some limit is reached.

..Steve

In directory alsa-driver/kernel/seq:

--- seq_clientmgr.c.orig	Sun Jan 10 00:07:33 1999
+++ seq_clientmgr.c	Sun Jan 10 00:07:51 1999
@@ -355,7 +355,7 @@
 	while (count >= sizeof(snd_seq_event_t)) {
 		while (snd_seq_fifo_avail(client->outqueue) == 0) {
 			/* no data available in outqueue, block */
-			if (file->f_flags & O_NONBLOCK)
+			if (file->f_flags & O_NONBLOCK || result > 0)
 				return result;
 			snd_spin_lock(&client->data.user, input_sleep, &flags);
 			client->outqueue->flags |= SND_WK_SLEEP;

