05-22-2025, 07:55 PM
Hello Forum,
The "HiFiBerry DAC2 ADC Pro" that I am now using has Playback and Capture volumes and both are set to 0dB in the tests below.
The roundtrip latency for this device is measured at 44.1 and 48kHz, 16 bits, 2 channels.
The result is 4ms ... but the there is a builtin DSP on the Playback path of this device using a default "FIR interpolation with de-emphasis" program and I can't measure the real impact of this setup.
On my test system, "alsabat" could not calculate round trip latency using 32 bit streams : it reports "Could not detect signal. Too much background noise?" ;-) I hope the wiring did not melt ...
My questions:
- On the RPi5, is there a HAT that will yield better than 4ms round trip latency ?
- Can this be also measured using 32 bit streams ?
Data follows.
Regards,
The device can playback 16, 24, and 32 bit streams but allows only 16 or 32 bit capture streams:
For those trying to inject analog data in the Sonos ecosystem, we have a round trip of 99ms between this HAT and a Sonos Connect.
There is a review of the SonnOS Connect by Audio Science Review here that is strangely accurate for today's Sonos firmware.
The test conditions are:
The "HiFiBerry DAC2 ADC Pro" that I am now using has Playback and Capture volumes and both are set to 0dB in the tests below.
The roundtrip latency for this device is measured at 44.1 and 48kHz, 16 bits, 2 channels.
The result is 4ms ... but the there is a builtin DSP on the Playback path of this device using a default "FIR interpolation with de-emphasis" program and I can't measure the real impact of this setup.
On my test system, "alsabat" could not calculate round trip latency using 32 bit streams : it reports "Could not detect signal. Too much background noise?" ;-) I hope the wiring did not melt ...
My questions:
- On the RPi5, is there a HAT that will yield better than 4ms round trip latency ?
- Can this be also measured using 32 bit streams ?
Data follows.
Regards,
The device can playback 16, 24, and 32 bit streams but allows only 16 or 32 bit capture streams:
Code:
musical@moOde:~ $ alsabat -D hw:sndrpihifiberry -f cd -c 2 --roundtriplatency
alsa-utils version 1.2.8
[ ... ]
Start round trip latency
Entering playback thread (ALSA).
Set period size: 52 buffer size: 104
Get period size: 52 buffer size: 104
Playing generated audio sine wave
Entering capture thread (ALSA).
Set period size: 52 buffer size: 104
Get period size: 52 buffer size: 104
Recording ...
Test1, round trip latency 3ms
Test2, round trip latency 3ms
Test3, round trip latency 4ms
Test4, round trip latency 3ms
Test5, round trip latency 4ms
Final round trip latency: 4ms
Playback completed.
Capture completed.
Return value is 0
musical@moOde:~ $ alsabat -D hw:sndrpihifiberry -f dat -c 2 --roundtriplatency
alsa-utils version 1.2.8
[ ... ]
Start round trip latency
Entering playback thread (ALSA).
Set period size: 56 buffer size: 112
Get period size: 56 buffer size: 112
Playing generated audio sine wave
Entering capture thread (ALSA).
Set period size: 56 buffer size: 112
Get period size: 56 buffer size: 112
Recording ...
Test1, round trip latency 4ms
Test2, round trip latency 4ms
Test3, round trip latency 4ms
Test4, round trip latency 4ms
Test5, round trip latency 4ms
Final round trip latency: 4ms
Playback completed.
Capture completed.
Return value is 0
For those trying to inject analog data in the Sonos ecosystem, we have a round trip of 99ms between this HAT and a Sonos Connect.
There is a review of the SonnOS Connect by Audio Science Review here that is strangely accurate for today's Sonos firmware.
The test conditions are:
- The Connect outputs a Fixed stereo signal
- Audio Delay is set to their minimum (75ms)
- Volume Limit is Off (100%)
- AutoPlay is ON (targetting itself)
Code:
musical@moOde:~ $ alsabat -D hw:sndrpihifiberry -f S16_LE -r 48000 -c 2 --roundtriplatency
alsa-utils version 1.2.8
[ ... ]
Start round trip latency
Entering playback thread (ALSA).
Set period size: 56 buffer size: 112
Get period size: 56 buffer size: 112
Playing generated audio sine wave
Entering capture thread (ALSA).
Set period size: 56 buffer size: 112
Get period size: 56 buffer size: 112
Recording ...
Test1, round trip latency 99ms
Test2, round trip latency 99ms
Test3, round trip latency 99ms
Test4, round trip latency 99ms
Test5, round trip latency 99ms
Final round trip latency: 99ms
Playback completed.
Capture completed.
Return value is 0