btif_a2dp_source: Schedule internal calls to bt_main_thread
Currently all internal calls of the btif_a2dp_source module are being scheduled to the bt_a2dp_source_worker_thread, which also runs the audio encoder. This is causing many races with the bta_av_co module which runs on the bt_main_thread. This change pushes all of the internal calls to the main thread to keep only the encoder running in the worker thread. The only drawback is the required addition of a mutex to control access to the internal variables between the main and worker threads. Bug: 374166531 Bug: 352246888 Test: m com.android.btservices Test: Manual streaming tests Flag: com.android.bluetooth.flags.a2dp_source_threading_fix Change-Id: Ib49931404258f016f54e46f54842988608e271bf
Loading
Please register or sign in to comment