A2dpSrc: Added seperate synchronization for mAudioManager calls.
- Deadlock between btif thread and A2dpservice thread due to Setparams call has been blocked on lock mVariableLock. It has been happend in below way. When START done, A2dp is updating MM as TWSchannel mode would be “mono” through setparams call by acquiring mVariableLock in A2dpService thread. Then BTM_BLI_ACL_DOWN_EVT comes from stack is updating to App in btif thread and same is waiting for the lock mVariableLock in messageFromNative() API, which is the reason when MM sent disable_snd_device for bt-a2dp which calls audio_stream_stop_qti api from BT HAL, but not sent to btif thread because of btif thread stuck as mentioned above, which resulted in TimeCheck timeout. - Fixed the above deadlock in below way. Synchronize mAudioManager calls on seperate Lock, instead of mVariableLock. So, that it won't block btif thread for callbacks processes. - Also taken care synchronization of mBtAvrcpLock, and mBtA2dpLock CRs-Fixed: 2663821 Change-Id: Ia6247dcfb4964a8f6ccc67ec06407fc0500ad8b0
Loading
Please sign in to comment