alsa_device_proxy keeps a pointer to alsa_device_proxy,
but does not own it. Thus, the lifetime of the proxy must
be no less than of the proxy. In the legacy USB HAL impl
they were stored together (struct alsa_device_info).
Implement an equivalent class (DeviceProxy) in ALSA utils.
Bug: 264712385
Bug: 298712227
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I4e36701752afb3f35664b6f2ad1acda5719be1ea
When a effect is closed and reopened from framework,
mExit and mStop states are not reset,that causes
threadloop to exit and eventually blocks framework
as FMQs are never filled from effects HAL.
Reset the state of mExit and mStop on every time when
thread is created, so open->close->open kind of
scenarios can be handled.
Bug: 301214647
Test: run vts-hal-audio
Change-Id: If54c8fa62827e5f28e620dd841d638028149b1b8
Negative test cases should not expect UNKNOWN_ERROR from Keymint since
the exact cause of failure is known.
In general, we should avoid UNKNOWN_ERROR because it makes error
attribution difficult.
To avoid adding retroactive requirements KM implementation, relax the
check to expect any error.
Bug: 298194325
Test: VtsAidlKeyMintTargetTest
Change-Id: I136fb6d36ae92c9e3722ffefe9a067d3515dcbf9
std::unique consolidates the unique nonces at the start of the `nonces`
vector, but it doesn't modify nonces.size(), so these tests weren't
actually verifying that the nonces were unique. Add a vector::erase
call to shrink the vector.
After upgrading libc++, std::unique is [[nodiscard]] and this bug is
a compiler error.
Bug: 175635923
Test: treehugger
Test: m VtsAidlSharedSecretTargetTest VtsHalKeymasterV4_0TargetTest
Change-Id: I7fd8c40a3920bf3a8988c8065503c78ba36dc742
The transmit without openning a channel passes on some platforms,
because a basic channel can be opened by external applications
and the state is maintained in the HAL.
Bug: 300502872
Test: run vts -m VtsHalSecureElementTargetTest
Change-Id: If727c613e8575802b99604f7242e16cf85fc97a0
_LIBCPP_VERSION in external/libcxx is 8000. When _LIBCPP_VERSION is
newer, assume it's the new libc++ toolchain prebuilt, which has a
finalized std::filesystem, and use std::filesystem instead. To make
Soong happy, keep the android.hardware.automotive@libc++fs library for
now but stub out the C++ source files and make the
android::hardware::automotive::filesystem namespace an alias for
std::filesystem.
Bug: 152067309
Bug: 175635923
Test: treehugger
Test: m android.hardware.automotive.can@1.0-service
Test: m android.hardware.automotive@libc++fs
Change-Id: I7aede74cda0122434d972a075d7c7a9933845450
Check the VSR of the device to select the DICE validation rules that
will be appropriate to use for VTS.
Test: TH
Change-Id: Iff19debd1e442a0b318da1a4d8a08d470efba0ae
Check audioModeIndication/audioSourceIndication/volume flags and only
test if they are supported
Bug: 300735428
Test: atest VtsHalAudioEffectTargetTest
Change-Id: I539b408fcdb73c25984ec8f39b401475a3ccab69
The HAL implementation is used by cuttlefish and goldfish now. To not
break the usage in goldfish, the HAL binary is kept unchanged.
Bug: 297467444
Test: VtsHalDumpstateTargetTest
Change-Id: I1474128e653c5df1068f33dfae8d3f2762e9cb47
It's typical to make the HAL binary to link its dependencies statically
to make the resulting APEX smaller. Will do it as a follow-up.
Bug: 297467264
Test: VtsAidlHalContextHubTargetTest
Change-Id: Icbc558d81a473b5ea01d2d0b5f7090fcb5365085
To make the binary(and the apex) smaller, refactored dependency types.
The binary in the apex is now statically linked to its dependencies
if possible.
Bug: 297467553
Test: VtsHalBootAidlTargetTest
Change-Id: I4052c802cf0b6cd9ace4cd87bce6d5531a259237
The legacy configuration was interesting because although the
xml config file only listed 48000 Hz SR and
AUDIO_CHANNEL_OUT_STEREO channel mask, the implementation
allowed a range of SRs and MONO channel mask. The framework was
liberally allowing requests for other SRs to go to the r_submix
HAL, even without having them listed in the xml config
file. However, since libaudiohal@aidl is more strict in matching
configuration requests to port capabilities, we need to list all
channels masks and SRs suported by the legacy HAL explicitly.
However, we need to limit the amount of profiles to avoid
extra load when passing them via AudioPolicyService.listAudioPorts,
thus remove other PCM types.
Also, to match the hard limit on the number of routes in the legacy
implementation, set "maxOpen/ActiveStreamCount" for mix ports.
Bug: 286914845
Bug: 300990644
Test: atest VtsHalAudioCoreTargetTest
Test: atest android.media.audio.cts.AudioPlaybackCaptureTest
Change-Id: I4a8c7d016662d92ab5e73bc67d94aaac6570e59a
Point-to-point connections (analog, HDMI, SPDIF) do not use
a device address. Reflect that in `GenerateUniqueDeviceAddress`.
Add an analog headset into the test configuration.
Bug: 300648357
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Id1d0b1b60df40c2474fe3151067152b8e0a261c3
am skip reason: Merged-In Ib36b171e33451bf0c9adc0b065a4c74df357e77e with SHA-1 947f486737 is already in history
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2753295
Change-Id: I88b4a1d105a917aafef1256fb0e63a06af00ef6c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
am skip reason: Merged-In Ic7188f9d8ccfcd90d844b45e3b370a3be3c515d6 with SHA-1 7f3bd1792f is already in history
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2753297
Change-Id: I03dbd0f596081c528978214a3888c82f72e4e3a3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
These tests were created for IRadio 1.2 when all devices supported GSM,
and REQUEST_NOT_SUPPORTED was valid for devices that didn't support GSM. Change the VTS logic to test EUTRAN instead of GERAN.
Remove REQUEST_NOT_SUPPORTED for tests now without GERAN and add REQUEST_NOT_SUPPORTED for all GERAN-specific tests.
Test: atest VtsHalRadioTargetTest
Bug: 294965245
Change-Id: Ib36b171e33451bf0c9adc0b065a4c74df357e77e
Merged-In: Ib36b171e33451bf0c9adc0b065a4c74df357e77e
These tests were created for IRadio 1.2 when all devices supported GSM,
and REQUEST_NOT_SUPPORTED was valid for devices that didn't support GSM. Change the VTS logic to test EUTRAN instead of GERAN.
Remove REQUEST_NOT_SUPPORTED for tests now without GERAN and add REQUEST_NOT_SUPPORTED for all GERAN-specific tests.
Test: atest VtsHalRadioTargetTest
Bug: 294965245
Change-Id: Ib36b171e33451bf0c9adc0b065a4c74df357e77e
Merged-In: Ib36b171e33451bf0c9adc0b065a4c74df357e77e
1. nvResetConfig takes some time to reset the modem, causing subsequent
tests to fail with a timeout since the modem is unavailabe.
Add a timeout after nvResetConfig to allow the modem to be up again
before running the next test.
2. Remove invalid errors for start/stopKeepalive. These tests should
fail due to invalid arguments, so remove NONE as a possible error.
RADIO_NOT_AVAILABLE should also be removed.
3. Fix incorrect startNetworkScan_InvalidInterval tests, since we only
check the interval when the scan type is PERIODIC.
4. Save and reset the previous allowed network type bitmap after the
test. Combine get/set into one test that tests both behaviors.
5. Fix checks for MCC/MNC in getDataRegistrationState
Bug: 277626718
Bug: 240953393
Bug: 264913330
Bug: 259674407
Bug: 242801688
Test: atest VtsHalRadioTargetTest
Change-Id: Ic7188f9d8ccfcd90d844b45e3b370a3be3c515d6
Merged-In: Ic7188f9d8ccfcd90d844b45e3b370a3be3c515d6
(cherry picked from commit ddaea2e5a4)