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

Commit 04782aa1 authored by Eric Laurent's avatar Eric Laurent Committed by Automerger Merge Worker
Browse files

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

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/av/+/11709956

Change-Id: Id2bc18ac3421dab817cd168a8c840b2a89ca38b0
parents 5d089a85 a9d76405
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*/),