hal: Add support to get active microphones on input stream
Add support to get active microphones on input stream.
Get microphone device id and channel map based on active
usecase and sound device. Active microphone characteristics
are retrieved from platform info using this device id.
Change-Id: I63ec99e70980869097fa896bc4b309fc0583fb3a
diff --git a/hal/msm8916/platform.c b/hal/msm8916/platform.c
index 34aa7d1..88abf3b 100644
--- a/hal/msm8916/platform.c
+++ b/hal/msm8916/platform.c
@@ -8115,3 +8115,26 @@
return id_string;
}
+
+bool platform_set_microphone_characteristic(void *platform __unused,
+ struct audio_microphone_characteristic_t mic __unused) {
+ return -ENOSYS;
+}
+
+int platform_get_microphones(void *platform __unused,
+ struct audio_microphone_characteristic_t *mic_array __unused,
+ size_t *mic_count __unused) {
+ return -ENOSYS;
+}
+
+bool platform_set_microphone_map(void *platform __unused, snd_device_t in_snd_device __unused,
+ const struct mic_info *info __unused) {
+ return false;
+}
+
+int platform_get_active_microphones(void *platform __unused, unsigned int channels __unused,
+ audio_usecase_t usecase __unused,
+ struct audio_microphone_characteristic_t *mic_array __unused,
+ size_t *mic_count __unused) {
+ return -ENOSYS;
+}
diff --git a/hal/msm8916/platform.h b/hal/msm8916/platform.h
index 8d87a9f..44c37bd 100644
--- a/hal/msm8916/platform.h
+++ b/hal/msm8916/platform.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2017, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
* Not a Contribution.
*
* Copyright (C) 2013 The Android Open Source Project
@@ -398,6 +398,8 @@
#define TX_VOICE_FV5ECNS_SM 0x10F09
#define TX_VOICE_FV5ECNS_DM 0x10F0A
+#define AUDIO_MAKE_STRING_FROM_ENUM(X) { #X, X }
+
#define LIB_CSD_CLIENT "libcsd-client.so"
/* CSD-CLIENT related functions */
typedef int (*init_t)();