Bluetooth AVRCP Profile

group BT_AVRCP

Provide BT AVRCP profile interfaces.

Typedefs

typedef enum t_bt_avrcp_ctype T_BT_AVRCP_CTYPE

BT AVRCP command type.

typedef enum t_bt_avrcp_scope_id T_BT_AVRCP_SCOPE_ID

BT AVRCP scope id.

typedef enum t_bt_avrcp_major_player_type T_BT_AVRCP_MAJOR_PLAYER_TYPE

BT AVRCP major player type.

typedef enum t_bt_avrcp_player_sub_type T_BT_AVRCP_PLAYER_SUB_TYPE

BT AVRCP player sub type.

typedef enum t_bt_avrcp_response T_BT_AVRCP_RESPONSE

BT AVRCP response code.

typedef enum t_bt_avrcp_rsp_error_status T_BT_AVRCP_RSP_ERROR_STATUS

BT AVRCP response status and error codes.

typedef enum t_bt_avrcp_elem_attr T_BT_AVRCP_ELEM_ATTR

BT AVRCP element attribute.

typedef enum t_bt_avrcp_play_status T_BT_AVRCP_PLAY_STATUS

BT AVRCP play status.

typedef struct t_bt_avrcp_element_attr T_BT_AVRCP_ELEMENT_ATTR

BT AVRCP element attribute.

typedef struct t_bt_avrcp_app_setting T_BT_AVRCP_APP_SETTING

BT AVRCP app setting attribute value pair.

typedef struct t_bt_avrcp_item_attr T_BT_AVRCP_ITEM_ATTR

BT AVRCP item attribute.

typedef struct t_bt_avrcp_media_player_item T_BT_AVRCP_MEDIA_PLAYER_ITEM

BT AVRCP media player item.

typedef struct t_bt_avrcp_folder_item T_BT_AVRCP_FOLDER_ITEM

BT AVRCP folder item.

typedef struct t_bt_avrcp_media_element_item T_BT_AVRCP_MEDIA_ELEMENT_ITEM

BT AVRCP media element item.

typedef struct t_bt_avrcp_folder T_BT_AVRCP_FOLDER

BT AVRCP folder.

Enums

enum t_bt_avrcp_ctype

BT AVRCP command type.

Values:

enumerator BT_AVRCP_CTYPE_CONTROL
enumerator BT_AVRCP_CTYPE_STATUS
enumerator BT_AVRCP_CTYPE_SPECIFIC_INQUIRY
enumerator BT_AVRCP_CTYPE_NOTIFY
enumerator BT_AVRCP_CTYPE_GENERAL_INQUIRY
enum t_bt_avrcp_scope_id

BT AVRCP scope id.

Values:

enumerator BT_AVRCP_SCOPE_MEDIA_PLAYER_LIST
enumerator BT_AVRCP_SCOPE_MEDIA_PLAYER_VIRTUAL_FILESYSTEM
enumerator BT_AVRCP_SCOPE_SEARCH
enumerator BT_AVRCP_SCOPE_NOW_PLAYING
enum t_bt_avrcp_major_player_type

BT AVRCP major player type.

Values:

enumerator BT_AVRCP_MAJOR_PLAYER_TYPE_AUDIO
enumerator BT_AVRCP_MAJOR_PLAYER_TYPE_VIDEO
enumerator BT_AVRCP_MAJOR_PLAYER_TYPE_BROADCASTING_AUDIO
enumerator BT_AVRCP_MAJOR_PLAYER_TYPE_BROADCASTING_VIDEO
enum t_bt_avrcp_player_sub_type

BT AVRCP player sub type.

Values:

enumerator BT_AVRCP_PLAYER_SUB_TYPE_RESERVED
enumerator BT_AVRCP_PLAYER_SUB_TYPE_AUDIO_BOOK
enumerator BT_AVRCP_PLAYER_SUB_TYPE_PODCAST
enum t_bt_avrcp_response

BT AVRCP response code.

Values:

enumerator BT_AVRCP_RESPONSE_NOT_IMPLEMENTED
enumerator BT_AVRCP_RESPONSE_ACCEPTED
enumerator BT_AVRCP_RESPONSE_REJECTED
enumerator BT_AVRCP_RESPONSE_IN_TRANSITION
enumerator BT_AVRCP_RESPONSE_IMPLEMENTED
enumerator BT_AVRCP_RESPONSE_CHANGED
enumerator BT_AVRCP_RESPONSE_INTERIM
enum t_bt_avrcp_rsp_error_status

BT AVRCP response status and error codes.

Values:

enumerator BT_AVRCP_RSP_STATUS_INVALID_COMMAND
enumerator BT_AVRCP_RSP_STATUS_INVALID_PARAMETER
enumerator BT_AVRCP_RSP_STATUS_PARAMETER_CONTENT_ERROR
enumerator BT_AVRCP_RSP_STATUS_INTERNAL_ERROR
enumerator BT_AVRCP_RSP_STATUS_SUCCESS
enumerator BT_AVRCP_RSP_STATUS_UID_CHANGED
enumerator BT_AVRCP_RSP_STATUS_INVALID_DIRECTION
enumerator BT_AVRCP_RSP_STATUS_NOT_DIRECTORY
enumerator BT_AVRCP_RSP_STATUS_NOT_EXIST
enumerator BT_AVRCP_RSP_STATUS_INVALID_SCOPE
enumerator BT_AVRCP_RSP_STATUS_OUT_OF_BOUNDS
enumerator BT_AVRCP_RSP_STATUS_NOT_PLAYABLE
enumerator BT_AVRCP_RSP_STATUS_MEDIA_IN_USE
enumerator BT_AVRCP_RSP_STATUS_PLAYING_LIST_FULL
enumerator BT_AVRCP_RSP_STATUS_SEARCH_NOT_SUPPORTED
enumerator BT_AVRCP_RSP_STATUS_SEARCH_IN_PROGRESS
enumerator BT_AVRCP_RSP_STATUS_INVALID_PLAYER_ID
enumerator BT_AVRCP_RSP_STATUS_PLAYER_NOT_BROWSABLE
enumerator BT_AVRCP_RSP_STATUS_PLAYER_NOT_ADDRESSED
enumerator BT_AVRCP_RSP_STATUS_NO_VALID_SEARCH_RESULTS
enumerator BT_AVRCP_RSP_STATUS_NO_AVAILABLE_PLAYERS
enumerator BT_AVRCP_RSP_STATUS_ADDRESSED_PLAYER_CHANGED
enum t_bt_avrcp_elem_attr

BT AVRCP element attribute.

Values:

enumerator BT_AVRCP_ELEM_ATTR_TITLE
enumerator BT_AVRCP_ELEM_ATTR_ARTIST
enumerator BT_AVRCP_ELEM_ATTR_ALBUM
enumerator BT_AVRCP_ELEM_ATTR_TRACK
enumerator BT_AVRCP_ELEM_ATTR_TOTAL_TRACK
enumerator BT_AVRCP_ELEM_ATTR_GENRE
enumerator BT_AVRCP_ELEM_ATTR_PLAYING_TIME
enumerator BT_AVRCP_ELEM_ATTR_DEFAULT_COVER_ART
enum t_bt_avrcp_play_status

BT AVRCP play status.

Values:

enumerator BT_AVRCP_PLAY_STATUS_STOPPED
enumerator BT_AVRCP_PLAY_STATUS_PLAYING
enumerator BT_AVRCP_PLAY_STATUS_PAUSED
enumerator BT_AVRCP_PLAY_STATUS_FWD_SEEK
enumerator BT_AVRCP_PLAY_STATUS_REV_SEEK
enumerator BT_AVRCP_PLAY_STATUS_FAST_FWD
enumerator BT_AVRCP_PLAY_STATUS_REWIND
enumerator BT_AVRCP_PLAY_STATUS_ERROR

Functions

bool bt_avrcp_init(uint8_t ct_features, uint8_t tg_features)

Initialize AVRCP profile.

Parameters:
Return values:
  • true -- AVRCP profile was initialized successfully.

  • false -- AVRCP profile was failed to initialize.

Returns:

The status of initializing AVRCP profile.

void bt_avrcp_deinit(void)

De-initialize AVRCP profile.

Experimental Added Since 2.14.0.0:
Return values:
  • true -- AVRCP profile was de-initialized successfully.

  • false -- AVRCP profile was failed to de-initialize.

Returns:

The status of de-initializing AVRCP profile.

bool bt_avrcp_connect_req(uint8_t bd_addr[6])

Send an AVRCP connection request.

Parameters:

bd_addr -- [in] Remote BT address.

Return values:
  • true -- AVRCP connection request was sent successfully.

  • false -- AVRCP connection request was failed to send.

Returns:

The status of sending the AVRCP connection request.

bool bt_avrcp_disconnect_req(uint8_t bd_addr[6])

Send an AVRCP disconnection request.

Parameters:

bd_addr -- [in] Remote BT address.

Return values:
  • true -- AVRCP disconnection request was sent successfully.

  • false -- AVRCP disconnection request was failed to send.

Returns:

The status of sending the AVRCP disconnection request.

bool bt_avrcp_connect_cfm(uint8_t bd_addr[6], bool accept)

Send an AVRCP connection confirmation.

Parameters:
  • bd_addr -- [in] Remote BT address.

  • accept -- [in] Accept or reject the connection indication.

    • true Accept the connection indication.

    • false Reject the connection indication.

Return values:
  • true -- AVRCP connection confirmation was sent successfully.

  • false -- AVRCP connection confirmation was failed to send.

Returns:

The status of sending the AVRCP connection confirmation.

bool bt_avrcp_browsing_connect_req(uint8_t bd_addr[6])

Send an AVRCP browsing connection request.

Parameters:

bd_addr -- [in] Remote BT address.

Return values:
  • true -- AVRCP connection request was sent successfully.

  • false -- AVRCP connection request was failed to send.

Returns:

The status of sending the AVRCP connection request.

bool bt_avrcp_browsing_disconnect_req(uint8_t bd_addr[6])

Send an AVRCP browsing disconnection request.

Parameters:

bd_addr -- [in] Remote BT address.

Return values:
  • true -- AVRCP disconnection request was sent successfully.

  • false -- AVRCP disconnection request was failed to send.

Returns:

The status of sending the AVRCP disconnection request.

bool bt_avrcp_browsing_connect_cfm(uint8_t bd_addr[6], bool accept)

Send an AVRCP browsing connection confirmation.

Parameters:
  • bd_addr -- [in] Remote BT address.

  • accept -- [in] Accept or reject the connection indication.

    • true Accept the connection indication.

    • false Reject the connection indication.

Return values:
  • true -- AVRCP browsing connection confirmation was sent successfully.

  • false -- AVRCP browsing connection confirmation was failed to send.

Returns:

The status of sending the AVRCP browsing connection confirmation.

bool bt_avrcp_register_notification_req(uint8_t bd_addr[6], uint8_t event_id)

Send an AVRCP register notification command.

Experimental Added Since 2.14.0.0:
Parameters:
Return values:
  • true -- AVRCP register notification command was sent successfully.

  • false -- AVRCP register notification command was failed to send.

Returns:

The status of sending the AVRCP register notification command.

bool bt_avrcp_volume_change_register_rsp(uint8_t bd_addr[6], uint8_t vol)

Send an AVRCP volume change response after received register notification volume change command.

Parameters:
  • bd_addr -- [in] Remote BT address.

  • vol -- [in] Relative volume at local, 0 as minimum and 0x7F as maximum.

Return values:
  • true -- AVRCP volume change response was sent successfully.

  • false -- AVRCP volume change response was failed to send.

Returns:

The status of sending the AVRCP volume change response.

bool bt_avrcp_volume_change_req(uint8_t bd_addr[6], uint8_t vol)

Send an AVRCP volume change request to remote TG device.

Note

This API shall be invoked only when remote TG device has registered volume change notification, and event BT_EVENT_AVRCP_REG_VOLUME_CHANGED is received on the local device.

Parameters:
  • bd_addr -- [in] Remote BT address.

  • vol -- [in] Relative volume at local, 0 as minimum and 0x7F as maximum.

Return values:
  • true -- AVRCP volume change request was sent successfully.

  • false -- AVRCP volume change request was failed to send.

Returns:

The status of sending the AVRCP volume change request.

bool bt_avrcp_play_status_change_register_rsp(uint8_t bd_addr[6], T_BT_AVRCP_PLAY_STATUS play_status)

Send an AVRCP play status change response after received register notification play status change command.

Parameters:
  • bd_addr -- [in] Remote BT address.

  • play_status -- [in] The current status of playback T_BT_AVRCP_PLAY_STATUS.

Return values:
  • true -- AVRCP play status change response was sent successfully.

  • false -- AVRCP play status change response was failed to send.

Returns:

The status of sending the AVRCP play status change response.

bool bt_avrcp_play_status_change_req(uint8_t bd_addr[6], T_BT_AVRCP_PLAY_STATUS play_status)

Send an AVRCP play status change request to remote CT device.

Note

This API shall be invoked only when remote CT device has registered play status change notification, and event BT_EVENT_AVRCP_PLAY_STATUS_CHANGED_REG_REQ is received on the local device.

Parameters:
  • bd_addr -- [in] Remote BT address.

  • play_status -- [in] The current status of playback T_BT_AVRCP_PLAY_STATUS.

Return values:
  • true -- AVRCP play status change request was sent successfully.

  • false -- AVRCP play status change request was failed to send.

Returns:

The status of sending the AVRCP play status change request.

bool bt_avrcp_track_change_register_rsp(uint8_t bd_addr[6], uint64_t track_id)

Send an AVRCP track change response after received register notification track change command.

Added Since 2.13.0.0:
Parameters:
  • bd_addr -- [in] Remote BT address.

  • track_id -- [in] The currently selected track.

Return values:
  • true -- AVRCP track change response was sent successfully.

  • false -- AVRCP track change response was failed to send.

Returns:

The status of sending the AVRCP track change response.

bool bt_avrcp_track_change_req(uint8_t bd_addr[6], uint64_t track_id)

Send an AVRCP track change request to remote CT device.

Added Since 2.13.0.0:

Note

This API shall be invoked only when remote CT device has registered track change notification, and event BT_EVENT_AVRCP_TRACK_CHANGED_REG_REQ is received on the local device.

Parameters:
  • bd_addr -- [in] Remote BT address.

  • track_id -- [in] The currently selected track.

Return values:
  • true -- AVRCP track change request was sent successfully.

  • false -- AVRCP track change request was failed to send.

Returns:

The status of sending the AVRCP track change request.

bool bt_avrcp_get_element_attr_req(uint8_t bd_addr[6], uint8_t attr_num, uint8_t *attr)

Send an AVRCP get element attribute request.

Parameters:
  • bd_addr -- [in] Remote BT address.

  • attr_num -- [in] The number of attribute.

  • attr -- [in] The requested attribute list.

Return values:
  • true -- AVRCP get element attribute request was sent successfully.

  • false -- AVRCP get element attribute request was failed to send.

Returns:

The status of sending the AVRCP get element attribute request.

bool bt_avrcp_get_element_attr_rsp(uint8_t bd_addr[6], uint8_t attr_num, T_BT_AVRCP_ELEMENT_ATTR *attr)

Send an AVRCP get element attribute response.

Added Since 2.13.0.0:
Parameters:
  • bd_addr -- [in] Remote BT address.

  • attr_num -- [in] The number of element attribute.

  • attr -- [in] The responded element attribute list T_BT_AVRCP_ELEMENT_ATTR.

Return values:
  • true -- AVRCP get element attribute response was sent successfully.

  • false -- AVRCP get element attribute response was failed to send.

Returns:

The status of sending the AVRCP get element attribute response.

bool bt_avrcp_get_play_status_req(uint8_t bd_addr[6])

Send an AVRCP get play status request.

Parameters:

bd_addr -- [in] Remote BT address.

Return values:
  • true -- AVRCP get play status request was sent successfully.

  • false -- AVRCP get play status request was failed to send.

Returns:

The status of sending the AVRCP get play status request.

bool bt_avrcp_get_play_status_rsp(uint8_t bd_addr[6], uint32_t song_length, uint32_t song_pos, T_BT_AVRCP_PLAY_STATUS play_status)

Send an AVRCP get play status response.

Added Since 2.13.0.0:

Added Since 2.14.0.0:
Parameters:
  • bd_addr -- [in] Remote BT address.

  • song_length -- [in] The total length of the playing song in milliseconds.

  • song_pos -- [in] The current position of the playing in milliseconds elapsed.

  • play_status -- [in] Current status of playing T_BT_AVRCP_PLAY_STATUS.

Return values:
  • true -- AVRCP get play status response was sent successfully.

  • false -- AVRCP get play status response was failed to send.

Returns:

The status of sending the AVRCP get play status response.

bool bt_avrcp_play(uint8_t bd_addr[6])

Send a command that simulates keystrokes to start playing an item on remote device.

Parameters:

bd_addr -- [in] Remote BT address.

Return values:
  • true -- Command was sent successfully.

  • false -- Command was failed to send.

Returns:

The status of sending the command.

bool bt_avrcp_pause(uint8_t bd_addr[6])

Send a command that simulates keystrokes to pause an item on remote device.

Parameters:

bd_addr -- [in] Remote BT address.

Return values:
  • true -- Command was sent successfully.

  • false -- Command was failed to send.

Returns:

The status of sending the command.

bool bt_avrcp_stop(uint8_t bd_addr[6])

Send a command that simulates keystrokes to stop an item on remote device.

Parameters:

bd_addr -- [in] Remote BT address.

Return values:
  • true -- Command was sent successfully.

  • false -- Command was failed to send.

Returns:

The status of sending the command.

bool bt_avrcp_forward(uint8_t bd_addr[6])

Send a command that simulates keystrokes to change the media which is playing to next one on remote device.

Parameters:

bd_addr -- [in] Remote BT address.

Return values:
  • true -- Command was sent successfully.

  • false -- Command was failed to send.

Returns:

The status of sending the command.

bool bt_avrcp_backward(uint8_t bd_addr[6])

Send a command that simulates keystrokes to change the media which is playing to last one on remote device.

Parameters:

bd_addr -- [in] Remote BT address.

Return values:
  • true -- Command was sent successfully.

  • false -- Command was failed to send.

Returns:

The status of sending the command.

bool bt_avrcp_mute(uint8_t *bd_addr)

Send a command that simulates keystrokes to mute remote device.

Added Since 2.14.0.0:
Parameters:

bd_addr -- [in] Remote BT address.

Return values:
  • true -- Command was sent successfully.

  • false -- Command was failed to send.

Returns:

The status of sending the command.

bool bt_avrcp_power(uint8_t *bd_addr)

Send a command that simulates keystrokes to power on/off remote device.

Added Since 2.14.0.0:
Parameters:

bd_addr -- [in] Remote BT address.

Return values:
  • true -- Command was sent successfully.

  • false -- Command was failed to send.

Returns:

The status of sending the command.

bool bt_avrcp_rewind_start(uint8_t bd_addr[6])

Send a command that simulates keystrokes to start rewind the media which is playing on remote device.

Parameters:

bd_addr -- [in] Remote BT address.

Return values:
  • true -- Command was sent successfully.

  • false -- Command was failed to send.

Returns:

The status of sending the command.

bool bt_avrcp_rewind_stop(uint8_t bd_addr[6])

Send a command that simulates keystrokes to stop rewind the media which is playing on remote device.

Parameters:

bd_addr -- [in] Remote BT address.

Return values:
  • true -- Command was sent successfully.

  • false -- Command was failed to send.

Returns:

The status of sending the command.

bool bt_avrcp_fast_forward_start(uint8_t bd_addr[6])

Send a command that simulates keystrokes to start fast forward the media which is playing on remote device.

Parameters:

bd_addr -- [in] Remote BT address.

Return values:
  • true -- Command was sent successfully.

  • false -- Command was failed to send.

Returns:

The status of sending the command.

bool bt_avrcp_fast_forward_stop(uint8_t bd_addr[6])

Send a command that simulates keystrokes to stop fast forward the media which is playing on remote device.

Parameters:

bd_addr -- [in] Remote BT address.

Return values:
  • true -- Command was sent successfully.

  • false -- Command was failed to send.

Returns:

The status of sending the command.

bool bt_avrcp_app_setting_attrs_list(uint8_t bd_addr[6])

Request TG to provide target supported player application setting attributes.

Parameters:

bd_addr -- [in] Remote BT address.

Return values:
  • true -- Command was sent successfully.

  • false -- Command was failed to send.

Returns:

The status of sending the command.

bool bt_avrcp_app_setting_values_list(uint8_t bd_addr[6], uint8_t attr_id)

Request TG to list the set of possible values for the requested player application setting attribute.

Parameters:
  • bd_addr -- [in] Remote BT address.

  • attr_id -- [in] The requested attribute id.

Return values:
  • true -- Command was sent successfully.

  • false -- Command was failed to send.

Returns:

The status of sending the command.

bool bt_avrcp_app_setting_value_get(uint8_t bd_addr[6], uint8_t attr_num, uint8_t *attr_list)

Request TG to provide the current set values for the provided player application setting attributes list.

Parameters:
  • bd_addr -- [in] Remote BT address.

  • attr_num -- [in] The number of requested attributes.

  • attr_list -- [in] The requested attribute ID list.

Return values:
  • true -- Command was sent successfully.

  • false -- Command was failed to send.

Returns:

The status of sending the command.

bool bt_avrcp_app_setting_value_set(uint8_t bd_addr[6], uint8_t attr_num, T_BT_AVRCP_APP_SETTING *attr_list)

Set the player application setting list of player application setting values on TG.

Parameters:
  • bd_addr -- [in] Remote BT address.

  • attr_num -- [in] The number of attributes.

  • attr_list -- [in] The attribute ID/value pair list T_BT_AVRCP_APP_SETTING.

Return values:
  • true -- Command was sent successfully.

  • false -- Command was failed to send.

Returns:

The status of sending the command.

bool bt_avrcp_continuing_rsp_req(uint8_t bd_addr[6])

Request for continuing response packets for the sent PDU command that has not completed.

Parameters:

bd_addr -- [in] Remote BT address.

Return values:
  • true -- Command was sent successfully.

  • false -- Command was failed to send.

Returns:

The status of sending the command.

bool bt_avrcp_continuing_rsp_abort(uint8_t bd_addr[6])

Send a command to abort continuing response.

Parameters:

bd_addr -- [in] Remote BT address.

Return values:
  • true -- Command was sent successfully.

  • false -- Command was failed to send.

Returns:

The status of sending the command.

bool bt_avrcp_absolute_volume_set(uint8_t bd_addr[6], uint8_t volume)

Set an absolute volume to be used by the rendering device.

Parameters:
  • bd_addr -- [in] Remote BT address.

  • volume -- [in] Absolute volume level that ranges from 0x00 to 0x7F.

Return values:
  • true -- Command was sent successfully.

  • false -- Command was failed to send.

Returns:

The status of sending the command.

bool bt_avrcp_addressed_player_set(uint8_t bd_addr[6], uint16_t player_id)

Inform the TG of which media player the CT wishes to control.

Parameters:
  • bd_addr -- [in] Remote BT address.

  • player_id -- [in] Unique media player Id.

Return values:
  • true -- Command was sent successfully.

  • false -- Command was failed to send.

Returns:

The status of sending the command.

bool bt_avrcp_addressed_player_set_rsp(uint8_t bd_addr[6], T_BT_AVRCP_RSP_ERROR_STATUS status)

Used by the TG to respond to set addressed player request received from the CT.

Added Since 2.13.0.0:

Added Since 2.14.0.0:
Parameters:
Return values:
  • true -- Response was sent successfully.

  • false -- Response was failed to send.

Returns:

The status of sending the response.

bool bt_avrcp_addressed_player_change_register_rsp(uint8_t bd_addr[6], uint16_t player_id, uint16_t uid_counter)

Send an addressed player change response after the CT registers notification for the event avrcp_event_addressed_player_changed.

Added Since 2.13.0.0:
Parameters:
  • bd_addr -- [in] Remote BT address.

  • player_id -- [in] Unique media player Id.

  • uid_counter -- [in] UID counter.

Return values:
  • true -- AVRCP addressed player change response was sent successfully.

  • false -- AVRCP addressed player change response was failed to send.

Returns:

The status of sending the AVRCP addressed player change response.

bool bt_avrcp_addressed_player_change_req(uint8_t bd_addr[6], uint16_t player_id, uint16_t uid_counter)

Send an AVRCP addressed player change request to remote CT device.

Added Since 2.13.0.0:

Note

This API shall be invoked only when remote CT device has registered addressed player change notification, and event BT_EVENT_AVRCP_REG_ADDRESSED_PLAYER_CHANGED is received on the local device.

Parameters:
  • bd_addr -- [in] Remote BT address.

  • player_id -- [in] Unique media player Id.

  • uid_counter -- [in] UID counter.

Return values:
  • true -- AVRCP addressed player change request was sent successfully.

  • false -- AVRCP addressed player change request was failed to send.

Returns:

The status of sending the AVRCP addressed player change request.

bool bt_avrcp_item_play(uint8_t bd_addr[6], uint8_t scope, uint64_t uid, uint16_t uid_counter)

Send a command to start playing an item indicated by the UID.

Parameters:
  • bd_addr -- [in] Remote BT address.

  • scope -- [in] The scope in which the UID of the media element item or folder item.

  • uid -- [in] The UID of the media element item or folder item.

  • uid_counter -- [in] UID counter.

Return values:
  • true -- Command was sent successfully.

  • false -- Command was failed to send.

Returns:

The status of sending the command.

bool bt_avrcp_group_navigate(uint8_t bd_addr[6], bool next)

Move to next or previous groups on TG.

Parameters:
  • bd_addr -- [in] Remote BT address.

  • next -- [in] Next or previous.

    • true Next group.

    • false Previous group.

Return values:
  • true -- Command was sent successfully.

  • false -- Command was failed to send.

Returns:

The status of sending the command.

bool bt_avrcp_vendor_cmd_send(uint8_t bd_addr[6], T_BT_AVRCP_CTYPE ctype, uint32_t company_id, uint8_t *pdu, uint16_t pdu_length)

Send a vendor specific command to the peer entity.

Parameters:
  • bd_addr -- [in] Remote BT address.

  • ctype -- [in] The command type T_BT_AVRCP_CTYPE.

  • company_id -- [in] 24-bit unique ID obtained from IEEE RAC.

  • pdu -- [in] The command data.

  • pdu_length -- [in] Length of the command data.

Return values:
  • true -- Command was sent successfully.

  • false -- Command was failed to send.

Returns:

The status of sending the command.

bool bt_avrcp_vendor_rsp_send(uint8_t bd_addr[6], T_BT_AVRCP_RESPONSE response, uint32_t company_id, uint8_t *pdu, uint16_t pdu_length)

Send a vendor specific response to the peer entity.

Parameters:
  • bd_addr -- [in] Remote BT address.

  • response -- [in] The response code T_BT_AVRCP_RESPONSE.

  • company_id -- [in] 24-bit unique ID obtained from IEEE RAC.

  • pdu -- [in] The response data.

  • pdu_length -- [in] Length of the response data.

Return values:
  • true -- Response was sent successfully.

  • false -- Response was failed to send.

Returns:

The status of sending the response.

bool bt_avrcp_browsing_folder_items_get(uint8_t bd_addr[6], uint8_t scope, uint32_t start_item, uint32_t end_item, uint8_t attr_num, uint32_t *attr)

Send a command to retrieve a listing of the contents of a folder.

Parameters:
  • bd_addr -- [in] Remote BT address.

  • scope -- [in] The scope.

    • 0 Media player list.

    • 1 Media player virtual filesystem.

    • 2 Search.

    • 3 Now playing.

  • start_item -- [in] The offset within the listing of the item which should be the first returned item.

  • end_item -- [in] The offset within the listing of the item which should be the final returned item..

  • attr_num -- [in] The number of attribute.

  • attr -- [in] The requested attribute list.

Return values:
  • true -- Command was sent successfully.

  • false -- Command was failed to send.

Returns:

The status of sending the command.

bool bt_avrcp_browsing_folder_items_get_rsp(uint8_t bd_addr[6], T_BT_AVRCP_RSP_ERROR_STATUS status, uint16_t uid_counter, uint16_t num_of_items, void *items)

Used by the TG to respond to get folder items request received from the CT.

Added Since 2.13.0.0:
Parameters:
Return values:
  • true -- Response was sent successfully.

  • false -- Response was failed to send.

Returns:

The status of sending the response.

bool bt_avrcp_browsing_total_num_of_items_get_rsp(uint8_t bd_addr[6], T_BT_AVRCP_RSP_ERROR_STATUS status, uint16_t uid_counter, uint32_t num_of_items)

Used by the TG to respond to get total number of items request received from the CT.

Added Since 2.13.0.0:
Parameters:
  • bd_addr -- [in] Remote BT address.

  • status -- [in] BT AVRCP response status and error codes T_BT_AVRCP_RSP_ERROR_STATUS.

  • uid_counter -- [in] UID counter.

  • num_of_items -- [in] The number of items in this folder/scope.

Return values:
  • true -- Response was sent successfully.

  • false -- Response was failed to send.

Returns:

The status of sending the response.

bool bt_avrcp_browsing_item_attrs_get(uint8_t bd_addr[6], uint8_t scope, uint64_t uid, uint16_t uid_counter, uint8_t attr_num, uint32_t *attr)

Retrieve the metadata attributes for a particular media element item or folder item.

Parameters:
  • bd_addr -- [in] Remote BT address.

  • scope -- [in] The scope in which the UID of the media element item or folder item is valid.

  • uid -- [in] The UID of the media element item or folder item.

  • uid_counter -- [in] UID counter.

  • attr_num -- [in] The number of attribute.

  • attr -- [in] The requested attribute list.

Return values:
  • true -- Command was sent successfully.

  • false -- Command was failed to send.

Returns:

The status of sending the command.

bool bt_avrcp_browsing_search(uint8_t bd_addr[6], uint16_t length, uint8_t *search_str)

Send an AVRCP search request.

Parameters:
  • bd_addr -- [in] Remote BT address.

  • length -- [in] Length of search string.

  • search_str -- [in] The search string.

Return values:
  • true -- Command was sent successfully.

  • false -- Command was failed to send.

Returns:

The status of sending the command.

bool bt_avrcp_browsing_browsed_player_set(uint8_t bd_addr[6], uint16_t player_id)

Send a command to control to which player browsing commands should be routed.

Parameters:
  • bd_addr -- [in] Remote BT address.

  • player_id -- [in] Unique media player Id.

Return values:
  • true -- Command was sent successfully.

  • false -- Command was failed to send.

Returns:

The status of sending the command.

bool bt_avrcp_browsing_path_change(uint8_t bd_addr[6], uint16_t uid_counter, uint8_t direction, uint64_t folder_uid)

Send a command to navigate one level up or down in the virtual filesystem.

Parameters:
  • bd_addr -- [in] Remote BT address.

  • uid_counter -- [in] UID counter.

  • direction -- [in] Direction.

    • 0 Folder up.

    • 1 Folder down.

  • folder_uid -- [in] The UID of the folder to navigate to.

Return values:
  • true -- Command was sent successfully.

  • false -- Command was failed to send.

Returns:

The status of sending the command.

bool bt_avrcp_cover_art_connect_req(uint8_t bd_addr[6], uint16_t l2c_psm)

Send an AVRCP cover art connection request.

Parameters:
  • bd_addr -- [in] Remote BT address.

  • l2c_psm -- [in] L2CAP PSM.

Return values:
  • true -- AVRCP cover art connection request was sent successfully.

  • false -- AVRCP cover art connection request was failed to send.

Returns:

The status of sending the AVRCP cover art connection request.

bool bt_avrcp_cover_art_disconnect_req(uint8_t bd_addr[6])

Send an AVRCP cover art disconnect request.

Parameters:

bd_addr -- [in] Remote BT address.

Return values:
  • true -- AVRCP cover art disconnection request was sent successfully.

  • false -- AVRCP cover art disconnection request was failed to send.

Returns:

The status of sending the AVRCP cover art disconnect request.

bool bt_avrcp_cover_art_get(uint8_t bd_addr[6], uint8_t image_handle[16])

Get cover art image.

Parameters:
  • bd_addr -- [in] Remote BT address.

  • image_handle -- [in] Image handle, NULL terminated UTF-16 string.

Return values:
  • true -- Command was sent successfully.

  • false -- Command was failed to send.

Returns:

The status of sending the command.

struct t_bt_avrcp_element_attr

BT AVRCP element attribute.

Public Members

uint32_t attribute_id
uint16_t character_set_id
uint16_t length
uint8_t *p_buf
struct t_bt_avrcp_app_setting

BT AVRCP app setting attribute value pair.

Public Members

uint8_t attr
uint8_t value
struct t_bt_avrcp_item_attr

BT AVRCP item attribute.

Public Members

uint32_t attribute_id
uint16_t character_set_id
uint16_t length
uint8_t *p_buf
struct t_bt_avrcp_media_player_item

BT AVRCP media player item.

Public Members

uint8_t item_type

See BT AVRCP Folder Item Type.

uint16_t item_length
uint16_t player_id
uint8_t major_type
uint32_t sub_type
uint8_t play_status
uint8_t feature_bitmask[16]
uint16_t character_set_id
uint16_t display_name_length
uint8_t *display_name
struct t_bt_avrcp_folder_item

BT AVRCP folder item.

Public Members

uint8_t item_type

See BT AVRCP Folder Item Type.

uint16_t item_length
uint64_t folder_uid
uint8_t folder_type
uint8_t is_playable
uint16_t character_set_id
uint16_t display_name_length
uint8_t *display_name
struct t_bt_avrcp_media_element_item

BT AVRCP media element item.

Public Members

uint8_t item_type

See BT AVRCP Folder Item Type.

uint16_t item_length
uint64_t media_element_uid
uint8_t media_type
uint16_t character_set_id
uint16_t display_name_length
uint8_t *display_name
uint8_t num_of_attr
T_BT_AVRCP_ELEMENT_ATTR *p_attr
struct t_bt_avrcp_folder

BT AVRCP folder.

Public Members

uint16_t name_length
uint8_t *p_name