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

Commit a9d76405 authored by Eric Laurent's avatar Eric Laurent Committed by Android (Google) Code Review
Browse files

Merge "AudioPolicy: manager: fix patch list growing up" into rvc-dev

parents 044eaa62 8e544543
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -3820,7 +3820,11 @@ status_t AudioPolicyManager::releaseAudioPatchInternal(audio_patch_handle_t hand
                    ALOGE("%s output not found for id %d", __func__, patch->sources[0].id);
                    return BAD_VALUE;
                }
                // Reset handle so that setOutputDevice will force new AF patch to reach the sink
                if (patchDesc->getHandle() != outputDesc->getPatchHandle()) {
                    // force SwOutput patch removal as AF counter part patch has already gone.
                    ALOGV("%s reset patch handle on Output as different from SWBridge", __func__);
                    removeAudioPatch(outputDesc->getPatchHandle());
                }
                outputDesc->setPatchHandle(AUDIO_PATCH_HANDLE_NONE);
                setOutputDevices(outputDesc,
                                 getNewOutputDevices(outputDesc, true /*fromCache*/),