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

Commit 63d2d774 authored by Andy Hung's avatar Andy Hung Committed by Android (Google) Code Review
Browse files

Merge "AudioFlinger: Remove latency reporting for AUDIO_INPUT_FLAG_HW_AV_SYNC"

parents 1268b28c 5d3d956d
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -71,6 +71,12 @@ public:


            status_t    getActiveMicrophones(std::vector<media::MicrophoneInfo>* activeMicrophones);
            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:
private:
    friend class AudioFlinger;  // for mState
    friend class AudioFlinger;  // for mState


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