hal: Provide support to enable/disable EC/NS in BT
Currently during a SCO connection ECNS module in ADSP
is disabled by default. Some BT headsets have built-in
support for echo cancellation and noise reduction and
therefore do not require the same to be done again.
Select BT_SCO devices with ECNS modules enabled when
setParameters() is called with NREC=on.
CAF commit: e240e5d3124bbdd82d1b5013c3e714deac2727e6
Bug: 22100304.
Change-Id: Ifa302537221452e02fb80954d2c04b52448e0b9d
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 46c01ef..8451ad7 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -2280,9 +2280,7 @@
ret = str_parms_get_str(parms, AUDIO_PARAMETER_KEY_BT_NREC, value, sizeof(value));
if (ret >= 0) {
- /* When set to false, HAL should disable EC and NS
- * But it is currently not supported.
- */
+ /* When set to false, HAL should disable EC and NS */
if (strcmp(value, AUDIO_PARAMETER_VALUE_ON) == 0)
adev->bluetooth_nrec = true;
else