• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. 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!

RPi + CamillaDSP Tutorial

In the end I decided to go with the tried and true: Motu Ultralite Mk5 it is.
Not going to argue with your reasoning at all, but for the record - the Okto works well using non Windows operating systems.

Best of luck to you @Daverz, I have been thinking of getting a MK5 for the inputs (for things like measurements and room EQ). The Ultralite beats the Okto in that department hands down.
 
Not going to argue with your reasoning at all, but for the record - the Okto works well using non Windows operating systems.

Best of luck to you @Daverz, I have been thinking of getting a MK5 for the inputs (for things like measurements and room EQ). The Ultralite beats the Okto in that department hands down.

It would certainly look much more "high end", and having built in master volume and remote control is really convenient. However I already put together a display, remote, and the software to control CamillaDSP digital volume for my previous RPi 4 + Motu 4 system.

Also, I'm using Acourate for room correction, and it needs the DAC and ADC in the same box for measurements (it can be done one channel at a time with the Motu 4, but it's awkward and involves rewiring things each time.) So the Ultralite has everything needed.

The system this will work with is a pair of NHT Xds crossover-less satellites (purchased 2008!) and a pair of SVS 1000 Pro subs.
 
I'm having trouble getting the ultralitemk5_streamer_44c_44p.yml config working at all on Bookworm (loading the file and then applying to the DSP in the web interface). This is a previous Camilla setup following mdsimon's instructions for an M4.

Log message is

2024-08-01 18:48:28.614519 WARN [src/alsadevice.rs:281] Capture device failed while waiting for available frames, error: ALSA function 'snd_pcm_wait' failed with error 'EPIPE: Broken pipe'
2024-08-01 18:48:28.614610 ERROR [src/bin.rs:307] Capture error: ALSA function 'snd_pcm_wait' failed with error 'EPIPE: Broken pipe'
2024-08-01 18:51:21.686606 ERROR [src/bin.rs:307] Capture error: ALSA function 'snd_pcm_hw_params_set_rate' failed with error 'EINVAL: Invalid argument'
2024-08-01 18:51:21.686687 ERROR [src/processing.rs:50] Message channel error: receiving on a closed channel

Ultralite rate is set to 44100.

Squeezelite settings are

SL_SOUNDCARD="hw:Loopback,1"
SB_EXTRA_ARGS="-W -C 5 -r 41000-41000 -R hLE:::28"

Oddly, if I try it with everything ( set to a sample rate of 48000, I get playback, but the capture rate is set to 16000.
 
I'm having trouble getting the ultralitemk5_streamer_44c_44p.yml config working at all on Bookworm (loading the file and then applying to the DSP in the web interface). This is a previous Camilla setup following mdsimon's instructions for an M4.

Log message is

2024-08-01 18:48:28.614519 WARN [src/alsadevice.rs:281] Capture device failed while waiting for available frames, error: ALSA function 'snd_pcm_wait' failed with error 'EPIPE: Broken pipe'
2024-08-01 18:48:28.614610 ERROR [src/bin.rs:307] Capture error: ALSA function 'snd_pcm_wait' failed with error 'EPIPE: Broken pipe'
2024-08-01 18:51:21.686606 ERROR [src/bin.rs:307] Capture error: ALSA function 'snd_pcm_hw_params_set_rate' failed with error 'EINVAL: Invalid argument'
2024-08-01 18:51:21.686687 ERROR [src/processing.rs:50] Message channel error: receiving on a closed channel

Ultralite rate is set to 44100.

Squeezelite settings are

SL_SOUNDCARD="hw:Loopback,1"
SB_EXTRA_ARGS="-W -C 5 -r 41000-41000 -R hLE:::28"

Oddly, if I try it with everything ( set to a sample rate of 48000, I get playback, but the capture rate is set to 16000.

Sorry about that, I had an error in that configuration. It should be chunk size 256 and target level 511 but was 64 / 127. I've uploaded a corrected version to GitHub. Otherwise you can just make that change manually and it should be OK.

I also checked all the other streamer configurations and this was the only one with that error. Doh!

Michael
 
Sorry about that, I had an error in that configuration. It should be chunk size 256 and target level 511 but was 64 / 127. I've uploaded a corrected version to GitHub. Otherwise you can just make that change manually and it should be OK.

I also checked all the other streamer configurations and this was the only one with that error. Doh!

Michael
Thanks! Good to know for future reference. So it seems if the chunksize and target_level are too low it tries to choose a sample rate to keep up (which would be 48000->16000 for capture_rate=48000), and if the sample rate it tries to switch to is not available it fails. Is there a rule of thumb for the different capture/processing rates, or did you work it out by trial and error?
 
So it seems if the chunksize and target_level are too low it tries to choose a sample rate to keep up (which would be 48000->16000 for capture_rate=48000), and if the sample rate it tries to switch to is not available it fails.
IMO the CDSP source code has no such functionality. But it opens the capture device at a rate which the device reports as available. The first process/side which opens the alsa loopback device sets the samplerate and then the other side has only this rate available. Could perhaps squeezelite open the loopback at 16kHz instead?
 
Thanks! Good to know for future reference. So it seems if the chunksize and target_level are too low it tries to choose a sample rate to keep up (which would be 48000->16000 for capture_rate=48000), and if the sample rate it tries to switch to is not available it fails. Is there a rule of thumb for the different capture/processing rates, or did you work it out by trial and error?

I worked out the minimum chunk size via trial and error, the tutorial now contains some discussion about it -> https://github.com/mdsimon2/RPi-CamillaDSP/tree/main?tab=readme-ov-file#chunksize--target_level.

My two typical CamillaDSP setups (Okto and MOTU UL Mk5) run at 48 kHz and are clocked via SPDIF. I kept reducing chunk size until I ran into issues. The Okto seems OK with 32 but the Ultralite Mk5 had some hiccups, so I increased to 64 and ran like this for a long time to confirm stability. Part of what caught me out is that using an ALSA loopback or USB gadget as capture device requires 4x the chunk size of a physical input configuration (SPDIF, analog, etc), but I am not sure why.

Michael
 
Hi

Is there any setting I could change so that channel count starts with "1" instead of "0"? My home cinema system is based on Dante and there channel count starts with 1. So this is sometimes confusing while experimenting..
 
Seems labels are available in a later version only. If I update: will my settings remain? Or again starting from scratch? With a home cinema System with 20 channels that would be quite some effort ;-)
 
If I update: will my settings remain? Or again starting from scratch?
There are some breaking changes so the old config needs to be converted. You will be able to do that in the gui with the import function.
 
I update everything as described in the github tutorial. However I cannot see the "label" fields. Anything to activate?
 
I update everything as described in the github tutorial. However I cannot see the "label" fields. Anything to activate?

Labels will not be available until V3.0.0 is officially released, the tutorial is based on the most recent V2.0.3 official release.

You could attempt to compile from the next30 branch and use updated versions of the GUI, pycamilladsp and pycamilladsp-plot, but I would only attempt to do this if you really know what you are doing.


Michael
 
Hi guys,

In the last few days I tried to build a bluetooth receiver for my car, which should have the additional feature of EQing all audio before the D/A conversion. I had a Raspberry Pi Zero 2W lying around + used some basic USB DAC ("Sharkoon Gaming DAC V2") and a separate USB Bluetooth dongle from TP-Link.
My first attempt relied on basic Raspbian, where I manually configured pulseaudio + bluez to pass-through Bluetooth Audio. While this part worked for a couple of seconds (followed by severe drop outs), I failed setting up a DSP / EQ.

Then I remembered that Moode should be able to handle all of these points (using CamillaDSP). With Moode I now have a functional Bluetooth receiver (I had to turn down SBC bitrate to 237 kbps in the bluetooth settings to avoid drop outs), but CamillaDSP doesn't seem to touch any audio coming in via Bluetooth. When streaming some radio station, CDSP works most of the time, but as soon as I switch to Bluetooth audio, CDSP just doesn't do anything. That is, the GUI is still functional, state is "RUNNING", gui shows the signal coming in and going out, but a simple "peaking" filter at 1kHz with +15dB of gain (just something I would notice immediately) doesn't do anything.
Also, CDSP randomly seems to jump to "offline" independent of the audio source.

Running CDSP 2.0.1 with pyCDSP and the backend at version 2.0.0.

Can you perhaps name some settings I should check? I could also post all of my configuration if I'd know which parts are relevant.
If there's a working tutorial which describes how to set up such a configuration without Moode, I'd thankfully take it as well.
Happy for any help.

Thanks! MM.
 
Hi guys,

In the last few days I tried to build a bluetooth receiver for my car, which should have the additional feature of EQing all audio before the D/A conversion. I had a Raspberry Pi Zero 2W lying around + used some basic USB DAC ("Sharkoon Gaming DAC V2") and a separate USB Bluetooth dongle from TP-Link.
My first attempt relied on basic Raspbian, where I manually configured pulseaudio + bluez to pass-through Bluetooth Audio. While this part worked for a couple of seconds (followed by severe drop outs), I failed setting up a DSP / EQ.

Then I remembered that Moode should be able to handle all of these points (using CamillaDSP). With Moode I now have a functional Bluetooth receiver (I had to turn down SBC bitrate to 237 kbps in the bluetooth settings to avoid drop outs), but CamillaDSP doesn't seem to touch any audio coming in via Bluetooth. When streaming some radio station, CDSP works most of the time, but as soon as I switch to Bluetooth audio, CDSP just doesn't do anything. That is, the GUI is still functional, state is "RUNNING", gui shows the signal coming in and going out, but a simple "peaking" filter at 1kHz with +15dB of gain (just something I would notice immediately) doesn't do anything.
Also, CDSP randomly seems to jump to "offline" independent of the audio source.

Running CDSP 2.0.1 with pyCDSP and the backend at version 2.0.0.

Can you perhaps name some settings I should check? I could also post all of my configuration if I'd know which parts are relevant.
If there's a working tutorial which describes how to set up such a configuration without Moode, I'd thankfully take it as well.
Happy for any help.

Thanks! MM.

It may be best to ask on the Moode forum directly as I am not very familiar with the latest state of CamillaDSP on Moode. I believe Moode still requires some additional configuration to route external inputs through CamillaDSP but I would have thought bluetooth would be OK. See here for some info on setting up Moode and external inputs -> https://www.bitlab.nl/page_id=tag/camilladsp.

It is possible to use bluez-alsa with the standalone approach described in my tutorial. Previously I had included instructions on doing this but I removed them when I moved to GitHub as it didn't seem like anyone was using it. An old copy of the tutorial with bluez-alsa instructions can be downloaded here -> https://drive.google.com/file/d/1SS70Ra2lkjtfXbIT7be4-WIjYCXNgC9c/view?usp=share_link, open the word document and go to "Install bluez-alsa" section. The basic approach is similar to squeezelite and shairport-sync, but in this case a service is setup such that bluealsa-aplay plays to an alsa loopback. You would use a streamer CamillaDSP configuration that uses the other side of the alsa loopback as a capture device.

Good luck!

Michael
 
Thanks a lot for your answer! I had already found your original bluez-alsa instructions in this thread as someone did a full quote on your original post. Didn't try them out yet, but on first glance they seemed not that different from what I tried. Might give them a go still if Moode won't work, but I'd currently prefer a Moode setup.

From what I've been reading, I also thought it shouldn't be a problem to route Bluetooth-In through CDSP to an output with Moode, it's supposed to work out of the box. It might also just be me having overlooked some setting in CDSP, as the audio apparently actually goes through CDSP (see screenshot attached):
- CDSP shows input and output levels on the left-hand side
- the volume slider + mute/dim button there work just fine!
- however any change I do on the Filters / Mixers tabs (e.g. the described EQ filter or muting one of the two channels in the mixer) has no effect.

I think, based on that the levels are showing and audio is playing, that my in/output config is correct (especially unsure about Stdin), but could you maybe confirm that this should work?

(Asking here again as I hope it's just a CDSP config issue and has nothing to do with Moode)
 

Attachments

  • 1723283487790.png
    1723283487790.png
    316.3 KB · Views: 39
  • 1723284090541.png
    1723284090541.png
    267.6 KB · Views: 39
  • 1723284188448.png
    1723284188448.png
    227.1 KB · Views: 36
Back
Top Bottom