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

Commit 5d3d956d authored by Andy Hung's avatar Andy Hung
Browse files

AudioFlinger: Remove latency reporting for AUDIO_INPUT_FLAG_HW_AV_SYNC

Test: No regression
Bug: 117299316
Change-Id: I8f7c70454baf93f36e87ea98ba795beea8d75678
parent d10b735c
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -71,6 +71,12 @@ public:

            status_t    getActiveMicrophones(std::vector<media::MicrophoneInfo>* activeMicrophones);

    static  bool        checkServerLatencySupported(
                                audio_format_t format, audio_input_flags_t flags) {
                            return audio_is_linear_pcm(format)
                                    && (flags & AUDIO_INPUT_FLAG_HW_AV_SYNC) == 0;
                        }

private:
    friend class AudioFlinger;  // for mState

+1 −1
Original line number Diff line number Diff line
@@ -7528,7 +7528,7 @@ void AudioFlinger::RecordThread::dumpInternals(int fd, const Vector<String16>& a
        (void)input->stream->dump(fd);
    }

    const double latencyMs = audio_is_linear_pcm(mFormat)
    const double latencyMs = RecordTrack::checkServerLatencySupported(mFormat, input->flags)
            ? - mTimestamp.getOutputServerLatencyMs(mSampleRate) : 0.;
    if (latencyMs != 0.) {
        dprintf(fd, "  NormalRecord latency ms: %.2lf\n", latencyMs);
+1 −1
Original line number Diff line number Diff line
@@ -1755,7 +1755,7 @@ AudioFlinger::RecordThread::RecordTrack::RecordTrack(
        thread->mFastTrackAvail = false;
    } else {
        // TODO: only Normal Record has timestamps (Fast Record does not).
        mServerLatencySupported = audio_is_linear_pcm(mFormat);
        mServerLatencySupported = checkServerLatencySupported(mFormat, flags);
    }
#ifdef TEE_SINK
    mTee.setId(std::string("_") + std::to_string(mThreadIoHandle)