summaryrefslogtreecommitdiff
path: root/voice_processing
diff options
context:
space:
mode:
authorkevinshhsu <KevinSHHsu@fih-foxconn.com>2018-03-08 12:47:05 +0800
committerDavid Lin <dtwlin@google.com>2018-03-11 04:45:24 +0000
commit57b17e4e57295ae99aef56f72858cd3ecc785395 (patch)
treea6cb19c921c68f08929a971665f0d12e21fb0ec2 /voice_processing
parent27f0236cca95e0ed400eadea9d37234715fc0482 (diff)
downloadbonito-57b17e4e57295ae99aef56f72858cd3ecc785395.tar.gz
audio: enable AEC and EC audio effects
enable AEC and EC audio effects Bug: 71526853 Test: dumpsys media.audio_flinger Library audio_pre_processing path: /vendor/lib/soundfx/libqcomvoiceprocessing.so Noise Suppression / Qualcomm Fluence for Blueline/Crosshatch UUID: 27dab6d2-23f8-11e8-b467-0ed5f89f718b TYPE: 58b4b260-8e06-11e0-aa8e-0002a5d5c51b apiVersion: 00020000 flags: 00020203 Acoustic Echo Canceler / Qualcomm Fluence for Blueline/Crosshatch UUID: 27dab416-23f8-11e8-b467-0ed5f89f718b TYPE: 7b491460-8d4d-11e0-bd61-0002a5d5c51b apiVersion: 00020000 flags: 00020203 Change-Id: I4785c819274db8f35d706ab02b3213c9507e8c2a Signed-off-by: kevinshhsu <KevinSHHsu@fih-foxconn.com> Signed-off-by: David Lin <dtwlin@google.com>
Diffstat (limited to 'voice_processing')
-rw-r--r--voice_processing/Android.mk29
-rw-r--r--voice_processing/voice_processing_descriptors.c47
2 files changed, 76 insertions, 0 deletions
diff --git a/voice_processing/Android.mk b/voice_processing/Android.mk
new file mode 100644
index 00000000..674881ff
--- /dev/null
+++ b/voice_processing/Android.mk
@@ -0,0 +1,29 @@
+# Copyright (C) 2017 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := voice_processing_descriptors.c
+LOCAL_C_INCLUDES += $(call include-path-for, audio-effects)
+LOCAL_HEADER_LIBRARIES := libhardware_headers
+LOCAL_MULTILIB := $(AUDIOSERVER_MULTILIB)
+LOCAL_MODULE := libqcomvoiceprocessingdescriptors
+LOCAL_MODULE_RELATIVE_PATH := soundfx
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_OWNER := qcom
+LOCAL_PROPRIETARY_MODULE := true
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/voice_processing/voice_processing_descriptors.c b/voice_processing/voice_processing_descriptors.c
new file mode 100644
index 00000000..1f019ab1
--- /dev/null
+++ b/voice_processing/voice_processing_descriptors.c
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <hardware/audio_effect.h>
+//------------------------------------------------------------------------------
+// Effect descriptors
+//------------------------------------------------------------------------------
+
+// UUIDs for effect types have been generated from http://www.itu.int/ITU-T/asn1/uuid.html
+// as the pre processing effects are not defined by OpenSL ES
+
+// Acoustic Echo Cancellation 27dab416-23f8-11e8-b467-0ed5f89f718b
+const effect_descriptor_t qcom_product_aec_descriptor = {
+ { 0x7b491460, 0x8d4d, 0x11e0, 0xbd61, { 0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b } }, // type
+ { 0x27dab416, 0x23f8, 0x11e8, 0xb467, { 0x0e, 0xd5, 0xf8, 0x9f, 0x71, 0x8b } }, // uuid
+ EFFECT_CONTROL_API_VERSION,
+ (EFFECT_FLAG_TYPE_PRE_PROC|EFFECT_FLAG_DEVICE_IND|EFFECT_FLAG_HW_ACC_TUNNEL),
+ 0,
+ 0,
+ "Acoustic Echo Canceler",
+ "Qualcomm Fluence for Blueline/Crosshatch"
+};
+
+// Noise suppression 27dab6d2-23f8-11e8-b467-0ed5f89f718b
+const effect_descriptor_t qcom_product_ns_descriptor = {
+ { 0x58b4b260, 0x8e06, 0x11e0, 0xaa8e, { 0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b } }, // type
+ { 0x27dab6d2, 0x23f8, 0x11e8, 0xb467, { 0x0e, 0xd5, 0xf8, 0x9f, 0x71, 0x8b } }, // uuid
+ EFFECT_CONTROL_API_VERSION,
+ (EFFECT_FLAG_TYPE_PRE_PROC|EFFECT_FLAG_DEVICE_IND|EFFECT_FLAG_HW_ACC_TUNNEL),
+ 0,
+ 0,
+ "Noise Suppression",
+ "Qualcomm Fluence for Blueline/Crosshatch"
+};