audio: change TARGET_USES_AOSP to TARGET_USES_AOSP_FOR_AUDIO

- add Audio specific Target_AOSP flag
- this will remove Audio dependency on Global Target AOSP flag

Change-Id: I03df34e7b118ccf69b452f9c10643975ac73a8ff
diff --git a/configs/msm8909/msm8909.mk b/configs/msm8909/msm8909.mk
index d3d23de..ebaeba5 100755
--- a/configs/msm8909/msm8909.mk
+++ b/configs/msm8909/msm8909.mk
@@ -1,38 +1,47 @@
-#AUDIO_FEATURE_FLAGS
-USE_CUSTOM_AUDIO_POLICY := 1
+
+##AUDIO_FEATURE_FLAGS
+
 BOARD_USES_ALSA_AUDIO := true
-BOARD_SUPPORTS_SOUND_TRIGGER := true
-AUDIO_FEATURE_ENABLED_SOURCE_TRACKING:= true
+
+ifneq ($(TARGET_USES_AOSP_FOR_AUDIO), true)
+USE_CUSTOM_AUDIO_POLICY := 1
 AUDIO_FEATURE_ENABLED_COMPRESS_VOIP := true
 AUDIO_FEATURE_ENABLED_EXTN_FORMATS := true
 AUDIO_FEATURE_ENABLED_EXTN_FLAC_DECODER := true
 AUDIO_FEATURE_ENABLED_EXTN_RESAMPLER := true
 AUDIO_FEATURE_ENABLED_FM_POWER_OPT := true
+AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true
+#TODO Enable SSR
+#AUDIO_FEATURE_ENABLED_SSR := true
+AUDIO_FEATURE_ENABLED_VOICE_CONCURRENCY := true
+AUDIO_FEATURE_ENABLED_RECORD_PLAY_CONCURRENCY := true
+#TODO Enable PM
+#AUDIO_FEATURE_ENABLED_PM_SUPPORT := true
+AUDIO_FEATURE_ENABLED_DS2_DOLBY_DAP := true
+MM_AUDIO_ENABLED_SAFX := true
+
+endif
+USE_XML_AUDIO_POLICY_CONF := 1
+BOARD_SUPPORTS_SOUND_TRIGGER := true
+AUDIO_FEATURE_ENABLED_SOURCE_TRACKING := true
 AUDIO_FEATURE_ENABLED_FLUENCE := true
 AUDIO_FEATURE_ENABLED_HFP := true
 AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS := true
-AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true
-AUDIO_FEATURE_ENABLED_SSR := true
-AUDIO_FEATURE_NON_WEARABLE_TARGET := true
-AUDIO_FEATURE_ENABLED_VOICE_CONCURRENCY := true
-AUDIO_FEATURE_ENABLED_RECORD_PLAY_CONCURRENCY := true
 AUDIO_FEATURE_ENABLED_KPI_OPTIMIZE := true
-AUDIO_FEATURE_ENABLED_PM_SUPPORT := true
-AUDIO_FEATURE_ENABLED_DS2_DOLBY_DAP := true
 AUDIO_FEATURE_ENABLED_ACDB_LICENSE := true
 MM_AUDIO_ENABLED_FTM := true
-MM_AUDIO_ENABLED_SAFX := true
 TARGET_USES_QCOM_MM_AUDIO := true
 
+##AUDIO_FEATURE_FLAGS
+
 #Audio Specific device overlays
 DEVICE_PACKAGE_OVERLAYS += hardware/qcom/audio/configs/common/overlay
 
-USE_XML_AUDIO_POLICY_CONF := 1
 
 # Audio configuration file
-ifeq ($(TARGET_USES_AOSP), true)
+ifeq ($(TARGET_USES_AOSP_FOR_AUDIO), true)
 PRODUCT_COPY_FILES += \
-    hardware/qcom/audio/configs/common/media/audio_policy.conf:system/etc/audio_policy.conf
+    device/qcom/common/media/audio_policy.conf:system/etc/audio_policy.conf
 else
 PRODUCT_COPY_FILES += \
     hardware/qcom/audio/configs/msm8909/audio_policy.conf:system/etc/audio_policy.conf
@@ -56,7 +65,7 @@
 
 #XML Audio configuration files
 ifeq ($(USE_XML_AUDIO_POLICY_CONF), 1)
-ifeq ($(TARGET_USES_AOSP), true)
+ifeq ($(TARGET_USES_AOSP_FOR_AUDIO), true)
 PRODUCT_COPY_FILES += \
     $(TOPDIR)hardware/qcom/audio/configs/common/audio_policy_configuration.xml:/system/etc/audio_policy_configuration.xml
 else