Is anyone aware of a project that configures an RPi5 as an audio gadget that can perform DSP and then output to USB or a directly connected DAC, where the clock is essentially driven by the output?
ie it would look like a USB DAC to upstream (say, a Wiim Ultra) and then be able to run CamillaDSP or plain ALSA filters?
ie it would look like a USB DAC to upstream (say, a Wiim Ultra) and then be able to run CamillaDSP or plain ALSA filters?
PicorePlayer + CDSP insall script - did it yesterday - very easy.
https://github.com/JWahle/piCoreCDSP
more....
Disclaimer: mine was a Pi3....
//
https://github.com/JWahle/piCoreCDSP
more....
I created a shell script, that makes it very easy to install CamillaDSP with GUI and automatic samplerate switching on a piCorePlayer.
Should work on Raspi 2/3/4.
Feel free to try it out at https://github.com/JWahle/piCoreCDSP
Should work on Raspi 2/3/4.
Feel free to try it out at https://github.com/JWahle/piCoreCDSP
Disclaimer: mine was a Pi3....
//
I am planning on doing a 2.2 streamer using piCorePlayer/CDSP, RPI5, McFIFO/McDualXO and two yet to be determined DACs. Like TNT says, the CDSP install is very easy. A link showing the RPI5 pinout: https://diyelectromusic.com/2024/05/27/rpi-5-quad-stereo-sound-with-pcm5102a/
There are several projects on audiosciencereview, excellently described at https://github.com/mdsimon2/RPi-CamillaDSPIs anyone aware of a project that configures an RPi5 as an audio gadget that can perform DSP and then output to USB or a directly connected DAC, where the clock is essentially driven by the output?
That's not really what I'm after - its using a source on the Pi through loopback, as I understand it.PicorePlayer + CDSP insall script - did it yesterday - very easy.
I'm wondering if the Pi can be an audio gadget ie it pretends to be a DAC, does the processing, and then outputs wither to a USB DAC like the Octo, or to a direct attached DAC (I have the 8 channel card).
It's a bit confusing... you want the Pi to be a "DAC" but then you want the Pi to forward data to ... a "DAC"... please clarify.
What you quoted in your replay satisfies what you say below "what you are after" - its the same thing. The PI will be a DSP processor and the output to an USB out on the Pi.
//
What you quoted in your replay satisfies what you say below "what you are after" - its the same thing. The PI will be a DSP processor and the output to an USB out on the Pi.
//
It's described in detail on that github link, specifically https://github.com/mdsimon2/RPi-CamillaDSP?tab=readme-ov-file#8-enable-usb-gadget-optional . Another project is e.g. https://github.com/marcoevang/camilladsp-setrateI'm wondering if the Pi can be an audio gadget ie it pretends to be a DAC
Yes, I want the Pi to appear to be a DAC, and to be able to do arbitrary DSP, and then forward on the output to a DAC. What's not to understand?It's a bit confusing... you want the Pi to be a "DAC" but then you want the Pi to forward data to ... a "DAC"... please clarify.
What you quoted in your replay satisfies what you say below "what you are after" - its the same thing. The PI will be a DSP processor and the output to an USB out on the Pi.
//
It means that something like a Wiim streamer can be hooked up to an active crossover - essentially using the Pi like a miniDSP Flex8, albeit with camilladsp or the ALSA plugins. Even with a stereo DAC downstream, it would allow EQ.
Because pCP is a source, and while I'm aware that Pi5 can be an audio gadget, I was wondering if there are any existing projects that provide the glue between the gadget endpoint event handlers, and the input to CDSP. Just so I can avoid reinventing a wheel.So what do you write above "That's not really what I'm after"?
I already have CDSP running on Linux (although not currently on a Pi) and I'm quite happy hacking/building rust and Python programs.
Reach out to @TerryForsythe either here or on ASR, he was using a Wiim Ultra with a RPi as a USB gadget.
Unfortunately, I believe he ran into some issues using camilladsp-setrate after recent updates to the Wiim. It sounds like it worked if the CamillaDSP sample rate was fixed (this is the approach in my tutorial), see this post for more info -> https://www.audiosciencereview.com/...h-usb-out-on-the-wiim-ultra.58834/post-215420.
Michael
Unfortunately, I believe he ran into some issues using camilladsp-setrate after recent updates to the Wiim. It sounds like it worked if the CamillaDSP sample rate was fixed (this is the approach in my tutorial), see this post for more info -> https://www.audiosciencereview.com/...h-usb-out-on-the-wiim-ultra.58834/post-215420.
Michael
That makes sense, I wouldn't have supported a bit depth or sample-rate negotiation at both ends of the audio chain, but I note that @phofman claimed good results by always rate upsampling and that modern CPUs can do it quite effectively without becoming bogged down, so I'd expected to fix the output side and either fix the input to the same, or do the resampling in the gadget handler to match.
I'm not fixated on using the Wiim, though I did buy one in the recent sales, its more that I feel it could be done, and might be interesting - it would mean an arbitrary source that can send to USB would be an upstream. PC, Mac, streamer - whatever. And I suspect that the CPU/GPU in a Pi5 could do a bit more FIR than the Flex8, which I might yet get for a play. Not sure I'm ready to drop the cash on an Octo yet.
On the other hand, a parametric speaker cab spec to a layered DXF I can send to a local CNC shop might have priority, given how many speaker drivers in boxes I can see from where I'm sitting. Money rich, time poor - I should retire.
I'm not fixated on using the Wiim, though I did buy one in the recent sales, its more that I feel it could be done, and might be interesting - it would mean an arbitrary source that can send to USB would be an upstream. PC, Mac, streamer - whatever. And I suspect that the CPU/GPU in a Pi5 could do a bit more FIR than the Flex8, which I might yet get for a play. Not sure I'm ready to drop the cash on an Octo yet.
On the other hand, a parametric speaker cab spec to a layered DXF I can send to a local CNC shop might have priority, given how many speaker drivers in boxes I can see from where I'm sitting. Money rich, time poor - I should retire.
For an alternative you might take a look at the Teensy 4.x line of "arduino" boards. It's got an Arm CPU running at 600MHz and has built-in DSP processing capabilities. There also is an online graphical design tool that allows you to create filters etc. It generates the audio-specific C++ code for you.
In addition, its USB interface can be configured so it looks like an external USB sound card to the PC.
The Teensy boards have a very active forum with quite a few members that are knowledgeable regarding digital audio, in case you get stuck.
In addition to audio applications I've followed some threads regarding its use to implement an SDR, software-defined radio. It uses FFTs and IFTs to implement the baseband filtering in realtime.
In addition, its USB interface can be configured so it looks like an external USB sound card to the PC.
The Teensy boards have a very active forum with quite a few members that are knowledgeable regarding digital audio, in case you get stuck.
In addition to audio applications I've followed some threads regarding its use to implement an SDR, software-defined radio. It uses FFTs and IFTs to implement the baseband filtering in realtime.
Another nice inexpensive UAC2-gadget project is https://www.audiosciencereview.com/...ualizer-between-usb-source-and-usb-dac.53750/
Just have to chip in on more FIR.And I suspect that the CPU/GPU in a Pi5 could do a bit more FIR than the Flex8
One of the very nice things with camilla is the code to resample syncronous with low CPU usage and do linear phase filtering + possibility to join streams.
The needed bandwith for a FIR filter can be optimised so it is seldom needed to do the FIR filtering at high sample rate.
So even a ADAU 145x can do really complex FIR filtering at low frequency if downsamling are employed.
Who really need long FIR filter above 20k? 😉
Above 20k can still be filtered of cource but often just a short FIR filter is needed.
For multiway speaker filtering the filtering of each band can be done at needed samplerate for that band. Then upsamle for the dacs.
So Pi5 is actually never really needed for audio FIR if multirate filtering is employed.
- Home
- Source & Line
- Digital Line Level
- RPi5 USB audio gadget as DSP?