Commit graph

198 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
Jooyung Han
d7447ae658 Cleanup: use shared apex_key
Bug: 296524155
Test: m
Change-Id: Ibe18eb283a8c76622e5b5fcc92c7148eb3f788b3
2023-10-10 12:59:46 +09:00
Dan Shi
7b61e45b5d Merge "Test: Don't check results when no type-c ports" am: 7e9eece7b3 am: 8cf1bf3f00 am: 9912848327
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2583450

Change-Id: I616cbfd1e85406959b1b47358cdb75eeef92d030
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-21 07:13:54 +00:00
Dan Shi
7e9eece7b3 Merge "Test: Don't check results when no type-c ports" 2023-06-21 04:56:08 +00:00
Haotien Hsu
392d530a64 Test: Don't check results when no type-c ports
For those devices without type-c ports, the queryPortStatus test is
always failed.Because there are no PortStatus for the callbacks.
Adding an additional condition branch to skip the results checking when
there are no PortStatus.

Bug: 281643316
(https://partnerissuetracker.corp.google.com/issues/281643316)
Change-Id: Ibf599038b542d5d81a2af9ab2097f2f868be0447
Signed-off-by: Haotien Hsu <haotienh@nvidia.com>
2023-06-07 13:46:58 +08:00
kumarashishg
a73b235cef Add OWNERS for USB functionality am: b44a84db6b am: 7e6207fde7 am: 7cd931522d
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2602106

Change-Id: I3b41855f0b1909381c600046f201a0aebc40e90f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-24 21:22:45 +00:00
kumarashishg
b44a84db6b Add OWNERS for USB functionality
Add active owners

Bug: 284073105
Test: tests are not required to add owners
Change-Id: Ie7e39ca71949880fb588bf346a2f3becd0c14acb
2023-05-24 19:10:17 +00: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
Treehugger Robot
c00be16811 Merge "Fix the missing std" am: 39337adcc9 am: a4ab908631 am: d65d1a6b64
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2468920

Change-Id: If2e904f1f3bb8a1a3b7b63d67ddbee2392baad7a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-03 17:37:23 +00:00
zijunzhao
ab9e5bcdea Fix the missing std
Bug: b/239662094
Test: enable Wunqualified-std-cast-call locally and run m to build
Change-Id: Ifc51be5ee13296e9711c91ffac320d1cc7048ff0
2023-03-03 03:42:02 +00:00
TreeHugger Robot
d66731d396 Merge "Add resetCb" 2023-02-09 02:02:55 +00:00
Pawan Wagh
9b13007164 Fixing null deference in android.hardware.usb.gadget-service.example
Test: atest VtsAidlUsbTargetTest
Bug: 267534245
Change-Id: Ib28b7848205809912b6789d0e050c1a981dc1ce8
Merged-In: Ib28b7848205809912b6789d0e050c1a981dc1ce8
2023-02-09 01:34:19 +00:00
Pawan Wagh
6fb5cb3332 Fixing null deference in android.hardware.usb.gadget-service.example
Test: atest VtsAidlUsbTargetTest
Bug: 267534245
Change-Id: Ib28b7848205809912b6789d0e050c1a981dc1ce8
2023-02-08 23:41:06 +00:00
Ricky Niu
44612031c0 Add resetCb
Add the resetCb to complete asynchronous

Bug: 267252826
Test: Boot to home and function work
Change-Id: I6a70bdb87fab1a2f6e7718257d1145f07fa0a14b
2023-02-07 15:30:43 +08:00
Avichal Rakesh
e1153030e7 Usb Gadget: Add UVC to Usb Gadget interface
UVC Gadget Function is required for DeviceAsWebcam service that lets
Android Devices be used as Webcam when connected to hosts. This CL adds
the UVC GadgetFunction to the USB Gadget interface.

Bug: 242344221
Test: Manually tested that the HAL and the framework pick up the new
      GadgetFunction
Change-Id: I93acf458f279500320ffc5abd55f139d3d768101
2023-02-03 17:38:19 -08:00
Avichal Rakesh
bdb590419d Merge "UsbGadget AIDL migration cleanup" 2023-01-26 20:18:18 +00:00
Avichal Rakesh
90a7f5b5d6 UsbGadget AIDL migration cleanup
This CL does the following:
  - Add fields to AIDL UsbSpeed that were added in HIDL's UsbSpeed 1.2.
  - Fix the values of the AIDL speeds. The values of fields in UsbSpeed
    didn't match their HIDL counterparts so this CL fixes the values
    as well.
  - Remove unused import from IUsbGadget and IUsbGadgetCallback.

Test: Manually tested that UsbManager reports the correct speed when
      using the AIDL interface
Bug: 218791946
Change-Id: Ic94bb382c11a88a29da5e61ca751138f271f54ac
2023-01-25 13:10:01 -08: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
Treehugger Robot
ea59abe658 Merge changes from topic "USB AIDL Migration" am: ef0ed10e8f am: 71fcb7e605 am: b9988e15a9
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2377088

Change-Id: Ie7cd0ba584aa77610acdc30c093908fb21cd08b3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-12 08:29:50 +00:00
Ricky Niu
cf6843151a Fixed the build break in cf_x86_tv-userdebug
Change the long to int64_t in function setCurrentUsbFunctions

Note:: This is a cherry-pick of ag/20605909
Test: Build Pass
Bug: 260947383
Merged-In: I4832e2890ea561c8ad377e5a62bfa22dae35bf0f
Change-Id: I4832e2890ea561c8ad377e5a62bfa22dae35bf0f
Signed-off-by: Ricky Niu <rickyniu@google.com>
2023-01-12 14:51:20 +08:00
Treehugger Robot
ef0ed10e8f Merge changes from topic "USB AIDL Migration"
* changes:
  Migrate IUsbGadget to AIDL (Fixed Commnets)
  Migrate IUsbGadget to AIDL
2023-01-12 05:37:41 +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
Ricky Niu
e3568f3dd4 Migrate IUsbGadget to AIDL (Fixed Commnets)
Fixed the comments for aosp/2361672

Bug: 218791946
Test: USB function switch success and AIDL service is running.

Signed-off-by: Ricky Niu <rickyniu@google.com>
Change-Id: I1bd5b96cfe0d994091338a827efe49d07be8c578
2023-01-06 15:12:17 +00:00
Ricky Niu
1eaaea47b2 Migrate IUsbGadget to AIDL
This change migrates android.hardware.usb.IUsbGadget 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.

Note: This is a cherry-pick of ag/16819267
Bug: 218791946
Test: USB function switch success and AIDL service is running.

Signed-off-by: Ricky Niu <rickyniu@google.com>

Merged-In: Ie05354660f13c8047e2c1712bf373e8699874d28
Change-Id: Ie05354660f13c8047e2c1712bf373e8699874d28
(cherry picked from commit 73b7652e00)
2023-01-06 11:13:36 +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
Ricky Niu
2bbf8ee86d Fixed the build break in cf_x86_tv-userdebug
Change the long to int64_t in function setCurrentUsbFunctions

Bug: 260947383
Change-Id: I4832e2890ea561c8ad377e5a62bfa22dae35bf0f
Signed-off-by: Ricky Niu <rickyniu@google.com>
2022-12-01 16:23:08 +08:00
TreeHugger Robot
ccf629e426 Merge "Migrate IUsbGadget to AIDL" 2022-12-01 04:30:29 +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
Treehugger Robot
397a536206 Merge "USB Gadget v1.2: Remove redundant rndis gadget linking" 2022-11-09 04:00:32 +00:00
Ricky Niu
73b7652e00 Migrate IUsbGadget to AIDL
This change migrates android.hardware.usb.IUsbGadget 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: 218791946
Test: USB function switch success and AIDL service is running.

Signed-off-by: Ricky Niu <rickyniu@google.com>
Change-Id: Ie05354660f13c8047e2c1712bf373e8699874d28
2022-11-02 16:09:51 +08:00
Roman Stratiienko
54af8f0261 USB Gadget v1.2: Remove redundant rndis gadget linking
To allow linking using 'kVendorRndisConfig' property.

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Change-Id: If174b053b588ff940895f3afeabc63b5e93b8119
2022-08-28 17:28:08 +03:00
Elliott Hughes
f53c50c542 Merge "Fix incorrect indentation." am: 5609b7b260
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2159656

Change-Id: Iac1a5985a30670d043dd70f5531e3bfdfa652cc3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 20:45:33 +00:00
Elliott Hughes
6db7fab85d Fix incorrect indentation.
It doesn't look like there was an actual bug here beyond the indentation.

Bug: http://b/239578516
Test: treehugger
Change-Id: I71bf2e59467b311a82252056aeeede2355727023
2022-07-19 18:31:56 +00:00
Jooyung Han
d81d6a12be Remove AIDL-libs from VNDK
Some are still in VNDK because they are used in other VNDK libs.

Bug: 234181591
Test: m
Merged-In: If999df9c78a20df931177da11742b1c5de19bc08
Change-Id: If999df9c78a20df931177da11742b1c5de19bc08
2022-06-14 16:42:42 +09: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
Bob Badour
9ad034df97 [LSC] Add LOCAL_LICENSE_KINDS to hardware/interfaces
Added SPDX-license-identifier-Apache-2.0 to:
  usb/aidl/Android.bp
  usb/aidl/default/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Change-Id: I3ea2a006619b896e9ebac0c54bba67c8a4bb1b29
2022-04-28 11:35:47 -07:00
Badhri Jagan Sridharan
8ef2bcb6d9 VTS tests for USB AIDL interface
Bug: 200993386
Bug: 199357330
Bug: 211677613
Change-Id: I49881d136697cd5f207a61e179779b532d0d8e76
Merged-In: I49881d136697cd5f207a61e179779b532d0d8e76
(cherry picked from commit aef9dec7dd)
2022-04-25 05:24:44 +00:00
Badhri Jagan Sridharan
99ecbd7b81 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
Merged-In: Id8aa40682d4c4b435c63b3ae249b176276dbb31d
(cherry picked from commit b9f69ea776)
2022-04-25 05:24:33 +00: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