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
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.
this pop or click sound can also happen when you have TLP and use the laptop battery;
the default behavior is to suspend the audio card,and when it resume,it may cause a click sound.
so you have to disable SOUND_POWER_SAVE_ON_BAT from 1 to 0.
There is another annoyance I now experience after installing easyeffects:
Every time I start some audio playback, Easyeffects Sink is selected as default output, and I have to switch it back to my normal audio output, alsa_output.pci-0000_00_1b.0.analog-stereo, in order to be able to hear anything.
What causes this behavior, and is there a way to circumvent it?