Wireless Army
This is a blog / tips and tricks website for web developers and security researchers.
follow us in feedly


intel or Realtek audio driver pop fix
by admin
 at 2022-03-17 17:56:22.

on some older kernels to make sure realtek audio drivers are loaded. the following line should fix it

alsactl init

There is a very subtle yet annoying audio POP that happens immediately before & after any normal audio play-back.
My intuition felt that issue resembled some kind of power-saving feature, and I was not wrong.
To solve this issue simply disable the power saving feature of the Intel HD Audio driver in Linux.
To observe the current values:

cat /sys/module/snd_hda_intel/parameters/power_save
1

cat /sys/module/snd_hda_intel/parameters/power_save_controller
Y
 

The value of "1" for the power_save is the worst possible default imaginable, it's the most absurdly aggressive power saving mode possible. It would have been more sane to default to 10 or 20 seconds, but I digress. The value of "Y" simply indicates the power saving feature is enabled.
To disable these features on a running system, simply use standard IO on the same files:

echo 'N' > /sys/module/snd_hda_intel/parameters/power_save_controller 

echo '0' > /sys/module/snd_hda_intel/parameters/power_save

(Edit: made a copy/paste correction here to correctly show the stdio echo into the files)
Repeat the earlier steps to verify the change.
To make the change more permanent you can re-build your kernel with modified CONFIG_SND_HDA_POWER_SAVE_DEFAULT parameter, see the kconfig documentation for details.

https://cateee.net/lkddb/web-lkddb/SND_HDA_POWER_SAVE_DEFAULT.html

Another option might be to blacklist the kernel module on bootup, or write a scrip to set these values on boot.