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

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

Merge "hal: Fix incorrect wsa count update during platform_init"

parents 96a2a739 148ec935
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -2013,7 +2013,6 @@ static bool check_and_get_wsa_info(char *snd_card_name, int *wsaCount,
    }

    while ((tdirent = readdir(tdir))) {
        char buf[50];
        struct dirent *tzdirent;
        DIR *tzdir = NULL;

@@ -2021,6 +2020,7 @@ static bool check_and_get_wsa_info(char *snd_card_name, int *wsaCount,
        if (!tzdir)
            continue;
        while ((tzdirent = readdir(tzdir))) {
            char buf[50] = {0};
            if (strcmp(tzdirent->d_name, "type"))
                continue;
            snprintf(name, MAX_PATH, TZ_TYPE, tzn);
@@ -2028,12 +2028,12 @@ static bool check_and_get_wsa_info(char *snd_card_name, int *wsaCount,
            read_line_from_file(name, buf, sizeof(buf));
            if (strstr(buf, file)) {
                wsa_count++;
            }
            tzn++;
            /*We support max only two WSA speakers*/
            if (wsa_count == 2)
                break;
        }
            tzn++;
        }
        closedir(tzdir);
    }
    if (wsa_count > 0){