diff options
author | Ytai Ben-Tsvi <ytai@google.com> | 2020-02-13 16:24:56 -0800 |
---|---|---|
committer | Ytai Ben-Tsvi <ytai@google.com> | 2020-02-14 10:43:36 -0800 |
commit | 406619f4f32a2210e01c6b2c4752615213052079 (patch) | |
tree | 4886d9930760daf89c9191fa16c160010ed11833 /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | 54e0f0a3ec8c597482016bd711c6b928e9f13311 (diff) |
Avoid risk of deadlock between APM and sound trigger
Sound trigger calls into audio policy manager (APM) for the sake of
allocating and releasing audio sessions.
APM calls into sound trigger for the sake of notifying it of
external capture session start/end.
Both calls are essentially synchronous, i.e. required for the
completion of the operations that trigger them.
Since both services use coarse locks to protect their state, if both
those calls happen concurrently, a deadlock would result.
The fix is to invoke
AudioPolicyManager::{acquire/release}SoundTriggerSession()
outside of the critical section of SoundTriggerModule.
Bug: 148691451
Change-Id: I157367b9e43963e37344958e1647e9f6c29d5e6e
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions