Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b7b97b9d authored by Eric Laurent's avatar Eric Laurent Committed by Android Git Automerger
Browse files

am 48e879db: am a2ab4505: audio flinger: force audio path start from normal mixer

* commit '48e879db':
  audio flinger: force audio path start from normal mixer
parents cadcb20d 48e879db
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -3479,6 +3479,12 @@ ssize_t AudioFlinger::MixerThread::threadLoop_write()
        if (state->mCommand != FastMixerState::MIX_WRITE &&
                (kUseFastMixer != FastMixer_Dynamic || state->mTrackMask > 1)) {
            if (state->mCommand == FastMixerState::COLD_IDLE) {

                // FIXME workaround for first HAL write being CPU bound on some devices
                ATRACE_BEGIN("write");
                mOutput->write((char *)mSinkBuffer, 0);
                ATRACE_END();

                int32_t old = android_atomic_inc(&mFastMixerFutex);
                if (old == -1) {
                    (void) syscall(__NR_futex, &mFastMixerFutex, FUTEX_WAKE_PRIVATE, 1);