Lines Matching refs:effect

1598 AudioFlinger::EffectHandle::EffectHandle(const sp<EffectBase>& effect,  in EffectHandle()  argument
1603 mEffect(effect), mEffectClient(effectClient), mClient(client), mCblk(NULL), in EffectHandle()
1639 sp<EffectBase> effect = mEffect.promote(); in enable() local
1640 if (effect == 0 || mDisconnected) { in enable()
1653 status_t status = effect->updatePolicyState(); in enable()
1659 effect->checkSuspendOnEffectEnabled(true, false /*threadLocked*/); in enable()
1662 if (effect->suspended()) { in enable()
1666 status = effect->setEnabled(true, true /*fromHandle*/); in enable()
1677 sp<EffectBase> effect = mEffect.promote(); in disable() local
1678 if (effect == 0 || mDisconnected) { in disable()
1690 effect->updatePolicyState(); in disable()
1692 if (effect->suspended()) { in disable()
1696 status_t status = effect->setEnabled(false, true /*fromHandle*/); in disable()
1718 sp<EffectBase> effect = mEffect.promote(); in disconnect() local
1719 if (effect != 0) { in disconnect()
1720 if (effect->disconnectHandle(this, unpinIfLast) > 0) { in disconnect()
1724 effect->updatePolicyState(); in disconnect()
1786 sp<EffectBase> effect = mEffect.promote(); in command() local
1787 if (effect == 0 || mDisconnected) { in command()
1846 status_t ret = effect->command(EFFECT_CMD_SET_PARAM, in command()
1877 return effect->command(cmdCode, cmdSize, pCmdData, replySize, pReplyData); in command()
2083 status_t AudioFlinger::EffectChain::createEffect_l(sp<EffectModule>& effect, in createEffect_l() argument
2090 effect = new EffectModule(mEffectCallback, desc, id, sessionId, pinned, AUDIO_PORT_HANDLE_NONE); in createEffect_l()
2091 status_t lStatus = effect->status(); in createEffect_l()
2093 lStatus = addEffect_ll(effect); in createEffect_l()
2096 effect.clear(); in createEffect_l()
2102 status_t AudioFlinger::EffectChain::addEffect_l(const sp<EffectModule>& effect) in addEffect_l() argument
2105 return addEffect_ll(effect); in addEffect_l()
2108 status_t AudioFlinger::EffectChain::addEffect_ll(const sp<EffectModule>& effect) in addEffect_ll() argument
2110 effect_descriptor_t desc = effect->desc(); in addEffect_ll()
2113 effect->setCallback(mEffectCallback); in addEffect_ll()
2118 mEffects.insertAt(effect, 0); in addEffect_ll()
2134 effect->setInBuffer(halBuffer); in addEffect_ll()
2137 effect->setOutBuffer(mInBuffer); in addEffect_ll()
2202 effect->setInBuffer(mInBuffer); in addEffect_ll()
2211 effect->setOutBuffer(mOutBuffer); in addEffect_ll()
2213 effect->setOutBuffer(mInBuffer); in addEffect_ll()
2215 mEffects.insertAt(effect, idx_insert); in addEffect_ll()
2217 ALOGV("addEffect_l() effect %p, added in chain %p at rank %zu", effect.get(), this, in addEffect_ll()
2220 effect->configure(); in addEffect_ll()
2226 size_t AudioFlinger::EffectChain::removeEffect_l(const sp<EffectModule>& effect, in removeEffect_l() argument
2231 uint32_t type = effect->desc().flags & EFFECT_FLAG_TYPE_MASK; in removeEffect_l()
2234 if (effect == mEffects[i]) { in removeEffect_l()
2253 ALOGV("removeEffect_l() effect %p, removed from chain %p at rank %zu", effect.get(), in removeEffect_l()
2411 sp<EffectModule> effect = mEffects[i]; in dump() local
2412 if (effect != 0) { in dump()
2413 effect->dump(fd, args); in dump()
2444 sp<EffectModule> effect = getEffectIfEnabled(type); in setEffectSuspended_l() local
2445 if (effect != 0) { in setEffectSuspended_l()
2446 desc->mEffect = effect; in setEffectSuspended_l()
2447 effect->setSuspended(true); in setEffectSuspended_l()
2448 effect->setEnabled(false, false /*fromHandle*/); in setEffectSuspended_l()
2464 sp<EffectModule> effect = desc->mEffect.promote(); in setEffectSuspended_l() local
2465 if (effect != 0) { in setEffectSuspended_l()
2466 effect->setSuspended(false); in setEffectSuspended_l()
2467 effect->lock(); in setEffectSuspended_l()
2468 EffectHandle *handle = effect->controlHandle_l(); in setEffectSuspended_l()
2470 effect->setEnabled_l(handle->enabled()); in setEffectSuspended_l()
2472 effect->unlock(); in setEffectSuspended_l()
2575 sp<EffectModule> effect = getEffectFromType_l(type); in getEffectIfEnabled() local
2576 return effect != 0 && effect->isEnabled() ? effect : 0; in getEffectIfEnabled()
2579 void AudioFlinger::EffectChain::checkSuspendOnEffectEnabled(const sp<EffectModule>& effect, in checkSuspendOnEffectEnabled() argument
2582 ssize_t index = mSuspendedEffects.indexOfKey(effect->desc().type.timeLow); in checkSuspendOnEffectEnabled()
2590 if (!isEffectEligibleForSuspend(effect->desc())) { in checkSuspendOnEffectEnabled()
2593 setEffectSuspended_l(&effect->desc().type, enabled); in checkSuspendOnEffectEnabled()
2594 index = mSuspendedEffects.indexOfKey(effect->desc().type.timeLow); in checkSuspendOnEffectEnabled()
2601 effect->desc().type.timeLow); in checkSuspendOnEffectEnabled()
2605 desc->mEffect = effect; in checkSuspendOnEffectEnabled()
2606 effect->setEnabled(false, false /*fromHandle*/); in checkSuspendOnEffectEnabled()
2607 effect->setSuspended(true); in checkSuspendOnEffectEnabled()
2614 effect->desc().type.timeLow); in checkSuspendOnEffectEnabled()
2617 effect->setSuspended(false); in checkSuspendOnEffectEnabled()
2667 for (const auto &effect : mEffects) { in isRawCompatible() local
2668 if (effect->isProcessImplemented()) { in isRawCompatible()
2679 for (const auto &effect : mEffects) { in isFastCompatible() local
2680 if (effect->isProcessImplemented() in isFastCompatible()
2681 && effect->isImplementationSoftware()) { in isFastCompatible()
2704 sp<EffectHalInterface> *effect) { in createEffectHal() argument
2712 status = effectsFactory->createEffect(pEffectUuid, sessionId, io(), deviceId, effect); in createEffectHal()
2718 const sp<AudioFlinger::EffectBase>& effect) { in updateOrphanEffectChains() argument
2724 return af->updateOrphanEffectChains(effect->asEffectModule()); in updateOrphanEffectChains()
2735 sp<EffectHalInterface> effect) { in addEffectToHal() argument
2745 result = st->addEffect(effect); in addEffectToHal()
2751 sp<EffectHalInterface> effect) { in removeEffectFromHal() argument
2761 result = st->removeEffect(effect); in removeEffectFromHal()
2855 const sp<EffectBase>& effect, bool enabled, bool threadLocked) { in checkSuspendOnEffectEnabled() argument
2860 t->checkSuspendOnEffectEnabled(enabled, effect->sessionId(), threadLocked); in checkSuspendOnEffectEnabled()
2867 c->checkSuspendOnEffectEnabled(effect->asEffectModule(), enabled); in checkSuspendOnEffectEnabled()
2870 void AudioFlinger::EffectChain::EffectCallback::onEffectEnable(const sp<EffectBase>& effect) { in onEffectEnable() argument
2876 t->onEffectEnable(effect->asEffectModule()); in onEffectEnable()
2879 void AudioFlinger::EffectChain::EffectCallback::onEffectDisable(const sp<EffectBase>& effect) { in onEffectDisable() argument
2880 checkSuspendOnEffectEnabled(effect, false, false /*threadLocked*/); in onEffectDisable()
3060 size_t AudioFlinger::DeviceEffectProxy::removeEffect(const sp<EffectModule>& effect) in removeEffect() argument
3063 if (effect == mHalEffect) { in removeEffect()
3071 sp<EffectHalInterface> effect) { in addEffectToHal() argument
3076 mDevicePort.id, mDevicePort.ext.device.hw_module, effect); in addEffectToHal()
3080 sp<EffectHalInterface> effect) { in removeEffectFromHal() argument
3085 mDevicePort.id, mDevicePort.ext.device.hw_module, effect); in removeEffectFromHal()
3145 sp<EffectBase> effect = iter.second->effect().promote(); in dump() local
3146 if (effect != nullptr) { in dump()
3147 effect->dump(fd, args); in dump()
3166 sp<EffectBase> effectBase = handle->effect().promote(); in disconnectEffectHandle()
3171 sp<EffectModule> effect = effectBase->asEffectModule(); in disconnectEffectHandle() local
3172 if (effect == nullptr) { in disconnectEffectHandle()
3177 bool remove = (effect->removeHandle(handle) == 0) && (!effect->isPinned() || unpinIfLast); in disconnectEffectHandle()
3181 proxy->removeEffect(effect); in disconnectEffectHandle()
3192 sp<EffectHalInterface> *effect) { in createEffectHal() argument
3193 return mManagerCallback->createEffectHal(pEffectUuid, sessionId, deviceId, effect); in createEffectHal()
3197 sp<EffectHalInterface> effect) { in addEffectToHal() argument
3202 return proxy->addEffectToHal(effect); in addEffectToHal()
3206 sp<EffectHalInterface> effect) { in removeEffectFromHal() argument
3211 return proxy->addEffectToHal(effect); in removeEffectFromHal()