Commit graph

55162 commits

Author SHA1 Message Date
Treehugger Robot
3db45f8509 Merge "Refactored vehicleManager_fuzzer" into main 2023-11-17 09:15:07 +00:00
Treehugger Robot
035672eb61 Merge "audio: Add a missing include to ModuleConfig.cpp" into main 2023-11-16 19:47:54 +00:00
Hasini Gunasinghe
69efe8e753 Merge "Update the VTS module according to the refactoring in aosp/2826571" into main 2023-11-16 17:11:38 +00:00
Hasini Gunasinghe
5df6ed5e66 Update the VTS module according to the refactoring in aosp/2826571
Test: atest VtsAidlAuthGraphRoleTest, atest VtsAidlAuthGraphSessionTest
Change-Id: I6cc3bd17952f602b58668d35e09c6a5385c7de61
2023-11-16 06:49:05 +00:00
Avichal Rakesh
634ecd5da0 Merge "ExternalCameraHAL: Fix memory leak when copying buffer fence" into main 2023-11-15 22:18:24 +00:00
Mikhail Naganov
8a4394f8b8 Merge "audio: Fix remote submix configuration and 'prepareToClose'" into main 2023-11-15 16:10:04 +00:00
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
Mikhail Naganov
6198ad3883 audio: Add a missing include to ModuleConfig.cpp
This module uses logging, however it did not include
the corresponding header.

Bug: 308706390
Test: build source tree
Change-Id: I1b3b5d8c5118b4f56cb0fe0c2bafd1ff30a6ca41
Merged-In: I1b3b5d8c5118b4f56cb0fe0c2bafd1ff30a6ca41
2023-11-14 01:52:09 +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
Mikhail Naganov
2ebe3906ad audio: Fix remote submix configuration and 'prepareToClose'
In the configuration, remove "mono" channel masks.
The legacy implementation always used stereo, the framework
handles channel conversion. Otherwise, the input may
be opened with a different channel mask from the output.

In 'prepareToClose', close the output side of the route.
The framework may close the "old" output stream after
it has opened a new one. A call to 'prepareToClose' means
that the framework thread is already shutting down, thus
it is safe to shut down the route.

Bug: 302036943
Test: atest audioeffect_analysis
Change-Id: I95b57807f2559ef681da822b3cab4ea6b4340143
2023-11-09 14:33:37 -08: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
Avichal Rakesh
1fa4142e1a ExternalCameraHAL: Fix memory leak when copying buffer fence
Pointer to native_handle_t created using native_handle_create should
be cleaned up using native_handle_delete even if the fds in the
native_handle is no longer managed by it. ExternalCameraDeviceSession
creates native_handle_t as an intermediate to convert to AIDL
NativeHandle but doesn't call native_handle_delete on the
intermediate object which led to memory leaks.

This CL removes the intermediate object and copies the fence fd
directly.

Bug: 305638723
Test: No functional change. Compilation successful.
Change-Id: Ie3c558ee1ae6d2e84053b65eed7db179118395bb
2023-11-03 16:16:57 -07: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