CamillaDSP - Cross-platform IIR and FIR engine for crossovers, room correction etc

It appears that my main problem was that the descriptions I found on the internet were for older versions of REW. I had to do a lot of futzing around to get all the moving parts working together. It IS necessary to use the "EQ" applications so REW will actually save an FIR file in wav format. I also found that just because I specified a L + R measurement sequence doesn't mean that REW automatically processes both channels, it's necessary to process both of them. If you process just one and then Export the filtered FIR as a wav, it just outputs data for one --- but doesn't tell you that. You also need to tell REW to output a stereo wav file.

So at this point I can process and play 48KSPS audio from my phono preamp, and 44.1KSPS WAV files that have been extracted from CD-A disks. I think I can use VLC to turn an external optical drive into a CD player by fooling around with VLC's audio Preferences. Probably with a loopback device. We shall see...
 
Equalize my speakers. Do it using convolution with two ir filters (L and R) generated by REW, in WAV format.
You may have already sorted this, but just in case - to my knowledge, Filters in Camilla are all single channel (although a Pipeline filter step can be applied to more than 1 channel - see screenshot below for example).

1746345436603.png


What this means is (assuming in both Camilla and REW L=0 and R=1), you'll need a Pipeline filter step set to channel 0 containing a Filter with the wav set to channel 0, and a Pipeline filter step set to channel 1 containing a Filter with the wav set to channel 1.
 
  • Like
Reactions: HenrikEnquist
Yes, that's exactly how my pipeline(s) are set up. Although I didn't use the GUI to do it, I just directly edited the yml file.

The issue was not the pipeline. I wanted a single wav file that contains the filter data for both channels. That is permitted. It wasn't a problem with camilladsp, it was learning how to get REW to generate it.
 
  • Like
Reactions: fb
I have Raspberry Pi 5 Camilla installed as per MDSimon Github, plus HifiBerry DAC8x. Camilla works fine when playing files from an app (eg Strawberry).
I'm running into problems I can't seem to fix playing audio from browser (Firefox & Chromium - eg Spotify/BBC radio).
Audio plays fine directly through the DAC8x
I'm working now from a fresh install.
Here's the seemingly relevant part from the log after clicking play on in the browser...

2025-05-10 13:10:11.318572 DEBUG [src/alsadevice_utils.rs:406] Event from numid 60
2025-05-10 13:10:11.318628 DEBUG [src/alsadevice_utils.rs:406] Event from numid 61
2025-05-10 13:10:11.318633 DEBUG [src/alsadevice_utils.rs:406] Event from numid 59
2025-05-10 13:10:11.318653 DEBUG [src/alsadevice_utils.rs:466] Loopback active: Some(true)
2025-05-10 13:10:11.318681 WARN [src/alsadevice.rs:351] Capture failed, error: ALSA function 'snd_pcm_readi' failed with error 'Unknown errno (77)'
2025-05-10 13:10:11.318726 ERROR [src/bin.rs:314] Capture error: ALSA function 'snd_pcm_readi' failed with error 'Unknown errno (77)'
2025-05-10 13:10:11.318735 DEBUG [src/processing.rs:173] Processing thread returned to normal priority.

Any advice on how to proceed from here?
 
Last edited:
Thank you for taking the time to look at this.
At this point I should make it clear that I haven't touched any configuration files as yet. I was previously unable to make any headway with them.
This is just the Raspberry Pi OS install with Camilla and drivers for the DAC8x, a new install.
Raspberry Pi OS now comes with Pipewire, I think this is relatively new...

pactl info
Server String: /run/user/1000/pulse/native
Library Protocol Version: 35
Server Protocol Version: 35
Is Local: yes
Client Index: 461
Tile Size: 65472
User Name: ******
Host Name: MEDIAPI
Server Name: PulseAudio (on PipeWire 1.2.7)
Server Version: 15.0.0
Default Sample Specification: float32le 2ch 48000Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.platform-snd_aloop.0.pro-output-0
Default Source: alsa_input.platform-snd_aloop.0.pro-input-0
Cookie: a2d4:bab8

Doubt it's actually much use but this is screenshot of qpwgraph representation of pipewire nodes with firefox playing. I think it illustrates that Firefox is outputting to pipewire. I don't think it's actually possible to get Firefox or Chromium to output directly to ALSA?

(other questions will be answered shortly)
 

Attachments

  • Screenshot From 2025-05-10 18-51-49.png
    Screenshot From 2025-05-10 18-51-49.png
    486.1 KB · Views: 20
Last edited:
Addled,
Are you running the browser on the same RPi as CamillaDSP and the DAC8x ? If so, then sudo raspi-config, advanced options allows you to enable pipewire, then refer to https://henquist.github.io/0.6.3/#pipewire which is as far as I have gone at this stage.

I too have Raspberry Pi 5 Camilla installed as per MDSimon Github, plus HifiBerry DAC8x attached to the back of a 10.1 inch screen and run the Min browser and Jivelite. Being able to play the browser audio through CamillaDSP has been a thought bubble for a while.
 
  • Like
Reactions: Addled
I am using Camilladsp under Linux ALSA with an RME ADI-2 Pro fs r. I have no problem getting a stream from the analog inputs of the ADI-2 into camilla for convolution, then back out to the output device. However, I would also like to be able to have a configuration that picks up the spdif digital input to do the same. The spdif inputs are supposed to be on input channels 5 and 6. I have the device in class compliant multichannel mode, but arecord -l doesn't list any additional recording sub devices.

I am wondering if anyone has been able to get the ADI-2 Pro spdif input to work under Linux. I have no problem getting this to work under Windows using other convolver software, but I would really like to get this working under Linux for use on a Raspberry Pi.

Thanks
 
Henrik,
I have CamillaDSP on an RPi 5b running Squeezelite streamer with ALSA as capture device hw:Loopback,0,0 . Now, I want to build a config to run pipewire.

Reading your instructions in https://github.com/HEnquist/camilladsp-config/blob/master/README.md, I see that for pipewire you set up api.alsa.path = "hw:Loopback,0,0" . Can I set up a different path for the capture device so that I can have my existing "Stream in" config to play from Squeezelite and then just load a "Pipe in" config if I want to play music from a browser via pipewire?



I have enabled pipewire on my RP15b , here is the pactl output

Code:
camilla@RPi5b-10inch-94:~ $ pactl info
Server String: /run/user/1000/pulse/native
Library Protocol Version: 35
Server Protocol Version: 35
Is Local: yes
Client Index: 91
Tile Size: 65472
User Name: camilla
Host Name: RPi5b-10inch-94
Server Name: PulseAudio (on PipeWire 1.2.7)
Server Version: 15.0.0
Default Sample Specification: float32le 2ch 48000Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.platform-snd_aloop.0.analog-stereo
Default Source: alsa_input.platform-snd_aloop.0.analog-stereo
Cookie: ee4d:c8a1
camilla@RPi5b-10inch-94:~ $

The default is now 48000Hz.
 
Error 77 means bad file descriptor. I haven't seen that error before.
Do you have pulse or pipewire, or do you let the browser play directly to the loopback with plain Alsa?

What happens if you record from the loopback with arecord instead of camilladsp?
Couldn't answer yesterday because family using tv and audio equipment but yes, browser>loopback>DAC8x produces audio.
Pictorially, this works.
 

Attachments

  • Screenshot From 2025-05-11 09-15-51.png
    Screenshot From 2025-05-11 09-15-51.png
    339.6 KB · Views: 10
Last edited:
Addled,
Are you running the browser on the same RPi as CamillaDSP and the DAC8x ? If so, then sudo raspi-config, advanced options allows you to enable pipewire, then refer to https://henquist.github.io/0.6.3/#pipewire which is as far as I have gone at this stage.

I too have Raspberry Pi 5 Camilla installed as per MDSimon Github, plus HifiBerry DAC8x attached to the back of a 10.1 inch screen and run the Min browser and Jivelite. Being able to play the browser audio through CamillaDSP has been a thought bubble for a while.
Pipewire is enabled by default. I tried the configuration you referred to but that just resulted in no audio at all on the Pi.
Honestly, I really suspect the solution is here but either I just made errors I couldn't find or the pace of Pipewire development has made some of the configurations here obsolete. I'm finding it impossible to find any usable info for user configuration of Pipewire, which doesn't help one little bit.
 
Last edited:
The spdif inputs are supposed to be on input channels 5 and 6. I have the device in class compliant multichannel mode, but arecord -l doesn't list any additional recording sub devices.
Perhaps those channels 5&6 are part of the multichannel capture device? If so, no extra subdevices would be needed. arecord --dump-hw-params would tell more about the capture capabilities of your soundcard.
 
  • Like
Reactions: aljordan
Equalize my speakers. Do it using convolution with two ir filters (L and R) generated by REW, in WAV format.
The simplest way and the way to get control is to generate a mono .vaw file per channel, call them something L resp. R, add them to CDSP and configure them in the correct place in the pipeline. Both will use wav file ch=0 but the pipeline will be clear wrt. to which L/R channel a certain file will effect.

//
 
Couldn't answer yesterday because family using tv and audio equipment but yes, browser>loopback>DAC8x produces audio.
Pictorially, this works.
That's not what I meant. Can you try running everything the same as when camilladsp failed when playing sound from the browser, but instead of running camilladsp, just use the "arecord" command line tool to capture sound from the same device that camilladsp would. I want to see if that fails with the same error 77.
 
Thank you. Yes, the device shows 6 input channels. If I specify that the capture device has 6 channels in the config, I get an error because the pipeline wants to send 6 channels of output. Is there a way to specify capture channels 4 and 5 instead of 0 and 1?
You just need to insert a mixer with 6 input channels and 2 output channels. Map 4->0, and 5->1, and don't do anything with inputs 0-3.
 
  • Like
Reactions: aljordan