Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 01607878 authored by Carter Hsu's avatar Carter Hsu Committed by Automerger Merge Worker
Browse files

Merge "audio: exclude the echo reference device in capture position test" into...

Merge "audio: exclude the echo reference device in capture position test" into sc-dev am: 0700d79f am: c980e0f1

Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15152137

Change-Id: I1cab4968502823cc5f299f9fcbe0df95decf50b5
parents 53b6015d c980e0f1
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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_";
+2 −1
Original line number Diff line number Diff line
@@ -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() {