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

Commit 65852acc authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "audio policy: clean up initial spatializer audio patch" into main am: 0bc77fba

parents c9be946d 0bc77fba
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -6397,6 +6397,15 @@ void AudioPolicyManager::onNewAudioModulesAvailableInt(DeviceVector *newDevices)
        if ((desc->mFlags & AUDIO_OUTPUT_FLAG_SPATIALIZER) != 0
                && !isOutputOnlyAvailableRouteToSomeDevice(desc)) {
            outputsClosed.push_back(desc->mIoHandle);
            nextAudioPortGeneration();
            ssize_t index = mAudioPatches.indexOfKey(desc->getPatchHandle());
            if (index >= 0) {
                sp<AudioPatch> patchDesc = mAudioPatches.valueAt(index);
                (void) /*status_t status*/ mpClientInterface->releaseAudioPatch(
                            patchDesc->getAfHandle(), 0);
                mAudioPatches.removeItemsAt(index);
                mpClientInterface->onAudioPatchListUpdate();
            }
            desc->close();
        }
    }