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

Skip to content
Commit d5974e62 authored by Weiyin Jiang's avatar Weiyin Jiang Committed by Gerrit - the friendly Code Review server
Browse files

a2dp: fix race condition during a2dp suspend and reconfig

Device lock is released during a2dp suspend and re-config scenario,
which results into race condition.

Introduce a latch lock for the following reasons.
- We don't have to hold the out->lock that is too large granularity,
  if we only care about certain fields in stream structure.
  latch lock is of small granularity.
- out->lock can only be held after adev->lock, which makes it impossible
  to loop through the adev->usecase_list and operate on usecase streams.
  latch lock can be held after out->lock and adev->lock.

CRs-Fixed: 2770070
Change-Id: I58584820f924ce4c7e723899cb2595aa3adfd5b3
parent c6a85b81
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