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

TNT

Member
Joined 2003
Paid Member
Hmm, I still don't get how to insert a filter common to duplicated channels produced by the mixer i.e. at the arrow?

Do I need to add yet a mixer efter the capture?

//
 

Attachments

  • common?.png
    common?.png
    170.8 KB · Views: 183
Last edited:

TNT

Member
Joined 2003
Paid Member
Feature request:

- Checkboxes for all channels in mixer to mute/unmute.
- An actual measure of internal e-e delay in the mixers path. As a one shot, not neccesarily continous. Good for when calculating delay between speakers as not only Delay filter adds delay :) e.g. long fir filters etc..

Still long to next Christmas but better post now so not to forget :)

//
 
So I tried to add a Mixer 2->2 channels with filters - OK!
After this I tried to insert yet a mixer 2->4... this gives blank white page...
//
Was this mixer placed after the other 2to4-mixer? If yes, then it won't work, there are four channels before it, so it must have 4 input channels.
What does the 2-2 mixer do?

Feature request:

- Checkboxes for all channels in mixer to mute/unmute.
- An actual measure of internal e-e delay in the mixers path. As a one shot, not neccesarily continous. Good for when calculating delay between speakers as not only Delay filter adds delay :) e.g. long fir filters etc..
//
A mute option in the mixer is a good idea! That would then fit nicely with a checkbox in the gui.
Delay is tricky since the delay typically depends on frequency. I'm planning on adding group delay to the filter plots. But that will only be for individual filters and filter steps. End to end is a lot more work since all possible paths through all possible mixers must be handled properly.
 

TNT

Member
Joined 2003
Paid Member
I was thinking here actual time-stamping of sample(x) coming in: stamp-time and sample(x) going out: stamp time. Subtraction-> duration/delay...

Like a test mode which would not make sound in speaker:

- Enter test mode
- Silence in pipe
- Stamp - Inject 2720 samples
- Wait for "something" to come out -stamp
- Display delay...

Maybe.... ??

//
 
Last edited:

TNT

Member
Joined 2003
Paid Member
It's OK - the option to measure in air is still there ;)

Just an other suggestion for realisation.

Wait for silence - you already have this function for the reset buffer thing. Timestamp the first sample (none silence) - write this to the log in verbose mode and the same on the playback side - first sample after silence (as defined by parameter for the buffer reset) timestamp and to verbose logging.

No impact (pipe is measured "as is" and thats perfect), no mode and just two verbose log writes per song or probably per album...

Thanks for listening!

//
 
Hello,

camillaDSP is exact what I'm looking for, but I've got issues with "Playback error: ALSA function 'snd_pcm_hw_params_set_format' failed with error 'EINVAL: Invalid argument'"?!

I stop Pulseaudio with:

systemctl --user stop pulseaudio.socket
systemctl --user stop pulseaudio.service

My configurations and Terminal-output with the issue:

"aloop.conf":
snd
snd-timer
snd-pcm
snd-aloop

"asound.conf":
pcm.!default {
type plug
slave { pcm "Loopback_in" }
}

pcm.Loopback_in {
type hw
card "Loopback"
device 0
format S24_LE
channels 2
}

pcm.Loopback_out {
type hw
card "Loopback"
device 1
format S24_LE
channels 2
}

pcm.Soundcard_out {
type hw
card 1
device 0
}

"8Channel.yml":
devices:
samplerate: 96000
chunksize: 2048
capture:
type: Alsa
channels: 2
device: "Loopback_out"
format: S24LE
playback:
type: Alsa
channels: 8
device: "Soundcard_out"
format: S24LE

mixers:
8ChannelMixer:
channels:
in: 2
out: 8
mapping:
- dest: 0
sources:
- channel: 0
gain: 0
inverted: false
- dest: 1
sources:
- channel: 1
gain: 0
inverted: false
- dest: 2
sources:
- channel: 0
gain: 0
inverted: false
- dest: 3
sources:
- channel: 1
gain: 0
inverted: false
- dest: 4
sources:
- channel: 0
gain: 0
inverted: false
- dest: 5
sources:
- channel: 1
gain: 0
inverted: false
- dest: 6
sources:
- channel: 0
gain: 0
inverted: false
- dest: 7
sources:
- channel: 1
gain: 0
inverted: false

filters:
clipgain:
type: Gain
parameters:
gain: -1.0
inverted: false

pipeline:
- type: Mixer
name: 8ChannelMixer
- type: Filter
channel: 0
names:
- clipgain
- type: Filter
channel: 1
names:
- clipgain
- type: Filter
channel: 2
names:
- clipgain
- type: Filter
channel: 3
names:
- clipgain
- type: Filter
channel: 4
names:
- clipgain
- type: Filter
channel: 5
names:
- clipgain
- type: Filter
channel: 6
names:
- clipgain
- type: Filter
channel: 7
names:
- clipgain


And here is the result:
media@media-thinkcentre:~$ /home/media/Schreibtisch/camilladsp -v /home/media/Schreibtisch/8Channel.yml
2021-01-16 23:33:05.925 DEBUG camilladsp - Read config file Some("/home/media/Schreibtisch/8Channel.yml")
2021-01-16 23:33:05.926 DEBUG camilladsp - Config is valid
2021-01-16 23:33:05.926 DEBUG camilladsp - Wait for config
2021-01-16 23:33:05.926 DEBUG camilladsp - Config ready
2021-01-16 23:33:05.926 DEBUG camillalib::filters - Build new pipeline
2021-01-16 23:33:05.926 DEBUG camillalib::alsadevice - Buffer frames 4096
2021-01-16 23:33:05.926 DEBUG camillalib::filters - Build from config
2021-01-16 23:33:05.926 DEBUG camillalib::filters - Build from config
2021-01-16 23:33:05.926 DEBUG camillalib::filters - Build from config
2021-01-16 23:33:05.926 DEBUG camillalib::filters - Build from config
2021-01-16 23:33:05.927 DEBUG camillalib::filters - Build from config
2021-01-16 23:33:05.927 DEBUG camillalib::filters - Build from config
2021-01-16 23:33:05.927 DEBUG camillalib::filters - Build from config
2021-01-16 23:33:05.927 DEBUG camillalib::filters - Build from config
2021-01-16 23:33:05.927 DEBUG camillalib::processing - build filters, waiting to start processing loop
2021-01-16 23:33:05.929 ERROR camilladsp - Playback error: ALSA function 'snd_pcm_hw_params_set_format' failed with error 'EINVAL: Invalid argument'
2021-01-16 23:33:05.929 DEBUG camilladsp - Error while starting, release barrier
2021-01-16 23:33:05.930 DEBUG camillalib::alsadevice - Opening audio device "Loopback_out" with parameters: HwParams { channels: Ok(2), rate: "Ok(96000) Hz", format: Ok(S24LE), access: Ok(RWInterleaved), period_size: "Ok(1024) frames", buffer_size: "Ok(8192) frames" }, SwParams(avail_min: Ok(1024) frames, start_threshold: Ok(0) frames, stop_threshold: Ok(8192) frames)
2021-01-16 23:33:05.930 DEBUG camillalib::alsadevice - Audio device "Loopback_out" successfully opened
2021-01-16 23:33:05.930 DEBUG camillalib::alsadevice - Starting captureloop
2021-01-16 23:33:05.930 INFO camillalib::alsadevice - Capture device supports rate adjust
2021-01-16 23:33:05.930 DEBUG camillalib::alsadevice - Exit message received, sending EndOfStream
2021-01-16 23:33:05.930 DEBUG camilladsp - Wait for capture thread to exit..
2021-01-16 23:33:05.930 DEBUG camilladsp - Restarting with new config
2021-01-16 23:33:05.930 DEBUG camilladsp - Wait for config
2021-01-16 23:33:05.930 DEBUG camilladsp - No config and not in wait mode, exiting!

Does anyone have a solution for this? I can't find one for hours...

Thanks in advance
Raphael
 
Hello,

I finally find a solution:

pcm.!default {
type plug
slave.pcm "Loopback_in"
}

pcm.Loopback_in {
type hw
card Loopback
device 0
format S32_LE
channels 2
}

pcm.Loopback_out {
type hw
card Loopback
device 1
format S32_LE
channels 2
}

pcm.Soundcard_out {
type hw
card D2
device 0
}

The trick is to fill in the name of the soundcard "D2" into "asound.conf". With every restart my PC changed the order of the sound cards in such a way, that it don't match with the given "asound.conf" card-number. That's a never ending story. Now CamillaDSP is running.

Kind regards
Raphael
 
Banned Sock Puppet
Joined 2020
Hi Jesper,
I got it going. Just had to recompile the asa_plug on the 64Bit rpi and use Henrik's camilladsp-arm8 version. :D


FYI, I just got my CM4, which uses the later ARM chip.(they apparently run ok at 2ghz.)
The other bit is 1 x Pci-e, which can take a harness ext, to the digi card on 4x or 8x.
That gives you a 64 channel AES67 i/o.


I already have the DSP working on a RPi3+ 64bit SBC, so the next bit is relatively easy with the dual sabre DAC.



so,-

I am discussing this dante driver for arm with the OEM, so hoping to drop off the A3 media centre to x-compile the arm driver from their Linux sources.


....that's of course as soon as we can get out of this dumb lockdown! :rolleyes: :mad:
 
Impulse Normalization

I am really enjoying camilladsp. I have moved from IIR to FIR filters. Using REW for measurements and my own Fourier codes, I can generate any filter I like, un constrained by causality. Rephase is way too limited by sliders. One question, that someone can answer. What is the correct normalization for the impulse response file? Mathematically a true impulse would have a single entry of 1/(sample time), but I know that the actual filters use 1. Right now I am normalizing to total power (i.e. the square root of the sum of the squares of the coefficients).
 
Hi Henrik, i have a little Problem with the new Version 0.4.2
My setup is input card is a hifiberry digiIO+ for capture. camilladsp runs on a RPI3b+ output is HDMI.
Now when the is no input (music) from the digiIO+ card camillasdp don't start playing. Whenn i start the input before camilladsp is starting, all is fine but when i stop the input and want to paly after some seconds camilladsp don't start.
pi@musicpi:~ $ /home/pi/camilladsp-linux-armv7/camilladsp /home/pi/2fir2.yaml -v
2021-01-19 21:15:13.486 DEBUG camilladsp - Read config file Some("/home/pi/2fir2.yaml")
2021-01-19 21:15:13.489 DEBUG camilladsp - Config is valid
2021-01-19 21:15:13.489 DEBUG camilladsp - Wait for config
2021-01-19 21:15:13.489 DEBUG camilladsp - Config ready
2021-01-19 21:15:13.490 DEBUG camillalib::filters - Build new pipeline
2021-01-19 21:15:13.490 DEBUG camillalib::alsadevice - Buffer frames 16384
2021-01-19 21:15:13.490 DEBUG camillalib::filters - Build from config
2021-01-19 21:15:13.491 DEBUG camillalib::filters - Build from config
2021-01-19 21:15:13.491 DEBUG camillalib::processing - build filters, waiting to start processing loop
2021-01-19 21:15:13.506 DEBUG camillalib::alsadevice - Opening audio device "hw:1,1" with parameters: HwParams { channels: Ok(2), rate: "Ok(44100) Hz", format: Ok(S16LE), access: Ok(RWInterleaved), period_size: "Ok(2048) frames", buffer_size: "Ok(16384) frames" }, SwParams(avail_min: Ok(2048) frames, start_threshold: Ok(6144) frames, stop_threshold: Ok(16384) frames)
2021-01-19 21:15:13.506 DEBUG camillalib::alsadevice - Audio device "hw:1,1" successfully opened
2021-01-19 21:15:13.507 DEBUG camilladsp - Playback thread ready to start
2021-01-19 21:15:13.508 DEBUG camillalib::alsadevice - Opening audio device "hw:2,0" with parameters: HwParams { channels: Ok(2), rate: "Ok(44100) Hz", format: Ok(S16LE), access: Ok(RWInterleaved), period_size: "Ok(4096) frames", buffer_size: "Ok(32768) frames" }, SwParams(avail_min: Ok(4096) frames, start_threshold: Ok(0) frames, stop_threshold: Ok(32768) frames)
2021-01-19 21:15:13.508 DEBUG camillalib::alsadevice - Audio device "hw:2,0" successfully opened
2021-01-19 21:15:13.508 DEBUG camilladsp - Capture thread ready to start
2021-01-19 21:15:13.508 DEBUG camilladsp - Both capture and playback ready, release barrier
2021-01-19 21:15:13.508 DEBUG camillalib::alsadevice - Starting playback loop
2021-01-19 21:15:13.508 DEBUG camillalib::alsadevice - Starting captureloop
2021-01-19 21:15:13.788 INFO camillalib::alsadevice - Starting playback from Prepared state
2021-01-19 21:16:19.037 WARN camillalib::alsadevice - Prepare playback after buffer underrun
2021-01-19 21:22:02.646 WARN camillalib::alsadevice - Prepare playback after buffer underrun
2021-01-19 21:22:12.886 WARN camillalib::alsadevice - Prepare playback after buffer underrun
2021-01-19 21:22:23.121 WARN camillalib::alsadevice - Capture timed out, error: ALSA function 'snd_pcm_readi' failed with error 'EIO: I/O error'
2021-01-19 21:22:23.121 DEBUG camillalib::alsadevice - Card inactive, pausing
2021-01-19 21:22:33.361 WARN camillalib::alsadevice - Capture timed out, error: ALSA function 'snd_pcm_readi' failed with error 'EIO: I/O error'
2021-01-19 21:22:33.361 DEBUG camillalib::alsadevice - Card inactive, pausing
2021-01-19 21:22:43.601 WARN camillalib::alsadevice - Capture timed out, error: ALSA function 'snd_pcm_readi' failed with error 'EIO: I/O error'
2021-01-19 21:22:43.601 DEBUG camillalib::alsadevice - Card inactive, pausing
2021-01-19 21:22:53.841 WARN camillalib::alsadevice - Capture timed out, error: ALSA function 'snd_pcm_readi' failed with error 'EIO: I/O error'
2021-01-19 21:22:53.841 DEBUG camillalib::alsadevice - Card inactive, pausing
2021-01-19 21:23:04.081 WARN camillalib::alsadevice - Capture timed out, error: ALSA function 'snd_pcm_readi' failed with error 'EIO: I/O error'
2021-01-19 21:23:04.081 DEBUG camillalib::alsadevice - Card inactive, pausing

when i made a short break less then about 2 seconds camilladsp starts normally.again.
In my "older" Version this bug or new "function" did not exist.

Kind regards Roland
 
This happens because the digi card stops providing data when there is no signal on the spdif input. Different cards seem to behave in different ways, so it's difficult to make a solution that works for everyone. The latest version has some logic that makes it work with the usb gadget mode, which also behaves odd when there is no signal.
To solve it we just need to figure out what is needed to get this card going again once the signal is back. Since I don't have a digiIO I'll need some help. We need to add some extra debug output. Would you be able to compile test versions yourself, if I tell you what to add and where?