Commit Graph

55152 Commits

Author SHA1 Message Date
Steven Moreland
43d4e6fdb7 Merge "HIDL multithreaded: increase timeout duration" into main 2023-11-15 07:02:10 +00:00
Treehugger Robot
abe08ca9fe Merge "Refactored automotiveCanV1.0_fuzzer" into main 2023-11-15 06:00:41 +00:00
Andy Hung
4cf75592a3 Merge "frameCountFromDurationUs: Avoid integer overflow" into main 2023-11-15 03:31:58 +00:00
Steven Moreland
7e815610a4 HIDL multithreaded: increase timeout duration
This was flaking in infra. I wasn't able to reproduce
offline. Yes, this code directly affects a test in
system/tools/hidl git project.

Bug: 309428730
Test: atest hidl_test
Change-Id: Id8eef9f84f208d5c5de739869fe56603da9dc141
2023-11-14 08:48:42 +00:00
Treehugger Robot
2000d6735a Merge "Revert "Revert "Revert "[avf] Adjust IRPC VTS tests to handle AV..."" into main 2023-11-14 02:41:56 +00:00
Alan Stokes
9cf6ef128f Revert "Revert "Revert "[avf] Adjust IRPC VTS tests to handle AV..."
Revert submission 2812456-revert-2812435-revert-2778549-expose-avf-rkp-hal-GTFGLMUUKQ-PAWNEHUQBT

Reason for revert: SELinux denials: b/310744536

Reverted changes: /q/submissionid:2812456-revert-2812435-revert-2778549-expose-avf-rkp-hal-GTFGLMUUKQ-PAWNEHUQBT

Change-Id: Ibfbb80fed423d722362115e744fa13c376537e92
2023-11-14 01:40:45 +00:00
Alice Wang
ae656627a0 Merge "Revert "Revert "[avf] Adjust IRPC VTS tests to handle AVF in uns..."" into main 2023-11-13 21:33:49 +00:00
Hongguang Chen
5e80be918c Merge "Fix bluetooth aidl crash" into main 2023-11-13 18:51:34 +00:00
Shunkai Yao
69bc4e0711 Merge "Effect AIDL: add Spatializer aidl in audio effect HAL" into main 2023-11-13 17:43:44 +00:00
Treehugger Robot
715bb87f96 Merge "Updated fuzz_config in Android.bp file" into main 2023-11-13 13:29:27 +00:00
Michael Chan
76f06f2c6a frameCountFromDurationUs: Avoid integer overflow
Change-Id: Ifbeab2724172f0adc113d6f8852a6f8ae7870817
2023-11-13 16:53:36 +11:00
yanggang.yang
886074d669 Fix bluetooth aidl crash
[Description]
during servicefuzz test, when AIDL has already been closed, then send
packet will cause crash
[Root Cause]
send function doesn't check AIDL mstate and it may use illegal socket fd
[Solution]
add AIDL state check before send

[Test Report]
test bluetooth servcefuzz pass

Change-Id: Id10c72269a392562798a6e46e9753402db423ee3
Bug: 308904509
2023-11-13 13:39:19 +08:00
Devin Moore
bafcb977b5 Merge changes from topic "upstream_next_vintf_v1" into main
* changes:
  Remove compatibility_matrix.9.xml from 'next' builds
  Mark some HALs as updatable-via-apex retroactively
2023-11-10 21:13:06 +00:00
Shunkai Yao
992b009bc5 Effect AIDL: add Spatializer aidl in audio effect HAL
Spatializer is a union representing parameters for audio spatialization effects

Bug: 273373363
Test: Build
Change-Id: I6e8414238256903aeae171c5b7b7a98fe5f96f89
2023-11-10 05:33:58 +00:00
Ayushi Khopkar
3b47e81f1c Updated fuzz_config in Android.bp file
Added new fields in fuzz_config like - hotlists,
description, vector, service_privilege, users, fuzzed_code_usage, etc.

Bug: 271384401
Bug: 306435930
Test: Build the updated fuzz targets

Change-Id: I7534e278c59dc9dc46b481ce5bbb3efa2a51bb56
2023-11-10 10:14:51 +05:30
Treehugger Robot
0ff72a9189 Merge "CAS AIDL: Start thread pool for default service" into main 2023-11-10 04:14:03 +00:00
Devin Moore
f45d423af2 Remove compatibility_matrix.9.xml from 'next' builds
This compatibility matrix has not be finalized or released yet, so it's
very important that releasing devices in the 'next' configuration don't
use its contents.

Test: m
Bug: 296930312
Change-Id: I843a24308a1653bff0b4842ff71e657304bea2c8
Merged-In: I843a24308a1653bff0b4842ff71e657304bea2c8
2023-11-09 21:39:32 +00:00
Devin Moore
2f0b6a3aea Mark some HALs as updatable-via-apex retroactively
These are all marked updatable-via-apex in compatibility_matrix.9.xml.
Adding them to compatibility_matrix.8.xml to allow Cuttlefish to build
with the apexes on 'next'

Test: m
Bug: 296930312
Change-Id: I2910695dbb7a79ca7164f7ed69437f9636d4135b
Merged-In: I2910695dbb7a79ca7164f7ed69437f9636d4135b
2023-11-09 21:39:15 +00:00
David Drysdale
0a44da8589 Merge changes from topic "ag-wire" into main
* changes:
  AuthGraph: add per-role VTS tests
  AuthGraph: add fuzzer
  AuthGraph: move code into library
  AuthGraph: reduce dependency on authgraph_core
2023-11-09 07:11:51 +00:00
William Escande
e76315b139 Merge "Add defaults for audio AIDL interfaces" into main 2023-11-08 19:06:32 +00:00
David Drysdale
fe41825f1c AuthGraph: add per-role VTS tests
Add VTS tests that just exercise a single role, sink or source.

Use the AuthGraph core library to provide the implementation of the
other role.  This means that the tests are best written in Rust.

Put the test code into a library, so that other HALs which include
AuthGraph as a component can exercise the AuthGraph parts in their own
VTS tests.

Test: VtsAidlAuthGraphRoleTest
Bug: 284470121
Change-Id: I73f6aa277b41cc728587d707d7a6f82f0d18e08f
2023-11-08 12:43:29 +00:00
Bart Van Assche
a0234940b3 audio: VtsHalAudioCoreModuleTargetTest: Convert a SIGSEGV into an assertion failure
Convert the following segmentation fault into an assertion failure:

 signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000000
 Cause: null pointer dereference
 9 total frames
 backtrace:
       #00 pc 000000000020e532  /data/local/tmp/VtsHalAudioCoreTargetTest/x86_64/VtsHalAudioCoreTargetTest (AudioCoreModuleBase::TearDownImpl()+114) (BuildId: f1bb3c414cf012ccd7d268b4e0c7fefe)
       #01 pc 00000000001c890a  /data/local/tmp/VtsHalAudioCoreTargetTest/x86_64/VtsHalAudioCoreTargetTest (AudioCoreModule::TearDown()+106) (BuildId: f1bb3c414cf012ccd7d268b4e0c7fefe)
       #02 pc 00000000002b62a8  /data/local/tmp/VtsHalAudioCoreTargetTest/x86_64/VtsHalAudioCoreTargetTest (testing::TestInfo::Run()+424) (BuildId: f1bb3c414cf012ccd7d268b4e0c7fefe)
       #03 pc 00000000002b6de4  /data/local/tmp/VtsHalAudioCoreTargetTest/x86_64/VtsHalAudioCoreTargetTest (testing::TestSuite::Run()+804) (BuildId: f1bb3c414cf012ccd7d268b4e0c7fefe)
       #04 pc 00000000002c5c7e  /data/local/tmp/VtsHalAudioCoreTargetTest/x86_64/VtsHalAudioCoreTargetTest (testing::internal::UnitTestImpl::RunAllTests()+2622) (BuildId: f1bb3c414cf012ccd7d268b4e0c7fefe)
       #05 pc 00000000002c50cc  /data/local/tmp/VtsHalAudioCoreTargetTest/x86_64/VtsHalAudioCoreTargetTest (testing::UnitTest::Run()+140) (BuildId: f1bb3c414cf012ccd7d268b4e0c7fefe)
       #06 pc 00000000001c86f0  /data/local/tmp/VtsHalAudioCoreTargetTest/x86_64/VtsHalAudioCoreTargetTest (RUN_ALL_TESTS()+16) (BuildId: f1bb3c414cf012ccd7d268b4e0c7fefe)
       #07 pc 00000000001c8669  /data/local/tmp/VtsHalAudioCoreTargetTest/x86_64/VtsHalAudioCoreTargetTest (main+137) (BuildId: f1bb3c414cf012ccd7d268b4e0c7fefe)
       #08 pc 00000000000547e9  /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+89) (BuildId: e5ef3cc48c1e014ffb7dbbcfc7f9d475)

Bug: 308687042
Change-Id: I2d528dd9cf0f59bcd6b0e485b4f6141320d89a81
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-11-07 13:12:35 -08:00
Kenn Frankel
cf4cbd0b9b Merge "Convert Nlinterceptor HAL to Vendor Apex (CF)" into main 2023-11-07 19:17:17 +00:00
Venkatarama Avadhani
a6710298c8 CAS AIDL: Start thread pool for default service
Add missing call to start the thread pool for the default CAS AIDL
service.

Bug: 301369982
Test: atest android.media.misc.cts.MediaCasTest#testClearKeyApis
Change-Id: I6c0572f8573627a817ac5a429bd6800a95687380
2023-11-07 20:51:37 +05:30
Bart Van Assche
0fde783476 audio: AudioHalBinderServiceUtil: Make a log message more informative
If a timeout happens, report the name of the service for which the
timeout happens.

Change-Id: Iad0076071f06f0ca5e53e07b1ef97e25e7bae887
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-11-06 16:14:15 -08:00
Bart Van Assche
17b3201259 audio: Change mDeathHandler from a member into a local variable
Since no data is retained in mDeathHandler across member function calls,
it should be a local variable instead of a member variable.

Change-Id: I58d6cc511a21e0e7f430b3cf528faba072e02ec7
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-11-06 16:01:16 -08:00
Bart Van Assche
a76d4d8899 audio: Simplify AudioHalBinderServiceUtil::waitForFired()
Return the std::condition::wait_for() return value instead of reading
the variable 'fired' again. See also
https://en.cppreference.com/w/cpp/thread/condition_variable/wait_for.

Change-Id: I48c270f5446f61b2ad828b19a1fc294737a123dd
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-11-06 16:01:16 -08:00
Shunkai Yao
195d3d6915 Add defaults for audio AIDL interfaces
- with defaults user don't have to change their Android.bp when there is
  a update
- update AIDL audio interfaces with android.media.audio.common.types
- update Spatialization and HeadTracking AIDL usage

Bug: 273373363
Bug: 293370815
Test: m
Test: lunch panther-trunk_staging-userdebug; m; test Bluetooth Audio
Change-Id: Ic9d8afc1d4e19e4243c66065b0a5d29156632851
Merged-In: Ic9d8afc1d4e19e4243c66065b0a5d29156632851
2023-11-06 19:14:32 +00:00
Mikhail Naganov
3143e6930b Merge changes Ic51d603d,Ia50def0d,I22f65b8b,I8ce9f230,Id8455eb1, ... into main
* changes:
  audio: Query minimum buffer size before opening streams
  audio: Implement getters for hardware mixer controls
  audio: Clean up and fix the bluetooth HAL module
  audio: Provide a way for Module to specify nominal latency
  audio: Fix default remote submix HAL implementation and VTS
  CSD: Add default AIDL HAL implementation
2023-11-06 17:01:00 +00:00
David Drysdale
6fb22dc9ef AuthGraph: add fuzzer
Test: m android.hardware.authgraph-service.nonsecure_fuzzer
Bug: 284470121
Change-Id: Ib702b5b0cf69a4a839326297c2d71355562b46c3
2023-11-06 13:26:25 +00:00
David Drysdale
6c09af215d AuthGraph: move code into library
Use the core library's new service implementation, which wraps a
channel to the TA.

In this nonsecure case, the TA is local in-process, so use the core
library's AuthGraphTa, and implement the SerializedChannel as just
a direct invocation of the TA.

Move this code into a _nonsecure library, so the main.rs just has
the code needed to start the executable and register the service.

Test: VtsAidlAuthGraphSessionTest
Bug: 284470121
Change-Id: I738d3876872a8cd248f0ebec708676d1173b6e37
2023-11-06 13:08:45 +00:00
Treehugger Robot
6a4d763060 Merge "Add gnss HAL APEX" into main 2023-11-06 03:41:38 +00:00
Atsushi Iriboshi
a8ca6207a6 [automerger skipped] [RESTRICT AUTOMERGE] Add ISDBT and ISDBS support in the VTS am: 288de6d6fb -s ours am: 44f83f8ab7 -s ours am: e3e212e7cc -s ours am: 3a79df5008 -s ours
am skip reason: subject contains skip directive

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

Change-Id: Ib0d5cf2931937a7417bc4f52b9265ea2034aec66
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-04 03:42:06 +00:00
Atsushi Iriboshi
3a79df5008 [automerger skipped] [RESTRICT AUTOMERGE] Add ISDBT and ISDBS support in the VTS am: 288de6d6fb -s ours am: 44f83f8ab7 -s ours am: e3e212e7cc -s ours
am skip reason: subject contains skip directive

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

Change-Id: I3274c8553d7cd295135716caf159b535d63b0898
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-04 03:07:05 +00:00
Atsushi Iriboshi
e3e212e7cc [automerger skipped] [RESTRICT AUTOMERGE] Add ISDBT and ISDBS support in the VTS am: 288de6d6fb -s ours am: 44f83f8ab7 -s ours
am skip reason: subject contains skip directive

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

Change-Id: I8d00f85d40b943c1c5e62333f427e5e27edff19f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-04 02:26:32 +00:00
Atsushi Iriboshi
44f83f8ab7 [automerger skipped] [RESTRICT AUTOMERGE] Add ISDBT and ISDBS support in the VTS am: 288de6d6fb -s ours
am skip reason: subject contains skip directive

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

Change-Id: I80df56d3571e2bfbf5c84c396bd143cdb1a854c1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-04 01:50:11 +00:00
Treehugger Robot
f1ff2ca05a Merge "CSD: remove unused library" into main 2023-11-04 01:22:55 +00:00
Jooyung Han
78c24f8854 Add gnss HAL APEX
Bug: 297467836
Test: VtsHalGnssTargetTest
Change-Id: I193ad310cfeabd21fc6beefeaef460487754c7c2
2023-11-03 23:52:37 +00:00
Mikhail Naganov
95f2277730 audio: Query minimum buffer size before opening streams
The proper way to obtain the minimum buffer size when
opening a stream is to retrieve it from the patch. Thus,
a patch must be established prior to opening a stream.
This step was often skipped by VTS tests, they were
providing a fixed stream buffer size which might not
work for all HAL module implementations.

Created a helper class `StreamFixture` which handles
all necessary steps for opening a stream. Overhauled
tests to use this class.

Also, remove special treatment of remote submix devices
by ModuleConfig.

Bug: 300735639
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ic51d603d2bb8ff0fd62434bd16fc02c51326fc42
2023-11-03 14:11:09 -07:00
Mikhail Naganov
49bcb92670 audio: Implement getters for hardware mixer controls
The VTS test for volume accessors first determines whether
the accessor is supported by calling the getter. The getter
must return `UNSUPPORTED_OPERATION` if the control is not
supported. For this reason, wire the getter to the hardware
mixer implementation.

Bug: 302132812
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ia50def0d076b6d3c46db55123186eab34bbbb954
2023-11-03 13:57:36 -07:00
Mikhail Naganov
55045b5fce audio: Clean up and fix the bluetooth HAL module
Fix the issue with retrieving BluetoothA2dp and BluetoothLe
instances access.

In 'Module::connectExternalDevice', always call
'populateConnectedDevicePort' to allow the module implementation
to cancel device connection.

Move frame count calculation into Utils.
Clean up includes and 'using' directives.

Bug: 302132812
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I22f65b8bcdcdd9bcd67a8290520eb4a465d4c720
2023-11-03 13:57:20 -07:00
Mikhail Naganov
1350187c6b audio: Provide a way for Module to specify nominal latency
The latency figure depends on the module implementation.
Instead of using a hardcoded value, each module should be
able to specify its own value. This value is then used
for calculating the minimum buffer size.

Set the nominal latency of the primary (CF) module to a high
value since the virtual device implementation fails CTS tests
if it attempts to pretend that it provides low latency.

Bug: 302132812
Test: atest CtsMediaAudioTestCases --test-filter=".*AudioTrackTest.*"
Test: atest CtsMediaAudioTestCases --test-filter=".*AudioRecordTest.*"
Change-Id: I8ce9f230378eea787c9b3c7ce3660c1e4e7bc895
2023-11-03 13:50:07 -07:00
Mikhail Naganov
2aab766d05 audio: Fix default remote submix HAL implementation and VTS
The implementation had duplicated code in 'transfer', which already
present in 'outWrite'.

Cleaned up delay calculations and logging.

Fixed the VTS to send 'prepareToClose' before attempting to join
the worker. Otherwise, the worker could be stuck on a blocking
operation due to inactivity of the other party and join would never
happen.

Bug: 302132812
Test: atest VtsHalAudioCoreTargetTest --test-filter="*AudioModuleRemoteSubmix*"
Change-Id: Id8455eb12d1d2999dc0bc7b64f0d70a61a177598
2023-11-03 13:49:59 -07:00
Treehugger Robot
253353540d Merge "lnitialize payload of additionallnfo for VTS InjectSensorEventData test" into android14-tests-dev am: 01d47260a1
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2795667

Change-Id: I2e6f7921aeea6e3e0d5a2d5c9ceacdd1a60b5403
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-03 20:32:27 +00:00
Treehugger Robot
01d47260a1 Merge "lnitialize payload of additionallnfo for VTS InjectSensorEventData test" into android14-tests-dev 2023-11-03 20:14:41 +00:00
David Drysdale
f2117ff77c AuthGraph: reduce dependency on authgraph_core
The authgraph_hal library should only depend on libauthgraph_wire, not
on libauthgraph_core, so adjust error processing accordingly.

Test: VtsAidlAuthGraphSessionTest
Bug: 284470121
Change-Id: I48056db6ceeab409d0f165f8e051809129643c6f
2023-11-03 12:22:42 +00:00
Treehugger Robot
7e4037cf01 Merge "ExternalCameraHAL: Check for empty native handle instead of null." into main 2023-11-03 01:10:16 +00:00
Avichal Rakesh
e6a88a8119 ExternalCameraHAL: Check for empty native handle instead of null.
AIDL cannot send nullptr when parceling NativeHandles. Instead, it
sends an empty  handle. Logic which previously relied on null
checks should now rely on checking if the native_handle is
empty or not.

This CL updates ExternalCameraUtils to check for empty handles
instead.

Bug: 299170474
Test: CameraAidlTest#processCaptureRequestInvalidBuffer passes
Change-Id: Id4ba928defaa061708a3c1cd68aa510b376f6cb3
2023-11-02 17:27:43 -07:00
Eran Messeri
4f73689e26 Merge "Document the allowed challenge size" into main 2023-11-02 13:59:09 +00:00
Kenn Frankel
ae3f1fb976 Convert Nlinterceptor HAL to Vendor Apex (CF)
Bug: 300011249
Test: atest VtsHalNetlinkInterceptorV1_0Test

Change-Id: I521877b24354ff95eb941daf314ca1f14d37bd70
2023-11-01 22:58:04 +00:00