mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-18 14:42:33 +00:00
hfp_hf: only emit single event for RING and AG Status updates
This commit is contained in:
parent
7c76cd6112
commit
5a4785c8a7
@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||||||
- HFP: Emit Audio Connection Released on SLC Release, e.g. remote power off
|
- HFP: Emit Audio Connection Released on SLC Release, e.g. remote power off
|
||||||
- GAP: calculate IO Cap AuthReq Bondable Mode based on `gap_ssp_set_authentication_requirement` and `gap_set_bondable_mode`
|
- GAP: calculate IO Cap AuthReq Bondable Mode based on `gap_ssp_set_authentication_requirement` and `gap_set_bondable_mode`
|
||||||
- GAP: only store link key for ssp if remote side has set bondable in io cap auth requirements as well
|
- GAP: only store link key for ssp if remote side has set bondable in io cap auth requirements as well
|
||||||
|
- HFP HF: only emit single event for RING and AG Status updates
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- HCI: config I2S for BCM Controllers if `ENABLE_SCO_OVER_PCM`, reduce bit clock to 256/512 kHz
|
- HCI: config I2S for BCM Controllers if `ENABLE_SCO_OVER_PCM`, reduce bit clock to 256/512 kHz
|
||||||
|
@ -1092,16 +1092,15 @@ static void hfp_hf_handle_rfcomm_command(hfp_connection_t * hfp_connection){
|
|||||||
hfp_hf_emit_type_and_number(hfp_hf_callback, HFP_SUBEVENT_CALLING_LINE_IDENTIFICATION_NOTIFICATION, hfp_connection->bnip_type, hfp_connection->bnip_number);
|
hfp_hf_emit_type_and_number(hfp_hf_callback, HFP_SUBEVENT_CALLING_LINE_IDENTIFICATION_NOTIFICATION, hfp_connection->bnip_type, hfp_connection->bnip_number);
|
||||||
break;
|
break;
|
||||||
case HFP_CMD_EXTENDED_AUDIO_GATEWAY_ERROR:
|
case HFP_CMD_EXTENDED_AUDIO_GATEWAY_ERROR:
|
||||||
hfp_connection->ok_pending = 0;
|
|
||||||
hfp_connection->command = HFP_CMD_NONE;
|
hfp_connection->command = HFP_CMD_NONE;
|
||||||
|
hfp_connection->ok_pending = 0;
|
||||||
hfp_connection->extended_audio_gateway_error = 0;
|
hfp_connection->extended_audio_gateway_error = 0;
|
||||||
hfp_emit_event(hfp_connection, HFP_SUBEVENT_EXTENDED_AUDIO_GATEWAY_ERROR, hfp_connection->extended_audio_gateway_error_value);
|
hfp_emit_event(hfp_connection, HFP_SUBEVENT_EXTENDED_AUDIO_GATEWAY_ERROR, hfp_connection->extended_audio_gateway_error_value);
|
||||||
break;
|
break;
|
||||||
case HFP_CMD_ERROR:
|
case HFP_CMD_ERROR:
|
||||||
|
hfp_connection->command = HFP_CMD_NONE;
|
||||||
hfp_connection->ok_pending = 0;
|
hfp_connection->ok_pending = 0;
|
||||||
hfp_reset_context_flags(hfp_connection);
|
hfp_reset_context_flags(hfp_connection);
|
||||||
hfp_connection->command = HFP_CMD_NONE;
|
|
||||||
|
|
||||||
switch (hfp_connection->state){
|
switch (hfp_connection->state){
|
||||||
case HFP_SERVICE_LEVEL_CONNECTION_ESTABLISHED:
|
case HFP_SERVICE_LEVEL_CONNECTION_ESTABLISHED:
|
||||||
switch (hfp_connection->codecs_state){
|
switch (hfp_connection->codecs_state){
|
||||||
@ -1120,20 +1119,22 @@ static void hfp_hf_handle_rfcomm_command(hfp_connection_t * hfp_connection){
|
|||||||
hfp_hf_switch_on_ok(hfp_connection);
|
hfp_hf_switch_on_ok(hfp_connection);
|
||||||
break;
|
break;
|
||||||
case HFP_CMD_RING:
|
case HFP_CMD_RING:
|
||||||
|
hfp_connection->command = HFP_CMD_NONE;
|
||||||
hfp_emit_simple_event(hfp_connection, HFP_SUBEVENT_RING);
|
hfp_emit_simple_event(hfp_connection, HFP_SUBEVENT_RING);
|
||||||
break;
|
break;
|
||||||
case HFP_CMD_TRANSFER_AG_INDICATOR_STATUS:
|
case HFP_CMD_TRANSFER_AG_INDICATOR_STATUS:
|
||||||
|
hfp_connection->command = HFP_CMD_NONE;
|
||||||
hfp_hf_handle_transfer_ag_indicator_status(hfp_connection);
|
hfp_hf_handle_transfer_ag_indicator_status(hfp_connection);
|
||||||
break;
|
break;
|
||||||
case HFP_CMD_RETRIEVE_AG_INDICATORS_STATUS:
|
case HFP_CMD_RETRIEVE_AG_INDICATORS_STATUS:
|
||||||
|
hfp_connection->command = HFP_CMD_NONE;
|
||||||
for (i = 0; i < hfp_connection->ag_indicators_nr; i++){
|
for (i = 0; i < hfp_connection->ag_indicators_nr; i++){
|
||||||
hfp_emit_ag_indicator_event(hfp_hf_callback, hfp_connection->ag_indicators[i]);
|
hfp_emit_ag_indicator_event(hfp_hf_callback, hfp_connection->ag_indicators[i]);
|
||||||
}
|
}
|
||||||
hfp_connection->command = HFP_CMD_NONE;
|
|
||||||
break;
|
break;
|
||||||
case HFP_CMD_AG_SUGGESTED_CODEC:
|
case HFP_CMD_AG_SUGGESTED_CODEC:
|
||||||
hfp_hf_handle_suggested_codec(hfp_connection);
|
|
||||||
hfp_connection->command = HFP_CMD_NONE;
|
hfp_connection->command = HFP_CMD_NONE;
|
||||||
|
hfp_hf_handle_suggested_codec(hfp_connection);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user