zenfone6: use custom policy hal
Change-Id: Ifbf88f81240069b20f39e32a6932ef4957736ae3
diff --git a/policy_hal/Android.mk b/policy_hal/Android.mk
new file mode 100644
index 0000000..76c3847
--- /dev/null
+++ b/policy_hal/Android.mk
@@ -0,0 +1,84 @@
+ifeq ($(TARGET_DEVICE),zenfone6)
+ifeq ($(USE_CUSTOM_AUDIO_POLICY), 1)
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := AudioPolicyManager.cpp
+
+LOCAL_C_INCLUDES := $(TOPDIR)frameworks/av/services \
+ $(TOPDIR)frameworks/av/services/audioflinger \
+ $(call include-path-for, audio-effects) \
+ $(call include-path-for, audio-utils) \
+ $(TOPDIR)frameworks/av/services/audiopolicy/common/include \
+ $(TOPDIR)frameworks/av/services/audiopolicy/engine/interface \
+ $(TOPDIR)frameworks/av/services/audiopolicy \
+ $(TOPDIR)frameworks/av/services/audiopolicy/common/managerdefinitions/include \
+ $(call include-path-for, avextension) \
+
+LOCAL_HEADER_LIBRARIES := \
+ libbase_headers
+
+LOCAL_SHARED_LIBRARIES := \
+ libcutils \
+ libutils \
+ liblog \
+ libsoundtrigger \
+ libaudiopolicymanagerdefault \
+ libserviceutility
+
+LOCAL_STATIC_LIBRARIES := \
+ libmedia_helper \
+
+LOCAL_CFLAGS += -Wall -Werror
+
+
+ifeq ($(strip $(AUDIO_FEATURE_ENABLED_VOICE_CONCURRENCY)),true)
+LOCAL_CFLAGS += -DVOICE_CONCURRENCY
+endif
+
+ifeq ($(strip $(AUDIO_FEATURE_ENABLED_RECORD_PLAY_CONCURRENCY)),true)
+LOCAL_CFLAGS += -DRECORD_PLAY_CONCURRENCY
+endif
+
+ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PCM_OFFLOAD)),true)
+ LOCAL_CFLAGS += -DPCM_OFFLOAD_ENABLED
+endif
+
+ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PCM_OFFLOAD_24)),true)
+ LOCAL_CFLAGS += -DPCM_OFFLOAD_ENABLED_24
+endif
+
+ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EXTN_FORMATS)),true)
+ LOCAL_CFLAGS += -DAUDIO_EXTN_FORMATS_ENABLED
+endif
+
+ifeq ($(strip $(AUDIO_FEATURE_ENABLED_AAC_ADTS_OFFLOAD)),true)
+ LOCAL_CFLAGS += -DAAC_ADTS_OFFLOAD_ENABLED
+endif
+
+ifeq ($(strip $(AUDIO_FEATURE_ENABLED_HDMI_SPK)),true)
+ LOCAL_CFLAGS += -DAUDIO_EXTN_HDMI_SPK_ENABLED
+endif
+
+ifeq ($(strip $(AUDIO_FEATURE_ENABLED_PROXY_DEVICE)),true)
+ LOCAL_CFLAGS += -DAUDIO_EXTN_AFE_PROXY_ENABLED
+endif
+
+ifeq ($(strip $(AUDIO_FEATURE_ENABLED_FM_POWER_OPT)),true)
+LOCAL_CFLAGS += -DFM_POWER_OPT
+endif
+
+ifeq ($(USE_XML_AUDIO_POLICY_CONF), 1)
+LOCAL_CFLAGS += -DUSE_XML_AUDIO_POLICY_CONF
+endif
+
+ifeq ($(strip $(AUDIO_FEATURE_ENABLED_COMPRESS_VOIP)),true)
+ LOCAL_CFLAGS += -DCOMPRESS_VOIP_ENABLED
+endif
+
+LOCAL_MODULE := libaudiopolicymanager
+
+include $(BUILD_SHARED_LIBRARY)
+
+endif
+endif