We're running into a weird issue and we're currently at a loss.
When using high sample rates, we have horrible audio glitches with our software on a Pi 5, but no issue at all on a Pi 4.
Minimal way to reproduce:
- Create a 192 kHz file
- Play it with aplay
- Run stress -vm 2 (or higher)
- Sound card used: DAC+ADC; I can try others if needed.
(stress can be installed using apt-get install stress; the problem is most noticeable if you play a low frequency tone).
This happens on both the official Raspbian release (6.1.0, with ",slave" in config.txt to make the sound card work) and in the version with the new drivers that you get with rpi-update. The Pi 4 is perfectly happy either way.
stress -vm stresses the memory; stressing the CPU, I/O or HDD (SD card) does not cause any issues. So it looks like there's an issue with the HifiBerry on the Pi 5 in combination with memory usage.
(In case anyone wonders: We need 192 kHz because we're generating an FM MPX signal for radio, which contains frequencies up to 60 kHz.)