Disable volume auto adjust in pulseaudio "module-echo-cancel"
Important: this question How to disable microphone from auto adjusting its input volume doesn't cover this scenario.
This question is about the volume auto adjust feature of pulseaudio "module-echo-cancel".
I am using the pulseaudio module module-echo-cancel
, officially documented here.
You can enable it by editing /etc/pulse/default.pa
and adding the line:
load-module module-echo-cancel
And reseting it with pulseaudio -k
. And it works.
But the documentation doesn't inform how to disable the volume auto adjust that this module executes when it is enabled.
Solution 1:
load-module module-echo-cancel aec_args="analog_gain_control=0 digital_gain_control=0"
Source: https://wiki.archlinux.org/index.php/PulseAudio/Troubleshooting#Enable_Echo.2FNoise-Cancelation
Solution 2:
Since the accepted answer is only part of the problem for me, to adjust properly the volume and avoid auto-change, I will give a complementary configuration needed:
Per-application volume
Sometimes even with gain_control=0
, pulse resets volume per application. It does that for it defaults to flat
control. To avoid this behaviour, in the file:
/etc/pulse/daemon.conf
or
~/.config/pulse/daemon.conf
Uncomment the line, and set to no
:
flat-volumes = no
and restart PulseAudio with:
pulseaudio -k ; pulseaudio --start