alsa: support fixed latency range in alsa modules

This adds a boolean module parameter to disable automatic dynamic
latency readjustments on underruns, but leaves automatic dynamic
watermark readjustments untouched.
This commit is contained in:
Lars R. Damerow 2011-11-03 21:14:45 +01:00 committed by Lennart Poettering
parent 6124bf8951
commit 7a387fed36
5 changed files with 47 additions and 10 deletions

View file

@ -1008,6 +1008,10 @@ static void fix_playback_buffer_attr(playback_stream *s) {
tlength_usec -= s->configured_sink_latency;
}
pa_log_debug("Requested latency=%0.2f ms, Received latency=%0.2f ms",
(double) sink_usec / PA_USEC_PER_MSEC,
(double) s->configured_sink_latency / PA_USEC_PER_MSEC);
/* FIXME: This is actually larger than necessary, since not all of
* the sink latency is actually rewritable. */
if (tlength_usec < s->configured_sink_latency + 2*minreq_usec)