summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/Threads.cpp
diff options
context:
space:
mode:
authorKrishnankutty Kolathappilly <kkolat@codeaurora.org>2014-02-04 16:23:42 -0800
committerEric Laurent <elaurent@google.com>2014-03-17 18:30:13 -0700
commit8d6c292a0bed3d63b5b7297d09a604af6327c663 (patch)
tree344c2297ed00e1e10998490bc4e2f00358536133 /services/audioflinger/Threads.cpp
parent9ff25ced1404c896df9e6ed3a6ad289305559361 (diff)
downloadframeworks_av-8d6c292a0bed3d63b5b7297d09a604af6327c663.zip
frameworks_av-8d6c292a0bed3d63b5b7297d09a604af6327c663.tar.gz
frameworks_av-8d6c292a0bed3d63b5b7297d09a604af6327c663.tar.bz2
audioflinger: Handle pause /resume in stopping state
-Pre-requisite: Perform seek on the clip. After seek the data remaining till EOS is little more than the driver and common block buffering. -Framework state: Offload thread is waiting for signal from the HAL for a free buffer. Audio Player calls sink stop on reaching EOS. Audio track is waiting on obtain buffer for a free space in common block to send the last buffer. The track is moved to stopping state as input EOS is reached. -Issue: Perform pause/ resume in this state(STOPPING), Audio playback does not resume. -Fix Ensure resume is called in stopping state if frames ready is greater than zero. Bug: 12870871 Change-Id: Ib1378c4ee5ce4bea655691e93de0775f7b1d2804 Signed-off-by: Glenn Kasten <gkasten@google.com>
Diffstat (limited to 'services/audioflinger/Threads.cpp')
-rw-r--r--services/audioflinger/Threads.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index 12d453e..e90ebd1 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -4230,8 +4230,8 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::OffloadThread::prepareTr
track->mFillingUpStatus = Track::FS_ACTIVE;
// make sure processVolume_l() will apply new volume even if 0
mLeftVolFloat = mRightVolFloat = -1.0;
- if (track->mState == TrackBase::RESUMING) {
- track->mState = TrackBase::ACTIVE;
+ if (track->isResumePending()) {
+ track->resumeAck();
if (last) {
if (mPausedBytesRemaining) {
// Need to continue write that was interrupted