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

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

Merge "hal: use correct usb card state when setting in/out device"

parents 55f40f9c b3fb48ec
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -5687,7 +5687,7 @@ int adev_open_output_stream(struct audio_hw_device *dev,
                      (devices != AUDIO_DEVICE_OUT_USB_ACCESSORY);
    bool direct_dev = is_hdmi || is_usb_dev;

    if (is_usb_dev && (audio_extn_usb_connected(NULL))) {
    if (is_usb_dev && (!audio_extn_usb_connected(NULL))) {
        is_usb_dev = false;
        devices = AUDIO_DEVICE_OUT_SPEAKER;
        ALOGW("%s: ignore set device to non existing USB card, use output device(%#x)",
@@ -6795,7 +6795,7 @@ static int adev_open_input_stream(struct audio_hw_device *dev,
                                                            flags,
                                                            source);

    if (is_usb_dev && (audio_extn_usb_connected(NULL))) {
    if (is_usb_dev && (!audio_extn_usb_connected(NULL))) {
        is_usb_dev = false;
        devices = AUDIO_DEVICE_IN_BUILTIN_MIC;
        ALOGW("%s: ignore set device to non existing USB card, use input device(%#x)",