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

Commit d51a4662 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 8976 tasha sound card"

parents 1ac9fb21 d7691747
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -234,6 +234,12 @@ 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, "msm8976-tasha-snd-card")) {
        strlcpy(hw_info->type, "", sizeof(hw_info->type));
        strlcpy(hw_info->name, "msm8976", 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-skum-snd-card")) {
        strlcpy(hw_info->type, "", sizeof(hw_info->type));
        strlcpy(hw_info->name, "msm8952", sizeof(hw_info->name));
@@ -256,7 +262,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, "msm8909") || strstr(snd_card_name, "msm8952") ||
        strstr(snd_card_name, "msm8976")) {
        ALOGV("8x16 - variant soundcard");
        update_hardware_info_8x16(hw_info, snd_card_name);
    } else {
+18 −2
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@
#define MIXER_XML_PATH_I2S "/system/etc/mixer_paths_i2s.xml"
#define MIXER_XML_PATH_WCD9306 "/system/etc/mixer_paths_wcd9306.xml"
#define MIXER_XML_PATH_WCD9330 "/system/etc/mixer_paths_wcd9330.xml"
#define MIXER_XML_PATH_WCD9335 "/system/etc/mixer_paths_wcd9335.xml"
#define PLATFORM_INFO_XML_PATH      "/system/etc/audio_platform_info.xml"
#define PLATFORM_INFO_XML_PATH_I2S  "/system/etc/audio_platform_info_i2s.xml"

@@ -724,7 +725,10 @@ static void update_codec_type(const char *snd_card_name) {
         !strncmp(snd_card_name, "msm8939-tomtom9330-snd-card",
                  sizeof("msm8939-tomtom9330-snd-card")) ||
         !strncmp(snd_card_name, "msm8952-tomtom-snd-card",
                  sizeof("msm8952-tomtom-snd-card"))) {
                  sizeof("msm8952-tomtom-snd-card")) ||
         !strncmp(snd_card_name, "msm8976-tasha-snd-card",
                  sizeof("msm8976-tasha-snd-card")))
     {
         ALOGI("%s: snd_card_name: %s",__func__,snd_card_name);
         is_external_codec = true;
     }
@@ -810,6 +814,15 @@ static void query_platform(const char *snd_card_name,
        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, "msm8976-tasha-snd-card",
                 sizeof("msm8976-tasha-snd-card"))) {
        strlcpy(mixer_xml_path, MIXER_XML_PATH_WCD9335,
                sizeof(MIXER_XML_PATH_WCD9335));
        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, "msm8909-skua-snd-card",
                 sizeof("msm8909-skua-snd-card"))) {
        strlcpy(mixer_xml_path, MIXER_XML_PATH_SKUA,
@@ -3355,10 +3368,13 @@ int platform_set_codec_backend_cfg(struct audio_device* adev,

    int ret = 0;
    const char *snd_card_name = mixer_get_name(adev->mixer);

    if (bit_width != adev->cur_codec_backend_bit_width) {
        const char * mixer_ctl_name;
        if (!strncmp(snd_card_name, "msm8952-tomtom-snd-card",
                 sizeof("msm8952-tomtom-snd-card"))) {
                sizeof("msm8952-tomtom-snd-card")) ||
            !strncmp(snd_card_name, "msm8976-tasha-snd-card",
                sizeof("msm8976-tasha-snd-card"))) {
            mixer_ctl_name = "SLIM_0_RX Format";
        }
        else