CamillaDSP 2 for piCorePlayer 9

This is the support thread for a project I've published at
https://github.com/charleski/Camilladsp-for-pCP9

This includes a CamillaDSP GUI that functions with scripple's automatic samplerate-changer and the whole thing is done the 'tinycore way', with all the components running in RAM, rather than leaving part of it on a static partition. The installation has been designed to be as simple as possible, needing little more than copying and pasting commands into a SSH terminal, apart from a little bit of editing to specify the correct output card. If there's interest I might try to simplify that part further at a later date.

I've tested it on a fresh install of pCP9, but can only test with a USB DAC. If anyone runs into problems please let me know here, and I'd particularly like to know if it works with 'hat' DACs.
 
  • Like
Reactions: 2 users
Hey charlesky, thanks for this project and the straightforward instructions. With them I've been able to install CamilaDSP on my Raspberry Pi Zero 2W and get it working with the S.M.S.L SU-1 USB DAC.

The only problem I have now is that Squeezelite won't automatically start running at boot. It did before the installation of CamillaDSP, but now it won't, even though the autostart setting is set to ' Yes'. Do you know what could have happened here? I've been looking at the logs on the diagnostics page, but it has not been very helpful.

Thanks!
 
Do you need to press the ‘Restart Squeezelite’ button to get it working?
Can you go to the Squeezelite settings page and change the log level to ‘all=debug’. Then click save. Then reboot your Raspberry Pi. When it comes back up, go to the diagnostics page and click on the logs tab. Select the squeezelite log and there will be a button to upload it to pastebin, click that and post the link here. That might help me see what’s going wrong.
 
Thanks for the quick response!
Here's the link to the Squeezelite-log, but this is from when I restarted manually using the 'Restart' button: https://pastebin.com/y7BRiW5g
When I reboot the Pi no log for squeezelite is created, probably because the Squeezelite command is never given? I've tried to run the squeezelite command, as generated on the Settings page, manually from the command line and this works, both Squeezelite and CamillaDSP start running, no problem.

Btw: CamillaDSP is automatically started after booting!
 
Last edited:
Ok, I think I might see the problem. Your bootlocal.sh still has the tee command. I'm not sure why, but this was causing odd problems for many people running Lykkedk's old installation, which is why I changed the command.

In bootlocal.sh the line
Code:
/usr/local/etc/init.d/pcp_startup.sh >> /var/log/pcp_boot.log 2>&1 | tee -a /var/log/pcp_boot.log
should just be
Code:
/usr/local/etc/init.d/pcp_startup.sh >> /var/log/pcp_boot.log 2>&1
I.e. Just delete the pipe to tee element.

As a comparison, my boot log has the lines
Starting ntpd. Done (1).
Waiting for valid date before starting LMS.... Done. (1)
Starting LMS, this can take some time...
Slimserver Running pid:10535
Done.
Waiting for LMS to initiate... Done (3).
Starting Squeezelite and/or Shairport-sync... Done.
Powering off HDMI...RPi 4/5's automatically power off unused HDMI ports
Done.
So it looks like your boot script is skipping the startup of squeezelite for some reason, though I see the right variable is set to auto start it.

Try the change I suggested and see if it works.
 
Thanks for your suggestion, I've tried this but it still wouldn't work.

So I started digging in the pcp.startup.sh script to see what is going on and found the problem. It turns out the way squeezelite starts differs depending on whether you also run LMS:
  • When starting squeezelite without LMS a condition is checked: $SOUND_CARD_CNT is to be less than 42.
  • When starting squeezelite with LMS, this condition is not checked, and squeezelite just starts.
This is probably the reason it worked for you, but not for me. After I removed the condition '-a $SOUND_CARD_CNT -lt 42' from the if statement, squeezelite happily starts up at boot.

This is the part of the script that is responsible for squeezelite not starting:

#---------------------------------------------------------------------------------------- # Start squeezelite. If running LMS locally, start squeezelite later. #---------------------------------------------------------------------------------------- if [ "$LMSERVER" != "yes" ]; then if [ "$SQUEEZELITE" = "yes" -a $SOUND_CARD_CNT -lt 42 ]; then echo -n "${BLUE}Starting Squeezelite and/or Shairport-sync...${YELLOW}" pcp_squeezelite_start "text" >/dev/null 2>&1 echo " ${GREEN}Done.${NORMAL}" fi fi

I'm not sure how all this relates to CamillaDSP. I think the variable $CARDNAME as used in pcp.startup.sh is not set properly, but I don't know where this should be done.
 
I'm glad you found a solution. But I have to wonder if the root problem is to do with your DAC taking a long time to come up. I notice line 13 in your boot log "Can't get device info: No such device" (the duplicate on line 14 is probably just because you had the tee pipe as well as echo concat). Looking at pcp_startup.sh (attached) indicates that this error is generated when the startup process tries to detect the attached sound cards (lines 370-405), and this is also the point at which SOUND_CARD_CNT is set to 42 if nothing is detected.

But the SMSL DAC is clearly detected in your diagnostics log (from line 123 on), though this will have been generated after the boot process had finished.
 

Attachments

  • pcp_startup.zip
    10.3 KB · Views: 5
Yes, you're probably right! The DAC is powered by the Pi over USB so it will startup simultaneously, which may take a while. The only thing I don't understand is how Squeezelite did start automatically on boot before installing CamillaDSP.

Anyway, I am really happy it works now and I'm looking forward to start experimenting with DSP on my stereo. Thanks again for your help and this great project! :)
 
The pCP startup script is getting confused by the virtual alsa device that's used to change samplerate, ends up classifying the output card as 'None', and fails to lauch squeezelite on boot. (But only if LMS isn't also run.) There's hard-coded exception for the stock alsa equaliser, but that doesn't apply for the one we setup here.

The solution is simple, though. Open your SSH shell and type
Code:
sudo nano /opt/bootlocal.sh
And add the line
Code:
pcp slr
right at the end.

I've added a note about this to the project's Readme.