summaryrefslogtreecommitdiffstats
path: root/hardware.c
diff options
context:
space:
mode:
authorAviral Gupta <aviralg@codeaurora.org>2012-07-29 22:56:14 +0530
committerGiulio Cervera <giulio.cervera@gmail.com>2012-09-04 03:18:36 +0200
commit83a5146625beda499e5f1a63f81cdc8549a71b43 (patch)
tree4dd2655fb7ce4cdaebd9a082baad31f47267d569 /hardware.c
parent7e8fce19e44e1060ca8dfe12317e3fbc32c7b30b (diff)
downloadhardware_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.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/hardware.c b/hardware.c
index 4c58e38..ce14fe3 100644
--- a/hardware.c
+++ b/hardware.c
@@ -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;