* HDSP 9652 MIDI - A timing disaster?
@ 2003-01-11 15:49 Mark Knecht
2003-01-13 9:04 ` Clemens Ladisch
0 siblings, 1 reply; 6+ messages in thread
From: Mark Knecht @ 2003-01-11 15:49 UTC (permalink / raw)
To: Alsa-List, Alsa-Devel
Hi,
I asked about this two weeks ago but got no responses. I'm hoping
this time I hear something back from other owners of the same hardware.
I recently purchased an RME HDSP 9652 card. The card is working fine
for audio, but the MIDI interface is a timing disaster. The interface
works, but won't keep time. A 2 minute song is Rosegarden takes abut
2:45 to play every time. You can hear how the HDSP isn't delivering
closely spaced MIDI events together, but is sort of smearing them out.
My machine is set up using the PlanetCCRMA system. According to
Synaptic my Alsa driver is from CVS:20021216. Jack is 0.44. This machine
works just fine with the MidiMan 2x2 interface. No timing problems at
all.
Has anyone else purchased this card? Used the MIDI interface on this
card? Gotten better results with this card?
Can anyone suggest how I could go about fixing this myself? I'm not a
programmer, so really hacking the code is doubtful, but this driver is
acting like there is just a basic mistake somewhere. Possibly I could
find it if I knew where to look.
I hope someone will respond to this email so we can get something
going to get this fixed. I really need this interface to operate soon.
Thanks in advance,
Mark
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: HDSP 9652 MIDI - A timing disaster?
2003-01-11 15:49 HDSP 9652 MIDI - A timing disaster? Mark Knecht
@ 2003-01-13 9:04 ` Clemens Ladisch
2003-01-13 13:15 ` Paul Davis
2003-01-14 5:16 ` Mark Knecht
0 siblings, 2 replies; 6+ messages in thread
From: Clemens Ladisch @ 2003-01-13 9:04 UTC (permalink / raw)
To: Mark Knecht; +Cc: Alsa-List, Alsa-Devel, Paul Davis
Mark Knecht wrote:
> I recently purchased an RME HDSP 9652 card. The card is working fine
> for audio, but the MIDI interface is a timing disaster. The interface
> works, but won't keep time. A 2 minute song is Rosegarden takes abut
> 2:45 to play every time. You can hear how the HDSP isn't delivering
> closely spaced MIDI events together, but is sort of smearing them out.
The hdsp driver doesn't send more than one MIDI byte per timer tick.
IMHO it should be modified to send in a loop until the FIFO is full
(however, I don't know if the HDSP has a FIFO at all). And it should start
sending in output_trigger() instead of delaying it to the next timer tick.
HTH
Clemens
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: HDSP 9652 MIDI - A timing disaster?
2003-01-13 9:04 ` Clemens Ladisch
@ 2003-01-13 13:15 ` Paul Davis
2003-01-13 14:28 ` Clemens Ladisch
2003-01-14 5:16 ` Mark Knecht
1 sibling, 1 reply; 6+ messages in thread
From: Paul Davis @ 2003-01-13 13:15 UTC (permalink / raw)
To: Clemens Ladisch; +Cc: Mark Knecht, Alsa-List, Alsa-Devel
>Mark Knecht wrote:
>> I recently purchased an RME HDSP 9652 card. The card is working fine
>> for audio, but the MIDI interface is a timing disaster. The interface
>> works, but won't keep time. A 2 minute song is Rosegarden takes abut
>> 2:45 to play every time. You can hear how the HDSP isn't delivering
>> closely spaced MIDI events together, but is sort of smearing them out.
>
>The hdsp driver doesn't send more than one MIDI byte per timer tick.
>IMHO it should be modified to send in a loop until the FIFO is full
that's what this tried to do:
if (hmidi->output) {
if (!snd_rawmidi_transmit_empty (hmidi->output)) {
if ((n_pending = snd_hdsp_midi_output_possible (hmidi->hdsp, hmidi->id)) > 0) {
if (n_pending > sizeof (buf))
n_pending = sizeof (buf);
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;
}
how does this end up writing only a single byte? unless n_pending is
always either 0 or 1, which on closer inspection, i see that it is
... yikes.
>(however, I don't know if the HDSP has a FIFO at all). And it should start
it does have a FIFO.
>sending in output_trigger() instead of delaying it to the next timer tick.
hmm. i modelled this code on another PCI driver that had MIDI
support. is there an example you can point me to that starts from
within the equivalent output_trigger?
--p
-------------------------------------------------------
This SF.NET email is sponsored by: FREE SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: HDSP 9652 MIDI - A timing disaster?
2003-01-13 13:15 ` Paul Davis
@ 2003-01-13 14:28 ` Clemens Ladisch
2003-01-13 15:28 ` Takashi Iwai
0 siblings, 1 reply; 6+ messages in thread
From: Clemens Ladisch @ 2003-01-13 14:28 UTC (permalink / raw)
To: Paul Davis; +Cc: Mark Knecht, Alsa-Devel
Paul Davis wrote:
> >The hdsp driver doesn't send more than one MIDI byte per timer tick.
> >IMHO it should be modified to send in a loop until the FIFO is full
>
> that's what this tried to do:
> (...)
> how does this end up writing only a single byte? unless n_pending is
> always either 0 or 1, which on closer inspection, i see that it is
> ... yikes.
>
> >sending in output_trigger() instead of delaying it to the next timer tick.
>
> hmm. i modelled this code on another PCI driver that had MIDI
> support. is there an example you can point me to that starts from
> within the equivalent output_trigger?
e.g. isa/sb/sb8_midi.c or drivers/mpu401/mpu401_uart.c
And both output one byte at a time in a loop until the output fails.
(However, snd_sb8dsp_midi_output_write() doesn't check for a full FIFO.)
HTH
Clemens
-------------------------------------------------------
This SF.NET email is sponsored by: FREE SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: HDSP 9652 MIDI - A timing disaster?
2003-01-13 14:28 ` Clemens Ladisch
@ 2003-01-13 15:28 ` Takashi Iwai
0 siblings, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2003-01-13 15:28 UTC (permalink / raw)
To: Clemens Ladisch; +Cc: Paul Davis, Mark Knecht, Alsa-Devel
At Mon, 13 Jan 2003 15:28:58 +0100 (MET),
Clemens Ladisch wrote:
>
> Paul Davis wrote:
> > >The hdsp driver doesn't send more than one MIDI byte per timer tick.
> > >IMHO it should be modified to send in a loop until the FIFO is full
> >
> > that's what this tried to do:
> > (...)
> > how does this end up writing only a single byte? unless n_pending is
> > always either 0 or 1, which on closer inspection, i see that it is
> > ... yikes.
> >
> > >sending in output_trigger() instead of delaying it to the next timer tick.
> >
> > hmm. i modelled this code on another PCI driver that had MIDI
> > support. is there an example you can point me to that starts from
> > within the equivalent output_trigger?
>
> e.g. isa/sb/sb8_midi.c or drivers/mpu401/mpu401_uart.c
>
> And both output one byte at a time in a loop until the output fails.
> (However, snd_sb8dsp_midi_output_write() doesn't check for a full FIFO.)
well, generally it's not a good style to process in such a loop in the
primary interrupt handler. we should rewrite them using tasklet...
Takashi
-------------------------------------------------------
This SF.NET email is sponsored by: FREE SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Re: HDSP 9652 MIDI - A timing disaster?
2003-01-13 9:04 ` Clemens Ladisch
2003-01-13 13:15 ` Paul Davis
@ 2003-01-14 5:16 ` Mark Knecht
1 sibling, 0 replies; 6+ messages in thread
From: Mark Knecht @ 2003-01-14 5:16 UTC (permalink / raw)
To: Clemens Ladisch; +Cc: Alsa-List, Alsa-Devel, Paul Davis
On Mon, 2003-01-13 at 09:04, Clemens Ladisch wrote:
> Mark Knecht wrote:
> > I recently purchased an RME HDSP 9652 card. The card is working fine
> > for audio, but the MIDI interface is a timing disaster. The interface
> > works, but won't keep time. A 2 minute song is Rosegarden takes abut
> > 2:45 to play every time. You can hear how the HDSP isn't delivering
> > closely spaced MIDI events together, but is sort of smearing them out.
>
> The hdsp driver doesn't send more than one MIDI byte per timer tick.
> IMHO it should be modified to send in a loop until the FIFO is full
> (however, I don't know if the HDSP has a FIFO at all). And it should start
> sending in output_trigger() instead of delaying it to the next timer tick.
>
Clemens,
Thanks for the response. One comment I forgot to make in the first
post. This MIDI interface works fine under Windows, so whatever causes
the problem is purely a Alsa MIDI issue. If we can figure it out, then
we can fix it.
I agree that it sounds like this sort of one note per timer tick.
When the interface is supposed to send a chord, it sends what sounds
like an arpegiated chord. It's all smeared out.
Is there some example code I could look at to understand implementing
a FIFO? However, if there is a FIFO Full indication, doesn't we need to
know _how_ it's indicated? I would assume it's different for all cards?
(Bus possibly similar for cards from the same manufacturer?
Also, this is the HDSP 9652, which is a single PCI card. Is this
problem showing up for the DigiFace/MultiFace type cards?
Thanks,
Mark
-------------------------------------------------------
This SF.NET email is sponsored by: FREE SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-01-14 5:16 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-11 15:49 HDSP 9652 MIDI - A timing disaster? Mark Knecht
2003-01-13 9:04 ` Clemens Ladisch
2003-01-13 13:15 ` Paul Davis
2003-01-13 14:28 ` Clemens Ladisch
2003-01-13 15:28 ` Takashi Iwai
2003-01-14 5:16 ` Mark Knecht
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.