summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2015-03-09 16:29:33 -0700
committerEric Laurent <elaurent@google.com>2015-03-09 23:59:31 +0000
commitc6bd5db9d9cf4bba1649b5b7ddea2d23f5de23a9 (patch)
tree11d3794ef66c44ae96cba25994b3c78f7e7a4e71 /media
parentd4db9dcd7d29234893d580c329f23242197fe664 (diff)
downloadframeworks_av-c6bd5db9d9cf4bba1649b5b7ddea2d23f5de23a9.zip
frameworks_av-c6bd5db9d9cf4bba1649b5b7ddea2d23f5de23a9.tar.gz
frameworks_av-c6bd5db9d9cf4bba1649b5b7ddea2d23f5de23a9.tar.bz2
fix flush on HW A/V sync tracks
Fix mismatch between track flags on client and server side when HW A/V sync is requested. The audio track was connected to a direct output by the audio policy manager but the client failed to set the direct flag when creating the track resulting in the direct flag not being set in audio flinger. Bug: 19665934. Change-Id: I0a5257b20bf76c9c4d89bc2ad9b44777b81f13bf
Diffstat (limited to 'media')
-rw-r--r--media/libmedia/AudioTrack.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp
index 0ad9cc0..c775e7b 100644
--- a/media/libmedia/AudioTrack.cpp
+++ b/media/libmedia/AudioTrack.cpp
@@ -299,6 +299,9 @@ status_t AudioTrack::set(
ALOGV("Building AudioTrack with attributes: usage=%d content=%d flags=0x%x tags=[%s]",
mAttributes.usage, mAttributes.content_type, mAttributes.flags, mAttributes.tags);
mStreamType = AUDIO_STREAM_DEFAULT;
+ if ((mAttributes.flags & AUDIO_FLAG_HW_AV_SYNC) != 0) {
+ flags = (audio_output_flags_t)(flags | AUDIO_OUTPUT_FLAG_HW_AV_SYNC);
+ }
}
// these below should probably come from the audioFlinger too...