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

Commit c260784e authored by Eric Laurent's avatar Eric Laurent
Browse files

audio policy: fix HW A/V sync output selection

commit b732cf5a broke the selection mechanism for the
HW A/V sync direct output.
Add a rule to only select a mixed output for basic PCM
stereo content when a direct output is not explicitly requested.

Bug: 17702382.

Change-Id: I1387690ace77cd4d6a8faf0b525c3d1008fba3f1
parent dc2e6ddc
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -930,7 +930,9 @@ audio_io_handle_t AudioPolicyManager::getOutputForDevice(
    sp<IOProfile> profile;

    // skip direct output selection if the request can obviously be attached to a mixed output
    if (audio_is_linear_pcm(format) && samplingRate <= MAX_MIXER_SAMPLING_RATE &&
    // and not explicitly requested
    if (((flags & AUDIO_OUTPUT_FLAG_DIRECT) == 0) &&
            audio_is_linear_pcm(format) && samplingRate <= MAX_MIXER_SAMPLING_RATE &&
            audio_channel_count_from_out_mask(channelMask) <= 2) {
        goto non_direct_output;
    }