audio: fix AEC/NS effect control
Android Q supports concurrent capture and will
create more than one AEC/NS effects if app creates
over 1 voice record tracks.
Refine the AEC/NS control to support mutilple
AEC/NS effects.
Also correct the voice-call stream type in STHAL.
Bug: 129111371
Bug: 128456220
Test: manual
Change-Id: Icd0863f54e17cd6a5ee765f9bb5fe1b4580743a4
Signed-off-by: Carter Hsu <carterhsu@google.com>
diff --git a/hal/audio_hw.h b/hal/audio_hw.h
index e8fe65b..764093f 100644
--- a/hal/audio_hw.h
+++ b/hal/audio_hw.h
@@ -285,6 +285,10 @@
audio_usecase_t usecase;
bool enable_aec;
bool enable_ns;
+ bool enable_ec_port;
+ bool ec_opened;
+ struct listnode aec_list;
+ struct listnode ns_list;
int64_t frames_read; /* total frames read, not cleared when entering standby */
int64_t frames_muted; /* total frames muted, not cleared when entering standby */
int64_t mmap_time_offset_nanos; /* fudge factor to correct inaccuracies in DSP */