hal: Update acdb extn and platform to pass Instance ID support info

Update acdb extn and platform to pass Instance ID support info
in order to enable ACDB loader use this info and call the respective
ACDB SW APIs. Update GEF APIs to support instance ID feature.
Add a property to query the instance ID support and use that
to call ACDB loader for instance ID support.

CRs-Fixed: 2199639
Change-Id: I64b41faf23cb42ec2af1695adb8a7021cad996dc
diff --git a/hal/acdb.h b/hal/acdb.h
index d1f863b..b019e4f 100644
--- a/hal/acdb.h
+++ b/hal/acdb.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
@@ -20,6 +20,7 @@
 #ifndef ACDB_H
 #define ACDB_H
 
+#include <stdbool.h>
 #include <linux/msm_audio_calibration.h>
 
 #define MAX_CVD_VERSION_STRING_SIZE 100
@@ -33,11 +34,19 @@
 #define PLATFORM_INFO_XML_PATH "/vendor/etc/audio_platform_info.xml"
 #endif
 
+enum {
+        ACDB_LOADER_INIT_V1 = 1,
+        ACDB_LOADER_INIT_V2,
+        ACDB_LOADER_INIT_V3,
+        ACDB_LOADER_INIT_V4,
+};
+
 /* Audio calibration related functions */
 typedef void (*acdb_deallocate_t)();
 typedef int  (*acdb_init_t)();
 typedef int  (*acdb_init_v2_t)(const char *, char *, int);
 typedef int  (*acdb_init_v3_t)(const char *, char *, struct listnode *);
+typedef int  (*acdb_init_v4_t)(void *, int);
 typedef void (*acdb_send_audio_cal_t)(int, int, int , int);
 typedef void (*acdb_send_audio_cal_v3_t)(int, int, int, int, int);
 typedef void (*acdb_send_voice_cal_t)(int, int);
@@ -58,13 +67,22 @@
     char name[ACDB_METAINFO_KEY_MODULE_NAME_LEN];
 };
 
+struct acdb_init_data_v4 {
+        char                   *cvd_version;
+        char                   *snd_card_name;
+        struct listnode        *meta_key_list;
+        bool                   *is_instance_id_supported;
+};
+
 struct acdb_platform_data {
     /* Audio calibration related functions */
     void                       *acdb_handle;
     acdb_init_t                acdb_init;
     acdb_init_v2_t             acdb_init_v2;
     acdb_init_v3_t             acdb_init_v3;
+    acdb_init_v4_t             acdb_init_v4;
     struct listnode acdb_meta_key_list;
+    struct acdb_init_data_v4   acdb_init_data;
 };
 
 int acdb_init(int);