From alsa-devel-owner@alsa.jcu.cz  Mon Jul  6 22:01:39 1998
Received: from localhost (perex@localhost)
	by marvin.jcu.cz (8.8.8/8.8.8) with SMTP id WAA17594;
	Mon, 6 Jul 1998 22:01:26 +0200
Date: Mon, 6 Jul 1998 22:01:26 +0200 (MET DST)
From: Jaroslav Kysela <perex@jcu.cz>
To: Frank van de Pol <F.K.W.van.de.Pol@inter.nl.net>
cc: alsa <alsa-devel@jcu.cz>
Subject: Re: Lockups with GUS MIDI
In-Reply-To: <199807061830.UAA00456@obelix.fvdpol.inter.nl.net>
Message-ID: <Pine.LNX.3.95.980706215758.17334A-100000@marvin.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Reply-To: alsa-devel@alsa.jcu.cz
Sender: alsa-devel-owner@alsa.jcu.cz
Precedence: list

On Mon, 6 Jul 1998, Frank van de Pol wrote:

> 
> Hi,
> 
> I've run into another case where the GUS MIDI seems to cause lockups. With
> this lockup the machine freezes completely, even the alt-sysreq doesn't work
> anymore (interrupts disabled?).  I'm using a Gravis Ultrasound MAX card,
> ALSA driver 0.1.3, kernel 2.1.96. The next test program shows the behaviour.
> Please make sure you sync'ed your filesystems before running it!

OK.. Here is very small and clean fix (let me know if it helps):

============================= cut here
--- ../../1/alsa-driver/kernel/rawmidi.c        Tue Apr 28 17:34:29 1998
+++ rawmidi.c   Mon Jul  6 21:54:13 1998
@@ -652,7 +652,8 @@
   }
   if ( !rmidi -> output.u.s.used ) {
     snd_spin_unlock( rmidi, output, &flags );
-    snd_rawmidi_trigger_output( rmidi, 0 );
+    if ( !result )
+      snd_rawmidi_trigger_output( rmidi, 0 );
     if ( rmidi -> output.flags & (SND_RAWMIDI_FLG_FLUSH|SND_RAWMIDI_FLG_SLEEP) )
       snd_wakeup( rmidi, output );
   } else if ( (rmidi -> output.flags & SND_RAWMIDI_FLG_SLEEP) && snd_rawmidi_output_ok( rmidi ) ) {
============================= cut here

Thanks for testing..

						Jaroslav

-----
Jaroslav Kysela <perex@jcu.cz>
Academic Computer Centre, University of South Bohemia
Branisovska 31, C. Budejovice, CZ-370 05 Czech Republic


