Commit 9fa6c5a6 authored by Sebastian Krzyszkowiak's avatar Sebastian Krzyszkowiak Committed by Guido Gunther
Browse files

librem5.pa: Disable unwanted audio processing in echo cancelation module

module-echo-cancel uses WebRTC AEC algorithm to filter out acoustic echo.
It's mostly meant for desktop use with speakers and microphone, therefore
by default it does additional processing for things like voice detection
or noise suppression in order to filter out things like keyboard typing.
However, it appears that at times this filter may be a bit too overzealous
for our mobile phone use case, with users reporting the voice coming out
on the other side as "muffled".

Since echo cancellation is all that we cared about when enabling the
filtering, let's disable any kind of processing that's not related to
removing the echo to make sure it doesn't have any unintended consequences.
In the end nothing prevents us from selectively reenabling particular
features after enough testing.

Note: module-echo-cancel also supports AECM (mobile) variant of the algorithm
that theoretically should better match our use case. However, so far I wasn't
able to make it work (my current suspicion is that we have to reduce the overall
latency in order for it to actually filter out the echo).
parent 89c9c55d
Pipeline #64386 passed with stages
in 4 minutes and 27 seconds
......@@ -4,7 +4,7 @@
.ifexists /sys/devices/platform/sound/308b0000.sai-sgtl5000
set-default-sink alsa_output.platform-sound.VoiceCall__hw_CARD_sgtl5000__sink
set-default-source alsa_input.platform-sound.VoiceCall__hw_CARD_sgtl5000__source
update-source-proplist alsa_input.platform-sound.VoiceCall__hw_CARD_sgtl5000__source filter.apply.echo-cancel.parameters="aec_args=\"analog_gain_control=0\" use_master_format=yes channels=1"
update-source-proplist alsa_input.platform-sound.VoiceCall__hw_CARD_sgtl5000__source filter.apply.echo-cancel.parameters="channels=1 use_master_format=yes aec_args=\"analog_gain_control=0 voice_detection=0 high_pass_filter=0 noise_suppression=0\""
.endif
# phone
......@@ -16,7 +16,7 @@ load-module module-alsa-card device_id="Modem" name="platform-sound-wwan" card_p
set-card-profile alsa_card.platform-sound HiFi
set-default-sink alsa_output.platform-sound.HiFi__hw_L5_0__sink
set-default-source alsa_input.platform-sound.HiFi__hw_L5_0__source
update-source-proplist alsa_input.platform-sound.HiFi__hw_L5_0__source filter.apply.echo-cancel.parameters="aec_args=\"analog_gain_control=0\" use_master_format=yes channels=1"
update-source-proplist alsa_input.platform-sound.HiFi__hw_L5_0__source filter.apply.echo-cancel.parameters="channels=1 use_master_format=yes aec_args=\"analog_gain_control=0 voice_detection=0 high_pass_filter=0 noise_suppression=0\""
.endif
# cork/mute audio streams when on a phone call
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment