Commit Graph

10 Commits

Author SHA1 Message Date
Kyle Tso
4918545e03 Usb: Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference


BUG=162536543

Change-Id: I303f77c2763abab2ea630c451187fadc380eaf52
2020-07-31 09:55:00 +00:00
Chih-Hung Hsieh
1dcb87eee2 Fix performance-for-range-copy warnings
Bug: 30413223
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,performance*
Change-Id: Ia47cc330399e3d524da90109deb2d736e6fe056b
2018-12-12 13:46:20 -08:00
Badhri Jagan Sridharan
ecfc861e1e DO NOT MERGE :Usb Gadget hal implementation for wahoo
Bug: 63669128
Test: Tested USB gadget configurations and verified
that they enumerated.
Change-Id: If0f98697488f6c7cfe335d4c292acebaaba6c20f
2018-01-26 00:23:21 +00:00
Xin Li
9ba9e412f6 Merge commit '34f7f32ea4cca137547463132f06cb93dc8d04b3' from
oc-mr1-dev-plus-aosp-without-vendor into stage-aosp-master

Change-Id: I1f549411c9b9219fae6e602569778ae36c511055
2017-11-14 11:49:25 -08:00
Chih-Hung Hsieh
7d0bdbefcd Use -Werror in device/google/wahoo
* Remove unused variables.
* Return result of registerAsService().

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I79d1add6190e835de20a0b0c247bbbb259096c14
2017-11-02 15:26:20 -07:00
Wei Wang
5934d8aab5 Fix potential racing by wall time change in USBhal
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
2017-08-15 13:40:11 -07:00
Yueyao Zhu
b9cd118403 USB: HAL: enable auto suspend for USB headsets
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
2017-07-26 10:41:32 -07:00
Badhri Jagan Sridharan
cb3e84691f Usb: HAL: Update wahoo HAL
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
2017-06-13 17:23:08 -07:00
Badhri Jagan Sridharan
fc32e28be9 USB: HAL: update wahoo hal to V1_1
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
2017-04-26 21:09:10 +00:00
Badhri Jagan Sridharan
1cf5094895 USB HAL: type-c hal for muskie/walleye
Bug: 36097487
Test: Manually tested role swap and UI behavior
Change-Id: I5ce520da521e0714001b60164ac850dddbd644c3
2017-03-27 20:18:35 +00:00