This is a way to run CamillaDSP as a systemd service to provide system wide filtering. This uses the Alsa backend for both capture and playback. These steps work on Fedora 31 and newer. Other distributions are probably similar, but there are likely some differences. If you try on another distribution and have to do something differently, please let me know and I will add that here.
/usr/local/bin/
.sudo cargo install --path . --root /usr/local/
aloop.conf
to /etc/modules-load.d/aloop.conf
sudo modprobe snd-aloop
This creates a "plug" device named "camilladsp" that sends its output to the Loopback device.
asound.conf
to /etc/asound.conf
alsaconfig.yml
for an example.camilladsp.service
to /etc/systemd/system/camilladsp.service
.sudo systemctl daemon-reload
sudo systemctl start camilladsp
sudo systemctl status camilladsp
sudo systemctl enable camilladsp
camillagui.service
file.udevadm monitor --subsystem-match=usb --property --udev
and plug in the dac. There should be a few pages of output (see udevadm_output.txt for an example). 90-camilladsp.rules
and replace the id with the one for your dac./etc/udev/rules.d/90-camilladsp.rules
sudo udevadm control --reload-rules
sudo systemctl status camilladsp
Follow either the PulseAudio or the Pipewire steps.
To check what your system uses, run pactl info
in a terminal and look at the line starting with "Server Name":
> pactl info
...
Server Name: PulseAudio (on PipeWire 0.3.30)
...
In the above output, Pipewire is in use. If Pulseaudio is used by the system, the server name will normally be "pulseaudio" only.
/etc/pulse/default.pa
in a text editor (see default.pa
for an example).load-module module-alsa-sink device="camilladsp" sink_name="CamillaDSP"
update-sink-proplist CamillaDSP device.description=CamillaDSP
set-default-sink camilladsp
Open ~/.config/pipewire/pipewire.conf
in a text editor. If the file doesn't exist, create it by copying the template from: /usr/share/pipewire/pipewire.conf
Under context.properties
, set the desired sample rate:
default.clock.rate = 44100
Add this block under context.objects
:
{ 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,0,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 = 44100
audio.channels = 2
#audio.position = "FL,FR"
}
}
Set api.alsa.path
to the name of the loopback to output to.
Set audio.rate
to match the rate set above.
If unsure, compare with the pipewire.conf
in this repository.
Save the file.
After reboot, the audio settings should show a new output device called "Alsa Loopback".
asound_multidevice.conf
: An example Alsa configuration for combining two stereo dacs into a 4-channel one. This only works well if the two dacs share the same clock. Using two synchronous USB dacs connected to the same USB bus should work, as they will both lock their sample rate to the USB bus clock.