[LAU] Latency and USB interfaces
Clemens Ladisch
clemens at ladisch.de
Fri Jan 10 07:48:38 UTC 2014
Tim Goetze wrote:
> [Clemens Ladisch]
>> In most cases, the ALSA buffer/period parameters directly reflect
>> hardware parameters, but in the case of protocols like USB where it is
>> not possible to transfer data directly out of a ring buffer, there is an
>> additional packet queue, which adds latency. (The length of that queue
>> is either constant or proportional to the period size, depending on the
>> driver.)
>
> Thanks you Clemens for clearing that up. How would one go about
> determining the size of this queue between ALSA and USB?
In the case of the current version of snd-usb-audio, the queue has the
same length as the buffer, but never more than 18 ms.
> And is it correct to assume that in a best-case scenario where the
> sample clock is synchronised to the USB clock
Pro devices typically don't do this.
> and the period size coincides with the interval at which USB frames
> are signalled,
This does not happen with Jack, where period sizes typically are a power
of two.
> the additional latency will be one period?
These two conditions have nothing to do with the queue length; they
ensure that USB interrupts happen exactly at period boundaries, i.e.,
that there is no jitter in the reported period interrupts.
Regards,
Clemens
More information about the Linux-audio-user
mailing list