This fixes test error when on devices that do not have
AIDL HAL.
Bug: 205884982
Bug: 259294358
Test: m
Change-Id: I6cec10f35cd42eb06947bf483555287257a6a58e
Previously StreamDescriptor::Command used to be a parcelable
holding a command code (enum) + a command argument which was
used for one command only. This got replaced with an equivalent
union, where each command w/o arguments is represented by a
'Void' variant, and the command with an argument with a variant
of a corresponding type.
This has the following benefits:
- the union guarantees that the argument is only set for
commands that actually use it, thus all related comments
and validations can be removed;
- the command dispatch can be turned into an exhaustive
switch.
To be able to use an exhaustive switch, the 'exit' command
has been exposed at the interface, but marked as 'hal_reserved'.
Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I3f2c27a48e4d0b7cfce1171244b2eddc1637005f
Add the following methods to IModule:
- getTelephony;
- get/setMasterMute;
- get/setMasterVolume;
- get/setMicMute;
- updateAudioMode;
- updateScreenRotation;
- updateScreenState;
The "update..." methods are "informational," the HAL may ignore
them and must not raise any errors.
ITelephony currently contains 2 methods:
- getSupportedAudioModes;
- switchAudioMode.
This "switchAudioMode" must validate the argument, and must
switch the HAL to the new mode synchronously.
Implement and add VTS tests.
Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I9174c81fe7d16f7068257051ae5e129b15e82648
Increase data position based on the HAL consumption of data,
on the production by the test.
Bug: 254806348
Test: atest VtsHalAudioV7_1TargetTest:CompressedOffloadOutputStream/CompressedOffloadOutputStreamTest
Change-Id: I33a86ec62662ba4738c70c15b77ece0135da7d29
The default implementation will include an XML APM config
parser generated from the XSD schema. This CL provides the
schema file. It was copied from HIDL/7.1 and augmented
with new formats.
Bug: 255477173
Test: N/A
Change-Id: Ic0a09ba044d87165441671a2b2601b0a8177e5fa
Clarify and verify in VTS that the data FMQ of StreamDescriptor
is a transient buffer. The consumer must always read its entire
contents. This is the same behavior as in the HIDL HAL.
Define the state machine for streams and the set of commands for
transferring between states.
Clarify and verify in VTS that the frame counter of the
observable position must never be reset.
Implement commands for the synchronous I/O case.
Refactor stream test logic to simplify testing of state
transitions.
Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ibed7f4c3e77852863714f1910112f664b32d5897
This is intended for use in tests where the worker
just executes some actions and then exits by itself.
Use of 'join' instead of 'stop' ensures that the
worker goes through all actions.
Bug: 205884982
Test: atest libaudioaidlcommon_test
Change-Id: I8a9f4f0bb786ee606e3b63a9847f414119716a7d
This reverts commit 40a4639e51.
Reason for revert: Speculative rollback after fix in b/248637663
Bug: 230535046
Change-Id: I72b5242dbc73587004e31305e3b25c13cc7b5827
The audio_policy_engine_configuration.xsd schema was missing
four values for the usage enum. This was causing the VTS
test to fail. These usages must be specified in the audio
policy engine configuration file, otherwise a GTS test fails.
Bug: 245303963
Bug: 246231268
Bug: 246901091
Test: atest VtsHalAudioPolicyV1_0TargetTest
Change-Id: I0161ddb33e52cbca9b425c0cbb4f32f320c43af4
Introduce a GTest-like macro for validating the transaction
status. Refactor the code of VTS to use it.
Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I91d9ed03c7fb72f5bee55f94653499960be3e497
Added utility functions for operating on positional
bit flags.
Moved retrieval of offload mix ports to ModuleConfig
utility class.
Clarify the names of read/write tests.
Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Id20881c2e62bc1b95d8fc3c268f99e36337dce7a
There are still issues with importing implicit versions. Switching to explicit versions while b/188871598 is worked out.
Bug: 242678729
Test: m; AIDL_TRANSITIVE_FREEZE=true m aidl-freeze-api && AIDL_FROZEN_REL=true m
Merged-In: Ide6a90716bf042fbb925357e110bc84ddb9e96fb
Change-Id: Ide6a90716bf042fbb925357e110bc84ddb9e96fb
(cherry picked from commit 8296aa824b)
This requires a version bump to android.media.audio.common.types.
cc_defaults and java_defaults are used in order to avoid explicitly updating version references in several Android.bp files when we do future version bumps.
Bug: 242678729
Test: m
Merged-In: Id17820f210f625e370992db4f9f85e37887b088b
Change-Id: Id17820f210f625e370992db4f9f85e37887b088b
(cherry picked from commit bf94fa32cb)
This field indicates the frame size and is filled by
the HAL module, so that the client does not have
to calculate it.
As a side effect, in the VTS code, a StreamContext can
now be created solely from a StreamDescriptor.
Added unit tests for the functions from Utils.
Bug: 205884982
Test: atest libaudioaidlcommon_test
Test: atest VtsHalAudioCoreTargetTest
Merged-In: Ief836b8b2d35bacb1f9778e2462d540554149d7f
Change-Id: Ief836b8b2d35bacb1f9778e2462d540554149d7f
(cherry picked from commit 5862c1e3bc)
This patch implements audio I/O for the synchronous, non-MMAP
case.
Updated the StreamDescriptor structure to make it usable.
Clarified comments on the expectations for the client and
the HAL module.
Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Merged-In: I09651c6e80a397c80870622ac19234b4d4a38cbb
Change-Id: I09651c6e80a397c80870622ac19234b4d4a38cbb
(cherry picked from commit 01803d454a)
Fix the mistake of making StreamWorker to inherit
from the part which provides actual thread logic (Impl).
The lifetime of the logic object must be longer
than the lifetime of the StreamWorker's thread.
Otherwise, the thread could still have running while
the logic has already been destroyed (consider
the order of destructors in C++ class inheritance).
With this fix, the StreamWorker class does not have
to be a template anymore, thus reorganize the code
to move big methods into a .cpp file.
Bug: 205884982
Test: atest libaudioaidlcommon_test --iterations
Merged-In: I5bc2c8fd9d78a0fbc9fddab67456cc5214584045
Change-Id: I5bc2c8fd9d78a0fbc9fddab67456cc5214584045
(cherry picked from commmit 84024eccee)
Change-Id: I70958f437657b574cda6480c3216a0b1ea252433