[linux-audio-user] Latency with ALSA

Mark Knecht markknecht at attbi.com
Tue Apr 1 23:37:00 EST 2003


Nick,
   Start working with Jack. I can run my hardware at 1.3mS latency and
lots of stability.

Mark

On Tue, 2003-04-01 at 19:57, Nick wrote:
> 
> I am writing audio applications that are real-time.
> I had been using Port Audio which is really very good, even without root
> priviledges, it does a very good job. I want to support other sound
> drivers, in case someone doesn't have Port Audio or can't get it to
> work.
> 
> I have just built my ALSA driver, it works ok, but I am getting terrible
> latency problems and buffer underruns. The thing is it is a real-time
> application, it must get audio to the card as soon as possible.  Why is
> it that OSS with Port Audio works so well, and my ALSA setup is
> suffering?
> 
> Even if I set the frame rate higher (the number of frames to the card) I
> still get buffer underruns. I am talking maybe 70 milliseconds now. This
> is sad, because I know with DirectX I can get about 35 ms timing with it
> on this machine.With ASIO I have done better than that.
> 
> Even running as root and scheduling the app to real-time priority (50) I
> get buffer underruns. So, something must not be right with my setup.
> 
> I have tried setting the frames written to all sorts of latencies, and
> it does reduce the drop outs, but I am still getting them. I tried
> buffering the sound and dropping it in blocks, but it wasn't working
> correctly. This is a bit disappointing so far.
> 
> Is there something I need to do to ALSA to get near real-time
> performance from it? I have heard people mention patching their kernel
> for low latency. I have Jack but I have not started working with it yet.
> Should I dump ALSA and just go for Jack? Is there something I need to do
> to my kernel to get better performance? I would get Planet CCRMA if it
> supported my OS, but it doesn't, so I have to tweak my box manually.
> 
> Thanks
> 
> 
> 
> 
> 
> -- 
> Nick <nicktsocanos at charter.net>
> 





More information about the Linux-audio-user mailing list