hfp_hf: add hfp_hf_in_band_ringtone_active

This commit is contained in:
Matthias Ringwald 2018-05-11 15:23:12 +02:00
parent bdf572f420
commit d7f6b5cbab
2 changed files with 15 additions and 1 deletions

View File

@ -1679,3 +1679,11 @@ void hfp_hf_set_hf_indicator(hci_con_handle_t acl_handle, int assigned_number, i
}
}
int hfp_hf_in_band_ringtone_active(hci_con_handle_t acl_handle){
hfp_connection_t * hfp_connection = get_hfp_hf_connection_context_for_acl_handle(acl_handle);
if (!hfp_connection) {
log_error("HFP HF: ACL handle 0x%2x is not found.", acl_handle);
return 0;
}
return get_bit(hfp_connection->remote_supported_features, HFP_AGSF_IN_BAND_RING_TONE);
}

View File

@ -416,10 +416,16 @@ void hfp_hf_query_subscriber_number(hci_con_handle_t acl_handle);
*/
void hfp_hf_set_hf_indicator(hci_con_handle_t acl_handle, int assigned_number, int value);
/*
* @brief Tests if in-band ringtone is active on AG (requires SLC)
* @aram acl_handler of the AG
*/
int hfp_hf_in_band_ringtone_active(hci_con_handle_t acl_handle);
/* API_END */
#if defined __cplusplus
}
#endif
#endif // __BTSTACK_HFP_HF_H
#endif // __BTSTACK_HFP_HF_H