The goal of this project is to provide an easy way to install CamillaDSP 2.0.3 including GUI and automatic samplerate switching on a piCorePlayer installation.
- a fresh piCorePlayer 9.2.0 installation without any modifications
- on an armv7 or arch64 compatible device
- Increase piCorePlayer SD Card size to at least 200MB via
Main Page > Additional functions > Resize FS
- Run
install_cdsp.sh
on piCorePlayer from a terminal:- SSH onto the piCorePlayer as user
tc
- Usually
ssh tc@pcp.local
orssh tc@<IP of your piCorePlayer>
- How to find the IP address of your piCorePlayer
- Usually
- Run
wget https://github.com/JWahle/piCoreCDSP/raw/main/install_cdsp.sh && chmod u+x install_cdsp.sh && ./install_cdsp.sh
- Or if you want to run a modified version of the script or an older version, see the For developers and tinkerers section
- SSH onto the piCorePlayer as user
- Open CamillaGUI in the browser:
- It will be running on port 5000 of piCorePlayer.
Usually can be opened via pcp.local:5000 or<IP of your piCorePlayer>:5000
- Under
Playback device
enter the settings for your DAC (by default, the Raspi headphone output is used)- These HAVE TO BE CORRECT, otherwise CamillaDSP and Squeezelite won't start!
device
: The Alsa device name of the DAC- A list of available devices can be found in
Squeezelite settings > Output setting
- If you know the
sampleformat
for your DAC or want to find it through trial and error, then choose a device withhw:
prefix. Otherwise, use one withplughw:
prefix.
- A list of available devices can be found in
channels
: a supported channel count for the DAC
Usually 2 for a stereo DAC.sampleformat
: a supported sample format for the DAC. (Only important, when NOT using aplughw:
device)
- These HAVE TO BE CORRECT, otherwise CamillaDSP and Squeezelite won't start!
- Hit
Apply and save
- You should see channel meters and
State: RUNNING
on the left - If things go wrong, check the CamillaDSP log file via the
Show log file
button for more info. After changing the settings, go to the pCPMain Page
and pressRestart
to restart Squeezelite. If the settings are correct, the channel meters andState: RUNNING
on the left side should be visible in CamillaGUI.
- You should see channel meters and
- It will be running on port 5000 of piCorePlayer.
Check, your system meets all the requirements, reboot and try to install again.
Sometimes, the script's dependencies get corrupted while downloading.
In that case, you'll see messages like this somewhere in the log:
Checking MD5 of: openssl.tcz.....FAIL
There are a couple of things, you can try to work around this:
- reboot and try to install again, repeat until successful
- You can try to switch the extension repo:
- Reboot, then go to Main Page > Extensions > wait for the check to complete (until you see 5 green check marks)
- Then go to Available > Current repository > select "piCorePlayer mirror repository" and "Set".
- Run the script again.
If the error persists, post the error message on the piCoreCDSP Thread on diyaudio.com or slimdevices.com.
I don't recommend trying to update, because it generally is not straight forward and involves some troubleshooting. Just do a fresh install and enjoy life.
SSH onto the piCorePlayer and enter the following commands depending on what you want to uninstall.
If you want to uninstall without setting up piCorePlayer again,
you have to reconfigure your audio output device in the pCP UI.
Then uninstall the piCoreCDSP Extension
(In Main Page > Extensions > Installed >
select piCoreCDSP.tcz
, press Delete
)
and reboot.
rm -f /home/tc/install_cdsp.sh
Remove the pcm.camilladsp
entry from /etc/asound.conf
.
This is easy to do with the Nano text editor:
tce-load -wil -t /tmp nano
nano /etc/asound.conf
rm -rf /etc/sysconfig/tcedir/camilladsp/
If you just restart, some changes will not be persistent. To make all your changes persistent, run:
pcp backup
The install_cdsp.sh
script downloads the following projects including dependencies
and installs them with convenient default settings:
- https://github.com/spfenwick/alsa_cdsp.git (forked from https://github.com/scripple/alsa_cdsp)
- https://github.com/HEnquist/camilladsp
- https://github.com/HEnquist/camillagui-backend
graph TD;
A(Audio Source<br>SqueezeLite/AirPlay/Bluetooth) -- Opens audio stream --> B(CamillaDSP Alsa Plugin);
B -- Starts and then sends audio to stdin of CamillaDSP.<br>This will show the green meters in CamillaGUI. --> C(CamillaDSP);
C --> O(Audio output<br>Configured in your CDSP config);
In this section it is assumed, that your piCorePlayer is available on pcp.local.
If this is not the case, replace occurrences of pcp.local
with the IP-address/hostname of your piCorePlayer.
If you made some changes to the installation script on your local machine and want to run it quickly on the piCorePlayer, run the following command from the location of the script:
scp install_cdsp.sh tc@pcp.local:~ && ssh tc@pcp.local "./install_cdsp.sh"
You can run python scripts requiring pycamilladsp
or pycamilladsp-plot
like this:
- Copy your script from your local machine to pCP:
scp <your_script> tc@pcp.local:~
- In
Tweaks > User Commands
set one of the commands to this:
sudo -u tc sh -c 'source /usr/local/camillagui/environment/bin/activate; python3 /home/tc/<your_script>'
- Save and reboot
If you need to access files in your script, make sure to use absolute paths.
You can run CamillaDSP standalone. This might be useful, if you want to capture audio from some audio device. Although, in this case you won't be able to use any of the Squeezelite/airPlay/Bluetooth audio sources.
- Go to
Tweaks > Audio Tweaks
and setSqueezelite
tono
. - Then go to
Tweaks > User commands
and set one of the commands to
sudo -u tc sh -c '/usr/local/camilladsp -p 1234 -a 0.0.0.0 -o /tmp/camilladsp.log --statefile /mnt/mmcblk0p2/tce/camilladsp/camilladsp_statefile.yml'
or if you want a fixed volume of e.g. -30dB, use this command:
sudo -u tc sh -c '/usr/local/camilladsp -p 1234 -a 0.0.0.0 -o /tmp/camilladsp.log --statefile /mnt/mmcblk0p2/tce/camilladsp/camilladsp_statefile.yml -g-30'
- Save and reboot