hal: Add AEC and NS effects for VOICE_RECOGNITION device
- AEC or NS effect is not taking for voice_rec path due to
missing entry in effect table.
- Add entry to apply the effect.
Change-Id: I6a6a0101bfeb90e9ae1d0ca0011e3408f44a305d
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index afa6dca..81f08fd 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2021, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2022, The Linux Foundation. All rights reserved.
* Not a Contribution.
*
* Copyright (C) 2013 The Android Open Source Project
@@ -7548,6 +7548,7 @@
ALOGD("NS enable %d", enable);
if (!in->standby) {
if (in->source == AUDIO_SOURCE_VOICE_COMMUNICATION ||
+ in->source == AUDIO_SOURCE_VOICE_RECOGNITION ||
in->dev->mode == AUDIO_MODE_IN_COMMUNICATION) {
if (enable_disable_effect(in->dev, EFFECT_NS, enable) == ENOSYS)
select_devices(in->dev, in->usecase);