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

Commit 98d8c15b authored by Haynes Mathew George's avatar Haynes Mathew George Committed by Eric Laurent
Browse files

audio: usb: Invalid direction specific state on device disconnect

Invalid direction specific state maintained in audio_extn/usb.c
on a device disconnect

Bug: 62815577
Test: Play video from Camera app and disconnect USB headset

Change-Id: I871345998737b3157a5af0f1b9a9be8d54443072
parent 928efbe7
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -1087,9 +1087,13 @@ void audio_extn_usb_remove_device(audio_devices_t device, int card)
            free(node_to_item(node_i, struct usb_card_config, list));
        }
    }
    if (audio_is_usb_in_device(device)) { // XXX not sure if we need to check for card
        usbmod->is_capture_supported = false;
    supported_sample_rates_mask[USB_PLAYBACK] = 0;
        supported_sample_rates_mask[USB_CAPTURE] = 0;
    } else {
        supported_sample_rates_mask[USB_PLAYBACK] = 0;
    }

exit:
    if (usb_audio_debug_enable)
        usb_print_active_device();