Merge c622b99f738edaf22684b5291d47d5cd3d90d32f on remote branch
Change-Id: Ic71df286aa4369168dbdd28fd35b3627f827e06d
diff --git a/Android.mk b/Android.mk
index bb08788..0fda1b1 100644
--- a/Android.mk
+++ b/Android.mk
@@ -76,6 +76,11 @@
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include/audio
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/techpack/audio/include
+
+ifeq ($(ENABLE_AUDIO_LEGACY_TECHPACK),true)
+LOCAL_HEADER_LIBRARIES += qti_legacy_audio_kernel_uapi
+endif
+
LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DLKM)),true)
LOCAL_HEADER_LIBRARIES += audio_kernel_headers
diff --git a/Makefile.am b/Makefile.am
index 0dcb02c..e779a7a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -49,6 +49,10 @@
AM_CFLAGS += -DST_DEVICE_API_VERSION_1_0
endif
+if SOUND_TRIGGER_APE
+AM_CFLAGS += -DST_APE
+endif
+
lib_includedir = $(includedir)/sound_trigger
lib_include_HEADERS = sound_trigger_prop_intf.h sound_trigger_hw.h
diff --git a/configure.ac b/configure.ac
index f6c6fc1..e3c764d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -48,6 +48,7 @@
AM_CONDITIONAL([USE_KEEP_ALIVE],[test x$ENABLE_KEEP_ALIVE = xtrue])
AM_CONDITIONAL([SOUND_TRIGGER_CPU_AFFINITY_SET],[test x$BOARD_SUPPORTS_SOUND_TRIGGER_CPU_AFFINITY_SET = xtrue])
AM_CONDITIONAL([SOUND_TRIGGER_DEVICE_API_VERSION_1_0],[test x$SUPPORTS_SOUND_TRIGGER_DEVICE_API_VERSION_1_0 = xtrue])
+AM_CONDITIONAL([SOUND_TRIGGER_APE],[test x$SUPPORTS_SOUND_TRIGGER_APE = xtrue])
AC_ARG_WITH([glib],
AC_HELP_STRING([--with-glib],
diff --git a/sound_trigger_platform.c b/sound_trigger_platform.c
index 8fcf45a..fcab41e 100755
--- a/sound_trigger_platform.c
+++ b/sound_trigger_platform.c
@@ -3344,7 +3344,11 @@
get_xml_file_path(my_data->xml_file_path, MIXER_PATH_FILE_NAME_WCD9340,
my_data->vendor_config_path);
strlcpy(mixer_path_xml, my_data->xml_file_path, MIXER_PATH_MAX_LENGTH);
+#ifdef ST_APE
+ my_data->stdev->is_gcs = false;
+#else
my_data->stdev->is_gcs = true;
+#endif
} else if (strstr(snd_card_name, "bg")) {
get_xml_file_path(my_data->xml_file_path, MIXER_PATH_FILE_NAME_BG,
my_data->vendor_config_path);