AudioFlinger: Log Record and MMap thread events
Also update track dump for better grouping and consistency.
Test: adb shell dumpsys media.audio_flinger
Bug: 62700410
Bug: 62701585
Change-Id: I3a6e76eac871cb08ff14d45f7d3992a6e7fba045
diff --git a/include/private/media/AudioTrackShared.h b/include/private/media/AudioTrackShared.h
index 9da5ef3..ff440bc 100644
--- a/include/private/media/AudioTrackShared.h
+++ b/include/private/media/AudioTrackShared.h
@@ -568,6 +568,9 @@
// which may include non-contiguous frames
virtual size_t framesReady();
+ // Safe frames ready query used by dump() - this has no side effects.
+ virtual size_t framesReadySafe() const;
+
// Currently AudioFlinger will call framesReady() for a fast track from two threads:
// FastMixer thread, and normal mixer thread. This is dangerous, as the proxy is intended
// to be called from at most one thread of server, and one thread of client.
@@ -620,6 +623,7 @@
public:
virtual size_t framesReady();
+ virtual size_t framesReadySafe() const override;
virtual void framesReadyIsCalledByMultipleThreads();
virtual status_t obtainBuffer(Buffer* buffer, bool ackFlush);
virtual void releaseBuffer(Buffer* buffer);