Skip to content

Conversation

@lylezhu2012
Copy link
Contributor

When creating the audio connection, the SCO connection request will be sent before the response "OK" to AT command "AT+BCS" is issued.

It causes the issue that the HFP HF cannot response the SCO connection request with the correct codec. Then the SCO connection cannot be established properly.

Put all processing into the same context, thus avoiding non-sequential execution caused by the different priorities of different threads.

Add a flag BT_HFP_AG_AT_PROCESS to flag the AT command is being processed.

When the flag BT_HFP_AG_AT_PROCESS is set, put the pending executions into temp list tx_submit_pending. After the AT response OK or ERROR has been sent, move the pending executions from tx_submit_pending to tx_pending.

When creating the audio connection, the SCO connection request will be
sent before the response "OK" to AT command "AT+BCS" is issued.

It causes the issue that the HFP HF cannot response the SCO connection
request with the correct codec. Then the SCO connection cannot be
established properly.

Put all processing into the same context, thus avoiding non-sequential
execution caused by the different priorities of different threads.

Add a flag `BT_HFP_AG_AT_PROCESS` to flag the AT command is being
processed.

When the flag `BT_HFP_AG_AT_PROCESS` is set, put the pending
executions into temp list `tx_submit_pending`. After the AT response
`OK` or `ERROR` has been sent, move the pending executions from
`tx_submit_pending` to `tx_pending`.

Signed-off-by: Lyle Zhu <[email protected]>
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants