From dd0e20eba3a0b7a2fbbe6f0429b9eb3cadd8b883 Mon Sep 17 00:00:00 2001 From: Mikhail Naganov Date: Wed, 7 Jul 2021 17:07:15 +0000 Subject: [PATCH] Revert "audio: exclude the echo reference device in capture position test" This reverts commit b22f307ccfd1072e3d61deb4e03659db7a168b7d. Reason for revert: As explained in b/192307382#comment12, the HAL must provide capture positions for the echo reference input regardless of whether there is any actual output. This should not affect O6/R4 as according to b/192307382#comment10, the VTS tests pass w/o this patch after the HAL has been fixed. Bug: 192307382 Change-Id: I224bd9de1dcb2e2c8dc138dbfd85f848378aea4f Test: VtsHalAudioV7_0TargetTest --gtest_filter=*PcmOnlyConfigInputStreamTest* --- .../android_audio_policy_configuration_V7_0-enums.h | 8 -------- .../vts/functional/7.0/AudioPrimaryHidlHalTest.cpp | 3 +-- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/audio/common/7.0/enums/include/android_audio_policy_configuration_V7_0-enums.h b/audio/common/7.0/enums/include/android_audio_policy_configuration_V7_0-enums.h index 79243b6e05..a92a277471 100644 --- a/audio/common/7.0/enums/include/android_audio_policy_configuration_V7_0-enums.h +++ b/audio/common/7.0/enums/include/android_audio_policy_configuration_V7_0-enums.h @@ -225,14 +225,6 @@ static inline bool isTelephonyDevice(const std::string& device) { return isTelephonyDevice(stringToAudioDevice(device)); } -static inline bool isEchoReferenceDevice(AudioDevice device) { - return device == AudioDevice::AUDIO_DEVICE_IN_ECHO_REFERENCE; -} - -static inline bool isEchoReferenceDevice(const std::string& device) { - return isEchoReferenceDevice(stringToAudioDevice(device)); -} - static inline bool maybeVendorExtension(const std::string& s) { // Only checks whether the string starts with the "vendor prefix". static const std::string vendorPrefix = "VX_"; diff --git a/audio/core/all-versions/vts/functional/7.0/AudioPrimaryHidlHalTest.cpp b/audio/core/all-versions/vts/functional/7.0/AudioPrimaryHidlHalTest.cpp index 79ac295151..0b3098b872 100644 --- a/audio/core/all-versions/vts/functional/7.0/AudioPrimaryHidlHalTest.cpp +++ b/audio/core/all-versions/vts/functional/7.0/AudioPrimaryHidlHalTest.cpp @@ -710,8 +710,7 @@ class PcmOnlyConfigInputStreamTest : public InputStreamTest { // Returning 'true' when no source is found so the test can fail later with a more clear // problem description. return !maybeSourceAddress.has_value() || - !(xsd::isTelephonyDevice(maybeSourceAddress.value().deviceType) || - xsd::isEchoReferenceDevice(maybeSourceAddress.value().deviceType)); + !xsd::isTelephonyDevice(maybeSourceAddress.value().deviceType); } void createPatchIfNeeded() {