hfp: log negotiated codec

This commit is contained in:
Matthias Ringwald 2016-07-24 22:34:05 +02:00
parent 1ac893701d
commit 03645b44ad
2 changed files with 2 additions and 0 deletions

View File

@ -587,6 +587,7 @@ static int codecs_exchange_state_machine(hfp_connection_t * hfp_connection){
}
hfp_connection->negotiated_codec = hfp_connection->codec_confirmed;
hfp_connection->codecs_state = HFP_CODECS_EXCHANGED;
log_info("hfp: codec confirmed: %s", hfp_connection->negotiated_codec == HFP_CODEC_MSBC ? "mSBC" : "CVSD");
hfp_emit_codec_event(hfp_callback, 0, hfp_connection->negotiated_codec);
hfp_ag_ok(hfp_connection->rfcomm_cid);
return 1;

View File

@ -939,6 +939,7 @@ static void hfp_hf_switch_on_ok(hfp_connection_t *hfp_connection){
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");
hfp_emit_codec_event(hfp_callback, 0, hfp_connection->negotiated_codec);
break;
default: