ArmSoM
← All stories

How to Recognize Audio Clock Drift on a Linux Recorder

Two USB audio devices can both advertise 48 kHz and still advance at slightly different physical rates. On an ArmSoM recorder using one device for capture and another for playback, a buffer can slowly fill or drain even if the system is otherwise idle.

ArmSoM Sige5 single-board computer product photo

ArmSoM Sige5 single-board computer · ArmSoM

Estimate the mismatch over a long recording

Track the difference in sample counts or buffer occupancy over an uninterrupted test. At 48 kHz, a drift of 48 samples each second is about 1,000 parts per million. Check for dropped periods before using that calculation. Repeat with one device providing both directions where possible. If the long-term slope disappears, independent clocks are a useful lead.

For a smaller example, 2.4 frames of difference per second at 48 kHz is about 50 parts per million. Over an hour that accumulates to around 180 ms if nothing corrects it.

For long sessions, evaluate shared clocking or adaptive resampling. A larger buffer delays a steadily growing error but the measured slope determines how long it will last.

Reference material

ArmSoM Sige5 hardware documentation

ALSA PCM interface and buffers

Related ArmSoM guide

Audio capture and local processing pdm i2s and USB design choices

Explore ArmSoM Sige5