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

Commit b9c27305 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Force DIRECT flag on direct output thread." into rvc-dev am: 07f031e8...

Merge "Force DIRECT flag on direct output thread." into rvc-dev am: 07f031e8 am: e30255e6 am: 1006e4c8 am: f3b980f5

Change-Id: I4e846842f5a70e41cb026f9c51bcd6aa14bfa164
parents 0ab39985 f3b980f5
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2087,6 +2087,12 @@ sp<AudioFlinger::PlaybackThread::Track> AudioFlinger::PlaybackThread::createTrac
        outputFlags = (audio_output_flags_t)(outputFlags | AUDIO_OUTPUT_FLAG_FAST);
    }

    // Set DIRECT flag if current thread is DirectOutputThread. This can happen when the playback is
    // rerouted to direct output thread by dynamic audio policy.
    if (mType == DIRECT) {
        *flags = (audio_output_flags_t)(*flags | AUDIO_OUTPUT_FLAG_DIRECT);
    }

    // Check if requested flags are compatible with output stream flags
    if ((*flags & outputFlags) != *flags) {
        ALOGW("createTrack_l(): mismatch between requested flags (%08x) and output flags (%08x)",