summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2011-06-22 16:15:25 -0700
committerGlenn Kasten <gkasten@google.com>2011-11-16 14:52:55 -0800
commit879135196fd1c97deefc538c888037c56c2879a7 (patch)
tree3ee39136a951bf1fbb25e0b484c3c1b6709c5868 /include
parent5c052218128013d630b4d9a84393ebfbff11f3e8 (diff)
downloadframeworks_av-879135196fd1c97deefc538c888037c56c2879a7.zip
frameworks_av-879135196fd1c97deefc538c888037c56c2879a7.tar.gz
frameworks_av-879135196fd1c97deefc538c888037c56c2879a7.tar.bz2
Bug 4903178 Restore priority and cgroup on stop
On AudioTrack and AudioRecord stop or failed start, restore the priority and cgroup of the caller to their previous values, rather than forcing to NORMAL. Dependent on new thread APIs. Also fixes bug where priority was set to AUDIO but cgroup not set. Change-Id: Ib83893918fb4fdf57c6b87884b51038997a631d8
Diffstat (limited to 'include')
-rw-r--r--include/media/AudioRecord.h2
-rw-r--r--include/media/AudioTrack.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/include/media/AudioRecord.h b/include/media/AudioRecord.h
index 605680a..2fb69b6 100644
--- a/include/media/AudioRecord.h
+++ b/include/media/AudioRecord.h
@@ -385,6 +385,8 @@ private:
uint32_t mChannelMask;
audio_io_handle_t mInput;
int mSessionId;
+ int mPreviousPriority; // before start()
+ int mPreviousSchedulingGroup;
};
}; // namespace android
diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h
index d1a8105..f71965e 100644
--- a/include/media/AudioTrack.h
+++ b/include/media/AudioTrack.h
@@ -487,6 +487,8 @@ private:
int mAuxEffectId;
Mutex mLock;
status_t mRestoreStatus;
+ int mPreviousPriority; // before start()
+ int mPreviousSchedulingGroup;
};