Commit graph

29 commits

Author SHA1 Message Date
Roy Luo
1af5aa4dea Usb compliance warning extension
Add new warnings to enum ComplianceWarning

Test: atest VtsAidlUsbTargetTest
Bug: 296119135
Bug: 300340959
Change-Id: I5dcfe50285589d35dd2a2ab87020de8e2b92c181
2023-11-02 20:49:28 +00:00
Jooyung Han
f9cfbd5e07 Cleanup: move VINTF fragment into VAPEX
Bug: 296524155
Test: m && launch_cvd
    # usb hal service is running
Change-Id: I5aebf03e1f651b8cd2753627ad55022be9eba8d6
2023-10-10 13:40:22 +09:00
Alex Buynytskyy
ec1198d941 UpsideDownCake is now 34
Ignore-AOSP-First: UpsideDownCake Finalization
Bug: 275409981
Test: build
Change-Id: I832ab7a8b5445ba85e27bbcf5be64906bfa0e5be
2023-04-07 23:41:20 +00:00
RD Babiera
07ce759994 Add hpd and link training status to AltModeData
Adds DisplayPort hpd and link training attributes within
DisplayPortAltModeData in USB HAL layer to more accurately
populate frameworks API fields. Within DisplayPortAltModeData are
new fields hpd and linkTrainingStatus.

Test: atest VtsAidlUsbTargetTest
Bug: 253534975
Change-Id: I3eb4b1527f457ba63bf127fbb14bd583ef6caf2f
2023-01-23 18:44:32 +00:00
RD Babiera
ff0f61bed1 Skip VTS tests based on HAL interface version
Adds version check to compliance warning, plug orientation, and
DisplayPort VTS tests to skip if feature is not supported. Fixed tab
spacing on mentioned tests.

Bug: 265060163
Test: atest VtsAidlUsbTargetTest
Change-Id: If3e04baa98fa3299f128551e3b93debd729f57e3
2023-01-11 21:03:12 +00:00
RD Babiera
50e1987391 Merge "Usb DisplayPort alt mode aidl interfaces" 2023-01-10 19:11:17 +00:00
RD Babiera
6c94dde226 Usb DisplayPort alt mode aidl interfaces
Adds enums for DisplayPortAltModeStatus and DisplayPortAltModePinAssignment.
Adds AltModeData and DisplayPortAltModeData.
Updates PortStatus to reflect these new enums and parcelables.

Test: atest VtsAidlUsbTargetTest
Bug: 253534975
Change-Id: I0fc62601dfc162b909e796586110686beed137ea
2023-01-09 21:06:18 +00:00
TreeHugger Robot
6f7bc58bd7 Merge "Fix check for DisabledDataStatusCheck" 2023-01-07 04:36:02 +00:00
Badhri Jagan Sridharan
6dcb4177e2 Fix check for DisabledDataStatusCheck
disabledCount is expected to be less than or equal to 1.
Fix this by replacing EXPECT_LE with EXPECT_GE.

Bug: 263977605
Change-Id: Id6c803fed814ae13c0f160bb644c31d5d6093738
2023-01-04 22:45:03 +00:00
Treehugger Robot
d131df678a Merge "USB owners cleanup" am: 451350985a am: 2f37a8ad2c am: ca532505e2
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2372269

Change-Id: I91020c173c987136dacebf8c31cec953c42337e5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-04 02:40:44 +00:00
Steven Moreland
4a193d8ad0 USB owners cleanup
I wrote a script to do this.

Bug: N/A
Test: N/A
Change-Id: Ie646392d2ff7191f9716c2c6c45e739dc6b1c512
2023-01-03 18:16:30 +00:00
Badhri Jagan Sridharan
a6aaccc43a Add additional status flags to UsbDataStatus
This change introduces two new values to UsbDataStatus enum
to denote status of Usb data. Previously, UsbDataStatus enum
contained DISABLED_DOCK which indicated that USB data is disabled
due to a docking event. Depending on the hardware design, some
architectures might only disable USB host mode or USB gadget
mode selectively when docked. This change adds enum values
to denote them. DISABLED_HOST_DOCK indicates USB host mode
disabled due to docking event. DISABLED_DEVICE_DOCK indicates
device mode disabled due to docking event. DISABLED_DOCK,
DISABLED_HOST_DOCK, DISABLED_DEVICE_DOCK are mutually exclusive.

Bug: 250522538
Change-Id: I7767bff94a7e5869a734f45e5bd4dba4d4d5fc6d
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
2022-12-15 02:51:11 +00:00
RD Babiera
776fe2d8ef Merge "Usb non-compliant port partner aidl extension" 2022-11-30 01:39:18 +00:00
Jooyung Han
c2a204e4bb USB APEX with AIDL implementation
The previous USB APEX was bundling HIDL 1.0 default implemetation.
Migrating the USB APEX to use AIDL implementation.

Bug: 227791019
Test: tbd
Change-Id: I99aa16fa36215ff296f8194717381efdcf3e8ed8
2022-11-16 10:27:56 +09:00
RD Babiera
3a8b5ee143 Usb non-compliant port partner aidl extension
Adds aidl api definitions for notifying if the plugged Type-C
port partner (power source/accessory/cable) is non-compliant
with type-c power delivery specification. PortStatus is extended to have
a boolean that states whether or not this feature is supported as well
as an array for a new enum ComplianceWarning.

Test: atest VtsAidlUsbTargetTest
new test nonCompliantChargerStatus expects expects array to be empty
when the feature is not supported. new test nonCompliantChargerValues
expects any values in array to be in range of ComplianceWarning enums
if feature is supported.

Bug: 236322506
Change-Id: Ie3c2365e7c713327b44421c4d132b321d0e03d5f
2022-11-09 23:30:46 +00:00
Jooyung Han
c0b24f4f13 Remove AIDL-libs from VNDK
Some are still in VNDK because they are used in other VNDK libs.

Ignore-AOSP-First: some libs are still in internal master only.

Bug: 234181591
Test: m
Merged-In: If999df9c78a20df931177da11742b1c5de19bc08
Change-Id: If999df9c78a20df931177da11742b1c5de19bc08
(cherry picked from commit 5527adfd7f)
2022-06-14 14:08:59 +09:00
Jooyung Han
5527adfd7f Remove AIDL-libs from VNDK
Some are still in VNDK because they are used in other VNDK libs.

Ignore-AOSP-First: some libs are still in internal master only.

Bug: 234181591
Test: m
Change-Id: If999df9c78a20df931177da11742b1c5de19bc08
2022-06-02 17:43:19 +09:00
Jiyong Park
70f5837e1f Freeze AIDL APIs for TM
Bug: 225941299
Test: m
Change-Id: I61eb51c0334eb99489c6f1570110d7e18c350c99
2022-04-16 07:03:24 +09:00
Bob Badour
13cb922a05 [LSC] Add LOCAL_LICENSE_KINDS to hardware/interfaces
Added SPDX-license-identifier-Apache-2.0 to:
  camera/common/aidl/Android.bp
  camera/device/aidl/Android.bp
  camera/metadata/aidl/Android.bp
  usb/aidl/Android.bp
  usb/aidl/default/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Change-Id: Ie530a51faa37d782428a20238e78573658697be8
2022-02-10 13:39:55 -08:00
TreeHugger Robot
79d54bc5c2 Merge changes from topic "resetUsbPort"
* changes:
  Implement VTS for resetUsbPort and notifyResetUsbPort
  Add resetUsbPort in USB HAL interface
2022-01-26 08:13:08 +00:00
Ricky Niu
a9040400c7 Implement VTS for resetUsbPort and notifyResetUsbPort
Because resetUSBPort API will disconnect the device,
disabled the test for temporary.

Write another VTS on the host side.
Create the b/216387845 to trace.

Bug: 197300598
Test: atest VtsAidlUsbTargetTest

Signed-off-by: Ricky Niu <rickyniu@google.com>
Change-Id: I17d66c2e9ec55b4ebd9edbb153b7f6bd7166d847
2022-01-26 01:50:42 +00:00
Badhri Jagan Sridharan
549e7f5423 Add OWNERS for IUsb aidl interface
Bug: 200993386
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Change-Id: I7fd3c3466d81f125f970ef0cbb9a121655d6dde5
2022-01-25 20:12:57 +00:00
Ricky Niu
45131a7309 Add resetUsbPort in USB HAL interface
Bug: 197300598
Test: Verify the API working manually

Signed-off-by: Ricky Niu <rickyniu@google.com>
Change-Id: I52de859244145cb8699f6138ee73a7fe47fdd67b
2022-01-24 21:28:45 +08:00
Badhri Jagan Sridharan
f883235915 Add Vts test for enableUsbDataWhileDocked interface
The test validates that transactionId passed by
the callback matches the requeest transactionId.

Bug: 211677613
Change-Id: I79e58502edfb36c30e42bcde8a79525a6046c859
2022-01-24 21:28:33 +08:00
Badhri Jagan Sridharan
e745058f70 Add fields to infer UsbPortStatus and allow enabling usb while docked
Adding two fields to UsbPortStatus to infer the following:
a. usbDataStatus: To infer the current USB data status of the port.
b. powerBrickStatus: To infer whether a power brick is connected
                     to the USB port.

The change also adds a new method, enableUsbDataWhileDocked to
allow enabling Usb port while being docked.

Bug: 211677613
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Change-Id: I4fb352679a52326bf4b0fc5aa3d218a0f34cecdb
2022-01-24 21:28:23 +08:00
Badhri Jagan Sridharan
6f67c56a65 Add Vts test for limitPowerTransfer interface
Bug: 199357330
Change-Id: I018e3ebf1b8a6d7e5b1ad2592695ab2541439a59
2022-01-21 18:49:51 +08:00
Badhri Jagan Sridharan
623f13385f Add limitPowerTransfer API to IUsb
limitPowerTransfer is invoked to limit power transfer
in and out of the Usb port.

Bug: 199357330
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Change-Id: I5f4991d024ad827ae8148fc143a44cc05bafdcb4
2022-01-21 18:49:39 +08:00
Badhri Jagan Sridharan
aef9dec7dd VTS tests for USB AIDL interface
Bug: 200993386
Bug: 199357330
Bug: 211677613
Change-Id: I49881d136697cd5f207a61e179779b532d0d8e76
2022-01-21 18:49:24 +08:00
Badhri Jagan Sridharan
b9f69ea776 Migrate IUsb to AIDL
This change migrates android.hardware.usb.IUsb to AIDL and
adds the default implementation.

Compared to the HIDL interface, AIDL based interface adds
transactionId argument to each of the interface method which
is used while invoking the corresponding callback.

Bug: 200993386
Bug: 199357330
Test: Ran new hal implementation on Pixel. Yet to run VTS.
Change-Id: Id8aa40682d4c4b435c63b3ae249b176276dbb31d
2022-01-21 18:49:07 +08:00