Allow split system/vendor image configuration
Switch hardcoded system/vendor path to $(TARGET_COPY_OUT_VENDOR). For
direct loading of files in code, switch from /system/vendor to
/vendor - relying on /vendor symlink for compatibility.
Change-Id: I96960f977f1ab74f266aa7a7937c760b6675ca54
diff --git a/configs/msm8937/msm8937.mk b/configs/msm8937/msm8937.mk
index 06a2379..e87628a 100644
--- a/configs/msm8937/msm8937.mk
+++ b/configs/msm8937/msm8937.mk
@@ -69,8 +69,8 @@
endif
PRODUCT_COPY_FILES +=\
-hardware/qcom/audio/configs/msm8937/audio_output_policy.conf:system/vendor/etc/audio_output_policy.conf\
-hardware/qcom/audio/configs/msm8937/audio_effects.conf:system/vendor/etc/audio_effects.conf\
+hardware/qcom/audio/configs/msm8937/audio_output_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_output_policy.conf\
+hardware/qcom/audio/configs/msm8937/audio_effects.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.conf\
hardware/qcom/audio/configs/msm8937/mixer_paths_mtp.xml:system/etc/mixer_paths_mtp.xml \
hardware/qcom/audio/configs/msm8937/mixer_paths_qrd_skuh.xml:system/etc/mixer_paths_qrd_skuh.xml \
hardware/qcom/audio/configs/msm8937/mixer_paths_qrd_skui.xml:system/etc/mixer_paths_qrd_skui.xml \
diff --git a/configs/msm8953/msm8953.mk b/configs/msm8953/msm8953.mk
index 767854f..f4cacd6 100644
--- a/configs/msm8953/msm8953.mk
+++ b/configs/msm8953/msm8953.mk
@@ -69,8 +69,8 @@
endif
PRODUCT_COPY_FILES += \
-hardware/qcom/audio/configs/msm8953/audio_output_policy.conf:system/vendor/etc/audio_output_policy.conf \
-hardware/qcom/audio/configs/msm8953/audio_effects.conf:system/vendor/etc/audio_effects.conf \
+hardware/qcom/audio/configs/msm8953/audio_output_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_output_policy.conf \
+hardware/qcom/audio/configs/msm8953/audio_effects.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.conf \
hardware/qcom/audio/configs/msm8953/mixer_paths_mtp.xml:system/etc/mixer_paths_mtp.xml \
hardware/qcom/audio/configs/msm8953/mixer_paths_qrd_skuh.xml:system/etc/mixer_paths_qrd_skuh.xml \
hardware/qcom/audio/configs/msm8953/mixer_paths_qrd_skui.xml:system/etc/mixer_paths_qrd_skui.xml \
diff --git a/configs/msm8996/msm8996.mk b/configs/msm8996/msm8996.mk
index 1c0fc19..179a734 100644
--- a/configs/msm8996/msm8996.mk
+++ b/configs/msm8996/msm8996.mk
@@ -68,8 +68,8 @@
endif
PRODUCT_COPY_FILES += \
- hardware/qcom/audio/configs/msm8996/audio_output_policy.conf:system/vendor/etc/audio_output_policy.conf \
- hardware/qcom/audio/configs/msm8996/audio_effects.conf:system/vendor/etc/audio_effects.conf \
+ hardware/qcom/audio/configs/msm8996/audio_output_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_output_policy.conf \
+ hardware/qcom/audio/configs/msm8996/audio_effects.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.conf \
hardware/qcom/audio/configs/msm8996/mixer_paths.xml:system/etc/mixer_paths.xml \
hardware/qcom/audio/configs/msm8996/mixer_paths_tasha.xml:system/etc/mixer_paths_tasha.xml \
hardware/qcom/audio/configs/msm8996/mixer_paths_dtp.xml:system/etc/mixer_paths_dtp.xml \
diff --git a/configs/msm8998/msm8998.mk b/configs/msm8998/msm8998.mk
index 05cd38d..c25550e 100644
--- a/configs/msm8998/msm8998.mk
+++ b/configs/msm8998/msm8998.mk
@@ -73,8 +73,8 @@
endif
PRODUCT_COPY_FILES += \
- hardware/qcom/audio/configs/msm8998/audio_output_policy.conf:system/vendor/etc/audio_output_policy.conf \
- hardware/qcom/audio/configs/msm8998/audio_effects.conf:system/vendor/etc/audio_effects.conf \
+ hardware/qcom/audio/configs/msm8998/audio_output_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_output_policy.conf \
+ hardware/qcom/audio/configs/msm8998/audio_effects.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.conf \
hardware/qcom/audio/configs/msm8998/mixer_paths.xml:system/etc/mixer_paths.xml \
hardware/qcom/audio/configs/msm8998/mixer_paths_tasha.xml:system/etc/mixer_paths_tasha.xml \
hardware/qcom/audio/configs/msm8998/mixer_paths_tavil.xml:system/etc/mixer_paths_tavil.xml \
diff --git a/configs/sdm660/sdm660.mk b/configs/sdm660/sdm660.mk
index e7ab6e9..45ff7f1 100644
--- a/configs/sdm660/sdm660.mk
+++ b/configs/sdm660/sdm660.mk
@@ -70,8 +70,8 @@
endif
PRODUCT_COPY_FILES += \
- hardware/qcom/audio/configs/sdm660/audio_output_policy.conf:system/vendor/etc/audio_output_policy.conf \
- hardware/qcom/audio/configs/sdm660/audio_effects.conf:system/vendor/etc/audio_effects.conf \
+ hardware/qcom/audio/configs/sdm660/audio_output_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_output_policy.conf \
+ hardware/qcom/audio/configs/sdm660/audio_effects.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.conf \
hardware/qcom/audio/configs/sdm660/mixer_paths.xml:system/etc/mixer_paths.xml \
hardware/qcom/audio/configs/sdm660/mixer_paths_mtp.xml:system/etc/mixer_paths_mtp.xml \
hardware/qcom/audio/configs/sdm660/mixer_paths_wcd9335.xml:system/etc/mixer_paths_wcd9335.xml \
diff --git a/hal/audio_extn/gef.c b/hal/audio_extn/gef.c
index 6f001c9..d5e090a 100644
--- a/hal/audio_extn/gef.c
+++ b/hal/audio_extn/gef.c
@@ -52,7 +52,7 @@
#if LINUX_ENABLED
#define GEF_LIBRARY "/usr/lib/libqtigef.so"
#else
-#define GEF_LIBRARY "/system/vendor/lib/libqtigef.so"
+#define GEF_LIBRARY "/vendor/lib/libqtigef.so"
#endif
typedef void* (*gef_init_t)(void*);
diff --git a/hal/audio_extn/soundtrigger.c b/hal/audio_extn/soundtrigger.c
index 1f9c3a9..cecc843 100644
--- a/hal/audio_extn/soundtrigger.c
+++ b/hal/audio_extn/soundtrigger.c
@@ -71,7 +71,7 @@
static void get_library_path(char *lib_path)
{
snprintf(lib_path, MAX_LIBRARY_PATH,
- "/system/vendor/lib/hw/sound_trigger.primary.%s.so",
+ "/vendor/lib/hw/sound_trigger.primary.%s.so",
XSTR(SOUND_TRIGGER_PLATFORM_NAME));
}
#endif
diff --git a/hal/audio_hw.h b/hal/audio_hw.h
index abfba45..8f2ac98 100644
--- a/hal/audio_hw.h
+++ b/hal/audio_hw.h
@@ -56,7 +56,7 @@
#else
#define VISUALIZER_LIBRARY_PATH "/system/lib/soundfx/libqcomvisualizer.so"
#define OFFLOAD_EFFECTS_BUNDLE_LIBRARY_PATH "/system/lib/soundfx/libqcompostprocbundle.so"
-#define ADM_LIBRARY_PATH "/system/vendor/lib/libadm.so"
+#define ADM_LIBRARY_PATH "/vendor/lib/libadm.so"
#endif
/* Flags used to initialize acdb_settings variable that goes to ACDB library */