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

I was thinking that maybe playing for test without any real fir filters are better, so if you comment out the "fir" portion of the .yml file and add -20dB as "clipgain" instead, you should clearly hear that music is much lower volume when streamed through camilladsp.

---
devices:
samplerate: 44100
buffersize: 4096 #8192
target_level: 2048 #4096
adjust_period: 5

capture:
type: Alsa
channels: 2
device: "camilla_in"
format: S32LE
playback:
type: Alsa
channels: 2
device: "sound_out"
format: S32LE

filters:
l_fir:
type: Conv
parameters:
type: File
filename: /home/tc/DSP_Engine/filters/44100/L_red_44100.bin
format: FLOAT32LE

r_fir:
type: Conv
parameters:
type: File
filename: /home/tc/DSP_Engine/filters/44100/R_red_44100.bin
format: FLOAT32LE

clipgain_L:
type: Gain
parameters:
gain: -20.0
inverted: false

clipgain_R:
type: Gain
parameters:
gain: -20.0
inverted: false

pipeline:
# - type: Filter
# channel: 0
# names:
# - l_fir
# - type: Filter
# channel: 1
# names:
# - r_fir

- type: Filter
channel: 0
names:
- clipgain_L
- type: Filter
channel: 1
names:
- clipgain_R

Jesper.
 
Here is my :

tc@piCorePlayer:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: DAC8PRO [DAC8PRO], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 1: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 1: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7

Its an 8 channel DAC which I think was a bit finicky with pcp. I usually use plughw:CARD=DAC8PRO,DEV=0 as the pcp output
 
So your'e asound.conf should be fine i guess! :)

Did you got it working? If not try the following.

sudo killall squeezelite
sudo killall camilladsp

sudo /home/tc/CamillaDSP.sh start

ps aux

And see if you have lines like this where camilladsp is shown as running :
857 root 0:24 /home/tc/DSP_Engine/camilladsp /home/tc/DSP_Engine/filters/RP_red_44100.yml

If success, restart squeezelite in PCP webinterface and do ps aux again :
724 root 0:00 [kworker/u8:3-ev]
841 tc 0:00 -sh
857 root 0:24 /home/tc/DSP_Engine/camilladsp -p3011 /home/tc/DSP_Engine/filters/RP_red_44100.yml
6327 root 0:00 /sbin/udhcpc -b -i eth0 -x hostname:AK4490 -p /var/run/udhcpc.eth0.pid
6716 root 0:00 /usr/local/sbin/sshd
6736 root 0:03 /mnt/mmcblk0p2/tce/squeezelite-custom -n DSP_SuperDAC -o squeeze -a 160 4 1 -b 10000 20000 -r 44100 192000 5000 -U -U
6781 root 0:00 /usr/sbin/httpd -p 80

Nevermind my squeezelite setting for now!

Jesper.
 
For reference, the filestructure should look like this with my setup.

Jesper.
 

Attachments

  • Custom_PCP_filestructure.png
    Custom_PCP_filestructure.png
    16.4 KB · Views: 216
I think maybe Camilla is not running.

tc@piCorePlayer:~$ sudo /home/tc/CamillaDSP.sh start
already running.

tc@piCorePlayer:~$ sudo killall camilladsp
killall: camilladsp: no process killed

I cannot see it using ps aux :

tc@piCorePlayer:~$ ps aux
PID USER TIME COMMAND
1 root 0:00 init
2 root 0:00 [kthreadd]
3 root 0:00 [rcu_gp]
4 root 0:00 [rcu_par_gp]
8 root 0:00 [mm_percpu_wq]
9 root 0:03 [ksoftirqd/0]
10 root 0:01 [rcu_preempt]
11 root 0:00 [rcu_sched]
12 root 0:00 [rcu_bh]
13 root 0:00 [migration/0]
14 root 0:00 [cpuhp/0]
15 root 0:00 [cpuhp/1]
16 root 0:00 [migration/1]
17 root 0:00 [ksoftirqd/1]
20 root 0:00 [cpuhp/2]
21 root 0:00 [migration/2]
22 root 0:00 [ksoftirqd/2]
25 root 0:00 [cpuhp/3]
26 root 0:00 [migration/3]
27 root 0:00 [ksoftirqd/3]
30 root 0:00 [kdevtmpfs]
31 root 0:00 [netns]
32 root 0:00 [rcu_tasks_kthre]
34 root 0:00 [khungtaskd]
35 root 0:00 [oom_reaper]
36 root 0:00 [writeback]
37 root 0:00 [kcompactd0]
38 root 0:00 [crypto]
39 root 0:00 [kblockd]
40 root 0:00 [watchdogd]
42 root 0:00 [rpciod]
43 root 0:00 [kworker/u9:0]
44 root 0:00 [xprtiod]
48 root 0:00 [kswapd0]
49 root 0:00 [nfsiod]
70 root 0:00 [kthrotld]
72 root 0:00 [iscsi_eh]
74 root 0:00 [DWC Notificatio]
75 root 0:00 [uas]
76 root 0:00 [vchiq-slot/0]
77 root 0:00 [vchiq-recy/0]
78 root 0:00 [vchiq-sync/0]
80 root 0:00 [irq/22-brcmstb_]
81 root 0:00 [irq/36-mmc0]
91 root 0:00 [mmc_complete]
92 root 0:00 [kworker/2:1H-kb]
93 root 0:00 [kworker/0:1H-mm]
117 root 0:00 /sbin/udevd --daemon
306 root 0:00 [kworker/1:1H-kb]
322 root 0:00 [kworker/3:1H-kb]
418 root 0:00 [jbd2/mmcblk0p2-]
419 root 0:00 [ext4-rsv-conver]
441 root 0:00 [loop0]
442 root 0:00 [loop1]
443 root 0:00 [loop2]
444 root 0:00 [loop3]
447 root 0:00 [loop4]
453 root 0:00 [loop5]
455 root 0:00 [loop6]
458 root 0:00 [loop7]
461 root 0:00 [loop8]
468 root 0:00 [loop9]
469 root 0:00 [loop10]
471 root 0:00 [loop11]
474 root 0:00 [loop12]
479 root 0:00 [loop13]
482 root 0:00 [loop14]
484 root 0:00 [loop15]
488 root 0:00 [loop16]
491 root 0:00 [loop17]
494 root 0:00 [loop18]
497 root 0:00 [loop19]
500 root 0:00 [loop20]
503 root 0:00 [loop21]
504 root 0:00 [loop22]
507 root 0:00 [loop23]
508 root 0:00 [loop24]
619 root 0:00 /sbin/udevd --daemon
620 root 0:00 /sbin/udevd --daemon
633 root 0:00 [spi0]
646 root 0:00 [kworker/u8:2-fl]
784 tc 0:00 -sh
5827 root 0:00 /sbin/udhcpc -b -i eth0 -x hostname:piCorePlayer -p /var/run/udhcpc.eth
6045 root 0:00 /usr/local/sbin/sshd
6105 root 0:00 /usr/sbin/httpd -p 80
8516 root 0:00 sshd: tc [priv]
8519 tc 0:01 sshd: tc@pts/0
8520 tc 0:00 -sh
14597 root 0:00 sshd: tc [priv]
14600 tc 0:00 sshd: tc@notty
14601 tc 0:00 -sh
15336 root 0:00 [kworker/3:0-eve]
15539 root 0:00 [kworker/3:2H]
18503 root 0:00 [kworker/1:1-eve]
18820 root 0:00 [kworker/0:2-eve]
18877 root 0:00 [kworker/1:0-eve]
19476 root 0:00 [kworker/1:0H]
19885 root 0:00 [kworker/0:1-eve]
20086 root 0:00 [kworker/2:2H]
20088 root 0:00 [kworker/u8:0-ev]
20695 root 0:00 [kworker/0:2H]
20697 root 0:00 [kworker/2:2-eve]
21107 root 0:00 [kworker/2:0-mm_]
21108 root 0:00 [kworker/3:2-mm_]
21156 root 0:00 [kworker/0:0-eve]
21247 root 0:00 [kworker/1:2-eve]
21311 root 0:00 [kworker/1:2H]
21315 root 0:00 [kworker/u8:1-ev]
21376 root 0:00 [kworker/2:1-eve]
21725 root 0:00 [kworker/3:1-eve]
21728 tc 0:00 ps aux

Only listed if I use ps aux with grep :

tc@piCorePlayer:~$ ps aux | grep camilladsp
15334 tc 0:00 grep camilladsp
 
Okay...

Problem is that camilladsp is not running for sure.
Are you using the camilladsp i use (old one)?

So again try to
sudo killall squeezelite
and
sudo killall camilladsp

Do it twice to be sure!
sudo killall squeezelite
sudo killall camilladsp

Try to start camilla like this
sudo /home/tc/DSP_Engine/camilladsp -v /home/tc/DSP_Engine/filters/RP_red_44100.yml

My terminal looks like this then
tc@AK4490:~$ sudo /home/tc/DSP_Engine/camilladsp -v /home/tc/DSP_Engine/filters/RP_red_44100.yml
[2020-07-11T07:02:32Z DEBUG camilladsp] Read config file /home/tc/DSP_Engine/filters/RP_red_44100.yml
[2020-07-11T07:02:32Z DEBUG camilladsp::filters] Read file: /home/tc/DSP_Engine/filters/44100/L_red_44100.bin, number of coeffs: 16384
[2020-07-11T07:02:32Z DEBUG camilladsp::filters] Read file: /home/tc/DSP_Engine/filters/44100/R_red_44100.bin, number of coeffs: 16384
[2020-07-11T07:02:32Z DEBUG camilladsp] Config is valid
[2020-07-11T07:02:32Z DEBUG camilladsp::filters] Build new pipeline
[2020-07-11T07:02:32Z DEBUG camilladsp::filters] Build from config
[2020-07-11T07:02:32Z DEBUG camilladsp::filters] Read file: /home/tc/DSP_Engine/filters/44100/L_red_44100.bin, number of coeffs: 16384
[2020-07-11T07:02:32Z DEBUG camilladsp::alsadevice] Opened audio output "camilla_in" with parameters: HwParams { channels: Ok(2), rate: "Ok(44100) Hz", format: Ok(S32LE), access: Ok(RWInterleaved), period_size: "Ok(512) frames", buffer_size: "Ok(8192) frames" }, SwParams(avail_min: Ok(512) frames, start_threshold: Ok(3584) frames, stop_threshold: Ok(8192) frames)
[2020-07-11T07:02:32Z DEBUG camilladsp] Capture thread ready to start
[2020-07-11T07:02:32Z DEBUG camilladsp::alsadevice] Opened audio output "sound_out" with parameters: HwParams { channels: Ok(2), rate: "Ok(44100) Hz", format: Ok(S32LE), access: Ok(RWInterleaved), period_size: "Ok(512) frames", buffer_size: "Ok(8192) frames" }, SwParams(avail_min: Ok(512) frames, start_threshold: Ok(3584) frames, stop_threshold: Ok(8192) frames)
[2020-07-11T07:02:32Z DEBUG camilladsp] Playback thread ready to start
[2020-07-11T07:02:32Z DEBUG camilladsp::fftconv_fftw] Conv l_fir is using 4 segments
[2020-07-11T07:02:32Z DEBUG camilladsp::filters] Build from config
[2020-07-11T07:02:32Z DEBUG camilladsp::filters] Read file: /home/tc/DSP_Engine/filters/44100/R_red_44100.bin, number of coeffs: 16384
[2020-07-11T07:02:32Z DEBUG camilladsp::fftconv_fftw] Conv r_fir is using 4 segments
[2020-07-11T07:02:32Z DEBUG camilladsp::filters] Build from config
[2020-07-11T07:02:32Z DEBUG camilladsp::filters] Build from config
[2020-07-11T07:02:32Z DEBUG camilladsp::processing] build filters, waiting to start processing loop
[2020-07-11T07:02:32Z DEBUG camilladsp::alsadevice] Starting captureloop
[2020-07-11T07:02:32Z DEBUG camilladsp::alsadevice] Starting playback loop
[2020-07-11T07:02:32Z INFO camilladsp::alsadevice] Capture device supports rate adjust

camilladsp should run like this if it's working.

Kill it by hitting [CTRL] + [C]

Jesper.

EDIT:
Only listed if I use ps aux with grep :

tc@piCorePlayer:~$ ps aux | grep camilladsp
15334 tc 0:00 grep camilladsp

You see your'e own command here, ps aux tells everything which is going on, including commands given at prompt
 
Last edited:
Thanks Jesper for all your help. I used the camilladsp from the archive link you posted in post #530

if I try to start camilladsp directly :

tc@piCorePlayer:~$ sudo killall squeezelite
tc@piCorePlayer:~$ sudo killall camilladsp
killall: camilladsp: no process killed
tc@piCorePlayer:~$ sudo killall squeezelite
killall: squeezelite: no process killed
tc@piCorePlayer:~$ sudo killall camilladsp
killall: camilladsp: no process killed
tc@piCorePlayer:~$ sudo /home/tc/DSP_Engine/camilladsp -v /home/tc/DSP_Engine/filters/RP_red_44100.yml
[2020-07-11T07:21:50Z DEBUG camilladsp] Read config file /home/tc/DSP_Engine/filters/RP_red_44100.yml
[2020-07-11T07:21:50Z DEBUG camilladsp::filters] Read file: /home/tc/DSP_Engine/filters/44100/L_red_44100.bin, number of coeffs: 16384
[2020-07-11T07:21:50Z DEBUG camilladsp::filters] Read file: /home/tc/DSP_Engine/filters/44100/R_red_44100.bin, number of coeffs: 16384
[2020-07-11T07:21:50Z DEBUG camilladsp] Config is valid
[2020-07-11T07:21:50Z DEBUG camilladsp::filters] Build new pipeline
[2020-07-11T07:21:50Z DEBUG camilladsp::filters] Build from config
[2020-07-11T07:21:50Z DEBUG camilladsp::filters] Read file: /home/tc/DSP_Engine/filters/44100/L_red_44100.bin, number of coeffs: 16384
[2020-07-11T07:21:50Z ERROR camilladsp] Playback error: ALSA function 'snd_pcm_hw_params_set_channels' failed with error 'EINVAL: Invalid argument'
[2020-07-11T07:21:50Z DEBUG camilladsp] Exiting
tc@piCorePlayer:~$

So the issue is the playback error?
 
Last edited:
Okay... cool.

The config is read succesfully i see.
BUT the line here:
[2020-07-11T07:21:50Z ERROR camilladsp] Playback error: ALSA function 'snd_pcm_hw_params_set_channels' failed with error 'EINVAL: Invalid argument'
Tells us that something hardware is wrong i guess.

Try unplug and replug the DAC and execute dmesg | grep usb
Look for the DAC here.

Mine looks like this:
c@AK4490:~$ dmesg | grep usb
[ 0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 cma=64M bcm2708_fb.fbwidth=0 bcm2708_fb.fbheight=0 bcm2708_fb.fbdepth=16 bcm2708_fb.fbswap=1 smsc95xx.macaddr=DC:A6:32:08:81:76 vc_mem.mem_base=0x3f000000 vc_mem.mem_size=0x3f600000 host=AK4490 tz=CET-1CEST,M3.5.0,M10.5.0/3 dwc_otg.fiq_fsm_mask=0xF dwc_otg.lpm_enable=0 console=tty1 root=/dev/ram0 elevator=deadline rootwait quiet nortc loglevel=3 noembed smsc95xx.turbo_mode=N noswap consoleblank=0 waitusb=2
...
..
[ 1.350288] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1.350293] usb 1-1.3: Product: Combo384 Amanero
[ 1.350298] usb 1-1.3: Manufacturer: Amanero Technologies
...
..

EDIT: I wish phofman or Henrik could help now, but i will try. This is for sure playback hardware related issue (I had this error also a lot when building my machine)

Jesper.
 
Last edited:
Thanks. I will try to unplug and reconnect later then use dmesg. In the meantime :

tc@piCorePlayer:~$ cat /proc/asound/cards
0 [DAC8PRO ]: USB-Audio - DAC8PRO
Okto Research DAC8PRO at usb-0000:01:00.0-1.1, high speed
1 [Loopback ]: Loopback - Loopback
Loopback 1
tc@piCorePlayer:~$ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=DAC8PRO
DAC8PRO, USB Audio
Default Audio Device
sysdefault:CARD=DAC8PRO
DAC8PRO, USB Audio
Default Audio Device
front:CARD=DAC8PRO,DEV=0
DAC8PRO, USB Audio
Front speakers
surround21:CARD=DAC8PRO,DEV=0
DAC8PRO, USB Audio
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=DAC8PRO,DEV=0
DAC8PRO, USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=DAC8PRO,DEV=0
DAC8PRO, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=DAC8PRO,DEV=0
DAC8PRO, USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=DAC8PRO,DEV=0
DAC8PRO, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=DAC8PRO,DEV=0
DAC8PRO, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=DAC8PRO,DEV=0
DAC8PRO, USB Audio
IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=DAC8PRO,DEV=0
DAC8PRO, USB Audio
Direct sample mixing device
dsnoop:CARD=DAC8PRO,DEV=0
DAC8PRO, USB Audio
Direct sample snooping device
hw:CARD=DAC8PRO,DEV=0
DAC8PRO, USB Audio
Direct hardware device without any conversions
plughw:CARD=DAC8PRO,DEV=0
DAC8PRO, USB Audio
Hardware device with all software conversions
default:CARD=Loopback
Loopback, Loopback PCM
Default Audio Device
sysdefault:CARD=Loopback
Loopback, Loopback PCM
Default Audio Device
front:CARD=Loopback,DEV=0
Loopback, Loopback PCM
Front speakers
surround21:CARD=Loopback,DEV=0
Loopback, Loopback PCM
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Loopback,DEV=0
Loopback, Loopback PCM
4.0 Surround output to Front and Rear speakers
surround41:CARD=Loopback,DEV=0
Loopback, Loopback PCM
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Loopback,DEV=0
Loopback, Loopback PCM
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Loopback,DEV=0
Loopback, Loopback PCM
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Loopback,DEV=0
Loopback, Loopback PCM
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
dmix:CARD=Loopback,DEV=0
Loopback, Loopback PCM
Direct sample mixing device
dmix:CARD=Loopback,DEV=1
Loopback, Loopback PCM
Direct sample mixing device
dsnoop:CARD=Loopback,DEV=0
Loopback, Loopback PCM
Direct sample snooping device
dsnoop:CARD=Loopback,DEV=1
Loopback, Loopback PCM
Direct sample snooping device
hw:CARD=Loopback,DEV=0
Loopback, Loopback PCM
Direct hardware device without any conversions
hw:CARD=Loopback,DEV=1
Loopback, Loopback PCM
Direct hardware device without any conversions
plughw:CARD=Loopback,DEV=0
Loopback, Loopback PCM
Hardware device with all software conversions
plughw:CARD=Loopback,DEV=1
Loopback, Loopback PCM
Hardware device with all software conversions
tc@piCorePlayer:~$
 
Hi :)

You could also try to remove the line in /opt/bootlocal.sh where CamillaDSP.sh is executed and then do sudo filetool.sh -b and sudo reboot.

like this :
#!/bin/sh
# put other system startup commands here

GREEN="$(echo -e '\033[1;32m')"

echo
echo "${GREEN}Running bootlocal.sh..."

modprobe snd_aloop

#/home/tc/CamillaDSP.sh start
sleep 1

#pCPstart------
/usr/local/etc/init.d/pcp_startup.sh 2>&1 | tee -a /var/log/pcp_boot.log
#pCPstop------

Then when it's rebooted try to
sudo killall squeezelite
And start camilla again
sudo /home/tc/DSP_Engine/camilladsp -v /home/tc/DSP_Engine/filters/RP_red_44100.yml

Jesper.
 
Thanks Jesper for all your help. I used the camilladsp from the archive link you posted in post #530

if I try to start camilladsp directly :

tc@piCorePlayer:~$ sudo killall squeezelite
tc@piCorePlayer:~$ sudo killall camilladsp
killall: camilladsp: no process killed
tc@piCorePlayer:~$ sudo killall squeezelite
killall: squeezelite: no process killed
tc@piCorePlayer:~$ sudo killall camilladsp
killall: camilladsp: no process killed
tc@piCorePlayer:~$ sudo /home/tc/DSP_Engine/camilladsp -v /home/tc/DSP_Engine/filters/RP_red_44100.yml
[2020-07-11T07:21:50Z DEBUG camilladsp] Read config file /home/tc/DSP_Engine/filters/RP_red_44100.yml
[2020-07-11T07:21:50Z DEBUG camilladsp::filters] Read file: /home/tc/DSP_Engine/filters/44100/L_red_44100.bin, number of coeffs: 16384
[2020-07-11T07:21:50Z DEBUG camilladsp::filters] Read file: /home/tc/DSP_Engine/filters/44100/R_red_44100.bin, number of coeffs: 16384
[2020-07-11T07:21:50Z DEBUG camilladsp] Config is valid
[2020-07-11T07:21:50Z DEBUG camilladsp::filters] Build new pipeline
[2020-07-11T07:21:50Z DEBUG camilladsp::filters] Build from config
[2020-07-11T07:21:50Z DEBUG camilladsp::filters] Read file: /home/tc/DSP_Engine/filters/44100/L_red_44100.bin, number of coeffs: 16384
[2020-07-11T07:21:50Z ERROR camilladsp] Playback error: ALSA function 'snd_pcm_hw_params_set_channels' failed with error 'EINVAL: Invalid argument'
[2020-07-11T07:21:50Z DEBUG camilladsp] Exiting
tc@piCorePlayer:~$

So the issue is the playback error?
The error message says that the device didn't accept the number of channels. Did you use 2 or 8? If it's an 8-channel dac it might only accept 8. In that case you need to insert a mixer in the pipeline as well, to create the additional channels. Make a mixer with 2 channels in, 8 out, and map channel 0->0 and 1->1. Channels 2-7 will be silent then. I can post the config later when I'm at a proper keyboard.

I would highly recommend using the latest version of CamillaDSP even if you don't need the new features. It's more than twice as fast!
 
:) Thanks Henrik for kicking my butt here!
I would highly recommend using the latest version of CamillaDSP even if you don't need the new features. It's more than twice as fast!

I downloaded the newest precompiled version:
tc@AK4490:~$ sudo /home/tc/DSP_Engine/camilladsp -V
CamillaDSP 0.3.1

It's working as an direct placement for my older camilladsp, even without changing the .yml syntax. -I still have it like this and running:
---
devices:
samplerate: 44100
buffersize: 4096 #8192
target_level: 2048 #4096
adjust_period: 5

capture:
type: Alsa
channels: 2
device: "camilla_in"
format: S32LE
playback:
type: Alsa
channels: 2
device: "sound_out"
format: S32LE

Thanks.

So this means wineds instead of using mine old one (we really have to listning to the Master Yoda himself :worship:), you can get this version and transfer to the PCP player https://github.com/HEnquist/camilladsp/releases/download/v0.3.1-alpha/camilladsp-linux-armv7.tar.gz

Remember to place it in /home/tc/DSP_Engine

Jesper.
 
The error message says that the device didn't accept the number of channels. Did you use 2 or 8? If it's an 8-channel dac it might only accept 8. In that case you need to insert a mixer in the pipeline as well, to create the additional channels. Make a mixer with 2 channels in, 8 out, and map channel 0->0 and 1->1. Channels 2-7 will be silent then. I can post the config later when I'm at a proper keyboard.

I would highly recommend using the latest version of CamillaDSP even if you don't need the new features. It's more than twice as fast!
.
Its an 8 channel capable DAC but I am only using 2 channels. It maps ok to 2 channels using pCP. I use plughw:CARD=DAC8PRO,DEV=0. I think this is the only output setting that works with pCP.
 
Last edited:
:) Thanks Henrik for kicking my butt here!

I downloaded the newest precompiled version:


It's working as an direct placement for my older camilladsp, even without changing the .yml syntax. -I still have it like this and running:


Thanks.

So this means wineds instead of using mine old one (we really have to listning to the Master Yoda himself :worship:), you can get this version and transfer to the PCP player https://github.com/HEnquist/camilladsp/releases/download/v0.3.1-alpha/camilladsp-linux-armv7.tar.gz

Remember to place it in /home/tc/DSP_Engine

Jesper.

Thanks. I'll try that tomorrow.
 
Is there a way to put Camilla into this (standard) HW chain?

HD (music library) -> Mac (mini) running LMS -> SB (Touch) -> DAC ....


//
There is no easy place to insert CamillaDSP in that chain unfortunately. The best place is just before the sound card. But that's in the SB touch, so not really an option. But if LMS can use pipes to pass the sound via an external program it could probably be made to work.
 
This is wineds asound.conf (same as mine)

# Loopback device 0
pcm.squeeze {
type hw
card "Loopback"
device 0
format S32_LE
channels 2
}

# Loopback device 1
pcm.camilla_in {
type hw
card "Loopback"
device 1
format S32_LE
channels 2
}

# "sound_out" is the "real" hardware card (usbdac, soundcard etc...)
pcm.sound_out {
type hw
card 0
device 0
}

ctl.sound_out {
type hw
card 0
}

His aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: DAC8PRO [DAC8PRO], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 1: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 1: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7

His aplay -L
tc@piCorePlayer:~$ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=DAC8PRO
DAC8PRO, USB Audio
Default Audio Device
sysdefault:CARD=DAC8PRO
DAC8PRO, USB Audio
Default Audio Device
front:CARD=DAC8PRO,DEV=0
DAC8PRO, USB Audio
Front speakers
surround21:CARD=DAC8PRO,DEV=0
DAC8PRO, USB Audio
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=DAC8PRO,DEV=0
DAC8PRO, USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=DAC8PRO,DEV=0
DAC8PRO, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=DAC8PRO,DEV=0
DAC8PRO, USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=DAC8PRO,DEV=0
DAC8PRO, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=DAC8PRO,DEV=0
DAC8PRO, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=DAC8PRO,DEV=0
DAC8PRO, USB Audio
IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=DAC8PRO,DEV=0
DAC8PRO, USB Audio
Direct sample mixing device
dsnoop:CARD=DAC8PRO,DEV=0
DAC8PRO, USB Audio
Direct sample snooping device
hw:CARD=DAC8PRO,DEV=0
DAC8PRO, USB Audio
Direct hardware device without any conversions
plughw:CARD=DAC8PRO,DEV=0
DAC8PRO, USB Audio
Hardware device with all software conversions
default:CARD=Loopback
Loopback, Loopback PCM
Default Audio Device
sysdefault:CARD=Loopback
Loopback, Loopback PCM
Default Audio Device
front:CARD=Loopback,DEV=0
Loopback, Loopback PCM
Front speakers
surround21:CARD=Loopback,DEV=0
Loopback, Loopback PCM
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Loopback,DEV=0
Loopback, Loopback PCM
4.0 Surround output to Front and Rear speakers
surround41:CARD=Loopback,DEV=0
Loopback, Loopback PCM
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Loopback,DEV=0
Loopback, Loopback PCM
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Loopback,DEV=0
Loopback, Loopback PCM
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Loopback,DEV=0
Loopback, Loopback PCM
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
dmix:CARD=Loopback,DEV=0
Loopback, Loopback PCM
Direct sample mixing device
dmix:CARD=Loopback,DEV=1
Loopback, Loopback PCM
Direct sample mixing device
dsnoop:CARD=Loopback,DEV=0
Loopback, Loopback PCM
Direct sample snooping device
dsnoop:CARD=Loopback,DEV=1
Loopback, Loopback PCM
Direct sample snooping device
hw:CARD=Loopback,DEV=0
Loopback, Loopback PCM
Direct hardware device without any conversions
hw:CARD=Loopback,DEV=1
Loopback, Loopback PCM
Direct hardware device without any conversions
plughw:CARD=Loopback,DEV=0
Loopback, Loopback PCM
Hardware device with all software conversions
plughw:CARD=Loopback,DEV=1
Loopback, Loopback PCM
Hardware device with all software conversions
tc@piCorePlayer:~$

And his .yml
---
devices:
samplerate: 44100
buffersize: 4096 #8192
target_level: 2048 #4096
adjust_period: 5

capture:
type: Alsa
channels: 2
device: "camilla_in"
format: S32LE
playback:
type: Alsa
channels: 2
device: "sound_out"
format: S32LE

filters:
l_fir:
type: Conv
parameters:
type: File
filename: /home/tc/DSP_Engine/filters/44100/L_red_44100.bin
format: FLOAT32LE

r_fir:
type: Conv
parameters:
type: File
filename: /home/tc/DSP_Engine/filters/44100/R_red_44100.bin
format: FLOAT32LE

clipgain_L:
type: Gain
parameters:
gain: -6.0
inverted: false

clipgain_R:
type: Gain
parameters:
gain: -6.0
inverted: false

pipeline:
- type: Filter
channel: 0
names:
- l_fir
- type: Filter
channel: 1
names:
- r_fir

- type: Filter
channel: 0
names:
- clipgain_L
- type: Filter
channel: 1
names:
- clipgain_R

Jesper.
 
.
Its an 8 channel capable DAC but I am only using 2 channels. It maps ok to 2 channels using pCP. I use plughw:CARD=DAC8PRO,DEV=0. I think this is the only output setting that works with pCP.

It works because you are not outputting to the soundcard directly, but through the plug plugin (plughw instead of hw) ALSA project - the C library reference: PCM (digital audio) plugins . In your case the plug takes care of channel count conversion.


The other asoundrc defines the output devices directly to the driver which accepts only 8 channels

Code:
pcm.sound_out {
type hw
card 0
device 0
}

The easy way to troubleshoot is using debug mode of aplay together with the --dump-hw-params option:

Code:
aplay -v --dump-hw-params -D yourdevice /dev/zero