hal: Add change to pick codec name based mixer xml files
Add change to follow QCV norms while picking codec name
based mixer xml files.
Change-Id: Ifa21be4d1ddc0ad50fd4dcf1f009b818c65e3711
diff --git a/hal/audio_extn/utils.c b/hal/audio_extn/utils.c
index 5f10ca7..492519d 100644
--- a/hal/audio_extn/utils.c
+++ b/hal/audio_extn/utils.c
@@ -2618,29 +2618,19 @@
#define PLATFORM_INFO_XML_PATH "audio_platform_info.xml"
#define PLATFORM_INFO_XML_BASE_STRING "audio_platform_info"
-#ifdef LINUX_ENABLED
-static const char *kConfigLocationList[] =
- {"/etc"};
-#else
-static const char *kConfigLocationList[] =
- {"/vendor/etc"};
-#endif
-static const int kConfigLocationListSize =
- (sizeof(kConfigLocationList) / sizeof(kConfigLocationList[0]));
-
bool audio_extn_utils_resolve_config_file(char file_name[MIXER_PATH_MAX_LENGTH])
{
char full_config_path[MIXER_PATH_MAX_LENGTH];
- for (int i = 0; i < kConfigLocationListSize; i++) {
- snprintf(full_config_path,
- MIXER_PATH_MAX_LENGTH,
- "%s/%s",
- kConfigLocationList[i],
- file_name);
- if (F_OK == access(full_config_path, 0)) {
- strlcpy(file_name, full_config_path, MIXER_PATH_MAX_LENGTH);
- return true;
- }
+ char vendor_config_path[VENDOR_CONFIG_PATH_MAX_LENGTH];
+
+ /* Get path for audio configuration files in vendor */
+ audio_get_vendor_config_path(vendor_config_path,
+ sizeof(vendor_config_path));
+ snprintf(full_config_path, sizeof(full_config_path),
+ "%s/%s", vendor_config_path, file_name);
+ if (F_OK == access(full_config_path, 0)) {
+ strlcpy(file_name, full_config_path, MIXER_PATH_MAX_LENGTH);
+ return true;
}
return false;
}