pthread_cond_timedwait used wall time so it might introduce racing,
pthread_cond_timedwait_monotonic_np is Android specific but it is being
deprecated. And now Android support pthread_condattr_setclock so use it
to wait on CLOCK_MONOTONIC instead.
Bug: 64623895
Test: USB switch function works, charging/MTP/PTP
Change-Id: I136533ff90ef1be2b042ef1e0829643f2f7aa968
Adds a thread that handles add uevents of USB devices, and
enables auto suspend on that USB device (i.e. set power/control
to auto) if the device idProduct/idVendor is whitelisted.
The android kernel will already autosuspend audio devices,
however this enables autosuspend for the Google USB-C to
3.5mm adapter, which presents an HID-only interface when
no 3.5mm headset is connected.
Test: with the selinux and .rc changes for access permission
- MIR without headset: power/control set to auto
- MIR with headset: power/control set to auto
- regular mouse: power/control set to on
Bug: 38352281
Change-Id: I81572584ea02f6bdc814e70ab3439ab86c34a50a
Use 1.1 IUsb in order to make register the service as 1.1 compatible.
This enables lshal to recognize the hal service as 1.1 implementation.
Bug: 62917546
Test: Manually verified lshal output
android.hardware.usb@1.0::IUsb/default 0/1 782 6024 568
android.hardware.usb@1.1::IUsb/default 0/1 782 6024 568
Change-Id: I9b0817841dbcc345a1d854ee4a5193797181ea3f
This CL rebases wahoo HAL based on the kernel change to update
sysfs interface.
https://partner-android-review.googlesource.com/#/c/836088/
Bug: 62272992
Test: Verify USB dialog on wahoo
Change-Id: I8bc8f494176c7648abeb9783fbd18dc837793bda
This CL adds support to notify frameworks when an audio
or debug accessory is attached.
Bug: 36604276
Test: Manually test inserting an Audio accessory.
Change-Id: I9ec0f88ed85ed593b31132ba58bfedb51a435cd8
By default, it is expected that the service does not rename itself
unless there is more than one service exposed by the interface. This
CL changes the usb hal service name back to "default" instead of
"usb_hal"
Bug: 36097487
Test: Manually tested role swap and UI behavior
Change-Id: I4a0aa4423c80cd893c578bc58b9276956daba732