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

Skip to content
Commit de2ba72b authored by Cheney Ni's avatar Cheney Ni
Browse files

A2DP: Do AV suspend / stop at the stack main thread

Because Bluetooth stack cleaned up peers at its main thread, there would
be a race condition if audio HAL asked to suspend / stop the stream at
the same time. These tasks were handled by the called-in thread like
HwBinder, and was segmentation fault since peers were cleaned. This CL
moves audio control tasks to the stack main thread to prevent it.

Besides, this CL also modified the check of audio HAL A2DP CMDs:
* A2DP_Start should be successful if streaming already, and is because
  we only have this HAL as our input. It did not make scense to have
  streaming without a provider.
* A2DP_Stop should not check whether the media tick was scheduled or not
  for a hardware offloading case.

Bug: 139646747
Bug: 144067743
Test: A2DP playback
Change-Id: I736b308628b0da75ceb91e57cfe1854c6767233d
parent 7d6b5ace
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment