[LAD] Drift compensation document

Len Ovens len at ovenwerks.net
Tue Aug 29 21:37:13 UTC 2017

On Tue, 29 Aug 2017, Benny Alexandar wrote:

> This is my first post to Linux Audio. I had a look at alsa_in/out programs, and
> the man page says it performs drift compensation for drift between the two
> clocks.

drift compensation equals resample or Sample Rate Conversion (SRC)

A resample step is used in many places and used to be quite bad (AC97 
relies on this to derive all required Sample rates from 48k... in some 
cards even 48k goes through SRC) so in a longer recording the left track 
and the right may be two different lengths. However, things have gotten a 
lot better. BTW, the zita-ajbridge gives better quality and uses less CPU 
than alsa_in/out. I believe the Zita SRC libs are available as a separate 
package as well.

A lot of broadcast oriented Audio cards offer SRC on each digital (aes3) 
input so that the output is sample aligned.

> I would like to know more about the implementation details such as the drift
> compensation using PI controller. Any paper/presentation documents available
> other than the C code. Please share me the details.

If you have ieee access: (I don't so I don't know how good this is)

and more. Google "Asynchronous Sample Rate Converter paper" for more.

Len Ovens

More information about the Linux-audio-dev mailing list