Commit graph

2809 commits

Author SHA1 Message Date
Shunkai Yao
f7391d5ac4 Merge "Effect AIDL VTS: relax dynamics processing effect parameter validations" into main 2024-04-22 23:52:06 +00:00
Shunkai Yao
972b465a0e Effect AIDL VTS: relax dynamics processing effect parameter validations
relaxing several parameter checking to align with HIDL
 - no need to have stage in use to set bands/channels
 - band settings no need to be sorted by frequency

Bug: 328012516
Test: atest VtsHalDynamicsProcessingTargetTest
Change-Id: If12d978ee69ee7f087a7e8758513a9c6bacf817f
Merged-In: If12d978ee69ee7f087a7e8758513a9c6bacf817f
2024-04-22 22:44:57 +00:00
Treehugger Robot
53eb12245b Merge "audio: Use more bursts in audio I/O VTS tests" into main 2024-04-19 23:25:33 +00:00
Mikhail Naganov
a2a9fa5003 audio: Use more bursts in audio I/O VTS tests
Some audio outputs use A/V sync and requre mode bursts
in order to start reporting the presentation position.

Bug: 300735639
Bug: 328010709
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Icad0942f2ba1dcd6f030a7dc4f37e22fdbd6dd71
2024-04-19 21:56:00 +00:00
Treehugger Robot
0dccb6e265 Merge changes Icd33f3cb,I737479d8 into main
* changes:
  audio: Fix AudioPatchTest/AudioModulePatch#UpdateInvalidPatchId VTS test
  audio: Skip stream I/O test for "echo reference" input device
2024-04-19 01:44:52 +00:00
Mikhail Naganov
22e17d43bd audio: Update 'PauseSync' scenario in AudioStreamIoOutTest
According to the definition of the 'PAUSED' state
in StreamDescriptor.aidl, s/w (the client) stops
writing once the buffer is filled up. That means, it is
allowed for an output stream not to consume data
from the MQ while in the paused state, so allow that
in the test.

Also, update the state transition sequence in the test
to flush any data after making a burst while in the 'PAUSED'
state.

Bug: 328010709
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Icb5fd02ca4ede63d7ae33613ab66cb96f3e6df29
2024-04-18 14:36:50 -07:00
Mikhail Naganov
8dd96d4c41 audio: Fix AudioPatchTest/AudioModulePatch#UpdateInvalidPatchId VTS test
The test was using '0' as an "invalid" patch ID value, however
this value is valid in the context of 'IModule.setAudioPatch'
method and means "create a new patch and allocate and ID for it".

Bug: 328010709
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Icd33f3cbd1602ec5aa162fa72fc3ddd59ccffbef
2024-04-18 13:23:05 -07:00
Mikhail Naganov
a62c5df181 audio: Skip stream I/O test for "echo reference" input device
This is aligned with the HIDL implementation VTS. The echo reference
device can't provide any input until certain preconditions are met,
and modeling these preconditions in the test is not trivial.

Also, add the information into the mix port into the trace scope
for easier identification on test failure.

Bug: 328010709
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I737479d8ef1961791ac3bd82aeb779453d2e49f4
2024-04-18 13:22:32 -07:00
Mikhail Naganov
403040b952 Merge "audio: Fix IStreamIn.getActiveMicrophones test" into main 2024-04-17 23:15:45 +00:00
Mikhail Naganov
eee5499ba8 audio: Fix IStreamIn.getActiveMicrophones test
Since "active" means "used by the stream for acquiring data,"
it was unreasonable to expect the list of active microphones
to be non-empty prior to actually starting data acquisition.
This change adds running of 'burst' commands before calling
'getActiveMicrophones'.

To reuse existing code some refactorings have been made.
Added 'AudioInputFlags::HOTWORD_TAP' to the list of port
config flags for which I/O testing is not performed.

Bug: 328010709
Bug: 328362233
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I876c0b6d7365e104ec9ed8cf5033a83f822006b6
2024-04-17 14:47:16 -07:00
Treehugger Robot
7291b19db1 Merge "audio: skip data path for offload Virtualizer" into main 2024-04-17 03:52:17 +00:00
Mikhail Naganov
66351e5a9f audio: Align bluetooth start behavior
When staring data transfer, if resuming of BT session fails,
the legacy implementation does not indicate an error, thus
causing an automatic retry on next transfer. The AIDL
implementation was switching the stream into an error state
instead. This could cause audio mute when the BT stack is
slow on resuming. This CL aligns AIDL with legacy behavior.

Bug: 333307789
Test: repro steps in the bug
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:3f4c7fca29db4b82d597bb56478f40a75cef618c)
Merged-In: I5080a7275671287f188930f041c5ff2215ed2e1e
Change-Id: I5080a7275671287f188930f041c5ff2215ed2e1e
2024-04-16 16:27:10 +00:00
Jaideep Sharma
9f7c9102d3 audio: skip data path for offload Virtualizer
Skip the data path tests for offloading Virtualizer, as offloading
effects don't publish fmqs and don't actually process the data.

Bug: 334851716
Test: run vts -m VtsHalVirtualizerTargetTest
Change-Id: I0d96fe4b036bdbd6c7b65af906edaaaac39f7a10
2024-04-15 16:42:36 +00:00
Treehugger Robot
0f141d1967 Merge "PresetReverb: Add test to validate PresetReverb Effect" into main 2024-04-11 17:25:34 +00:00
Sneha Patil
94abce0998 PresetReverb: Add test to validate PresetReverb Effect
Added tests to verify increase in energy with decrease in room and hall size.
Remove preset reverb default implementation from the config file.

Bug: 305866207
Test: atest VtsHalPresetReverbTargetTest
Change-Id: I565612d90b7c7e52cb23bd5dbfaf02235f65cc67
2024-04-11 09:25:56 +05:30
Mikhail Naganov
7b9b9e03e5 audio: Use allow list for device connection types in TryConnectMissingDevice
Limit the connection types to test to the following:
 - HDMI*
 - IP_V4
 - USB

Only these connection types can be easily checked by the HAL
for presence of an external device.

Bug: 326888643
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I659e14a150b3043ead8d844cd89a2c4700d57efd
2024-04-10 23:50:37 +00:00
Kiyoung Kim
160c3d610c Merge "Remove VNDK definition(s)" into main 2024-04-09 02:13:37 +00:00
Kiyoung Kim
9e9d41d162 Remove VNDK definition(s)
As of VNDK deprecation, any libraries that defines vndk is no longer
valid anymore. This change removes all VNDK definition(s) from modules
which was VNDK.

Bug: 328994089
Test: AOSP CF build succeeded
Change-Id: Ifdade9c052db29c989ce7d804ba725361c4c0f8e
Merged-In: Ic4f19113c1a25dc1fb60cdfbf9c0f2d8d7d09726
2024-04-05 02:29:07 +00:00
Shunkai Yao
e237f5bfaa Merge "Use customized toString for UUID in VTS" into main 2024-04-02 16:45:52 +00:00
Shunkai Yao
fb8f39452a Use customized toString for UUID in VTS
Bug: 331955595
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Change-Id: I561d68645f3f159b029135b0dfa66511a2800d72
2024-03-29 18:49:15 +00:00
Mikhail Naganov
69d60aa02c audio: Fix some VTS issues on real devices
1. Skip testing of stream I/O on certain types of mix ports.

2. Skip testing of connection of BT SCO device.

Bug: 300735639
Bug: 326888356
Bug: 328010709
Bug: 331516432
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I9b8bbf2014e223375c8f8400ff2af32268803706
2024-03-28 17:02:27 -07:00
Mikhail Naganov
efb45bc792 audio: Allow to inherit Binder RT priority in AIDL
This option is on by default for HIDL interfaces, however
in AIDL it needs to be enabled explicitly.

Bug: 331469541
Test: m
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:d975a9e6ec0b6f0eeac99673b9b06e11146874ba)
Merged-In: I971185a46da4222160fb04b8b77f805ef0396562
Change-Id: I971185a46da4222160fb04b8b77f805ef0396562
2024-03-27 16:20:33 +00:00
Mikhail Naganov
a41ff5134d audio: Implement blocking in remote submix when there is no sink
The HIDL implementation blocked for the audio buffer duration
when the output side of the remote submix pipe does not have
the sink connected. This behavior was accidentally removed
when fixing b/327220024.

Also, limit the amount of the debug messages displayed when
the sink is shutdown to avoid spamming the syslog.

Bug: 328347445
Test: repro steps from the bug
Test: atest VtsHalAudioCoreTargetTest
Test: atest --test-filter=".*AudioPlaybackCaptureTest.*" CtsMediaAudioTestCases
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:6507376fb940198e8c39ad6d5345d132b1dd7219)
Merged-In: Ia66cb7b4567d42a41bf4715b7d725d36510ac50c
Change-Id: Ia66cb7b4567d42a41bf4715b7d725d36510ac50c
2024-03-25 16:04:27 +00:00
Mikhail Naganov
222d034461 Merge "audio: Adjust stream buffer size calculation" into main 2024-03-22 03:36:44 +00:00
Mikhail Naganov
cbb2976223 audio: Adjust stream buffer size calculation
When calculating buffer size, use powers of two
for "large" buffers only on SRs >= 44100 Hz.
With lower SRs, sizes rounded up to a multiple
of 2 give too high latency.

Bug: 328432688
Test: repro steps from b/328432688#comment3
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I605ef8507fef030d349e85c33ed0229c9566ddb5
2024-03-21 16:40:30 -07:00
Mikhail Naganov
df65834372 audio: Do not use A2DP/LE status when populating device port
The events about the status of A2DP and LE are sent by
the framework asynchronously with attempts to connect
an external device. As a result, the connection attempt
may be rejected by the bluetooth HAL module.

Bug: 327711955
Test: atest VtsHalAudioCoreTargetTest
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a46d52771a3e4a7816ea722088153ee6b65f59c3)
Merged-In: Iecef0ee6a66cd290237fdcccd6a7016e9622c4b0
Change-Id: Iecef0ee6a66cd290237fdcccd6a7016e9622c4b0
2024-03-20 16:48:08 +00:00
Shunkai Yao
bb35effe0d Audio effect aidl log reduce and level adjust
Bug: 329334917
Test: atest AudioEffectTest
Test: atest CtsMediaAudioTestCases
Test: atest CtsEffectTestCases
Test: audio use cases on pixel AIDL audio hal
Change-Id: I49876924b230f2ac834d3b0e494a03b814c4bb6e
Merged-In: I49876924b230f2ac834d3b0e494a03b814c4bb6e
2024-03-16 00:00:12 +00:00
Shunkai Yao
e0c1f31ff6 minor improvements for VtsHalAudioEffectFactoryTargetTest
Bug: 327678656
Test: atest VtsHalAudioEffectFactoryTargetTest
Change-Id: I95f19d20883142cd500c552966bd8f02256a1be5
Merged-In: I95f19d20883142cd500c552966bd8f02256a1be5
2024-03-14 17:32:07 +00:00
Shunkai Yao
50e478ba73 Effect AIDL VTS: skip data path testing for offloading effects
Bug: 328330990
Test: atest VtsHalBassBoostTargetTest
Test: atest VtsHalDownmixTargetTest
Test: atest VtsHalLoudnessEnhancerTargetTest
Test: atest VtsHalVolumeTargetTest
Change-Id: Ic720e74cf25f5282dfa52dca354a5eccf9071f61
Merged-In: Ic720e74cf25f5282dfa52dca354a5eccf9071f61
2024-03-14 17:10:37 +00:00
Devin Moore
5ceadc2958 Merge "Freeze android.hardware.audio* interfaces" into main 2024-03-12 23:05:00 +00:00
Treehugger Robot
1d9bf983a3 Merge "audio:aidl: Use module type in log prints" into main 2024-03-11 17:21:23 +00:00
Treehugger Robot
2793953298 Merge "Virtualizer: Add Test to Validate Virtualizer Effect" into main 2024-03-11 16:53:23 +00:00
Sneha Patil
5c95e334ca Virtualizer: Add Test to Validate Virtualizer Effect
Added test to verify increasing Virtualizer Strength values.

Bug: 305866207
Test: atest VtsHalVirtualizerTargetTest
Change-Id: Ieb9faf63ccd77e9fec61e3fcfaa04f722aaf26ea
2024-03-09 02:41:39 +00:00
Shunkai Yao
55fb557a81 Merge "Effect AIDL: remove placeholder effect from default implementation" into main 2024-03-08 20:14:22 +00:00
Jaideep Sharma
559a491dc1 audio:aidl: Use module type in log prints
Module base class can be used by multiple module,
to identify the module in use from logs, use mType in the logs as well.

Change log type for getVendorParameter and setVendorParameters,
as all parameters might not be supported by each module and unsupported parameter does not mean an error.

Change-Id: I0f46f8a9be733edd11186140bc9c3f51ea8d0969
2024-03-08 10:21:31 +05:30
Jerry Wong
5dc07d429d audio: Add AUDIO_FORMAT_DEFAULT to supported formats (V6) am: 50bf1116fc am: 12b2c93b10 am: bd701ebc51 am: ee5066c40d am: b74c11d1c7
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2989191

Change-Id: Iaed42974c9da47819dfaedcb0ee35f54ca81ad98
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-08 04:35:05 +00:00
Jerry Wong
b74c11d1c7 audio: Add AUDIO_FORMAT_DEFAULT to supported formats (V6) am: 50bf1116fc am: 12b2c93b10 am: bd701ebc51 am: ee5066c40d
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2989191

Change-Id: Id9d1f231d050e7bd1d01b08b7e8874d6e4464fce
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-08 04:10:01 +00:00
Jerry Wong
ee5066c40d audio: Add AUDIO_FORMAT_DEFAULT to supported formats (V6) am: 50bf1116fc am: 12b2c93b10 am: bd701ebc51
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2989191

Change-Id: I86014692bf87fb9529ff1c05d7141c709674c93f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-08 03:48:46 +00:00
Jerry Wong
bd701ebc51 audio: Add AUDIO_FORMAT_DEFAULT to supported formats (V6) am: 50bf1116fc am: 12b2c93b10
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2989191

Change-Id: I629120865fbc3140771352f38b033ddb84bd9d3c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-08 03:24:09 +00:00
Jerry Wong
12b2c93b10 audio: Add AUDIO_FORMAT_DEFAULT to supported formats (V6) am: 50bf1116fc
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2989191

Change-Id: Ifa60f56a93ed09f1a546989cd8231cb0df97ad4a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-08 02:39:48 +00:00
Shunkai Yao
7a0eb7b7a7 Effect AIDL: remove placeholder effect from default implementation
Bug: 328330990
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Change-Id: Icf15e349a2ad36eeefa1e3eb46428c04ae164ad1
2024-03-07 21:37:02 +00:00
Shunkai Yao
530235c8dc Revert "Effect AIDL: remove placeholder effect from default implementation"
This reverts commit d0a6d52d6e.

Reason for revert: b/328548875

Change-Id: I240831d8c417ea95e42ab5faa592a57ed97d475c
2024-03-07 20:25:13 +00:00
Xin Li
c4b2f5b564 Merge "Merge Android 14 QPR2 to AOSP main" into main 2024-03-07 06:41:02 +00:00
Mikhail Naganov
b06a492bd9 audio: Preserve 'usecase' for in IModule::setAudioPortConfig
The field AudioPortConfig.ext.mix.usecase is provided by
the client, thus is needs to be treated the same way as
'.handle'.

Bug: 302736184
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I45050e8530cd236f5e582585f583df477fc7ae8a
2024-03-06 16:39:50 -08:00
Shunkai Yao
124bdd282f Merge "Effect AIDL: remove placeholder effect from default implementation" into main 2024-03-06 21:43:30 +00:00
Devin Moore
329f3b35ad Freeze android.hardware.audio* interfaces
Already frozen internally. Freezing now in aosp to enable developement
on 202504 interfaces.

Merged-In: Ie6d38d27a287e258c30516e0030ad8c931d06432
Test: verify .hash file is the same as internally
Test: lunch cf_x86_64_phone-next-userdebug
Bug: 328236210
Change-Id: I14e49a7ed7a1069cd1ca9b92ce7664f646b18054
2024-03-06 21:30:16 +00:00
Shunkai Yao
d0a6d52d6e Effect AIDL: remove placeholder effect from default implementation
Also add two missing test class to postsubmit

Bug: 328330990
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:postsubmit
Change-Id: I9f9b9feda9ca99e6a065e837fa77dc621ad35bb1
2024-03-06 18:48:52 +00:00
Mikhail Naganov
55e0afa49a audio: Fix glitching of remote submix
Align behavior with the HIDL implementation. This helps
to prevent glitches in the scenarios that use remote
submix for sending audio externally: Auto and Cast.

Bug: 322247032
Bug: 327220024
Test: Repro steps in b/327220024#comment14
Change-Id: If2e4ebd7145375a268ee5f0e4ab656bb3748b2fe
Merged-In: If2e4ebd7145375a268ee5f0e4ab656bb3748b2fe
2024-03-06 10:09:16 -08:00
Mikhail Naganov
4120b99ab6 audio: Align HAL buffer size logic with the framework
When the framework uses mixers, it rounds up the buffer
size to the frame count which is a multiple of 16.
In the HIDL implementation, this adjustment was done after
the framework thread was already created, and FMQ was
created on the first transfer, using adjusted size. In
the AIDL implementation, the FMQ is created together with
the stream, using the size suggested by the HAL.

Bug: 321233946
Test: verify audio playback over S/W A2DP
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:f2f9ae08c2ee4e396bbe4b8c7e955bad725ce545)
Merged-In: I35a5479bfc87a290aff09d51415381948857a146
Change-Id: I35a5479bfc87a290aff09d51415381948857a146
2024-03-06 10:09:00 -08:00
Mikhail Naganov
46c433aabd audio: Set correct priority for the SPATIALIZER stream thread
To align with the framework, the thread serving SPATIALIZER
stream I/O must use SCHED_FIFO and realtime priority.
The latter can be set via `audio.spatializer.priority`
property.

Bug: 321233946
Test: adb shell ps -Tl -p <HAL PID>
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:81a14293f4f26bf3af740cc1682c1111d7e1e29d)
Merged-In: I80107c9aa7d86cbfc2f79c2ad05959fc9f7913f7
Change-Id: I80107c9aa7d86cbfc2f79c2ad05959fc9f7913f7
2024-03-06 10:08:50 -08:00