mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-04 15:39:59 +00:00
hfp_hf: consider codec accepted when we support the requested one - before we get the OK
This commit is contained in:
parent
fd9ea8fd04
commit
0e0be2033c
@ -530,6 +530,8 @@ static int codecs_exchange_state_machine(hfp_connection_t * hfp_connection){
|
||||
hfp_connection->codec_confirmed = hfp_connection->suggested_codec;
|
||||
hfp_connection->ok_pending = 1;
|
||||
hfp_connection->codecs_state = HFP_CODECS_HF_CONFIRMED_CODEC;
|
||||
hfp_connection->negotiated_codec = hfp_connection->suggested_codec;
|
||||
log_info("hfp: codec confirmed: %s", hfp_connection->negotiated_codec == HFP_CODEC_MSBC ? "mSBC" : "CVSD");
|
||||
hfp_hf_cmd_confirm_codec(hfp_connection->rfcomm_cid, hfp_connection->codec_confirmed);
|
||||
} else {
|
||||
hfp_connection->codec_confirmed = 0;
|
||||
@ -965,8 +967,6 @@ static void hfp_hf_switch_on_ok(hfp_connection_t *hfp_connection){
|
||||
break;
|
||||
case HFP_CODECS_HF_CONFIRMED_CODEC:
|
||||
hfp_connection->codecs_state = HFP_CODECS_EXCHANGED;
|
||||
hfp_connection->negotiated_codec = hfp_connection->suggested_codec;
|
||||
log_info("hfp: codec confirmed: %s", hfp_connection->negotiated_codec == HFP_CODEC_MSBC ? "mSBC" : "CVSD");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user