This commit is contained in:
Matthias Ringwald 2015-11-19 16:55:34 +01:00
commit 8359f45e70
3 changed files with 32 additions and 0 deletions

View File

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

View File

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

View File

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