I am working on a "low-latency audio" project and I was wondering which card offers better performances, an Usb one or an on-board ?
1It'll depend on which USB audio device you're thinking about. Some of them are awful! Also, when you say "on-board" do you mean "built-in" or "pre-existing", and are talking about the 3.5" audio socket and/or HDMI audio? Or are you talking about an add-on board for the Pi, such as the discontinued Wolfson and Cirrus Logic audio boards? (Have you seen this btw audioinjector.net ?)– Aaron FAug 8, 2018 at 12:46
@AaronF When I say on-board I though about the "shield ones" that uses GPIO pins. About the signal output I don't know which is the best (between HDMI or jack) but jack is fine.– Julien BlommeAug 8, 2018 at 14:08
I am attempting a similar thing using Gstreamer/ALSA (low latency, not synth) - It works, but not for any length of time. After about 5 minutes USB Audio output stops. So In my point of view, On-board audio is better for result.
If performance is important then I would choose a DAC HAT (such as this or one of these) over the USB.
This way your audio gets I2C all to itself, rather than having to share USB with other devices.
I've also heard of sound quality problems (occasional crackling and stuttering) with USB audio on the Pi, which I can't back up personally, but push me more in favour of the HAT solution.
Latency and USB audio is deceptive. Due to USC2 and buffering, you can set up ALSA with ultra low latencies. Despite ALSA reporting ultra low latencies, you will find that due to the UAC audio specification (USB audio specification) the actual latency of the output and input buffers are much larger then what you set in the ALSA software layer. The reason is that the USB protocol requires milliseconds of audio packets to be transmitted. From personal experience the lowest I could get was around 5ms in loopback depsite setting the ALSA buffer period time to around 1ms.
As the GPIO sound cards use the I2S peripheral silicon it directly links using DMA which is also in silicon to manage the audio stream directly into memory buffers. ALSA can then give to your applications in user space land these memory buffers to process. Due to these hardware/silicon implementations, they will give far lower latencies then USB audio streams.
An incomplete short list of audio cards for the Pi are available on eLinux.