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
am skip reason: Merged-In I3f81d71ca3c0ad4c639096b1dc034a8909bc8971 with SHA-1 79324920f7 is already in history
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2201826
Change-Id: I477a0eecbed8d6f5c2a1a8dd5b009340ce59529a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
VtsHalEvsTargetTest does not verify any behavior depending on
a frame buffer's color format.
Bug: 240685726
Test: atest VtsHalEvsTargetTest
Change-Id: If8b8c595cfc7404a8122728593f778528b45af15
(cherry picked from commit 849d0f370c)
This change gives additional context to the device info checks while.
Currently, an unprovisioned device will generate a massive spam of
failures which may be WAI for an early hardware revision device that
was not provisioned with attestation IDs.
Test: atest VtsHalRemotelyProvisionedComponentTest
Change-Id: I16069dba841a90aa55781148d3c268ced635e006
* changes:
Use explicit aidl versions for audio hal and soundtrigger dependencies.
Add AudioAttributes and AudioFlag for use in HAL interface for engine configuration.
This change makes all of the changes to the HAL AIDL files, along with
corresponding documentation edits, to facilitate the definition for
version 3 of IRemotelyProvisionedComponent HAL.
The bulk of the changes are described within the RKP_CHANGELOG.md file
and will therefore not be discussed here within the commit message.
Bug: 240312857
Test: It is human readable and also builds.
Change-Id: I920550bdfe5a8f9ba677c4a4f67e975bcd3672ab
Commit 93c72cef92 ("KeyMint: sync all attestation tags",
http://aosp/1719302) removed various tags from the attestation that are
only applicable to symmetric keys, on the assumption that these are
irrelevant for the attestation extension that is generated for the
certificate holding asymmetric public keys.
However, that change did not take into account the fact that the
AuthorizationList ASN.1 schema is re-used elsewhere in the KeyMint API,
specifically as a way of describing the characteristics associated with
a key that is being securely imported via
IKeyMintDevice::importWrappedKey.
That import process may be used for symmetrics keys, and so the tags
that are specific to symmetric keys still need to be included in
AuthorizationList.
Similarly, USER_SECURE_ID values are never included in attestation
extensions because they have no meaning off-device, but they may be
needed as part of the import of a wrapped key.
Test: TreeHugger, comment change only
Bug: 244693617
Change-Id: Iaa941e120e3641a6e6c369b7c6a51f10b44df78a
The tag enum names can't be removed due to AIDL back-compatibility
requirements, and also it's useful to have the values present to avoid
inadvertent reuse.
Update the tag comment text to indicate that these tags are obsolete.
Bug: 191738660
Test: TreeHugger, comment change only
Change-Id: Icbd4c9cd0313f93bc491b49eb9077766d0f44e34
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)
Certain mutation testing -- mutateOperandLifeTimeTest and
mutateOperandInputOutputTest -- can introduce potentially very large
CONSTANT_COPY operands, which can in turn create potentially very
large Models which must be passed across binder. To avoid overflowing
the binder buffer, we estimate the size of the mutated Model, and skip
the test if that size is too high. The old logic recognizes that our
tests only have a single active binder transaction at a time, and
assumes that there are no other clients using the same service at the
same time, and so we should have the binder buffer to ourselves; to be
conservative, we reject any Model whose estimated size exceeds half
the binder buffer size. Unfortunately, sometimes the binder buffer
still overflows, because it unexpectedly contains an allocation from
some other transaction: It appears that binder buffer memory
management is not serialized with respect to transactions from our
tests, and therefore depending on scheduler behavior, there may be a
sizeable allocation still in the buffer when we attempt to pass the
large Model. To fix this problem we become even more conservative,
and instead of limiting the Model to half the binder buffer size, we
limit it to half IBinder.MAX_IPC_SIZE (the recommended transaction
size limit). To confirm that this change does not exclude too many
tests, I checked how may times the size filter function
exceedsBinderSizeLimit is called, how many times it rejects a model
under the new logic (modelsExceedHalfMaxIPCSize), and how many times
it rejects a model under the old logic (modelsExceedHalfMaxIPCSize).
Test: VtsHalNeuralnetworksV1_0TargetTest --gtest_filter=TestGenerated/ValidationTest.Test/*-*dsp*
Test: # models = 3592, modelsExceedHalfMaxIPCSize = 212, modelsExceedHalfBufferSize = 18
Test: VtsHalNeuralnetworksV1_1TargetTest --gtest_filter=TestGenerated/ValidationTest.Test/*-*dsp*
Test: # models = 7228, modelsExceedHalfMaxIPCSize = 330, modelsExceedHalfBufferSize = 28
Test: VtsHalNeuralnetworksV1_2TargetTest --gtest_filter=TestGenerated/ValidationTest.Test/*-*dsp*
Test: # models = 52072, modelsExceedHalfMaxIPCSize = 506, modelsExceedHalfBufferSize = 28
Test: VtsHalNeuralnetworksV1_3TargetTest --gtest_filter=TestGenerated/ValidationTest.Test/*-*dsp*
Test: # models = 73342, modelsExceedHalfMaxIPCSize = 568, modelsExceedHalfBufferSize = 28
Test: VtsHalNeuralnetworksTargetTest
Bug: 227719657
Bug: 227719752
Bug: 231928847
Bug: 238777741
Bug: 242271308
Merged-In: I3f81d71ca3c0ad4c639096b1dc034a8909bc8971
Change-Id: I3f81d71ca3c0ad4c639096b1dc034a8909bc8971
(cherry picked from commit 79324920f7)
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
Enhance the return type of the 'workerCycle' to allow it
exiting without inducing an error on the controller side.
Also, put StreamWorker into a namespace.
Bug: 205884982
Test: atest libaudioaidlcommon_test --iterations
Merged-In: I3b27028b10f80f27985040cae8f8b0e6ab63ddad
Change-Id: I3b27028b10f80f27985040cae8f8b0e6ab63ddad
(cherry picked from commit 5021df71c7)
Replace 'platform_apis: true' with 'sdk_version: module_current'.
The former causes compiling against SDK source code,
this is not needed for the audio HAL.
Bug: 205884982
Test: m android.hardware.audio.service-aidl.example
Change-Id: I9b9c32707ac7276f5cd077681bd1f8122bc20feb
Merged-In: I9b9c32707ac7276f5cd077681bd1f8122bc20feb
(cherry picked from commit 714e959c89)
The Light HAL implements a function getLights that returns a vector
of HwLight objects. This vector is called "lights" in Lights.cpp,
but it is called "types" in Lights.h. Lights.h has been changed to
call the vector "lights".
Test: VtsHalLightTargetTest
Change-Id: I1e567d1454d42e3efc0186cde8340c32e7f3456e
This patch adds necessary structures and prepares for implementing
data flow for audio I/O.
Also in this patch we clarify the relationship between audio patches
and buffer size for audio I/O, and between buffer size and latency.
Bug: 205884982
Bug: 233816848
Test: atest VtsHalAudioCoreTargetTest
Merged-In: I8522632607d4cf50a112225c19b5dd5ad8848591
Change-Id: I8522632607d4cf50a112225c19b5dd5ad8848591
(cherry picked from commit 68bee70442)
Audio threads need to be able to set their priority.
Also, traditionally these worker threads set a custom
thread name. Implement this functionality in StreamWorker.
Since initialization steps can fail, implement simple
error reporting via a string field `mError`. The state
of the string field replaces the dedicated `ERROR` worker
state.
Bug: 205884982
Test: atest libaudioaidlcommon_test --iterations
Merged-In: Ie9ab94922d47f277a4993a90b478a2fa76657923
Change-Id: Ie9ab94922d47f277a4993a90b478a2fa76657923
(cherry picked from commit e9e0f7c0f5)
Avoid taking a lock in high priority worker threads
without a real need.
Bug: 205884982
Test: atest libaudioaidlcommon_test --iterations
Merged-In: I8cc0f5cb58752b7b7d413a9f4e46093c39445892
Change-Id: I8cc0f5cb58752b7b7d413a9f4e46093c39445892
(cherry picked from commit d989a4b669)
This utility class has been copied from HIDL VTS.
It will be used both for the default implementation
and AIDL VTS, and might need modifications.
Bug: 205884982
Test: atest libaudioaidlcommon_test
Merged-In: I43b35b0c23ae45305dca66e15b60820cad19635e
Change-Id: I43b35b0c23ae45305dca66e15b60820cad19635e
(cherry picked from commit c17f0484bc)