Merge branch 'develop' into windows-h4

This commit is contained in:
Matthias Ringwald 2017-01-10 16:01:26 +01:00
commit 335a1190b4

View File

@ -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;