Commit graph

54140 commits

Author SHA1 Message Date
Hugo Drumond Jacob
62968d35df [automerger skipped] [DO NOT MERGE] Handle unavailable properties am: aeafec3db0 -s ours am: 373a052124 -s ours am: 28b2c1ad37 -s ours
am skip reason: subject contains skip directive

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2654145

Change-Id: Ib5bb804f7794835cdc0730f9a7e53e18aa4498b3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-28 14:40:07 +00:00
Hugo Drumond Jacob
28b2c1ad37 [automerger skipped] [DO NOT MERGE] Handle unavailable properties am: aeafec3db0 -s ours am: 373a052124 -s ours
am skip reason: subject contains skip directive

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2654145

Change-Id: I3a400c1f5427cffca8e78ffebfa690d0a87cd42b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-28 13:27:45 +00:00
Hugo Drumond Jacob
373a052124 [automerger skipped] [DO NOT MERGE] Handle unavailable properties am: aeafec3db0 -s ours
am skip reason: subject contains skip directive

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2654145

Change-Id: I850f4b7d589b051086d05d2d59f7dec9d2d86537
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-28 11:14:48 +00:00
Treehugger Robot
b091e4e815 Merge "Vts VR test -= vr.h - IWYU" into main am: fb54986369
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2675936

Change-Id: Ic8ba8b5e0b8dd73c1273eca30bf72083db8e39bf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-27 18:41:31 +00:00
Treehugger Robot
fb54986369 Merge "Vts VR test -= vr.h - IWYU" into main 2023-07-27 17:54:03 +00:00
Treehugger Robot
9943d4fee0 Merge "Enable Gyroscope sensor injection by AIDL flag" into main am: bfa8a13317
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2671395

Change-Id: Ifa58459cbab105b3ad8f0c7d0e73497214bf7c96
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-26 18:08:06 +00:00
Treehugger Robot
38ed98a535 Merge "Enable Magnetometer sensor injection by AIDL flag" into main am: 9e9c6feffa
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2657662

Change-Id: I0e115577bbaa57a3cce8edb7a273af287306923f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-26 18:06:47 +00:00
Treehugger Robot
bfa8a13317 Merge "Enable Gyroscope sensor injection by AIDL flag" into main 2023-07-26 17:22:28 +00:00
Treehugger Robot
9e9c6feffa Merge "Enable Magnetometer sensor injection by AIDL flag" into main 2023-07-26 16:53:59 +00:00
Rajesh Nyamagoud
45b478f32e Whenever generateKey fails updated AttestKeyTests to abort instead of
continuing the execution of the test.

If generateKey fails and execution continues then it leads to issues
while verifying the attest records and causing the crash.

Test: atest VtsAidlKeyMintTargetTest
Bug: 292300030
Change-Id: I66bd650423e9e5bbbfe8411a1455c4ea5846f1ff
2023-07-26 04:49:36 +00:00
Ryan Prichard
073c14a320 Merge "Include <functional> for std::function and std::placeholders" into main am: e5896f0fea
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2674342

Change-Id: I3bff9b1908b006069248ebc3e9f9ad7793222e3b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-25 21:27:25 +00:00
Ryan Prichard
e5896f0fea Merge "Include <functional> for std::function and std::placeholders" into main 2023-07-25 20:17:01 +00:00
Mikhail Naganov
24d182487c audio: Add a helper class to simplify legacy HALs migration am: 43a85cfb2b
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2674340

Change-Id: Id2572acb414548928dc3ee086d569d6882313254
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-25 18:27:28 +00:00
Mikhail Naganov
3b553744e5 audio: Move frame counter to StreamContext am: 1eedc130e8
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2674339

Change-Id: I93f722aa57d7d09bdef0f24613fd64b09ddbd347
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-25 18:27:26 +00:00
Mikhail Naganov
e35c2c8368 audio: Update ChildInterface to set scheduler policy lazily am: 780fefb331
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2674338

Change-Id: Ia6ae775532cfad6d1e5d9bf0a614545be5cc1ef7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-25 18:27:23 +00:00
Hugo Drumond Jacob
aeafec3db0 [DO NOT MERGE] Handle unavailable properties
Accommodate the case in which `set()` for an unavailable property is
called as the VHAL may return OK or NOT_AVAILABLE.

Also, it may be the case that certain properties aren't available
while testing and thus, setting a value and getting it right after
might not always work.

Bug: 290882809
Change-Id: I7b7b3f144c4fbd786bf673a86fcac110ec8f79b5
2023-07-25 18:09:28 +00:00
Steven Moreland
0354c1935e Vts VR test -= vr.h - IWYU
To allow more cleanup elsewhere.

Bug: 37280010
Test: build
Change-Id: I7c3f884e433ec478fba3d3fe3a641779b6b279d5
2023-07-25 17:35:58 +00:00
Mikhail Naganov
43a85cfb2b audio: Add a helper class to simplify legacy HALs migration
Since in the C and HIDL APIs the method for opening a stream
receives the device to connect to, some legacy HAL implementations
took an advantage of that. In AIDL APIs device port connection
process is more dynamic and independent of the stream creation.

To simplify porting of legacy implementations to AIDL, a helper
class StreamSwitcher is added. It emulates the legacy behavior
by allowing to postpone the stream implementation creation until
the connected device is known. Until that moment, it exposes
to the client a stub implementation of the stream interface.

Bug: 264712385
Bug: 286914845
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ie8ae0338fd22f705e00a34e56a7fa235eda5ed9e
2023-07-24 16:40:39 -07:00
Mikhail Naganov
1eedc130e8 audio: Move frame counter to StreamContext
Moving frame counter to the StreamContext class enables
switching stream drivers on the fly while keeping the frame
count monotonically increasing.

StreamWorkerCommonLogic now holds a pointer to StreamContext,
which makes redundant storing copies of the fields of the latter.

Bug: 264712385
Test: atest VtsHalAudioCoreTargetTest
Change-Id: If6716f4051c484b52927cbfe4032df7c907eb3a5
2023-07-24 16:37:18 -07:00
Mikhail Naganov
780fefb331 audio: Update ChildInterface to set scheduler policy lazily
Since the client may end up never retrieving the interface
instance for sending it over Binder, postpone setting
of the scheduler policy to until that very moment.

Rename 'ChildInterface::getPtr' to 'getInstance' for clarity.

Bug: 264712385
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I31f9dd832c7f85f9632d1d389a8b1063d237d4c1
2023-07-24 16:36:51 -07:00
Eric Biggers
72a081189b Allow uninstantiated WeaverTest am: 47b145a0d8
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2673336

Change-Id: I31d110aae45cc8f8d3a208ed4d3f7ae3f172071f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-24 19:58:40 +00:00
Eric Biggers
47b145a0d8 Allow uninstantiated WeaverTest
Add back GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST, which I had
accidentally removed while merging the AIDL and HIDL tests.  I think
this is still needed on devices that don't support Weaver at all.

Bug: 291284381
Test: atest VtsHalWeaverTargetTest
Change-Id: Iac1b4476620e51c645e3ad57444ee386cb879029
2023-07-24 17:28:37 +00:00
Ryan Prichard
c8fc80c47b Include <functional> for std::function and std::placeholders
Bug: b/175635923
Test: treehugger
Change-Id: I3dabb8c44334713be9e461dd81f437c3da1ea936
2023-07-21 16:18:11 -07:00
Treehugger Robot
33fcf56f2c Merge "FCM: add c2 software, IConfigurable instances" into main am: 75275ce51e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2666395

Change-Id: Ic902ea653d03789aec3ce3ef08751beb4eb32bd1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-21 21:31:13 +00:00
Treehugger Robot
75275ce51e Merge "FCM: add c2 software, IConfigurable instances" into main 2023-07-21 20:46:08 +00:00
Menna Awadallah
d840c2d5a1 Enable Gyroscope sensor injection by AIDL flag
Enable the flag to be used by cuttlefish.
Test: Manual.
Bug: 292206288

Change-Id: I34abe7c5bbec8a336c71775f9db0bd783cf34bc4
2023-07-21 10:57:43 +00:00
Treehugger Robot
518f74b2f9 Merge "Fix a DimmingStage documentation typo by rewording the doc." into main am: 299db35551
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2669815

Change-Id: I54c79cacff231c1b3528f487875687e1d4e58577
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-21 04:30:25 +00:00
Treehugger Robot
299db35551 Merge "Fix a DimmingStage documentation typo by rewording the doc." into main 2023-07-21 03:44:41 +00:00
Treehugger Robot
cbd5c15f52 Merge changes from topic "fix-b-264712385-primary-module" into main am: 12c4bf6ba1
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2666399

Change-Id: If404a4284b437523f50e42e8574ecdd51f30dde4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-20 23:41:13 +00:00
Treehugger Robot
12c4bf6ba1 Merge changes from topic "fix-b-264712385-primary-module" into main
* changes:
  audio: Move StreamContext ownership out from StreamCommonImpl
  audio: Use ChildInterface in StreamCommonImpl
  audio: Update StreamAlsa and alsa utils for built-in devices
  audio: Simplify and extend alsa::Mixer
2023-07-20 23:09:50 +00:00
Alec Mouri
cdcfd05736 Fix a DimmingStage documentation typo by rewording the doc.
Change-Id: I5a1b3a99630cfded4b34c74b020bb4df2ce12084
2023-07-20 23:07:17 +00:00
Tri Vo
e0fb4d0ce5 KeyMint: Add Root-of-Trust test cases
This patch is a squash of following patches:
 - aosp/2514097
 - aosp/2535086
 - aosp/2576910

Bug: 255344624
Test: VtsKeyMintAidlTargetTest
Change-Id: I8b34a94c11d7cc174821483f624fd083ca1763ac
Merged-In: I8b34a94c11d7cc174821483f624fd083ca1763ac
2023-07-20 18:05:24 -04:00
Tri Vo
727b45bf4f KM 4: Add Root-of-Trust test cases
This patch is a squash of following patches:
 - aosp/2582033
 - aosp/2603248

Bug: 255344624
Test: VtsHalKeymasterV4_0TargetTest
Change-Id: I46e62ab9031d3745f99bd214f9e579e80edc9128
Merged-In: I46e62ab9031d3745f99bd214f9e579e80edc9128
2023-07-20 18:05:18 -04:00
Eric Biggers
d9769b4af6 Merge changes from topic "weaver-vts-fix" into main am: 2a5366d850
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2665203

Change-Id: Ida0015485355ec106c49d91ddbc45cccbcb08684
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-20 17:44:28 +00:00
Eric Biggers
cf07ed821d Clarify the Weaver documentation am: a4742a0291
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2665198

Change-Id: I241107ae39fe30112f46b33906a09a6824d31e69
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-20 17:44:26 +00:00
Devin Moore
2965a93c24 Update weaver AIDL default to use V2 am: 316cf58d49
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2665197

Change-Id: Iaa580ba44e27fc62c4f357a8d9c5f802b2124191
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-20 17:44:23 +00:00
ChengYou Ho
43f1c1af5d Add WeaverReadStatus to WeaverReadResponse am: 20c47b4bae
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2665196

Change-Id: Iedb47e19ff9457b178c34dc469f9a872e30492e6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-20 17:44:20 +00:00
Eric Biggers
2a5366d850 Merge changes from topic "weaver-vts-fix" into main
* changes:
  Don't overwrite in-use Weaver slots during VTS
  Simplify Weaver VTS test
  Remove redundant HIDL Weaver VTS test
  Move VtsHalWeaverTargetTest to common directory
  Make VtsHalWeaverTargetTest test both HIDL and AIDL services
  Clarify the Weaver documentation
  Update weaver AIDL default to use V2
  Add WeaverReadStatus to WeaverReadResponse
2023-07-20 16:53:13 +00:00
Mikhail Naganov
6ddefdbcdf audio: Move StreamContext ownership out from StreamCommonImpl
Upcoming implementations of the streams of the primary module
will need to change the underlying stream type depending on
the current connected device. The stream context must persist,
thus its life time must be bound to the IStreamIn/Out implementation.
Move the StreamContext instance under ownership of StreamIn/Out.

Add StreamCommonImpl::onClose so that the owner of the context
may know when it is safe to reset it.

Re-arrange the order of the arguments when creating a stream
so that the context always comes first.

Bug: 264712385
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Iaf13d4bc3a53cbfc27264d3abd1f6c417ece3941
2023-07-19 17:49:28 -07:00
Mikhail Naganov
2eabaf995b audio: Use ChildInterface in StreamCommonImpl
Replace the pair of 'shared_ptr<>, Binder' with
the equivalent ChildInterface.

Fix logging of returned sub-objects to print their
Binder value instead of the local pointer.

Bug: 264712385
Test: m
Change-Id: I1350e7b3720c6244cd8527e1d021ee9577399291
2023-07-19 17:36:37 -07:00
Mikhail Naganov
422f7e6b1b audio: Update StreamAlsa and alsa utils for built-in devices
Use new functions added to alsa proxy layer for opening
attached (built-in) devices.

Bug: 264712385
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ia2a47ff96fa62f99ce4ec4a0993ca3fd86f82c9d
2023-07-19 17:35:39 -07:00
Mikhail Naganov
f12d4a1ef8 audio: Simplify and extend alsa::Mixer
Remove alsa::MixerControl. tinyALSA contains utility
functions for setting values in percents, they use
the same logic as used to be there for handling
the "volume" control. Use access serialization at
the mixer level, rather than for each control.

Move the call to 'mixer_open' to alsa::Mixer.

Add controls for capture (mic) mute and gain. They
will be used by the primary HAL.

Bug: 264712385
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I0fad994153de96aceec3eb8f2fec19805ec912f8
2023-07-19 17:35:38 -07:00
Max Bires
514ecb0613 Merge "Slight documentation tweak" into main am: fe9355f3c6
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2663916

Change-Id: I3e9406f578a4d1c77e8743ee3d06c3b29a3aeec1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-19 21:25:22 +00:00
Steven Moreland
72f588429a FCM: add c2 software, IConfigurable instances
These instances were previously added manually
on a device-by-device basis. Adding them explicitly
here now.

Bug: 290408770
Test: N/A
Change-Id: Ibc1470aae02d2b1172ea62efeb5af31224b80c45
2023-07-19 21:22:38 +00:00
Max Bires
fe9355f3c6 Merge "Slight documentation tweak" into main 2023-07-19 20:52:56 +00:00
Treehugger Robot
1a72ce6fca Merge "Require mapper4" into main am: 1da295ca82
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2665655

Change-Id: Id459a90e232d4459a3ca0f2ff018a8cf81eecb27
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-19 19:57:50 +00:00
Treehugger Robot
1da295ca82 Merge "Require mapper4" into main 2023-07-19 18:20:57 +00:00
Treehugger Robot
58445c733c Merge changes I88ee8d2f,Id15ecc7f into main am: c081fa39df
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2660420

Change-Id: I4c8a13e0e874ae369295456bd3e7cc401c4a6e08
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-19 17:23:14 +00:00
Shraddha Basantwani
f0506fad7e Audio : Fix minor comments in r_submix module am: 7770c158a1
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2664716

Change-Id: Ibae793a178e5ff3243a3d3db57672b60af1b2c0d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-19 17:22:31 +00:00
Treehugger Robot
c081fa39df Merge changes I88ee8d2f,Id15ecc7f into main
* changes:
  Let the lazy CAS HAL to override the regular one
  Unmark executable bits from CAS AIDL HAL impl
2023-07-19 17:06:00 +00:00