Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b4f992c9 authored by Andy Hung's avatar Andy Hung Committed by android-build-merger
Browse files

Fix dlopen library load

am: 7ddf867a

* commit '7ddf867a':
  Fix dlopen library load

Change-Id: I296d31603cd17672bfbfd736d9bdbbc63c73f20c
parents f9d4d07b 7ddf867a
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -22,7 +22,11 @@
#include <audio_hw.h>
#include <dlfcn.h>

#define LIB_SPEAKER_BUNDLE "soundfx/libspeakerbundle.so"
#ifdef __LP64__
#define LIB_SPEAKER_BUNDLE "/system/lib64/soundfx/libspeakerbundle.so"
#else
#define LIB_SPEAKER_BUNDLE "/system/lib/soundfx/libspeakerbundle.so"
#endif

typedef void (*set_mode_t)(int);
typedef void (*set_speaker_on_t)(bool);
+5 −1
Original line number Diff line number Diff line
@@ -31,7 +31,11 @@
#define XSTR(x) STR(x)
#define STR(x) #x

#define SOUND_TRIGGER_LIBRARY_PATH "hw/sound_trigger.primary.%s.so"
#ifdef __LP64__
#define SOUND_TRIGGER_LIBRARY_PATH "/system/vendor/lib64/hw/sound_trigger.primary.%s.so"
#else
#define SOUND_TRIGGER_LIBRARY_PATH "/system/vendor/lib/hw/sound_trigger.primary.%s.so"
#endif

struct sound_trigger_info  {
    struct sound_trigger_session_info st_ses;
+8 −2
Original line number Diff line number Diff line
@@ -27,8 +27,14 @@
#include <audio_route/audio_route.h>
#include "voice.h"

#define VISUALIZER_LIBRARY_PATH "soundfx/libqcomvisualizer.so"
#define OFFLOAD_EFFECTS_BUNDLE_LIBRARY_PATH "soundfx/libqcompostprocbundle.so"
// dlopen() does not go through default library path search if there is a "/" in the library name.
#ifdef __LP64__
#define VISUALIZER_LIBRARY_PATH "/system/lib64/soundfx/libqcomvisualizer.so"
#define OFFLOAD_EFFECTS_BUNDLE_LIBRARY_PATH "/system/lib64/soundfx/libqcompostprocbundle.so"
#else
#define VISUALIZER_LIBRARY_PATH "/system/lib/soundfx/libqcomvisualizer.so"
#define OFFLOAD_EFFECTS_BUNDLE_LIBRARY_PATH "/system/lib/soundfx/libqcompostprocbundle.so"
#endif
#define ADM_LIBRARY_PATH "libadm.so"

/* Flags used to initialize acdb_settings variable that goes to ACDB library */