CamillaDSP - Cross-platform IIR and FIR engine for crossovers, room correction etc.

TDLR: I'm stuck at step 2 in the camilldsp-config guide
Step 2: Load loopback driver on boot

Not to change gears. but I said "f it" to rasbian. Things wouldn't show up properly if Pulseaudio was installed. Purged.
Tried installing pipewire. Pulled from repo for overly agressive takeover of pulse audio devices.
Wireplumber servers offline. can't install.
Reading about ubuntu 5.10. ALSA partly depreciated, Pulseaudio completely gone. It's pure Pipewire.
Installed daily image.
No boot. edited config.txt. hmm that's strange commands in there. mirrored rasbian settings, fixed.
ie. dtoverlay=dwc2 was in there twice and dtoverlay=vc4-kms-v3d should be dtoverlay=vc4-fkms-v3d

Downloaded Octo 8 driver. error. opened up deb fix recreated install script. Repackaged. Ran.
config.txt has audioinjector overlay. Asound.conf in /etc .asoundrc in home directory
Sound panel has "Built-In" multichannel output ;-)
Browser audio works, VLC works, You're speakertest command works. Sounds great. (Thank you Tinnitus. That would have been a bad case of tinnitus)

Now....
The Camilladsp config readme seems to be going down the path of the ALSA path.
Is there a way to bypass the HW:Loopback 0/1 and go straight raw input to stin or do pipewire without jack or pulse?
The reason I ask is that 1. it's baked into the system no setup required.
and 2. SND-ALOOP doesn't exist, either because 5.10 is not released yet (not fully baked) or that since ALSA is partial depreciated (whatever that means) snd-aloop will not be included in the kernel going forward.



Sincerely,

David Piel
 
The alsa loopback kernel module is sometimes not installed by default. Try adding the "linux-modules-extra" package.

You can bypass the loopback and use a nullsink in both pulseaudio or pipewire. See here: https://github.com/HEnquist/camilladsp/blob/master/README.md#pipewire
I haven't tested this much with pipewire, but for pulseaudio this gives higher CPU usage than going via the alsa loopback.
Using pulseaudio via the alsa loopback works very well once it has been set up. Instructions are in the camilladsp-config repo. It's important to stop pulseaudio from accessing the output device that camilladsp should use. There are many ways to do this. The instructions in camilladsp-config do it by disabling the auto detection completely. There are more elegant ways, as I think @phofman has mentioned several times.
 
The alsa loopback kernel module is sometimes not installed by default. Try adding the "linux-modules-extra" package.

You can bypass the loopback and use a nullsink in both pulseaudio or pipewire. See here: https://github.com/HEnquist/camilladsp/blob/master/README.md#pipewire
I haven't tested this much with pipewire, but for pulseaudio this gives higher CPU usage than going via the alsa loopback.
Using pulseaudio via the alsa loopback works very well once it has been set up. Instructions are in the camilladsp-config repo. It's important to stop pulseaudio from accessing the output device that camilladsp should use. There are many ways to do this. The instructions in camilladsp-config do it by disabling the auto detection completely. There are more elegant ways, as I think @phofman has mentioned several times.
I downloaded linux modules extra generic last night. Google says to put snd-aloop oin appropriate folder in current kernel, but the folders are different. 5.15.0 generic is ~/5.15 generic/kernel/sound/drivers/snd-aloop.ko
The current kernel is ~/5.15.0-1006/kernel/sound... no driver folder just core, pci, soc, and usb
I'm going to drop the file in in /kernel/sound and edit /etc/modules to load at boot
 
Last edited:
I downloaded linux modules extra generic last night. Google says to put snd-aloop oin appropriate folder in current kernel, but the folders are different. 5.15.0 generic is ~/5.15 generic/kernel/sound/drivers/snd-aloop.ko
The current kernel is ~/5.15.0-1006/kernel/sound... no driver folder just core, pci, soc, and usb
I'm going to drop the file in in /kernel/sound and edit /etc/modules to load at boot
Thank you all for your help and patience. So I'm posting here future prosperity. In case anyone else has this trouble with distros that don't have things installed by default.
AskUbuntu.com said to do
sudo apt-get install linux-modules-extra-$(uname -r)-generic
For some reason I dunno intuition? I ran

sudo apt-get install linux-modules-extra-$(uname -r)

This installed all the extra drivers not in the main kernel install.
Ran sudo modprobe snd-aloop. it was there, BOOM. Continuing.....
 
Thank you all for your help and patience. So I'm posting here future prosperity. In case anyone else has this trouble with distros that don't have things installed by default.
AskUbuntu.com said to do
sudo apt-get install linux-modules-extra-$(uname -r)-generic
For some reason I dunno intuition? I ran

sudo apt-get install linux-modules-extra-$(uname -r)

This installed all the extra drivers not in the main kernel install.
Ran sudo modprobe snd-aloop. it was there, BOOM. Continuing.....

While this works it will break when the kernel is upgraded and you will need re-install. Better to install linux-modules-extra-raspi (if you are on a Raspberry Pi of course) as that will stay updated.

Michael
 

TNT

Member
Joined 2003
Paid Member
To aid the understanding of ones system gain structure, some numerical values to go along the VU meters would be tasty :)

Or a scale perhaps... as of now, its known what is going on between zero and clipping. Even where clipping is on that scale is uncertain...

Measurement tools need; scale, unit, precision and accuracy.

//
 
While this works it will break when the kernel is upgraded and you will need re-install. Better to install linux-modules-extra-raspi (if you are on a Raspberry Pi of course) as that will stay updated.

Michael
Thank you. Yes I found that out lol. opps. you're way works. it's working now. My brain logic centers were not aligning with what my eyes were seeing. I just was like follow your guide to a T even if you don't understand the path. I have some things to share but later.
right now, can you tell me what is wrong with camilladsp.service? I followed Henrik and yours and triple checked. If I stop the service and cut and paste the command line from smailladsp.service into the terminal it fires right up, but it won't run automatically as a service.
 

Attachments

  • Screenshot from 2022-08-08 00-51-45.png
    Screenshot from 2022-08-08 00-51-45.png
    66.1 KB · Views: 51
Are there clear instructions anywhere on how to set this up?
Mdsimon here is doing headless DSP here. The original setup doc at camillaDSP/config github page is a setup for everything under sun. Henrik walks you through every user case. They both use different ways of saying the same thing.

I'd start your setup using mdsimons guide here and if you want to do something different than his setup and some point, refer to
https://github.com/HEnquist/camilladsp-config
 
This is actually quite similar to how it looks now :) Look at the screenshot here: https://www.diyaudio.com/community/...m-correction-etc.349818/page-170#post-7087214

Right now the scale starts at -50dB, and it's linear in dB. I would like to change that to get a larger range. Sometimes it's useful to see if there is some very low level noise, so would like to expand the scale range up to 100 dB or so. I'm thinking something similar to your sketch, where it gets finer towards the right. Gridlines at 0, -3, -6, -12, -24, -48 and -96? I'll try that to see how it looks. But this is maybe something that should wait until the next version. Have to stop somewhere if it's ever going to get ready :)
 
  • Thank You
  • Like
Reactions: 1 users
Thank you. Yes I found that out lol. opps. you're way works. it's working now. My brain logic centers were not aligning with what my eyes were seeing. I just was like follow your guide to a T even if you don't understand the path. I have some things to share but later.
right now, can you tell me what is wrong with camilladsp.service? I followed Henrik and yours and triple checked. If I stop the service and cut and paste the command line from smailladsp.service into the terminal it fires right up, but it won't run automatically as a service.
Does the command work also if you tmrun it in a terminal as root?
My first guess would be that root doesn't have read permission to the config file. Check the permissions of the full path /home/oberhaupt/CamillaDSP/Configs/also.yml
You can see the permissions with "ls -l". Check every folder on the way, starting in /home
 
I aint very bright so have a stupid question.

The manual states "For performing fixed ratio resampling, like resampling from 44.1kHz to 96kHz (which corresponds to a precise ratio of 147/320) choose the "Synchronous" variant". . . . which is cool because thats what I am doing.

It also states "When using the rate adjust feature to match capture and playback devices, one of the "Async" variants must be used"

Just for my education, under what scenarios would you need to use rate adjust.

Thanks,

Peter
 
Does the command work also if you tmrun it in a terminal as root?
My first guess would be that root doesn't have read permission to the config file. Check the permissions of the full path /home/oberhaupt/CamillaDSP/Configs/also.yml
You can see the permissions with "ls -l". Check every folder on the way, starting in /home
It was a damn " - " mdsimon pointed it out. Typing too fast, I guess I had ~/camilladsp -g40 -p1234 .... instead of ~/camilladsp -g-40 -p1234.....

I msged you on audiosciencereview. So how do I get playback from speakertest to desktop using just pipeline/wireplumber? Reading https://wiki.archlinux.org/title/WirePlumber now.
both pipeline and wireplumber running as services.
Also interestingly enough, dsnoop is enabled for each device by default. I noticed when I ran aplay -L ....... wait now it's gone. I rebooted, not sure what I was doing before lol
 
Last edited:
I really hate the 30min edit thing....
I edit the pipewire.conf in /etc/pipewire (which I had to create) to uncomment the code right above yours.
It made the DAC as a alsa-source. Is this the right way to do it?
Camilla volume control doesn't work though. Pipewire took it over.

context.objects = [
# This creates a single PCM source device for the given
# alsa device path hw:0. You can change source to sink
# to make a sink in the same way.
{ factory = adapter
args = {
factory.name = api.alsa.pcm.source
node.name = "alsa-source"
node.description = "PCM Source"
media.class = "Audio/Source"
api.alsa.path = "hw:0"
api.alsa.period-size = 1024
api.alsa.headroom = 0
api.alsa.disable-mmap = false
api.alsa.disable-batch = false
audio.format = "S32LE"
audio.rate = 96000
audio.channels = 2
audio.position = "FL,FR"
}
}

{ factory = adapter
args = {
factory.name = api.alsa.pcm.sink
node.name = "alsa-sink"
node.description = "Alsa Loopback"
media.class = "Audio/Sink"
api.alsa.path = "hw:Loopback,1,0"
#api.alsa.period-size = 1024
#api.alsa.headroom = 0
#api.alsa.disable-mmap = false
#api.alsa.disable-batch = false
audio.format = "S32LE"
audio.rate = 96000
audio.channels = 2
#audio.position = "FL,FR"
}
}
]

One side effect of this change was that the Input on the sound control panel now says PCM Input (Multichannel Input previously)
I don't care as long as input works.

Sincerely,

David P.
 
Last edited: