alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* buffer time
@ 2014-08-18 20:34 Joël Krähemann
  2014-08-18 20:36 ` Joël Krähemann
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Joël Krähemann @ 2014-08-18 20:34 UTC (permalink / raw)
  To: alsa-devel

What's the correct buffer time to use with alsa?

since I have following in ags.sf.net

buffer size: 940
alsa iterations: 47 per second

Since I don't have segmentation of tact in my application BPM is the
only scale I got really slow output.
Further can't run anymore with realtime priorities. I would prefer using
940 because its near a good throughput rate. Years ago I calculated it
the exact value would be something 93.whatever

Please help

best regards
Joël



_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: buffer time
  2014-08-18 20:34 buffer time Joël Krähemann
@ 2014-08-18 20:36 ` Joël Krähemann
  2014-08-19 13:10 ` Clemens Ladisch
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Joël Krähemann @ 2014-08-18 20:36 UTC (permalink / raw)
  To: alsa-devel

Am Montag, den 18.08.2014, 22:34 +0200 schrieb Joël Krähemann:
> What's the correct buffer time to use with alsa?
> 
> since I have following in ags.sf.net
> 
> buffer size: 940
> alsa iterations: 47 per second
> 
> Since I don't have segmentation of tact in my application BPM is the
> only scale I got really slow output.
> Further can't run anymore with realtime priorities. I would prefer using
> 940 because its near a good throughput rate. Years ago I calculated it
> the exact value would be something 93.whatever
> 
> Please help
> 
> best regards
> Joël
> 
> 
> 
Sorry there went something wrong it should be 943.dontknow




_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: buffer time
  2014-08-18 20:34 buffer time Joël Krähemann
  2014-08-18 20:36 ` Joël Krähemann
@ 2014-08-19 13:10 ` Clemens Ladisch
  2014-08-19 13:58 ` Mike Looijmans
  2014-08-20  4:25 ` Joël Krähemann
  3 siblings, 0 replies; 5+ messages in thread
From: Clemens Ladisch @ 2014-08-19 13:10 UTC (permalink / raw)
  To: Joël Krähemann, alsa-devel

Joël Krähemann wrote:
> What's the correct buffer time to use with alsa?

That depends.

For playback, a shorter buffer reduces latency.
A larger buffer reduces the chances of an over/underrun.


Regards,
Clemens
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: buffer time
  2014-08-18 20:34 buffer time Joël Krähemann
  2014-08-18 20:36 ` Joël Krähemann
  2014-08-19 13:10 ` Clemens Ladisch
@ 2014-08-19 13:58 ` Mike Looijmans
  2014-08-20  4:25 ` Joël Krähemann
  3 siblings, 0 replies; 5+ messages in thread
From: Mike Looijmans @ 2014-08-19 13:58 UTC (permalink / raw)
  To: alsa-devel

On 08/18/2014 10:34 PM, Joël Krähemann wrote:
> What's the correct buffer time to use with alsa?

Playback or capture?

Anyway, Linux performs at its very worst when faced with typical 
audio/video work, because it tends to postpone things and execute them 
in a single big chunk. This is good for throughput, as it can re-order 
everything so that less harddisk head seeks are required, but it causes 
an application that, say, writes out data at a constant but quite low 
rate, to experience latencies of well over 2 seconds on an otherwise 
idle system.

Because of that, my answer to such a question it usually: All the memory 
that you can spare.
In case of ALSA, that means get the biggest you can possibly get, 
because the DMA buffer is usually pre-allocated when the driver probed, 
so it's going to waste if you don't use it.
-- 
Mike Looijmans
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: buffer time
  2014-08-18 20:34 buffer time Joël Krähemann
                   ` (2 preceding siblings ...)
  2014-08-19 13:58 ` Mike Looijmans
@ 2014-08-20  4:25 ` Joël Krähemann
  3 siblings, 0 replies; 5+ messages in thread
From: Joël Krähemann @ 2014-08-20  4:25 UTC (permalink / raw)
  To: alsa-devel

Am Montag, den 18.08.2014, 22:34 +0200 schrieb Joël Krähemann:
> What's the correct buffer time to use with alsa?
> 
> since I have following in ags.sf.net
> 
> buffer size: 940
> alsa iterations: 47 per second
> 
> Since I don't have segmentation of tact in my application BPM is the
> only scale I got really slow output.
> Further can't run anymore with realtime priorities. I would prefer using
> 940 because its near a good throughput rate. Years ago I calculated it
> the exact value would be something 93.whatever
> 
> Please help
> 
> best regards
> Joël
> 
> 
> 

I've just found

https://perf.wiki.kernel.org/index.php/Tutorial#multiplexing_and_scaling_events

thank you
Joël Krähemann


_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-08-20  9:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-18 20:34 buffer time Joël Krähemann
2014-08-18 20:36 ` Joël Krähemann
2014-08-19 13:10 ` Clemens Ladisch
2014-08-19 13:58 ` Mike Looijmans
2014-08-20  4:25 ` Joël Krähemann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).