Click sound before playing any audio

Update:
The same effect also occurs when using pipewire.

Here, the solution is a bit more complex.
At first, copy /usr/share/pipewire/media-session.d/alsa-monitor.conf to ~/.config/pipewire/media-session.d for a starting point.
Change the following settings:

api.alsa.ignore-dB = false # This reduces popping sounds while booting due to hardware initialization
node.pause-on-idle      = false # This reduces popping / clicking sounds before starting audio playback
session.suspend-timeout-seconds = 0      # 0 disables suspend 
api.alsa.start-delay    = 1024 # For older hardware

You may also comment out the line

#suspend-node

in ~/.config/pipewire/media-session.d/media-session.conf.

Second, copy /usr/share/pipewire/pipewire.conf to ~/.config/pipewire.
Then, change the following parameters there:

    ## Properties for the DSP configuration.
    default.clock.rate        = 44100
    default.clock.quantum     = 2048
    default.clock.min-quantum = 1024
    default.clock.max-quantum = 8192

These settings are necessary to avoid stuttering audio during video playback, in particular on older and slower machines.

After having applied all the settings, reboot for the changes to take effect.

The issue is discussed at loud popping sound and initial stutter when playing all media (#983) · Issues · PipeWire / pipewire · GitLab

2 Likes