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

See my post : https://www.diyaudio.com/community/...overs-room-correction-etc.349818/post-6949384

You need to be able to hear sound from the aplay command I posted before you can move forward. This is a simple linux test independent of Camilla DSP. Download a sample .wav file to test. Also use plughw for now rather than just hw. plughw can correct for differences in number of channels and format etc. so its more tolerant and a better choice during initial setup.
 
Last edited:
plughw:2,0 works fine for aplay and headphones from the internal card. (also tried with plughw:3,0 which is a usb powered speaker and that works too)
(can't fathom what else it can be given I followed the setup and everything reports without errors just no sound !)

Code:
aplay -v -D plughw:2,0 ./HenryA.wav
Playing WAVE './HenryA.wav' : Signed 16 bit Little Endian, Rate 96000 Hz, Stereo
Plug PCM: Rate conversion PCM (48000, sformat=S16_LE)
Converter: libspeex (builtin)
Protocol version: 10002
Its setup is:
  stream       : PLAYBACK
  access       : RW_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 96000
  exact rate   : 96000 (96000/1)
  msbits       : 16
  buffer_size  : 48128
  period_size  : 12032
  period_time  : 125333
  tstamp_mode  : NONE
  tstamp_type  : MONOTONIC
  period_step  : 1
  avail_min    : 12032
  period_event : 0
  start_threshold  : 48128
  stop_threshold   : 48128
  silence_threshold: 0
  silence_size : 0
  boundary     : 6773413839565225984
Slave: Hardware PCM card 2 'HD-Audio Generic' device 0 subdevice 0
Its setup is:
  stream       : PLAYBACK
  access       : MMAP_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 16
  buffer_size  : 24064
  period_size  : 6016
  period_time  : 125333
  tstamp_mode  : NONE
  tstamp_type  : MONOTONIC
  period_step  : 1
  avail_min    : 6016
  period_event : 0
  start_threshold  : 24064
  stop_threshold   : 24064
  silence_threshold: 0
  silence_size : 0
  boundary     : 6773413839565225984
  appl_ptr     : 0
  hw_ptr       : 0
 
Last edited:
OK change the .yml to plughw:2,0 or plughw:3,0 as you know its works. Now you need to set your player to output to hw:Loopback,1 as you are using hw:Loopback,0 as the input to CamillaDSP in your .yml config file. Maybe try using VLC as your player as you can do this with its GUI I think.
 
  • Like
Reactions: 1 user
OK change the .yml to plughw:2,0 or plughw:3,0 as you know its works. Now you need to set your player to output to hw:Loopback,1 as you are using hw:Loopback,0 as the input to CamillaDSP in your .yml config file. Maybe try using VLC as your player as you can do this with its GUI I think.
tried vlc...alsa output lists numerous loopback,loopback xxxx options in pairs so presume these are 0 & 1 but none gives audio.

likewise alsaplayer...

Code:
bob@audacity:~$ alsaplayer -d hw:Loopback,1 /home/bob/HenryA.wav
error on set_format SND_PCM_FORMAT_S16
Unavailable hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  S32_LE
SUBFORMAT:  STD
SAMPLE_BITS: 32
FRAME_BITS: 64
CHANNELS: 2
RATE: 44100
PERIOD_TIME: (181 2972155)
PERIOD_SIZE: [8 131072]
PERIOD_BYTES: [64 1048576]
PERIODS: [1 1024]
BUFFER_TIME: (181 5944309)
BUFFER_SIZE: [8 262144]
BUFFER_BYTES: [64 2097152]
TICK_TIME: ALL
error on set_format SND_PCM_FORMAT_S16
Unavailable hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  S32_LE
SUBFORMAT:  STD
SAMPLE_BITS: 32
FRAME_BITS: 64
CHANNELS: 2
RATE: 44100
PERIOD_TIME: (181 2972155)
PERIOD_SIZE: [8 131072]
PERIOD_BYTES: [64 1048576]
PERIODS: [1 1024]
BUFFER_TIME: (181 5944309)
BUFFER_SIZE: [8 262144]
BUFFER_BYTES: [64 2097152]
TICK_TIME: ALL
failed to configure output device...trying OSS
error on set_format SND_PCM_FORMAT_S16
Unavailable hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  S32_LE
SUBFORMAT:  STD
SAMPLE_BITS: 32
FRAME_BITS: 64
CHANNELS: 2
RATE: 44100
PERIOD_TIME: (181 2972155)
PERIOD_SIZE: [8 131072]
PERIOD_BYTES: [64 1048576]
PERIODS: [1 1024]
BUFFER_TIME: (181 5944309)
BUFFER_SIZE: [8 262144]
BUFFER_BYTES: [64 2097152]
TICK_TIME: ALL
error on set_format SND_PCM_FORMAT_S16
Unavailable hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  S32_LE
SUBFORMAT:  STD
SAMPLE_BITS: 32
FRAME_BITS: 64
CHANNELS: 2
RATE: 44100
PERIOD_TIME: (181 2972155)
PERIOD_SIZE: [8 131072]
PERIOD_BYTES: [64 1048576]
PERIODS: [1 1024]
BUFFER_TIME: (181 5944309)
BUFFER_SIZE: [8 262144]
BUFFER_BYTES: [64 2097152]
TICK_TIME: ALL
failed to configure output device...trying OSS
bob@audacity:~$ alsaplayer -d hw:Loopback,0 /home/bob/HenryA.wav
Gtk-Message: 16:22:53.460: Failed to load module "canberra-gtk-module"
CBSetcurrent: 1
CBSetcurrent: 1
CBSetcurrent: 1
 
Last edited:
tried vlc...alsa output lists numerous loopback,loopback xxxx options in pairs so presume these are 0 & 1 but none gives audio.

likewise alsaplayer...

Code:
bob@audacity:~$ alsaplayer -d hw:Loopback,1 /home/bob/HenryA.wav
error on set_format SND_PCM_FORMAT_S16
Unavailable hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  S32_LE
SUBFORMAT:  STD
SAMPLE_BITS: 32
FRAME_BITS: 64
CHANNELS: 2
RATE: 44100
PERIOD_TIME: (181 2972155)
PERIOD_SIZE: [8 131072]
PERIOD_BYTES: [64 1048576]
PERIODS: [1 1024]
BUFFER_TIME: (181 5944309)
BUFFER_SIZE: [8 262144]
BUFFER_BYTES: [64 2097152]
TICK_TIME: ALL
error on set_format SND_PCM_FORMAT_S16
Unavailable hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  S32_LE
SUBFORMAT:  STD
SAMPLE_BITS: 32
FRAME_BITS: 64
CHANNELS: 2
RATE: 44100
PERIOD_TIME: (181 2972155)
PERIOD_SIZE: [8 131072]
PERIOD_BYTES: [64 1048576]
PERIODS: [1 1024]
BUFFER_TIME: (181 5944309)
BUFFER_SIZE: [8 262144]
BUFFER_BYTES: [64 2097152]
TICK_TIME: ALL
failed to configure output device...trying OSS
error on set_format SND_PCM_FORMAT_S16
Unavailable hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  S32_LE
SUBFORMAT:  STD
SAMPLE_BITS: 32
FRAME_BITS: 64
CHANNELS: 2
RATE: 44100
PERIOD_TIME: (181 2972155)
PERIOD_SIZE: [8 131072]
PERIOD_BYTES: [64 1048576]
PERIODS: [1 1024]
BUFFER_TIME: (181 5944309)
BUFFER_SIZE: [8 262144]
BUFFER_BYTES: [64 2097152]
TICK_TIME: ALL
error on set_format SND_PCM_FORMAT_S16
Unavailable hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  S32_LE
SUBFORMAT:  STD
SAMPLE_BITS: 32
FRAME_BITS: 64
CHANNELS: 2
RATE: 44100
PERIOD_TIME: (181 2972155)
PERIOD_SIZE: [8 131072]
PERIOD_BYTES: [64 1048576]
PERIODS: [1 1024]
BUFFER_TIME: (181 5944309)
BUFFER_SIZE: [8 262144]
BUFFER_BYTES: [64 2097152]
TICK_TIME: ALL
failed to configure output device...trying OSS
bob@audacity:~$ alsaplayer -d hw:Loopback,0 /home/bob/HenryA.wav
Gtk-Message: 16:22:53.460: Failed to load module "canberra-gtk-module"
CBSetcurrent: 1
CBSetcurrent: 1
CBSetcurrent: 1

You are getting s set format error as wave file is probably 16 bit. Maybe try changing capture format to S16LE in yml. Or try plughw: loopback,1 in aplay command but not sure if that works with loopback.
 
Last edited:
You are getting s set format error as wave file is probably 16 bit. Maybe try changing capture format to S16LE in yml. Or try plughw: loopback,1 in aplay command but not sure if that works with loopback.
nope..neither worked. sigh.. I really appreciate all the help and hints, thank-you for your forebearance... though after more than 20 cumulative hours at this perhaps I have downloaded the wrong release...??
I wanted the camilla-digital-sound-processing but I seem to have camilla-disappearing-sound-protocol instead. ;-)

(though I have to admit that if that is what I have then it works perfectly !! :)... )
 
I think Henrik hinted that you are probably best off not using a service and starting Camilla from the command line at least initially for debugging purposes. I'm out now but I'll see if i can post a suitable command line startup for Camilla when I get home.

Edit : If you want to check you have installed a correct binary for your OS you can try (from the directory where camilladsp binary is) :

./camilladsp --version
 
Last edited:
That would be very much appreciated. As to version ...I think it was the latest ? will check.

Its not just the version. You also need the correct build for your OS. If that command returns the version I think it also means you have the right build. If you get some other error then its probably the wrong build.

Edit : BTW did you edit the service file correctly to point to your camilladsp binary as per step 7 @mdsimon2 guide on ASR?
 
Last edited:
Drone7: As already said many times here, the configuration process must go in steps.

First you need to know the actual capabilities of your hardware. Only then can the params be used in the CDSP configuration.

Please post output of

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

Also give your player config, what alsa device you are using.
 
Hi Pavel, thank you for taking a look...as Henrik said earlier...
it's not supposed to be that difficult. Did you follow the steps below?
Yes...I followed those steps and I hear you...
the configuration process must go in steps.
The steps appear to work.... where they don't work there is no error reported ?? nothing to look up ...

Code:
$ aplay -v --dump-hw-params -D hw:2 /dev/zero
Playing raw data '/dev/zero' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono
HW Params of device "hw:2":
--------------------
ACCESS:  MMAP_INTERLEAVED RW_INTERLEAVED
FORMAT:  S16_LE S32_LE
SUBFORMAT:  STD
SAMPLE_BITS: [16 32]
FRAME_BITS: [32 64]
CHANNELS: 2
RATE: [44100 48000]
PERIOD_TIME: (333 11888617)
PERIOD_SIZE: [16 524288]
PERIOD_BYTES: [128 2097152]
PERIODS: [2 32]
BUFFER_TIME: (666 23777234)
BUFFER_SIZE: [32 1048576]
BUFFER_BYTES: [128 4194304]
TICK_TIME: ALL
--------------------
aplay: set_params:1374: Channels count non available
Also give your player config
?? Vlc ? Alsaplayer ? surely they are all different ?
what alsa device you are using
From the .yml ?? I've posted that several times and been given a number of different suggestions...therein lies the problem...so many options so many versions so many permutations and trying them all is nigh on impossible and any tried give no useful output... I'm not a Linux newcomer or unfamiliar with the cli but this is the most lost I have been.
 
Last edited:
The question is which loopback device you are using for playback. Your CDSP is configured to capture from Loopback,0. Therefore you must play into Loopback,1 in order to have the samples appear at Loopback,0 for CDSP. E.g. https://blog.getreu.net/projects/snd-aloop-device/body.html. Usually people use the other pair Loopback,0 for playback and Loopback,1 for capture but it's the same principle.
 
OK, I see you are already using Loopback,1 in your player.

First establish your playback device is working OK.

Code:
aplay -D hw:2 some_44.1khz_16bit.wav

Then run CDSP with your config in https://www.diyaudio.com/community/...overs-room-correction-etc.349818/post-6960023

That will open device Loopback,0 at 44.1/32bit/2ch (because your CDSP config uses format: S32LE for the capture device), making the other (capture) side of loopback locked to these hw params.

Then run
Code:
aplay -D hw:Loopback,1 some_44.1khz_32bit.wav

You can create the wav at any params with sox.

Or run

Code:
aplay -v -D plughw:Loopback,1 some_44.1khz_16bit.wav

and watch the plug plugin correctly converting the 16bit format to S32_LE for the loopback device.

Only after this chain is running correctly move ahead to the actual player configuration, systemd setup etc.
 
MRamone:

Sorry for the delay. As of https://www.diyaudio.com/community/...overs-room-correction-etc.349818/post-6955967 :

The amixer contents for line-in and spdif-in are identical (just run diff on them). For the first (spdif-in presumably enabled) you still have

Code:
numid=20,iface=MIXER,name='PCM Capture Source'
; type=ENUMERATED,access=rw------,values=1,items=4
; Item #0 'Line In'
; Item #1 'External Mic'
; Item #2 'S/PDIF In'
; Item #3 'What U Hear'
: values=0

I.e. still Line In is selected, not SPDIF in.

As of the Direct amixer contents - IIUC it defines a few capture volume controls. IMO the problem is the SPDIF input is not selected in the spdif-in amixer contents. Space bar in alsamixer switches the input sources.