[PlanetCCRMA] [Fwd: Re: [Alsa-devel] HDSP 9652 MIDI Timing - Much improved, but no Port 1...]

Mark Knecht markknecht@attbi.com
Fri Jan 24 04:27:01 2003


--=-WmUk8cdlax2XLwP2Myy+
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Fernando,
   Any chance of helping Takashi-san with this test? LEt us know when
you can try this. I'll test it when it's in.

Thanks,
Mark


--=-WmUk8cdlax2XLwP2Myy+
Content-Disposition: inline
Content-Description: Forwarded message - Re: [Alsa-devel] HDSP 9652 MIDI
	Timing - Much improved, but no Port 1...
Content-Type: message/rfc822

Return-Path: <tiwai@suse.de>
Received: from Cantor.suse.de ([213.95.15.193]) by rwcrgwc54.attbi.com
	(InterMail vM.4.01.03.37 201-229-121-137-20020806) with ESMTP id
	<20030124110610.NWLF1113.rwcrgwc54.attbi.com@Cantor.suse.de> for
	<markknecht@attbi.com>; Fri, 24 Jan 2003 11:06:10 +0000
Received: from Hermes.suse.de (Hermes.suse.de [213.95.15.136]) by
	Cantor.suse.de (Postfix) with ESMTP id 7A4B814560; Fri, 24 Jan 2003
	12:06:09 +0100 (MET)
Date: Fri, 24 Jan 2003 12:06:09 +0100
Message-ID: <s5hr8b2yfha.wl@alsa2.suse.de>
From: Takashi Iwai <tiwai@suse.de>
To: Mark Knecht <markknecht@attbi.com>
Cc: Alsa-Devel <alsa-devel@lists.sourceforge.net>
Subject: Re: [Alsa-devel] HDSP 9652 MIDI Timing - Much improved, but no
	Port 1...
In-Reply-To: <1043351090.2341.13.camel@Godzilla>
References: <1043351090.2341.13.camel@Godzilla>
User-Agent: Wanderlust/2.6.1 (Upside Down) SEMI/1.14.4 (Hosorogi)
	FLIM/1.14.4 (=?ISO-8859-4?Q?Kashiharajing=FE-mae?=) APEL/10.2 MULE
	XEmacs/21.4 (patch 11) (Native Windows TTY Support (RC1)) (i386-suse-linux)
MIME-Version: 1.0 (generated by SEMI 1.14.4 - "Hosorogi")
Content-Type: multipart/mixed; boundary="Multipart_Fri_Jan_24_12:06:09_2003-1"


--Multipart_Fri_Jan_24_12:06:09_2003-1
Content-Type: text/plain; charset=US-ASCII

At 23 Jan 2003 19:44:49 +0000,
Mark Knecht wrote:
> 
> Paul, Takashi-san and Clemens,
>    Hi. A couple of days ago Fernando got a new RPM built for Alsa which
> includes the recent HDSP 9652 MIDI timing fix that you worked together
> on and supplied about 10 days ago. I wanted to report back that the
> timing is now much improved. I haven't used it a lot yet, but I am
> playing moderately complicated songs now and the timing seems fine.
> Thanks.
> 
>    There is one problem that has come up new in this release. The HDSP
> 9652 has two MIDI ports. With this release I can only get MIDI out on
> Port 2. I cannot get MIDI out at all on Port 1. Both ports used to work
> on the previous version, albeit with bad timing, so this fix this has
> changed this aspect of the driver.

could you (or anyone HDSP owner) check the attached patch?


>    I also tried using kaconnect to look at the connections between
> Rosegarden and the alsa_sequencer. It shows that Rosegarden is hooked to
> 64:32 External MIDI 0 only. A second group, 64:0 External MIDI 0 shows
> up, but kaconnect will not connect to it. I do not know what that means,
> but it seems to be part of it.
 
rosegarden developers know better about this...


Takashi

--Multipart_Fri_Jan_24_12:06:09_2003-1
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="hdsp-midi.dif"
Content-Transfer-Encoding: 7bit

Index: alsa-kernel/pci/rme9652/hdsp.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/rme9652/hdsp.c,v
retrieving revision 1.16
diff -u -r1.16 hdsp.c
--- alsa-kernel/pci/rme9652/hdsp.c	20 Jan 2003 15:36:08 -0000	1.16
+++ alsa-kernel/pci/rme9652/hdsp.c	24 Jan 2003 10:54:24 -0000
@@ -844,7 +844,6 @@
 {
 	unsigned long flags;
 	int n_pending;
-	int clear_timer = 0;
 	int to_write;
 	int i;
 	unsigned char buf[128];
@@ -862,17 +861,9 @@
 				if ((to_write = snd_rawmidi_transmit (hmidi->output, buf, n_pending)) > 0) {
 					for (i = 0; i < to_write; ++i) 
 						snd_hdsp_midi_write_byte (hmidi->hdsp, hmidi->id, buf[i]);
-				} else {
-					clear_timer = 1;
 				}
 			}
-		} else {
-			clear_timer = 1;
 		}
-
-		if (clear_timer && hmidi->istimer && --hmidi->istimer <= 0) {
-			del_timer(&hmidi->timer);
-		} 
 	}
 
 	spin_unlock_irqrestore (&hmidi->lock, flags);
@@ -980,6 +971,8 @@
 		}
 	}
 	spin_unlock_irqrestore (&hmidi->lock, flags);
+	if (up)
+		snd_hdsp_midi_output_write(hmidi);
 }
 
 static int snd_hdsp_midi_input_open(snd_rawmidi_substream_t * substream)

--Multipart_Fri_Jan_24_12:06:09_2003-1--


--=-WmUk8cdlax2XLwP2Myy+--