[alsa-devel] Latency of mixer reconfiguration
james.dutton at gmail.com
Wed Feb 17 21:34:17 CET 2010
On 17 February 2010 18:15, Lennart Poettering <mznyfn at 0pointer.de> wrote:
> So, as some of you might know in PA we extend the abilities of the
> hardware volume control in software. Meaning that if a hw mixer
> control only allows a limited range or granularity of a volume scale
> or does not distuingish between channels then PA will configure the
> hardware to the next higher available setting of the real
> volume it wants to achieve, and then attenuates the PCM stream to
> compensate for the rest.
> This actually works quite well but there is a certain probelm with
> latency: i.e. the mixer setting will be applied at a slightly
> different time than the PCM attenuation.
> Now the question I have is, how should I best deal with this? I
> currently assume that mixer volume changes are basically instantaneous
> when I call the respective function of ALSA. But are they really? How
> big is the latency at max? Do we need an API to query it?
The latency is non-deterministic.
latency of the PCM stream is more predictable.
I am not sure how you might get around this problem.
More information about the Alsa-devel