• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

RPi4 + CamillaDSP Tutorial

tinnitus

Active Member
Joined
Jan 26, 2021
Messages
149
Likes
206
Location
Germany
Here my shutdown solution: the rpi is listening on gpio 3 for starting/stopping. If you have a pushbutton connect with gpio3 and Ground, you can Start the RPI.
To enable the shutdown, you have to add a dtoverlay=gpio-shutdown in the config.txt

That works only if you dont use the gpio for Ic2.
But you can use another gpio for shutdown.
As you see at the picture I use the gpio25 (another red cable), therefor the command in config.txt must be
dtoverlay=gpio-shutdown,gpio_pin=25,active_low=1,gpio_pull=up

then you can start and shutdown the rpi with the pushbutton. After the shutdown you can discaoonect from mains.

IMG_20230101_180830.jpg
 

Yems

Member
Joined
Aug 31, 2022
Messages
17
Likes
4
Here my shutdown solution: the rpi is listening on gpio 3 for starting/stopping. If you have a pushbutton connect with gpio3 and Ground, you can Start the RPI.
To enable the shutdown, you have to add a dtoverlay=gpio-shutdown in the config.txt

Thank you, that's very helpful. My hope was, that there's a solution without the need to open the case (...want to avoid to renew the thermal paste). I have no programming skills but i think there could be a 'code only' based solution where a time or event based action initiates the shutdown procedure. For instance: it would be fun if i could play a certain 'shutdown-track' as .flac or .wav file wich would be recognized as shutdown trigger.
 

Olombo

Member
Joined
Dec 27, 2022
Messages
18
Likes
2
Are there any reasons this should not work with a rpi CM4 with I/O Board? RPIs are currently a bit hard to source but the CM4 is available over here for a more or less regular price....
 

tinnitus

Active Member
Joined
Jan 26, 2021
Messages
149
Likes
206
Location
Germany
The cm4 io board has the same Hat connector (gpios) as the Raspberry Pi. Therefore it should work.
 
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,371
Location
Detroit, MI
Are there any reasons this should not work with a rpi CM4 with I/O Board? RPIs are currently a bit hard to source but the CM4 is available over here for a more or less regular price....

I've used the CM4 successfully in the past, although some DACs (MOTU Ultralite Mk5) didn't like using dwc2 and I had to switch to dwc_otg.

Issues were discussed starting here -> https://www.audiosciencereview.com/forum/index.php?threads/asr-open-source-streamer-project.20840/page-30#post-948266, see post #645 for how to switch to doc_otg if needed.

Michael
 

Olombo

Member
Joined
Dec 27, 2022
Messages
18
Likes
2
Great to hear that. Sorry I searched before asking. Unfortunately only via google and not thread search; otherwise would have found it.
 

boomboxx

Member
Joined
Mar 9, 2022
Messages
7
Likes
2
Hopefully someone can help me out here. I recently decided to ditch Roon for LMS and so far its been great. I stream from my windows computer (LMS server) to my pi with piCorePlayer installed with the official touchscreen using USB (no dac hat or anything, just using the pi4 usb) to my dac and so far all has been awesome. However, I am missing some DSP I was using in Roon for my sub. This led me to tons of threads with tons of information and its hard to skim through it all to find my issue for troubleshooting..that led me to this thread in ASR (long time lurker of the forums).

My issue is that, I already had piCorePlayer on my pi, so I went through the set up with camilladsp/gui a lot taken from this first page and the git page and have the gui setup and everything, but I just cant get it to run. The closest I have come is to using the stdin & stdout but then I receive a stalled state. I cant get Alsa loopback installed and not even sure i need it. I think a lot of my issues are that I installed camilladsp on the side and not at all in the way from the first page of this post. Would it better to just start over from scratch and follow this thread? is there an easier way to just get two filters added, i really just need two frequencies lowered and streched about 2q.
 

chuckt62

Active Member
Editor
Joined
Apr 6, 2022
Messages
141
Likes
123
Location
Tejas
Hopefully someone can help me out here. I recently decided to ditch Roon for LMS and so far its been great. I stream from my windows computer (LMS server) to my pi with piCorePlayer installed with the official touchscreen using USB (no dac hat or anything, just using the pi4 usb) to my dac and so far all has been awesome. However, I am missing some DSP I was using in Roon for my sub. This led me to tons of threads with tons of information and its hard to skim through it all to find my issue for troubleshooting..that led me to this thread in ASR (long time lurker of the forums).

My issue is that, I already had piCorePlayer on my pi, so I went through the set up with camilladsp/gui a lot taken from this first page and the git page and have the gui setup and everything, but I just cant get it to run. The closest I have come is to using the stdin & stdout but then I receive a stalled state. I cant get Alsa loopback installed and not even sure i need it. I think a lot of my issues are that I installed camilladsp on the side and not at all in the way from the first page of this post. Would it better to just start over from scratch and follow this thread? is there an easier way to just get two filters added, i really just need two frequencies lowered and streched about 2q.
PiCorePlayer is a bit different than Ubuntu, so you might want to look into pCP specific installs of CDSP. I just got it running on a RPi4 w/pCP yesterday following Lykkedk's setup which uses pCP tcz files that pCP likes. You also need to look at the @HenrikEnquist CDSP github pages to get it all done.
 

chuckt62

Active Member
Editor
Joined
Apr 6, 2022
Messages
141
Likes
123
Location
Tejas
I ended up putting a mouse button on GPIO3 to turn it on/off. You need to disable i2c to get it to 'poweroff'. It works to turn on from the 'poweroff' state with no edits. The button is soldered to a 2x5 socket and plugged into the header. I was just using a shunt across gpio3 (pin5) and GND (pin6) for a while, so I also put a shunt across the 5V pins to avoid accidentally touching them. Any case that exposes the header should be fine to avoid removing the lid.

20230103_085435.jpg
 

boomboxx

Member
Joined
Mar 9, 2022
Messages
7
Likes
2
PiCorePlayer is a bit different than Ubuntu, so you might want to look into pCP specific installs of CDSP. I just got it running on a RPi4 w/pCP yesterday following Lykkedk's setup which uses pCP tcz files that pCP likes. You also need to look at the @HenrikEnquist CDSP github pages to get it all done.
Thanks, I wish there was as simple walkthrough with these pages. This is where I started but got lost pretty quickly. I might start from scratch and try again.
 

Geert

Major Contributor
Joined
Mar 20, 2020
Messages
1,955
Likes
3,570
I wonder if there's a convenient way to shutdown the Raspberry Pi after a listening session? I don't want to just pull the plug - so i always have to boot my PC only for shutting down the Raspberry Pi securely. Any suggestions?
Use an app that executes a shutdown command via SSH? There are apps that offer programmable buttons that execute commands via SSH or API's.
 

Olombo

Member
Joined
Dec 27, 2022
Messages
18
Likes
2
OK found some CM4 modules. However only 8gb eMMC. I checked my installation on the RPI4 I already have and it shows nearly 5gb used space on the SD card. As I am new to linux and Cdsp: is there any reason not to go with the 8gb version?
 

chuckt62

Active Member
Editor
Joined
Apr 6, 2022
Messages
141
Likes
123
Location
Tejas
5GB on the SD card (storage) is not the same thing as the 8GB CM4 card (RAM).
8GB of RAM is more than you will ever need as far as I can tell.
Last night I was comparing my Ubuntu install to the piCorePlayer install, and they were both using way under 1G of RAM.
If you want to store FLAC... on the SD card you can go with whatever size SD you need for that.

Edit1: You can SSH into the Pi4 and run "htop" or "top" to see the actual RAM usage.
Edit2: I don't run LMS on the RPi. It's on a separate server box.
 
Last edited:

Olombo

Member
Joined
Dec 27, 2022
Messages
18
Likes
2
Hi

I checked with htop before and have only 1gb RAM usage. I actually talk about the eMMc storage on the cm4 modules which may be used instead of the sd card. And there is locally only 8gb storage with 2gb Ram available. I think should fit?
 
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,371
Location
Detroit, MI
OK found some CM4 modules. However only 8gb eMMC. I checked my installation on the RPI4 I already have and it shows nearly 5gb used space on the SD card. As I am new to linux and Cdsp: is there any reason not to go with the 8gb version?

Do you plan on adding anything else to the eMMC? If not I would say 3 gb free is fine. You should also be able to add storage via the PCIe slot or via USB if necessary but that will be bulkier.

Michael
 

Wirrunna

Member
Joined
May 27, 2021
Messages
93
Likes
45
Location
South Coast, NSW, Australia
Hopefully someone can help me out here. I recently decided to ditch Roon for LMS and so far its been great. I stream from my windows computer (LMS server) to my pi with piCorePlayer installed with the official touchscreen using USB (no dac hat or anything, just using the pi4 usb) to my dac and so far all has been awesome. However, I am missing some DSP I was using in Roon for my sub. This led me to tons of threads with tons of information and its hard to skim through it all to find my issue for troubleshooting..that led me to this thread in ASR (long time lurker of the forums).

My issue is that, I already had piCorePlayer on my pi, so I went through the set up with camilladsp/gui a lot taken from this first page and the git page and have the gui setup and everything, but I just cant get it to run. The closest I have come is to using the stdin & stdout but then I receive a stalled state. I cant get Alsa loopback installed and not even sure i need it. I think a lot of my issues are that I installed camilladsp on the side and not at all in the way from the first page of this post. Would it better to just start over from scratch and follow this thread? is there an easier way to just get two filters added, i really just need two frequencies lowered and streched about 2q.
Forget trying to run Camilla with the piCorePlayer running on TinyCore linux, just build a second pi with CamillaDSP on Ubuntu from the instructions at the start of this thread and include Squeezelite.
LMS recognizes Squeezelite on the pi with CamillaDSP as another player, then use your piCorePlayer with the touchscreen to control the other player (Select player on the piCorePlayer menu).
 
  • Like
Reactions: MCH

boomboxx

Member
Joined
Mar 9, 2022
Messages
7
Likes
2
Is there no way to easily do this on a single board? I control my picoreplayer with windows and an Android phone. I thought about starting over and using this guide but if it's not going to work with what I'm looking for then not sure I'll settle yet. I think I got the dsp working but the GUI is a lost cause. The funny part is I had the gui up but wouldn't run the dsp and now it's the opposite. I have it installed exactly correct from the guides but it just won't run but I think I have the DSP working. My problem with that is I have no idea how to make the config correctly. I need a few peaking filters set to a freq with gain and q. If I can figure that out I guess I'll stop there till there is an easy solution.
 
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,371
Location
Detroit, MI
Is there no way to easily do this on a single board? I control my picoreplayer with windows and an Android phone. I thought about starting over and using this guide but if it's not going to work with what I'm looking for then not sure I'll settle yet. I think I got the dsp working but the GUI is a lost cause. The funny part is I had the gui up but wouldn't run the dsp and now it's the opposite. I have it installed exactly correct from the guides but it just won't run but I think I have the DSP working. My problem with that is I have no idea how to make the config correctly. I need a few peaking filters set to a freq with gain and q. If I can figure that out I guess I'll stop there till there is an easy solution.

Can you post a log from CamillaDSP to help troubleshoot?

I am not a pcp user so take this with a grain of salt but pcp seems different from Ubuntu. I would not follow this guide but rather follow @chuckt62's suggest from this post -> #928.

Michael
 

Yems

Member
Joined
Aug 31, 2022
Messages
17
Likes
4
Use an app that executes a shutdown command via SSH? There are apps that offer programmable buttons that execute commands via SSH or API's.
Thank you Geert, this sounds very promising. I think that's gonna be my solution.
 

Dave Bullet

Member
Joined
Oct 30, 2022
Messages
68
Likes
100
Use an app that executes a shutdown command via SSH? There are apps that offer programmable buttons that execute commands via SSH or API's.
Yes - that is what I do. I use SSH button on my android phone. Was free on the google play store last time I looked, without any adware (and I hope no spyware :)

Since I control everything from my phone (including volume via MPDroid client to MPD on the Pi) , I saw no reason to use a physical button to power down the pi.
AIyoJ15UkbuKjA7-SGm7DuOgmM9L9XcagJpj2sRBnuTIWz5FMZIGpiB-s1xssIcAQepoUKXw59MP2cQOimqE2WNF-On44AXOvVN-9LDKi8J5UxR1rKdieEnI4fKWza65GV_w0AOB5McWujAYDsbEZWsPYT4DaDRvSRZYbS1IVLZ3xUmIwG-DwIv0HXFbMmQjxnLLicRxcAhpcVIPWd7oj83ehna3dLE0DY3H0bQzyhsjk9sgcCVzcm_wmRIrXShwHzkkx5OSuI29bU_kEehRtJqB6bolHE4pDlyANr_HFfctradaHo1KnjzyizeBeoryghuAG1EaoknEKnTg4s_BBSMx81NQef1Wtwa7nKJQtIxooBeKi1uOF7vweJ4OnInh7H1GU0n4U9vR8ULAaPT6LMzJt82Xm5esVz8w3Xjmy_U6w8l0I1WdINkFSxDCAqoQfTxa0xclCbuvAtwrA6gpXlO4tiWcShRSTXYnqo0iTcmBeMNwJlNcRhLEe7uwF0Ryk3mP1hsCPEw7i3g2EbfyWNQS75Q9LsWubMMmxP_lFhxwVAd9Z5WG2i2MsVsXwC3RLtWGJ0VGC3QO8ScPtrNdGuNEConAqdfOkuHzePByocBxl5EhxkmaCgLfTWvjXydg0LUR6P89G-Jgo9NWny0XF9B0ZK5roGRllCvR23yi1PO5d2qx8yR1CbIcETFAq1OpgRb_DtR2cQ_yr-RRICEI0MY1ah8f-I6jWMjCxKsDuzee5FjvBlnECYdmXyRNIfS1aMnjbFohknYWjVUJJuZ1ODx3qQGpEQunDFzrqgizhigtkIBujIfjIObqEscQAYQEcTz4VQNLHJmyJbsPKEMFlwuyCu-twL_ya15Yd85UMrmDHu9iUpjP1BB4oY5n2ZMvH_nh7CnwU5p5Fb6-WvuGX3N9oEigw6SqU45P-RHPvBprMtnujq7_aTOPyWcCoPx7s82wU4tHlToCKQ73UnpDdA=w485-h1077-no
 
  • Like
Reactions: MCH
Top Bottom