diff options
author | Phil Burk <philburk@google.com> | 2015-04-30 16:08:10 -0700 |
---|---|---|
committer | Phil Burk <philburk@google.com> | 2015-05-01 17:17:44 -0700 |
commit | 6fc2a7c81f62b1e21487ae37e11aae6241bc3ead (patch) | |
tree | 2b8396ccca007dfb36b825df49d4a430b3dd3d1c /services/audioflinger/Threads.h | |
parent | 1de1e25cba872bd4c077c2e394f8ca9c70b65856 (diff) | |
download | frameworks_av-6fc2a7c81f62b1e21487ae37e11aae6241bc3ead.zip frameworks_av-6fc2a7c81f62b1e21487ae37e11aae6241bc3ead.tar.gz frameworks_av-6fc2a7c81f62b1e21487ae37e11aae6241bc3ead.tar.bz2 |
AudioTrack: fix direct tracks not pausing
When a Direct Track is paused and the HAL does not support
pause() and resume() then the HW never gets paused.
The app can just keep writing data, which gets played.
Bug: 18899620
Change-Id: Ice0f360956ff7ca425f6f24a0a2a8640d8b43fa8
Signed-off-by: Phil Burk <philburk@google.com>
Diffstat (limited to 'services/audioflinger/Threads.h')
-rw-r--r-- | services/audioflinger/Threads.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/services/audioflinger/Threads.h b/services/audioflinger/Threads.h index 2c514f8..3898532 100644 --- a/services/audioflinger/Threads.h +++ b/services/audioflinger/Threads.h @@ -713,8 +713,9 @@ protected: audio_patch_handle_t *handle); virtual status_t releaseAudioPatch_l(const audio_patch_handle_t handle); - bool usesHwAvSync() const { return (mType == DIRECT) && (mOutput != NULL) && - (mOutput->flags & AUDIO_OUTPUT_FLAG_HW_AV_SYNC); } + bool usesHwAvSync() const { return (mType == DIRECT) && (mOutput != NULL) + && mHwSupportsPause + && (mOutput->flags & AUDIO_OUTPUT_FLAG_HW_AV_SYNC); } private: |