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

Commit 86b0e2b6 authored by Ravi Kumar Alamanda's avatar Ravi Kumar Alamanda
Browse files

hal: Correct the multi-channel output usecase selection

Both Multi-channel output on HDMI and Compress offload playback on
HDMI use cases request for a stream with AUDIO_OUTPUT_FLAG_DIRECT.
The current logic would then result selection MULTI_CH usecase.
Fix this by checking for complete match of flags to select the
use case.

Change-Id: I66df94af6c3b837a6c8054282364e1acf78e6e0f
parent 9f54827a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1975,7 +1975,7 @@ static int adev_open_output_stream(struct audio_hw_device *dev,
    out->handle = handle;

    /* Init use case and pcm_config */
    if (out->flags & AUDIO_OUTPUT_FLAG_DIRECT &&
    if (out->flags == AUDIO_OUTPUT_FLAG_DIRECT &&
        out->devices & AUDIO_DEVICE_OUT_AUX_DIGITAL) {
        pthread_mutex_lock(&adev->lock);
        ret = read_hdmi_channel_masks(out);