diff options
author | Marco Nelissen <marcone@google.com> | 2013-01-14 14:12:05 -0800 |
---|---|---|
committer | Marco Nelissen <marcone@google.com> | 2013-10-25 11:13:17 -0700 |
commit | 462fd2fa9eef642b0574aa7409de0bde3fec8d43 (patch) | |
tree | 65446a138d197f062bf199480b96cca4df560fcf /services/audioflinger/Threads.h | |
parent | f7d89bd79d170be3b299717ac11aff62909314c5 (diff) | |
download | frameworks_av-462fd2fa9eef642b0574aa7409de0bde3fec8d43.zip frameworks_av-462fd2fa9eef642b0574aa7409de0bde3fec8d43.tar.gz frameworks_av-462fd2fa9eef642b0574aa7409de0bde3fec8d43.tar.bz2 |
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
Diffstat (limited to 'services/audioflinger/Threads.h')
-rw-r--r-- | services/audioflinger/Threads.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/services/audioflinger/Threads.h b/services/audioflinger/Threads.h index 4ccbb10..2b4c9fd 100644 --- a/services/audioflinger/Threads.h +++ b/services/audioflinger/Threads.h @@ -244,6 +244,9 @@ protected: void acquireWakeLock_l(int uid = -1); void releaseWakeLock(); void releaseWakeLock_l(); + void updateWakeLockUids(const SortedVector<int> &uids); + void updateWakeLockUids_l(const SortedVector<int> &uids); + void getPowerManager_l(); void setEffectSuspended_l(const effect_uuid_t *type, bool suspend, int sessionId); @@ -424,6 +427,7 @@ public: int sessionId, IAudioFlinger::track_flags_t *flags, pid_t tid, + int uid, status_t *status /*non-NULL*/); AudioStreamOut* getOutput() const; @@ -497,6 +501,8 @@ private: void setMasterMute_l(bool muted) { mMasterMute = muted; } protected: SortedVector< wp<Track> > mActiveTracks; // FIXME check if this could be sp<> + SortedVector<int> mWakeLockUids; + int mActiveTracksGeneration; // Allocate a track name for a given channel mask. // Returns name >= 0 if successful, -1 on failure. @@ -875,6 +881,7 @@ public: audio_channel_mask_t channelMask, size_t frameCount, int sessionId, + int uid, IAudioFlinger::track_flags_t *flags, pid_t tid, status_t *status /*non-NULL*/); @@ -954,5 +961,4 @@ private: // For dumpsys const sp<NBAIO_Sink> mTeeSink; - int mClientUid; }; |