Merge "hal: Fix calibration address sent to ACDB"
diff --git a/configure.ac b/configure.ac
index d92c8bb..ef90749 100644
--- a/configure.ac
+++ b/configure.ac
@@ -136,6 +136,7 @@
AM_CONDITIONAL([AUDIO_HW_FFV], [test x$AUDIO_FEATURE_ENABLED_FFV = xtrue])
AM_CONDITIONAL([CUSTOM_STEREO], [test x$AUDIO_FEATURE_ENABLED_CUSTOM_STEREO = xtrue])
AM_CONDITIONAL([RUN_KEEP_ALIVE_IN_ARM_FFV], [test x$AUDIO_FEATURE_ENABLED_KEEP_ALIVE_ARM_FFV = xtrue])
+AM_CONDITIONAL([INSTANCE_ID], [test x$AUDIO_FEATURE_ENABLED_INSTANCE_ID = xtrue])
AC_CONFIG_FILES([ \
Makefile \
diff --git a/hal/Makefile.am b/hal/Makefile.am
index 46882f1..995622d 100644
--- a/hal/Makefile.am
+++ b/hal/Makefile.am
@@ -204,6 +204,10 @@
AM_CFLAGS += -DCUSTOM_STEREO_ENABLED
endif
+if INSTANCE_ID
+AM_CFLAGS += -DINSTANCE_ID_ENABLED
+endif
+
h_sources = audio_extn/audio_defs.h \
audio_extn/audio_extn.h \
audio_hw.h \
diff --git a/hal/audio_extn/soundtrigger.c b/hal/audio_extn/soundtrigger.c
index c69b352..1c98103 100644
--- a/hal/audio_extn/soundtrigger.c
+++ b/hal/audio_extn/soundtrigger.c
@@ -79,6 +79,7 @@
AUDIO_EVENT_SVA_EXEC_MODE_STATUS,
AUDIO_EVENT_CAPTURE_STREAM_INACTIVE,
AUDIO_EVENT_CAPTURE_STREAM_ACTIVE,
+ AUDIO_EVENT_BATTERY_STATUS_CHANGED,
AUDIO_EVENT_GET_PARAM
} audio_event_type_t;
diff --git a/post_proc/Android.mk b/post_proc/Android.mk
index be06ae2..5da769c 100644
--- a/post_proc/Android.mk
+++ b/post_proc/Android.mk
@@ -110,6 +110,10 @@
LOCAL_CFLAGS += -DHW_ACC_HPX
endif
+ifeq ($(strip $(AUDIO_FEATURE_ENABLED_INSTANCE_ID)), true)
+ LOCAL_CFLAGS += -DINSTANCE_ID_ENABLED
+endif
+
LOCAL_MODULE:= libhwacceffectswrapper
LOCAL_VENDOR_MODULE := true
diff --git a/post_proc/bass_boost.c b/post_proc/bass_boost.c
index a4e2292..68cd46f 100644
--- a/post_proc/bass_boost.c
+++ b/post_proc/bass_boost.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2015, 2017, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2015, 2017-2018, The Linux Foundation. All rights reserved.
* Not a Contribution.
*
* Copyright (C) 2013 The Android Open Source Project
@@ -63,6 +63,10 @@
uint32_t sampling_rate;
uint32_t cal_type;
uint32_t module_id;
+#ifdef INSTANCE_ID_ENABLED
+ uint16_t instance_id;
+ uint16_t reserved;
+#endif
uint32_t param_id;
} acdb_audio_cal_cfg_t;