diff options
author | Marco Nelissen <marcone@google.com> | 2013-01-14 14:12:05 -0800 |
---|---|---|
committer | Marco Nelissen <marcone@google.com> | 2013-10-25 14:06:03 -0700 |
commit | 9cae217050aa1347d4ac5053c305754879e3f97f (patch) | |
tree | dff82f277cba8f34af39eaeeb00adec01bbda26c /services/audioflinger/Threads.h | |
parent | be567be3f92026f5964c1c9ecce00e30bb7df412 (diff) | |
download | frameworks_av-9cae217050aa1347d4ac5053c305754879e3f97f.zip frameworks_av-9cae217050aa1347d4ac5053c305754879e3f97f.tar.gz frameworks_av-9cae217050aa1347d4ac5053c305754879e3f97f.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.
Cherrypicked from master.
b/9464621
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 a5d2169..81804c2 100644 --- a/services/audioflinger/Threads.h +++ b/services/audioflinger/Threads.h @@ -241,6 +241,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); @@ -421,6 +424,7 @@ public: int sessionId, IAudioFlinger::track_flags_t *flags, pid_t tid, + int uid, status_t *status); AudioStreamOut* getOutput() const; @@ -495,6 +499,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. @@ -873,6 +879,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); @@ -953,5 +960,4 @@ private: // For dumpsys const sp<NBAIO_Sink> mTeeSink; - int mClientUid; }; |