audioflinger: forward flush to direct output streams
Track flush should be forwarded to the audio HAL when playing
on a direct output stream.
Bug: 17704953.
Change-Id: Iafc94327fe9aebf1d4eaa97b76c6767b7ac5babe
diff --git a/services/audioflinger/Tracks.cpp b/services/audioflinger/Tracks.cpp
index c0a75b9..75190f3 100644
--- a/services/audioflinger/Tracks.cpp
+++ b/services/audioflinger/Tracks.cpp
@@ -824,6 +824,10 @@
// remove from active track list, reset(), and trigger presentation complete
if (playbackThread->mActiveTracks.indexOf(this) < 0) {
reset();
+ if (thread->type() == ThreadBase::DIRECT) {
+ DirectOutputThread *t = (DirectOutputThread *)playbackThread;
+ t->flushHw_l();
+ }
}
}
// Prevent flush being lost if the track is flushed and then resumed