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

From the Camilla GUI in Moode there are no errors. You can also error check the config from Moode menus and always showing as valid. Earlier I have found that coding the capture or playback devices can appear valid but still not work. In this case know I have the playback correct and pretty sure the capture is correct also.
I have a source running from my mobile so music should be playing. When connected to quueezelite it shows "paused" when nothing playing rather than offline.
 
Got this from /var/log/syslog as /var/log/mpd/log was always empty, follows restarts and stop starting music:

Code:
Jan 12 15:53:33 moode systemd[1]: /lib/systemd/system/squeezelite.service:8: CPU scheduling priority is out of range, ignoring: 44
Jan 12 15:53:33 moode systemd[1]: /lib/systemd/system/squeezelite.service:8: CPU scheduling priority is out of range, ignoring: 44
Jan 12 15:54:57 moode dhcpcd[563]: eth0: Router Advertisement from fe80::6238:e0ff:fe0b:b3bf
Jan 12 15:56:31 moode python3[1368]: Error handling request
Jan 12 15:56:31 moode python3[1368]: Traceback (most recent call last):
Jan 12 15:56:31 moode python3[1368]:   File "/usr/local/lib/python3.7/dist-packages/aiohttp/web_protocol.py", line 422, in _handle_request
Jan 12 15:56:31 moode python3[1368]:     resp = await self._request_handler(request)
Jan 12 15:56:31 moode python3[1368]:   File "/usr/local/lib/python3.7/dist-packages/aiohttp/web_app.py", line 499, in _handle
Jan 12 15:56:31 moode python3[1368]:     resp = await handler(request)
Jan 12 15:56:31 moode python3[1368]:   File "/opt/camillagui/backend/views.py", line 156, in get_config
Jan 12 15:56:31 moode python3[1368]:     config = cdsp.get_config()
Jan 12 15:56:31 moode python3[1368]:   File "/usr/local/lib/python3.7/dist-packages/camilladsp/camilladsp.py", line 394, in get_config
Jan 12 15:56:31 moode python3[1368]:     config_string = self.get_config_raw()
Jan 12 15:56:31 moode python3[1368]:   File "/usr/local/lib/python3.7/dist-packages/camilladsp/camilladsp.py", line 381, in get_config_raw
Jan 12 15:56:31 moode python3[1368]:     config_string = self._query("GetConfig")
Jan 12 15:56:31 moode python3[1368]:   File "/usr/local/lib/python3.7/dist-packages/camilladsp/camilladsp.py", line 129, in _query
Jan 12 15:56:31 moode python3[1368]:     raise IOError("Not connected to CamillaDSP")
Jan 12 15:56:31 moode python3[1368]: OSError: Not connected to CamillaDSP
Jan 12 15:57:10 moode dhcpcd[563]: eth0: Router Advertisement from fe80::6238:e0ff:fe0b:b3bf
Jan 12 15:59:28 moode dhcpcd[563]: eth0: Router Advertisement from fe80::6238:e0ff:fe0b:b3bf
Jan 12 16:01:17 moode dhcpcd[563]: eth0: Router Advertisement from fe80::6238:e0ff:fe0b:b3bf

This is getting confusing, when I load a different config it seems some of the config does not get loaded and I have to re-edit the devices section in particular. So think I will do a tidy up and maybe offload to my PC in future.
 
Hmm...odd that /var/log/mpd/log is empty, that is where the camilladsp log should dump. I have similar stuff in my syslog so I don't think that is an issue.

I am not sure that Moode is capable of using a physical input device with CamillaDSP. I just tried a known good configuration using the analog input of my MOTU M4 and CamillaDSP just stays as "offline" even though the input meters on the device itself clearly show a signal. I am also experiencing changes to my configuration related to devices so Moode must be doing something weird with that.

Did I mention I dislike Moode? Come to the dark side and run CamillaDSP on its own :).

Michael
 
The dark side is compelling :devilish:

I can find no reference to Moode handling USB device input so maybe thats a no-go.

Remind me what distro you are using on the Rpi please. A flavour of Ubuntu wasnt it?
Moode seemed like the easy way out with squeezelite and the Camilla Gui but I have played around enough with various Linux distros so should be able to cope.
 
i have a kinda strange issue with my moode setup, if i enable camilladsp i get "barely" hearable clicks, if i increase the chunksize it gets better and better (i tried till 32768 so far, and there was with each step (2048, 4096, 8192) also a improvement in sq) the clicks seem to be mostly gone with 32k but this seems very high, is there a way to increase the priority of the camilladsp task to try if that helps? (unfortunaly moode/camilladsp doesnt just use systemd, which would be easy then)

i also had a issue with very obvious dropouts (like 1-2second ones) but im unsure if it just randomly disapeared or if a setting helped i played with

i should say i have a tweaked moode setup, 2 cores are isolated to mdp, with fifo scheduling (and i kinda would like todo the same for camilladsp), rpi4 underclocked and other stuff

i use a rpi4 + topping d10 over usb 2.0 port
 
I run Ubuntu Server 64 bit 21.10. A detailed guide of my CamillaDSP setup can be found here -> https://www.audiosciencereview.com/.../rpi4-camilladsp-tutorial.29656/#post-1038290.

In terms of players I only run squeezlite and shairport-sync but if you have another one in mind we can probably get it to work.

Michael
Success! Took a couple of attempts and a few hours but running the GUI now and using the pipeline I had for the USB input its working and making music.

Still a wee way to get it all set up but going well. I assume I will have to set up a service for squeezelite to get it to autostart? I did find a couple of things in your tutorial (minor and easily bypassed/fixed) so I will let you know about them.

But BIG thank you Michael, I realise the tutorial is the result of hours of your work and documentation, I wouldn't have got this far on my own for sure.

Dark side rules!:ninja:
 
Success! Took a couple of attempts and a few hours but running the GUI now and using the pipeline I had for the USB input its working and making music.

Still a wee way to get it all set up but going well. I assume I will have to set up a service for squeezelite to get it to autostart? I did find a couple of things in your tutorial (minor and easily bypassed/fixed) so I will let you know about them.

But BIG thank you Michael, I realise the tutorial is the result of hours of your work and documentation, I wouldn't have got this far on my own for sure.

Dark side rules!:ninja:

Great to hear! Looking forward to your feedback on the tutorial, I've been refining it over the last few months but am always finding a better way to do it.

Michael
 
My testing had been going well for both squeezelite and USB input to Camilladsp however I now have some strange issues around use of the GUI and applying config changes to the DSP. It was fine at first but then changes didn't seem to stick in that I would hit the Apply button and if I later hit the Fetch button the old config returned. Also a test change I made in the config (like muting a channel) had no effect when applied to the dsp. Results seemed a bit random but now whatever I do it shows a state of "Offline" and no volume bars show. Its almost as if the dsp service isn't there. I did a display of active services (service --status-all) and camilladsp did not show tho I have no idea if thats an issue.

I will probably rebuild the SDCARD from scratch again but thought I should report this in case an issue exists. Version is 1.0.0-alpha5 but I did start getting similar issues using Camilla under Moode which is v0.6.3.
 
When things are weird, check the camilladsp logs!
This is much easier to do if you don't use systemd. Just stop the service, and run camilladsp manually in a terminal. Watch the log messages as you try applying the new configs from the gui.
Use at least debug level, -v, and increase to trace level -vv if you don't see anything useful.
 
Tanks Henrik

Stopped the dsp service and restarted in terminal thus
./camilladsp -v -p5000 configs/USB-input.yml

That gave me music from the USB source, all well with the dsp i guess. Tried using the gui but nothing was logged. It appears to me that the gui is not connecting to the dsp. I tried stopping the gui service, I can still log onto the gui but again seems not connected. Not sure where to from here.
 
Went back to running as service but returned to not working state. So stopped service and started in terminal - working. Then I changed a parm and tried to apply it, got first error message bellow. Then loaded a new config and tried to apply it, got second error.

Code:
2022-01-14 00:44:01.723514 DEBUG [src/alsadevice.rs:413] Capture: setting format to S32LE
2022-01-14 00:44:01.723835 ERROR [src/bin.rs:362] Capture error: ALSA function 'snd_pcm_hw_params_set_format' failed with error 'EINVAL: Invalid argument'
2022-01-14 00:44:01.724061 DEBUG [src/bin.rs:364] Error while starting, release barrier
2022-01-14 00:44:01.728609 DEBUG [src/alsadevice.rs:444] Opening audio device "hw:Device,0" with parameters: HwParams { channels: Ok(2), rate: "Ok(44100) Hz", format: Ok(S16LE), access: Ok(RWInterleaved), period_size: "Ok(256) frames", buffer_size: "Ok(2048) frames" }, SwParams(avail_min: Ok(1024) frames, start_threshold: Ok(768) frames, stop_threshold: Ok(2048) frames)
2022-01-14 00:44:01.728896 DEBUG [src/alsadevice.rs:449] Audio device "hw:Device,0" successfully opened
2022-01-14 00:44:01.729164 DEBUG [src/alsadevice.rs:810] Starting playback loop
2022-01-14 00:44:01.729188 DEBUG [src/bin.rs:367] Wait for playback thread to exit..
2022-01-14 00:44:01.729344 DEBUG [src/processing.rs:21] Processing loop starts now!
2022-01-14 00:44:01.729599 ERROR [src/processing.rs:50] Message channel error: receiving on a closed channel
2022-01-14 00:44:01.741280 DEBUG [src/bin.rs:915] Restarting with new config
2022-01-14 00:44:01.741501 DEBUG [src/bin.rs:857] Wait for config
2022-01-14 00:44:01.741700 DEBUG [src/bin.rs:860] No config and not in wait mode, exiting!

Restarted in terminal and OK at the moment.
 
Code:
  GNU nano 5.6.1                         /lib/systemd/system/camilladsp.service                                 
[Unit]
After=syslog.target
StartLimitIntervalSec=10
StartLimitBurst=10

[Service]
Type=simple
ExecStart=/home/ubuntu/camilladsp/camilladsp -g-40 -p 1234 /home/ubuntu/camilladsp/configs/camilladsp.yml
Restart=always
RestartSec=1
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=camilladsp
User=root
Group=root
CPUSchedulingPolicy=fifo
CPUSchedulingPriority=10

[Install]
WantedBy=graphical.target

Code:
camilla_host: "0.0.0.0"
camilla_port: 1234
port: 5000
config_dir: "~/camilladsp/configs"
coeff_dir: "~/camilladsp/coeffs"
default_config: "~/camilladsp/configs/camilladsp.yml"
active_config: "~/camilladsp/configs/camilladsp.yml"
update_symlink: true
on_set_active_config: null
on_get_active_config: null
supported_capture_types: null
supported_playback_types: null
 
Last edited: