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

Commit 94cb1109 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "hal: remove libmdmdetect library dependency"

parents 094d4385 77327dd0
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -148,8 +148,7 @@ LOCAL_SHARED_LIBRARIES := \
	libtinycompress \
	libaudioroute \
	libdl \
	libexpat \
        libmdmdetect
	libexpat

LOCAL_C_INCLUDES += \
	external/tinyalsa/include \
@@ -159,8 +158,7 @@ LOCAL_C_INCLUDES += \
	$(call include-path-for, audio-effects) \
	$(LOCAL_PATH)/$(AUDIO_PLATFORM) \
	$(LOCAL_PATH)/audio_extn \
	$(LOCAL_PATH)/voice_extn \
        $(TARGET_OUT_HEADERS)/libmdmdetect/inc
	$(LOCAL_PATH)/voice_extn

ifeq ($(strip $(AUDIO_FEATURE_ENABLED_LISTEN)),true)
    LOCAL_CFLAGS += -DAUDIO_LISTEN_ENABLED
+14 −23
Original line number Diff line number Diff line
@@ -33,7 +33,6 @@
#include "audio_extn.h"
#include "voice_extn.h"
#include "sound/compress_params.h"
#include "mdm_detect.h"

#define MIXER_XML_PATH "/system/etc/mixer_paths.xml"
#define MIXER_XML_PATH_AUXPCM "/system/etc/mixer_paths_auxpcm.xml"
@@ -647,26 +646,6 @@ void close_csd_client(struct csd_data *csd)
    }
}

static void platform_csd_init(struct platform_data *plat_data)
{
    struct dev_info mdm_detect_info;
    int ret = 0;

    /* Call ESOC API to get the number of modems.
     * If the number of modems is not zero, load CSD Client specific
     * symbols. Voice call is handled by MDM and apps processor talks to
     * MDM through CSD Client
     */
    ret = get_system_info(&mdm_detect_info);
    if (ret > 0) {
        ALOGE("%s: Failed to get system info, ret %d", __func__, ret);
    }
    ALOGD("%s: num_modems %d\n", __func__, mdm_detect_info.num_modems);

    if (mdm_detect_info.num_modems > 0)
        plat_data->csd = open_csd_client(plat_data->is_i2s_ext_modem);
}

static bool platform_is_i2s_ext_modem(const char *snd_card_name,
                                      struct platform_data *plat_data)
{
@@ -709,6 +688,8 @@ static void set_platform_defaults(struct platform_data * my_data)

void *platform_init(struct audio_device *adev)
{
    char platform[PROPERTY_VALUE_MAX];
    char baseband[PROPERTY_VALUE_MAX];
    char value[PROPERTY_VALUE_MAX];
    struct platform_data *my_data = NULL;
    int retry_num = 0, snd_card_num = 0;
@@ -875,8 +856,18 @@ void *platform_init(struct audio_device *adev)
    else
        platform_info_init(PLATFORM_INFO_XML_PATH);

    /* load csd client */
    platform_csd_init(my_data);
    /* If platform is apq8084 and baseband is MDM, load CSD Client specific
     * symbols. Voice call is handled by MDM and apps processor talks to
     * MDM through CSD Client
     */
    property_get("ro.board.platform", platform, "");
    property_get("ro.baseband", baseband, "");
    if (!strncmp("apq8084", platform, sizeof("apq8084")) &&
        !strncmp("mdm", baseband, (sizeof("mdm")-1))) {
         my_data->csd = open_csd_client(my_data->is_i2s_ext_modem);
    } else {
         my_data->csd = NULL;
    }

    /* init usb */
    audio_extn_usb_init(adev);