Commit Graph

55119 Commits

Author SHA1 Message Date
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
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
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
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
Eran Messeri
79cb992033 Document the allowed challenge size
KeyMint should be able to handle challenges up to 128 bytes.
Document this (and the expected error code) in Tag.aidl.

Bug: 307714384
Test: m
Change-Id: Id099dd055c81b10d777effdf364395f84d8b35c6
2023-11-01 19:22:30 +00:00
Hasini Gunasinghe
93439a212b Merge changes from topic "authgraph-hal" into main
* changes:
  Add (nonsecure) default AuthGraph impl
  authgraph: add parallel session VTS tests
  authgraph: add placeholder VTS test
  Define the AIDL interface for AuthGraph key exchange.
2023-11-01 16:27:51 +00:00
Vlad Popa
7c6c214049 CSD: remove unused library
Test: manual build
Bug: 209491695

Change-Id: I4eabeb92c0882db61bb530b438e59fb990d3c351
Merged-In: I4eabeb92c0882db61bb530b438e59fb990d3c351
2023-11-01 02:40:25 +00:00
Henry Fang
0804e9f8b2 Merge "Add fix vts fail when configureMonitorEvent" into android14-tests-dev am: 7bb2ce9795
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2807334

Change-Id: I6cf77e7655b3ee02514743610be2b285cf7bde35
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-01 01:03:26 +00:00
Henry Fang
7bb2ce9795 Merge "Add fix vts fail when configureMonitorEvent" into android14-tests-dev 2023-11-01 00:49:16 +00:00
David Drysdale
7fd838c0fe Add (nonsecure) default AuthGraph impl
Add an implementation for the AuthGraph key exchange HAL, to allow
testing and policy compliance.

In real use, IAuthGraphKeyExchange instances are expected to be
retrieved from some other HAL, allowing the AuthGraph instance to be
specifically correlated with the component that uses it.

Bug: 284470121
Bug: 291228560
Test: hal_implementation_test
Test: VtsAidlAuthGraphSessionTest
Change-Id: Ib064292d60bead663af7721fd1406f2a9b5d8ecd
2023-10-31 23:18:56 +00:00
David Drysdale
d42cb6fa69 authgraph: add parallel session VTS tests
Test: VtsAidlAuthGraphSessionTest
Change-Id: Idcf79afe838fdbfb88bd7f43fe758ac03d9ba0d1
2023-10-31 23:18:56 +00:00
David Drysdale
c8625a8963 authgraph: add placeholder VTS test
Test: VtsAidlAuthGraphSessionTest (with nonsecure default impl)
Change-Id: I1a94071da8de8d4934709fa7875f89a0bb00a142
2023-10-31 23:18:56 +00:00
Hasini Gunasinghe
0e2495f107 Define the AIDL interface for AuthGraph key exchange.
Introduce the AIDL methods for key exchange and the CDDLs for
the relevant input/output types that are CBOR encoded.

Use a standard comment format in CDDL files to indicate where additional
structure definitions can be found, in the hope that one day tooling
will be available to automatically check schema syntax.

Add authgraph to compatibility matrix

This CL merges the CLs: aosp/2750484, aosp/2750485, aosp/2750486 by
drysdale@google.com

Co-authored-by: David Drysdale <drysdale@google.com>

Bug: 284470121
Test: validate schemas with https://cddl.anweiss.tech/
Test: VtsAidlAuthGraphSessionTest (with nonsecure default impl)
Change-Id: I2793666ede028f8abe91569587c09dcac21c67e0
2023-10-31 23:18:56 +00:00
Myles Watson
aa6ae3fd00 [automerger skipped] BluetoothAudio: Statically link HAL dependencies am: 58d8a57469 -s ours am: bd5216bf6c -s ours
am skip reason: Merged-In I2b3c32b133e208ec2cfb1b244ccb24ad249f22df with SHA-1 5aadf9ad17 is already in history

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

Change-Id: I30a6230cb3c1d2cae013887edbc1a3891b0c55e1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-31 21:43:53 +00:00
Myles Watson
bd5216bf6c [automerger skipped] BluetoothAudio: Statically link HAL dependencies am: 58d8a57469 -s ours
am skip reason: Merged-In I2b3c32b133e208ec2cfb1b244ccb24ad249f22df with SHA-1 5aadf9ad17 is already in history

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

Change-Id: If56284f67c901bd7794bb77fc971d71ef80700c0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-31 21:12:13 +00:00
Myles Watson
58d8a57469 BluetoothAudio: Statically link HAL dependencies
Bug: 290666670
Bug: 289857524
Bug: 284091286
Bug: 289489060
Test: mma -j32
Change-Id: I2b3c32b133e208ec2cfb1b244ccb24ad249f22df
(cherry picked from commit 44628f38d2)
Merged-In: I2b3c32b133e208ec2cfb1b244ccb24ad249f22df
2023-10-31 18:45:58 +00:00
Mikhail Naganov
3c8b6ce171 CSD: Add default AIDL HAL implementation
** Partial upstream of ag/24854732. Only the interface part is
** included.

This should enable the sound dose gts on cuttlefish devices. The sound
dose HAL uses the internal MelProcessor to compute the MELs which are
reported to the framework.

Test: atest GtsAudioTestCases:SoundDoseTest
Bug: 301527435
Change-Id: Ifc505a0171bc8b4d3f5cf65d950fa5c0f812087f
Merged-In: Ifc505a0171bc8b4d3f5cf65d950fa5c0f812087f
2023-10-31 11:38:43 -07:00
Treehugger Robot
309d65f0c4 Merge "LoudnessEnhancer: Added test cases to validate effect processing." into main 2023-10-31 17:04:05 +00:00
Alice Wang
4020b2bd42 Merge "Revert "[avf] Adjust IRPC VTS tests to handle AVF in unsupported env"" into main 2023-10-31 15:13:01 +00:00
Alice Wang
cdf9d2c936 Revert "[avf] Adjust IRPC VTS tests to handle AVF in unsupported env"
Revert submission 2778549-expose-avf-rkp-hal

Reason for revert: SELinux denial
avc:  denied  { find } for pid=3400 uid=10085 name=android.hardware.security.keymint.IRemotelyProvisionedComponent/avf scontext=u:r:rkpdapp:s0:c85,c256,c512,c768 tcontext=u:object_r:avf_remotelyprovisionedcomponent_service:s0 tclass=service_manager permissive=0


Reverted changes: /q/submissionid:2778549-expose-avf-rkp-hal

Bug: 308596709
Change-Id: Id6a930d16949389048713cef20dfa06cdbb9ac95
2023-10-31 15:01:15 +00:00
Alice Wang
561454a0b3 Merge "[avf] Adjust IRPC VTS tests to handle AVF in unsupported env" into main 2023-10-31 12:21:41 +00:00
David Drysdale
c281ef40a5 Merge "gatekeeper: generate Rust bindings" into main 2023-10-31 09:01:16 +00:00
Sneha Patil
496e4415b0 LoudnessEnhancer: Added test cases to validate effect processing.
Added test to verify increase in loudness with gains.
Added test to verify that outputs are 0 for INT_MIN gain value.

Bug: 305866207
Test: atest VtsHalLoudnessEnhancerTargetTest
Change-Id: I6e87f5bf6f268980b6cc9af4b7a191657f117eb5
2023-10-31 11:58:02 +05:30
Devin Moore
2908f7ba6a Merge "Revert "Remove Q matrices"" into main 2023-10-30 23:41:11 +00:00
Devin Moore
5f679f3deb Revert "Remove Q matrices"
Revert submission 2808255-deprecate_android_q

Reason for revert: Broke a device build that is targeting Q b/308482858

Reverted changes: /q/submissionid:2808255-deprecate_android_q

Change-Id: Icc5250b219b8500bbd98eba0d20c637c76b734e6
2023-10-30 22:38:29 +00:00
Treehugger Robot
80c14fb148 Merge "Remove Q matrices" into main 2023-10-30 17:02:53 +00:00
Shunkai Yao
4a0e25ba6f Merge "audio: Add VTS execution tracer" into main 2023-10-30 16:13:44 +00:00
Sadaf Ebrahimi
0fd834c749 Merge "Edit tests to adjust with changes in libxml2 upgrade" into main 2023-10-30 15:06:55 +00:00
Sadaf Ebrahimi
8029a0567c Adjust with changes in libxml2 upgrade
Bug: http://b/307806447
Test: TreeHugger
Change-Id: I474ca3539a2443ad0b1f590f27aa53a7279798e1
2023-10-30 15:06:32 +00:00
Sadaf Ebrahimi
351f681ec8 Edit tests to adjust with changes in libxml2 upgrade
Bug: http://b/307806447
Test: TreeHugger
Change-Id: I5978fb6b11538ac254b971fada17cfbbcc5360cf
2023-10-30 15:06:26 +00:00
David Drysdale
8cf2649f8b gatekeeper: generate Rust bindings
Test: TreeHugger
Change-Id: I125a2a682f39070720a3038b9b5e3407b2b467bb
2023-10-30 08:17:12 +00:00
Treehugger Robot
db1da1c8a6 Merge "Refactored keymaster4_utils_fuzzer" into main 2023-10-30 05:14:00 +00:00
Jooyung Han
94b63ab755 Merge changes I1d745f64,I4bb2572c into main
* changes:
  Use static linking for virtual fingerprint hal
  Make Fingerprint Virtual HAL APEX as default
2023-10-30 02:11:21 +00:00
Treehugger Robot
a9050e3ac0 Merge "media.c2 aidl: provide a waitable fd for blockpool creation" into main 2023-10-28 06:33:09 +00:00
Pawan Wagh
6d61d7d121 Merge "Remove vendor from android.hardware.cas-service_fuzzer" into main 2023-10-27 23:36:18 +00:00