Posts: 2
Joined: Sat Dec 09, 2017 10:32 pm

Pi4 as a real time DSP processor for live audio

Thu Aug 15, 2019 12:21 am

Hello world,

I'm toying with DSP's to create a digital mixer for real time live audio use. I'm toying with DSP's such as ADAU1452 and the new Teensy 4. It was brought to my attention that the PI4 might have the power and speed to do this type processing. Hardware inputs and outputs aside (I know I would want better DAC/ADC parts), would the PI4 be fast enough to process audio in real time (very low latency) or is an offboard DSP (as mentioned) still my best bet.

My gut says that the PI4 is not optimized for real time DSP processing. But I'm all ears, anyone doing this?


Posts: 235
Joined: Tue Aug 30, 2011 1:24 am

Re: Pi4 as a real time DSP processor for live audio

Thu Aug 15, 2019 12:52 am

While I can't really answer your question, as it is very specific; hopefully something is a bit helpful in my response.

I remember back in the day, we used to do audio editing on a Netbook, using live instruments and input/output samples, using an Atom N2600 CPU, and we could get latency down to about 128samples, or 12ms. The delay was barely noticeable, but overall not too bad.
We later upgraded to a Celeron N3060 with 2,48Ghz boost, and latency was well within 48 samples, or ~7ms (instantaneous); all using an ASIO4all driver, as the windows drivers sucked. It was about as good as my older Core2Duo CPU running at 1.77Ghz

The Pi 4B only has a 1.5Ghz CPU, which can be overclocked to 1,6Ghz safely (provided you have active cooling).

But Linux has generally a very low latency (lower than Windows, but perhaps not lower when using an ASIO driver).
ARM generally has very low latency. Much lower than x86, if made well.

So if you ask me, I think what you're asking is how low can one go, before the sound starts to noticeably have a delay?

If the Pi 4 was running at 1,8Ghz, I'd presume the audio would have very low latency. But a stock Pi4, and via the GPIO pins?
Hard to say.
If you don't want to cash out the money, try getting a used Pi 3B+ somewhere, and test it out, as the Pi 3B+ can be overclocked to 1,5Ghz (with cooling) and isn't that much different from the Pi 4 (save for having slower RAM).
If it works on the Pi 3B+, it'll work on the Pi 4, with maybe 2-4ms lower latency.

User avatar
Posts: 3407
Joined: Wed Aug 28, 2013 3:31 am

Re: Pi4 as a real time DSP processor for live audio

Thu Aug 15, 2019 3:03 am

PI's have i2s with fifo/dma etc
I have seen it used for codecs, can it be used for DSPs.

The Mesa stuff now has OpenCL in it and there is fft code that uses OpenCL I think.
Also look in ARM Compute library, that should be even more useful now on Pi4's.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Return to “Graphics, sound and multimedia”