media: update path for vendor specific config files
Vendor specific config files can be different for QSSI Vs. GSI builds.
Use vendor property to look for such files in different locations at
runtime.
CRs-Fixed: 2712335
Change-Id: Icd52c7769d01cc65a449dd4203c0657494c86ab3
diff --git a/audio/include/system/audio_config.h b/audio/include/system/audio_config.h
index b9fd6b5..4292bc0 100644
--- a/audio/include/system/audio_config.h
+++ b/audio/include/system/audio_config.h
@@ -32,13 +32,22 @@
static inline std::vector<std::string> audio_get_configuration_paths() {
static const std::vector<std::string> paths = []() {
char value[PROPERTY_VALUE_MAX] = {};
+ bool va_aosp = property_get_bool("ro.vendor.qti.va_aosp.support", false);
+ std::vector<std::string> ret;
if (property_get("ro.boot.product.vendor.sku", value, "") <= 0) {
- return std::vector<std::string>({"/odm/etc", "/vendor/etc", "/system/etc"});
+ ret = std::vector<std::string>({"/odm/etc", "/vendor/etc", "/system/etc"});
} else {
- return std::vector<std::string>({
- "/odm/etc", std::string("/vendor/etc/audio/sku_") + value,
+ ret = std::vector<std::string>({
+ "/odm/etc",
+ std::string("/vendor/etc/audio/sku_") + value +
+ (va_aosp ? "_qssi" : ""),
+ std::string("/vendor/etc/audio/sku_") + value,
"/vendor/etc", "/system/etc"});
}
+ if (va_aosp) {
+ ret.insert(ret.end() - 2, "/vendor/etc/audio");
+ }
+ return ret;
}();
return paths;
}