dotstack API Reference
1.10.37
|
Data Structures | |
struct | bt_hfp_evt_audio_data_t |
HFP_EVENT_AUDIO_DATA_RECEIVED event parameter. More... | |
struct | bt_hfp_evt_slc_connection_state_changed_t |
HFP_EVENT_SLC_CONNECTION_STATE_CHANGED event parameter. More... | |
struct | bt_hfp_evt_audio_connection_state_changed_t |
HFP_EVENT_AUDIO_CONNECTION_STATE_CHANGED event parameter. More... | |
struct | bt_hfp_evt_mic_volume_changed_t |
HFP_EVENT_MIC_VOLUME_CHANGED event parameter. More... | |
struct | bt_hfp_evt_spk_volume_changed_t |
HFP_EVENT_SPK_VOLUME_CHANGED event parameter. More... | |
struct | bt_hfp_evt_indicator_received_t |
HFP_EVENT_INDICATOR_RECEIVED event parameter. More... | |
struct | bt_hfp_evt_query_operator_completed_t |
HFP_EVENT_QUERY_OPERATOR_COMPLETED event parameter. More... | |
struct | bt_hfp_evt_clip_received_t |
HFP_EVENT_CLIP_RECEIVED event parameter. More... | |
struct | bt_hfp_evt_call_waiting_t |
HFP_EVENT_CALL_WAITING event parameter. More... | |
struct | bt_hfp_evt_command_completed_t |
HFP_EVENT_CMD_COMPLETED event parameter. More... | |
struct | bt_hfp_evt_voice_recognition_changed_t |
HFP_EVENT_VOICE_RECOGNITION_CHANGED event parameter. More... | |
struct | bt_hfp_evt_inband_ring_changed_t |
HFP_EVENT_INBAND_RING_CHANGED event parameter. More... | |
struct | bt_hfp_evt_dial_request_received_t |
HFP_AG_EVENT_DIAL_REQUEST_RECEIVED event parameter. More... | |
struct | bt_hfp_ind |
Stores value of an indicator. More... | |
struct | bt_hfp_hf_ind |
Stores value of an HF indicator. More... | |
struct | bt_hfp_event_register_t |
Stores value of HF registrations. More... | |
struct | bt_hfp_call_t |
Stores information about a call. More... | |
struct | bt_hfp_audio_packet_t |
Parameter to HFP_EVENT_AUDIO_DATA_RECEIVED event. More... | |
Macros | |
#define | bt_hfp_allocate_session(role) bt_hfp_allocate_session_ex(role, 0, 0, 0) |
Allocate HFP session. More... | |
#define | bt_hfp_allocate_session_hf() bt_hfp_allocate_session(HFP_ROLE_HF) |
Allocate HFP session. More... | |
#define | bt_hfp_allocate_session_ag() bt_hfp_allocate_session(HFP_ROLE_AG) |
Allocate HFP session. More... | |
#define | bt_hfp_hf_terminate(session) bt_hfp_hf_reject(session) |
Terminate the active call. More... | |
#define | bt_hfp_has_active_call(session) ((session->call_status_mask & HFP_CALL_STATUS_MASK_ACTIVE) && !(session->call_status_mask & HFP_CALL_STATUS_MASK_ALL_HELD)) |
Determines if there is one or more active calls in the AG. More... | |
#define | bt_hfp_has_held_call(session) ((session->call_status_mask & (HFP_CALL_STATUS_MASK_HELD | HFP_CALL_STATUS_MASK_ALL_HELD)) != 0) |
Determines if there is one or more held calls in the AG. More... | |
#define | bt_hfp_has_dialing_call(session) ((session->call_status_mask & HFP_CALL_STATUS_MASK_DIALING) != 0) |
Determines if there is one or more dialing calls in the AG. More... | |
#define | bt_hfp_has_alerting_call(session) ((session->call_status_mask & HFP_CALL_STATUS_MASK_ALERTING) != 0) |
Determines if there is one or more alerting calls in the AG. More... | |
#define | bt_hfp_has_outgoing_call(session) ((session->call_status_mask & (HFP_CALL_STATUS_MASK_ALERTING | HFP_CALL_STATUS_MASK_DIALING)) != 0) |
Determines if there is one or more outgoing (dialing or alerting) calls in the AG. More... | |
#define | bt_hfp_has_incoming_call(session) ((session->call_status_mask & HFP_CALL_STATUS_MASK_INCOMING) != 0) |
Determines if there is one or more incoming calls in the AG. More... | |
#define | bt_hfp_has_waiting_call(session) ((session->call_status_mask & HFP_CALL_STATUS_MASK_WAITING) != 0) |
Determines if there is one or more waiting calls in the AG. More... | |
#define | bt_hfp_is_call_setup_in_progress(session) (bt_hfp_get_indicator_value(session, HFP_IND_CALLSETUP) != HFP_IND_CALLSETUP_NO_CALL_SETUP) |
Determines if there is a call setup in progress. More... | |
#define | bt_hfp_is_incoming_call_in_progress(session) (bt_hfp_get_indicator_value(session, HFP_IND_CALLSETUP) == HFP_IND_CALLSETUP_INCOMING_CALL_SETUP) |
Determines if there is an incoming call setup in progress. More... | |
#define | bt_hfp_is_outgoing_call_in_progress(session) (bt_hfp_get_indicator_value(session, HFP_IND_CALLSETUP) == HFP_IND_CALLSETUP_OUTGOING_CALL_SETUP) |
Determines if there is an outgoing call setup in progress. More... | |
#define | bt_hfp_is_outgoing_call_remote_alerted(session) (bt_hfp_get_indicator_value(session, HFP_IND_CALLSETUP) == HFP_IND_CALLSETUP_OUTGOING_CALL_ALERT_REMOTE) |
Determines if a remote party is being alerted during an outgoing call setup. More... | |
#define | bt_hfp_has_only_held_call(session) (bt_hfp_get_indicator_value(session, HFP_IND_CALLHELD) == HFP_IND_CALLHELD_ALL_CALLS_HELD) |
Determines if all calls are held. More... | |
#define | bt_hfp_has_active_held_call(session) (bt_hfp_get_indicator_value(session, HFP_IND_CALLHELD) == HFP_IND_CALLHELD_ACTIVE_HELD) |
Determines if there are active and held calls in the AG. More... | |
#define | bt_hfp_service_present(session) (bt_hfp_get_indicator_value(session, HFP_IND_SERVICE) != HFP_IND_SERVICE_NO_SERVICE) |
Determines if the AG is connected to cell network. More... | |
#define | bt_hfp_roam_active(session) (bt_hfp_get_indicator_value(session, HFP_IND_ROAM) != HFP_IND_ROAM_NOT_ACTIVE) |
Determines if roaming is active in the AG. More... | |
#define | bt_hfp_get_remote_address(session) (&session->rfcomm_dlc->psess->pch->hci_conn->bdaddr_remote) |
Get the address of the remote device this device is connected. More... | |
#define | bt_hfp_ag_set_mic_gain(session, gain) bt_hfp_set_mic_gain(session, gain) |
Set HF microphone gain. More... | |
#define | bt_hfp_ag_set_speaker_volume(session, volume) bt_hfp_set_speaker_volume(session, volume) |
Set HF speaker volume. More... | |
Typedefs | |
typedef void(* | bt_hfp_session_callback_pf) (bt_hfp_session_t *session, bt_byte evt, void *evt_param, void *callback_param) |
Notify the application of changes in the HFP session. More... | |
typedef void(* | bt_hfp_find_remote_callback_pf) (bt_hfp_session_t *session, bt_byte server_channel, bt_bool found) |
Notify the application of the result of searching for the Audio Gateway. More... | |
typedef void(* | bt_hfp_send_audio_callback_pf) (bt_hfp_session_t *session, void *callback_param) |
Notify the application that audio data has been sent to a remote device. More... | |
Functions | |
bt_bool | bt_hfp_init (void) |
Initialize HFP layer. More... | |
bt_hfp_session_t * | bt_hfp_allocate_session_ex (bt_byte role, bt_ulong features, bt_byte mic_gain, bt_byte speaker_volume) |
Allocate HFP session. More... | |
bt_hfp_session_t * | bt_hfp_allocate_hf_session (bt_ulong features, bt_byte mic_gain, bt_byte speaker_volume) |
Allocate HFP HF session. More... | |
bt_hfp_session_t * | bt_hfp_allocate_ag_session (bt_ulong features, bt_byte mic_gain, bt_byte speaker_volume) |
Allocate HFP AG session. More... | |
void | bt_hfp_free_session (bt_hfp_session_t *psess) |
Release HFP session. More... | |
bt_bool | bt_hfp_listen (bt_hfp_session_t *session, bt_byte server_channel, bt_hfp_session_callback_pf callback, void *callback_param) |
Listen for incoming connections. More... | |
bt_bool | bt_hfp_connect (bt_hfp_session_t *session, bt_bdaddr_t *pbdaddr_remote, bt_hfp_session_callback_pf callback, void *callback_param) |
Connect to a remote device. More... | |
bt_bool | bt_hfp_hf_disconnect (bt_hfp_session_t *session) |
Close connection. More... | |
bt_bool | bt_hfp_hf_query_operator (bt_hfp_session_t *session) |
Request operator's name from AG. More... | |
bt_bool | bt_hfp_hf_answer (bt_hfp_session_t *session) |
Answer the incoming call. More... | |
bt_bool | bt_hfp_hf_hold (bt_hfp_session_t *session, bt_byte cmd, bt_byte call_index) |
Enhanced call control. More... | |
bt_bool | bt_hfp_hf_reject (bt_hfp_session_t *session) |
Reject the incoming call. More... | |
bt_bool | bt_hfp_hf_dial_number (bt_hfp_session_t *session, bt_char *number) |
Place a call. More... | |
bt_bool | bt_hfp_hf_redial (bt_hfp_session_t *session) |
Redial last dialed number. More... | |
bt_bool | bt_hfp_hf_enable_call_waiting_notification (bt_hfp_session_t *session, bt_bool enable) |
Enable/disable call waiting notification. More... | |
bt_bool | bt_hfp_set_mic_gain (bt_hfp_session_t *session, bt_byte gain) |
Report microphone gain on the HF to the AG. More... | |
bt_bool | bt_hfp_set_speaker_volume (bt_hfp_session_t *session, bt_byte volume) |
Report speaker volume on the HF to the AG. More... | |
bt_bool | bt_hfp_hf_get_subscriber_number (bt_hfp_session_t *session) |
Request subscriber number information from the AG. More... | |
bt_byte | bt_hfp_get_indicator_value (bt_hfp_session_t *session, bt_byte indicator_id) |
Get current value of an indicator. More... | |
bt_bool | bt_hfp_has_call_with_status (bt_hfp_session_t *session, bt_byte status) |
Determines if there is one or more calls in the AG with the specified status. More... | |
bt_bool | bt_hfp_hf_refresh_call_list (bt_hfp_session_t *session) |
Request a call list from the AG. More... | |
bt_bool | bt_hfp_hf_enable_calling_line_identification (bt_hfp_session_t *session, bt_bool enable) |
Enable/disable calling line identification notification. More... | |
bt_bool | bt_hfp_hf_find_ag (bt_hfp_session_t *session, bt_bdaddr_t *deviceAddress, bt_hfp_find_remote_callback_pf callback) |
Find AG. More... | |
bt_bool | bt_hfp_hf_enable_voice_recognition (bt_hfp_session_t *session, bt_bool enable) |
Enable/disable calling voice control in the AG. More... | |
bt_bool | bt_hfp_hf_disable_nrec (bt_hfp_session_t *session) |
Disable Echo Canceling and Noise Reduction functions in the AG. More... | |
bt_bool | bt_hfp_connect_audio (bt_hfp_session_t *session) |
Transfer audio connection from the AG to the HF. More... | |
bt_bool | bt_hfp_disconnect_audio (bt_hfp_session_t *session) |
Transfer audio connection from the HF to the AG. More... | |
bt_hci_conn_state_t * | bt_hfp_get_hci_connection (const bt_hfp_session_t *session) |
Get HCI connection for a session. More... | |
bt_uint | bt_hfp_get_sco_tx_packet_size (const bt_hfp_session_t *session) |
Get the size of the audio payload in the transmit direction. More... | |
bt_uint | bt_hfp_get_sco_rx_packet_size (const bt_hfp_session_t *session) |
Get the size of the audio payload in the receive direction. More... | |
bt_hfp_call_t * | bt_hfp_ag_incoming_call (bt_hfp_session_t *session, const bt_char *number, bt_int type) |
HFP AG incoming call. More... | |
bt_hfp_call_t * | bt_hfp_ag_outgoing_call (bt_hfp_session_t *session, const bt_char *number) |
HFP AG outgoing call. More... | |
void | bt_hfp_ag_reject_outgoing_call (bt_hfp_session_t *session) |
HFP AG reject outgoing call. More... | |
void | bt_hfp_ag_outgoing_call_alerting (bt_hfp_session_t *session, bt_hfp_call_t *call) |
HFP AG outgoing call alerting. More... | |
void | bt_hfp_ag_call_connected (bt_hfp_session_t *session, bt_hfp_call_t *call) |
HFP AG call connected. More... | |
void | bt_hfp_ag_call_disconnected (bt_hfp_session_t *session, bt_hfp_call_t *call) |
HFP AG call disconnected. More... | |
bt_bool | bt_hfp_ag_set_service_state (bt_hfp_session_t *session, bt_byte ind_val) |
Set Service State indicator value. More... | |
bt_bool | bt_hfp_ag_set_signal_strength (bt_hfp_session_t *session, bt_byte ind_val) |
Set Signal Strength indicator value. More... | |
bt_bool | bt_hfp_ag_set_roam_state (bt_hfp_session_t *session, bt_byte ind_val) |
Set Roaming State indicator value. More... | |
bt_bool | bt_hfp_ag_set_battery_level (bt_hfp_session_t *session, bt_byte ind_val) |
Set Battery Level indicator value. More... | |
bt_bool | bt_hfp_ag_set_inband_ring (bt_hfp_session_t *session, bt_byte ind_val) |
Send Inband ring notification to HF device. More... | |
bt_bool | bt_hfp_activate_voice_recognition (bt_hfp_session_t *session, bt_bool activate) |
Send voice recognition activation notification to HF device. More... | |
bt_bool | bt_hfp_ag_set_operator_name (bt_hfp_session_t *session, const bt_byte *name) |
Set Operator name. More... | |
bt_bool | bt_hfp_ag_set_subscriber_number (bt_hfp_session_t *session, const bt_byte *number, bt_byte type, bt_byte service) |
Set Subscriber number. More... | |
bt_bool | bt_hfp_add_audio_rx_buffer (bt_hfp_session_t *session, bt_hfp_audio_packet_t *buffer) |
Add an audio packet buffer to a receive queue. More... | |
bt_bool | bt_hfp_add_audio_tx_buffer (bt_hfp_session_t *session, bt_hfp_audio_packet_t *buffer) |
Add an audio packet buffer to a send queue. More... | |
bt_bool | bt_hfp_hf_xapl_set_battery_level (bt_hfp_session_t *session, bt_byte level) |
Set local HF device's battery charge level. More... | |
bt_bool | bt_hfp_hf_xapl_set_dock_state (bt_hfp_session_t *session, bt_byte state) |
Set local HF device's dock state. More... | |
bt_bool | bt_hfp_hf_xapl_set_headset_state (bt_hfp_session_t *session, const bt_byte *keys, const bt_byte *values, bt_byte value_count) |
Reports a headset state. More... | |
bt_bool | bt_hfp_hf_set_hf_indicator (bt_hfp_session_t *session, bt_byte id, bt_byte value) |
Set HF indicator value. More... | |
bt_byte | bt_hfp_hf_get_hf_indicator (bt_hfp_session_t *session, bt_byte id) |
Get HF indicator value. More... | |
bt_bool | bt_hfp_hf_set_battery_level (bt_hfp_session_t *session, bt_byte level) |
Set local HF device's battery charge level. More... | |
#define bt_hfp_ag_set_mic_gain | ( | session, | |
gain | |||
) | bt_hfp_set_mic_gain(session, gain) |
Set HF microphone gain.
This function sets microphone gain on the HF. The AG can call this function to set the HF's microphone gain.
session | HFP session. |
gain | Microphone gain (0 - 15) |
TRUE
if the function succeeds. FALSE
otherwise. #define bt_hfp_ag_set_speaker_volume | ( | session, | |
volume | |||
) | bt_hfp_set_speaker_volume(session, volume) |
Set HF speaker volume.
This function sets speaker volume on the HF. The AG can call this function to set HF's speaker volume.
session | HFP session. |
gain | Speaker volume (0 - 15) |
TRUE
if the function succeeds. FALSE
otherwise. #define bt_hfp_allocate_session | ( | role | ) | bt_hfp_allocate_session_ex(role, 0, 0, 0) |
Allocate HFP session.
This function allocates a new HFP session. Initial values of HFP features, microphone gain and speaker volume are set to 0. Use bt_hfp_allocate_session_ex initialize the session with concrete values of HFP features, microphone gain and speaker volume.
role | HFP_ROLE_HF or HFP_ROLE_AG. |
NULL
otherwise. #define bt_hfp_allocate_session_ag | ( | ) | bt_hfp_allocate_session(HFP_ROLE_AG) |
Allocate HFP session.
This function allocates a new AG HFP session.
NULL
otherwise. #define bt_hfp_allocate_session_hf | ( | ) | bt_hfp_allocate_session(HFP_ROLE_HF) |
Allocate HFP session.
This function allocates a new HF HFP session.
NULL
otherwise. #define bt_hfp_get_remote_address | ( | session | ) | (&session->rfcomm_dlc->psess->pch->hci_conn->bdaddr_remote) |
Get the address of the remote device this device is connected.
session | HFP session. |
A
pointer to bt_bdaddr structure that contains the address of the remote device. #define bt_hfp_has_active_call | ( | session | ) | ((session->call_status_mask & HFP_CALL_STATUS_MASK_ACTIVE) && !(session->call_status_mask & HFP_CALL_STATUS_MASK_ALL_HELD)) |
Determines if there is one or more active calls in the AG.
This macro determines if there is one or more active calls in the AG.
session | HFP session. |
TRUE
if there are active calls. FALSE
otherwise. #define bt_hfp_has_active_held_call | ( | session | ) | (bt_hfp_get_indicator_value(session, HFP_IND_CALLHELD) == HFP_IND_CALLHELD_ACTIVE_HELD) |
Determines if there are active and held calls in the AG.
This macro determines if there are active and held calls in the AG.
session | HFP session. |
TRUE
if there are active and held calls in the AG. FALSE
otherwise. #define bt_hfp_has_alerting_call | ( | session | ) | ((session->call_status_mask & HFP_CALL_STATUS_MASK_ALERTING) != 0) |
Determines if there is one or more alerting calls in the AG.
This macro determines if there is one or more alerting calls in the AG.
session | HFP session. |
TRUE
if there are alerting calls. FALSE
otherwise. #define bt_hfp_has_dialing_call | ( | session | ) | ((session->call_status_mask & HFP_CALL_STATUS_MASK_DIALING) != 0) |
Determines if there is one or more dialing calls in the AG.
This macro determines if there is one or more dialing calls in the AG.
session | HFP session. |
TRUE
if there are dialing calls. FALSE
otherwise. #define bt_hfp_has_held_call | ( | session | ) | ((session->call_status_mask & (HFP_CALL_STATUS_MASK_HELD | HFP_CALL_STATUS_MASK_ALL_HELD)) != 0) |
Determines if there is one or more held calls in the AG.
This macro determines if there is one or more held calls in the AG.
session | HFP session. |
TRUE
if there are held calls. FALSE
otherwise. #define bt_hfp_has_incoming_call | ( | session | ) | ((session->call_status_mask & HFP_CALL_STATUS_MASK_INCOMING) != 0) |
Determines if there is one or more incoming calls in the AG.
This macro determines if there is one or more incoming calls in the AG.
session | HFP session. |
TRUE
if there are incoming calls. FALSE
otherwise. #define bt_hfp_has_only_held_call | ( | session | ) | (bt_hfp_get_indicator_value(session, HFP_IND_CALLHELD) == HFP_IND_CALLHELD_ALL_CALLS_HELD) |
Determines if all calls are held.
This macro determines if all calls in the AG are held.
session | HFP session. |
TRUE
if all calls are held. FALSE
otherwise. #define bt_hfp_has_outgoing_call | ( | session | ) | ((session->call_status_mask & (HFP_CALL_STATUS_MASK_ALERTING | HFP_CALL_STATUS_MASK_DIALING)) != 0) |
Determines if there is one or more outgoing (dialing or alerting) calls in the AG.
This macro determines if there is one or more outgoing (dialing or alerting) calls in the AG.
session | HFP session. |
TRUE
if there are outgoing calls. FALSE
otherwise. #define bt_hfp_has_waiting_call | ( | session | ) | ((session->call_status_mask & HFP_CALL_STATUS_MASK_WAITING) != 0) |
Determines if there is one or more waiting calls in the AG.
This macro determines if there is one or more waiting calls in the AG.
session | HFP session. |
TRUE
if there are waiting calls. FALSE
otherwise. #define bt_hfp_hf_terminate | ( | session | ) | bt_hfp_hf_reject(session) |
Terminate the active call.
If there is an active call in the AG the app may call this function to terminate it. The result of calling this function will be HFP_EVENT_CMD_COMPLETED event.
session | HFP session. |
TRUE
if the function succeeds. FALSE
otherwise. #define bt_hfp_is_call_setup_in_progress | ( | session | ) | (bt_hfp_get_indicator_value(session, HFP_IND_CALLSETUP) != HFP_IND_CALLSETUP_NO_CALL_SETUP) |
Determines if there is a call setup in progress.
This macro determines if a call is being setup, i.e., there is an answered incoming or outgoing call.
session | HFP session. |
TRUE
if there is a call setup in progress. FALSE
otherwise. #define bt_hfp_is_incoming_call_in_progress | ( | session | ) | (bt_hfp_get_indicator_value(session, HFP_IND_CALLSETUP) == HFP_IND_CALLSETUP_INCOMING_CALL_SETUP) |
Determines if there is an incoming call setup in progress.
This macro determines if a incoming call is being setup, i.e., there is an answered incoming call.
session | HFP session. |
TRUE
if there is an incoming call setup in progress. FALSE
otherwise. #define bt_hfp_is_outgoing_call_in_progress | ( | session | ) | (bt_hfp_get_indicator_value(session, HFP_IND_CALLSETUP) == HFP_IND_CALLSETUP_OUTGOING_CALL_SETUP) |
Determines if there is an outgoing call setup in progress.
This macro determines if a outgoing call is being setup, i.e., there is an answered outgoing call.
session | HFP session. |
TRUE
if there is an outgoing call setup in progress. FALSE
otherwise. #define bt_hfp_is_outgoing_call_remote_alerted | ( | session | ) | (bt_hfp_get_indicator_value(session, HFP_IND_CALLSETUP) == HFP_IND_CALLSETUP_OUTGOING_CALL_ALERT_REMOTE) |
Determines if a remote party is being alerted during an outgoing call setup.
This macro determines if a remote party is being alerted during an outgoing call setup.
session | HFP session. |
TRUE
if a remote party is being alerted during an outgoing call setup. FALSE
otherwise. #define bt_hfp_roam_active | ( | session | ) | (bt_hfp_get_indicator_value(session, HFP_IND_ROAM) != HFP_IND_ROAM_NOT_ACTIVE) |
Determines if roaming is active in the AG.
This macro determines if roaming is active in the AG.
session | HFP session. |
TRUE
if roaming is active in the AG. FALSE
otherwise. #define bt_hfp_service_present | ( | session | ) | (bt_hfp_get_indicator_value(session, HFP_IND_SERVICE) != HFP_IND_SERVICE_NO_SERVICE) |
Determines if the AG is connected to cell network.
This macro determines if the AG is connected to cell network.
session | HFP session. |
TRUE
if the AG is connected to cell network. FALSE
otherwise. typedef void(* bt_hfp_find_remote_callback_pf) (bt_hfp_session_t *session, bt_byte server_channel, bt_bool found) |
Notify the application of the result of searching for the Audio Gateway.
This function is called by the HFP layer when searching for the Audio Gateway on a remote device has completed.
session | HFP session. |
server_channel | The RFCOMM server channel used by the Audio Gateway. The application must pass this value to bt_hfp_connect. The value is valid only if the found parameter is TRUE. |
found | TRUE if Audio Gateway has been found on the remote device. FALSE otherwise. |
typedef void(* bt_hfp_send_audio_callback_pf) (bt_hfp_session_t *session, void *callback_param) |
Notify the application that audio data has been sent to a remote device.
This function is called by the HFP layer when audio data has been sent to a remote device.
session | HFP session. |
callback_param | The value of the callback_param parameter passed to the call of bt_hfp_send_audio. |
typedef void(* bt_hfp_session_callback_pf) (bt_hfp_session_t *session, bt_byte evt, void *evt_param, void *callback_param) |
Notify the application of changes in the HFP session.
This function is called by the HFP layer when various session parameters have changed. It is also called when commands from the remote device or response codes to the commands sent to the the remote device are received.
session | HFP session. |
evt | Specifies the id of the event. The value of this arguments is one of the values defined by HFP_EVENT_ constants. Each event has a parameter that points to an event specific structure that clarifies the event. The event parameter is passed through the evt_param parameter. |
what_param
parameter. It can be either HS_RES_OK or HS_RES_ERROR. what_param
parameter. The length of the data is passed in the what_param2
parameter (cast to bt_int). what_param
parameter (cast to bt_byte). what_param
parameter (cast to bt_byte)evt_param | The event's parameter. |
callback_param | The value of the callback_param passed to the call of bt_hfp_listen or bt_hfp_connect. |
bt_bool bt_hfp_activate_voice_recognition | ( | bt_hfp_session_t * | session, |
bt_bool | activate | ||
) |
Send voice recognition activation notification to HF device.
This function should be called by the application to indicate to the HF that the voice recognition in the AG has been activated or deactivated.
This function should be called when Service Level Connection has been established.
session | HFP session. |
activate | FALSE - voice recognition has been activated in the AG. TRUE - voice recognition has been deactivated in the AG. |
TRUE
if the function succeeds. FALSE
if parameter if out of range, or RFCOMM connection is not established. bt_bool bt_hfp_add_audio_rx_buffer | ( | bt_hfp_session_t * | session, |
bt_hfp_audio_packet_t * | buffer | ||
) |
Add an audio packet buffer to a receive queue.
An application is responsible for allocating and supplying HFP with buffers used to store received packets. HFP itself only has a queue for storing pointers to buffers supplied by the app. When a packet comes in HFP finds the first buffer large enough to hold the received packet, copies the packet to the buffer and generates a HFP_EVENT_AUDIO_DATA_RECEIVED event. The app then has to process the data in the buffer and return it back to the queue. If there is no buffers in the queue or none of the buffers is large enough the received packets is dropped. Each buffer has a field (data_len) that holds the length of the received buffer. This field is never 0 if the buffer contains a packet. If audio connection closed regardless of what has caused that and there are still buffers in the queue HFP generates a HFP_EVENT_AUDIO_DATA_RECEIVED event for each buffer and sets the data_len to 0. This is to inform the app that the buffer has not been used and can be, for example, deallocated. This function adds a buffer to the receive queue.
session | HFP session. |
buffer | Pointer to a structure that holds the buffer and its parameters. |
TRUE
. This function never fails. bt_bool bt_hfp_add_audio_tx_buffer | ( | bt_hfp_session_t * | session, |
bt_hfp_audio_packet_t * | buffer | ||
) |
Add an audio packet buffer to a send queue.
When an application wants to send an audio packet to a remote device it calls this function. The function adds the packet to a queue and tells HFP that it has something to send. The packet will be send as soon as possible. When the packet has been sent a HFP_EVENT_AUDIO_PACKET_SENT is generated. The app can then re-use the buffer as HFP has removed it from the queue and gave up control over it. As in the case of received buffers, if an audio connection closed regardless of what has caused that and there are still buffers in the queue HFP generates a HFP_EVENT_AUDIO_PACKET_SENT event for each buffer and sets the data_len field to 0. This is to inform the app that the buffer has not been used and can be, for example, deallocated.
session | HFP session. |
buffer | Pointer to a structure that holds the buffer and its parameters. |
TRUE
. This function never fails. void bt_hfp_ag_call_connected | ( | bt_hfp_session_t * | session, |
bt_hfp_call_t * | call | ||
) |
HFP AG call connected.
This function should be called when incoming call has been answered locally, or outgoing call has been answered by remote party. The call is in the connected state. As a result HFP AG sends notification to connected HF device.
session | HFP session. |
call | HFP call. |
void bt_hfp_ag_call_disconnected | ( | bt_hfp_session_t * | session, |
bt_hfp_call_t * | call | ||
) |
HFP AG call disconnected.
This function should be called when a call has been terminated. It can be local or remote termination of the outgoing or connected call, as well as rejection of the incoming call. As a result HFP AG sends notification to connected HF device.
session | HFP session. |
call | HFP call. |
bt_hfp_call_t* bt_hfp_ag_incoming_call | ( | bt_hfp_session_t * | session, |
const bt_char * | number, | ||
bt_int | type | ||
) |
HFP AG incoming call.
This function should be called when AG receives notification from the cellular baseband about an incoming call. As a result HFP AG saves information about the call and send notification to all connected HF devices.
session | HFP session. |
number | string type phone number of format specified by type |
type |
|
NULL
otherwise. bt_hfp_call_t* bt_hfp_ag_outgoing_call | ( | bt_hfp_session_t * | session, |
const bt_char * | number | ||
) |
HFP AG outgoing call.
This function should be called when AG receives notification from the cellular baseband about an outgoing call. As a result HFP AG saves information about the call and send notification to all connected HF devices.
session | HFP session. |
number | string type phone number of format specified by type |
NULL
otherwise. void bt_hfp_ag_outgoing_call_alerting | ( | bt_hfp_session_t * | session, |
bt_hfp_call_t * | call | ||
) |
HFP AG outgoing call alerting.
This function should be called when AG receives notification that the outgoing call is alerting remote party. As a result HFP AG sends notification to all connected HF devices.
session | HFP session. |
call | HFP call. |
void bt_hfp_ag_reject_outgoing_call | ( | bt_hfp_session_t * | session | ) |
HFP AG reject outgoing call.
This function should be called by AG to abort a request from HF to dial a number stored in memory or re-dial last number dialed.
session | HFP session. |
bt_bool bt_hfp_ag_set_battery_level | ( | bt_hfp_session_t * | session, |
bt_byte | ind_val | ||
) |
Set Battery Level indicator value.
This function should be called by the application during session initialization and when battery level changes.
session | HFP session. |
ind_val | Current battery level. Valid values are between 0 for low battery and 5 when battery is full. |
TRUE
if the function succeeds. FALSE
if parameter if out of range. bt_bool bt_hfp_ag_set_inband_ring | ( | bt_hfp_session_t * | session, |
bt_byte | ind_val | ||
) |
Send Inband ring notification to HF device.
This function should be called by the application to indicate to the HF that the in-band ring tone setting has been locally changed.
This function should be called when Service Level Connection has been established.
session | HFP session. |
ind_val | Indicator value. 0 - the AG provides no in-band ring tone. 1 - the AG provides an in-band ring tone. |
TRUE
if the function succeeds. FALSE
if parameter if out of range, or RFCOMM connection is not established. bt_bool bt_hfp_ag_set_operator_name | ( | bt_hfp_session_t * | session, |
const bt_byte * | name | ||
) |
Set Operator name.
This function should be called by the application during session initialization.
session | HFP session. |
name | Operator's name. |
TRUE
if the function succeeds. FALSE
if parameter if out of range. bt_bool bt_hfp_ag_set_roam_state | ( | bt_hfp_session_t * | session, |
bt_byte | ind_val | ||
) |
Set Roaming State indicator value.
This function should be called by the application during session initialization and every time roaming state changes.
session | HFP session. |
ind_val | Current roaming state. Valid values are 1 when the phone is roaming, 0 when phone is in home network. |
TRUE
if the function succeeds. FALSE
if parameter if out of range. bt_bool bt_hfp_ag_set_service_state | ( | bt_hfp_session_t * | session, |
bt_byte | ind_val | ||
) |
Set Service State indicator value.
This function should be called by the application during session initialization and every time service state goes up or down.
session | HFP session. |
ind_val | Current service state. Valid values are 1 for service present, 0 otherwise. |
TRUE
if the function succeeds. FALSE
if parameter if out of range. bt_bool bt_hfp_ag_set_signal_strength | ( | bt_hfp_session_t * | session, |
bt_byte | ind_val | ||
) |
Set Signal Strength indicator value.
This function should be called by the application during session initialization and every time signal strength value changes.
session | HFP session. |
ind_val | Current signal strength. Valid values are between 0 for low signal and 5 for maximum signal. |
TRUE
if the function succeeds. FALSE
if parameter if out of range. bt_bool bt_hfp_ag_set_subscriber_number | ( | bt_hfp_session_t * | session, |
const bt_byte * | number, | ||
bt_byte | type, | ||
bt_byte | service | ||
) |
Set Subscriber number.
This function should be called by the application during session initialization.
session | HFP session. |
number | string type phone number of format specified by type |
type |
|
service | Indicates which service this phone number relates to. Shall be either 4 (voice) or 5 (fax). |
TRUE
if the function succeeds. FALSE
if parameter is out of range. bt_hfp_session_t* bt_hfp_allocate_ag_session | ( | bt_ulong | features, |
bt_byte | mic_gain, | ||
bt_byte | speaker_volume | ||
) |
Allocate HFP AG session.
This function allocates a new HFP AG session.
features | HFP entity features. This parameter can be a combination of the following values:
|
mic_gain | Initial microphone gain. The value should be in the range from 0 to 15. |
speaker_volume | Initial speaker volume. The value should be in the range from 0 to 15. |
NULL
otherwise. bt_hfp_session_t* bt_hfp_allocate_hf_session | ( | bt_ulong | features, |
bt_byte | mic_gain, | ||
bt_byte | speaker_volume | ||
) |
Allocate HFP HF session.
This function allocates a new HFP HF session.
features | HFP entity features. This parameter can be a combination of the following values:
|
mic_gain | Initial microphone gain. The value should be in the range from 0 to 15. |
speaker_volume | Initial speaker volume. The value should be in the range from 0 to 15. |
NULL
otherwise. bt_hfp_session_t* bt_hfp_allocate_session_ex | ( | bt_byte | role, |
bt_ulong | features, | ||
bt_byte | mic_gain, | ||
bt_byte | speaker_volume | ||
) |
Allocate HFP session.
This function allocates a new HFP session.
role | HFP_ROLE_HF or HFP_ROLE_AG. |
features | HFP entity features. If is HFP_ROLE_HF this parameter can be a combination of the following values:
|
mic_gain | Initial microphone gain. The value should be in the range from 0 to 15. |
speaker_volume | Initial speaker volume. The value should be in the range from 0 to 15. |
NULL
otherwise. bt_bool bt_hfp_connect | ( | bt_hfp_session_t * | session, |
bt_bdaddr_t * | pbdaddr_remote, | ||
bt_hfp_session_callback_pf | callback, | ||
void * | callback_param | ||
) |
Connect to a remote device.
This function establishes a HFP connection with a remote device which is running in Audio Gateway mode. Changes in the session state are reported through a callback function.
session | HFP session. |
remote_addr | Address of the remote device. |
callback | A callback function that is called when session state changes. |
callback_param | An arbitrary data pointer that will be passed to the callback function specified by the callback parameter. |
TRUE
if the function succeeds. FALSE
otherwise. The callback function is not called in this case. bt_bool bt_hfp_connect_audio | ( | bt_hfp_session_t * | session | ) |
Transfer audio connection from the AG to the HF.
This function establishes a SCO connection to the AG. As a result the AG will route its audio path to the HF. The result of calling this function will be HFP_EVENT_AUDIO_CONNECTION_STATE_CHANGED event.
session | HFP session. |
TRUE
if the function succeeds. FALSE
otherwise. the HFP_EVENT_AUDIO_CONNECTION_STATE_CHANGED event is not reported in this case. bt_bool bt_hfp_disconnect_audio | ( | bt_hfp_session_t * | session | ) |
Transfer audio connection from the HF to the AG.
This function terminates the SCO connection to the AG. As a result the AG will route its audio path to itself. The result of calling this function will be HFP_EVENT_AUDIO_CONNECTION_STATE_CHANGED event.
session | HFP session. |
TRUE
if the function succeeds. FALSE
otherwise. the HFP_EVENT_AUDIO_CONNECTION_STATE_CHANGED event is not reported in this case. void bt_hfp_free_session | ( | bt_hfp_session_t * | psess | ) |
Release HFP session.
This function deallocated the specified HFP session. This function does not disconnect the session. It just frees the memory used by the bt_hfp_session structure. The session has to be disconnected by a remote device or by calling bt_hfp_hf_disconnect.
session | The HFP session to be deallocated. |
bt_hci_conn_state_t* bt_hfp_get_hci_connection | ( | const bt_hfp_session_t * | session | ) |
Get HCI connection for a session.
This function returns a pointer to a structure that describes an HCI connection a session is open on. The return value can be used to call various function from the HCI layer. For example, if an app wants to force disconnection from a remote device it can call bt_hci_disconnect.
session | HFP session. |
Pointer
to a structure that describes an HCI connection if the function succeeds. NULL
if there is no HCI connection associated with the session. bt_byte bt_hfp_get_indicator_value | ( | bt_hfp_session_t * | session, |
bt_byte | indicator_id | ||
) |
Get current value of an indicator.
This function returns a value stored on the local device.
session | HFP session. |
indicator_id | the ID if the indicator |
Current
indicator's value. bt_uint bt_hfp_get_sco_rx_packet_size | ( | const bt_hfp_session_t * | session | ) |
Get the size of the audio payload in the receive direction.
This function returns the maximum size of one SCO/eSCO packet in the receive direction. An application may use the value returned by this function to allocate bt_hfp_audio_packet_t::data buffer for passing to bt_hfp_add_audio_rx_buffer. If the app chooses to use the SCO/eSCO packet size, the size of the buffer should be a multiple of the SCO/eSCO packet size.
session | HFP session. |
The
maximum size of one SCO/eSCO packet in the receive direction. 0
if there is no SCO/eSCO connection associated with the session. bt_uint bt_hfp_get_sco_tx_packet_size | ( | const bt_hfp_session_t * | session | ) |
Get the size of the audio payload in the transmit direction.
This function returns the maximum size of one SCO/eSCO packet in the transmit direction. An application should use the value returned by this function to allocate bt_hfp_audio_packet_t::data buffer for passing to bt_hfp_add_audio_tx_buffer. The size of the buffer should be a multiple (usually 1 or 2 is sufficient) of the SCO/eSCO packet size.
session | HFP session. |
The
maximum size of one SCO/eSCO packet in the transmit direction. 0
if there is no SCO/eSCO connection associated with the session. bt_bool bt_hfp_has_call_with_status | ( | bt_hfp_session_t * | session, |
bt_byte | status | ||
) |
Determines if there is one or more calls in the AG with the specified status.
This function does not send any commands to the AG. It uses a list of calls stored on the local device.
session | HFP session. |
status | a bit mask of HFP_CALL_STATUS_ constants that defines statuses of calls to be checked. |
TRUE
if there are calls with specified statuses. FALSE
otherwise. bt_bool bt_hfp_hf_answer | ( | bt_hfp_session_t * | session | ) |
Answer the incoming call.
If there is an incoming call in the AG the app may call this function to accept it. The result of calling this function will be HFP_EVENT_CMD_COMPLETED event followed by HFP_EVENT_CALL_STARTED event.
session | HSP session. |
TRUE
if the function succeeds. FALSE
otherwise. bt_bool bt_hfp_hf_dial_number | ( | bt_hfp_session_t * | session, |
bt_char * | number | ||
) |
Place a call.
Intiate an outgoing call. The result of calling this function will be HFP_EVENT_CMD_COMPLETED event.
session | HFP session. |
number | Phone number to dial. |
TRUE
if the function succeeds. FALSE
otherwise. bt_bool bt_hfp_hf_disable_nrec | ( | bt_hfp_session_t * | session | ) |
Disable Echo Canceling and Noise Reduction functions in the AG.
This function should be called by the application to disable any Echo Canceling and Noise Reduction functions embedded in the AG. The result of calling this function will be HFP_EVENT_NREC_DISABLED event.
This function should be called when Service Level Connection has been established and before any Audio Connection between the HF and the AG is established.
session | HFP session. |
TRUE
if the function succeeds. FALSE
if parameter if out of range, or RFCOMM connection is not established. bt_bool bt_hfp_hf_disconnect | ( | bt_hfp_session_t * | session | ) |
Close connection.
This function closes a HFP connection with a remote device. Changes in the session state are reported through a callback function set when connection was created by calling bt_hfp_connect or bt_hfp_listen.
session | HSP session. |
TRUE
if the function succeeds. FALSE
otherwise. bt_bool bt_hfp_hf_enable_call_waiting_notification | ( | bt_hfp_session_t * | session, |
bt_bool | enable | ||
) |
Enable/disable call waiting notification.
Request AG to enable or disable call waiting notification. If call waiting notification is enabled, the AG will notify the HF whenever an incoming call is waiting during an ongoing call. The result of calling this function will be HFP_EVENT_CMD_COMPLETED event. There is usually no need to call this function directly as the call waiting notification is enabled during SLC setup.
session | HFP session. |
enable | TRUE - to enable call waiting notification, FALSE - to disable it. |
TRUE
if the function succeeds. FALSE
otherwise. bt_bool bt_hfp_hf_enable_calling_line_identification | ( | bt_hfp_session_t * | session, |
bt_bool | enable | ||
) |
Enable/disable calling line identification notification.
Request AG to enable or disable calling line identification notification. If calling line identification notification is enabled and the calling number is available from the network, the AG will notify the HF whenever there is an incoming call. The application will receive HFP_EVENT_CLIP_RECEIVED event. The result of calling this function will be HFP_EVENT_CMD_COMPLETED event. There is usually no need to call this function directly as the calling line identification notification is enabled during SLC setup.
session | HFP session. |
enable | TRUE - to enable calling line identification notification, FALSE - to disable it. |
TRUE
if the function succeeds. FALSE
otherwise. bt_bool bt_hfp_hf_enable_voice_recognition | ( | bt_hfp_session_t * | session, |
bt_bool | enable | ||
) |
Enable/disable calling voice control in the AG.
Request AG to enable or disable voice control. The result of calling this function will be HFP_EVENT_CMD_COMPLETED event.
session | HFP session. |
enable | TRUE - to enable voice control, FALSE - to disable it. |
TRUE
if the function succeeds. FALSE
otherwise. bt_bool bt_hfp_hf_find_ag | ( | bt_hfp_session_t * | session, |
bt_bdaddr_t * | deviceAddress, | ||
bt_hfp_find_remote_callback_pf | callback | ||
) |
Find AG.
This function connects to a remote device and tries to find the AG on it. If the remote device implements HFP AG this function returns (via callback) the RFCOMM channel which should be used to connect to it.
session | HFP session. |
deviceAddress | Remote device's address. |
callback | A pointer to a function which is called when AG search is complete. |
TRUE
if the function succeeds. FALSE
otherwise. the callback is not called in this case. bt_byte bt_hfp_hf_get_hf_indicator | ( | bt_hfp_session_t * | session, |
bt_byte | id | ||
) |
Get HF indicator value.
This function returns indicator's value stored in session
.
session | HFP session. |
id | Indicator Id. The id can be one of the following values:
|
TRUE
if the function succeeds. FALSE
if indicator's Id is invalid. bt_bool bt_hfp_hf_get_subscriber_number | ( | bt_hfp_session_t * | session | ) |
Request subscriber number information from the AG.
This function sends a command to the AG which causes it to send back subscriber number information. The result of calling this function will be HFP_EVENT_CMD_COMPLETED event followed by HFP_EVENT_SUBSCRIBER_NUMBER_RECEIVED event. The caller can retrieve the information from the bt_hfp_session::subscriber_number.
session | HFP session. |
TRUE
if the function succeeds. FALSE
otherwise. The callback function is not called in this case. bt_bool bt_hfp_hf_hold | ( | bt_hfp_session_t * | session, |
bt_byte | cmd, | ||
bt_byte | call_index | ||
) |
Enhanced call control.
If there is an incoming call in the AG the app may call this function to reject it. The result of calling this function will be HFP_EVENT_CMD_COMPLETED event.
session | HFP session. |
cmd | Command Id. |
call | index Call index. |
TRUE
if the function succeeds. FALSE
otherwise. bt_bool bt_hfp_hf_query_operator | ( | bt_hfp_session_t * | session | ) |
Request operator's name from AG.
This function requests operator's name from the AG. The result of this call is reported to the app in the form of the HFP_EVENT_QUERY_OPERATOR_COMPLETED event.
There is usually no need to call this function directly as the operator's name is requested and reported to the app during SLC setup.
session | HSP session. |
TRUE
if the function succeeds. FALSE
otherwise. bt_bool bt_hfp_hf_redial | ( | bt_hfp_session_t * | session | ) |
Redial last dialed number.
Request AG to dial last dialed number. The result of calling this function will be HFP_EVENT_CMD_COMPLETED event.
session | HFP session. |
TRUE
if the function succeeds. FALSE
otherwise. bt_bool bt_hfp_hf_refresh_call_list | ( | bt_hfp_session_t * | session | ) |
Request a call list from the AG.
This function send a command to the AG which causes it to send back a list of all calls it currently has. The result of calling this function will be HFP_EVENT_CMD_COMPLETED event followed by HFP_EVENT_CALL_LIST_RECEIVED event.
session | HFP session. |
TRUE
if the function succeeds. FALSE
otherwise. bt_bool bt_hfp_hf_reject | ( | bt_hfp_session_t * | session | ) |
Reject the incoming call.
If there is an incoming call in the AG the app may call this function to reject it. The result of calling this function will be HFP_EVENT_CMD_COMPLETED event.
session | HFP session. |
TRUE
if the function succeeds. FALSE
otherwise. bt_bool bt_hfp_hf_set_battery_level | ( | bt_hfp_session_t * | session, |
bt_byte | level | ||
) |
Set local HF device's battery charge level.
This function stores current battery charge level in session
and sends it to AG device if the AG supports battery level reporting. The battery level, depending on AG capabilities, is sent using Apple extension or native HFP command.
session | HFP session. |
level | Battery charge level. Valid range is 0 - 100. |
TRUE
if the function succeeds. FALSE
if sending a command to AG failed. bt_bool bt_hfp_hf_set_hf_indicator | ( | bt_hfp_session_t * | session, |
bt_byte | id, | ||
bt_byte | value | ||
) |
Set HF indicator value.
This function stores indicator's value in session
and sends it to AG device if the AG supports HF indicators reporting.
session | HFP session. |
id | Indicator Id. The id can be one of the following values:
|
id | Indicator value. |
TRUE
if the function succeeds. FALSE
if indicator's Id is invalid or sending a command to AG failed. bt_bool bt_hfp_hf_xapl_set_battery_level | ( | bt_hfp_session_t * | session, |
bt_byte | level | ||
) |
Set local HF device's battery charge level.
This function sends current battery charge level to AG device using Apple's custom command if the AG supports Apple extensions to HFP.
session | HFP session. |
level | Battery charge level. Valid range is 0 - 9. |
TRUE
if the function succeeds. FALSE
if sending a command to AG failed. bt_bool bt_hfp_hf_xapl_set_dock_state | ( | bt_hfp_session_t * | session, |
bt_byte | state | ||
) |
Set local HF device's dock state.
This function sends current dock state to AG device using Apple's custom command if the AG supports Apple extensions to HFP.
session | HFP session. |
state | Dock state. 0 - undocked, 1 - docked. |
TRUE
if the function succeeds. FALSE
if sending a command to AG failed. bt_bool bt_hfp_hf_xapl_set_headset_state | ( | bt_hfp_session_t * | session, |
const bt_byte * | keys, | ||
const bt_byte * | values, | ||
bt_byte | value_count | ||
) |
Reports a headset state.
This function sends current state of a headset to AG device using Apple's custom command if the AG supports Apple extensions to HFP.
session | HFP session. |
keys | A list of states to report. An item of keys can be one the following values:
|
values | A list of state values to report. |
value_count | The number of states in keys and values . |
TRUE
if the function succeeds. FALSE
if sending a command to AG failed. bt_bool bt_hfp_init | ( | void | ) |
Initialize HFP layer.
This function initializes the HFP layer of the stack. It must be called prior to any other HFP function can be called.
bt_bool bt_hfp_listen | ( | bt_hfp_session_t * | session, |
bt_byte | server_channel, | ||
bt_hfp_session_callback_pf | callback, | ||
void * | callback_param | ||
) |
Listen for incoming connections.
This function enables incoming connections on the specified HFP session. Changes in the session state are reported through a callback function.
session | HFP session. |
server_channel | An RFCOMM server channel on which the RFCOMM session specified in the call to bt_hfp_allocate_session will be listening. |
callback | A callback function that is called when session state changes or data (command or response) is received from the remote party. |
callback_param | An arbitrary data pointer that will be passed to the callback function specified by the callback parameter. |
TRUE
if the function succeeds. FALSE
otherwise. The callback function is not called in this case. bt_bool bt_hfp_set_mic_gain | ( | bt_hfp_session_t * | session, |
bt_byte | gain | ||
) |
Report microphone gain on the HF to the AG.
This function reports microphone gain on the HF to the AF. This function is called by the HF upon SLC setup to notify the AG about the current level of the microphone gain on the HF. In case physical mechanisms (buttons, dials etc.) means are implemented on the HF to control the volume levels, the HF calls this function to inform the AG of any changes in the microphone gain.
session | HFP session. |
gain | Microphone gain (0 - 15) |
TRUE
if the function succeeds. FALSE
otherwise. bt_bool bt_hfp_set_speaker_volume | ( | bt_hfp_session_t * | session, |
bt_byte | volume | ||
) |
Report speaker volume on the HF to the AG.
This function reports speaker volume on the HF to the AG. This function is called by the HF upon SLC setup to notify the AG about the current level of the speaker volume on the HF. In case physical mechanisms (buttons, dials etc.) means are implemented on the HS to control the volume levels, the HF calls this function to inform the AG of any changes in the speaker volume.
session | HFP session. |
gain | Speaker volume (0 - 15) |
TRUE
if the function succeeds. FALSE
otherwise.