Loading services/audioflinger/AudioFlinger.cpp +7 −1 Original line number Diff line number Diff line Loading @@ -827,6 +827,12 @@ sp<IAudioTrack> AudioFlinger::createTrack(const CreateTrackInput& input, ALOGE("Secondary output patchRecord init failed: %d", status); continue; } // TODO: We could check compatibility of the secondaryThread with the PatchTrack // for fast usage: thread has fast mixer, sample rate matches, etc.; // for now, we exclude fast tracks by removing the Fast flag. const audio_output_flags_t outputFlags = (audio_output_flags_t)(output.flags & ~AUDIO_OUTPUT_FLAG_FAST); sp patchTrack = new PlaybackThread::PatchTrack(secondaryThread, streamType, output.sampleRate, Loading @@ -835,7 +841,7 @@ sp<IAudioTrack> AudioFlinger::createTrack(const CreateTrackInput& input, frameCount, patchRecord->buffer(), patchRecord->bufferSize(), output.flags, outputFlags, 0ns /* timeout */); status = patchTrack->initCheck(); if (status != NO_ERROR) { Loading services/audioflinger/PatchPanel.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -506,7 +506,10 @@ status_t AudioFlinger::PatchPanel::Patch::createConnections(PatchPanel *panel) } if (mPlayback.thread()->hasFastMixer()) { // Create a fast track if the playback thread has fast mixer to get better performance. // Note: we should have matching channel mask, sample rate, and format by the logic above. outputFlags = (audio_output_flags_t) (outputFlags | AUDIO_OUTPUT_FLAG_FAST); } else { outputFlags = (audio_output_flags_t) (outputFlags & ~AUDIO_OUTPUT_FLAG_FAST); } // create a special playback track to render to playback thread. Loading services/audioflinger/Threads.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -4618,6 +4618,10 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::MixerThread::prepareTrac // process fast tracks if (track->isFastTrack()) { LOG_ALWAYS_FATAL_IF(mFastMixer.get() == nullptr, "%s(%d): FastTrack(%d) present without FastMixer", __func__, id(), track->id()); if (track->getHapticPlaybackEnabled()) { noFastHapticTrack = false; } Loading Loading
services/audioflinger/AudioFlinger.cpp +7 −1 Original line number Diff line number Diff line Loading @@ -827,6 +827,12 @@ sp<IAudioTrack> AudioFlinger::createTrack(const CreateTrackInput& input, ALOGE("Secondary output patchRecord init failed: %d", status); continue; } // TODO: We could check compatibility of the secondaryThread with the PatchTrack // for fast usage: thread has fast mixer, sample rate matches, etc.; // for now, we exclude fast tracks by removing the Fast flag. const audio_output_flags_t outputFlags = (audio_output_flags_t)(output.flags & ~AUDIO_OUTPUT_FLAG_FAST); sp patchTrack = new PlaybackThread::PatchTrack(secondaryThread, streamType, output.sampleRate, Loading @@ -835,7 +841,7 @@ sp<IAudioTrack> AudioFlinger::createTrack(const CreateTrackInput& input, frameCount, patchRecord->buffer(), patchRecord->bufferSize(), output.flags, outputFlags, 0ns /* timeout */); status = patchTrack->initCheck(); if (status != NO_ERROR) { Loading
services/audioflinger/PatchPanel.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -506,7 +506,10 @@ status_t AudioFlinger::PatchPanel::Patch::createConnections(PatchPanel *panel) } if (mPlayback.thread()->hasFastMixer()) { // Create a fast track if the playback thread has fast mixer to get better performance. // Note: we should have matching channel mask, sample rate, and format by the logic above. outputFlags = (audio_output_flags_t) (outputFlags | AUDIO_OUTPUT_FLAG_FAST); } else { outputFlags = (audio_output_flags_t) (outputFlags & ~AUDIO_OUTPUT_FLAG_FAST); } // create a special playback track to render to playback thread. Loading
services/audioflinger/Threads.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -4618,6 +4618,10 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::MixerThread::prepareTrac // process fast tracks if (track->isFastTrack()) { LOG_ALWAYS_FATAL_IF(mFastMixer.get() == nullptr, "%s(%d): FastTrack(%d) present without FastMixer", __func__, id(), track->id()); if (track->getHapticPlaybackEnabled()) { noFastHapticTrack = false; } Loading