I'm trying to run PulseAudio's 'module-echo cancel' filter on my bluetooth speaker(output only).

I've edited /etc/pulse/default.pa like that:

.ifexists module-echo-cancel.so
load-module module-echo-cancel aec_method=webrtc source_name=echocancel sink_name=echocancel1
set-default-source echocancel
set-default-sink echocancel1

so when I turn on machine, 'module-echo cancel' is activated and it works with my internal speakers. But when I connect bluetooth speaker, filter does not work for it(cause bt device was not connected at the start up of the machine/PulseAudio?). Trying restart PulseAudio when bluetooth speaker is connected(simulate start of PulseAudio, when bt device is connected, like internal speakers at machine start up) will disconnect all bluetooth devices. So I'm at the beginning and can't get 'module-echo cancel' to work with my bt spearker.

Do you have any experiences, suggestions or skills to help me solve this annoying issue? :))

link to PulseAudio's module-echo-cancel doc: https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#module-echo-cancel

*Lenovo t440p, Manajro Linux x86_64, Kernel: 5.8.18-1-MANJARO


1 Answer 1


"If you plug in a USB sound card or headset, or you have for example a 5.1 Speaker configuration and plug in a headset on your front audio connectors after you have loaded the module-echo-cancel, you have to manually unload and load the module-echo-cancel again, because unfortunately there is no way to tell the module that it should automatically switch to the new default 'source_master' and 'source_sink'."

source: https://wiki.archlinux.org/index.php/PulseAudio/Troubleshooting#Enable_Echo/Noise-Cancellation

*any ideas how to automatically unload and load module after bluetooth is connected or disconnected?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .