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

Commit 10fef6a8 authored by Mingming Yin's avatar Mingming Yin
Browse files

hal: fix channel mask for m-ch offload playback

- Update channel mask with compress parameters for
  compress offload playback on HDMI device

Change-Id: I89263f56923588fcb906facfd4ae9ebf95203743
parent c6d28bad
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -989,7 +989,7 @@ static int check_and_set_hdmi_channels(struct audio_device *adev,
        return 0;

    if (channels == adev->cur_hdmi_channels) {
        ALOGD("%s: Requested channels are same as current", __func__);
        ALOGD("%s: Requested channels are same as current channels(%d)", __func__, channels);
        return 0;
    }

@@ -1085,8 +1085,12 @@ int start_output_stream(struct stream_out *out)
    uc_info->out_snd_device = SND_DEVICE_NONE;

    /* This must be called before adding this usecase to the list */
    if (out->devices & AUDIO_DEVICE_OUT_AUX_DIGITAL)
    if (out->devices & AUDIO_DEVICE_OUT_AUX_DIGITAL) {
        if (out->usecase == USECASE_AUDIO_PLAYBACK_OFFLOAD)
            check_and_set_hdmi_channels(adev, out->compr_config.codec->ch_in);
        else
            check_and_set_hdmi_channels(adev, out->config.channels);
    }

    list_add_tail(&adev->usecase_list, &uc_info->list);