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

Commit 3b9a69d9 authored by Kuowei Li's avatar Kuowei Li Committed by Mikhail Naganov
Browse files

libaudiohal@aidl: pass offload info in hw av sync case.

The encapsulation mode and content id are necessary for hw av sync v3
playabck stream.

Bug: 346698510
Test: Manual playback DTV.
Change-Id: Ib31ddadcdc10fe69e86af4569b020d4ab23778df
parent 37e9203e
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -459,13 +459,17 @@ status_t DeviceHalAidl::openOutputStream(
    args.portConfigId = mixPortConfig.id;
    const bool isOffload = isBitPositionFlagSet(
            aidlOutputFlags, AudioOutputFlags::COMPRESS_OFFLOAD);
    const bool isHwAvSync = isBitPositionFlagSet(
            aidlOutputFlags, AudioOutputFlags::HW_AV_SYNC);
    std::shared_ptr<OutputStreamCallbackAidl> streamCb;
    if (isOffload) {
        streamCb = ndk::SharedRefBase::make<OutputStreamCallbackAidl>(this);
    }
    auto eventCb = ndk::SharedRefBase::make<OutputStreamEventCallbackAidl>(this);
    if (isOffload) {
    if (isOffload || isHwAvSync) {
        args.offloadInfo = aidlConfig.offloadInfo;
    }
    if (isOffload) {
        args.callback = streamCb;
    }
    args.bufferSizeFrames = aidlConfig.frameCount;