Skip to main content

Module hotplug

Module hotplug 

Source
Expand description

Discovery is independent of opening a DAC and never grants USB permission.

Structs§

HotplugHub
Shared discovery state and subscriptions. On Android feed this from the host’s registered USB attach/detach receiver and permission result callback, taking an initial UsbManager.deviceList snapshot after registering. The host retains responsibility for prompts, configuration, claims and FD life.
HotplugSubscription
Bounded, nonblocking producer subscription. Both receive methods return a fresh Snapshot after overflow, atomically discarding old hints. Dropping a subscription releases its queue.
LinuxHotplugMonitor
Linux native libusb hotplug events, without opening or claiming devices. If libusb lacks hotplug support, polls descriptors every 250 ms; a complete unplug/replug between fallback polls may be missed; Android must use its host receiver instead. Retain this handle to monitor; dropping it stops and joins the worker. This is discovery, not DAC support verification; composite devices with Audio interfaces are included.
UsbAttachment
One physical attachment. An unplug/replug receives a new ID even when the OS reuses the device path. Use id, not VID/PID, for permission results.

Enums§

HotplugEvent
UsbPermission
Permission reported by the host. Unknown requires an actual open/claim; discovering a descriptor is not proof that a process can access USB.