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

Is the alsaloop really necessary in the chain?
In my case, yes, for two sources. One is roonbridge (at 192kHz S32LE into Loopback 0), the other spotifyd (at 44.1kHz S16LE into Loopback 1), both running on my RPi4. My third source (the RME ADI-2 FS Pro itself) doesn't use alsaloop. The pop only seems to arise intemittently when switching to spotifyd, and never when switching away from spotifyd.

I've just remembered that I used to use Loopback 1 for a second roonbridge output, also running at 192kHz S32LE, and never encountered any pops switching between the two roonbridge source/configurations.
 
Last edited:
@johnanon - where is alsaloop in your chain? Why can't you use CDSP instead?
If I'm missing something really simple, I'd love to know! I'm running CDSP on a headless RPi4 to which I stream in two ways:
  • Spotify client sends Spotify Connect instruction to spotifyd on RPi4 > alsaloop > CDSP > external soundcard
  • Roon Core > Roon Bridge > alsaloop > CDSP > external soundcard
So in the config file of spotifyd I have to specify the alsa device to which the output should be directed. Doesn't that have to be alsaloop in order to forward the stream to CDSP, because CDSP can't present itself as an alsa hardware device, can it?

Similarly, Roon's Core streams from my home server to a network device that the Roon Core recognises as compatible. On my RPi4 I have Roon Bridge running, which the Roon Core recognises. Roon Bridge offers the Core all the hardware devices it can detect locally (my external soundcard, the two virtual alsaloop cards and the RPi4's headphone output) so again I need to insert alsaloop between Roon Bridge and my external soundcard to loop the stream through CDSP.

I also have a third source which doesn't involve alsaloop at all since CDSP connects to the hardware directly:
  • CD > external card > CDSP > external card
Am I missing something really obvious?
 
Is the alsaloop really necessary in the chain?
I'm using alsaloop only to support analogue in on my PI from my TV.

TV (RCA) -> 5.1 soundcard (USB) -> (hw:2,0) Alsaloop (hw:Loopback,0) -> CamillaDSP (HDMI) -> Suptronics X6000 DAC

I don't have any USB based option nor SPDIF input on the Pi to be able to listen to TV through the speakers.

Having explained that back to you... I don't know why I don't capture directly from hw:2 and just switch the capture sources in CamillaDSP when it comes to sourcing from MPD.
 
@HenrikEnquist I am looking for easy step by step Camilladsp configuration tutorial on Windows 10. Could you please assist me here? Raspberry and Linux based are very well documented. However nothing I can find for Windows. Help would be highly appreciated!🙂
There is a readme specifically for Windows here: https://github.com/HEnquist/camilladsp/blob/master/backend_wasapi.md
I suppose you already looked there. Where are you stuck, and what are you trying to do? Just run the dsp, or also the gui?
 
@HenrikEnquist, I'm trying to get CDSP installed on PiCorePlayer (RPi4) and I've run into some issues.
I followed the instructions from Lykkedk's github page and can get the GUI running, but CDSP remains offline.
I have tried extracting your v1.0.3 file and running it, but I can't get it to start. I don't get any errors but nothing happens. Also, I get "-sh: camilladsp: not found" unless I prefix sudo. I tried piping to an err log file but it is empty. Switches -c -h -v don't help.

If you have any ideas I'd be greatfull.

THX

edit:
1672528363445.png
 
Last edited:
@HenrikEnquist, I'm trying to get CDSP installed on PiCorePlayer (RPi4) and I've run into some issues.
I followed the instructions from Lykkedk's github page and can get the GUI running, but CDSP remains offline.
I have tried extracting your v1.0.3 file and running it, but I can't get it to start. I don't get any errors but nothing happens. Also, I get "-sh: camilladsp: not found" unless I prefix sudo. I tried piping to an err log file but it is empty. Switches -c -h -v don't help.
even running the camilladsp binary without anything will give you error output.

Are you sure your PATH variable contains the location of where you put the binary? - which looks like a camilladsp sub-directory under your "tc" users home directory? e.g. /home/tc/camilladsp?

What is your full command line? including your YML config?

Paste / attach your YML here so we can validate it.
 
@chuckt62 PiCorePlayer (or rather TinyCoreLinux that it's based on) works a little different than normal Linux systems. I have never used it so I can't help you with where to place binaries etc, but others here should be able to help with that. If you need to use sudo to run camilladsp, then you have some permission issue.
Is it a 32 or 64-bit system? You need to get the matching camilladsp build. Running "camilladsp --help" must print the help text. Before that works, there is no point in trying anything else
 

chuckt62

Member
2022-11-10 1:01 am
I somehow ended up bricking that SD card and started over w/32bit pCP. I'll try again w/64bit if I can get it running.
Some progress has been made though. I can run CDSP from cli and gen the log file. It might be failing from the loopback device, I can't figure out how to create it in pCP as it doesn't use module.d (I used 'snd-aloop' in the file snd-aloop.conf and placed it in /etc/modules.d on ubuntu).

config.yml:
devices:
capture_samplerate: 44100
chunksize: 4096
enable_rate_adjust: true
enable_resampling: true
resampler_type: BalancedAsync
samplerate: 96000
silence_threshold: -100
silence_timeout: 300

capture:
channels: 2
device: hw:Loopback,0
format: S32LE
type: Alsa

playback:
channels: 4
device: hw:M4
format: S32LE
type: Alsa

filters:
volume:
parameters:
ramp_time: 200
type: Volume
mixers:
2x4:
channels:
in: 2
out: 4
mapping:
- dest: 0
mute: false
sources:
- channel: 0
gain: 0
inverted: false
mute: false
- dest: 1
mute: false
sources:
- channel: 1
gain: 0
inverted: false
mute: false
- dest: 2
mute: false
sources:
- channel: 0
gain: 0
inverted: false
mute: false
- dest: 3
mute: false
sources:
- channel: 1
gain: 0
inverted: false
mute: false
pipeline:
- name: 2x4
type: Mixer
- channel: 0
names:
- volume
type: Filter
- channel: 1
names:
- volume
type: Filter
- channel: 2
names:
- volume
type: Filter
- channel: 3
names:
- volume
type: Filter

log:
2023-01-02 03:21:53.153792 INFO [src/bin.rs:711] CamillaDSP version 1.0.1
2023-01-02 03:21:53.153998 INFO [src/bin.rs:712] Running on linux, arm
2023-01-02 03:21:53.154245 DEBUG [src/bin.rs:754] Read config file Some("/mnt/mmcblk0p2/tce/Camilla_Extensions/camillagui/cdsp_configs/config.yml")
2023-01-02 03:21:53.155877 DEBUG [src/bin.rs:773] Config is valid
2023-01-02 03:21:53.156011 DEBUG [src/socketserver.rs:260] Start websocket server on 127.0.0.1:1234
2023-01-02 03:21:53.156265 DEBUG [src/bin.rs:857] Wait for config
2023-01-02 03:21:53.156361 DEBUG [src/bin.rs:890] Config ready
2023-01-02 03:21:53.156777 DEBUG [src/bin.rs:213] Using channels [true, true]
2023-01-02 03:21:53.156842 DEBUG [src/filters.rs:450] Build new pipeline
2023-01-02 03:21:53.156934 DEBUG [src/alsadevice.rs:909] Buffer frames 4096
2023-01-02 03:21:53.156981 DEBUG [src/filters.rs:355] Build from config
2023-01-02 03:21:53.157127 DEBUG [src/filters.rs:355] Build from config
2023-01-02 03:21:53.157254 DEBUG [src/filters.rs:355] Build from config
2023-01-02 03:21:53.157329 DEBUG [src/alsadevice.rs:924] Creating resampler
2023-01-02 03:21:53.157345 DEBUG [src/filters.rs:355] Build from config
2023-01-02 03:21:53.157439 DEBUG [src/processing.rs:19] build filters, waiting to start processing loop
2023-01-02 03:21:53.157428 DEBUG [src/audiodevice.rs:418] Creating asynchronous resampler with parameters: InterpolationParameters { sinc_len: 128, f_cutoff: 0.92591465, oversampling_factor: 1024, interpolation: Linear, window: Blackman2 }
2023-01-02 03:21:53.161064 ERROR [src/bin.rs:344] Playback error: ALSA function 'snd_pcm_open' failed with error 'EBUSY: Device or resource busy'
2023-01-02 03:21:53.161167 DEBUG [src/bin.rs:349] Error while starting, release barrier
2023-01-02 03:21:53.201699 DEBUG [src/processing.rs:21] Processing loop starts now!
2023-01-02 03:21:53.201822 DEBUG [src/bin.rs:352] Wait for capture thread to exit..
2023-01-02 03:21:53.201903 ERROR [src/processing.rs:50] Message channel error: receiving on a closed channel
2023-01-02 03:21:53.201967 INFO [src/processing.rs:53] Playback thread has already stopped.
2023-01-02 03:21:53.201975 DEBUG [src/bin.rs:915] Restarting with new config
2023-01-02 03:21:53.202032 DEBUG [src/bin.rs:857] Wait for config
2023-01-02 03:21:53.202093 DEBUG [src/bin.rs:860] No config and not in wait mode, exiting!
 

chuckt62

Member
2022-11-10 1:01 am
I created the loopback device and get a little further, "sudo modprobe snd-aloop", but I don't know how to make it persistent yet.
It's probably failing on the playback device now, MOTU M4. I have only been able make it work with plughw:CARD=M4,DEV=0 on pCP. It worked with hw:CARD=M4,DEV=0 on ubuntu... Or, maybe it's because I'm listening to it while trying to start CDSP?

log:
2023-01-02 04:08:23.653268 INFO [src/bin.rs:711] CamillaDSP version 1.0.1
2023-01-02 04:08:23.653551 INFO [src/bin.rs:712] Running on linux, arm
2023-01-02 04:08:23.653809 DEBUG [src/bin.rs:754] Read config file Some("/mnt/mmcblk0p2/tce/Camilla_Extensions/camillagui/cdsp_configs/config.yml")
2023-01-02 04:08:23.655713 DEBUG [src/bin.rs:773] Config is valid
2023-01-02 04:08:23.655897 DEBUG [src/socketserver.rs:260] Start websocket server on 127.0.0.1:1234
2023-01-02 04:08:23.656289 DEBUG [src/bin.rs:857] Wait for config
2023-01-02 04:08:23.656436 DEBUG [src/bin.rs:890] Config ready
2023-01-02 04:08:23.656961 DEBUG [src/bin.rs:213] Using channels [true, true]
2023-01-02 04:08:23.657272 DEBUG [src/alsadevice.rs:909] Buffer frames 4096
2023-01-02 04:08:23.657738 DEBUG [src/filters.rs:450] Build new pipeline
2023-01-02 04:08:23.657748 DEBUG [src/alsadevice.rs:924] Creating resampler
2023-01-02 04:08:23.657988 DEBUG [src/audiodevice.rs:418] Creating asynchronous resampler with parameters: InterpolationParameters { sinc_len: 128, f_cutoff: 0.92591465, oversampling_factor: 1024, interpolation: Linear, window: Blackman2 }
2023-01-02 04:08:23.658277 DEBUG [src/filters.rs:355] Build from config
2023-01-02 04:08:23.658526 DEBUG [src/filters.rs:355] Build from config
2023-01-02 04:08:23.658790 DEBUG [src/filters.rs:355] Build from config
2023-01-02 04:08:23.659030 DEBUG [src/filters.rs:355] Build from config
2023-01-02 04:08:23.659387 DEBUG [src/processing.rs:19] build filters, waiting to start processing loop
2023-01-02 04:08:23.661492 ERROR [src/bin.rs:344] Playback error: ALSA function 'snd_pcm_open' failed with error 'EBUSY: Device or resource busy'
2023-01-02 04:08:23.661578 DEBUG [src/bin.rs:349] Error while starting, release barrier
2023-01-02 04:08:23.698203 DEBUG [src/alsadevice.rs:412] Capture: supported channels, min: 1, max: 32, list: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32]
2023-01-02 04:08:23.698286 DEBUG [src/alsadevice.rs:413] Capture: setting channels to 2
2023-01-02 04:08:23.698377 DEBUG [src/alsadevice.rs:417] Capture: supported samplerates: Range(8000, 192000)
2023-01-02 04:08:23.698437 DEBUG [src/alsadevice.rs:418] Capture: setting rate to 44100
2023-01-02 04:08:23.698513 DEBUG [src/alsadevice.rs:422] Capture: supported sample formats: [S16LE, S24LE, S24LE3, S32LE, FLOAT32LE]
2023-01-02 04:08:23.698572 DEBUG [src/alsadevice.rs:423] Capture: setting format to S32LE
2023-01-02 04:08:23.698837 DEBUG [src/alsadevice.rs:454] Opening audio device "hw:Loopback,0" with parameters: HwParams { channels: Ok(2), rate: "Ok(44100) Hz", format: Ok(S32LE), access: Ok(RWInterleaved), period_size: "Ok(1024) frames", buffer_size: "Ok(8192) frames" }, SwParams(avail_min: Ok(4096) frames, start_threshold: Ok(0) frames, stop_threshold: Ok(8192) frames)
2023-01-02 04:08:23.698922 DEBUG [src/alsadevice.rs:459] Audio device "hw:Loopback,0" successfully opened
2023-01-02 04:08:23.698997 DEBUG [src/alsadevice.rs:950] Starting captureloop
2023-01-02 04:08:23.699022 DEBUG [src/bin.rs:352] Wait for capture thread to exit..
2023-01-02 04:08:23.699099 DEBUG [src/processing.rs:21] Processing loop starts now!
2023-01-02 04:08:23.699680 INFO [src/alsadevice.rs:588] Capture device supports rate adjust
2023-01-02 04:08:23.699743 WARN [src/alsadevice.rs:592] Async resampler not needed since capture device supports rate adjust. Switch to Sync type to save CPU time.
2023-01-02 04:08:23.699805 DEBUG [src/alsadevice.rs:620] Exit message received, sending EndOfStream
2023-01-02 04:08:23.699909 INFO [src/processing.rs:37] Playback thread has already stopped.
2023-01-02 04:08:23.700288 DEBUG [src/bin.rs:915] Restarting with new config
2023-01-02 04:08:23.700349 DEBUG [src/bin.rs:857] Wait for config
2023-01-02 04:08:23.700406 DEBUG [src/bin.rs:860] No config and not in wait mode, exiting!
 
Last edited:

chuckt62

Member
2022-11-10 1:01 am
If I pause the player and click the 'Power' button (it's not setup to actually kill the player), it goes further but it seems to have failed and I need to Ctrl-C out of it.

EDIT: well it looks like CDSP is actually running, no need to Ctrl-C out.
I just don't get any sound when I start the layer.
1672635112333.png


big log:
2023-01-02 04:36:52.673415 INFO [src/bin.rs:711] CamillaDSP version 1.0.1
2023-01-02 04:36:52.673548 INFO [src/bin.rs:712] Running on linux, arm
2023-01-02 04:36:52.673742 DEBUG [src/bin.rs:754] Read config file Some("/mnt/mmcblk0p2/tce/Camilla_Extensions/camillagui/cdsp_configs/config.yml")
2023-01-02 04:36:52.675225 DEBUG [src/bin.rs:773] Config is valid
2023-01-02 04:36:52.675368 DEBUG [src/socketserver.rs:260] Start websocket server on 127.0.0.1:1234
2023-01-02 04:36:52.675606 DEBUG [src/bin.rs:857] Wait for config
2023-01-02 04:36:52.675748 DEBUG [src/bin.rs:890] Config ready
2023-01-02 04:36:52.676197 DEBUG [src/bin.rs:213] Using channels [true, true]
2023-01-02 04:36:52.676340 DEBUG [src/filters.rs:450] Build new pipeline
2023-01-02 04:36:52.676464 DEBUG [src/alsadevice.rs:909] Buffer frames 4096
2023-01-02 04:36:52.676635 DEBUG [src/filters.rs:355] Build from config
2023-01-02 04:36:52.676794 DEBUG [src/alsadevice.rs:924] Creating resampler
2023-01-02 04:36:52.676902 DEBUG [src/audiodevice.rs:418] Creating asynchronous resampler with parameters: InterpolationParameters { sinc_len: 128, f_cutoff: 0.92591465, oversampling_factor: 1024, interpolation: Linear, window: Blackman2 }
2023-01-02 04:36:52.676921 DEBUG [src/filters.rs:355] Build from config
2023-01-02 04:36:52.677171 DEBUG [src/filters.rs:355] Build from config
2023-01-02 04:36:52.677358 DEBUG [src/filters.rs:355] Build from config
2023-01-02 04:36:52.677546 DEBUG [src/processing.rs:19] build filters, waiting to start processing loop
2023-01-02 04:36:52.680305 DEBUG [src/alsadevice.rs:412] Playback: supported channels, min: 4, max: 4, list: [4]
2023-01-02 04:36:52.680421 DEBUG [src/alsadevice.rs:413] Playback: setting channels to 4
2023-01-02 04:36:52.680673 DEBUG [src/alsadevice.rs:417] Playback: supported samplerates: Discrete([44100, 48000, 88200, 96000, 176400, 192000])
2023-01-02 04:36:52.680772 DEBUG [src/alsadevice.rs:418] Playback: setting rate to 96000
2023-01-02 04:36:52.680935 DEBUG [src/alsadevice.rs:422] Playback: supported sample formats: [S32LE]
2023-01-02 04:36:52.681038 DEBUG [src/alsadevice.rs:423] Playback: setting format to S32LE
2023-01-02 04:36:52.686393 DEBUG [src/alsadevice.rs:454] Opening audio device "hw:M4" with parameters: HwParams { channels: Ok(4), rate: "Ok(96000) Hz", format: Ok(S32LE), access: Ok(RWInterleaved), period_size: "Ok(1024) frames", buffer_size: "Ok(8192) frames" }, SwParams(avail_min: Ok(4096) frames, start_threshold: Ok(3072) frames, stop_threshold: Ok(8192) frames)
2023-01-02 04:36:52.686551 DEBUG [src/alsadevice.rs:459] Audio device "hw:M4" successfully opened
2023-01-02 04:36:52.686696 DEBUG [src/bin.rs:323] Playback thread ready to start
2023-01-02 04:36:52.725088 DEBUG [src/alsadevice.rs:412] Capture: supported channels, min: 1, max: 32, list: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32]
2023-01-02 04:36:52.725173 DEBUG [src/alsadevice.rs:413] Capture: setting channels to 2
2023-01-02 04:36:52.725326 DEBUG [src/alsadevice.rs:417] Capture: supported samplerates: Range(8000, 192000)
2023-01-02 04:36:52.725386 DEBUG [src/alsadevice.rs:418] Capture: setting rate to 44100
2023-01-02 04:36:52.725462 DEBUG [src/alsadevice.rs:422] Capture: supported sample formats: [S16LE, S24LE, S24LE3, S32LE, FLOAT32LE]
2023-01-02 04:36:52.725535 DEBUG [src/alsadevice.rs:423] Capture: setting format to S32LE
2023-01-02 04:36:52.725783 DEBUG [src/alsadevice.rs:454] Opening audio device "hw:Loopback,0" with parameters: HwParams { channels: Ok(2), rate: "Ok(44100) Hz", format: Ok(S32LE), access: Ok(RWInterleaved), period_size: "Ok(1024) frames", buffer_size: "Ok(8192) frames" }, SwParams(avail_min: Ok(4096) frames, start_threshold: Ok(0) frames, stop_threshold: Ok(8192) frames)
2023-01-02 04:36:52.725871 DEBUG [src/alsadevice.rs:459] Audio device "hw:Loopback,0" successfully opened
2023-01-02 04:36:52.725962 DEBUG [src/bin.rs:333] Capture thread ready to start
2023-01-02 04:36:52.726022 DEBUG [src/bin.rs:336] Both capture and playback ready, release barrier
2023-01-02 04:36:52.726089 DEBUG [src/bin.rs:338] Supervisor loop starts now!
2023-01-02 04:36:52.726105 DEBUG [src/alsadevice.rs:950] Starting captureloop
2023-01-02 04:36:52.726114 DEBUG [src/alsadevice.rs:856] Starting playback loop
2023-01-02 04:36:52.726187 DEBUG [src/processing.rs:21] Processing loop starts now!
2023-01-02 04:36:52.726855 INFO [src/alsadevice.rs:588] Capture device supports rate adjust
2023-01-02 04:36:52.726918 WARN [src/alsadevice.rs:592] Async resampler not needed since capture device supports rate adjust. Switch to Sync type to save CPU time.
2023-01-02 04:36:52.726992 DEBUG [src/alsadevice.rs:248] Starting capture from state: SND_PCM_STATE_PREPARED, Ready to start
2023-01-02 04:36:52.794140 INFO [src/alsadevice.rs:160] Starting playback from Prepared state
2023-01-02 04:36:52.993340 DEBUG [/cargo/registry/src/github.com-1ecc6299db9ec823/tungstenite-0.16.0/src/handshake/server.rs:282] Server handshake done.
2023-01-02 04:36:52.997065 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetVersion)
2023-01-02 04:36:53.374829 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetState)
2023-01-02 04:36:53.375990 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureSignalRms)
2023-01-02 04:36:53.377109 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureSignalPeak)
2023-01-02 04:36:53.378182 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetPlaybackSignalRms)
2023-01-02 04:36:53.379306 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetPlaybackSignalPeak)
2023-01-02 04:36:53.380546 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureRate)
2023-01-02 04:36:53.381636 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetRateAdjust)
2023-01-02 04:36:53.382626 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetBufferLevel)
2023-01-02 04:36:53.383617 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetClippedSamples)
2023-01-02 04:36:54.374192 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetState)
2023-01-02 04:36:54.375124 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureSignalRms)
2023-01-02 04:36:54.375992 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureSignalPeak)
2023-01-02 04:36:54.376839 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetPlaybackSignalRms)
2023-01-02 04:36:54.377723 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetPlaybackSignalPeak)
2023-01-02 04:36:55.371304 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetVolume)
2023-01-02 04:36:55.375776 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetMute)
2023-01-02 04:36:55.377921 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetState)
2023-01-02 04:36:55.378730 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureSignalRms)
2023-01-02 04:36:55.379487 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureSignalPeak)
2023-01-02 04:36:55.380225 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetPlaybackSignalRms)
2023-01-02 04:36:55.381073 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetPlaybackSignalPeak)
2023-01-02 04:36:55.382351 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureRate)
2023-01-02 04:36:55.383546 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetRateAdjust)
2023-01-02 04:36:55.384665 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetBufferLevel)
2023-01-02 04:36:55.385790 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetClippedSamples)
2023-01-02 04:36:56.372209 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetState)
2023-01-02 04:36:56.373354 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureSignalRms)
2023-01-02 04:36:56.374417 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureSignalPeak)
2023-01-02 04:36:56.375453 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetPlaybackSignalRms)
2023-01-02 04:36:56.376520 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetPlaybackSignalPeak)
2023-01-02 04:36:57.366179 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetVolume)
2023-01-02 04:36:57.369449 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetMute)
2023-01-02 04:36:57.371983 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetState)
2023-01-02 04:36:57.373089 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureSignalRms)
2023-01-02 04:36:57.374163 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureSignalPeak)
2023-01-02 04:36:57.375203 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetPlaybackSignalRms)
2023-01-02 04:36:57.376290 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetPlaybackSignalPeak)
2023-01-02 04:36:57.377484 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureRate)
2023-01-02 04:36:57.378529 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetRateAdjust)
2023-01-02 04:36:57.379526 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetBufferLevel)
2023-01-02 04:36:57.380507 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetClippedSamples)
2023-01-02 04:36:58.368000 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetState)
2023-01-02 04:36:58.369080 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureSignalRms)
2023-01-02 04:36:58.370163 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureSignalPeak)
2023-01-02 04:36:58.371280 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetPlaybackSignalRms)
2023-01-02 04:36:58.372446 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetPlaybackSignalPeak)
2023-01-02 04:36:59.366354 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetVolume)
2023-01-02 04:36:59.369285 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetMute)
2023-01-02 04:36:59.371487 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetState)
2023-01-02 04:36:59.372490 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureSignalRms)
2023-01-02 04:36:59.373434 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureSignalPeak)
2023-01-02 04:36:59.374537 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetPlaybackSignalRms)
2023-01-02 04:36:59.375628 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetPlaybackSignalPeak)
2023-01-02 04:36:59.376758 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureRate)
2023-01-02 04:36:59.377683 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetRateAdjust)
2023-01-02 04:36:59.378473 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetBufferLevel)
2023-01-02 04:36:59.379247 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetClippedSamples)
2023-01-02 04:37:00.355783 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetState)
2023-01-02 04:37:00.356547 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureSignalRms)
2023-01-02 04:37:00.357247 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureSignalPeak)
2023-01-02 04:37:00.357923 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetPlaybackSignalRms)
2023-01-02 04:37:00.358630 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetPlaybackSignalPeak)
2023-01-02 04:37:01.371757 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetVolume)
2023-01-02 04:37:01.374858 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetMute)
2023-01-02 04:37:01.376619 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetState)
2023-01-02 04:37:01.377394 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureSignalRms)
2023-01-02 04:37:01.378147 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureSignalPeak)
2023-01-02 04:37:01.378876 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetPlaybackSignalRms)
2023-01-02 04:37:01.379637 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetPlaybackSignalPeak)
2023-01-02 04:37:01.380484 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureRate)
2023-01-02 04:37:01.381284 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetRateAdjust)
2023-01-02 04:37:01.382006 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetBufferLevel)
2023-01-02 04:37:01.382691 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetClippedSamples)
2023-01-02 04:37:02.369741 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetState)
2023-01-02 04:37:02.370633 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureSignalRms)
2023-01-02 04:37:02.371727 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureSignalPeak)
2023-01-02 04:37:02.373187 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetPlaybackSignalRms)
2023-01-02 04:37:02.374584 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetPlaybackSignalPeak)
2023-01-02 04:37:02.732634 DEBUG [src/audiodevice.rs:614] Current buffer level: 4885.9, corrected capture rate: 99.9589%
2023-01-02 04:37:02.732824 DEBUG [src/alsadevice.rs:509] Playback buffer level: 4885.9, signal rms: [-1000.0, -1000.0, -1000.0, -1000.0]
2023-01-02 04:37:02.732868 DEBUG [src/bin.rs:423] SetSpeed message received
2023-01-02 04:37:03.371258 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetVolume)
2023-01-02 04:37:03.374665 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetMute)
2023-01-02 04:37:03.376947 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetState)
2023-01-02 04:37:03.377876 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureSignalRms)
2023-01-02 04:37:03.378755 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureSignalPeak)
2023-01-02 04:37:03.379590 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetPlaybackSignalRms)
2023-01-02 04:37:03.380460 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetPlaybackSignalPeak)
2023-01-02 04:37:03.381511 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureRate)
2023-01-02 04:37:03.382387 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetRateAdjust)
2023-01-02 04:37:03.383206 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetBufferLevel)
2023-01-02 04:37:03.383997 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetClippedSamples)
2023-01-02 04:37:04.368671 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetState)
2023-01-02 04:37:04.369912 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureSignalRms)
2023-01-02 04:37:04.371261 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureSignalPeak)
2023-01-02 04:37:04.372516 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetPlaybackSignalRms)
2023-01-02 04:37:04.373709 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetPlaybackSignalPeak)
2023-01-02 04:37:05.366334 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetVolume)
2023-01-02 04:37:05.369327 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetMute)
2023-01-02 04:37:05.372481 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetState)
2023-01-02 04:37:05.374143 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureSignalRms)
2023-01-02 04:37:05.375763 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureSignalPeak)
2023-01-02 04:37:05.377356 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetPlaybackSignalRms)
2023-01-02 04:37:05.379063 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetPlaybackSignalPeak)
2023-01-02 04:37:05.380844 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureRate)
2023-01-02 04:37:05.382481 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetRateAdjust)
2023-01-02 04:37:05.384121 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetBufferLevel)
2023-01-02 04:37:05.385179 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetClippedSamples)
2023-01-02 04:37:06.366770 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetState)
2023-01-02 04:37:06.367742 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureSignalRms)
2023-01-02 04:37:06.368602 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetCaptureSignalPeak)
2023-01-02 04:37:06.369410 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetPlaybackSignalRms)
2023-01-02 04:37:06.370432 DEBUG [src/socketserver.rs:340] parsed command: Ok(GetPlaybackSignalPeak)
2023-01-02 04:37:07.037741 DEBUG [src/bin.rs:289] Exit requested...
2023-01-02 04:37:07.067582 DEBUG [src/alsadevice.rs:620] Exit message received, sending EndOfStream
2023-01-02 04:37:07.102756 DEBUG [src/bin.rs:909] Exiting
 
Last edited:
It's running now. Camillagui somehow picked up the plughw:M4 from the Squeezlite setup, even though my config file had hw:M4.
I added the plug prefix to the loopback device and boom... it works.
Now to figure out persistent snd-aloop, running cdsp at startup and why pCP needs the plug hw :scratch2:.
 

chuckt62

Member
2022-11-10 1:01 am
It's running now. Camillagui somehow picked up the plughw:M4 from the Squeezlite setup, even though my config file had hw:M4.
I added the plug prefix to the loopback device and boom... it works.
Now to figure out persistent snd-aloop, running cdsp at startup and why pCP needs the plug hw :scratch2:.
I put 'modprobe snd-aloop' in /opt/bootlocal.sh to get a persistent loopback device.
I can't get cdsp to load from there though...
 

TNA

Member
2014-02-25 8:16 pm
The error message means something in kernel-space is causing the issue. Since CamillaDSP runs in user space, it can't cause this. There must be something like a driver bug, or a hardware issue. Check the kernel logs, there may be something useful.

The earlier results with som underruns with small chunk sizes seem reasonable. 256 frames at 96kHz is quite small.
Update for anyone interested:
There seems to be a problem with linux and handling Intel's CPU P-states in combination with firewire interfaces.
Turning off C-states did not help. I have found the solution/workaround by accident - when stress testing the cpu (100% load of all cores with s-tui) CDSP buffer level dropped and became rock solid (5-hour test with no underruns).

The solution was to turn CPU frequency scaling governor to performance in linux kernel (running the CPU at fixed speed set in the BIOS should also work). I highly recommend this solution even if you don't have firewire, it should improve stability/buffer level for every type of interface. CPU frequency scaling doesn't seem to work well for audio pipelines.
I was able to achieve completely stable setup with:
96kHz sample rate, 512 chunk size and rock-solid 256 sample buffer size (going below 2048 samples of buffer wasn't possible before the workaround)
Setup:
Xeon E3-1220 V6 + TI Firewire card + MOTU 828MK3 all IO enabled and in active use

Cheers,
Tom
 
  • Like
Reactions: 1 user