mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-25 00:02:27 +00:00
hfp_ag: setup audio connection w/o in-band ringing if HF accepts call
This commit is contained in:
parent
2d66e7972b
commit
b956fff3a7
@ -1811,11 +1811,7 @@ static void hfp_ag_run_for_context(hfp_connection_t *hfp_connection){
|
|||||||
cmd_sent = call_setup_state_machine(hfp_connection);
|
cmd_sent = call_setup_state_machine(hfp_connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!cmd_sent){
|
// trigger codec exchange (must be before hfp_ag_run_for_audio_connection)
|
||||||
cmd_sent = hfp_ag_run_for_audio_connection(hfp_connection);
|
|
||||||
}
|
|
||||||
|
|
||||||
// trigger codec exchange
|
|
||||||
if (!cmd_sent && (hfp_connection->command == HFP_CMD_NONE) && hfp_connection->trigger_codec_exchange){
|
if (!cmd_sent && (hfp_connection->command == HFP_CMD_NONE) && hfp_connection->trigger_codec_exchange){
|
||||||
log_info("trigger codec, command %u, codec state %u", hfp_connection->command, hfp_connection->codecs_state);
|
log_info("trigger codec, command %u, codec state %u", hfp_connection->command, hfp_connection->codecs_state);
|
||||||
switch (hfp_connection->codecs_state){
|
switch (hfp_connection->codecs_state){
|
||||||
@ -1831,6 +1827,11 @@ static void hfp_ag_run_for_context(hfp_connection_t *hfp_connection){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!cmd_sent){
|
||||||
|
cmd_sent = hfp_ag_run_for_audio_connection(hfp_connection);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// disconnect
|
// disconnect
|
||||||
if (!cmd_sent && (hfp_connection->command == HFP_CMD_NONE) && (hfp_connection->state == HFP_W2_DISCONNECT_RFCOMM)){
|
if (!cmd_sent && (hfp_connection->command == HFP_CMD_NONE) && (hfp_connection->state == HFP_W2_DISCONNECT_RFCOMM)){
|
||||||
hfp_connection->state = HFP_W4_RFCOMM_DISCONNECTED;
|
hfp_connection->state = HFP_W4_RFCOMM_DISCONNECTED;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user