Commit Graph

47254 Commits

Author SHA1 Message Date
Shraddha Basantwani
6bb696370b Audio : Add remote submix stream implementation
Bug: 286914845
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ia477458193ade9068eaf56e953ab670fee53cc7d
2023-06-30 09:05:50 +00:00
Shunkai Yao
afb60c5bb1 Merge "Support passing entire effect_param_t as vendor extension" 2023-06-30 01:06:35 +00:00
mike liao
62334235e8 Add fix vts fail when configureMonitorEvent am: b79cbf50f1 am: d8baeb3916 am: 1b000d1343
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2640754

Change-Id: Id7ec0c1fae71d7e6f4cf6676222f24f723bcc9e6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-30 00:33:22 +00:00
mike liao
1b000d1343 Add fix vts fail when configureMonitorEvent am: b79cbf50f1 am: d8baeb3916
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2640754

Change-Id: I97914a24ec13a8c8278877907bd6f68012a0deb2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-30 00:05:48 +00:00
mike liao
d8baeb3916 Add fix vts fail when configureMonitorEvent am: b79cbf50f1
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2640754

Change-Id: I48d3c2ecee071096c1b94c94293bb9b1cc39f839
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-29 23:22:37 +00:00
Jin Chen
a0920e2e62 Merge "[uwb](hal) Add radar support" 2023-06-29 20:20:45 +00:00
Jesus Sanchez-Palencia
5cf8e8e2ea Merge changes from topic "lights-aidl-rust-derive"
* changes:
  lights: Add state to the example service
  lights aidl: Add required @Rust derive statements
2023-06-29 19:33:07 +00:00
Shunkai Yao
beef909697 Support passing entire effect_param_t as vendor extension
Replace the UUID toString with hex version

Bug: 271500140
Test: Enable AIDL
Test: atest libAudioHalEffectParamTest
Change-Id: I79a5db25dc45774821a9a9a6bcda77c04e9da90d
2023-06-29 18:18:20 +00:00
Jesus Sanchez-Palencia
c5521aef12 Merge "lights: Re-write example service in Rust" 2023-06-29 18:16:50 +00:00
Jesus Sanchez-Palencia
c0544589b8 lights: Add state to the example service
Add a Light struct to the example service so it can hold a HwLight and
its associated HwLightState. Also added a HashMap of ids -> Light to the
LightService and updated the HAL methods implementation to make the
service stateful.

Now instantiating a LightService requires that a list of HwLights is
provided, so a default implementation was provided as a convenience. The
android.hardware.light rust API version had to be bumped since we rely
on new derive statements added to the AIDL files.

Tested: built VtsHalLightTargetTest and ran in Cuttlefish
Bug: 286106270
Change-Id: Id2b17a6a2290295c7b0b5405ac9815eaa28303c6
2023-06-29 10:54:30 -07:00
Jesus Sanchez-Palencia
ea05baf338 lights aidl: Add required @Rust derive statements
The new LightsService example is written in Rust and is being expanded
to include a state as part of the service. This required that HwLight
and HwLightState derived from the Copy and Clone traits, so here we are
updating the AIDL Rust bindings.

This is not an API change, so in order to avoid having to bump the AIDL
API version for this HAL we used the hash_gen.sh script as below:

$ m android.hardware.light-update-api
$ m android.hardware.light-freeze-api

$ vim light/aidl/Android.bp # removed frozen_api argument and the newly
created version 3 block

$ cp -r aidl_api/android.hardware.light/3/* aidl_api/android.hardware.light/2/
$ rm -rf aidl_api/android.hardware.light/3/

$ ./system/tools/aidl/build/hash_gen.sh  \
      hardware/interfaces/light/aidl/aidl_api/android.hardware.light/2/  \
      1  \
      hardware/interfaces/light/aidl/aidl_api/android.hardware.light/2/.hash

Tested: Verified that the build is passing and used with the next CL.
Bug: 286106270
Change-Id: I1400ec1db1e75595176a5656d6688df9457153d4
2023-06-29 10:53:23 -07:00
Treehugger Robot
2e46e91864 Merge "Validating key characteristics of generated/imported keys." 2023-06-29 17:34:26 +00:00
Jesus Sanchez-Palencia
531b5ba10b lights: Re-write example service in Rust
Add a re-implementation of the Lights HAL example service in Rust. This
was originally written as the start of a Cuttlefish specific
implementation of this service, but it's simple / small enough that
replacing the current Android C++ one with it shouldn't bring in any
trouble while providing yet another Rust service example to the tree.

Tested: built VtsHalLightTargetTest and ran in Cuttlefish
Bug: 286106270
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a796fb113c405838424e61fd0b4cd6e0ef86c5a7)

Change-Id: I01eaf9ce7c6086e1429f52ff4f7f92cebc5360b6
2023-06-29 10:16:04 -07:00
Eran Messeri
4a7c3810fc Merge "Update default KeyMint version to 3" 2023-06-29 16:37:48 +00:00
Myles Watson
0e55fec5c3 Merge "Fix bluetooth AIDL restart fail when open HCI Fail" 2023-06-29 13:55:26 +00:00
Jesus Sanchez-Palencia
3004ccf550 Merge "lights: Add Rust backend to the lights AIDL" 2023-06-28 22:38:47 +00:00
Jin Chen
cb3c1de918 [uwb](hal) Add radar support
* Adding radar session type, capabilities, oids, and app configs based
  on the Android UWB radar UCI spec v1.0.

Test: Compile
Bug: 237097302
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:db326d178686dd981dbb81804534b51502392ae2)
Merged-In: Ia0b901859b38127db8532118f2427338fdf502a8
Change-Id: Ia0b901859b38127db8532118f2427338fdf502a8
2023-06-28 21:11:53 +00:00
yanggang.yang
6ebe251322 Fix bluetooth AIDL restart fail when open HCI Fail
[Description]
If aidl open HCI fail at the first time, the aidl state
can not change to enable for the next time to initialize.

[Root Cause]
Bluetooth AIDL State is always equal to INITIALIZING after
open hci fail at the first time.

[Solution]
When open HCI fail at the first time, initialize the mstate to ready

Bug: 285517442
Test: pass

Change-Id: I19756d6602ba931242d0f95942db55c505a210bb
2023-06-28 09:13:57 +00:00
mike liao
b79cbf50f1 Add fix vts fail when configureMonitorEvent
[Description]
VTS StartFilterInDemux failed when configureMonitorEvent is called

[Root Cause]
Scrambling status event is not notified when configureMonitorEvent is called
  so test case failed.

[Solution]
Scrambling status event is not notified because of no input data.
Add input setting and check event notified or not after data is input.

Test: Manual
bug: 288193021

Change-Id: If5875d064fd67b72f8299205a5e35b1a2bd61934
2023-06-27 11:25:43 -07:00
Mikhail Naganov
9d16a6ac10 audio: Allow Module subclasses to customize stream creation
Since specializations of the 'Module' class likely need
to provide their own specializations for streams, provide
virtual methods for them.

Bug: 282568751
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Iddb1bff9f11bc867aba61897ea2f8b9bc3c27544
2023-06-26 17:32:01 -07:00
Mikhail Naganov
d5554cfae2 audio: Refactor streams implementation
Simplify the experience of implementing stream variants.
Stream class now exposes two interfaces: DriverInterface
and StreamCommonInterface, which represent the two
aspects of its usage: via the FMQ on the worker thread,
and via IStreamCommon Binder interface.

Input/output streams now inherit the concrete stream
variant, and implement interface methods specific for
IStreamIn and IStreamOut.

Added DriverInterface::shutdown method which is called
on the worker thread prior to the exit.

Bug: 282568751
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I5bf8da2f22b27f0e284a41fc30b920d87ac2936c
2023-06-26 17:32:01 -07:00
Mikhail Naganov
75b59dfb4e audio: Propagate errors from Driver::setConnectedDevices
Plumb propagation of errors reported by the implementations
of DriverInterface::setConnectedDevices up to the Module.
This allows returning the reported errors from the corresponding
IModule interface methods. Implement handling of errors
from connection state update by the Module implementation.

When updating streams about the connection status
ensure that the list of connected devices is not empty.

Also, add an extra check to AudioStreamIn#ActiveMicrophones
to validate the size of the returned active microphones
list.

Bug: 282568751
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I62a422d95c37a672fce4ad221bea435cc7b4ebfa
2023-06-26 17:32:01 -07:00
Mikhail Naganov
26dc9add8d audio: Enable use of 'expected_utils' for ScopedAStatus
Add necessary helper functions and use
RETURN_STATUS_IF_ERROR where possible.

Bug: 282568751
Test: atest VtsHalAudioCoreTargetTest
Change-Id: If68c995da0e5e0cb2e9c142ba40af6503ff628b2
2023-06-26 17:32:01 -07:00
Mikhail Naganov
b42a69ef68 audio: Pass flags and I/O handle to StreamContext
Vendor implementations may need to see the value of flags
and the I/O handle of the mix port used to open the stream.

Bug: 282568751
Test: atest VtsHalAudioCoreTargetTest
Change-Id: If1f346793f3b3a725bc19358909f5b461cb159c1
2023-06-26 17:32:01 -07:00
Mikhail Naganov
57f0dcf78d audio: Facilitate extension of Module class by vendors
Make interface methods protected so that subclasses can
augment them.

Provide getters for private fields.

Bug: 282568751
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I0e4810f8a4c816c4f673139816e9768f6dc8da7c
2023-06-26 17:32:01 -07:00
Xin Li
377be1fa1b Merge "Merge Android 13 QPR3" 2023-06-26 22:29:51 +00:00
Jesus Sanchez-Palencia
b990a93646 lights: Add Rust backend to the lights AIDL
This enables us to write a lights service in Rust.

Bug: 286106270
Tested: Verified with a WIP replacement for the Lights example service.
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a37bed645683cec20b67b8303aa8e3f6ac08f32a)
Change-Id: I6f9838ea711fb194ac9b9f7b3c29eeb87491beb8
2023-06-26 13:48:50 -07:00
Rajesh Nyamagoud
7b9ae3c485 Validating key characteristics of generated/imported keys.
Updated VTS tests to verify mgf-digests in key characteristics of
RSA-OAEP keys. Added new tests to import RSA-OAEP keys with
mgf-digests and verified imported key characteristics.

Bug: 279721313
Test: atest VtsAidlKeyMintTargetTest
Change-Id: I06474a85c9e77fded264031ff5636f2c35bee6b4
2023-06-26 18:40:53 +00:00
Treehugger Robot
efb4b9397a Merge "Check for MGF1 digests in key characteristics." 2023-06-26 17:22:09 +00:00
Deyao Ren
ed0da8c243 Merge changes from topic "cherry-pick-b210883464"
* changes:
  Fixes sensors AIDL default impl APEX's binary name.
  Cuttlefish sensors apex uses aidl implementation
2023-06-26 16:55:03 +00:00
Shunkai Yao
e0ade8fe67 Merge "Format VTS test code" 2023-06-23 17:19:15 +00:00
Austin Foxley
de20b45a51 Merge "contexthub: Enable rust bindings" 2023-06-23 15:00:35 +00:00
Shunkai Yao
9e60e635bf Format VTS test code
Bug: 287430121
Test: atest VtsHalAudioEffectTargetTest
Change-Id: Iecc0c9388c6596cf5a25918f8f0af0495b2133a6
2023-06-23 04:34:50 +00:00
Shunkai Yao
187b6b7ece Merge "aidl: Improve Effect VTS naming" 2023-06-23 04:01:02 +00:00
Daniel Norman
d20ebb4f6f Fixes sensors AIDL default impl APEX's binary name.
commit bde01c60fa
moved this APEX from the HIDL to AIDL impl, but accidentally
left out the rename of the binary in the file_contexts

Also deletes unused .rc file here; the APEX already reuses the
.rc file from outside the APEX dir.

Bug: 222579208
Test: Build cf_x86_64_phone using sensors APEX: http://ab/P33964358
      Boot the device, use accel sensor to rotate the screen.
Change-Id: Ib107770312bb80b67364c855efd2df3a9bc52b9a
(cherry picked from commit 80e55dabf3)
2023-06-22 18:36:36 +00:00
deyaoren@google.com
1e1887e055 Cuttlefish sensors apex uses aidl implementation
Bug: 210883464
Test: atest hal_implementation VtsAidlHalSensorsTargetTest
Tests run on abtd:
https://android-build.googleplex.com/builds/abtd/run/L63300000953949688
https://android-build.googleplex.com/builds/abtd/run/L18600000953935211
One test is failing on tip of tree

(cherry picked from commit bde01c60fa)
Change-Id: Iec27e916c94e5a327fc6c4d87451e055b14d9660
2023-06-22 18:21:43 +00:00
David Drysdale
1d7447e5d3 Merge "Allow extra error code in device ID attestation" 2023-06-22 05:58:57 +00:00
Xin Li
6c136ebd48 Merge Android 13 QPR3
Bug: 275386652
Merged-In: I054707abb86a406dfb3ce4f211338107da0a6582
Change-Id: I53d29d621a262cd96d4768850425ca04202644c7
2023-06-21 15:16:02 -07:00
Eran Messeri
8417708fe4 Update default KeyMint version to 3
Update the default KeyMint version to v3.
Note this affects the pure software implementation of KeyMint that is
not used for anything that tests currently run against.

Bug: 275982952
Test: m (that it builds)
Change-Id: I6ab10329af590bd2a045710dfff47c6e78740464
2023-06-21 16:11:25 +01:00
Dan Shi
8cf1bf3f00 Merge "Test: Don't check results when no type-c ports" am: 7e9eece7b3
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2583450

Change-Id: I054707abb86a406dfb3ce4f211338107da0a6582
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-21 05:46:30 +00:00
Dan Shi
7e9eece7b3 Merge "Test: Don't check results when no type-c ports" 2023-06-21 04:56:08 +00:00
Jaideep Sharma
e4c7a96789 aidl: Improve Effect VTS naming
Use uuid in hexadecimal format in testcase name.

Change-Id: Ib687b6617060e4400a767f23ca0b26cece4005f1
2023-06-16 05:58:43 +00:00
Changyeon Jo
b484054880 Increase frame counters in the same critical section am: 928a4535c8 am: a343d0cf0c am: c070b5a14b am: 55baee93d6 am: 4bf0cb2c5f
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2594993

Change-Id: I74e22a7195fb761c3920b7fd865b000d0a4d3ee7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-16 01:16:37 +00:00
Changyeon Jo
4bf0cb2c5f Increase frame counters in the same critical section am: 928a4535c8 am: a343d0cf0c am: c070b5a14b am: 55baee93d6
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2594993

Change-Id: I8ac30fb5abe6c6205d099d089e769ffb477ddc7b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-16 00:32:36 +00:00
Changyeon Jo
55baee93d6 Increase frame counters in the same critical section am: 928a4535c8 am: a343d0cf0c am: c070b5a14b
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2594993

Change-Id: Ic0db29743b092a5a2d01860e76356a38e3e4788b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-16 00:04:30 +00:00
Changyeon Jo
c070b5a14b Increase frame counters in the same critical section am: 928a4535c8 am: a343d0cf0c
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2594993

Change-Id: Ibcaac170949c319d2cff5b45bc8114238d0ada7b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-15 23:21:50 +00:00
Changyeon Jo
a343d0cf0c Increase frame counters in the same critical section am: 928a4535c8
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2594993

Change-Id: I8a59e6173179a284bb90960b30e2e5a35de075a1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-15 22:39:21 +00:00
Changyeon Jo
928a4535c8 Increase frame counters in the same critical section
Bug: 275049370
Test: atest VtsHalEvsV1_0TargetTest
Change-Id: I814aac4edec142027d3802f5ee0d7a444ae2ee86
2023-06-15 21:11:09 +00:00
David Drysdale
f42238c99f Allow extra error code in device ID attestation
Generalize the existing helper function to allow more variants.

Remove a couple of pointless invocations of the existing helper.

Bug: 286733800
Test: VtsAidlKeyMintTargetTest
Change-Id: Ic01c53cbe79f55c2d403a66acbfd04029395c287
2023-06-15 09:43:18 +01:00
Treehugger Robot
8426045977 Merge "Support to get EC public key from the UdsCertchain." am: 1acca5c139
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2615472

Change-Id: I44cd75a17975c7f8e4ab70fc4aa4c0ed3e46e9b9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 18:10:22 +00:00