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

Commit b4dbbbe6 authored by Vidyakumar Athota's avatar Vidyakumar Athota
Browse files

hal: update hw_info with tomtom sound card

-8084 has two variants of soundcards taiko and tomtom.
-Add tomtom sound card name to hw_info

Change-Id: I5b03b6d77589b5491d922b6caa2146fdd43ebf08
CRs-Fixed: 627505
parent 6a4a6b57
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -127,13 +127,17 @@ static void update_hardware_info_8084(struct hardware_info *hw_info, const char
{
    if (!strcmp(snd_card_name, "apq8084-taiko-mtp-snd-card") ||
        !strncmp(snd_card_name, "apq8084-taiko-i2s-mtp-snd-card",
                 sizeof("apq8084-taiko-i2s-mtp-snd-card"))) {
                 sizeof("apq8084-taiko-i2s-mtp-snd-card")) ||
        !strncmp(snd_card_name, "apq8084-tomtom-mtp-snd-card",
                 sizeof("apq8084-tomtom-mtp-snd-card"))) {
        strlcpy(hw_info->type, "mtp", sizeof(hw_info->type));
        strlcpy(hw_info->name, "apq8084", 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, "apq8084-taiko-cdp-snd-card")) {
    } else if ((!strcmp(snd_card_name, "apq8084-taiko-cdp-snd-card")) ||
        !strncmp(snd_card_name, "apq8084-tomtom-cdp-snd-card",
                 sizeof("apq8084-tomtom-cdp-snd-card"))) {
        strlcpy(hw_info->type, " cdp", sizeof(hw_info->type));
        strlcpy(hw_info->name, "apq8084", sizeof(hw_info->name));
        hw_info->snd_devices = (snd_device_t *)taiko_apq8084_CDP_variant_devices;
@@ -255,6 +259,8 @@ void *hw_info_init(const char *snd_card_name)
    struct hardware_info *hw_info;

    hw_info = malloc(sizeof(struct hardware_info));
    hw_info->snd_devices = NULL;
    hw_info->num_snd_devices = 0;

    if(strstr(snd_card_name, "msm8974") ||
              strstr(snd_card_name, "apq8074")) {