• Welcome to ASR. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Introducing DSPi | A powerful, user friendly and open source DSP for less than a cup of coffee

@Weeb Labs

This is an excellent project. Which board would be more suitable: the Raspberry Pi Pico 2 or the Pico 2 W?

Thanks,
The Pico 2 W includes WiFi and Bluetooth, both of which are used by features on the roadmap.
 
New firmware and DSPi Console (macOS) releases with crossfeed support committed and pushed! Windows release to follow.

Whoever has the project set up, give it a try and let me know what you think. :D

1770520116170.png
1770520132955.png

As you can see, we have presets for the most common implementations, as well as parameter customization and a toggle for ITD.


Thank you very much. This is something to really look forward to.
You are most welcome.
 
Last edited:
There is a plethora of important functionality that still needs to be implemented but at the same time, I don't want to fall down the hole of trying to make it "everything to everyone".
As a fellow software developer, thank you for that mindset! When I saw this my head started buzzing with how many ways this could be extended - but I looked at it from a hardware perspective. Someone mentioned USB output - anyone could go and build a separate board that takes the digital output from the DSPi and outputs it over USB. Better to make modules with simple interfaces than try to cram everything into one. If the API is defined and exposed nicely, someone else could go and make a controller to make this part of a nice digital preamp box, etc etc.

Anyway, I'm off to check my boxes of spare parts to see if I have an RP2040 somewhere. I was supposed to be doing other things today but this needs playing with too!
 
Thanks! :)

A small update before I get some sleep: I have successfully refactored the pico_audio_spdif library (with some help from robo intern), creating a new fork "creatively" named pico_audio_spdif_multi. This fork includes full support for instantiation and enables the creation of as many SPDIF outputs as the hardware can support (theoretically up to 12). Conveniently, all BMCs running on a given PIO block are phase and latency locked as they are driven by exactly the same divider clock.

For the moment, I have simply routed the subwoofer output to a second SPDIF on pin 22 and successfully tested simultaneous output. We now have up to eight functional digital output channels.

I'll commit this tomorrow, once I have had time to investigate edge cases. If everything is satisfactory, then a matrix mixer (2 in, 8 out) is our next stop.
 
Last edited:
For the longest time, I have been in search of the “perfect” inexpensive audio DSP device. Something with user friendly control software that could accept a USB input, apply PEQ, delays and other essential processing and then produce a digital output.

Over the holidays, I was (un)fortunate enough to contract the flu, which provided me with an unexpected three week period without work. Having received a Raspberry Pi Pico for Christmas from my wife, I decided this would be the perfect opportunity for a little passion project. The goal was to develop the perfect inexpensive audio DSP using that €5 Pico board. And so, here we are.


View attachment 509243


DSPi is a firmware that transforms a Raspberry Pi Pico or Pico 2 (RP2040 or RP2350) into a very competent, extensible and inexpensive little digital audio processor. It acts as a USB sound card with an onboard DSP engine, allowing you to make use of essential tools like room correction, active crossovers, parametric EQ, time alignment and more.

Here are some of the firmware’s present capabilities:
  • Standard USB audio device with plug-and-play compatibility under Windows, macOS and Linux.
  • 44.1KHz and 48KHz sample rate support.
  • 32-bit float audio pipeline with 64-bit internal for the RP2350 (32-bit fixed point for the RP2040)
  • 5 logical audio channels - 2 Master Inputs, 2 Main Outputs and 1 Subwoofer Output.
  • Parametric EQ with up to 50 slots available (10 per channel).
  • Per-channel gain, mute and delay controls.
  • S/PDIF output to enable the use of any fancy DAC.
  • Clean analog mono subwoofer output that enables direct active subwoofer connection without the need for a second DAC.
  • Loudness compensated volume control with multiple settings that follows the host’s digital volume control and is based upon the Fletcher-Munson equal loudness contours.
  • Permanent saving of all settings to onboard flash storage.
Every single function present within this firmware is fully documented and accessible to anybody wishing to support it in their software.

Which brings me to the second important point. As fancy as the firmware might be (not to toot my own horn), it is worth nothing if one has to be a software developer in order to make use of it. There needs to exist user friendly software that “just works”.

To that end, I have also written a set of very modern, functional and straightforward applications to that talk to the DSPi firmware. The first of these is called DSPi Console.

Let’s take a look at the macOS version first. It follows all established macOS UI conventions, while remaining reasonably information dense.

View attachment 509229
What you see above is the default page that loads when one first launches the application. It is called the Dashboard View and is designed to provide all of the basic information that a user is likely to need, at a glance. The sidebar displays a list of all available channels, as well as a global preamp control and bypass toggle for the Master channel PEQ filters to facilitate rapid A/B comparisons.

View attachment 509230


The System Status section displays CPU utilisation for both of the RP2040/2350’s cores, along with realtime peak meters for all audio channels.


View attachment 509231


The Filter Response graph displays the frequency response of every active PEQ filter on every channel. In the event that two or more channels contain the same filter configuration (such as when using headphone AutoEQ profiles - we’ll get to that) those channels are displayed with a gradient representing their respective legend colors, rather than simply stacking them.

By clicking the pill legends beneath this view, channels can be shown or hidden. By default, all channels are shown.


View attachment 509245


Below is the PEQ dashboard. This displays the content of every PEQ filter slot on every channel, along with their corresponding delay settings.


View attachment 509233


Selecting a channel from the sidebar displays the relevant PEQ slots, gain and delay controls for that channel. It also becomes the only channel active on the graph. Clicking said channel again returns to the dashboard view, with all channels enabled once more.


View attachment 509238View attachment 509234. View attachment 509235. View attachment 509236


Tucked away in the menu bar, we have load/save functionality for filters and settings (REW format supported) and diagnostics but one menu item in particular may have caught your eye.

View attachment 509237
DSPi Console includes full integration with the AutoEQ headphone database. There is a browser with search functionality, as well as support for favourites. Simply choose your headphone, measurement source and the corresponding filters are immediately applied to the Master channels. The headphone database can be updated either automatically via the internet or from a user-provided JSON file.

View attachment 509239

We also have granular control over the loudness compensated volume control. It can be toggled on or off, the listening level can be set and the intensity of the effect can be increased or attenuated to taste. This function is driven by the host's volume control for the USB audio device.



View attachment 509240


The Windows version of DSPi Console was designed to match the macOS version as closely as possible. It is written in C# and makes use of WinUI3. All channel filter settings, delays, gains, metering, AutoEQ functionality and other functions are also present within the Windows version. Loudness compensated volume control will be implemented shortly.

Finally, we have the CLI variant of these applications called DSPi Terminal. This is a compact, terminal-based port of the functionality found within the GUI applications (including AutoEQ) and it is written in Python. Every step of command syntax is autocompleted, so it can be operated easily without requiring the user to know a single command.


View attachment 509241

The firmware itself and DSPi Console (Windows/macOS) are currently available via GitHub and I encourage any interested readers in possession of a Raspberry Pi Pico or Pico 2 to give them a try! Code contributions are always greatly appreciated; I'm just a lone weeb with a robot intern. :P

Anybody interested in helping to fund the continued development of the project is welcome to contribute via the Ko-Fi link found in my signature and on my GitHub profile sidebar.

Links:
- Firmware (Refactor branch; choose latest release)
- DSPi Console (macOS)
- DSPi Console (Windows)
- DSPi Terminal (Soon)

Thank you for reading and I hope somebody out there finds this as exciting as I do! :)
I did a comparable exercise, a RPI 4 listening on the UBS port for audio, CamillaDSP/GUI for the processing IIR & FIR, and USB out to a DAC.
In my example WiiM Ultra -> USB -> RPI (CamillaDSP/GUI) -> USB -> Topping DX9 -> rest of the chain...
 
Yes you are correct thanks for pointing this out. I checked this too before I uploaded, not sure how it happened.

I have corrected the drawing.
My OCD also appreciates that you now show the output pins wired with the GND pins next to them instead of each paired with a GND from the far side of the board.


I have one of these on the way today, which includes the needed passive components (but calls for wiring to VBUS instead of 3V3).
 
looks perfect for a little speaker project i've been toying with, much more approachable than some of the esp32 based solutions I was looking at. Unfortunately I'm not finding any suitable amplifier boards to drop a pico into, does anybody know of one?
 
Last edited:
Success on getting sound as a USB to Toslink adaptor. However, console is saying "No USB device visable to LibUsbDotNet". Perhaps because the device is 1.0.6 and the console is 1.0.5? Let's see if I can program it when the Windows version is out with crossfeed.

RPi DSP.jpg
 
Success on getting sound as a USB to Toslink adaptor. However, console is saying "No USB device visable to LibUsbDotNet". Perhaps because the device is 1.0.6 and the console is 1.0.5? Let's see if I can program it when the Windows version is out with crossfeed.

View attachment 509857
Could you check Device Manager and see if you have a second "Weeb Labs DSPi" device that's missing a driver? If so, I have the solution for you.
 
Yes, I have that device missing a driver in Device Manager.
Looks like we have a regression on the USB descriptors for some reason. I'll have to sort that out.

In the meantime, simply grab this application, launch it and select "Weeb Labs DSPi (Interface 2)" from the dropdown box. Make sure "WinUSB" is selected next to the green arrow and then choose "Install Driver". Give it a few minutes to install.

1770434479622.png



Once installed, everything should be working and you should have two DSPi devices; one under "Sound, video and game controllers" and the other under "Universal Serial Bus devices".

You can then use the DSPi Console application. If it's already running, clicking the reconnect button in the lower left corner should establish a connection to the board.
 
Last edited:
Thanks! :)

A small update before I get some sleep: I have successfully refactored the pico_audio_spdif library (with some help from robo intern), creating a new fork "creatively" named pico_audio_spdif_multi. This fork includes full support for instantiation and enables the creation of as many SPDIF outputs as the hardware can support (theoretically up to 12). Conveniently, all BMCs running on a given PIO block are phase and latency locked as they are driven by exactly the same divider clock.

For the moment, I have simply routed the subwoofer output to a second SPDIF on pin 22 and successfully tested simultaneous output. We now have up to eight functional digital output channels.

I'll commit this tomorrow, once I have had time to investigate edge cases. If everything is satisfactory, then a matrix mixer (2 in, 8 out) is our next stop.
This is crazy good :)

Looks like your project of splitting ADAT into 4 Toslinks/SPIDIFs now is going BANANAZ with a DSP in the middle... With a simple hat-PCB that could be ordered assembled on from a PCB manufacturing service this a kiler product - like MiniDSP used to make only 10x cheaper with Toslinks for more compatibility to TVs, pro-audio, car-audio, you name it :) You should get this at least a bit monetized!
 
Back
Top Bottom