Commit graph

1570 commits

Author SHA1 Message Date
Shunkai Yao
f0a217d07a Merge "Effect AIDL: queryEffect with Descriptor for all effects implementation" 2022-12-13 15:29:14 +00:00
Shunkai Yao
20e5c1733e Effect AIDL: update IFactory.queryEffects to return Descriptor
Add queryEffect for effect libraries.
Change Descriptor in each effect implementation to be static so
extern C function can access.

Bug: 261646550
Test: atest VtsHalAudioEffectTargetTest
Change-Id: Id7badec592becf37b27be6022106f443e5976880
2022-12-13 02:46:54 +00:00
Shunkai Yao
c12e0821e6 Effect AIDL: queryEffect with Descriptor for all effects implementation
Add queryEffect for effect libraries.
Change Descriptor in each effect implementation to be static so
extern C function can access.
Update vts test cases.

Bug: 261646550
Test: atest VtsHalAudioEffectTargetTest
Change-Id: I8e5d7240db31a0d09b17541c39d9e4c15e1eea73
2022-12-13 02:46:40 +00:00
Lorena Torres-Huerta
2ea44dd872 Merge changes from topic "engineConfigHalInterface"
* changes:
  Default implementation for IConfig engine configuration.
  Add engine configuration to the AIDL Audio HAL interface.
2022-12-12 22:41:36 +00:00
Lorena Torres-Huerta
00be453d3a Merge "VTS for IConfig getEngineConfig" 2022-12-12 22:41:36 +00:00
Lorena Torres-Huerta
aff8a1f8fd VTS for IConfig getEngineConfig
Bug: 242678729
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I051d0778bbad447e49dd4b99a2797333d0d67862
2022-12-12 19:34:39 +00:00
Shunkai Yao
6900a3c936 Merge changes from topic "aidl_effect_lock"
* changes:
  AIDL Effect: Update locking in EffectImpl
  AIDL Effect: Update vts test cases naming to remove timestamp.
  AIDL: Add BassBoost strength range in AIDL definition.
2022-12-10 00:33:01 +00:00
Treehugger Robot
2aa6c215dd Merge "AIDL effect: Add effect AIDL vts to presubmit" 2022-12-10 00:27:06 +00:00
Xin Li
995144c4d5 Merge "Merge Android 13 QPR1" 2022-12-09 21:50:58 +00:00
Shraddha Basantwani
f627d80d37 AIDL Effect: Update locking in EffectImpl
Avoid locking for all EffectContext calls.
Locking inside context seems not necessary for now as all binder calls
already serialized.
Add BassBoost AIDL placeholder implementation.

Bug: 261646550
Test: atest VtsHalAudioEffectTargetTest

Change-Id: Iaa41f013d5756801553e20b995aab5ddc845cf32
2022-12-09 21:39:46 +00:00
Shunkai Yao
01a6730fa7 AIDL effect: Add effect AIDL vts to presubmit
Bug: 238913361
Test: atest VtsHalAudioEffectTargetTest
Change-Id: I5c823eb097b7c8e111c203db8f6384b802a436c6
2022-12-09 19:50:39 +00:00
Shunkai Yao
f0803cd8d5 AIDL Effect: Update vts test cases naming to remove timestamp.
Bug: 261646550
Test: atest VtsHalAudioEffectTargetTest
Change-Id: I80ac39b5c9a51e006b80682398a61c000ef8c293
2022-12-09 19:14:10 +00:00
Shunkai Yao
f56afb303b AIDL: Add BassBoost strength range in AIDL definition.
Bug: 261646550
Test: atest VtsHalAudioEffectTargetTest
Change-Id: I38efed8c7cc88295c72403a3c598db5dedd8c137
2022-12-09 19:14:10 +00:00
Shunkai Yao
39bf2c3146 Audio AIDL HAL priority update
Enable RT priority inheritance.
Set minimum Audio AIDL HAL Binder access priority to ANDROID_PRIORITY_AUDIO.

Bug: 261496726
Test: atest VtsHalAudioEffectTargetTest
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I584d80f4fe344e4bfae5765cac2afb92313b6a39
2022-12-09 02:39:42 +00:00
Mikhail Naganov
3e37512310 Merge "audio: Add TEST_MAPPING for presubmit testing" am: 625741e687
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2332927

Change-Id: Ie3c08cd15224e01edea0e3329e45eece502c6856
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-08 17:53:47 +00:00
Mikhail Naganov
625741e687 Merge "audio: Add TEST_MAPPING for presubmit testing" 2022-12-08 17:27:42 +00:00
Lorena Torres-Huerta
bc585bd986 Default implementation for IConfig engine configuration.
Added XML to AIDL conversion classes that support
audio_policy_engine_configuration and audio_policy_configuration
schemas.

CTS-Coverage-Bug: 261509055
Bug: 242678729
Test: atest VtsHalAudioCoreTargetTest
Change-Id: If47932093af45c5289d070d4893cd10e79593e31
2022-12-08 03:47:24 +00:00
Lorena Torres-Huerta
db11b2db44 Add engine configuration to the AIDL Audio HAL interface.
Bug: 242678729
Test: m
Change-Id: I9f02399f6b63dca6d7a4c1a848fada0784e18b1d
2022-12-08 03:47:15 +00:00
Treehugger Robot
620e09f50f Merge "audio: Add microphone settings to IModule, IStreamIn" am: 77494f934a
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2240746

Change-Id: I2c95083fcaede0e37576375173fd0468c2d53c2f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-07 23:51:37 +00:00
Treehugger Robot
77494f934a Merge "audio: Add microphone settings to IModule, IStreamIn" 2022-12-07 23:38:30 +00:00
Mikhail Naganov
552dad4272 audio: Add TEST_MAPPING for presubmit testing
Currently it lists only tests for the core HAL, will
add effect HAL tests in a separate CL.

Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I92705f44235ff0fe38cbf86fef07518277b5f3ce
2022-12-07 20:33:51 +00:00
Mikhail Naganov
ef6bc74fc4 audio: Add microphone settings to IModule, IStreamIn
Add 'MicrophoneInfo' and 'MicrophoneDynamicInfo' parcelables.
Add IModule.getMicrophones method.
Add following methods to IStreamIn:
  - getActiveMicrophonesIds;
  - get/setMicrophoneDirection;
  - get/setMicrophoneFieldDimension.

Provide trivial implementations and VTS.

Also slightly refactor port retrieval from ModuleConfig
to unify common queries.

Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I472c7733e2a331a67cea613cd9218889eff06a43
2022-12-07 18:36:31 +00:00
Mikhail Naganov
74e293fb33 Merge "audio VTS: Clarify numbers used by CompressedOffloadOutputStreamTest" am: cd290e90e8
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2320825

Change-Id: Ia344bd04ef9b104216232551b86b55fb195a47a5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-06 02:51:37 +00:00
Mikhail Naganov
cd290e90e8 Merge "audio VTS: Clarify numbers used by CompressedOffloadOutputStreamTest" 2022-12-06 02:25:27 +00:00
Treehugger Robot
688975c3d2 Merge changes I0a18a6d9,I13a83113,I13c9c8d1,I8717acac am: 8fcc79fcb7
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2265720

Change-Id: I5353d130b50572cedac135e673b62907f5288fdf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-05 22:28:16 +00:00
Mikhail Naganov
e0c9c1cbb6 audio VTS: Clarify numbers used by CompressedOffloadOutputStreamTest
Make more clear the origin of numbers used by the test
CompressedOffloadOutputStreamTest#Mp3FormatGaplessOffload.

No change in the test behavior.

Bug: 260676244
Test: m VtsHalAudioV7_1TargetTest
Change-Id: I48211ad4510dec7fe90dc6f755485283376eaa23
2022-12-05 22:09:13 +00:00
Treehugger Robot
8fcc79fcb7 Merge changes I0a18a6d9,I13a83113,I13c9c8d1,I8717acac
* changes:
  audio: Add non-blocking I/O stream operations
  audio: Fix handling of quick worker completion in StreamWorker
  audio: Report unknown stream positions explicitly
  audio: Implement transient state testing
2022-12-05 22:08:02 +00:00
Mikhail Naganov
30301a42c7 audio: Add non-blocking I/O stream operations
Introduce IStreamCallback interface for non-blocking I/O. Add 2
new stream states: TRANSFERRING and TRANSFER_PAUSED, and define
state machines for the async case. Add DrainMode as in previous
HAL versions.

Note that non-blocking input is not fully implemented because it
did not exist in previous HAL versions, and the corresponding
AudioInputFlag does not exist yet.

Enhance VTS state machine tests to allow waiting for an async
event.

Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I0a18a6d930dee5941f769e08083817d41ff941e6
2022-12-05 19:57:43 +00:00
Mikhail Naganov
e467e01379 audio: Fix handling of quick worker completion in StreamWorker
In tests, it is possible that the worker exits quickly,
prior to the moment when the thread controller begins
waiting for it to start. Improper handling of this case
was causing intermittent lock-ups of VTS tests.

Bug: 205884982
Test: atest libaudioaidlcommon_test
Change-Id: I13a83113b32b859e212f1a517ad61bf5b8d43365
2022-12-03 05:00:33 +00:00
Treehugger Robot
1d6f208f84 Merge "add defaults and host_supported to the AIDL interface targets" am: f0dba4f541
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2320415

Change-Id: I99304a4e29ce43a4c6b991fe406c1f6d0ad545a5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 17:44:50 +00:00
Mikhail Naganov
99ae125b1f Merge "audio VTS: Use 'IN_DEFAULT' device type for telephony" am: 5e01ce4cba
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2322453

Change-Id: I6f02c9e7b97a49407c48302ec31f31de8d1341f9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 17:44:07 +00:00
Treehugger Robot
f0dba4f541 Merge "add defaults and host_supported to the AIDL interface targets" 2022-11-30 17:24:46 +00:00
Mikhail Naganov
5e01ce4cba Merge "audio VTS: Use 'IN_DEFAULT' device type for telephony" 2022-11-30 17:14:43 +00:00
David Li
4d36183b34 add defaults and host_supported to the AIDL interface targets
Test: make -j128
Merged-In: Icf69d2860419dd821b9b0730ea6cd4c4cdf42621
Change-Id: I9958d8d8849ab389f64614f3967dfa89cd6f9b95
2022-11-30 14:31:16 +00:00
Mikhail Naganov
d72b42d769 audio VTS: Use 'IN_DEFAULT' device type for telephony
This undoes the change which had happened unintentionally in
https://cs.android.com/android/_/android/platform/hardware/ \
interfaces/+/1e703f182e2fcbb9123bf661d81d22a04d0e1f8d

The device type passed to 'openInputStream' for telephony
devices should be 'AUDIO_DEVICE_IN_DEFAULT'

Bug: 259636577
Test: atest VtsHalAudioV7_0TargetTest
Test: atest VtsHalAudioV7_1TargetTest
Change-Id: Ic8f4367961346b87087c885a3cdaccab3c1407c9
2022-11-30 01:01:59 +00:00
Mikhail Naganov
549a822be2 audio: Report unknown stream positions explicitly
Instead of using 'STATUS_NO_INIT' in the case when stream
position can not be reported, use a special value for Position
fields. This streamlines processing of statuses on the client
side, by removing the need to treat 'STATUS_NO_INIT' specially.

Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I13c9c8d165b632900ca76de144759ef7b9200eff
2022-11-23 18:30:07 +00:00
Mikhail Naganov
bd483c03b2 audio: Implement transient state testing
Add ModuleDebug.streamTransientStateDelayMs parameter to ensure
that streams stay in transient states for the specified amount of
time. This enabled sending commands from VTS while the stream is
still in a transient state.

Add 'getStatus' stream command to retrieve current positions,
counters, and stream state. Previously we were planning to use a
zero-sized burst command for that, however, after the
introduction of stream state machines, the 'burst' command is
not handled in every stream state, and may even affect the
current state, thus it's no more usable for this purpose.

Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I8717acace8d95d76bef2ec9fd6561796d7544992
2022-11-23 01:58:19 +00:00
Dorin Drimus
d2f37fc6e2 Merge "Add more DTS audio encodings to the AIDL interface" am: 7755c25f93
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2295177

Change-Id: I38989a3521c926ff0a61a9bb54329f99d1e57adb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-22 14:57:06 +00:00
Dorin Drimus
7755c25f93 Merge "Add more DTS audio encodings to the AIDL interface" 2022-11-22 14:28:44 +00:00
Shunkai Yao
859c24dba0 Merge "AIDL effect vts test cases refinement" am: efb45b2672
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2304796

Change-Id: Ie2955b04f983384d361125cfe9aa10e49f9d2bec
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-18 23:41:58 +00:00
Shunkai Yao
812d5b4ce0 AIDL effect vts test cases refinement
Bug: 255361653
Test: atest VtsHalAudioEffectTargetTest
atest VtsHalAudioEffectFactoryTargetTest
atest VtsHalEqualizerTargetTest

Change-Id: I4d4c4de97a73d4ea6dedd9c9e1733da03860430b
2022-11-18 19:50:24 +00:00
Treehugger Robot
509d54d0d4 Merge changes I2dfd304c,I978432e2 am: a335badc22
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2300098

Change-Id: I6a9e8991b7953f6ae594f2675cecfdcdbbd5a4d7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-17 22:40:43 +00:00
Treehugger Robot
a335badc22 Merge changes I2dfd304c,I978432e2
* changes:
  LoudnessEnhancer: Add AIDL implementation and its unit test
  Audio AIDL Effect VTS : Extract all common parameters to defaults
2022-11-17 22:00:44 +00:00
Shraddha Basantwani
68041cab61 LoudnessEnhancer: Add AIDL implementation and its unit test
Added AIDL implementation for LoudnessEnhancer audio effect
parameters and its unit test.

Bug: 258124419
Test: atest VtsHalLoudnessEnhancerTargetTest

Change-Id: I2dfd304ca9f72383572fd1f762d41864dd73e39d
2022-11-17 10:24:06 +05:30
Shraddha Basantwani
5a2577cad6 Audio AIDL Effect VTS : Extract all common parameters to defaults
Bug: 258124419
Test: atest VtsHalAudioEffectTargetTest
atest VtsHalEqualizerTargetTest

Change-Id: I978432e2efcdcbb7341000b39b5f39e0e5d82eb7
2022-11-17 10:23:58 +05:30
Shunkai Yao
dd170d7247 Use AIDL effect bundle in effectserviceexampleimpl. am: f0c263b547
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2268147

Change-Id: I12a1a78ae59963291ff8844c8fa638ed201431b7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-16 20:24:32 +00:00
Shunkai Yao
f0c263b547 Use AIDL effect bundle in effectserviceexampleimpl.
Bug: 255361653
Test: atest VtsHalAudioEffectTargetTest
atest VtsHalAudioEffectFactoryTargetTest
atest VtsHalEqualizerTargetTest

Change-Id: Ia50ff5066e007f6a8569114e36f0e4565a6100ea
2022-11-16 18:09:17 +00:00
Treehugger Robot
7f757f3b69 Merge "audio: Add missing GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST" am: 41b932f43e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2303557

Change-Id: I13ce6a16ec1e4782e5acb48d081762235099cae3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-16 00:11:57 +00:00
Mikhail Naganov
88cb2f4662 audio: Add missing GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST
This fixes test error when on devices that do not have
AIDL HAL.

Bug: 205884982
Bug: 259294358
Test: m
Change-Id: I6cec10f35cd42eb06947bf483555287257a6a58e
2022-11-15 22:11:17 +00:00
Shunkai Yao
f74c951a90 Merge changes from topic "aidl_audio_effect_8_config" am: 6c04ef2c55
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2298337

Change-Id: Idc1ec2888c3ebba37f225cb51cbef212706d8000
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-14 15:50:51 +00:00