Tutorial has been updated to reflect CamillaDSP V2. I went through fresh installs today following the tutorial and can confirm it works with both Ubuntu Server 22.04 and 23.10.
The change from V1 to V2 is significant. It is important to note that V1 configuration files will not work on V2 due to nomenclature changes. Similarly old version of oled.py and flirc.py will not work on V2 due to nomenclature changes. As a result, if you are going from V1 to V2 I recommend you completely replace all of your services (camilladsp.service, camillagui.service, oled.service and flirc.service) and any scripts in use (flirc.py and oled.py).
If you have an existing V1 configuration that you would like to use in V2, I recommend the following steps.
1) Delete line containing enable_sampling.
2) Delete line contain resampler_type.
3) Delete volume filter from Filters section.
4) Delete any volume filter references from Pipeline section.
5) After making the changes above, load your configuration into the GUI.
6) If you previously had resampling applied use the GUI to re-implement resampling.
7) Save the configuration in the GUI.
These are the steps that I followed to convert the V1 configurations attached to the tutorial to V2.
Michael
Thanks for this. I've now upgraded to CamillaDSP V2 and it's working well. However, I can't get your flirc script to switch input configs via the remote. The other controls work but not switch configs.
This is the output when running the script on the command line. I see the same output in syslog when it's run via the service script.
camilladsp@pi4-lounge:~/camilladsp $ python3 flirc_08302023.py
Traceback (most recent call last):
File "/opt/camilladsp/camilladsp/flirc_08302023.py", line 91, in <module>
main()
File "/opt/camilladsp/camilladsp/flirc_08302023.py", line 66, in main
cdsp.config.set_file_path(newconfig)
UnboundLocalError: local variable 'newconfig' referenced before assignment
Exception ignored in: <function InputDevice.__del__ at 0x7fab2f0e50>
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/evdev/device.py", line 160, in __del__
File "/usr/lib/python3/dist-packages/evdev/device.py", line 305, in close
File "/usr/lib/python3/dist-packages/evdev/eventio_async.py", line 55, in close
File "/usr/lib/python3.9/asyncio/events.py", line 725, in get_event_loop_policy
File "/usr/lib/python3.9/asyncio/events.py", line 718, in _init_event_loop_policy
ImportError: sys.meta_path is None, Python is likely shutting down
I have two config files which I've renamed to begin with "_". I can switch between them when using the shortcuts menu in the CDSP GUI. This is what the statefile looks like after switching between them:
camilladsp@pi4-lounge:~/camilladsp $ cat statefile.yml
---
config_path: /opt/camilladsp/camilladsp/configs/_m4-squeezelite-crossovers.yml
mute:
- false
- false
- false
- false
- false
volume:
- -0.0
- -0.0
- -0.0
- -0.0
- -0.0
camilladsp@pi4-lounge:~/camilladsp $ cat statefile.yml
---
config_path: /opt/camilladsp/camilladsp/configs/_m4-cd-crossovers.yml
mute:
- false
- false
- false
- false
- false
volume:
- -0.0
- -0.0
- -0.0
- -0.0
- -0.0
I've tried to debug it by setting the newconfig variable in various other places in the script, but my Python is not great so I'm pretty much stabbing in the dark at this point. I've also tried using the previous the V2 version of the flirc python script (flirc_08242023.py) that you've posted in this thread but it has the same issue.
Any ideas what the problem might be?
Also, any chance you could add a few comments in the script to give us an idea of what it's doing in places?
NB: I noticed that the flirc device name changed after updating the firmware (yes I updated the flirc script with the correct device name).
Original firmware: /dev/input/by-id/usb-flirc.tv_flirc-if01-event-kbd
Updated firmware: /dev/input/by-id/usb-flirc.tv_flirc_656B97A650583234342E3120FF02140D-if01-event-kbd