On Fri, 7 Feb 2003, Clemens Ladisch wrote: > Frank Neumann wrote: > > PS: I checked with gettimeofday(): The snd_rawmidi_drain() takes about > > 47-49ms on my system..quite long, huh? I mean, the command sequence is > > just 7 bytes, that's about 2.24ms of "raw" MIDI transfer time.. > > There are two possibilities how the _drain() can be implemented: > 1) The driver knows when the FIFO is empty, and waits until then, or > 2) Nothing is known, so ALSA simply waits for 50 ms. > > Currently, there isn't any driver which implements 1). :-(
Yes, you got it. I forgot this algorithm. Unfortunately, the most of cards don't allow us to read the FIFO size / state, so it's a bit problematic to determine the real time when all data are flushed to device. Jaroslav ----- Jaroslav Kysela <[EMAIL PROTECTED]> Linux Kernel Sound Maintainer ALSA Project, SuSE Labs ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com _______________________________________________ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel