AIROC™ BTSDK v4.9 - Documentation | ||||
APIs to enable the upper layers to stream audio/video data over Bluetooth. More...
Functions | |
uint16_t | wiced_bt_avdt_register (wiced_bt_avdt_reg_t *p_reg, wiced_bt_avdt_ctrl_cback_t *p_cback) |
Function wiced_bt_avdt_register. More... | |
void | wiced_bt_avdt_deregister (void) |
Function wiced_bt_avdt_deregister. More... | |
uint16_t | wiced_bt_avdt_create_stream (uint8_t *p_handle, wiced_bt_avdt_cs_t *p_cs) |
Function wiced_bt_avdt_create_stream. More... | |
uint16_t | wiced_bt_avdt_remove_stream (uint8_t handle) |
Function wiced_bt_avdt_remove_stream. More... | |
uint16_t | wiced_bt_avdt_update_stream (uint8_t sep_type, wiced_bool_t available) |
Function wiced_bt_avdt_update_stream. More... | |
uint16_t | wiced_bt_avdt_discover_req (wiced_bt_device_address_t bd_addr, wiced_bt_avdt_sep_info_t *p_sep_info, uint8_t max_seps, wiced_bt_avdt_ctrl_cback_t *p_cback) |
Function wiced_bt_avdt_discover_req. More... | |
uint16_t | wiced_bt_avdt_get_cap_req (wiced_bt_device_address_t bd_addr, uint8_t seid, wiced_bt_avdt_cfg_t *p_cfg, wiced_bt_avdt_ctrl_cback_t *p_cback) |
Function wiced_bt_avdt_get_cap_req. More... | |
uint16_t | wiced_bt_avdt_get_all_cap_req (wiced_bt_device_address_t bd_addr, uint8_t seid, wiced_bt_avdt_cfg_t *p_cfg, wiced_bt_avdt_ctrl_cback_t *p_cback) |
Function wiced_bt_avdt_get_all_cap_req. More... | |
uint16_t | wiced_bt_avdt_delay_report (uint8_t handle, uint8_t seid, uint16_t delay) |
Function wiced_bt_avdt_delay_report. More... | |
uint16_t | wiced_bt_avdt_open_req (uint8_t handle, wiced_bt_device_address_t bd_addr, uint8_t seid, wiced_bt_avdt_cfg_t *p_cfg) |
Function wiced_bt_avdt_open_req. More... | |
uint16_t | wiced_bt_avdt_config_rsp (uint8_t handle, uint8_t label, uint8_t error_code, uint8_t category) |
Function wiced_bt_avdt_config_rsp. More... | |
uint16_t | wiced_bt_avdt_security_set_scms (uint8_t handle, wiced_bool_t enable, uint8_t scms_hdr) |
Function wiced_bt_avdt_security_set_scms. More... | |
uint16_t | wiced_bt_avdt_start_req (uint8_t *p_handles, uint8_t num_handles) |
Function wiced_bt_avdt_start_req. More... | |
uint16_t | wiced_bt_avdt_start_resp (uint8_t handle, uint8_t label, uint8_t status) |
Function wiced_bt_avdt_start_resp. More... | |
uint16_t | wiced_bt_avdt_suspend_req (uint8_t *p_handles, uint8_t num_handles) |
Function wiced_bt_avdt_suspend_req. More... | |
uint16_t | wiced_bt_avdt_close_req (uint8_t handle) |
Function wiced_bt_avdt_close_req. More... | |
uint16_t | wiced_bt_avdt_reconfig_req (uint8_t handle, wiced_bt_avdt_cfg_t *p_cfg) |
Function wiced_bt_avdt_reconfig_req. More... | |
uint16_t | wiced_bt_avdt_reconfig_rsp (uint8_t handle, uint8_t label, uint8_t error_code, uint8_t category) |
Function wiced_bt_avdt_reconfig_rsp. More... | |
uint16_t | wiced_bt_avdt_security_req (uint8_t handle, uint8_t *p_data, uint16_t len) |
Function wiced_bt_avdt_security_req. More... | |
uint16_t | wiced_bt_avdt_security_rsp (uint8_t handle, uint8_t label, uint8_t error_code, uint8_t *p_data, uint16_t len) |
Function wiced_bt_avdt_security_rsp. More... | |
uint16_t | wiced_bt_avdt_write_req (uint8_t handle, uint8_t *p_media_buf, uint16_t buf_len, uint32_t time_stamp, uint8_t m_pt, wiced_bt_avdt_data_opt_mask_t opt) |
Function wiced_bt_avdt_write_req. More... | |
uint16_t | wiced_bt_avdt_connect_req (wiced_bt_device_address_t bd_addr, uint8_t sec_mask, wiced_bt_avdt_ctrl_cback_t *p_cback) |
Function wiced_bt_avdt_connect_req. More... | |
uint16_t | wiced_bt_avdt_disconnect_req (wiced_bt_device_address_t bd_addr, wiced_bt_avdt_ctrl_cback_t *p_cback) |
Function wiced_bt_avdt_disconnect_req. More... | |
uint16_t | wiced_bt_avdt_get_l2cap_channel (uint8_t handle) |
Function wiced_bt_avdt_get_l2cap_channel. More... | |
uint16_t | wiced_bt_avdt_get_signal_channel (uint8_t handle, wiced_bt_device_address_t bd_addr) |
Function wiced_bt_avdt_get_signal_channel. More... | |
uint8_t | wiced_bt_avdt_set_trace_level (uint8_t new_level) |
APIs to enable the upper layers to stream audio/video data over Bluetooth.
uint16_t wiced_bt_avdt_close_req | ( | uint8_t | handle | ) |
Function wiced_bt_avdt_close_req.
Description Close a stream endpoint. This stops the transfer of media packets and closes the transport channel associated with this stream endpoint. When the stream is closed, an AVDT_CLOSE_CFM_EVT is sent to the application via the control callback function for this handle.
[in] | handle | : AVDT connection handle |
uint16_t wiced_bt_avdt_config_rsp | ( | uint8_t | handle, |
uint8_t | label, | ||
uint8_t | error_code, | ||
uint8_t | category | ||
) |
Function wiced_bt_avdt_config_rsp.
Respond to a configure request from the peer device. This function must be called if the application receives an AVDT_CONFIG_IND_EVT through its control callback.
[in] | handle | : AVDT connection handle |
[in] | label | : Transaction label |
[in] | error_code | : Error code (see AVDT error codes) |
[in] | category | : Service category (see AVDT service categories) |
uint16_t wiced_bt_avdt_connect_req | ( | wiced_bt_device_address_t | bd_addr, |
uint8_t | sec_mask, | ||
wiced_bt_avdt_ctrl_cback_t * | p_cback | ||
) |
Function wiced_bt_avdt_connect_req.
This function initiates an AVDTP signaling connection to the peer device. When the connection is completed, an AVDT_CONNECT_IND_EVT is sent to the application via its control callback function. If the connection attempt fails an AVDT_DISCONNECT_IND_EVT is sent. The security mask parameter overrides the outgoing security mask set in wiced_bt_avdt_register().
[in] | bd_addr | : Peer bd_addr |
[in] | sec_mask | : Security requirement |
[in] | p_cback | : Callback for event notifications |
Note BD_Address must be in Big Endian format
uint16_t wiced_bt_avdt_create_stream | ( | uint8_t * | p_handle, |
wiced_bt_avdt_cs_t * | p_cs | ||
) |
Function wiced_bt_avdt_create_stream.
Create a stream endpoint. After a stream endpoint is created an application can initiate a connection between this endpoint and an endpoint on a peer device. In addition, a peer device can discover, get the capabilities, and connect to this endpoint.
[out] | p_handle | : Connection handle (valid if AVRC_SUCCESS is returned) |
[in] | p_cs | : Stream configuration |
uint16_t wiced_bt_avdt_delay_report | ( | uint8_t | handle, |
uint8_t | seid, | ||
uint16_t | delay | ||
) |
Function wiced_bt_avdt_delay_report.
This functions sends a Delay Report to the peer device that is associated with a particular SEID. This function is called by SNK device.
[in] | handle | : AVDT connection handle |
[in] | seid | : Stream end point ID |
[in] | delay | : Amount of delay in ms |
void wiced_bt_avdt_deregister | ( | void | ) |
Function wiced_bt_avdt_deregister.
Called to deregister use AVDTP protocol. Before this function can be called, all streams must be removed with wiced_bt_avdt_remove_stream().
[in] | None |
uint16_t wiced_bt_avdt_disconnect_req | ( | wiced_bt_device_address_t | bd_addr, |
wiced_bt_avdt_ctrl_cback_t * | p_cback | ||
) |
Function wiced_bt_avdt_disconnect_req.
This function disconnect an AVDTP signaling connection to the peer device. When disconnected an AVDT_DISCONNECT_IND_EVT is sent to the application via its control callback function.
[in] | bd_addr | : Peer bd_addr |
[in] | p_cback | : Callback for event notifications |
Note BD_Address must be in Big Endian format
uint16_t wiced_bt_avdt_discover_req | ( | wiced_bt_device_address_t | bd_addr, |
wiced_bt_avdt_sep_info_t * | p_sep_info, | ||
uint8_t | max_seps, | ||
wiced_bt_avdt_ctrl_cback_t * | p_cback | ||
) |
Function wiced_bt_avdt_discover_req.
This function initiates a connection to the AVDTP service on the peer device, if not already present, and discovers the stream endpoints on the peer device. (Please note that AVDTP discovery is unrelated to SDP discovery). This function can be called at any time regardless of whether there is an AVDTP connection to the peer device.
When discovery is complete, an AVDT_DISCOVER_CFM_EVT is sent to the application via its callback function. The application must not call wiced_bt_avdt_get_cap_req() or wiced_bt_avdt_discover_req() again to the same device until discovery is complete.
The memory addressed by sep_info is allocated by the application. This memory is written to by AVDTP as part of the discovery procedure. This memory must remain accessible until the application receives the AVDT_DISCOVER_CFM_EVT.
[in] | bd_addr | : Peer bd_addr |
[in] | p_cback | : Callback for discovery results |
[in] | max_seps | : Maximun number of stream end point to discover |
[out] | p_sep_info | : Pointer to the stream end point |
Note BD_Address must be in Big Endian format
uint16_t wiced_bt_avdt_get_all_cap_req | ( | wiced_bt_device_address_t | bd_addr, |
uint8_t | seid, | ||
wiced_bt_avdt_cfg_t * | p_cfg, | ||
wiced_bt_avdt_ctrl_cback_t * | p_cback | ||
) |
Function wiced_bt_avdt_get_all_cap_req.
This function initiates a connection to the AVDTP service on the peer device, if not already present, and gets the capabilities of a stream endpoint on the peer device. This function can be called at any time regardless of whether there is an AVDTP connection to the peer device.
When the procedure is complete, an AVDT_GETCAP_CFM_EVT is sent to the application via its callback function. The application must not call wiced_bt_avdt_get_cap_req() or wiced_bt_avdt_discover_req() again until the procedure is complete.
The memory pointed to by p_cfg is allocated by the application. This memory is written to by AVDTP as part of the get capabilities procedure. This memory must remain accessible until the application receives the AVDT_GETCAP_CFM_EVT.
[in] | bd_addr | : Peer bd_addr |
[in] | seid | : Stream end point ID (From wiced_bt_avdt_discover_req) |
[in] | p_cback | : Callback for results |
[out] | p_cfg | : Pointer to the stream end point configuration |
Note BD_Address must be in Big Endian format
uint16_t wiced_bt_avdt_get_cap_req | ( | wiced_bt_device_address_t | bd_addr, |
uint8_t | seid, | ||
wiced_bt_avdt_cfg_t * | p_cfg, | ||
wiced_bt_avdt_ctrl_cback_t * | p_cback | ||
) |
Function wiced_bt_avdt_get_cap_req.
This function initiates a connection to the AVDTP service on the peer device, if not already present, and gets the capabilities of a stream endpoint on the peer device. This function can be called at any time regardless of whether there is an AVDTP connection to the peer device.
When the procedure is complete, an AVDT_GETCAP_CFM_EVT is sent to the application via its callback function. The application must not call wiced_bt_avdt_get_cap_req() or wiced_bt_avdt_discover_req() again until the procedure is complete.
The memory pointed to by p_cfg is allocated by the application. This memory is written to by AVDTP as part of the get capabilities procedure. This memory must remain accessible until the application receives the AVDT_GETCAP_CFM_EVT.
[in] | bd_addr | : Peer bd_addr |
[in] | seid | : Stream end point ID (From wiced_bt_avdt_discover_req) |
[in] | p_cback | : Callback for results |
[out] | p_cfg | : Pointer to the stream end point configuration |
Note BD_Address must be in Big Endian format
uint16_t wiced_bt_avdt_get_l2cap_channel | ( | uint8_t | handle | ) |
Function wiced_bt_avdt_get_l2cap_channel.
Get the L2CAP CID used by the handle.
[in] | handle | : AVDT connection handle |
uint16_t wiced_bt_avdt_get_signal_channel | ( | uint8_t | handle, |
wiced_bt_device_address_t | bd_addr | ||
) |
Function wiced_bt_avdt_get_signal_channel.
Get the L2CAP CID used by the signal channel of the given handle.
[in] | handle | : AVDT connection handle |
[in] | bd_addr | : Peer bd_addr |
Note BD_Address must be in Big Endian format
uint16_t wiced_bt_avdt_open_req | ( | uint8_t | handle, |
wiced_bt_device_address_t | bd_addr, | ||
uint8_t | seid, | ||
wiced_bt_avdt_cfg_t * | p_cfg | ||
) |
Function wiced_bt_avdt_open_req.
This function initiates a connection to the AVDTP service on the peer device, if not already present, and connects to a stream endpoint on a peer device. When the connection is completed, an AVDT_OPEN_CFM_EVT is sent to the application via the control callback function for this handle.
[in] | handle | : AVDT connection handle |
[in] | bd_addr | : Peer bd_addr |
[in] | seid | : Stream end point ID |
[in] | p_cfg | : Pointer to the stream end point configuration |
Note BD_Address must be in Big Endian format
uint16_t wiced_bt_avdt_reconfig_req | ( | uint8_t | handle, |
wiced_bt_avdt_cfg_t * | p_cfg | ||
) |
Function wiced_bt_avdt_reconfig_req.
Reconfigure a stream endpoint. This allows the application to change the codec or content protection capabilities of a stream endpoint after it has been opened. This function can only be called if the stream is opened but not started or if the stream has been suspended. When the procedure is completed, an AVDT_RECONFIG_CFM_EVT is sent to the application via the control callback function for this handle.
[in] | handle | : AVDT connection handle |
[in] | p_cfg | : Pointer to the stream end point configuration |
uint16_t wiced_bt_avdt_reconfig_rsp | ( | uint8_t | handle, |
uint8_t | label, | ||
uint8_t | error_code, | ||
uint8_t | category | ||
) |
Function wiced_bt_avdt_reconfig_rsp.
Respond to a reconfigure request from the peer device. This function must be called if the application receives an AVDT_RECONFIG_IND_EVT through its control callback.
[in] | handle | : AVDT connection handle |
[in] | label | : Transaction label |
[in] | error_code | : Error code (see AVDT error codes) |
[in] | category | : Service category (see AVDT service categories) |
uint16_t wiced_bt_avdt_register | ( | wiced_bt_avdt_reg_t * | p_reg, |
wiced_bt_avdt_ctrl_cback_t * | p_cback | ||
) |
Function wiced_bt_avdt_register.
Initialize AVDTP subsystem and register callback for event notification. This function must be called prior to calling other AVDT APIs.
[in] | p_reg | : AVDT registration parameters |
[in] | p_cback | : Callback for AVDT event notification |
uint16_t wiced_bt_avdt_remove_stream | ( | uint8_t | handle | ) |
Function wiced_bt_avdt_remove_stream.
Remove a stream endpoint. This function is called when the application is no longer using a stream endpoint. If this function is called when the endpoint is connected the connection is closed and then the stream endpoint is removed.
[in] | handle | : Connection handle |
uint16_t wiced_bt_avdt_security_req | ( | uint8_t | handle, |
uint8_t * | p_data, | ||
uint16_t | len | ||
) |
Function wiced_bt_avdt_security_req.
Send a security request to the peer device. When the security procedure is completed, an AVDT_SECURITY_CFM_EVT is sent to the application via the control callback function for this handle. (Please note that AVDTP security procedures are unrelated to Bluetooth link level security.)
[in] | handle | : AVDT connection handle |
[in] | p_data | : Pointer to the content protection data |
[in] | len | : Length of the data |
uint16_t wiced_bt_avdt_security_rsp | ( | uint8_t | handle, |
uint8_t | label, | ||
uint8_t | error_code, | ||
uint8_t * | p_data, | ||
uint16_t | len | ||
) |
Function wiced_bt_avdt_security_rsp.
Respond to a security request from the peer device. This function must be called if the application receives an AVDT_SECURITY_IND_EVT through its control callback. (Please note that AVDTP security procedures are unrelated to Bluetooth link level security.)
[in] | handle | : AVDT connection handle |
[in] | label | : Transaction label |
[in] | error_code | : Error code (see AVDT error codes) |
[in] | p_data | : Pointer to the content protection data |
[in] | len | : Length of the data |
uint16_t wiced_bt_avdt_security_set_scms | ( | uint8_t | handle, |
wiced_bool_t | enable, | ||
uint8_t | scms_hdr | ||
) |
Function wiced_bt_avdt_security_set_scms.
Set the SCMS Content Protection. This function must be called when the peer device is connected.
[in] | handle | : AVDT connection handle |
[in] | enable | : If true enable content protection, flase disable |
[in] | scms_hdr | : SCMS content protection header |
uint16_t wiced_bt_avdt_start_req | ( | uint8_t * | p_handles, |
uint8_t | num_handles | ||
) |
Function wiced_bt_avdt_start_req.
Start one or more stream endpoints. This initiates the transfer of media packets for the streams. All stream endpoints must previously be opened. When the streams are started, an AVDT_START_CFM_EVT is sent to the application via the control callback function for each stream.
[in] | p_handles | : Pointer to the AVDT connection handles, each byte is a connection handle |
[in] | num_handles | : Number of connections to start |
uint16_t wiced_bt_avdt_start_resp | ( | uint8_t | handle, |
uint8_t | label, | ||
uint8_t | status | ||
) |
Function wiced_bt_avdt_start_resp.
Sends A2DP start response . This initiates the transfer of media packets for the streams. All stream ndpoints must previously e be opened.This function must be called if the application receives an AVDT_START_IND_EVT through its control callback.
[in] | handle | : AVDT connection handle |
[in] | label | : Transaction label |
[in] | status | : Indicates if start request is accepted(AVDT_SUCCESS) or rejected(AVDT Error codes) |
uint16_t wiced_bt_avdt_suspend_req | ( | uint8_t * | p_handles, |
uint8_t | num_handles | ||
) |
Function wiced_bt_avdt_suspend_req.
Suspend one or more stream endpoints. This suspends the transfer of media packets for the streams. All stream endpoints must previously be open and started. When the streams are suspended, an AVDT_SUSPEND_CFM_EVT is sent to the application via the control callback function for each stream.
[in] | p_handles | : Pointer to the AVDT connection handles, each byte is a connection handle |
[in] | num_handles | : Number of connections to suspend |
uint16_t wiced_bt_avdt_update_stream | ( | uint8_t | sep_type, |
wiced_bool_t | available | ||
) |
Function wiced_bt_avdt_update_stream.
Change all the sink SEPs to available or unavailable
[in] | sep_type | : (see AVDT sep type) |
[in] | available | : If true set all SEPs to available, false set all SEPs to unavailable |
uint16_t wiced_bt_avdt_write_req | ( | uint8_t | handle, |
uint8_t * | p_media_buf, | ||
uint16_t | buf_len, | ||
uint32_t | time_stamp, | ||
uint8_t | m_pt, | ||
wiced_bt_avdt_data_opt_mask_t | opt | ||
) |
Function wiced_bt_avdt_write_req.
Send a media packet to the peer device. The stream must be started before this function is called. Also, this function can only be called if the stream is a SRC.
When AVDTP has sent the media packet, an AVDT_WRITE_CFM_EVT is sent to the application via the control callback. The application can decide whether to wait for the AVDT_WRITE_CFM_EVT, before making the next wiced_bt_avdt_write_req() call. The application may make its first call to wiced_bt_avdt_write_req() after it receives an AVDT_START_CFM_EVT or AVDT_START_IND_EVT.
The opt parameter allows passing specific options like: - NO_RTP : do not add the RTP header to buffer
[in] | handle | : AVDT connection handle |
[in] | p_media_buf | : Pointer to the media buffer to write |
[in] | buf_len | : Size of the buffer |
[in] | time_stamp | : Time stamp |
[in] | m_pt | : Marker and payload byte |
[in] | opt | : Date option mask (see AVDT data options) |