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

Commit 19759a08 authored by Rom Lemarchand's avatar Rom Lemarchand Committed by Gerrit Code Review
Browse files

Merge "audio: fix audio_is_bluetooth_sco_device()"

parents 6798914b b526630a
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -471,11 +471,15 @@ static inline bool audio_is_a2dp_device(audio_devices_t device)

static inline bool audio_is_bluetooth_sco_device(audio_devices_t device)
{
    if ((device & AUDIO_DEVICE_BIT_IN) == 0) {
        if ((popcount(device) == 1) && ((device & ~AUDIO_DEVICE_OUT_ALL_SCO) == 0))
            return true;
    } else {
        device &= ~AUDIO_DEVICE_BIT_IN;
    if ((popcount(device) == 1) && (device & (AUDIO_DEVICE_OUT_ALL_SCO |
                   AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET)))
        if ((popcount(device) == 1) && ((device & ~AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET) == 0))
            return true;
    else
    }

    return false;
}