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

Skip to content
Commit 031daf24 authored by Henri Chataing's avatar Henri Chataing
Browse files

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
parent 83263864
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