mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-27 06:35:20 +00:00
Merge branch 'master' of https://github.com/bluekitchen/btstack
This commit is contained in:
commit
8359f45e70
@ -861,6 +861,11 @@ void hfp_parse(hfp_connection_t * context, uint8_t byte, int isHandsFree){
|
||||
|
||||
case HFP_PARSER_CMD_SEQUENCE: // parse comma separated sequence, ignore breacktes
|
||||
switch (context->command){
|
||||
case HFP_CMD_CHANGE_IN_BAND_RING_TONE_SETTING:
|
||||
value = atoi((char *)&context->line_buffer[0]);
|
||||
context->remote_supported_features = store_bit(context->remote_supported_features, HFP_AGSF_IN_BAND_RING_TONE, value);
|
||||
log_info("hfp parse HFP_CHANGE_IN_BAND_RING_TONE_SETTING %d\n", value);
|
||||
break;
|
||||
case HFP_CMD_HF_CONFIRMED_CODEC:
|
||||
context->codec_confirmed = atoi((char*)context->line_buffer);
|
||||
log_info("hfp parse HFP_CMD_HF_CONFIRMED_CODEC %d\n", context->codec_confirmed);
|
||||
|
17
src/hfp_ag.c
17
src/hfp_ag.c
@ -983,4 +983,21 @@ void hfp_ag_terminate_call(void){
|
||||
}
|
||||
}
|
||||
|
||||
void hfp_ag_audio_connection_transfer_towards_ag(bd_addr_t bd_addr){
|
||||
hfp_connection_t * connection = get_hfp_connection_context_for_bd_addr(bd_addr);
|
||||
if (connection->call_state != HFP_CALL_ACTIVE) return;
|
||||
if (connection->state != HFP_AUDIO_CONNECTION_ESTABLISHED) return;
|
||||
hfp_ag_release_audio_connection(bd_addr);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*/
|
||||
void hfp_ag_audio_connection_transfer_towards_hf(bd_addr_t bd_addr){
|
||||
hfp_connection_t * connection = get_hfp_connection_context_for_bd_addr(bd_addr);
|
||||
if (connection->call_state != HFP_CALL_ACTIVE) return;
|
||||
if (connection->state != HFP_AUDIO_CONNECTION_ESTABLISHED) return;
|
||||
hfp_ag_establish_audio_connection(bd_addr);
|
||||
}
|
||||
|
||||
|
||||
|
10
src/hfp_ag.h
10
src/hfp_ag.h
@ -177,6 +177,16 @@ void hfp_ag_incoming_call(void);
|
||||
*/
|
||||
void hfp_ag_terminate_call(void);
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*/
|
||||
void hfp_ag_audio_connection_transfer_towards_hf(bd_addr_t bd_addr);
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*/
|
||||
void hfp_ag_audio_connection_transfer_towards_ag(bd_addr_t bd_addr);
|
||||
|
||||
/* API_END */
|
||||
|
||||
#if defined __cplusplus
|
||||
|
Loading…
x
Reference in New Issue
Block a user