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

Commit 9bcfa7c7 authored by Eric Laurent's avatar Eric Laurent
Browse files

audioflinger: fix reuse of audio HAL patch handle

Fix bug in PatchPanel::createAudioPatch() were the previous
audio HAL assigned patch handle was dropped when modifying an exiting
audio patch

Bug: 137300168
Test: manual test with USB headset insertion removal
Change-Id: Ie8345ca97502a2d7327535f0228e0ff0bc95f8e9
parent d203cb92
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -168,6 +168,7 @@ status_t AudioFlinger::PatchPanel::createAudioPatch(const struct audio_patch *pa
                if (hwDevice != 0) {
                    hwDevice->releaseAudioPatch(removedPatch.mHalHandle);
                }
                halHandle = removedPatch.mHalHandle;
            }
            mPatches.erase(iter);
            removeSoftwarePatchFromInsertedModules(*handle);