summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/SpdifStreamOut.cpp
diff options
context:
space:
mode:
authorPhil Burk <philburk@google.com>2015-06-18 15:37:08 -0700
committerPhil Burk <philburk@google.com>2015-06-19 17:11:30 -0700
commit48e6ea95dc23e1c84911f1f907403ac1729c6b78 (patch)
treed02ec907f02e33d5cd6d9d870898d461557e3305 /services/audioflinger/SpdifStreamOut.cpp
parent91b0018d658a509aacceddf9cde84afca591d014 (diff)
downloadframeworks_av-48e6ea95dc23e1c84911f1f907403ac1729c6b78.zip
frameworks_av-48e6ea95dc23e1c84911f1f907403ac1729c6b78.tar.gz
frameworks_av-48e6ea95dc23e1c84911f1f907403ac1729c6b78.tar.bz2
AudioFlinger: reset SPDIF encoder on flush
This may prevent corrupt data from reaching the AVR. Bug: 19604395 Change-Id: I3dbdd002326917b9f14dda46a3e5170e1ec799bb Signed-off-by: Phil Burk <philburk@google.com>
Diffstat (limited to 'services/audioflinger/SpdifStreamOut.cpp')
-rw-r--r--services/audioflinger/SpdifStreamOut.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/audioflinger/SpdifStreamOut.cpp b/services/audioflinger/SpdifStreamOut.cpp
index 45b541a..ac637ef 100644
--- a/services/audioflinger/SpdifStreamOut.cpp
+++ b/services/audioflinger/SpdifStreamOut.cpp
@@ -128,7 +128,7 @@ status_t SpdifStreamOut::getRenderPosition(uint32_t *frames)
int SpdifStreamOut::flush()
{
- // FIXME Is there an issue here with flush being asynchronous?
+ mSpdifEncoder.reset();
mRenderPositionHal = 0;
mPreviousHalPosition32 = 0;
return AudioStreamOut::flush();
@@ -136,6 +136,7 @@ int SpdifStreamOut::flush()
int SpdifStreamOut::standby()
{
+ mSpdifEncoder.reset();
mRenderPositionHal = 0;
mPreviousHalPosition32 = 0;
return AudioStreamOut::standby();