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

Commit c527450b authored by Meng Wang's avatar Meng Wang Committed by Gerrit - the friendly Code Review server
Browse files

hal: add support for msm8917 tmo, msm8917 sku5 and msm8940 sku6

add sound card entry for the following devices:
msm8917 tmo,msm8917 sku5 and msm8940 sku6.

CRs-Fixed: 1002168
Change-Id: Ifc08af12c9d86031fba11128323c9f40d1d92e5e
parent 3cc657ab
Loading
Loading
Loading
Loading
+23 −4
Original line number Diff line number Diff line
@@ -197,13 +197,13 @@ static void update_hardware_info_8x16(struct hardware_info *hw_info, const char
        strlcpy(hw_info->dev_extn, "", sizeof(hw_info->dev_extn));
    } else if (!strcmp(snd_card_name, "msm8952-sku1-snd-card")) {
        strlcpy(hw_info->type, "", sizeof(hw_info->type));
        strlcpy(hw_info->name, "msm8952", sizeof(hw_info->name));
        strlcpy(hw_info->name, "msm8937", 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, "msm8952-sku2-snd-card")) {
        strlcpy(hw_info->type, "", sizeof(hw_info->type));
        strlcpy(hw_info->name, "msm8952", sizeof(hw_info->name));
        strlcpy(hw_info->name, "msm8937", 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));
@@ -267,8 +267,26 @@ 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, "msm8917-sku5-snd-card")) {
        strlcpy(hw_info->type, "", sizeof(hw_info->type));
        strlcpy(hw_info->name, "msm8917", 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, "msm8917-tmo-snd-card")) {
        strlcpy(hw_info->type, "", sizeof(hw_info->type));
        strlcpy(hw_info->name, "msm8917", 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, "msm8940-sku6-snd-card")) {
        strlcpy(hw_info->type, "", sizeof(hw_info->type));
        strlcpy(hw_info->name, "msm8940", 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/8939/8909/8952 device", __func__);
        ALOGW("%s: Not an 8x16/8909/8917/8937/8939/8940/8952/8953 device", __func__);
    }

    hw_info->is_wsa_combo_suppported = false;
@@ -287,7 +305,8 @@ void *hw_info_init(const char *snd_card_name)
    if (strstr(snd_card_name, "msm8x16") || strstr(snd_card_name, "msm8939") ||
        strstr(snd_card_name, "msm8909") || strstr(snd_card_name, "msm8952") ||
        strstr(snd_card_name, "msm8976") || strstr(snd_card_name, "msm8953") ||
        strstr(snd_card_name, "msm8937")) {
        strstr(snd_card_name, "msm8937") || strstr(snd_card_name, "msm8917") ||
        strstr(snd_card_name, "msm8940") ) {
        ALOGV("8x16 - variant soundcard");
        update_hardware_info_8x16(hw_info, snd_card_name);
    } else {
+21 −0
Original line number Diff line number Diff line
@@ -1086,6 +1086,27 @@ static void query_platform(const char *snd_card_name,
        msm_device_to_be_id = msm_device_to_be_id_external_codec;
        msm_be_id_array_len  =
            sizeof(msm_device_to_be_id_external_codec) / sizeof(msm_device_to_be_id_external_codec[0]);
    } else if (!strncmp(snd_card_name, "msm8917-tmo-snd-card",
                  sizeof("msm8917-tmo-snd-card"))) {
        strlcpy(mixer_xml_path, MIXER_XML_PATH_SKU2,
               MAX_MIXER_XML_PATH);
        msm_device_to_be_id = msm_device_to_be_id_internal_codec;
        msm_be_id_array_len  =
            sizeof(msm_device_to_be_id_internal_codec) / sizeof(msm_device_to_be_id_internal_codec[0]);
    } else if (!strncmp(snd_card_name, "msm8917-sku5-snd-card",
                  sizeof("msm8917-sku5-snd-card"))) {
        strlcpy(mixer_xml_path, MIXER_XML_PATH_SKU2,
               MAX_MIXER_XML_PATH);
        msm_device_to_be_id = msm_device_to_be_id_internal_codec;
        msm_be_id_array_len  =
            sizeof(msm_device_to_be_id_internal_codec) / sizeof(msm_device_to_be_id_internal_codec[0]);
    } else if (!strncmp(snd_card_name, "msm8940-sku6-snd-card",
                  sizeof("msm8940-sku6-snd-card"))) {
        strlcpy(mixer_xml_path, MIXER_XML_PATH_SKU1,
               MAX_MIXER_XML_PATH);
        msm_device_to_be_id = msm_device_to_be_id_internal_codec;
        msm_be_id_array_len  =
            sizeof(msm_device_to_be_id_internal_codec) / sizeof(msm_device_to_be_id_internal_codec[0]);
    } else {
        strlcpy(mixer_xml_path, MIXER_XML_PATH,
                sizeof(MIXER_XML_PATH));