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

Commit a6429b31 authored by Ming-Shin Lu's avatar Ming-Shin Lu
Browse files

Add traces in AudioFlinger to measure Audio-Haptics latency

Flag: EXEMPT refactor
Bug: 351968966
Test: play audio-haptic with go/get-audio-haptic-tests and
      dump perfetto trace
Change-Id: I9b711d42f217104e205079b5ca49c44af519c8f8
parent 945a88d1
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@

#define LOG_TAG "AudioFlinger"
//#define LOG_NDEBUG 0
#define ATRACE_TAG ATRACE_TAG_AUDIO
#include <utils/Trace.h>

// Define AUDIO_ARRAYS_STATIC_CHECK to check all audio arrays are correct
#define AUDIO_ARRAYS_STATIC_CHECK 1
@@ -1054,6 +1056,7 @@ void AudioFlinger::unregisterWriter(const sp<NBLog::Writer>& writer)
status_t AudioFlinger::createTrack(const media::CreateTrackRequest& _input,
                                   media::CreateTrackResponse& _output)
{
    ATRACE_CALL();
    // Local version of VALUE_OR_RETURN, specific to this method's calling conventions.
    CreateTrackInput input = VALUE_OR_RETURN_STATUS(CreateTrackInput::fromAidl(_input));
    CreateTrackOutput output;