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

Skip to content
Commit 1765c5b2 authored by François Gaffie's avatar François Gaffie Committed by Eric Laurent
Browse files

[BUG] AudioPolicy: fix AudioDeviceCallback



This CL fixes the AudioDeviceCallback that may report null device.
When an output is reused by a SwBridge, upon release of SW bridge patch,
releasing the patch of the Playback PatchTrack associated with the mixer thread
will clear its patch and output devices.
As the patch created for this output may not be recreated by AudioPolicyManager
if routing does not change (same device or none if no activity on output),
the device will not be updated, hence the AudioDeviceCallback will report null
device.
AudioPolicy will now force to recreate the output patch with same
handle and valid when the SwBridge is released.
 AudioFlinger will erase previous mixer output patch and reuse
hal patch handle to recreate/update the hal audio patch.

Bug: 187800339
Bug: 228083206

Test: run a SwBridge audio use case on primary output (e.g. FM Radio),
stop it, then play a stream on primary output.
Ensure AudioDeviceCallback is called with non null device.

Signed-off-by: default avatarFrancois Gaffie <francois.gaffie@renault.com>
Change-Id: I0b4f852280046cc596da9194cab4655316a026a4
Merged-In: I0b4f852280046cc596da9194cab4655316a026a4
(cherry picked from commit 7e39df23)
parent 72c96659
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment