Loading services/audioflinger/Threads.cpp +9 −8 Original line number Diff line number Diff line Loading @@ -2051,6 +2051,9 @@ void AudioFlinger::PlaybackThread::readOutputParameters_l() ALOGW("direct output implements resume but not pause"); } } if (!mHwSupportsPause && mOutput->flags & AUDIO_OUTPUT_FLAG_HW_AV_SYNC) { LOG_ALWAYS_FATAL("HW_AV_SYNC requested but HAL does not implement pause and resume"); } if (mType == DUPLICATING && mMixerBufferEnabled && mEffectBufferEnabled) { // For best precision, we use float instead of the associated output Loading Loading @@ -4371,9 +4374,9 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::DirectOutputThread::prep sp<Track> l = mLatestActiveTrack.promote(); bool last = l.get() == track; if (mHwSupportsPause && track->isPausing()) { if (track->isPausing()) { track->setPaused(); if (last && !mHwPaused) { if (mHwSupportsPause && last && !mHwPaused) { doHwPause = true; mHwPaused = true; } Loading @@ -4383,15 +4386,13 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::DirectOutputThread::prep if (last) { flushPending = true; } } else if (mHwSupportsPause && track->isResumePending()){ } else if (track->isResumePending()) { track->resumeAck(); if (last) { if (mHwPaused) { if (last && mHwPaused) { doHwResume = true; mHwPaused = false; } } } // The first time a track is added we wait // for all its buffers to be filled before processing it. Loading services/audioflinger/Threads.h +3 −2 Original line number Diff line number Diff line Loading @@ -712,8 +712,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: Loading Loading
services/audioflinger/Threads.cpp +9 −8 Original line number Diff line number Diff line Loading @@ -2051,6 +2051,9 @@ void AudioFlinger::PlaybackThread::readOutputParameters_l() ALOGW("direct output implements resume but not pause"); } } if (!mHwSupportsPause && mOutput->flags & AUDIO_OUTPUT_FLAG_HW_AV_SYNC) { LOG_ALWAYS_FATAL("HW_AV_SYNC requested but HAL does not implement pause and resume"); } if (mType == DUPLICATING && mMixerBufferEnabled && mEffectBufferEnabled) { // For best precision, we use float instead of the associated output Loading Loading @@ -4371,9 +4374,9 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::DirectOutputThread::prep sp<Track> l = mLatestActiveTrack.promote(); bool last = l.get() == track; if (mHwSupportsPause && track->isPausing()) { if (track->isPausing()) { track->setPaused(); if (last && !mHwPaused) { if (mHwSupportsPause && last && !mHwPaused) { doHwPause = true; mHwPaused = true; } Loading @@ -4383,15 +4386,13 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::DirectOutputThread::prep if (last) { flushPending = true; } } else if (mHwSupportsPause && track->isResumePending()){ } else if (track->isResumePending()) { track->resumeAck(); if (last) { if (mHwPaused) { if (last && mHwPaused) { doHwResume = true; mHwPaused = false; } } } // The first time a track is added we wait // for all its buffers to be filled before processing it. Loading
services/audioflinger/Threads.h +3 −2 Original line number Diff line number Diff line Loading @@ -712,8 +712,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: Loading