Lines Matching defs:effect

87 // 0; but one side effect of this is to turn all LOGV's as well.  Some messages
1074 ALOGV("updateSuspendedSessions_l() suspend adding effect %08x", key);
1083 ALOGV("updateSuspendedSessions_l() restore removing effect %08x", key);
1097 void AudioFlinger::ThreadBase::checkSuspendOnEffectEnabled(const sp<EffectModule>& effect,
1102 checkSuspendOnEffectEnabled_l(effect, enabled, sessionId);
1105 void AudioFlinger::ThreadBase::checkSuspendOnEffectEnabled_l(const sp<EffectModule>& effect,
1110 // suspend all effects in AUDIO_SESSION_OUTPUT_MIX when enabling any effect on
1111 // another session. This gives the priority to well behaved effect control panels
1122 chain->checkSuspendOnEffectEnabled(effect, enabled);
1130 // No global effect sessions on record threads
1132 ALOGW("checkEffectCompatibility_l(): global effect %s on record thread %s",
1138 ALOGW("checkEffectCompatibility_l(): non pre processing effect %s on record thread %s",
1151 ALOGW("checkEffectCompatibility_l(): effect %s on record thread %s in raw mode",
1156 ALOGW("checkEffectCompatibility_l(): non HW effect %s on record thread %s in fast mode",
1170 ALOGW("checkEffectCompatibility_l(): pre processing effect %s created on playback"
1183 // Reject any effect on mixer multichannel sinks.
1186 ALOGW("checkEffectCompatibility_l(): effect %s for multichannel(%d) on MIXER"
1201 ALOGW("checkEffectCompatibility_l(): non post processing effect %s not allowed"
1213 ALOGW("checkEffectCompatibility_l(): effect %s on playback thread in raw mode",
1218 ALOGW("checkEffectCompatibility_l(): non HW effect %s on playback thread"
1225 // nothing actionable on offload threads, if the effect:
1226 // - is offloadable: the effect can be created
1227 // - is NOT offloadable: the effect should still be created, but EffectHandle::enable()
1231 // Reject any effect on Direct output threads for now, since the format of
1232 // mSinkBuffer is not guaranteed to be compatible with effect processing (PCM 16 stereo).
1233 ALOGW("checkEffectCompatibility_l(): effect %s on DIRECT output thread %s",
1238 // Reject any effect on mixer multichannel sinks.
1241 ALOGW("checkEffectCompatibility_l(): effect %s for multichannel(%d)"
1247 ALOGW("checkEffectCompatibility_l(): global effect %s on DUPLICATING"
1252 ALOGW("checkEffectCompatibility_l(): post processing effect %s on"
1257 ALOGW("checkEffectCompatibility_l(): HW tunneled effect %s on"
1280 sp<EffectModule> effect;
1295 ALOGV("createEffect_l() thread %p effect %s on session %d", this, desc->name, sessionId);
1305 // check for existing effect chain with the requested audio session
1309 ALOGV("createEffect_l() new effect chain for session %d", sessionId);
1315 effect = chain->getEffectFromDesc_l(desc);
1318 ALOGV("createEffect_l() got effect %p on chain %p", effect.get(), chain.get());
1320 if (effect == 0) {
1329 // create a new effect module if none present in the chain
1330 lStatus = chain->createEffect_l(effect, this, desc, effectId, sessionId, pinned);
1336 effect->setDevice(mOutDevice);
1337 effect->setDevice(mInDevice);
1338 effect->setMode(mAudioFlinger->getMode());
1339 effect->setAudioSource(mAudioSource);
1341 // create effect handle and connect it to effect module
1342 handle = new EffectHandle(effect, client, effectClient, priority);
1345 lStatus = effect->addHandle(handle.get());
1348 *enabled = (int)effect->isEnabled();
1356 chain->removeEffect_l(effect);
1375 sp<EffectModule> effect;
1379 effect = handle->effect().promote();
1380 if (effect == 0) {
1384 remove = (effect->removeHandle(handle) == 0) && (!effect->isPinned() || unpinIfLast);
1386 removeEffect_l(effect, true);
1390 mAudioFlinger->updateOrphanEffectChains(effect);
1391 AudioSystem::unregisterEffect(effect->id());
1393 checkSuspendOnEffectEnabled(effect, false, effect->sessionId());
1414 status_t AudioFlinger::ThreadBase::addEffect_l(const sp<EffectModule>& effect)
1416 // check for existing effect chain with the requested audio session
1417 audio_session_t sessionId = effect->sessionId();
1421 ALOGD_IF((mType == OFFLOAD) && !effect->isOffloadable(),
1422 "addEffect_l() on offloaded thread %p: effect %s does not support offload flags %#x",
1423 this, effect->desc().name, effect->desc().flags);
1427 ALOGV("addEffect_l() new effect chain for session %d", sessionId);
1433 ALOGV("addEffect_l() %p chain %p effect %p", this, chain.get(), effect.get());
1435 if (chain->getEffectFromId_l(effect->id()) != 0) {
1436 ALOGW("addEffect_l() %p effect %s already present in chain %p",
1437 this, effect->desc().name, chain.get());
1441 effect->setOffloaded(mType == OFFLOAD, mId);
1443 status_t status = chain->addEffect_l(effect);
1451 effect->setDevice(mOutDevice);
1452 effect->setDevice(mInDevice);
1453 effect->setMode(mAudioFlinger->getMode());
1454 effect->setAudioSource(mAudioSource);
1459 void AudioFlinger::ThreadBase::removeEffect_l(const sp<EffectModule>& effect, bool release) {
1461 ALOGV("%s %p effect %p", __FUNCTION__, this, effect.get());
1462 effect_descriptor_t desc = effect->desc();
1464 detachAuxEffect_l(effect->id());
1467 sp<EffectChain> chain = effect->chain().promote();
1469 // remove effect chain if removing last effect
1470 if (chain->removeEffect_l(effect, release) == 0) {
1474 ALOGW("removeEffect_l() %p cannot promote chain for effect %p", this, effect.get());
1944 ALOGV("AUDIO_OUTPUT_FLAGS denied by effect, session=%d old=%#x new=%#x",
2612 // force reconfiguration of effect chains and engines to take new buffer size and audio
2615 // but in this case nothing is done below as no audio sessions have effect yet so it doesn't
2617 // create a copy of mEffectChains as calling moveEffectChain_l() can reorder some effect chains
2908 // TODO: should we decActiveTrackCnt() of the cleared track effect chain?
2984 // Only one effect chain can be present in direct output thread and it uses
3023 // Effect chain for session AUDIO_SESSION_OUTPUT_STAGE is inserted at end of effect
3030 // Effect chain for other sessions are inserted at beginning of effect
3097 sp<EffectModule> effect = getEffect_l(AUDIO_SESSION_OUTPUT_MIX, EffectId);
3098 if (effect != 0) {
3099 if ((effect->desc().flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_AUXILIARY) {
3100 track->setAuxBuffer(EffectId, (int32_t *)effect->inBuffer());
3351 // prevent any changes in effect chain list and in each effect chain
3352 // during mixing and effect process as the audio buffers could be deleted
3353 // or modified if an effect is created or deleted
3414 // Process effect chains for offloaded thread even if no audio
3415 // was read from audio track: process only updates effect state
3429 //ALOGV("writing effect buffer to sink buffer format %#x", mFormat);
3440 // enable changes in effect chain
4213 // TODO add standby time extension fct of effect tail
4244 // Delegate master volume control to effect in output mix effect chain if needed
4510 // there is an effect chain connected to the track
4518 // Delegate volume control to effect in track effect chain if needed
4522 ALOGW("prepareTracks_l(): track %d attached to effect but no chain found on "
4579 // then derive vl and vr as U8.24 versions for the effect chain
4596 // Delegate volume control to effect in track effect chain if needed
4598 // Do not ramp volume if volume is controlled by effect
4606 // from effect chain to avoid volume spike
4731 // clear effect chain input buffer if an active track underruns to avoid sending
4846 // passing a non-clean buffer to the effect chain
4850 // effect chain as in this case the mixer will not write to the sink or mix buffer
5149 // Delegate volume control to effect in track effect chain if needed
5150 // only one effect chain can be present on DirectOutputThread, so if
5288 // clear effect chain input buffer if the last active track started underruns
6558 // thread mutex is not locked, but effect chain is locked
6839 // enable changes in effect chain
6987 ALOGV("%p AUDIO_INPUT_FLAGS denied by effect old=%#x new=%#x",
8257 // enable changes in effect chain
8564 // No global effect sessions on mmap threads
8566 ALOGW("checkEffectCompatibility_l(): global effect %s on record thread %s",
8572 ALOGW("checkEffectCompatibility_l(): non pre processing effect %s on capture mmap thread",
8577 ALOGW("checkEffectCompatibility_l(): pre processing effect %s created on playback mmap "
8769 // Delegate volume control to effect in track effect chain if needed
8770 // only one effect chain can be present on DirectOutputThread, so if