Commit Graph

10 Commits

Author SHA1 Message Date
Howard Yen
e126b9e361 Update USB Gadget HAL to V1.1 implementation
Bug: 138702846
Test: build pass, function works
Change-Id: I80c295a73aa982b09c81b7cbc3f3a1003c273101
2020-02-20 23:05:41 +08:00
Josh Gao
0a7d54e462 Enable MS OS descriptors for adb.
Bug: http://b/68993980
Test: check_ms_os_desc
Change-Id: I5754065b5fb81c4edeebe9037503f9f4fe53674c
2019-09-05 15:25:52 -07:00
raychi
a56fdd593c Do not enable the funcion when it is not in list
rndis and rmnet cannot co-exist in QCOM spec and
cause ramdump. Besides, enabling functions with
the wrong PID may cause it cannot install proper
PC driver on Windows. A better way is to not allow
enabling the function which is not in support list.

Bug: 130733202
Test: enable tethering with/without rmnet enabled
Signed-off-by: raychi <raychi@google.com>

(cherry picked from commit 79ef1d2d35f3e00ce8ab98ff4a3430af579a5419
and fix merge conflict)

Change-Id: Ia50058f498c5b99ff58251fd7064963ccdbdd940
2019-05-17 17:53:59 +08:00
Badhri Jagan Sridharan
f7168e022d usb gadget hal: Increase disconnect timeout
Increase disconnect timeout from 10ms to 100ms for the host ports which
dont strictly adhere to the spec to sense disconnect.

This is a work around given that some of the root ports dont detect
it. From the USB 2.0 spec guidelines, the disconnect should be
detected in 2.5us.

From the USB 2.0 spec (pg 186)
Time to detect a disconnect event
at a hub’s downstream facing port
TDDIS Section 7.1.7.3 2 2.5 µs


Bug: 110412433
Test: Walleye entering accessory mode in USB 3.0 with IOGear cable
and USB 3.0 host.

Change-Id: I8d8f62dc1a7bcbc9c7727c51cad7f3cb07ba6b50
2018-07-17 06:15:10 +00:00
Jerry Zhang
9515673027 Add audio_source combinations to usb hal
This allows android auto and accessory hid
to both work, and matches functionality
on other device in O.

Bug: 74172000
Test: auto starts
Change-Id: I786cd66bed015c5ad2a4ca668f0d0fbc9c8af507
2018-05-01 21:34:14 +00:00
TreeHugger Robot
ab5ad5f733 Merge changes from topic "oem_functions_for_wahoo" into pi-dev
* changes:
  set usb oem functions to diag,serial_cdev,rmnet_gsi by default
  Set VID/PID for diag functions
2018-03-27 16:48:58 +00:00
Badhri Jagan Sridharan
c5ec9e09d1 Set VID/PID for diag functions
persist.vendor.usb.config stores the vendor specific functions that are
enabled in the target when ro.bootmode is set to usbradio through
the adb command. Since its a persistent property, the oem functions
are persisted once enabled. Alternatively, store the oem functions
in vendor.usb.config. vendor.usb.config is not persisted though.
vendor.usb.config will also reflect the enabled oem functions.

Configurations supported in this CL:
1. diag
2. diag,serial_cdev,rmnet_gsi

This would work irrespective of when ADB is not or not.

Bug: 74603740
Test: Made sure the QXDM recognized wahoo when adb is enabled/
disabled for diag and diag,serial_cdev,rmnet_gsi
Change-Id: Icbbe177e3f8958efc36f67692b9ec935b718fb03
2018-03-23 17:07:46 -07:00
Jerry Zhang
0c556bbbac Mount ptp separately from mtp
Ptp is now mounted in its own directory so the
mtp endpoint does not need to be closed to write
the ptp descriptors.

Bug: 72877174
Test: switch config to mtp/ptp
Change-Id: I9cec66eeb882fbf23851cdaf2e3906e8b3150b0a
2018-03-05 14:15:05 -08:00
Badhri Jagan Sridharan
cb840d8de7 Initialize booleans
Since mMonitorCreated wasnt initialized to false, join was called
on the thread eventhough the thread didnt exist.

Bug: 72691300
Test: Booted asan and verified that adb was enabled.
Change-Id: Iafb529b66084fbe196d6c8b10fabd62a5ec8ec4a
2018-01-31 00:43:09 -08:00
Badhri Jagan Sridharan
5e309b9248 Usb Gadget hal implementation for wahoo
(cherry-pick of commit: e9af4669659c306a9c9b1a1ae3a1313a7631357d)

Bug: 63669128
Test: Tested USB gadget configurations and verified
that they enumerated.
Change-Id: If0f98697488f6c7cfe335d4c292acebaaba6c20f
2018-01-26 22:23:05 +00:00