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

Commit 010d82cd authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 11822896 from 7b9d4bb4 to 24Q3-release

Change-Id: Ic8ef0841f59fd32ecbd44baf53b484894cb08332
parents f899246c 7b9d4bb4
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -107,6 +107,16 @@ flag {
  }
}

flag {
  name: "stop_hal_before_surface"
  namespace: "codec_fwk"
  description: "Bugfix flag for setting state early to avoid a race condition"
  bug: "339247977"
  metadata {
    purpose: PURPOSE_BUGFIX
  }
}

flag {
  name: "teamfood"
  namespace: "codec_fwk"
+21 −4
Original line number Diff line number Diff line
@@ -2227,8 +2227,17 @@ void CCodec::stop(bool pushBlankBuffer) {
    // So we reverse their order for stopUseOutputSurface() to notify C2Fence waiters
    // prior to comp->stop().
    // See also b/300350761.
    //
    // The workaround is no longer needed with fetchGraphicBlock & C2Fence changes.
    // so we are reverting back to the logical sequence of the operations.
    status_t err = C2_OK;
    if (android::media::codec::provider_->stop_hal_before_surface()) {
        err = comp->stop();
        mChannel->stopUseOutputSurface(pushBlankBuffer);
    status_t err = comp->stop();
    } else {
        mChannel->stopUseOutputSurface(pushBlankBuffer);
        err = comp->stop();
    }
    if (err != C2_OK) {
        // TODO: convert err into status_t
        mCallback->onError(UNKNOWN_ERROR, ACTION_CODE_FATAL);
@@ -2323,8 +2332,16 @@ void CCodec::release(bool sendCallback, bool pushBlankBuffer) {
    // So we reverse their order for stopUseOutputSurface() to notify C2Fence waiters
    // prior to comp->release().
    // See also b/300350761.
    //
    // The workaround is no longer needed with fetchGraphicBlock & C2Fence changes.
    // so we are reverting back to the logical sequence of the operations.
    if (android::media::codec::provider_->stop_hal_before_surface()) {
        comp->release();
        mChannel->stopUseOutputSurface(pushBlankBuffer);
    } else {
        mChannel->stopUseOutputSurface(pushBlankBuffer);
        comp->release();
    }

    {
        Mutexed<State>::Locked state(mState);
+1 −1
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ cc_defaults {
    ],
    fuzz_config: {
        cc: [
            "android-media-fuzzing-reports@google.com",
            "android-audio-fuzzing-reports@google.com",
        ],
        componentid: 155276,
        hotlists: ["4593311"],
+7 −2
Original line number Diff line number Diff line
@@ -327,8 +327,11 @@ status_t StreamHalAidl::transfer(void *buffer, size_t bytes, size_t *transferred
            return INVALID_OPERATION;
        }
    }
    StreamContextAidl::DataMQ::Error fmqError = StreamContextAidl::DataMQ::Error::NONE;
    std::string fmqErrorMsg;
    if (!mIsInput) {
        bytes = std::min(bytes, mContext.getDataMQ()->availableToWrite());
        bytes = std::min(bytes,
                mContext.getDataMQ()->availableToWrite(&fmqError, &fmqErrorMsg));
    }
    StreamDescriptor::Command burst =
            StreamDescriptor::Command::make<StreamDescriptor::Command::Tag::burst>(bytes);
@@ -345,12 +348,14 @@ status_t StreamHalAidl::transfer(void *buffer, size_t bytes, size_t *transferred
        LOG_ALWAYS_FATAL_IF(*transferred > bytes,
                "%s: HAL module read %zu bytes, which exceeds requested count %zu",
                __func__, *transferred, bytes);
        if (auto toRead = mContext.getDataMQ()->availableToRead();
        if (auto toRead = mContext.getDataMQ()->availableToRead(&fmqError, &fmqErrorMsg);
                toRead != 0 && !mContext.getDataMQ()->read(static_cast<int8_t*>(buffer), toRead)) {
            ALOGE("%s: failed to read %zu bytes to data MQ", __func__, toRead);
            return NOT_ENOUGH_DATA;
        }
    }
    LOG_ALWAYS_FATAL_IF(fmqError != StreamContextAidl::DataMQ::Error::NONE,
            "%s", fmqErrorMsg.c_str());
    mStreamPowerLog.log(buffer, *transferred);
    return OK;
}
+2 −0
Original line number Diff line number Diff line
@@ -63,6 +63,8 @@ cc_library_shared {
        // BiquadFilter. Try the biquad_filter_benchmark test in audio_utils
        // with/without `-ffast-math` for more context.
        "-ffast-math",
        "-fhonor-infinities",
        "-fhonor-nans",
        "-fvisibility=hidden",
    ],
}
Loading