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

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

hal: Update backend match function for sub string match

Update platform_check_backends_match function to use sub string match
instead of string match.

Change-Id: Ia520cde0a4eba7c916100b7eb113577605ee216f
CRs-fixed: 1009390
parent 603dfeb3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2000,7 +2000,7 @@ bool platform_check_backends_match(snd_device_t snd_device1, snd_device_t snd_de
    const char * be_itf2 = hw_interface_table[snd_device2];

    if (NULL != be_itf1 && NULL != be_itf2) {
        if (0 != strcmp(be_itf1, be_itf2))
        if ((NULL == strstr(be_itf2, be_itf1)) && (NULL == strstr(be_itf1, be_itf2)))
            result = false;
    } else if (NULL == be_itf1 && NULL != be_itf2) {
            result = false;
+1 −1
Original line number Diff line number Diff line
@@ -1797,7 +1797,7 @@ bool platform_check_backends_match(snd_device_t snd_device1, snd_device_t snd_de
    const char * be_itf2 = hw_interface_table[snd_device2];

    if (NULL != be_itf1 && NULL != be_itf2) {
        if (0 != strcmp(be_itf1, be_itf2))
        if ((NULL == strstr(be_itf2, be_itf1)) && (NULL == strstr(be_itf1, be_itf2)))
            result = false;
    } else if (NULL == be_itf1 && NULL != be_itf2) {
            result = false;