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

Commit 7d407e17 authored by Viraja Kommaraju's avatar Viraja Kommaraju
Browse files

hal: Add feature flag for daemon support

Use DAEMON_SUPPORT_AUTO flag in hal to call client
libraries of acdb-loader and audio-hal-plugin daemons.

Change-Id: I77a2bb325fdd2441860b0b27f2632414837e64de
parent d40c6c12
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -126,6 +126,10 @@ ifeq ($(TARGET_BOARD_AUTO),true)
  LOCAL_CFLAGS += -DPLATFORM_AUTO
endif

ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DAEMON_SUPPORT)), true)
  LOCAL_CFLAGS += -DDAEMON_SUPPORT_AUTO
endif

LOCAL_CFLAGS += -Wno-macro-redefined

LOCAL_HEADER_LIBRARIES := libhardware_headers
+6 −0
Original line number Diff line number Diff line
@@ -24,7 +24,13 @@
#include <linux/msm_audio_calibration.h>

#define MAX_CVD_VERSION_STRING_SIZE 100

#ifdef DAEMON_SUPPORT_AUTO
#define LIB_ACDB_LOADER "libacdbloaderclient.so"
#else
#define LIB_ACDB_LOADER "libacdbloader.so"
#endif

#define CVD_VERSION_MIXER_CTL "CVD Version"
#define ACDB_METAINFO_KEY_MODULE_NAME_LEN 100

+4 −0
Original line number Diff line number Diff line
@@ -493,6 +493,10 @@ LOCAL_CFLAGS += \
    -Wno-unused-function \
    -Wno-unused-variable

ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DAEMON_SUPPORT)), true)
  LOCAL_CFLAGS += -DDAEMON_SUPPORT_AUTO
endif

LOCAL_SHARED_LIBRARIES := \
    libaudioroute \
    libaudioutils \
+4 −0
Original line number Diff line number Diff line
@@ -62,7 +62,11 @@ struct ext_hw_plugin_data {
};

/* This can be defined in platform specific file or use compile flag */
#ifdef DAEMON_SUPPORT_AUTO
#define LIB_PLUGIN_DRIVER "libaudiohalpluginclient.so"
#else
#define LIB_PLUGIN_DRIVER "libaudiohalplugin.so"
#endif

void* ext_hw_plugin_init(struct audio_device *adev, ext_hw_plugin_init_config_t init_config)
{
+5 −0
Original line number Diff line number Diff line
@@ -100,7 +100,12 @@
#define TOSTRING_(x) #x
#define TOSTRING(x) TOSTRING_(x)
#ifdef DAEMON_SUPPORT_AUTO
#define LIB_ACDB_LOADER "libacdbloaderclient.so"
#else
#define LIB_ACDB_LOADER "libacdbloader.so"
#endif
#define CVD_VERSION_MIXER_CTL "CVD Version"
#define FLAC_COMPRESS_OFFLOAD_FRAGMENT_SIZE (256 * 1024)