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

Commit cf03d7fe authored by Haynes Mathew George's avatar Haynes Mathew George Committed by android-build-merger
Browse files

audio: usb: Invalid direction specific state on device disconnect

am: 98d8c15b

Change-Id: If0789724f9c13c5d8631619d27fc5c1a8c97a826
parents e50bc7bc 98d8c15b
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();