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

Commit 40f7b9a4 authored by Shunkai Yao's avatar Shunkai Yao Committed by Automerger Merge Worker
Browse files

Merge "Add replySize for EFFECT_CMD_RESET to align with other commands" into...

Merge "Add replySize for EFFECT_CMD_RESET to align with other commands" into main am: c5441018 am: da2fbfa9 am: ba3942a7

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/2758285



Change-Id: I6d3b17f812061646e9155535f6ba990e70391463
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents d8f137b8 ba3942a7
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -255,37 +255,37 @@ status_t EffectConversionHelperAidl::handleGetConfig(uint32_t cmdSize __unused,
status_t EffectConversionHelperAidl::handleReset(uint32_t cmdSize __unused,
                                                 const void* pCmdData __unused, uint32_t* replySize,
                                                 void* pReplyData) {
    if (!replySize || !pReplyData) {
    if (!replySize || *replySize != sizeof(int) || !pReplyData) {
        ALOGE("%s parameter invalid, replySize %s pReplyData %p", __func__,
              numericPointerToString(replySize).c_str(), pReplyData);
        return BAD_VALUE;
    }

    return statusTFromBinderStatus(mEffect->command(CommandId::RESET));
    return *(int *)pReplyData = statusTFromBinderStatus(mEffect->command(CommandId::RESET));
}

status_t EffectConversionHelperAidl::handleEnable(uint32_t cmdSize __unused,
                                                  const void* pCmdData __unused,
                                                  uint32_t* replySize, void* pReplyData) {
    if (!replySize || !pReplyData) {
    if (!replySize || *replySize != sizeof(int) || !pReplyData) {
        ALOGE("%s parameter invalid, replySize %s pReplyData %p", __func__,
              numericPointerToString(replySize).c_str(), pReplyData);
        return BAD_VALUE;
    }

    return statusTFromBinderStatus(mEffect->command(CommandId::START));
    return *(int *)pReplyData = statusTFromBinderStatus(mEffect->command(CommandId::START));
}

status_t EffectConversionHelperAidl::handleDisable(uint32_t cmdSize __unused,
                                                   const void* pCmdData __unused,
                                                   uint32_t* replySize, void* pReplyData) {
    if (!replySize || !pReplyData) {
    if (!replySize || *replySize != sizeof(int) || !pReplyData) {
        ALOGE("%s parameter invalid, replySize %s pReplyData %p", __func__,
              numericPointerToString(replySize).c_str(), pReplyData);
        return BAD_VALUE;
    }

    return statusTFromBinderStatus(mEffect->command(CommandId::STOP));
    return *(int *)pReplyData = statusTFromBinderStatus(mEffect->command(CommandId::STOP));
}

status_t EffectConversionHelperAidl::handleSetAudioSource(uint32_t cmdSize, const void* pCmdData,
+4 −1
Original line number Diff line number Diff line
@@ -829,7 +829,10 @@ void EffectModule::reset_l()
    if (mStatus != NO_ERROR || mEffectInterface == 0) {
        return;
    }
    mEffectInterface->command(EFFECT_CMD_RESET, 0, NULL, 0, NULL);

    int reply = 0;
    uint32_t replySize = sizeof(reply);
    mEffectInterface->command(EFFECT_CMD_RESET, 0, NULL, &replySize, &reply);
}

status_t EffectModule::configure()