AudioFlinger: fix regression on device effect introduced locking order
The lock order has been enforced within AudioFlinger.
Order has been defined. However, the Device Effect does not follow
the same pattern as session effects.
Session:
Client -> EffectHandle -> ThreadBase_Mutex (or AudioFlinger Mutex)
Device:
(Default effect)
AudioFlinger -> DeviceEffectManager -> DeviceEffectProxy -> DeviceEffectHandle
(added by Fx App)
Client -> EffectHandle -> DeviceEffectProxy -> DeviceEffectHandle
-Can be addded automatically by AudioFlinger upon patch creation
-May be Added to Audio IDevice
-Can be enabled / disabled by AudioFx app via DeviceEffectProxy.
-Use internal device effect handle that are now controlled by application
diretly, preventing from risk of concurrent access (e.g. disconnect /
enabled status)
This CL intends to fix the locking order assertions by
-introducing a new lock for internal device effect Handle
-unlocking temporarily to prevent breaking the lock order.
Bug: 329395147
Test: atest CtsMediaAudioTestCases
Change-Id: I6667c3ef1b77708ccb4d644fd1b53a2fe3896b72
Merged-In: I6667c3ef1b77708ccb4d644fd1b53a2fe3896b72
Signed-off-by:
François Gaffie <francois.gaffie@renault.com>
Loading
Please register or sign in to comment