audio: Add a missing break to EffectsFactory::getAllDescriptors Would the legacy HAL return -ENOENT while retrieving an effect, the enumeration has to be aborted, and the effects queried so far need to be returned. A missing 'break' was causing returning no effects at all. Bug: 117567478 Test: make Change-Id: I7cc05004f88b39272d06d2ed33a0693f8e1e3d04 Merged-In: I7cc05004f88b39272d06d2ed33a0693f8e1e3d04
Audio: Do not sanitize android.hardware.audio@2.0-service Until the underlying bug is fixed, do not produce a sanitized binary. Bug: 117506164 Bug: 117580200 Test: m && SANITIZE_TARGET=address m Change-Id: I4e6d1206512513c687f7ae065d2974c55c617b61
Audio VTS: Do not constrain implementation frameCount The test was assuming Stream::getFrameCount() would return the AudioConfig::frameCount used to create the stream, similarly to the sampleRate or the channelMask. Nevertheless this is not the case as the AudioConfig::frameCount field is not to used by Stream::openOutputStream (nor Input) as the buffer size is chosen by the HAL, not the framework. Thus the test can not assume the frameCount chosen by the HAL and must not test for a particular value. Test: atest VtsHalAudioV4_0TargetTest Bug: 116169974 Change-Id: Ibbf0825f540957e01e7c512d851cb9628991f4c4 Signed-off-by: Kevin Rocard <krocard@google.com>
Test getActiveMicrophones API when mic is found on the device. Before this patch the default microphone was required to have characteristics although it is not always an attached device, thus its characteristics can not be known by the HAL. Additionally, the HAL might not know the active microphone info of a input stream if it has not been started yet. This patch only tests microphones which characteristics are reported by the HAL and start the input stream before requesting active microphones. Bug: 109787938 Test: vts-tradefed run vts --module VtsHalAudioV4_0Target Change-Id: If55bfc8210d4f9443d34951f717c6772b46dde04 Merged-In: If55bfc8210d4f9443d34951f717c6772b46dde04
Audio VTS: Workaround async HIDL destructor by sleeping The test creates an instance of the Audio HAL then destroys it and create it again. The test assumed that the destruction was synchronous when in fact it is async with no way of knowing when the object has been destroyed. As a result, until a better solution is found, sleep for 100ms to hopefully let enouth time for the HAL destructor to return. Bug: 112566489 Test: adb shell /data/nativetest64/VtsHalAudioV4_0TargetTest/VtsHalAudioV4_0TargetTest --gtest_filter=*OpenPrimaryDeviceUsingGetDevice atest VtsHalAudioV4_0TargetTest Change-Id: I0ec75c12007d39060232632708722df5bf0f99d7 Signed-off-by: Kevin Rocard <krocard@google.com>
Audio VTS: Always check for Result::isOk() A test was not checking for the Result::isOk() resulting in an assert being triggered in HIDL code if the HAL crashed. Test: (sleep 0.3; adb shell pkill audio) & adb shell /data/nativetest64/VtsHalAudioV4_0TargetTest/VtsHalAudioV4_0TargetTest # Test finishes in failure but does not crash Signed-off-by: Kevin Rocard <krocard@google.com> Change-Id: I97a6213fe82a5e9a6eb333dc1dc2476102610b58
Allow getCapturePosition to return 0 frames for unprepared streams For device supporting getCapturePosition, VTS only allowed unprepared stream to return INVALID_STATE. Now also allow for the stream to return 0 frames similarly to the other non started states. Test: vts-tradefed run commandAndExit vts --module VtsHalAudioV2_0Target Bug: 110367728 Cherry-piked from: d01dc3edac9e92981e7ae419d0e7622f753acf94 Merged-In: Ibdf8df8cb8809e98c40a50035371df6893fe4da4 Change-Id: Ibdf8df8cb8809e98c40a50035371df6893fe4da4 Signed-off-by: Kevin Rocard <krocard@google.com> (cherry picked from commit 6c9c6e62c193461ed0de4666d0995631ba39e009)
Merge "VTS: Do not require XML for Audio effect V2" into pie-vts-dev am: 5e6dd1288e am: 2642ddb86f Change-Id: I3716d72d762fe481eae9c82f8123ef45b5053768