Loading media/libaudiohal/impl/EffectConversionHelperAidl.cpp +5 −4 Original line number Diff line number Diff line Loading @@ -181,7 +181,7 @@ status_t EffectConversionHelperAidl::handleSetConfig(uint32_t cmdSize, const voi State state; RETURN_STATUS_IF_ERROR(statusTFromBinderStatus(mEffect->getState(&state))); if (state == State::INIT) { ALOGI("%s at state %s, opening effect with input %s output %s", __func__, ALOGD("%s at state %s, opening effect with input %s output %s", __func__, android::internal::ToString(state).c_str(), common.input.toString().c_str(), common.output.toString().c_str()); IEffect::OpenEffectReturn openReturn; Loading @@ -189,7 +189,8 @@ status_t EffectConversionHelperAidl::handleSetConfig(uint32_t cmdSize, const voi statusTFromBinderStatus(mEffect->open(common, std::nullopt, &openReturn))); updateMqsAndEventFlags(openReturn); } else if (mCommon != common) { ALOGI("%s at state %s, setParameter", __func__, android::internal::ToString(state).c_str()); ALOGV("%s at state %s, setCommonParameter %s", __func__, android::internal::ToString(state).c_str(), common.toString().c_str()); Parameter aidlParam = UNION_MAKE(Parameter, common, common); RETURN_STATUS_IF_ERROR(statusTFromBinderStatus(mEffect->setParameter(aidlParam))); } Loading Loading @@ -398,12 +399,12 @@ status_t EffectConversionHelperAidl::handleSetOffload(uint32_t cmdSize, const vo effect_offload_param_t* offload = (effect_offload_param_t*)pCmdData; // send to proxy to update active sub-effect if (mIsProxyEffect) { ALOGI("%s offload param offload %s ioHandle %d", __func__, ALOGV("%s offload param offload %s ioHandle %d", __func__, offload->isOffload ? "true" : "false", offload->ioHandle); const auto& effectProxy = std::static_pointer_cast<EffectProxy>(mEffect); RETURN_STATUS_IF_ERROR(statusTFromBinderStatus(effectProxy->setOffloadParam(offload))); if (mCommon.ioHandle != offload->ioHandle) { ALOGI("%s ioHandle update [%d to %d]", __func__, mCommon.ioHandle, offload->ioHandle); ALOGV("%s ioHandle update [%d to %d]", __func__, mCommon.ioHandle, offload->ioHandle); mCommon.ioHandle = offload->ioHandle; Parameter aidlParam = UNION_MAKE(Parameter, common, mCommon); RETURN_STATUS_IF_ERROR(statusTFromBinderStatus(mEffect->setParameter(aidlParam))); Loading media/libaudiohal/impl/EffectHalAidl.cpp +1 −3 Original line number Diff line number Diff line Loading @@ -198,7 +198,7 @@ status_t EffectHalAidl::process() { ::android::OK == efGroup->wait(kEventFlagDataMqUpdate, &efState, 1 /* ns */, true /* retry */) && efState & kEventFlagDataMqUpdate) { ALOGI("%s %s V%d receive dataMQUpdate eventFlag from HAL", __func__, effectName.c_str(), ALOGV("%s %s V%d receive dataMQUpdate eventFlag from HAL", __func__, effectName.c_str(), halVersion); mConversion->reopen(); } Loading Loading @@ -258,8 +258,6 @@ status_t EffectHalAidl::process() { accumulate_float(mOutBuffer->audioBuffer()->f32, outputRawBuffer, floatsToRead); } ALOGD("%s %s consumed %zu produced %zu", __func__, effectName.c_str(), floatsToWrite, floatsToRead); return OK; } Loading media/libaudiohal/impl/EffectProxy.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -147,7 +147,7 @@ ndk::ScopedAStatus EffectProxy::reopen(OpenEffectReturn* ret __unused) { // close all opened effects if failure if (!status.isOk()) { ALOGE("%s: closing all sub-effects with error %s", __func__, ALOGW("%s: closing all sub-effects with error %s", __func__, status.getDescription().c_str()); close(); } Loading Loading @@ -256,7 +256,7 @@ ndk::ScopedAStatus EffectProxy::runWithActiveSubEffectThenOthers( std::function<ndk::ScopedAStatus(const std::shared_ptr<IEffect>&)> const& func) { ndk::ScopedAStatus status = runWithActiveSubEffect(func); if (!status.isOk()) { ALOGE("%s active sub-effect return error %s", __func__, status.getDescription().c_str()); ALOGW("%s active sub-effect return error %s", __func__, status.getDescription().c_str()); } // proceed with others Loading @@ -265,7 +265,7 @@ ndk::ScopedAStatus EffectProxy::runWithActiveSubEffectThenOthers( continue; } if (!mSubEffects[i].handle) { ALOGE("%s null sub-effect interface for %s", __func__, ALOGW("%s null sub-effect interface for %s", __func__, mSubEffects[i].descriptor.common.id.uuid.toString().c_str()); continue; } Loading media/libaudiohal/impl/EffectsFactoryHalAidl.cpp +1 −7 Original line number Diff line number Diff line Loading @@ -120,8 +120,6 @@ status_t EffectsFactoryHalAidl::queryNumberEffects(uint32_t *pNumEffects) { } *pNumEffects = mEffectCount; ALOGD("%s %u non %zu proxyMap %zu proxyDesc %zu", __func__, *pNumEffects, mNonProxyDescList.size(), mProxyUuidDescriptorMap.size(), mProxyDescList.size()); return OK; } Loading Loading @@ -178,7 +176,7 @@ status_t EffectsFactoryHalAidl::createEffect(const effect_uuid_t* uuid, int32_t if (sessionId == AUDIO_SESSION_DEVICE && ioId == AUDIO_IO_HANDLE_NONE) { return INVALID_OPERATION; } ALOGI("%s session %d ioId %d", __func__, sessionId, ioId); ALOGV("%s session %d ioId %d", __func__, sessionId, ioId); AudioUuid aidlUuid = VALUE_OR_RETURN_STATUS(::aidl::android::legacy2aidl_audio_uuid_t_AudioUuid(*uuid)); Loading Loading @@ -218,13 +216,11 @@ status_t EffectsFactoryHalAidl::dumpEffects(int fd) { } status_t EffectsFactoryHalAidl::allocateBuffer(size_t size, sp<EffectBufferHalInterface>* buffer) { ALOGI("%s size %zu buffer %p", __func__, size, buffer); return EffectBufferHalAidl::allocate(size, buffer); } status_t EffectsFactoryHalAidl::mirrorBuffer(void* external, size_t size, sp<EffectBufferHalInterface>* buffer) { ALOGI("%s extern %p size %zu buffer %p", __func__, external, size, buffer); return EffectBufferHalAidl::mirror(external, size, buffer); } Loading @@ -245,7 +241,6 @@ status_t EffectsFactoryHalAidl::getHalDescriptorWithImplUuid(const AudioUuid& uu ALOGE("%s UUID not found in HAL and proxy list %s", __func__, toString(uuid).c_str()); return NAME_NOT_FOUND; } ALOGI("%s UUID impl found %s", __func__, toString(uuid).c_str()); *pDescriptor = VALUE_OR_RETURN_STATUS( ::aidl::android::aidl2legacy_Descriptor_effect_descriptor(*matchIt)); Loading @@ -267,7 +262,6 @@ status_t EffectsFactoryHalAidl::getHalDescriptorWithTypeUuid( ALOGW("%s UUID type not found in HAL and proxy list %s", __func__, toString(type).c_str()); return BAD_VALUE; } ALOGI("%s UUID type found %zu \n %s", __func__, result.size(), toString(type).c_str()); *descriptors = VALUE_OR_RETURN_STATUS( aidl::android::convertContainer<std::vector<effect_descriptor_t>>( Loading media/libaudiohal/impl/effectsAidlConversion/AidlConversionPresetReverb.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -71,7 +71,6 @@ status_t AidlConversionPresetReverb::setParameter(EffectParamReader& param) { status_t AidlConversionPresetReverb::getParameter(EffectParamWriter& param) { uint32_t type = 0; uint16_t value = 0; ALOGE("%s enter %s", __func__, param.toString().c_str()); if (!param.validateParamValueSize(sizeof(uint32_t), sizeof(uint16_t)) || OK != param.readFromParameter(&type)) { ALOGE("%s invalid param %s", __func__, param.toString().c_str()); Loading Loading
media/libaudiohal/impl/EffectConversionHelperAidl.cpp +5 −4 Original line number Diff line number Diff line Loading @@ -181,7 +181,7 @@ status_t EffectConversionHelperAidl::handleSetConfig(uint32_t cmdSize, const voi State state; RETURN_STATUS_IF_ERROR(statusTFromBinderStatus(mEffect->getState(&state))); if (state == State::INIT) { ALOGI("%s at state %s, opening effect with input %s output %s", __func__, ALOGD("%s at state %s, opening effect with input %s output %s", __func__, android::internal::ToString(state).c_str(), common.input.toString().c_str(), common.output.toString().c_str()); IEffect::OpenEffectReturn openReturn; Loading @@ -189,7 +189,8 @@ status_t EffectConversionHelperAidl::handleSetConfig(uint32_t cmdSize, const voi statusTFromBinderStatus(mEffect->open(common, std::nullopt, &openReturn))); updateMqsAndEventFlags(openReturn); } else if (mCommon != common) { ALOGI("%s at state %s, setParameter", __func__, android::internal::ToString(state).c_str()); ALOGV("%s at state %s, setCommonParameter %s", __func__, android::internal::ToString(state).c_str(), common.toString().c_str()); Parameter aidlParam = UNION_MAKE(Parameter, common, common); RETURN_STATUS_IF_ERROR(statusTFromBinderStatus(mEffect->setParameter(aidlParam))); } Loading Loading @@ -398,12 +399,12 @@ status_t EffectConversionHelperAidl::handleSetOffload(uint32_t cmdSize, const vo effect_offload_param_t* offload = (effect_offload_param_t*)pCmdData; // send to proxy to update active sub-effect if (mIsProxyEffect) { ALOGI("%s offload param offload %s ioHandle %d", __func__, ALOGV("%s offload param offload %s ioHandle %d", __func__, offload->isOffload ? "true" : "false", offload->ioHandle); const auto& effectProxy = std::static_pointer_cast<EffectProxy>(mEffect); RETURN_STATUS_IF_ERROR(statusTFromBinderStatus(effectProxy->setOffloadParam(offload))); if (mCommon.ioHandle != offload->ioHandle) { ALOGI("%s ioHandle update [%d to %d]", __func__, mCommon.ioHandle, offload->ioHandle); ALOGV("%s ioHandle update [%d to %d]", __func__, mCommon.ioHandle, offload->ioHandle); mCommon.ioHandle = offload->ioHandle; Parameter aidlParam = UNION_MAKE(Parameter, common, mCommon); RETURN_STATUS_IF_ERROR(statusTFromBinderStatus(mEffect->setParameter(aidlParam))); Loading
media/libaudiohal/impl/EffectHalAidl.cpp +1 −3 Original line number Diff line number Diff line Loading @@ -198,7 +198,7 @@ status_t EffectHalAidl::process() { ::android::OK == efGroup->wait(kEventFlagDataMqUpdate, &efState, 1 /* ns */, true /* retry */) && efState & kEventFlagDataMqUpdate) { ALOGI("%s %s V%d receive dataMQUpdate eventFlag from HAL", __func__, effectName.c_str(), ALOGV("%s %s V%d receive dataMQUpdate eventFlag from HAL", __func__, effectName.c_str(), halVersion); mConversion->reopen(); } Loading Loading @@ -258,8 +258,6 @@ status_t EffectHalAidl::process() { accumulate_float(mOutBuffer->audioBuffer()->f32, outputRawBuffer, floatsToRead); } ALOGD("%s %s consumed %zu produced %zu", __func__, effectName.c_str(), floatsToWrite, floatsToRead); return OK; } Loading
media/libaudiohal/impl/EffectProxy.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -147,7 +147,7 @@ ndk::ScopedAStatus EffectProxy::reopen(OpenEffectReturn* ret __unused) { // close all opened effects if failure if (!status.isOk()) { ALOGE("%s: closing all sub-effects with error %s", __func__, ALOGW("%s: closing all sub-effects with error %s", __func__, status.getDescription().c_str()); close(); } Loading Loading @@ -256,7 +256,7 @@ ndk::ScopedAStatus EffectProxy::runWithActiveSubEffectThenOthers( std::function<ndk::ScopedAStatus(const std::shared_ptr<IEffect>&)> const& func) { ndk::ScopedAStatus status = runWithActiveSubEffect(func); if (!status.isOk()) { ALOGE("%s active sub-effect return error %s", __func__, status.getDescription().c_str()); ALOGW("%s active sub-effect return error %s", __func__, status.getDescription().c_str()); } // proceed with others Loading @@ -265,7 +265,7 @@ ndk::ScopedAStatus EffectProxy::runWithActiveSubEffectThenOthers( continue; } if (!mSubEffects[i].handle) { ALOGE("%s null sub-effect interface for %s", __func__, ALOGW("%s null sub-effect interface for %s", __func__, mSubEffects[i].descriptor.common.id.uuid.toString().c_str()); continue; } Loading
media/libaudiohal/impl/EffectsFactoryHalAidl.cpp +1 −7 Original line number Diff line number Diff line Loading @@ -120,8 +120,6 @@ status_t EffectsFactoryHalAidl::queryNumberEffects(uint32_t *pNumEffects) { } *pNumEffects = mEffectCount; ALOGD("%s %u non %zu proxyMap %zu proxyDesc %zu", __func__, *pNumEffects, mNonProxyDescList.size(), mProxyUuidDescriptorMap.size(), mProxyDescList.size()); return OK; } Loading Loading @@ -178,7 +176,7 @@ status_t EffectsFactoryHalAidl::createEffect(const effect_uuid_t* uuid, int32_t if (sessionId == AUDIO_SESSION_DEVICE && ioId == AUDIO_IO_HANDLE_NONE) { return INVALID_OPERATION; } ALOGI("%s session %d ioId %d", __func__, sessionId, ioId); ALOGV("%s session %d ioId %d", __func__, sessionId, ioId); AudioUuid aidlUuid = VALUE_OR_RETURN_STATUS(::aidl::android::legacy2aidl_audio_uuid_t_AudioUuid(*uuid)); Loading Loading @@ -218,13 +216,11 @@ status_t EffectsFactoryHalAidl::dumpEffects(int fd) { } status_t EffectsFactoryHalAidl::allocateBuffer(size_t size, sp<EffectBufferHalInterface>* buffer) { ALOGI("%s size %zu buffer %p", __func__, size, buffer); return EffectBufferHalAidl::allocate(size, buffer); } status_t EffectsFactoryHalAidl::mirrorBuffer(void* external, size_t size, sp<EffectBufferHalInterface>* buffer) { ALOGI("%s extern %p size %zu buffer %p", __func__, external, size, buffer); return EffectBufferHalAidl::mirror(external, size, buffer); } Loading @@ -245,7 +241,6 @@ status_t EffectsFactoryHalAidl::getHalDescriptorWithImplUuid(const AudioUuid& uu ALOGE("%s UUID not found in HAL and proxy list %s", __func__, toString(uuid).c_str()); return NAME_NOT_FOUND; } ALOGI("%s UUID impl found %s", __func__, toString(uuid).c_str()); *pDescriptor = VALUE_OR_RETURN_STATUS( ::aidl::android::aidl2legacy_Descriptor_effect_descriptor(*matchIt)); Loading @@ -267,7 +262,6 @@ status_t EffectsFactoryHalAidl::getHalDescriptorWithTypeUuid( ALOGW("%s UUID type not found in HAL and proxy list %s", __func__, toString(type).c_str()); return BAD_VALUE; } ALOGI("%s UUID type found %zu \n %s", __func__, result.size(), toString(type).c_str()); *descriptors = VALUE_OR_RETURN_STATUS( aidl::android::convertContainer<std::vector<effect_descriptor_t>>( Loading
media/libaudiohal/impl/effectsAidlConversion/AidlConversionPresetReverb.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -71,7 +71,6 @@ status_t AidlConversionPresetReverb::setParameter(EffectParamReader& param) { status_t AidlConversionPresetReverb::getParameter(EffectParamWriter& param) { uint32_t type = 0; uint16_t value = 0; ALOGE("%s enter %s", __func__, param.toString().c_str()); if (!param.validateParamValueSize(sizeof(uint32_t), sizeof(uint16_t)) || OK != param.readFromParameter(&type)) { ALOGE("%s invalid param %s", __func__, param.toString().c_str()); Loading