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

Skip to content
Commit 79c5661c authored by Chris Thornton's avatar Chris Thornton
Browse files

Avoid deadlock between recognition events and SoundTriggerHwService.

If an event is generated from the HAL on a separate thread, it is
possible to enter a deadlocked state. This is due to the HAL typically
holding a lock when it starts the callback, which then needed to grab
the SoundTriggerHwService's main lock. However, if there was another
call coming down from somewhere else in the framework, it typically
tries to grab the service's main lock, then enter the HAL (which also
will likely try to grab a lock).

By removing the need to grab the mServiceLock on any of the paths that
respond to events generated by the HAL, this deadlock can be avoided.

Test: Manually on device.
Change-Id: Iac5f96ea67f618ce70e7f75300165f3588613947
parent 068ba821
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