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

Commit bd719efa authored by Ping Tsai's avatar Ping Tsai Committed by MugaChi
Browse files

AudioPolicy: fix the invalidation in the spatializer output

selectOutput will not select spatializer output, so it may cause unnecessary invalidation

BUG: 386120059
Test:Manual
1. speaker playback spatial audio
2. connect btsco
3. check sound in speaker

Change-Id: I994cf9a203f3af161df567bcb65b8accad5541d9
parent 65ec1924
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -7476,6 +7476,9 @@ void AudioPolicyManager::checkOutputForAttributes(const audio_attributes_t &attr
        for (audio_io_handle_t srcOut : srcOutputs) {
            sp<SwAudioOutputDescriptor> desc = mPreviousOutputs.valueFor(srcOut);
            if (desc == nullptr) continue;
            if (desc == mSpatializerOutput && newDevices == oldDevices) {
                continue;
            }

            if (desc->isStrategyActive(psId) && maxLatency < desc->latency()) {
                maxLatency = desc->latency();