From 2d3ca68363f723fbe269d3ce52dab4985dfc7154 Mon Sep 17 00:00:00 2001 From: Haynes Mathew George Date: Fri, 7 Mar 2014 13:43:49 -0800 Subject: audioflinger: OffloadThread fix for resume underrun AudioFlinger can miss resuming h/w on a pause->resume transition if sufficient data isn't available Bug: 11358524. Change-Id: Ic3c75256290d3515fd4a96dfcc900909fbe5bc15 --- services/audioflinger/Tracks.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'services/audioflinger/Tracks.cpp') diff --git a/services/audioflinger/Tracks.cpp b/services/audioflinger/Tracks.cpp index c5fa624..9fe459b 100644 --- a/services/audioflinger/Tracks.cpp +++ b/services/audioflinger/Tracks.cpp @@ -1020,9 +1020,13 @@ void AudioFlinger::PlaybackThread::Track::resumeAck() { if (mState == RESUMING) mState = ACTIVE; + // Other possibility of pending resume is stopping_1 state // Do not update the state from stopping as this prevents - //drain being called. + // drain being called. + if (mState == STOPPING_1) { + mResumeToStopping = false; + } } // ---------------------------------------------------------------------------- -- cgit v1.1