summaryrefslogtreecommitdiffstats
path: root/services/audioflinger
diff options
context:
space:
mode:
authorHaynes Mathew George <hgeorge@codeaurora.org>2016-05-05 19:02:06 -0700
committerSteve Kondik <steve@cyngn.com>2016-08-19 13:38:26 -0700
commite4575aeb5d66f71b6ef6c611570ea96df81c1246 (patch)
treecb4224942057b6c7d2445bd3d0a8ba1f0f86c43e /services/audioflinger
parent6fde774471629832951e9b9b2e0d758e10f6431d (diff)
downloadframeworks_av-e4575aeb5d66f71b6ef6c611570ea96df81c1246.zip
frameworks_av-e4575aeb5d66f71b6ef6c611570ea96df81c1246.tar.gz
frameworks_av-e4575aeb5d66f71b6ef6c611570ea96df81c1246.tar.bz2
audioflinger: Always process volume commands from a latest track
Process them irrespective of whether the track is invalid. Ignoring to do so may lead to glitches/loud bursts in audio when a new track reuses the same output. CRs-Fixed: 1002448 Change-Id: I9afbdd221db3a7311eb0ec8bb75852cf5409084e
Diffstat (limited to 'services/audioflinger')
-rw-r--r--services/audioflinger/Threads.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index ee5dc24..e5e8bdb 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -5169,15 +5169,9 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::OffloadThread::prepareTr
if (track->isInvalid()) {
ALOGW("An invalidated track shouldn't be in active list");
tracksToRemove->add(track);
- continue;
- }
-
- if (track->mState == TrackBase::IDLE) {
+ } else if (track->mState == TrackBase::IDLE) {
ALOGW("An idle track shouldn't be in active list");
- continue;
- }
-
- if (track->isPausing()) {
+ } else if (track->isPausing()) {
track->setPaused();
if (last) {
if (mHwSupportsPause && !mHwPaused) {
@@ -5200,7 +5194,7 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::OffloadThread::prepareTr
if (last) {
mFlushPending = true;
}
- } else if (track->isResumePending()){
+ } else if (track->isResumePending()) {
track->resumeAck();
if (last) {
if (mPausedBytesRemaining) {