Quantum Size Falls Below Minimum Limit
Description
When operating with a set quantum limit of 64, transitioning an application to a 44100 sample rate results in the quantum size decreasing to 32, despite the configured minimum quantum being 64. This behavior deviates from the expected maintenance of the quantum size within the defined range (min 64 - max 256) and leads to audio quality degradation, specifically audible crackling.
Configuration Details
I've optimized my setup for low latency audio, aiming for clear playback with a clock rate of 192000 and a quantum size set between 64 and 256.
Here are the setup details:
.config/pipewire/pipewire.conf.d/samplerate.conf
:
context.properties = {
## Properties for the DSP configuration.
default.clock.rate = 192000
default.clock.allowed-rates = [ 44100 48000 88200 96000 192000 ]
default.clock.quantum = 64
default.clock.min-quantum = 64
default.clock.max-quantum = 256
}
.config/pipewire/client.conf.d/samplerate.conf
:
context.properties = {
## Configure properties in the system.
default.clock.rate = 192000
default.clock.quantum = 64
default.clock.min-quantum = 64
default.clock.max-quantum = 256
}
stream.properties = {
node.latency = 64/192000
resample.quality = 10
}
.config/pipewire/pipewire-pulse.conf.d/samplerate.conf
:
stream.properties = {
node.latency = 64/192000
resample.quality = 10
}
Expected Behavior
The system should enforce the quantum size within the specified limits (64 - 256) regardless of the sample rate to ensure stable and crackle-free audio performance.
Observed Behavior
Upon switching to a 44100 sample rate, the quantum size is reduced to 32, falling below the configured minimum limit and resulting in audio crackling issues.
Steps to Reproduce
- Configure Pipewire with the aforementioned settings to enforce a quantum size within the 64 - 256 range.
- Run an application(Elisa) that switches the sample rate to 44100.
- Observe the quantum size adjustment and resulting audio quality.
Environment
- Operating System: ArchLinux (12.03.2004)
- Kernel: Linux 6.8.0
- Desktop Environment: KDE Plasma 6.0.1
- Pipewire Version: 1.0.3
- Hardware Used: Focusrite Scarlett Solo Gen4