commit | f6927b4bf2d38ecf24537384ee1856961fb2767d | [log] [tgz] |
---|---|---|
author | Carter Hsu <carterhsu@google.com> | Thu Jul 01 09:40:18 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu Jul 01 09:40:18 2021 +0000 |
tree | 7b72ec7a0be717fdba159f1eb063f545005451c6 | |
parent | d66c3dd1741c10d7aba6358a30bdfa68272af5c0 [diff] | |
parent | 0700d79feb2a21fe35eb918a5e420f62e8c76f36 [diff] |
Merge "audio: exclude the echo reference device in capture position test" into sc-dev am: 0700d79feb Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15152137 Change-Id: I0719d4c7792e71ee15f95b6413ef1dcd5e93885e
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 a92a277..79243b6 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,6 +225,14 @@ 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 0b3098b..79ac295 100644 --- a/audio/core/all-versions/vts/functional/7.0/AudioPrimaryHidlHalTest.cpp +++ b/audio/core/all-versions/vts/functional/7.0/AudioPrimaryHidlHalTest.cpp
@@ -710,7 +710,8 @@ // 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::isTelephonyDevice(maybeSourceAddress.value().deviceType) || + xsd::isEchoReferenceDevice(maybeSourceAddress.value().deviceType)); } void createPatchIfNeeded() {