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

AIROC Bluetooth AVRC Remote Control CT Functions. More...

Data Structures

struct  wiced_bt_avrc_ct_features_abs_vol_t
 
union  wiced_bt_avrc_ct_features_data_t
 

Macros

#define sizeof_array(a)   (sizeof(a)/sizeof(a[0]))
 

Typedefs

typedef void(* wiced_bt_avrc_ct_connection_state_cback_t )(uint8_t handle, wiced_bt_device_address_t remote_addr, wiced_result_t status, wiced_bt_avrc_ct_connection_state_t connection_state, uint32_t peer_features)
 Callback for connection state.
 
typedef void(* wiced_bt_avrc_ct_rsp_cback_t )(uint8_t handle, wiced_bt_avrc_response_t *avrc_rsp)
 Response callback from peer device for AVRCP commands.
 
typedef void(* wiced_bt_avrc_ct_cmd_cback_t )(uint8_t handle, wiced_bt_avrc_command_t *avrc_cmd)
 Callback when peer device sends AVRCP commands.
 
typedef void(* wiced_bt_avrc_ct_pt_rsp_cback_t )(uint8_t handle, wiced_bt_avrc_msg_pass_t *avrc_pass_rsp)
 Callback when peer device sends response to AVRCP passthrough commands.
 
typedef void(* wiced_bt_avrc_ct_features_cback_t )(wiced_bt_avrc_ct_features_event_t event, wiced_bt_avrc_ct_features_data_t *p_data)
 
typedef void(* wiced_bt_avrc_ct_pt_evt_cback_t )(uint8_t handle, uint8_t op_id)
 Callback when peer device sends AVRCP passthrough commands op code.
 

Enumerations

enum  wiced_bt_avrc_ct_features_t { REMOTE_CONTROL_FEATURE_TARGET = 0x0001, REMOTE_CONTROL_FEATURE_CONTROLLER = 0x0002 }
 AVRC remote control feature mask. More...
 
enum  wiced_bt_avrc_ct_connection_state_t { REMOTE_CONTROL_DISCONNECTED = 0, REMOTE_CONTROL_CONNECTED = 1, REMOTE_CONTROL_INITIALIZED = 2 }
 AVRC remote control connection state. More...
 
enum  wiced_bt_avrc_ct_features_event_t { WICED_BT_AVRC_CT_FEATURES_ABS_VOL_SUPPORTED = 1 }
 

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)
 AVRC remote control functions. 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_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, uint8_t data_len, uint8_t *data)
 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_player_app_param_t *p_vals)
 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_set_volume_cmd (uint8_t handle, uint8_t volume)
 Function wiced_bt_avrc_ct_set_volume_cmd. More...
 

Detailed Description

AIROC Bluetooth AVRC Remote Control CT Functions.

Enumeration Type Documentation

AVRC remote control connection state.

Enumerator
REMOTE_CONTROL_DISCONNECTED 

Remote control is disconnected from peer.

REMOTE_CONTROL_CONNECTED 

Remote control is connected to peer.

REMOTE_CONTROL_INITIALIZED 

Remote control is idle (not connected to any peer)

AVRC remote control feature mask.

Enumerator
REMOTE_CONTROL_FEATURE_TARGET 

Select to support the features of a Target.

REMOTE_CONTROL_FEATURE_CONTROLLER 

Select to support the features of a Controller.

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_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_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 
)

AVRC remote control functions.

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_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
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,
uint8_t  data_len,
uint8_t *  data 
)

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]data_field_len: Data field length
[in]data_field: Data field
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_player_app_param_t p_vals 
)

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_vals: Player application setting values
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