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

Commit 9af4b91d authored by Eric Laurent's avatar Eric Laurent
Browse files

hal: fix backend check routine for combo device

If there is path change between combo device and general device that
shares backend, previous device should be disabled before the new device
is enabled. Otherwise, by the race conditio, the new device would be
disabled by previous combo device
For example, when the previous device is 'speaker-and-headphone' and the new
devcie is 'voice-headphones', there is possibility that
'voice-headphones' get mute by disabling 'speaker-and-headphone'.

BUG=23916345

Change-Id: I765b3c0b6576f22c4aca290846d58dd1c6dfb8c5
parent 2facd29c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1211,7 +1211,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;
    }