mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-23 19:20:51 +00:00
hfp: remove hfp_reset_context_flags
This commit is contained in:
parent
e6afdfd82c
commit
93d2127f75
@ -602,10 +602,6 @@ static void hfp_reset_voice_recognition(hfp_connection_t * hfp_connection){
|
||||
hfp_connection->ag_vra_state = HFP_VOICE_RECOGNITION_STATE_AG_READY;
|
||||
}
|
||||
|
||||
void hfp_reset_context_flags(hfp_connection_t * hfp_connection){
|
||||
hfp_connection->establish_audio_connection = 0;
|
||||
}
|
||||
|
||||
static hfp_connection_t * create_hfp_connection_context(void){
|
||||
hfp_connection_t * hfp_connection = btstack_memory_hfp_connection_get();
|
||||
if (!hfp_connection) return NULL;
|
||||
@ -613,6 +609,7 @@ static hfp_connection_t * create_hfp_connection_context(void){
|
||||
hfp_connection->state = HFP_IDLE;
|
||||
hfp_connection->call_state = HFP_CALL_IDLE;
|
||||
hfp_connection->codecs_state = HFP_CODECS_IDLE;
|
||||
hfp_connection->establish_audio_connection = 0;
|
||||
|
||||
hfp_connection->parser_state = HFP_PARSER_CMD_HEADER;
|
||||
|
||||
@ -646,7 +643,6 @@ static hfp_connection_t * create_hfp_connection_context(void){
|
||||
hfp_connection->codec_confirmed = 0;
|
||||
|
||||
hfp_reset_voice_recognition(hfp_connection);
|
||||
hfp_reset_context_flags(hfp_connection);
|
||||
|
||||
btstack_linked_list_add_tail(&hfp_connections, (btstack_linked_item_t*)hfp_connection);
|
||||
return hfp_connection;
|
||||
|
@ -897,8 +897,6 @@ void hfp_trigger_release_service_level_connection(hfp_connection_t * hfp_connect
|
||||
*/
|
||||
uint8_t hfp_trigger_release_audio_connection(hfp_connection_t * hfp_connection);
|
||||
|
||||
void hfp_reset_context_flags(hfp_connection_t * hfp_connection);
|
||||
|
||||
// @returns if an SCO setup is active in either role
|
||||
bool hfp_sco_setup_active(void);
|
||||
|
||||
|
@ -1453,7 +1453,6 @@ static void hfp_hf_handle_rfcomm_command(hfp_connection_t * hfp_connection){
|
||||
case HFP_SERVICE_LEVEL_CONNECTION_ESTABLISHED:
|
||||
switch (hfp_connection->codecs_state){
|
||||
case HFP_CODECS_RECEIVED_TRIGGER_CODEC_EXCHANGE:
|
||||
hfp_reset_context_flags(hfp_connection);
|
||||
hfp_emit_sco_connection_established(hfp_connection, HFP_REMOTE_REJECTS_AUDIO_CONNECTION,
|
||||
hfp_connection->negotiated_codec, 0, 0);
|
||||
return;
|
||||
@ -1485,14 +1484,12 @@ static void hfp_hf_handle_rfcomm_command(hfp_connection_t * hfp_connection){
|
||||
}
|
||||
hfp_connection->vra_state_requested = hfp_connection->vra_state;
|
||||
hfp_emit_voice_recognition_enabled(hfp_connection, ERROR_CODE_UNSPECIFIED_ERROR);
|
||||
hfp_reset_context_flags(hfp_connection);
|
||||
return;
|
||||
}
|
||||
event_emited = hfp_hf_switch_on_ok_pending(hfp_connection, ERROR_CODE_UNSPECIFIED_ERROR);
|
||||
if (!event_emited){
|
||||
hfp_emit_event(hfp_connection, HFP_SUBEVENT_COMPLETE, ERROR_CODE_UNSPECIFIED_ERROR);
|
||||
}
|
||||
hfp_reset_context_flags(hfp_connection);
|
||||
break;
|
||||
|
||||
case HFP_CMD_OK:
|
||||
|
Loading…
x
Reference in New Issue
Block a user