jesganaud.devaudio engineering field notes
> Notes.log/.sh/.env

pipewire 1.4 latency math, finally written down

logged 2026-04-14tags pipewire · latency · linux-audio
# round-trip latency on pipewire 1.4.x, RME UCX II, 48kHz
# verified with jack_iodelay against a 1m TRS loopback
 
# quantum (period) = configurable, suggested 256 or lower for tracking
# min-quantum is a floor; the node graph can’t request lower than this
# max-quantum is rarely the active value unless a node forces it
 
# configured:
# default.clock.rate = 48000
# default.clock.quantum = 256
# default.clock.min-quantum = 32
# default.clock.max-quantum = 8192
 
# measured round-trip (jack_iodelay):
# q=256 → 16.8 ms (= 2 * 256/48k + ~6ms ALSA padding)
# q=128 → 9.1 ms
# q=64 → 5.4 ms
# q=32 → 3.6 ms (xruns under chrome+browser load)
 
# the +6ms is alsa’s period-count safety margin. cutting periods
# from 2 to 1 saves ~5.3ms but pipewire refuses on most usb cards.
 
# tracking sweet spot: q=128, periods=2.
# mixing: q=1024+ to let plugin pdc compensate without xrun pressure.