diff options
author | Aviral Gupta <aviralg@codeaurora.org> | 2012-07-29 22:56:14 +0530 |
---|---|---|
committer | Giulio Cervera <giulio.cervera@gmail.com> | 2012-09-04 03:18:36 +0200 |
commit | 83a5146625beda499e5f1a63f81cdc8549a71b43 (patch) | |
tree | 4dd2655fb7ce4cdaebd9a082baad31f47267d569 /hardware.c | |
parent | 7e8fce19e44e1060ca8dfe12317e3fbc32c7b30b (diff) | |
download | hardware_libhardware-83a5146625beda499e5f1a63f81cdc8549a71b43.zip hardware_libhardware-83a5146625beda499e5f1a63f81cdc8549a71b43.tar.gz hardware_libhardware-83a5146625beda499e5f1a63f81cdc8549a71b43.tar.bz2 |
libhardware: Load the MPQ HAL for the MPQ8064 target
Include the broadcast stream structure.
Change-Id: I00996dfb74bd468f8bda8573e95217ec8ed4ad46
Diffstat (limited to 'hardware.c')
-rw-r--r-- | hardware.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -128,6 +128,10 @@ int hw_get_module_by_class(const char *class_id, const char *inst, char prop[PATH_MAX]; char path[PATH_MAX]; char name[PATH_MAX]; +#ifdef QCOM_HARDWARE + int is_mpq; + IS_TARGET_MPQ(is_mpq); +#endif if (inst) snprintf(name, PATH_MAX, "%s.%s", class_id, inst); @@ -151,6 +155,16 @@ int hw_get_module_by_class(const char *class_id, const char *inst, HAL_LIBRARY_PATH2, name, prop); if (access(path, R_OK) == 0) break; +#ifdef QCOM_HARDWARE + if ((!strncmp(name, "audio.primary", 13) || + !strncmp(name, "audio_policy", 12)) && + (is_mpq) && (!strncmp(prop, "msm8960", 7))) + { + strlcpy(prop, "mpq8064", 8); + ALOGE("setting prop to mpq8064"); + } +#endif + snprintf(path, sizeof(path), "%s/%s.%s.so", HAL_LIBRARY_PATH1, name, prop); if (access(path, R_OK) == 0) break; |