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

Skip to content
Commit f8a27c33 authored by Dariusz Budner's avatar Dariusz Budner
Browse files

Release audio patch just after it was created in case no waiting caller

3s timeout (error -110, TIMED_OUT) might happen during audio patch
creation in AudioCommandThread. In such case the caller (e.g. binder
transaction: AudioPolicyManager::startAudioSource() ->
connectAudioSource()) gets no valid handle and quits with error, while
AudioCommandThread keeps trying to finalize patch create.
In case AudioCommandThread succeeds (after 3s timeout), the handle
becomes lost while resources allocated by audio-hal during patch create
remain busy so next tries of creating audio patches fail (error -12,
NO_MEMORY).

To prevent from audio-hal resources leakage, release the audio patch
that nobody is waiting for just after it was created.

Test: Manual
Bug: https://partnerissuetracker.corp.google.com/issues/356095582
Change-Id: I7bee96541b03299d0f8cbd9d724ae217b9a66bb3
parent 6413b8bf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment