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
Loading
Please register or sign in to comment