• Welcome to ASR. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

CamillaDSP "Capture device is stalled" and afterwards degraded sound quality

Jeroen (nl)

Member
Joined
Sep 3, 2025
Messages
8
Likes
1
Hi all,

I am new member of ASR, although I've been reading forum posts for a long time. Thanks to everyone for the the great amount of expertise on ASR.

Thanks especially to @HenrikEnquist for the wonderful CamillaDSP. I use CamillaDSP for my active 3 way loudspeakers that I built this summer. It is running on a Raspberry Pi5 with a Hifiberry DAC8x card and a Hifime UR23 SPDIF Optical to USB converter. Source is a cd player with optical output connected to the Hifime UR23.


I have problem that I could really use some help with. A couple of times a day I get a "Capture device is stalled, processing is stalled" message in CamillaDSP log. After that music continues to play, however sounds quality is degraded. It sound as if the music comes from "under water" (for lack of a better description). The sound is very flat and far away. After a restart of CamillaDSP the sound is back as normal. I've tried both v3.0.1 and v4.0.0-preview.1 with similar results.

I've searched this forum and read the stalled warning might have something to do with the USB implementation of Raspberry Pi. Is there something I can do to fix this? Thanks a lot for your time and help.

Included is an excerpt of the log (Camilla v4.0.0-preview.1 with loglevel debug) and my yaml config file (which is a work in progress).

Best wishes, Jeroen (from the Netherlands)


2025-09-03 18:52:59.955357 DEBUG [camillalib::alsadevice] <src/alsadevice.rs:661> PB: buffer level: 16245.3, signal rms: Some(HistoryRecord { time: Instant { tv_sec: 7318, tv_nsec: 893232233 }, values: [0.05820257, 0.0774061, 0.056622624, 0.055801388, 0.0123264855, 0.010731449] })
2025-09-03 18:53:09.986925 DEBUG [camillalib::alsadevice] <src/alsadevice.rs:661> PB: buffer level: 16112.5, signal rms: Some(HistoryRecord { time: Instant { tv_sec: 7328, tv_nsec: 924800764 }, values: [0.08723652, 0.09333742, 0.020751934, 0.024843654, 0.01657099, 0.020453578] })
2025-09-03 18:53:20.018496 DEBUG [camillalib::alsadevice] <src/alsadevice.rs:661> PB: buffer level: 16159.9, signal rms: Some(HistoryRecord { time: Instant { tv_sec: 7338, tv_nsec: 956371336 }, values: [0.06999039, 0.060905885, 0.046887748, 0.04073113, 0.028128432, 0.027266929] })
2025-09-03 18:53:30.050061 DEBUG [camillalib::alsadevice] <src/alsadevice.rs:661> PB: buffer level: 16131.5, signal rms: Some(HistoryRecord { time: Instant { tv_sec: 7348, tv_nsec: 987937280 }, values: [0.0766007, 0.06580161, 0.028400311, 0.029715413, 0.0110422345, 0.015465537] })
2025-09-03 18:53:40.081646 DEBUG [camillalib::alsadevice] <src/alsadevice.rs:661> PB: buffer level: 16226.3, signal rms: Some(HistoryRecord { time: Instant { tv_sec: 7359, tv_nsec: 19521374 }, values: [0.047146652, 0.05692909, 0.086686626, 0.077596426, 0.020044856, 0.01620069] })
2025-09-03 18:53:50.113241 DEBUG [camillalib::alsadevice] <src/alsadevice.rs:661> PB: buffer level: 16122.0, signal rms: Some(HistoryRecord { time: Instant { tv_sec: 7369, tv_nsec: 51098916 }, values: [0.06906862, 0.07494094, 0.035982966, 0.045820486, 0.028175028, 0.026672957] })
2025-09-03 18:54:00.144798 DEBUG [camillalib::alsadevice] <src/alsadevice.rs:661> PB: buffer level: 16159.9, signal rms: Some(HistoryRecord { time: Instant { tv_sec: 7379, tv_nsec: 82674163 }, values: [0.056263633, 0.054948445, 0.052266262, 0.04722549, 0.023716409, 0.022585042] })
2025-09-03 18:54:10.176371 DEBUG [camillalib::alsadevice] <src/alsadevice.rs:661> PB: buffer level: 16112.5, signal rms: Some(HistoryRecord { time: Instant { tv_sec: 7389, tv_nsec: 114246952 }, values: [0.061002094, 0.07572879, 0.064998694, 0.0625473, 0.027172962, 0.021353222] })
2025-09-03 18:54:20.207947 DEBUG [camillalib::alsadevice] <src/alsadevice.rs:661> PB: buffer level: 16140.9, signal rms: Some(HistoryRecord { time: Instant { tv_sec: 7399, tv_nsec: 145823393 }, values: [0.050622616, 0.07315254, 0.095721886, 0.06837818, 0.015861312, 0.018467277] })
2025-09-03 18:54:24.852248 WARN [camillalib::alsadevice] <src/alsadevice.rs:258> Prepare capture device
2025-09-03 18:54:25.220672 INFO [camillalib::alsadevice] <src/alsadevice.rs:999> Capture device is stalled, processing is stalled
2025-09-03 18:54:25.220729 DEBUG [camillalib::alsadevice] <src/alsadevice.rs:270> Starting capture from state: SND_PCM_STATE_PREPARED, Ready to start
2025-09-03 18:54:25.316606 DEBUG [camillalib::alsadevice] <src/alsadevice.rs:676> Pausing playback device
2025-09-03 18:54:25.316803 DEBUG [camillalib::alsadevice] <src/alsadevice.rs:138> PB: Device is in paused state, unpausing.
2025-09-03 18:54:30.239661 DEBUG [camillalib::alsadevice] <src/alsadevice.rs:661> PB: buffer level: 12205.8, signal rms: Some(HistoryRecord { time: Instant { tv_sec: 7409, tv_nsec: 177537286 }, values: [0.06862808, 0.111824505, 0.06528889, 0.05606885, 0.02655255, 0.024455914] })
2025-09-03 18:54:40.271239 DEBUG [camillalib::alsadevice] <src/alsadevice.rs:661> PB: buffer level: 9039.3, signal rms: Some(HistoryRecord { time: Instant { tv_sec: 7419, tv_nsec: 209115501 }, values: [0.057560045, 0.06884623, 0.061673593, 0.06674757, 0.035669886, 0.035798445] })
2025-09-03 18:54:50.302816 DEBUG [camillalib::alsadevice] <src/alsadevice.rs:661> PB: buffer level: 10234.0, signal rms: Some(HistoryRecord { time: Instant { tv_sec: 7429, tv_nsec: 240692689 }, values: [0.06304742, 0.08617225, 0.10797025, 0.09430281, 0.022711642, 0.02479111] })
2025-09-03 18:55:00.334395 DEBUG [camillalib::alsadevice] <src/alsadevice.rs:661> PB: buffer level: 10234.0, signal rms: Some(HistoryRecord { time: Instant { tv_sec: 7439, tv_nsec: 272271835 }, values: [0.09415564, 0.1126116, 0.10032869, 0.08310297, 0.021799896, 0.019183636] })
2025-09-03 18:55:10.365975 DEBUG [camillalib::alsadevice] <src/alsadevice.rs:661> PB: buffer level: 10234.0, signal rms: Some(HistoryRecord { time: Instant { tv_sec: 7449, tv_nsec: 303850663 }, values: [0.095964685, 0.09508707, 0.09518262, 0.0902367, 0.03184375, 0.028680656] })
2025-09-03 18:55:20.397555 DEBUG [camillalib::alsadevice] <src/alsadevice.rs:661> PB: buffer level: 10234.0, signal rms: Some(HistoryRecord { time: Instant { tv_sec: 7459, tv_nsec: 335431047 }, values: [0.07163042, 0.094582014, 0.04985906, 0.05394457, 0.020523412, 0.017987117] })
2025-09-03 18:55:30.429135 DEBUG [camillalib::alsadevice] <src/alsadevice.rs:661> PB: buffer level: 10234.0, signal rms: Some(HistoryRecord { time: Instant { tv_sec: 7469, tv_nsec: 367011676 }, values: [0.09648392, 0.13528357, 0.10480274, 0.09716108, 0.028883446, 0.027107224] })


title: ""
description: ""


devices:
samplerate: 44100
chunksize: 2048
capture:
type: Alsa
channels: 2
device: "hw:Rx"
format: S16LE
playback:
type: Alsa
channels: 6
device: "hw:sndrpihifiberry"

mixers:
to6chan:
channels:
in: 2
out: 6
mapping:
#woofer
- dest: 0
sources:
- channel: 0
gain: 0
inverted: false
- dest: 1
sources:
- channel: 1
gain: 0
inverted: false
#midrange
- dest: 2
sources:
- channel: 0
gain: 0
inverted: false
- dest: 3
sources:
- channel: 1
gain: 0
inverted: false
#tweeter
- dest: 4
sources:
- channel: 0
gain: 0
inverted: false
- dest: 5
sources:
- channel: 1
gain: 0
inverted: false

filters:
wooferXFIR:
type: Conv
parameters:
filename: fir-2048taps-low-pass-linkwitz-riley-48db-300hz.dbl
type: Raw
format: FLOAT64LE
midrangeXFIR:
type: Conv
parameters:
filename: fir-2048taps-high-pass-linkwitz-riley-48db-300hz-low-pass-linkwitz-riley-48db-2500hz.dbl
type: Raw
format: FLOAT64LE
tweeterXFIR:
type: Conv
parameters:
filename: fir-2048taps-high-pass-linkwitz-riley-48db-2500hz.dbl
type: Raw
format: FLOAT64LE

dropgain:
type: Gain
parameters:
gain: -10

lwt:
type: Biquad
description: ""
parameters:
type: LinkwitzTransform
freq_act: 39
q_act: 0.6
freq_target: 20
q_target: 0.707

midrangedelay:
type: Delay
description: "Time alignment for midrange"
parameters:
delay: 0.32
unit: ms

tweeterdelay:
type: Delay
description: "Time alignment for tweeters"
parameters:
delay: 0.43
unit: ms

rew_midrange_1:
type: Biquad
parameters:
type: Peaking
freq: 676.0
gain: -0.4
q: 1.229
rew_midrange_2:
type: Biquad
parameters:
type: Peaking
freq: 1071.0
gain: 4.8
q: 3.04
rew_midrange_3:
type: Biquad
parameters:
type: Peaking
freq: 1502.0
gain: -5.8
q: 1.069
rew_midrange_4:
type: Biquad
parameters:
type: Peaking
freq: 1908.0
gain: 6.0
q: 1.093
rew_midrange_5:
type: Biquad
parameters:
type: Peaking
freq: 2605.0
gain: -1.2
q: 3.673
rew_midrange_6:
type: Biquad
parameters:
type: Peaking
freq: 3767.0
gain: 6.0
q: 2.172
rew_midrange_7:
type: Biquad
parameters:
type: Peaking
freq: 4915.0
gain: 6.0
q: 3.788
rew_midrange_8:
type: Biquad
parameters:
type: Peaking
freq: 5162.0
gain: -17.3
q: 1.847
rew_midrange_9:
type: Biquad
parameters:
type: Peaking
freq: 5945.0
gain: 6.0
q: 3.6

rew_tweeter_1:
type: Biquad
parameters:
type: Peaking
freq: 1787.0
gain: -0.5
q: 5.545
rew_tweeter_2:
type: Biquad
parameters:
type: Peaking
freq: 2524.0
gain: 1.5
q: 4.449
rew_tweeter_3:
type: Biquad
parameters:
type: Peaking
freq: 3428.0
gain: 3.7
q: 3.906
rew_tweeter_4:
type: Biquad
parameters:
type: Peaking
freq: 4151.0
gain: -6.6
q: 1.531
rew_tweeter_5:
type: Biquad
parameters:
type: Peaking
freq: 4272.0
gain: 6.0
q: 3.726
rew_tweeter_6:
type: Biquad
parameters:
type: Peaking
freq: 6094.0
gain: 2.5
q: 1.001
rew_tweeter_7:
type: Biquad
parameters:
type: Peaking
freq: 9124.0
gain: -2.5
q: 1.027


pipeline:
- type: Filter
description: "drop gain"
channels: [0, 1]
names:
- dropgain

- type: Mixer
name: to6chan

- type: Filter
description: "LinkwitzTransform en Lowpass for woofer"
channels: [0, 1]
names:
- lwt
- wooferXFIR

- type: Filter
description: "Highpass and lowpass for midrange"
channels: [2, 3]
names:
- rew_midrange_1
- rew_midrange_2
- rew_midrange_3
- rew_midrange_4
- rew_midrange_5
- rew_midrange_6
- rew_midrange_7
- rew_midrange_8
- rew_midrange_9
- midrangeXFIR
- midrangedelay

- type: Filter
description: "Highpass for tweeter"
channels: [4, 5]
names:
- rew_tweeter_1
- rew_tweeter_2
- rew_tweeter_3
- rew_tweeter_4
- rew_tweeter_5
- rew_tweeter_6
- rew_tweeter_7

- tweeterXFIR
- tweeterdelay
 
~16000 buffer level seems really high for a 2048 chunk size and I don't see rate adjust, async resampling or a target level in your configuration. I'd enable async resampling, rate adjust and specify a target level of 6144 (3X chunk size) and see if your issues go away. You need async resampling and rate adjust to bridge the clocks between your incoming SPDIF stream and the dac8x.

I would also consider changing your configuration to use all 8 channels of the dac8x. Sometimes things don't work well when using "hw" if you specify less than the total number of channels. You don't need to use the extra channels in your configuration, just set channels to 8 and make the mixer 2x8.

Michael
 
Hi Michael,

Thank you so much for your detailed help. I've changed my settings as you suggested;

target_level: 6144
enable_rate_adjust: true
resampler:
type: AsyncSinc
profile: Balanced

mixers:
to8chan:
channels:
in: 2
out: 8

Music is playing now with the new settings and so far I haven't had the problem I had before (although music has only been playing for 10 minutes). I will keep an eye on it and report back.

One thing I did notice is that I get a lot (5 per second) of these debug messages now;
2025-09-04 20:03:12.025767 DEBUG [camillalib] <src/lib.rs:181> The stashed vector has insufficient capacity, allocating more space

Is there something I can do about that?

Thanks again. Much appreciated.

Jeroen
 
Hi Michael,

Quick update: I only get the "The stashed vector has insufficient capacity" with v4.0.0 preview version. Not with v3.0.1, so I switched back to that version.

Music is still playing without interruption! So that's good news.

Thanks and regards, Jeroen
 
Hi Michael,

Music has been playing the whole day without issues! I am really happy with this fix. Thanks again!

Buffer level over the last hour averages at 6139 with a minimum of 5570 and a maximum of 6720. To me that looks good. Is this indeed normal behaviour?

Regards, Jeroen
 
I only get the "The stashed vector has insufficient capacity" with v4.0.0 preview version. Not with v3.0.1, so I switched back to that version.
These messages don't mean there is a problem, I just put them in to keep an eye on a new system in 4.0 for avoiding memory allocations. You will get some of them while starting, and then they should gradually go away. Or do you keep getting them after enabling the async resampler?
 
Hi @HenrikEnquist,

Thank you for your message and I am very sorry for my late reply. I only saw your message just now (I forgot to watch this thread).

At the moment my Raspberry is at a friend's house so I cannot test if the "insufficient capacity" messages in 4.0 go away after a while. I'll get my Raspberry back at the end of October and will test it then. I'll report back to you.

Thanks once again, Jeroen
 
Hi @HenrikEnquist,

Sorry for my late reply. I just got my Raspberry back from my friend and tested the "insufficient capacity" messages. They start out at about 4 messages/second. After about 8 minutes the rate drops to about 1 message/10 seconds. They go away shortly after that. I notice they go away once the async resampler speed >= 1.0000. When the speed is at <= 0.9999 I do see these messages. I guess this must all be exactly as you designed it.

If there is any other test I can perform, please let me know.

Thanks once again for this beautiful piece of software.

Best regards, Jeroen
 
Back
Top Bottom