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

Commit 3e4de776 authored by Eric Laurent's avatar Eric Laurent
Browse files

audioflinger: enable volume listener on direct outputs

Always allow effects with no process function on any output
thread type as there is no impact on performance and no risk of
the audio properties not being supported by the effect.

Bug: 63015903
Test: place a Skype call over SCO and verify the volume listener
can be created.

Change-Id: I99db7802cec88a618808e500b74f4c78165199fe
parent 719e24e8
Loading
Loading
Loading
Loading
+5 −4
Original line number Original line Diff line number Diff line
@@ -1169,6 +1169,11 @@ status_t AudioFlinger::PlaybackThread::checkEffectCompatibility_l(
        return BAD_VALUE;
        return BAD_VALUE;
    }
    }


    // always allow effects without processing load or latency
    if ((desc->flags & EFFECT_FLAG_NO_PROCESS_MASK) == EFFECT_FLAG_NO_PROCESS) {
        return NO_ERROR;
    }

    switch (mType) {
    switch (mType) {
    case MIXER: {
    case MIXER: {
        // Reject any effect on mixer multichannel sinks.
        // Reject any effect on mixer multichannel sinks.
@@ -1199,10 +1204,6 @@ status_t AudioFlinger::PlaybackThread::checkEffectCompatibility_l(
                }
                }
            }
            }


            // always allow effects without processing load or latency
            if ((desc->flags & EFFECT_FLAG_NO_PROCESS_MASK) == EFFECT_FLAG_NO_PROCESS) {
                break;
            }
            if (flags & AUDIO_OUTPUT_FLAG_RAW) {
            if (flags & AUDIO_OUTPUT_FLAG_RAW) {
                ALOGW("checkEffectCompatibility_l(): effect %s on playback thread in raw mode",
                ALOGW("checkEffectCompatibility_l(): effect %s on playback thread in raw mode",
                      desc->name);
                      desc->name);