• 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

x_ivica

Member
Joined
May 6, 2019
Messages
25
Likes
1
Any simple start guideline Fusion DSP/ CamillaDSP with Volumio. How to start. In Moode is simple copy flat config file and edit but in Volumio when start GUI Camilla there is not and flat config file. Need stereo config, how setup? RPI4 spdif hat ---> DAC
 

ezublab

Member
Joined
Jun 28, 2020
Messages
42
Likes
31
Any simple start guideline Fusion DSP/ CamillaDSP with Volumio. How to start. In Moode is simple copy flat config file and edit but in Volumio when start GUI Camilla there is not and flat config file. Need stereo config, how setup? RPI4 spdif hat ---> DAC
Hello,
Play something in Volumio and in CamillaDsp Gui click on fetch from DSP. By default it's flat.
Have a look at the online help FusionDsp.
If needed ask on Volumio forum.
 

x_ivica

Member
Joined
May 6, 2019
Messages
25
Likes
1
Hello,
Play something in Volumio and in CamillaDsp Gui click on fetch from DSP. By default it's flat.
Have a look at the online help FusionDsp.
If needed ask on Volumio forum.
Try to play Tidal when DSP is active but not possible to play Tidal when DSP plugin is active, Moode audio is more simple than Volumio
 
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,478
Likes
3,316
Location
Detroit, MI
Went through a pretty major update of the tutorial reflecting the latest versions of CamillaDSP and Ubuntu. Also spent time simplifying and providing clarification based on user feedback and adding many more configuration files.

Thank you to everyone who provided feedback so far, if you see something that could be improved please let me know!

Michael
 

MCH

Major Contributor
Joined
Apr 10, 2021
Messages
2,581
Likes
2,198
Went through a pretty major update of the tutorial reflecting the latest versions of CamillaDSP and Ubuntu. Also spent time simplifying and providing clarification based on user feedback and adding many more configuration files.

Thank you to everyone who provided feedback so far, if you see something that could be improved please let me know!

Michael
Damn!!! Now that I had copied everything to an armagedon proof pdf file!
 
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,478
Likes
3,316
Location
Detroit, MI
Damn!!! Now that I had copied everything to an armagedon proof pdf file!

Haha! There isn't really anything new if you already had it up and running, although hopefully it will be easier for folks to get to that point.

I think it does a better job explaining use cases like adding ASRCs upstream of DACs to get to a constant sample rate and how to add TOSLINK input to DACs that only have USB input. The configurations are also cleaned up and eliminate a lot of unnecessary resampling that was in there previously.

Otherwise it was mostly editorial updates.

Michael
 
  • Like
Reactions: MCH

MCH

Major Contributor
Joined
Apr 10, 2021
Messages
2,581
Likes
2,198
Haha! There isn't really anything new if you already had it up and running, although hopefully it will be easier for folks to get to that point.

I think it does a better job explaining use cases like adding ASRCs upstream of DACs to get to a constant sample rate and how to add TOSLINK input to DACs that only have USB input. The configurations are also cleaned up and eliminate a lot of unnecessary resampling that was in there previously.

Otherwise it was mostly editorial updates.

Michael
+ trimmed the bag of persimmons from the last picture. I did trim the others, but that one I respected it
IMG20221021211648.jpg
Thank you Michael, great reference material.
 
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,478
Likes
3,316
Location
Detroit, MI
Yep, trimmed all the pictures and screenshots. It was OK on a phone because the portrait view compressed them but on a widescreen monitor the pictures were taking up way too much space, much better now.

Michael
 
  • Like
Reactions: MCH

threni

Major Contributor
Joined
Oct 18, 2019
Messages
1,277
Likes
1,519
Location
/dev/null
I have some mono tracks which don't play on my moOde/CamillaDSP setup. I have some headphone PEQ set-up for 2 channel music like a normal person, so when it gets a real single channel mono file (not stereo where both channels happen to have the same content) it refuses to play it. Is there some way of configuring moOde/CamillaDSP so I don't have to switch presets as I switch between mono and stereo files?
 
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,478
Likes
3,316
Location
Detroit, MI
Probably best to ask on the moode forum as I am not a moode user.

I can say mono tracks work perfectly fine with the setup described in this tutorial if they are stored on LMS and played via squeezelite.

Michael
 

fabriceo

Member
Joined
Oct 9, 2020
Messages
5
Likes
16
Hello,
may I ask some guidance, I m using Volumio 3 on rpi4 with a dac8pro.
I have installed camilladsp and its gui, thanks to mdsimon2 for this great tuto.
(Im not using the FusionDSP plugin)
this works perfectly on the command line with a sequence like
aplay -v -D camilladsp song.wav
the pcm.camilladsp plugin is simply inserted in the alsa pipeline by adding the camilladsp.conf file in the folder /etc/alsa/conf.d/
and the command sudo aplay -L gives the following extract.
null
jack
pulse
camilladsp
default
volumio
volumioOutput
volumioHw
sysdefault:CARD=b1

now I try to modify volumio plugin chain to insert camilladsp before volumioHw which is the endpoint to dac8pro, without success, or partially.
I m editing the file /etc/alsa.conf
which originally looks like that:
pcm.!default {
type empty
slave.pcm "volumio"
}
pcm.volumio {
type empty
slave.pcm "volumioOutput"
}

# There is always a plug before the hardware to be safe
pcm.volumioOutput {
type plug
slave.pcm "volumioHw"
}
pcm.volumioHw {
type hw
card "DAC8PRO"
}

by modifying /etc/alsa.conf, I m able to force volumioOutput to launch camilladsp instead of volumioHw directly and this works in the command line with
aplay -v -D volumio song.wav
but using mpd or shairport-sync doesn't follow the new alsa chain. despite tentative to restart mpd or alsa or volumio.
even reboot doesn't help. by the way the file /etc/asound.conf is rewriten to its default at reboot so I had to patch a file with sed command.
/volumio/app/plugins/audio_interface/alsa_controller/index.js

anyone tried to insert camilladsp by himself in the volumio alsa chain with success ? thanks in advance
 

MCH

Major Contributor
Joined
Apr 10, 2021
Messages
2,581
Likes
2,198
Hey guys,
Just wanted to share my experience with people in EU that want to build the OLED display as described in the tutorial but don't fancy ordering from overseas the one that Michael recommends.

I ordered this one from Audiophonics:


It costs roughly the same, and looks quite similar. The good news is that it comes with the 16 pin connector already soldered and the pinout is the same. The bad news is that it comes set to SPI configuration, not 6800, and @Audiophonics will not change it for you. But you can can change it yourself with a soldering iron and a bit of good luck if your soldering skills are as poor as mine...

This is how you receive the display:

IMG20221029132918.jpg


As you can see, it looks different, but you only need to desolder R19 and R21 (both 10K resistors) and solder them back to R18 and R20.
The damn resistors are really tiny, but to demonstrate that anyone can do it, and at the risk of having people laughing at me, here is my result (position 19 ruined forever as a result):

IMG20221029140236.jpg


Once you have this done, just connect the pins following the instructions in post #5, and there you go :)

IMG_20221030_060033.jpg


PS: btw, it would be nice to control the brightness of the screen automatically according to the time (day/night). Is this something that can be implemented in the python document?
 
Last edited:

MCH

Major Contributor
Joined
Apr 10, 2021
Messages
2,581
Likes
2,198
While setting the display above, i took the opportunity to update all the system (it was still running the very first version of the tutorial) and all went good, but I do have an issue now with the squeezelite streamer. When i select that configuration, i get the following error message and no sound nor response from the remote anymore. It works again if i change manually the configuration back to my main one (minidsp as capture device). See below the error message i get and my streamer configuration attached:

2022-10-29 23:19:05.261351 INFO [src/bin.rs:711] CamillaDSP version 1.0.2
2022-10-29 23:19:05.261593 INFO [src/bin.rs:712] Running on linux, aarch64
2022-10-29 23:19:05.314932 ERROR [src/bin.rs:362] Capture error: ALSA function 'snd_pcm_open' failed with error 'ENODEV: No such device'
2022-10-29 23:19:05.422209 ERROR [src/processing.rs:50] Message channel error: receiving on a closed channel

any clue on how to solve it? thanks a lot.

should i see loopback device if i do aplay -l? i don't see it


EDIT: solved! i searched the thread and followed the suggestion in post #186:

sudo modprobe snd-aloop

after running this instruction, loopback showed up when doing aplay -l and squeezelite was working as intended. I have the feeling that loopback was not installed properly when installing the linux extra modules. Is it possible? (note that i went with Ubuntu Server 22.10 instead of 22.04 in case this is relevant)
 

Attachments

  • Squeeze_motuM4.zip
    727 bytes · Views: 42
Last edited:

TheMadcap

Member
Joined
May 5, 2020
Messages
26
Likes
2
I'm a bit lost, here I shoot my questions.

What I have right now is a Raspberry 4, and Kef Ls50 wireless II. As audio source I have a hdd full of flac/dsd, tidal, spotify. When I had a passive system I was using picoreplayer. Now I don't want to use interface devices mentioned here, instead I want to stream directly to my Kefs, I guess through upnp renderer. Is it possible for me to utilize Camilladsp, with a loopback in rpi and after dsp stream to the Kef without any dacs. Guide mentioned single sampling rate as 44 kHz, but wouldn't that be a bit low for my hi-res files?

Besides that, there is a Asus tinker board 2s/2g being sold as used, locally. Afaik this Aus board has more processing power, would it be more useful to install camilladsp to that one?
 
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,478
Likes
3,316
Location
Detroit, MI
While setting the display above, i took the opportunity to update all the system (it was still running the very first version of the tutorial) and all went good, but I do have an issue now with the squeezelite streamer. When i select that configuration, i get the following error message and no sound nor response from the remote anymore. It works again if i change manually the configuration back to my main one (minidsp as capture device). See below the error message i get and my streamer configuration attached:

2022-10-29 23:19:05.261351 INFO [src/bin.rs:711] CamillaDSP version 1.0.2
2022-10-29 23:19:05.261593 INFO [src/bin.rs:712] Running on linux, aarch64
2022-10-29 23:19:05.314932 ERROR [src/bin.rs:362] Capture error: ALSA function 'snd_pcm_open' failed with error 'ENODEV: No such device'
2022-10-29 23:19:05.422209 ERROR [src/processing.rs:50] Message channel error: receiving on a closed channel

any clue on how to solve it? thanks a lot.

should i see loopback device if i do aplay -l? i don't see it


EDIT: solved! i searched the thread and followed the suggestion in post #186:

sudo modprobe snd-aloop

after running this instruction, loopback showed up when doing aplay -l and squeezelite was working as intended. I have the feeling that loopback was not installed properly when installing the linux extra modules. Is it possible? (note that i went with Ubuntu Server 22.10 instead of 22.04 in case this is relevant)

If sudo modprobe snd-aloop works that means you have successfully installed the linux extra modules. In the tutorial the steps below automatically accomplish the same thing as sudo modprobe snd-aloop. Note you do need to reboot the RPi for it to take effect. I would also make sure there isn't a typo in snd-aloop.conf.

1667138337803.png


Michael
 
  • Like
Reactions: MCH

MCH

Major Contributor
Joined
Apr 10, 2021
Messages
2,581
Likes
2,198
If sudo modprobe snd-aloop works that means you have successfully installed the linux extra modules. In the tutorial the steps below automatically accomplish the same thing as sudo modprobe snd-aloop. Note you do need to reboot the RPi for it to take effect. I would also make sure there isn't a typo in snd-aloop.conf.

View attachment 240255

Michael
grrrrrr you are right, had "snd-aLoop" instead of "snd-aloop". grrrrr i swear i checked it like half dozen times!! thanks!
 
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,478
Likes
3,316
Location
Detroit, MI
I'm a bit lost, here I shoot my questions.

What I have right now is a Raspberry 4, and Kef Ls50 wireless II. As audio source I have a hdd full of flac/dsd, tidal, spotify. When I had a passive system I was using picoreplayer. Now I don't want to use interface devices mentioned here, instead I want to stream directly to my Kefs, I guess through upnp renderer. Is it possible for me to utilize Camilladsp, with a loopback in rpi and after dsp stream to the Kef without any dacs. Guide mentioned single sampling rate as 44 kHz, but wouldn't that be a bit low for my hi-res files?

Besides that, there is a Asus tinker board 2s/2g being sold as used, locally. Afaik this Aus board has more processing power, would it be more useful to install camilladsp to that one?

For your setup probably best to pursue one of the pre-made options like moOde, volumio or SuperPlayer. They all have CamillaDSP and I believe all will handle sample rate switching so the CamillaDSP sample rate matches your file sample rate.

You could use this guide and set your player output to the Loopback although your player would need to be set to resample to match the constant sample rate of CamillaDSP. I am not sure what the capabilities of your upnp renderer are but you can use a higher sample rate (96 kHz, 192 kHz, etc) if you want to retain the inaudible ultrasonic information.

You could also use the ALSA CDSP plugin -> https://github.com/scripple/alsa_cdsp to automatically restart CamillaDSP with sample rates matching your playback file.

Personally I like to have a constant sample rate in CamillaDSP. I don't think I am losing anything by resampling to 44 kHz and I like being to easily switch configurations in the GUI.

The RPi4 is plenty powerful and I don't it is worth pursuing another option if your desire is to increase processing power.

Michael
 
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,478
Likes
3,316
Location
Detroit, MI
PS: btw, it would be nice to control the brightness of the screen automatically according to the time (day/night). Is this something that can be implemented in the python document?

I just saw this. I think it should be possible. There are a few different ways to manipulate brightness, I think the easiest is the master contrast control which has steps from 1 to 16, it is currently set at 15 (0F) which is rather bright.

As I am a programming noob not sure the best way to accomplish the time dependency. Seems like the easiest way would be to keep it in the python script, I am sure that python has some means of querying the time and using that to change the master contrast control. Could also bind brightness to a FLIRC button but that would involve modifying another python routine.

Let me play with it a bit and of course if anyone that actually knows anything about python has a good idea on how to accomplish this please let me know!

PS: Didn't realize that Audiophonics display is meant to be used with an Audiophonics aluminum case -> https://www.audiophonics.fr/en/diy-...essories-for-evo-sabre-dac-black-p-14656.html. That could be a really nice way to get a finished product for this type of setup and also gives the opportunity to play around with the rotary encoder. I may buy one and see what I can do with it. Obviously will have some extra cutouts unless you use their DAC but as it is all on the back I am not that fussed about it.

Michael
 
Last edited:
  • Like
Reactions: MCH

somebodyelse

Major Contributor
Joined
Dec 5, 2018
Messages
3,682
Likes
2,962
Python has some fairly in-depth time handling, including timezone awareness that can come in handy when clocks change around this time of year.
https://docs.python.org/3/library/datetime.html
If you keep it in the application you can brighten it when there's some user input than dim it again after a few seconds to reduce burn-in on the oled. Another option would be to use a light sensor so brightness is related to ambient light rather than time of day.
Obviously will have some extra cutouts unless you use their DAC but as it is all on the back I am not that fussed about it.
Self adhesive laminating pouches can make quite a tidy solution. Print up a sheet to cover the back panel with any labels you want, laminate, trim to size and stick in position. Your call on whether to make the necessary cutouts for connectors before or after sticking.
 
Top Bottom