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

Commit 580940c7 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 handset and speaker for msmnile QRD device"

parents ba3b49df 8e5dccc0
Loading
Loading
Loading
Loading
+19 −2
Original line number Diff line number Diff line
@@ -219,6 +219,14 @@ static const snd_device_t tavil_qrd_variant_devices[] = {
    SND_DEVICE_OUT_VOICE_TTY_HCO_HANDSET,
};

static const snd_device_t pahu_qrd_variant_devices[] = {
    SND_DEVICE_OUT_SPEAKER,
    SND_DEVICE_OUT_VOICE_SPEAKER,
    SND_DEVICE_OUT_HANDSET,
    SND_DEVICE_OUT_VOICE_HANDSET,
    SND_DEVICE_OUT_VOICE_TTY_HCO_HANDSET,
};

static const snd_device_t auto_variant_devices[] = {
    SND_DEVICE_OUT_SPEAKER
};
@@ -420,10 +428,19 @@ static void update_hardware_info_sdm845(struct hardware_info *hw_info, const ch
    }
}

static void  update_hardware_info_msmnile(struct hardware_info *hw_info __unused, const char *snd_card_name __unused)
static void  update_hardware_info_msmnile(struct hardware_info *hw_info, const char *snd_card_name)
{
    if (strstr(snd_card_name, "qrd")) {
        strlcpy(hw_info->type, " qrd", sizeof(hw_info->type));
        strlcpy(hw_info->name, "msmnile", sizeof(hw_info->name));
        hw_info->snd_devices = (snd_device_t *)pahu_qrd_variant_devices;
        hw_info->num_snd_devices = ARRAY_SIZE(pahu_qrd_variant_devices);
        hw_info->is_stereo_spkr = false;
        strlcpy(hw_info->dev_extn, "-qrd", sizeof(hw_info->dev_extn));
    } else {
        ALOGW("%s: Not a msmnile device", __func__);
    }
}

static void  update_hardware_info_sdx(struct hardware_info *hw_info __unused, const char *snd_card_name __unused)
{