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

Skip to content
Commit ed42483c authored by Łukasz Rymanowski's avatar Łukasz Rymanowski
Browse files

leaudio: Fix Audio HAL startRequest

This patch fix possible race on startRequest.

It could happen that ConfirmStreamingRequest is called in the main
thread before, StartRequest() ends and sets pending flag.

That could lead to incorrect Bluetooth Audio Hal state - stay in
STARTING state.

08-30 11:14:06.921114  8896 11089 I bt_stack: [INFO:le_audio_software_aidl.cc(69)] StartRequest
08-30 11:14:06.921221  8896  8965 I bt_stack: [INFO:client.cc(2967)] OnAudioSinkResume
08-30 11:14:06.921272  8896  8965 I bt_stack:  audio_receiver_state: IDLE
08-30 11:14:06.921272  8896  8965 I bt_stack:  audio_sender_state: READY_TO_RELEASE
08-30 11:14:06.921272  8896  8965 I bt_stack:  configuration_context_type_: 4
08-30 11:14:06.921299  8896  8965 I bt_stack: [INFO:client_audio.cc(428)] ConfirmStreamingRequest
08-30 11:14:06.921314  8896  8965 I bt_stack: [INFO:le_audio_software.cc(197)] ConfirmStreamingRequest
08-30 11:14:06.921327  8896  8965 W bt_stack: [WARNING:le_audio_software.cc(212)] , no pending start stream request

<snip>

08-30 11:14:11.421940   817 12545 E BTAudioHalDeviceProxyAIDL: Start: session_type=LE_AUDIO_SOFTWARE_ENCODING_DATAPATH, cookie=0x400, state=STARTING failure
08-30 11:14:11.422137   817 12545 E BTAudioHalStream: out_write: state=STARTING failed to resume
08-30 11:14:11.438755   817 12545 I BTAudioHalStream: out_write: state=STARTING first time bytes=1920
08-30 11:14:11.438829   817 12545 W BTAudioHalStream: out_resume: state=STARTING NOT ready to resume?!
08-30 11:14:11.438852   817 12545 E BTAudioHalStream: out_write: state=STARTING failed to resume

Bug: 244299911
Bug: 244384741
Test: atest BluetoothInstrumentationTests
Test: manual testing media -> phone call->media switch
Tag: #feature
Change-Id: I55e7c9d4301bc027e6f1dd505813bb2b05799629
parent 13881ecc
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