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

Commit 9511a415 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 2034f487 dff872d2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -5733,7 +5733,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)",
@@ -6862,7 +6862,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)",