hal: reset AEC effect control when closing input stream
Reset AEC effect control when closing input stream.
Change-Id: I955b5d9d080d08e86630f72965ac7c5fa40718b2
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index d027138..708661b 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -6544,9 +6544,6 @@
in->pcm = NULL;
}
- if (in->source == AUDIO_SOURCE_VOICE_COMMUNICATION)
- adev->enable_voicerx = false;
-
if (do_stop)
status = stop_input_stream(in);
@@ -9447,6 +9444,10 @@
adev->pcm_record_uc_state = 0;
}
+ if (in->source == AUDIO_SOURCE_VOICE_COMMUNICATION) {
+ adev->enable_voicerx = false;
+ }
+
if (audio_extn_ssr_get_stream() == in) {
audio_extn_ssr_deinit();
}