Commit Graph

2476 Commits

Author SHA1 Message Date
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
759c9cb28b Spatializer: return supportedChannelLayout as part of parameter
Bug: 307368176
Test: atest EffectsFactoryHalInterfaceTest
Change-Id: I1a2a445b5c94cbd02acb4160c7f54d6733bff6aa
2024-02-26 21:49:09 +00:00
Mikhail Naganov
e00f10e0a5 Merge "audio: Remove audio effects config from audio HAL VAPEX" into main 2024-02-23 18:18:39 +00:00
Mikhail Naganov
4fbb997e17 Merge "Volume Control: Add tests to validate Volume Control Effect" into main 2024-02-22 02:17:54 +00:00
Mikhail Naganov
07bbadb3e3 audio: Remove audio effects config from audio HAL VAPEX
The audio effects HAL config can vary between different
CF "flavors" and thus must not belong to VAPEX. This is
consistent with handling of audio policy configuration files.

Bug: 318423731
Test: run `atest audioeffect_tests` on cf_x86_64_auto-trunk_staging-userdebug
Change-Id: I0f4ee9a44a3426934f6a055fc8c9ce74a8db78fc
2024-02-21 16:28:35 -08:00
Sneha Patil
93e4eb5487 Volume Control: Add tests to validate Volume Control Effect
Added test to apply level, mute and unmute input.
Added test to verify decreasing volume levels.

Bug: 305866207
Test: atest VtsHalVolumeTargetTest
Change-Id: Ie105a3bb77255da61719d042cbd5abc23c405d93
2024-02-21 18:11:29 +05:30
Shunkai Yao
c7f5c2dd83 Effect AIDL: add Spatializer default implementation to Cuttlefish
Bug: 273373363
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Change-Id: Ib49d62c61de831c8147c935799d22be78950488f
2024-02-13 02:11:12 +00:00
Treehugger Robot
27e97308c4 Merge "[DON'T BLOCK] Test ownership migration rules" into main 2024-02-07 00:55:34 +00:00
Shunkai Yao
7e2c3719ff Add backward compatibility in effect hal default implementation
Skipping the reopen sequence for unsupported version
Add member initialize for EffectContext

Bug: 322780092
Test: latest libAudioHal with V1 effect HAL
Test: atest VtsHalAudioEffectTargetTest

Change-Id: I597194e5ebf25566d5adda533e151da2e99781f4
2024-02-05 22:58:54 +00:00
Aditya Choudhary
ad2ba1b851 [DON'T BLOCK] Test ownership migration rules
This CL is created as a best effort to migrate test targets
to the new android ownership model. If you find incorrect or unnecessary
attribution in this CL, please create a separate CL to fix that.

For more details please refer to the link below,
go/new-android-ownership-model

Bug: 304529413
Test: N/A
Change-Id: Ic8c4bd6ac246e7efa98bbdaf822d12ae8e1230a5
2024-02-05 15:45:22 +00:00
Shunkai Yao
047484de60 Merge "Effect: verify all AIDL IEffect versions are same as IFactory" into main 2024-02-02 20:23:29 +00:00
Mikhail Naganov
cb49cde0ad Merge "audio: Move stable libaudioclient tests to presubmit for the AIDL HAL" into main 2024-02-02 19:53:44 +00:00
Jooyung Han
63b64e2995 Merge "Use LLNDK guard instead of builtin_available" into main 2024-02-02 01:58:22 +00:00
Shunkai Yao
910a8153b2 Effect: verify all AIDL IEffect versions are same as IFactory
Bug: 322780092
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Change-Id: If47f70b9d8f72a45f3ecf927294fb93fda28851b
2024-02-02 01:46:09 +00:00
Mikhail Naganov
03761c7e8e audio: Move stable libaudioclient tests to presubmit for the AIDL HAL
These framework-side tests are helpful in detecting breakages
caused by changes in the HAL code.

Data from postsubmit runs:

Test module audioeffect_tests: Latency (p90): 3s, Flakiness: 0.00%
Test module trackplayerbase_tests: Latency (p90): 13s, Flakiness: 0.00%

Bug: 311830316
Test: presubmit
Test-Mapping-Slo-Bypass-Bug: b/318425155
Change-Id: I5c329239cd3890e98edc74283bc9edb83e7e7ba7
2024-02-01 10:47:21 -08:00
Jooyung Han
23e5bf2873 Use LLNDK guard instead of builtin_available
APEXSUPPORT_API was a workaround when we had no support for
__ANDROID_VENDOR_API__. Since we have it now, use it instead of
builtin_available(android APEXSUPPORT_API).

Bug: 302088370
Test: CtsMediaAudioTestCases
Change-Id: I28b0e0ebab5f357a2f5cc29f244ae5494e379fbe
2024-02-01 12:49:35 +09:00
Treehugger Robot
a64a264f2d Merge "AHAL: add default values for dynamic port config of hardcoded config." into main 2024-02-01 01:42:36 +00:00
jiabin
129b145133 AHAL: add default values for dynamic port config of hardcoded config.
If the values(format, sample rate, channel mask) are left as unset, they
will be null. In that case, when using them will require checking
nullablitiy to avoid crash.

Bug: 323255506
Test: make and boot
Change-Id: Ic66bf0b6f53750ff8700e531cca13f03fbb72936
2024-01-31 23:56:26 +00:00
Treehugger Robot
c02d38d7b7 Merge "audio: Add tracing to audio I/O and effect processing" into main 2024-01-31 23:26:42 +00:00
Shunkai Yao
2d1e1bd332 Merge "BassBoost Process: Add tests to validate Bass Boost Process." into main 2024-01-31 23:25:28 +00:00
Mikhail Naganov
89a6bb7199 audio: Add tracing to audio I/O and effect processing
Emit trace events for audio reads and writes and effect
processing functions. This is to match the HIDL implementation.

Bug: 321233946
Test: `record_android_trace` with `audio` category enabled
Change-Id: I26907b09243fd3e5aaa470a0fb930b34addd3093
2024-01-31 14:19:08 -08:00
Aditya Choudhary
c5c6c62995 [DON'T BLOCK] Test ownership migration rules
This CL is created as a best effort to migrate test targets
to the new android ownership model. If you find incorrect or unnecessary
attribution in this CL, please create a separate CL to fix that.

For more details please refer to the link below,
<add g3 doc link>

Bug: 304529413
Test: N/A
Change-Id: I3322344f595f974f730dc824af0110388076d838
2024-01-31 11:06:17 +00:00
Sneha Patil
e584923d98 BassBoost Process: Add tests to validate Bass Boost Process.
Added methods to set and validate parameters.
Added test to verify increasing strengths.

Bug:305866207
Test: atest VtsHalBassBoostTargetTest
Change-Id: I64e06deca199b3acc53eb15cf2007e6db27430f3
2024-01-31 14:13:02 +05:30
Shunkai Yao
d685aed029 vts: update SetCommonParameterAndReopen to DataPathTest
Bug: 323010068
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Change-Id: I05519481b69bb752f515bd54cb1eab0996ad5433
2024-01-30 18:35:26 +00:00
Treehugger Robot
320ef27af2 Merge "audio: Reduce the interval between BT proxy registration retries" into main 2024-01-29 23:00:57 +00:00
Mikhail Naganov
19de94764d audio: Reduce the interval between BT proxy registration retries
A follow-up for aosp/2929441. The interval between retries
of connecting to BT proxy must be reduced significantly.
Otherwise, in situations when the BT is not connected
(that happens during tests), the resulting long delay causes
failures at the frameowork level due to resulting long
timeout.

Bug: 322820830
Test: atest audiosystem_tests --iterations 100
Change-Id: Idd84cb22b28d109151f98bb5883dca18a9ae928d
2024-01-29 13:40:27 -08:00
Shunkai Yao
db9b8f08da Merge "Update work buffer size with input/output frame size change" into main 2024-01-29 18:51:47 +00:00
Mikhail Naganov
3552515d70 Merge "audio: Add retries for BT proxy port registration" into main 2024-01-29 17:17:56 +00:00
Mikhail Naganov
a5c0437327 audio: Add retries for BT proxy port registration
When ModuleBluetooth::createProxy is invoked on BT device
connection, the BT stack may not be fully ready yet,
and port registration can fail. This is an intermittent
state and registration should succeed after retrying.

Bug: 320838889
Test: atest pts-bot:A2DP/SRC/REL/BV-02-I
Change-Id: I0c7cf7c1c6a8ee03ef55b004f89139e3b56ee9cd
2024-01-26 16:19:45 -08:00
Shunkai Yao
08c05dd017 Update work buffer size with input/output frame size change
call process with the minimal of input/output fmq data capacity

Bug: 321543210
Test: atest VtsHalAudioEffectTargetTest
Test: flash to pixel phone and test audio
Change-Id: I0c5087f541dc8526ac733a0c35f0d06f878d78a1
2024-01-26 18:59:13 +00:00
Bart Van Assche
5e7fcb4bbd Remove superfluous include directives
Remove #include "AudioHalBinderServiceUtil.h" from source files that do
not use the AudioHalBinderServiceUtil class directly.

Change-Id: Iff085856df91c2818dbd06bf790233cbb82a3379
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2024-01-23 14:19:27 -08:00
Deyao Ren
0874626d77 Create vendor apex for cuttlefish audio and audio effect
Test: launch cuttlefish, CtsMediaAudioTestCases
Bug: 295803971
Change-Id: I056c3e81662f90207702b47664c23b7ddd1db378
2024-01-17 07:12:07 +00:00
Shunkai Yao
78265377d9 Merge "Effect VTS: update VtsHalDownmixTargetTest for data validation" into main 2024-01-13 03:50:02 +00:00
Treehugger Robot
759fb98667 Merge "audio: Fix handling of a thread exit command with a bad cookie" into main 2024-01-13 00:40:04 +00:00
Mikhail Naganov
1850779bc4 audio: Fix handling of a thread exit command with a bad cookie
In case when the command was sent by the HAL itself (from another
thread), the worker thread must not post a reply. The only case
when a reply needs to be posted is in the case when the command
was sent from a VTS test. This case is identified by the fact that
the cookie has value '0'.

Bug: 300181540
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ifeb0722b5cf7346a694c5a938f6b324f5fa825f1
2024-01-12 13:59:24 -08:00
Shunkai Yao
1319e986ab Effect VTS: update VtsHalDownmixTargetTest for data validation
For downmix, the output buffer size can be diff with input

Bug: 318926783
Bug: 317946442
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Change-Id: I0dc0009e1779b842a4f3cdcc047d225310a304f9
Merged-In: I0dc0009e1779b842a4f3cdcc047d225310a304f9
2024-01-12 21:54:17 +00:00
Treehugger Robot
7f25c70740 Merge "audio: Skip AudioModuleRemoteSubmixTest on Android U" into main 2024-01-12 21:10:04 +00:00
Shunkai Yao
3eb2a2c14f Merge changes from topic "effect_reopen" into main
* changes:
  Effect AIDL: implement IEffect.reopen
  Effect AIDL: add IEffect.reopen to update the effect instances data FMQ
2024-01-12 21:06:08 +00:00
Mikhail Naganov
b2dab17b1e audio: Skip AudioModuleRemoteSubmixTest on Android U
This test was developed after Android U was cut, and it assumes
the new way of encoding of the remote submix device type.

Bug: 300181540
Test: run `atest VtsHalAudioCoreTargetTest` on UDC GSI
Change-Id: If53f92a55734e18a2acce6c790f9e5e259246684
2024-01-12 10:38:03 -08:00
Shunkai Yao
65c7c7051d Effect AIDL: implement IEffect.reopen
- add IEffect.reopen implementation
- now data MQs can update at runtime, sync
  EffectContext access
- add clang thread annotation

Bug: 302036943
Test: atest VtsHalAudioEffectTargetTest
Test: build and test audio effect on Pixel
Change-Id: I3e9fdc2d5eb50b8c1377e0da75573f0eba7ea3f1
Merged-In: I3e9fdc2d5eb50b8c1377e0da75573f0eba7ea3f1
2024-01-12 17:23:28 +00:00
Shunkai Yao
5b15e005a9 Effect AIDL: add IEffect.reopen to update the effect instances data FMQ
The effect instance may choose to reallocate the input data message
queue under specific conditions. For example, when the input format
changes, requiring an update to the data message queue allocated during
the open time.
In such cases, the effect instance can destroy the existing data message
queue, when the audio framework see a valid status MQ and invalid data MQ,
it call reopen to get the new data message queue.

Bug: 302036943
Test: m android.hardware.audio.effect-update-api, m
Change-Id: Ia245b154176f64bc3cc6e6049bca4f9c68ad482d
Merged-In: Ia245b154176f64bc3cc6e6049bca4f9c68ad482d
2024-01-12 17:23:14 +00:00
Mikhail Naganov
18fcb688bc Add android.virtualdevice.cts.VirtualAudioTest to postsubmit
These tests exercise audio playback and capture on CF and are
useful in spotting issues in the audio pipeline end-to-end.

Bug: 316017930
Test: atest CtsVirtualDevicesTestCases
Change-Id: If625cec5bc2d281f1e0d99b820f604f1bac7b621
2024-01-11 09:54:50 -08:00
Treehugger Robot
7fe11fd93d Merge "audio: Add libaudioclient tests to postsubmit for the AIDL HAL" into main 2024-01-10 23:02:04 +00:00
Mikhail Naganov
ff52e4fcba audio: Add libaudioclient tests to postsubmit for the AIDL HAL
These framework-side tests are helpful in detecting breakages
caused by changes in the HAL code.

Add to postsubmit first because the presubmit check does not
allow adding to presubmit without accumulating some history first.

Bug: 311830316
Test: atest
Change-Id: I1f946c71a89117d25f39fde34877988ea7e1d466
2024-01-10 13:47:57 -08:00
Mikhail Naganov
198e8f747c Merge "audio: Improve logging in remote submix module" into main 2024-01-10 17:53:05 +00:00
Treehugger Robot
a10d3c536f Merge "Audio Effect : Add checks to validate the channel count" into main 2024-01-10 01:46:59 +00:00
Mikhail Naganov
9eb3314a24 audio: Improve logging in remote submix module
Implement IModule::dump to display the current state in
the audioflinger dump.

Throttle repetitive logging when there is nothing to read.

Remove stale comment for already fixed b/307586684.

Bug: 307586684
Test: adb shell dumpsys media.audio_flinger
Change-Id: I1f1f6e1658d035d46af3a933a825b20a78c7f297
2024-01-09 14:13:15 -08:00
Shraddha Basantwani
a3d4847794 Audio Effect : Add checks to validate the channel count
Bug: 302036943
Test: atest audioeffect_analysis
Change-Id: Ic64394e646fa23e02e499c2f01ef3bd4490450d2
2024-01-09 10:37:54 +00:00
Mikhail Naganov
e3ed739865 Merge "audio: Fix the type used for timekeeping" into main 2024-01-04 01:26:12 +00:00
Shunkai Yao
d090afe1af Update comment about headTrackingSensorId
Bug: 317405349
Test: m, aidl-format
Change-Id: I5f4b0e931c073d87b1a30a55c39e614d24a63030
2024-01-03 19:50:15 +00:00