summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/SpdifStreamOut.cpp
diff options
context:
space:
mode:
authorPhil Burk <philburk@google.com>2015-08-04 11:11:28 -0700
committerPhil Burk <philburk@google.com>2015-08-04 11:11:28 -0700
commit41ae1d663d896a9ec22299d95c01940313a9b276 (patch)
tree0d6246404b453fd7ebb7d134d3b02ce6e01c5869 /services/audioflinger/SpdifStreamOut.cpp
parent6134ad6fdeab91e54a1abc8f00eafc956e42fb3d (diff)
downloadframeworks_av-41ae1d663d896a9ec22299d95c01940313a9b276.zip
frameworks_av-41ae1d663d896a9ec22299d95c01940313a9b276.tar.gz
frameworks_av-41ae1d663d896a9ec22299d95c01940313a9b276.tar.bz2
AudioFlinger: tell HAL the PCM is non-audio
Add a bit to tell the HAL that the PCM data is really encoded audio wrapped in a data burst. Otherwise the device may try to play the encoded data directly which will sound like modulated white noise. Bug: 22576112 Change-Id: Ib140da96876e849023858fe2510612310501d1ee 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 6b6f5db..004a068 100644
--- a/services/audioflinger/SpdifStreamOut.cpp
+++ b/services/audioflinger/SpdifStreamOut.cpp
@@ -35,7 +35,8 @@ namespace android {
SpdifStreamOut::SpdifStreamOut(AudioHwDevice *dev,
audio_output_flags_t flags,
audio_format_t format)
- : AudioStreamOut(dev,flags)
+ // Tell the HAL that the data will be compressed audio wrapped in a data burst.
+ : AudioStreamOut(dev, (audio_output_flags_t) (flags | AUDIO_OUTPUT_FLAG_IEC958_NONAUDIO))
, mSpdifEncoder(this, format)
, mApplicationFormat(AUDIO_FORMAT_DEFAULT)
, mApplicationSampleRate(0)