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

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

Merge "hal: Add support for 8939 sound cards"

parents 06f3a0bf c6003e23
Loading
Loading
Loading
Loading
+26 −2
Original line number Diff line number Diff line
@@ -149,8 +149,32 @@ static void update_hardware_info_8x16(struct hardware_info *hw_info, const char
        hw_info->snd_devices = NULL;
        hw_info->num_snd_devices = 0;
        strlcpy(hw_info->dev_extn, "", sizeof(hw_info->dev_extn));
    } else if (!strcmp(snd_card_name, "msm8939-snd-card")) {
        strlcpy(hw_info->type, "", sizeof(hw_info->type));
        strlcpy(hw_info->name, "msm8939", sizeof(hw_info->name));
        hw_info->snd_devices = NULL;
        hw_info->num_snd_devices = 0;
        strlcpy(hw_info->dev_extn, "", sizeof(hw_info->dev_extn));
    } else if (!strcmp(snd_card_name, "msm8939-snd-card-mtp")) {
        strlcpy(hw_info->type, "", sizeof(hw_info->type));
        strlcpy(hw_info->name, "msm8939", sizeof(hw_info->name));
        hw_info->snd_devices = NULL;
        hw_info->num_snd_devices = 0;
        strlcpy(hw_info->dev_extn, "", sizeof(hw_info->dev_extn));
    } else if (!strcmp(snd_card_name, "msm8939-skuh-snd-card")) {
        strlcpy(hw_info->type, "skuh", sizeof(hw_info->type));
        strlcpy(hw_info->name, "msm8939", sizeof(hw_info->name));
        hw_info->snd_devices = NULL;
        hw_info->num_snd_devices = 0;
        strlcpy(hw_info->dev_extn, "", sizeof(hw_info->dev_extn));
    } else if (!strcmp(snd_card_name, "msm8939-skui-snd-card")) {
        strlcpy(hw_info->type, "skui", sizeof(hw_info->type));
        strlcpy(hw_info->name, "msm8939", sizeof(hw_info->name));
        hw_info->snd_devices = NULL;
        hw_info->num_snd_devices = 0;
        strlcpy(hw_info->dev_extn, "", sizeof(hw_info->dev_extn));
    } else {
        ALOGW("%s: Not an  8x16 device", __func__);
        ALOGW("%s: Not an  8x16/8939 device", __func__);
    }
}

@@ -160,7 +184,7 @@ void *hw_info_init(const char *snd_card_name)

    hw_info = malloc(sizeof(struct hardware_info));

    if(strstr(snd_card_name, "msm8x16")) {
    if(strstr(snd_card_name, "msm8x16") || strstr(snd_card_name, "msm8939")) {
        ALOGV("8x16 - variant soundcard");
        update_hardware_info_8x16(hw_info, snd_card_name);
    } else {
+4 −0
Original line number Diff line number Diff line
@@ -412,6 +412,10 @@ static void query_platform(const char *snd_card_name,
                 sizeof("msm8x16-skui-snd-card"))) {
        strlcpy(mixer_xml_path, MIXER_XML_PATH_QRD_SKUI,
                sizeof(MIXER_XML_PATH_QRD_SKUI));
    } if (!strncmp(snd_card_name, "msm8939-snd-card-mtp",
                 sizeof("msm8939-snd-card-mtp"))) {
        strlcpy(mixer_xml_path, MIXER_XML_PATH,
                sizeof(MIXER_XML_PATH));
    } else {
        strlcpy(mixer_xml_path, MIXER_XML_PATH,
                sizeof(MIXER_XML_PATH));