audio: exclude the echo reference device in capture position test
Bug: 192307382 Test: VtsHalAudioV7_0TargetTest --gtest_filter=*PcmOnlyConfigInputStreamTest* Signed-off-by: Carter Hsu <carterhsu@google.com> Change-Id: I4e38e093bc3be7ee54c0c7cce4d1181e260a23bb
This commit is contained in:
parent
9f834f1a91
commit
b22f307ccf
2 changed files with 10 additions and 1 deletions
|
@ -225,6 +225,14 @@ 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_";
|
||||
|
|
|
@ -710,7 +710,8 @@ 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::isTelephonyDevice(maybeSourceAddress.value().deviceType) ||
|
||||
xsd::isEchoReferenceDevice(maybeSourceAddress.value().deviceType));
|
||||
}
|
||||
|
||||
void createPatchIfNeeded() {
|
||||
|
|
Loading…
Reference in a new issue