• 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

glc650

Active Member
Joined
Jun 30, 2021
Messages
190
Likes
68
I've been using CamillaDSP (recently updated to 2.0) for a few months now but without my sub hooked up and without filters/sub xover configured in CDSP. I'm ready to do that now.

Prior to using CDSP I was using a fully discrete (separate DAC, pre-amp and amp) 2 channel setup with RCA left and right output from my pre-amp to RCA L/R input on my sub. I'm now using CamillaDSP with a Topping DM7. Do I still need to use two outputs on the DM7 for a single sub or do I just use one? I plan on having HAF generate the filters.
 
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,378
Location
Detroit, MI
@Blew apologize for the late reply, I am currently out of town for the holidays.

Just a guess but I think the issue is that you have double camilladsp folders.

Rich (BB code):
/opt/camilladsp/camilladsp/flirc_08302023.py

Code:
active = cdsp.config.file_path()

This command should read the configuration file path from your statefile.yml, which in your case will be "/opt/camilladsp/camilladsp/configs/_m4-squeezelite-crossovers.yml"

Code:
configdir = active.split('camilladsp')[0] + 'camilladsp/' + 'configs/'

active.split('camilladsp')[0] reads your camilladsp configuration path and looks for the text 'camilladsp', it then returns all text prior to 'camilladsp'. In your case this will return /opt/. It then adds 'camilladsp/configs/' to that path, so your final result is configdir = /opt/camilladsp/configs/ which is missing one of your camilladsp folders.

You could use the stock script if you use only a single camilladsp folder or you could modify the script to add two camilladsp folders

Code:
configdir = active.split('camilladsp')[0] + 'camilladsp/' + 'camilladsp/' + 'configs/'

EDIT: I could also modify the configdir line to look for 'configs' instead of camilladsp.

Michael
 
Last edited:
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,378
Location
Detroit, MI
I've been using CamillaDSP (recently updated to 2.0) for a few months now but without my sub hooked up and without filters/sub xover configured in CDSP. I'm ready to do that now.

Prior to using CDSP I was using a fully discrete (separate DAC, pre-amp and amp) 2 channel setup with RCA left and right output from my pre-amp to RCA L/R input on my sub. I'm now using CamillaDSP with a Topping DM7. Do I still need to use two outputs on the DM7 for a single sub or do I just use one? I plan on having HAF generate the filters.

Just my two cents but I would sum L + R for the sub in CamillaDSP. This way you know exactly what you are getting and can make sure you adjust the level in CamillaDSP to avoid digital clipping (and monitor for any clipped samples).

Michael
 

glc650

Active Member
Joined
Jun 30, 2021
Messages
190
Likes
68
Just my two cents but I would sum L + R for the sub in CamillaDSP. This way you know exactly what you are getting and can make sure you adjust the level in CamillaDSP to avoid digital clipping (and monitor for any clipped samples).

Michael
You mean like this?

Screenshot 2023-12-26 at 7.10.43 PM.png
 
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,378
Location
Detroit, MI

Yes.

Important to note that assuming your left and right channels are equal (good assumption for most bass), your subwoofer channel will now be +6 dB compared to your left or right channels.

This can result in digital clipping if you have bass content approaching 0 dBFS in both left and right channels and you are using the DM7 volume control. If you see CamillaDSP reporting clipped samples, add attenuation for your subwoofer channel until that goes away.

Michael
 

glc650

Active Member
Joined
Jun 30, 2021
Messages
190
Likes
68
If you see CamillaDSP reporting clipped samples, add attenuation for your subwoofer channel until that goes away.
Haven't noticed it yet but I may just add attenuation anyway. So I would add what -6 (or -3?) db to each of the sources in the mixer for the sub and leave the left and right speakers at 0?

Screenshot 2023-12-28 at 8.52.45 AM.png
 
Last edited:
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,378
Location
Detroit, MI
Haven't noticed it yet but I may just add attenuation anyway. So I would add what -6 (or -3?) db to each of the sources in the mixer for the sub and leave the left and right speakers at 0?

View attachment 337654

Yes, adding it here works perfectly. -6 dB should eliminate any possibility of clipping, you can also try slightly lower levels of attenuation if you want to maximize bass output.

Whether you actually see clipping without attenuation will depend on the actual music being played. Again, the nice thing about CamillaDSP is it will report if you are experiencing clipping.

I don't use mono subs, but I do have some low frequency bass EQ on my subs which results in about +10 dB of boost at 10 Hz. I've been steadily decreasing the attenuation I have on these channels (-8 dB currently), but have yet to experience clipping because actual music doesn't contain 0 dBFS content at 10 Hz.

Michael
 

glc650

Active Member
Joined
Jun 30, 2021
Messages
190
Likes
68
Whether you actually see clipping without attenuation will depend on the actual music being played. Again, the nice thing about CamillaDSP is it will report if you are experiencing clipping.
Well in my case all music is played through Roon and I have Roon's clipping indicator on so I think the more likely place would be with my TV source or PC dock source but haven't seen any indications of it yet.

I don't use mono subs,
I only have the one sub (SVS 3k micro) in my CDSP setup. Its just a desktop setup so the sub is under a desk and the speakers are smallish bookshelfs sitting on the desk.
 
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,378
Location
Detroit, MI
Well in my case all music is played through Roon and I have Roon's clipping indicator on so I think the more likely place would be with my TV source or PC dock source but haven't seen any indications of it yet.


I only have the one sub (SVS 3k micro) in my CDSP setup. Its just a desktop setup so the sub is under a desk and the speakers are smallish bookshelfs sitting on the desk.

So you are sending Roon to CamillaDSP? If so you can still get clipping in CamillaDSP as a result of CamillaDSP processing even if Roon doesn't report clipping.

Michael
 

glc650

Active Member
Joined
Jun 30, 2021
Messages
190
Likes
68
So you are sending Roon to CamillaDSP?
Yes. I don't use Roon enough in this room to setup Muse and use that instead.

If so you can still get clipping in CamillaDSP as a result of CamillaDSP processing even if Roon doesn't report clipping.
I have the display set to show if there has been clipping and there hasn't been so far.

But it sounds like you are saying I should attenuate all channels as a precaution/for headroom?
 
Last edited:

glc650

Active Member
Joined
Jun 30, 2021
Messages
190
Likes
68
Ok, I think I got my config squared away now but just to make sure I do (and before I start taking measurements for HAF):
0: left ch
1: right ch
3: sub - summed from l/r channels

As discussed above, specifying -6 as the gain on each channel of the summed sub channel negates the summing:
Screenshot 2023-12-29 at 7.02.34 PM.png

so the sub channel is now effectively 0dB, just like the left and right channels.


Now, if I want to add some protection against clipping, I would do this:
Screenshot 2023-12-29 at 7.04.42 PM.png

which effectively puts each channels gain at -3dB, correct?
 
Last edited:

Floupi

Member
Joined
Dec 19, 2023
Messages
6
Likes
1
hello gang,

I am thinking on a future second system where i will not have the convenience of a minidsp resampling the different sources to a constant sample rate (this is what i do in my current setup). I am thinking of building a sort of hat for raspberry pi that would have a couple of spdif inputs, a muxer, and a SRC4192 to resample all the inputs to a fixed sample rate. From there, i2s to the rpi.

Does anyone have any experience with SRC4192/3 or similar and rpi/camilladsp? any glitches or pops when switching sample rates? (the minidsp works very well and i would love to achieve something similar). Anyone knows any similar IC that does both resampling and muxer or that takes spdif directly?
Also, it has been a while since i don't tinker with all this, and i might have missed something. Is there finally any software based solution to the switching sample rates issues?
thanks!

You might be interested in this project : https://github.com/raptorlightning/I2S-Hat

It doesn't resample the input but uses an Arduino to detect its rate and switch configurations accordingly.
 
  • Like
Reactions: MCH

MCH

Major Contributor
Joined
Apr 10, 2021
Messages
2,659
Likes
2,274
You might be interested in this project : https://github.com/raptorlightning/I2S-Hat

It doesn't resample the input but uses an Arduino to detect its rate and switch configurations accordingly.
Thanks! I already use a self made simple version of that. But I am so much satisfied with how the asrc in the minidsp works that i wanted to try if one of these ICs can do a similar job on their own.
 

Floupi

Member
Joined
Dec 19, 2023
Messages
6
Likes
1
Thanks! I already use a self made simple version of that. But I am so much satisfied with how the asrc in the minidsp works that i wanted to try if one of these ICs can do a similar job on their own.
Oh I'd be super interested in details about your version, I've been holding off making the I²S HAT (I, too, shat? Maybe an hommage to Langston Hughes) because it's hard to find parts and the PCB manufacturing and assembly has a minimum order of 5 boards...
 

Yems

Member
Joined
Aug 31, 2022
Messages
17
Likes
4
Somewhere i have read that it's advantageous to 'remove' all unused channels in the camilladsp pipeline, because of otherwise wasting processing ressources. I've tried a lot but haven't been able to find a solution to disable those channels (violet in the attached image) in my Motu Ultralite Mk5 - setup . Would it help to set the alsa device to plughw: instead of hw: ?

Thank you for any comments
Yems
 

Attachments

  • ULmk5_Pipeline.jpg
    ULmk5_Pipeline.jpg
    125.5 KB · Views: 33
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,378
Location
Detroit, MI
Somewhere i have read that it's advantageous to 'remove' all unused channels in the camilladsp pipeline, because of otherwise wasting processing ressources. I've tried a lot but haven't been able to find a solution to disable those channels (violet in the attached image) in my Motu Ultralite Mk5 - setup . Would it help to set the alsa device to plughw: instead of hw: ?

Thank you for any comments
Yems

Your pipeline looks correct for avoiding unused channels, you only have the channels you are actually using defined in your mixer.

Unnecessary channel mapping really isn't a huge issue unless you are running up against the limits of your CPU.

Michael
 

Yems

Member
Joined
Aug 31, 2022
Messages
17
Likes
4
Your pipeline looks correct for avoiding unused channels, you only have the channels you are actually using defined in your mixer.

Unnecessary channel mapping really isn't a huge issue unless you are running up against the limits of your CPU.

Michael
Thank you Michael!
 

matejS

New Member
Joined
Jan 2, 2022
Messages
1
Likes
0
Hi,

question for all the MOTU Ultralite mk4 (ESS Sabre version) on RPI4.
Since mk5 works and mk4 is nearly identical to mk5, then it should work too?
MOTU is "hiding" this information (in order to get us buying the new mk5).

Thanks,
Matej
 

Nutul

Senior Member
Joined
Jul 20, 2023
Messages
342
Likes
198
Hi,

question for all the MOTU Ultralite mk4 (ESS Sabre version) on RPI4.
Since mk5 works and mk4 is nearly identical to mk5, then it should work too?
MOTU is "hiding" this information (in order to get us buying the new mk5).

Thanks,
Matej
The mk4, like the mk5, us UAC2.0 compliant, hence works OOTB with a RPi. (that is, on any Linux box)
 
Top Bottom