From 462fd2fa9eef642b0574aa7409de0bde3fec8d43 Mon Sep 17 00:00:00 2001 From: Marco Nelissen Date: Mon, 14 Jan 2013 14:12:05 -0800 Subject: Assign blame for playback wakelocks. Set a work source for the playback wakelock, so that playback is counted against the requesting app instead of the media server. Change-Id: I7329f88a288a95a582a78005a1c3d16a5a611e31 --- services/audioflinger/TrackBase.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'services/audioflinger/TrackBase.h') diff --git a/services/audioflinger/TrackBase.h b/services/audioflinger/TrackBase.h index 00a91b7..05fde7c 100644 --- a/services/audioflinger/TrackBase.h +++ b/services/audioflinger/TrackBase.h @@ -45,6 +45,7 @@ public: size_t frameCount, const sp& sharedBuffer, int sessionId, + int uid, bool isOut); virtual ~TrackBase(); virtual status_t initCheck() const { return getCblk() != 0 ? NO_ERROR : NO_MEMORY; } @@ -55,6 +56,7 @@ public: sp getCblk() const { return mCblkMemory; } audio_track_cblk_t* cblk() const { return mCblk; } int sessionId() const { return mSessionId; } + int uid() const { return mUid; } virtual status_t setSyncEvent(const sp& event); protected: @@ -124,6 +126,7 @@ protected: // openRecord(), and then adjusted as needed const int mSessionId; + int mUid; Vector < sp >mSyncEvents; const bool mIsOut; ServerProxy* mServerProxy; -- cgit v1.1