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

Commit 57e6f065 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Avoid create preprocessing effect for playback thread" into udc-dev am: d942cea7

parents b292d840 d942cea7
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -3407,12 +3407,20 @@ status_t AudioFlinger::DeviceEffectProxy::checkPort(const PatchPanel::Patch& pat
    } else if (patch.isSoftware() || patch.thread().promote() != nullptr) {
    } else if (patch.isSoftware() || patch.thread().promote() != nullptr) {
        sp <ThreadBase> thread;
        sp <ThreadBase> thread;
        if (audio_port_config_has_input_direction(port)) {
        if (audio_port_config_has_input_direction(port)) {
            if ((mDescriptor.flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_POST_PROC) {
                ALOGI("%s don't create postprocessing effect on record thread", __func__);
                return NAME_NOT_FOUND;
            }
            if (patch.isSoftware()) {
            if (patch.isSoftware()) {
                thread = patch.mRecord.thread();
                thread = patch.mRecord.thread();
            } else {
            } else {
                thread = patch.thread().promote();
                thread = patch.thread().promote();
            }
            }
        } else {
        } else {
            if ((mDescriptor.flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_PRE_PROC) {
                ALOGI("%s don't create preprocessing effect on playback thread", __func__);
                return NAME_NOT_FOUND;
            }
            if (patch.isSoftware()) {
            if (patch.isSoftware()) {
                thread = patch.mPlayback.thread();
                thread = patch.mPlayback.thread();
            } else {
            } else {