Infineon Logo AIROC BTSDK v4.9 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
AVRCP Controller Role (CT)

AVRC remote control functions. More...

Functions

wiced_result_t wiced_bt_avrc_ct_init (uint32_t local_features, uint8_t *supported_events, wiced_bt_avrc_ct_connection_state_cback_t p_connection_cb, wiced_bt_avrc_ct_cmd_cback_t p_cmd_cb, wiced_bt_avrc_ct_rsp_cback_t p_rsp_cb, wiced_bt_avrc_ct_pt_rsp_cback_t p_ptrsp_cb)
 Function wiced_bt_avrc_ct_init. More...
 
wiced_result_t wiced_bt_avrc_ct_features_register (wiced_bt_avrc_ct_features_cback_t features_callback)
 Function wiced_bt_avrc_ct_features_register. More...
 
wiced_result_t wiced_bt_avrc_ct_deinit (void)
 Function wiced_bt_avrc_ct_deinit. More...
 
wiced_result_t wiced_bt_avrc_ct_connect (wiced_bt_device_address_t remote_addr)
 Function wiced_bt_avrc_ct_connect. More...
 
wiced_result_t wiced_bt_avrc_ct_disconnect (uint8_t handle)
 Function wiced_bt_avrc_ct_disconnect. More...
 
wiced_result_t wiced_bt_avrc_ct_send_pass_through_cmd (uint8_t handle, uint8_t cmd, uint8_t state, uint16_t grp_nav_vendor)
 Function wiced_bt_avrc_ct_send_pass_through_cmd. More...
 
wiced_result_t wiced_bt_avrc_ct_send_unit_info_cmd (uint16_t handle)
 Function wiced_bt_avrc_ct_send_unit_info_cmd. More...
 
wiced_result_t wiced_bt_avrc_ct_send_sub_unit_info_cmd (uint16_t handle)
 Function wiced_bt_avrc_ct_send_sub_unit_info_cmd. More...
 
wiced_result_t wiced_bt_avrc_ct_get_element_attr_cmd (uint8_t handle, wiced_bt_avrc_uid_t element_id, uint8_t num_attr, uint8_t *p_attrs)
 Function wiced_bt_avrc_ct_get_element_attr_cmd. More...
 
wiced_result_t wiced_bt_avrc_ct_get_play_status_cmd (uint8_t handle)
 Function wiced_bt_avrc_ct_get_play_status_cmd. More...
 
wiced_result_t wiced_bt_avrc_ct_list_player_attrs_cmd (uint8_t handle)
 Function wiced_bt_avrc_ct_list_player_attrs_cmd. More...
 
wiced_result_t wiced_bt_avrc_ct_list_player_values_cmd (uint8_t handle, uint8_t attr)
 Function wiced_bt_avrc_ct_list_player_values_cmd. More...
 
wiced_result_t wiced_bt_avrc_ct_get_player_value_cmd (uint8_t handle, uint8_t num_attr, uint8_t *p_attrs)
 Function wiced_bt_avrc_ct_get_player_value_cmd. More...
 
wiced_result_t wiced_bt_avrc_ct_set_player_value_cmd (uint8_t handle, wiced_bt_avrc_metadata_set_app_value_cmd_t *p_val_stream)
 Function wiced_bt_avrc_ct_set_player_value_cmd. More...
 
wiced_result_t wiced_bt_avrc_ct_get_player_attrs_text_cmd (uint8_t handle, uint8_t num_attr, uint8_t *p_attrs)
 Function wiced_bt_avrc_ct_get_player_attrs_text_cmd. More...
 
wiced_result_t wiced_bt_avrc_ct_get_player_values_text_cmd (uint8_t handle, uint8_t attr, uint8_t num_val, uint8_t *p_values)
 Function wiced_bt_avrc_ct_get_player_values_text_cmd. More...
 
wiced_result_t wiced_bt_avrc_ct_set_addressed_player_cmd (uint8_t handle, uint16_t player_id)
 Function wiced_bt_avrc_ct_set_addressed_player_cmd. More...
 
wiced_result_t wiced_bt_avrc_ct_set_browsed_player_cmd (uint8_t handle, uint16_t player_id)
 Function wiced_bt_avrc_ct_set_browsed_player_cmd. More...
 
wiced_result_t wiced_bt_avrc_ct_change_path_cmd (uint8_t handle, uint8_t direction, wiced_bt_avrc_uid_t path_uid)
 Function wiced_bt_avrc_ct_change_path_cmd. More...
 
wiced_result_t wiced_bt_avrc_ct_get_folder_items_cmd (uint8_t handle, uint8_t scope, uint32_t start_item, uint32_t end_item, uint8_t num_attr, uint32_t *p_attrs)
 Function wiced_bt_avrc_ct_get_folder_items_cmd. More...
 
wiced_result_t wiced_bt_avrc_ct_get_item_attributes_cmd (uint8_t handle, uint8_t scope, wiced_bt_avrc_uid_t path_uid, uint8_t num_attr, uint32_t *p_attrs)
 Function wiced_bt_avrc_ct_get_item_attributes_cmd. More...
 
wiced_result_t wiced_bt_avrc_ct_search_cmd (uint8_t handle, wiced_bt_avrc_full_name_t search_string)
 Function wiced_bt_avrc_ct_search_cmd. More...
 
wiced_result_t wiced_bt_avrc_ct_play_item_cmd (uint8_t handle, uint8_t scope, wiced_bt_avrc_uid_t item_uid)
 Function wiced_bt_avrc_ct_play_item_cmd. More...
 
wiced_result_t wiced_bt_avrc_ct_add_to_now_playing_cmd (uint8_t handle, uint8_t scope, wiced_bt_avrc_uid_t item_uid)
 Function wiced_bt_avrc_ct_add_to_now_playing_cmd. More...
 
wiced_result_t wiced_bt_avrc_ct_inform_displayable_charset_cmd (uint8_t handle, uint8_t num_charset, uint16_t *p_charsets)
 Function wiced_bt_avrc_ct_inform_displayable_charset_cmd. More...
 
wiced_result_t wiced_bt_avrc_ct_inform_battery_status_ct_cmd (uint8_t handle, uint8_t battery_status)
 Function wiced_bt_avrc_ct_inform_battery_status_ct_cmd. More...
 
wiced_result_t wiced_bt_avrc_ct_get_total_num_items (uint8_t handle, uint8_t scope)
 Function wiced_bt_avrc_ct_get_total_num_items. More...
 
wiced_result_t wiced_bt_avrc_ct_set_volume_cmd (uint8_t handle, uint8_t volume)
 Function wiced_bt_avrc_ct_set_volume_cmd. More...
 
int wiced_bt_avrc_parse_get_element_attr_rsp_from_stream (uint8_t *p_attr_stream, uint16_t stream_len, wiced_bt_avrc_attr_entry_t *p_attr)
 
int wiced_bt_avrc_parse_attr_text_value_rsp_from_stream (uint8_t *p_val_stream, uint16_t stream_len, wiced_bt_avrc_app_setting_text_t *p_attr_text_val)
 
int wiced_bt_avrc_parse_get_folder_items_rsp_from_stream (uint8_t *p_item_stream, uint16_t stream_len, wiced_bt_avrc_item_t *p_item)
 
int wiced_bt_avrc_parse_folder_name_from_stream (uint8_t *p_stream, uint16_t stream_len, wiced_bt_avrc_name_t *p_name)
 
void bdcpy (wiced_bt_device_address_t a, const wiced_bt_device_address_t b)
 
int bdcmp (const wiced_bt_device_address_t a, const wiced_bt_device_address_t b)
 
wiced_result_t wiced_bt_avrc_ct_lrac_switch_get (void *p_opaque, uint16_t *p_sync_data_len)
 API To get LRAC Switch data. More...
 
wiced_result_t wiced_bt_avrc_ct_lrac_switch_set (void *p_opaque, uint16_t sync_data_len)
 API To set LRAC Switch data. More...
 
void wiced_bt_avrc_ct_register_passthrough_event_callback (wiced_bt_avrc_ct_pt_evt_cback_t pt_evt_cb)
 wiced_bt_avrc_ct_register_passthrough_event_callback More...
 

Detailed Description

AVRC remote control functions.

Function Documentation

wiced_result_t wiced_bt_avrc_ct_add_to_now_playing_cmd ( uint8_t  handle,
uint8_t  scope,
wiced_bt_avrc_uid_t  item_uid 
)

Function wiced_bt_avrc_ct_add_to_now_playing_cmd.

Adds an item indicated by the UID to the Now Playing queue

Parameters
[in]handle: Connection handle
[in]scope: Scope of the item (see #AVRC_SCOPE_XX)
[in]item_uid: UID of the item
Returns
wiced_result_t
wiced_result_t wiced_bt_avrc_ct_change_path_cmd ( uint8_t  handle,
uint8_t  direction,
wiced_bt_avrc_uid_t  path_uid 
)

Function wiced_bt_avrc_ct_change_path_cmd.

Change the path in the Virtual file system being browsed

Parameters
[in]handle: Connection handle
[in]direction: Direction of path change
[in]path_uid: Path uid
Returns
wiced_result_t
wiced_result_t wiced_bt_avrc_ct_connect ( wiced_bt_device_address_t  remote_addr)

Function wiced_bt_avrc_ct_connect.

Initiate connection to the peer AVRC target device. After connection establishment, stop listening for incoming connections

Parameters
[in]remote_addr: Bluetooth address of peer device
Returns
wiced_result_t
wiced_result_t wiced_bt_avrc_ct_deinit ( void  )

Function wiced_bt_avrc_ct_deinit.

Deinit the AVRC controller and stop listening for incoming connections

Returns
wiced_result_t
wiced_result_t wiced_bt_avrc_ct_disconnect ( uint8_t  handle)

Function wiced_bt_avrc_ct_disconnect.

Disconnect from the peer AVRC target device After disconnection , start listening for incoming connections

Parameters
[in]handle: Connection handle
Returns
wiced_result_t
wiced_result_t wiced_bt_avrc_ct_features_register ( wiced_bt_avrc_ct_features_cback_t  features_callback)

Function wiced_bt_avrc_ct_features_register.

Register for AVRC Feature events. This, optional, function must be called after wiced_bt_avrc_ct_init

Returns
wiced_result_t
wiced_result_t wiced_bt_avrc_ct_get_element_attr_cmd ( uint8_t  handle,
wiced_bt_avrc_uid_t  element_id,
uint8_t  num_attr,
uint8_t *  p_attrs 
)

Function wiced_bt_avrc_ct_get_element_attr_cmd.

Requests the target device to provide the attributes of the element specified in the parameter

Parameters
[in]handle: Connection handle
[in]element_id: Element id
[in]num_attr: Number of attributes
[in]p_attrs: Media attribute ids (see #AVRC_MEDIA_ATTR_ID)
Returns
wiced_result_t
wiced_result_t wiced_bt_avrc_ct_get_folder_items_cmd ( uint8_t  handle,
uint8_t  scope,
uint32_t  start_item,
uint32_t  end_item,
uint8_t  num_attr,
uint32_t *  p_attrs 
)

Function wiced_bt_avrc_ct_get_folder_items_cmd.

Retrieves a listing of the contents of a folder

Parameters
[in]handle: Connection handle
[in]scope: Scope of the folder
[in]start_item: Start item index
[in]end_item: End item index
[in]num_attr: Number of attributes
[in]p_attrs: Media attribute ids (see #AVRC_MEDIA_ATTR_ID)
Returns
wiced_result_t
wiced_result_t wiced_bt_avrc_ct_get_item_attributes_cmd ( uint8_t  handle,
uint8_t  scope,
wiced_bt_avrc_uid_t  path_uid,
uint8_t  num_attr,
uint32_t *  p_attrs 
)

Function wiced_bt_avrc_ct_get_item_attributes_cmd.

Retrieves the metadata attributes for a particular media element item or folder item

Parameters
[in]handle: Connection handle
[in]scope: Scope of the item
[in]path_uid: Path of the item
[in]num_attr: Number of attributes
[in]p_attrs: Media attribute ids (see #AVRC_MEDIA_ATTR_ID)
Returns
wiced_result_t
wiced_result_t wiced_bt_avrc_ct_get_play_status_cmd ( uint8_t  handle)

Function wiced_bt_avrc_ct_get_play_status_cmd.

Get the status of the currently playing media at the TG

Parameters
[in]handle: Connection handle
Returns
wiced_result_t
wiced_result_t wiced_bt_avrc_ct_get_player_attrs_text_cmd ( uint8_t  handle,
uint8_t  num_attr,
uint8_t *  p_attrs 
)

Function wiced_bt_avrc_ct_get_player_attrs_text_cmd.

Requests the target device to provide the current set values on the target for the provided player application setting attributes list

Parameters
[in]handle: Connection handle
[in]num_attr: Number of attributes
[in]p_attrs: Player attribute ids (see #AVRC_PLAYER_SETTING_XX)
Returns
wiced_result_t
wiced_result_t wiced_bt_avrc_ct_get_player_value_cmd ( uint8_t  handle,
uint8_t  num_attr,
uint8_t *  p_attrs 
)

Function wiced_bt_avrc_ct_get_player_value_cmd.

Requests the target device to provide the current set values on the target for the provided player application setting attributes list

Parameters
[in]handle: Connection handle
[in]num_attr: Number of attributes
[in]p_attrs: Player attribute ids (see #AVRC_PLAYER_SETTING_XX)
Returns
wiced_result_t
wiced_result_t wiced_bt_avrc_ct_get_player_values_text_cmd ( uint8_t  handle,
uint8_t  attr,
uint8_t  num_val,
uint8_t *  p_values 
)

Function wiced_bt_avrc_ct_get_player_values_text_cmd.

Request the target device to provide target supported player application setting value displayable text

Parameters
[in]handle: Connection handle
[in]attr: player application setting attribute
[in]num_attr: Number of values
[in]p_attrs: Player value scan value ids (see #AVRC_PLAYER_VAL_XX)
Returns
wiced_result_t
wiced_result_t wiced_bt_avrc_ct_get_total_num_items ( uint8_t  handle,
uint8_t  scope 
)

Function wiced_bt_avrc_ct_get_total_num_items.

To request the Number of Items at the selected scope

Parameters
[in]handle: Connection handle
[in]scope: Scope of the item (see #AVRC_SCOPE_XX)
Returns
wiced_result_t
wiced_result_t wiced_bt_avrc_ct_inform_battery_status_ct_cmd ( uint8_t  handle,
uint8_t  battery_status 
)

Function wiced_bt_avrc_ct_inform_battery_status_ct_cmd.

To send the battery status to the TG

Parameters
[in]handle: Connection handle
[in]battery_status: Battery status
Returns
wiced_result_t
wiced_result_t wiced_bt_avrc_ct_inform_displayable_charset_cmd ( uint8_t  handle,
uint8_t  num_charset,
uint16_t *  p_charsets 
)

Function wiced_bt_avrc_ct_inform_displayable_charset_cmd.

list of character sets supported by CT to the TG

Parameters
[in]handle: Connection handle
[in]num_charset: num of character set
[in]p_charsets: Supported Character Set
Returns
wiced_result_t
wiced_result_t wiced_bt_avrc_ct_init ( uint32_t  local_features,
uint8_t *  supported_events,
wiced_bt_avrc_ct_connection_state_cback_t  p_connection_cb,
wiced_bt_avrc_ct_cmd_cback_t  p_cmd_cb,
wiced_bt_avrc_ct_rsp_cback_t  p_rsp_cb,
wiced_bt_avrc_ct_pt_rsp_cback_t  p_ptrsp_cb 
)

Function wiced_bt_avrc_ct_init.

Initialize the AVRC controller and start listening for incoming connections

Parameters
[in]local_features: Local supported features mask Combination of wiced_bt_avrc_ct_features_t
[in]supported_events: Flag map of events that will be serviced if registered
[in]p_connection_cback: Callback for connection state
[in]p_rsp_cb: Callback from peer device in response to AVRCP commands
[in]p_cmd_cb: Callback when peer device sends AVRCP commands
Returns
wiced_result_t
wiced_result_t wiced_bt_avrc_ct_list_player_attrs_cmd ( uint8_t  handle)

Function wiced_bt_avrc_ct_list_player_attrs_cmd.

Request the target device to provide target supported player application setting attributes

Parameters
[in]handle: Connection handle
Returns
wiced_result_t
wiced_result_t wiced_bt_avrc_ct_list_player_values_cmd ( uint8_t  handle,
uint8_t  attr 
)

Function wiced_bt_avrc_ct_list_player_values_cmd.

Requests the target device to list the set of possible values for the requested player application setting attribute

Parameters
[in]handle: Connection handle
[in]attr: Player application setting attribute
Returns
wiced_result_t
wiced_result_t wiced_bt_avrc_ct_lrac_switch_get ( void *  p_opaque,
uint16_t *  p_sync_data_len 
)

API To get LRAC Switch data.

Called by the application to get the LRAC Switch Data

Parameters
p_opaquePointer to a buffer which will be filled with LRAC Switch data (current A2DP Sink State)
p_opaqueSize of the buffer (IN), size filled (OUT)
Returns
none
wiced_result_t wiced_bt_avrc_ct_lrac_switch_set ( void *  p_opaque,
uint16_t  sync_data_len 
)

API To set LRAC Switch data.

Called by the application to set the LRAC Switch Data

Parameters
p_opaquePointer to a buffer which contains LRAC Switch data (new A2DP Sink State)
p_opaqueSize of the buffer (IN)
Returns
none
wiced_result_t wiced_bt_avrc_ct_play_item_cmd ( uint8_t  handle,
uint8_t  scope,
wiced_bt_avrc_uid_t  item_uid 
)

Function wiced_bt_avrc_ct_play_item_cmd.

Starts playing an item indicated by the UID

Parameters
[in]handle: Connection handle
[in]scope: Scope of the item (see #AVRC_SCOPE_XX)
[in]item_uid: UID of the item
Returns
wiced_result_t
void wiced_bt_avrc_ct_register_passthrough_event_callback ( wiced_bt_avrc_ct_pt_evt_cback_t  pt_evt_cb)

wiced_bt_avrc_ct_register_passthrough_event_callback

Parameters
pt_evt_cbcallback
wiced_result_t wiced_bt_avrc_ct_search_cmd ( uint8_t  handle,
wiced_bt_avrc_full_name_t  search_string 
)

Function wiced_bt_avrc_ct_search_cmd.

Performs search from the current folder in the Browsed Player's virtual file system

Parameters
[in]handle: Connection handle
[in]search_string: Search string
Returns
wiced_result_t
wiced_result_t wiced_bt_avrc_ct_send_pass_through_cmd ( uint8_t  handle,
uint8_t  cmd,
uint8_t  state,
uint16_t  grp_nav_vendor 
)

Function wiced_bt_avrc_ct_send_pass_through_cmd.

Send PASS THROUGH command

Parameters
[in]handle: Connection handle
[in]cmd: Pass through command id (see #AVRC_ID_XX)
[in]state: State of the pass through command (see #AVRC_STATE_XX)
[in]grp_nav_vendor: only applicable if command is AVRC_ID_VENDOR
Returns
wiced_result_t
wiced_result_t wiced_bt_avrc_ct_send_sub_unit_info_cmd ( uint16_t  handle)

Function wiced_bt_avrc_ct_send_sub_unit_info_cmd.

Send Sub Unit Info Command

Parameters
[in]handle: Connection handle
Returns
wiced_result_t
wiced_result_t wiced_bt_avrc_ct_send_unit_info_cmd ( uint16_t  handle)

Function wiced_bt_avrc_ct_send_unit_info_cmd.

Send Unit Info Command

Parameters
[in]handle: Connection handle
Returns
wiced_result_t
wiced_result_t wiced_bt_avrc_ct_set_addressed_player_cmd ( uint8_t  handle,
uint16_t  player_id 
)

Function wiced_bt_avrc_ct_set_addressed_player_cmd.

Set the player id to the player to be addressed on the target device

Parameters
[in]handle: Connection handle
[in]player_id: Player id
Returns
wiced_result_t
wiced_result_t wiced_bt_avrc_ct_set_browsed_player_cmd ( uint8_t  handle,
uint16_t  player_id 
)

Function wiced_bt_avrc_ct_set_browsed_player_cmd.

Set the player id to the browsed player to be addressed on the target device

Parameters
[in]handle: Connection handle
[in]player_id: Player id
Returns
wiced_result_t
wiced_result_t wiced_bt_avrc_ct_set_player_value_cmd ( uint8_t  handle,
wiced_bt_avrc_metadata_set_app_value_cmd_t p_val_stream 
)

Function wiced_bt_avrc_ct_set_player_value_cmd.

Requests to set the player application setting list of player application setting values on the target device

Parameters
[in]handle: Connection handle
[in]p_val_stream: pointer to structure wiced_bt_avrc_metadata_set_app_value_cmd_t
Returns
wiced_result_t
wiced_result_t wiced_bt_avrc_ct_set_volume_cmd ( uint8_t  handle,
uint8_t  volume 
)

Function wiced_bt_avrc_ct_set_volume_cmd.

Set volume for peer device

Parameters
[in]handle: Connection handle
[in]volume: Volume
Returns
wiced_result_t