dotstack API Reference  1.10.37
Modules | Data Structures | Typedefs | Functions
Audio/Video Remote Control Profile (AVRCP)

The Audio/Video Remote Control Profile (AVRCP) defines the features and procedures required in order to ensure interoperability between Bluetooth devices with audio/video control functions in the Audio/Video distribution scenarios. More...

Modules

 Configuration
 This module describes parameters used to configure AVRCP layer.
 

Data Structures

struct  bt_avrcp_evt_search_completed_t
 Parameter to AVRCP_EVT_SEARCH_COMPLETED event. More...
 
struct  bt_avrcp_evt_channel_connected_t
 Parameter to AVRCP_EVT_CONTROL_CHANNEL_CONNECTED event. More...
 
struct  bt_avrcp_evt_channel_disconnected_t
 Parameter to AVRCP_EVT_CONTROL_CHANNEL_DISCONNECTED event. More...
 
struct  bt_avrcp_evt_connection_failed_t
 Parameter to AVRCP_EVT_CONTROL_CONNECTION_FAILED event. More...
 
struct  bt_avrcp_evt_panel_response_received_t
 Parameter to AVRCP_EVT_PANEL_RESPONSE_RECEIVED event. More...
 
struct  bt_avrcp_evt_panel_command_received_t
 Parameter to AVRCP_EVT_PANEL_COMMAND_RECEIVED event. More...
 
struct  bt_avrcp_item_attributes_t
 Parameter to AVRCP_EVT_GET_ITEM_ATTRIBUTES_RECEIVED event. More...
 
struct  bt_av_set_browsed_player_t
 Parameter to AVRCP_EVT_SET_BROWSED_PLAYER_COMPLETED event. More...
 
struct  bt_av_search_t
 Parameter to AVRCP_EVT_MEDIA_SEARCH_COMPLETED event. More...
 
union  bt_avrcp_event_t
 Parameter to an application callback. More...
 
struct  bt_avrcp_channel_t
 AVRCP channel description. More...
 
struct  bt_avrcp_mgr_t
 AVRCP manager. More...
 
struct  bt_av_response_t
 AV/C response header. More...
 
struct  bt_av_element_id_t
 Media element UID. More...
 
struct  bt_av_capability_company_id_t
 Parameter to AVRCP_EVT_COMPANY_ID_LIST_RECEIVED event. More...
 
struct  bt_av_capability_event_id_t
 Parameter to AVRCP_EVT_EVENT_ID_LIST_RECEIVED event. More...
 
struct  bt_av_player_settings_t
 Parameter to AVRCP_EVT_PLAYER_SETTING_ATTRIBUTES_RECEIVED event. More...
 
struct  bt_av_player_setting_values_t
 Parameter to AVRCP_EVT_PLAYER_SETTING_VALUES_RECEIVED event. More...
 
struct  bt_av_player_setting_current_values_t
 Parameter to AVRCP_EVT_PLAYER_CURRENT_SETTING_VALUES_RECEIVED event. More...
 
struct  bt_av_player_settings_text_t
 Parameter to AVRCP_EVT_PLAYER_SETTING_ATTRIBUTES_TEXT_RECEIVED event. More...
 
struct  bt_av_player_setting_values_text_t
 Parameter to AVRCP_EVT_PLAYER_SETTING_VALUES_TEXT_RECEIVED event. More...
 
struct  bt_av_element_attribute_t
 Media element attribute. More...
 
struct  bt_av_element_attributes_t
 Parameter to AVRCP_EVT_GET_ELEMENT_ATTRIBUTES_RECEIVED event. More...
 
struct  bt_av_play_status_t
 Parameter to AVRCP_EVT_GET_PLAY_STATUS_RECEIVED event. More...
 
struct  bt_av_battery_status_of_ct_t
 Parameter to AVRCP_EVT_BATTERY_STATUS_OF_CT_RECEIVED event. More...
 
struct  bt_av_displayable_character_set_t
 Parameter to AVRCP_EVT_DISPLAYABLE_CHARACTER_SET_RECEIVED event. More...
 
struct  bt_av_notification_playback_status_changed_t
 Parameter to AVRCP_EVT_PLAYBACK_STATUS_CHANGED event. More...
 
struct  bt_av_notification_track_changed_t
 Parameter to AVRCP_EVT_TRACK_CHANGED event. More...
 
struct  bt_av_notification_playback_pos_changed_t
 Parameter to AVRCP_EVT_PLAYBACK_POS_CHANGED event. More...
 
struct  bt_av_notification_battery_status_t
 Parameter to AVRCP_EVT_BATT_STATUS_CHANGED event. More...
 
struct  bt_av_notification_system_status_changed_t
 Parameter to AVRCP_EVT_SYSTEM_STATUS_CHANGED event. More...
 
struct  bt_av_notification_addressed_player_changed_t
 Parameter to AVRCP_EVT_ADDRESSED_PLAYER_CHANGED event. More...
 
struct  bt_av_notification_uids_changed_t
 Parameter to AVRCP_EVT_UIDS_CHANGED event. More...
 
struct  bt_av_notification_volume_changed_t
 Parameter to AVRCP_EVT_VOLUME_CHANGED event. More...
 
struct  bt_av_notification_t
 Parameter to the following events: More...
 
struct  bt_av_set_absolute_volume_t
 Parameter to AVRCP_EVT_SET_ABSOLUTE_VOLUME_COMPLETED event. More...
 
struct  bt_av_set_addressed_player_t
 Parameter to AVRCP_EVT_SET_ADDRESSED_PLAYER_COMPLETED event. More...
 
struct  bt_av_play_item_t
 Parameter to AVRCP_EVT_PLAY_ITEM_COMPLETED event. More...
 
struct  bt_av_add_to_now_playing_t
 Parameter to AVRCP_EVT_ADD_TO_NOW_PLAYING_COMPLETED event. More...
 
struct  bt_av_get_element_attributes_t
 Parameter to AVRCP_EVT_ELEMENT_ATTRIBUTES_REQUESTED event. More...
 
struct  bt_av_register_notification_t
 Parameter to AVRCP_EVT_REGISTER_NOTIFICATION_REQUESTED event. More...
 

Typedefs

typedef void(* bt_avrcp_mgr_callback_fp) (bt_avrcp_mgr_t *mgr, bt_byte evt, bt_avrcp_event_t *evt_param, void *callback_param)
 AVRCP application callback. More...
 
typedef void(* bt_avrcp_find_callback_fp) (bt_bool found, bt_uint features, bt_int bip_psm, void *param)
 Find Controller/Target callback. More...
 

Functions

bt_avrcp_mgr_t * bt_avrcp_get_mgr (void)
 Return a pointer to an instance of the AVRCP manager. More...
 
void bt_avrcp_init_target (bt_ulong company_id, bt_uint supported_events)
 Initialize AVRCP to be used in target mode. More...
 
void bt_avrcp_init_controller (void)
 Initialize AVRCP to be used in controller mode. More...
 
void bt_avrcp_start (bt_avrcp_mgr_t *mgr, bt_avrcp_mgr_callback_fp callback, void *callback_param)
 Start the AVRCP layer. More...
 
bt_avrcp_channel_t * bt_avrcp_create_channel (bt_avrcp_mgr_t *mgr, bt_bool create_browsing_channel)
 Allocate AVRCP channel. More...
 
bt_avrcp_channel_t * bt_avrcp_create_outgoing_channel (bt_avrcp_mgr_t *mgr, bt_bool create_browsing_channel)
 Allocate AVRCP channel. More...
 
bt_bool bt_avrcp_destroy_channel (bt_avrcp_channel_t *channel)
 Destroy AVRCP channel. More...
 
bt_bool bt_avrcp_listen (bt_avrcp_channel_t *channel)
 Listen for incoming connections. More...
 
void bt_avrcp_cancel_listen (bt_avrcp_channel_t *channel)
 Cancel listening for incoming connections. More...
 
bt_byte bt_avrcp_get_control_channel_state (bt_avrcp_channel_t *channel)
 Get AVCTP control channel state. More...
 
bt_byte bt_avrcp_get_browsing_channel_state (bt_avrcp_channel_t *channel)
 Get AVCTP browsing channel state. More...
 
bt_bdaddr_t * bt_avrcp_get_channel_remote_address (bt_avrcp_channel_t *channel)
 Get channel's remote BT address. More...
 
bt_bool bt_avrcp_connect (bt_avrcp_channel_t *channel, bt_bdaddr_t *remote_address)
 Connect to a remote device. More...
 
bt_bool bt_avrcp_disconnect (bt_avrcp_channel_t *channel)
 Disconnect from a remote device. More...
 
bt_hci_conn_state_t * bt_avrcp_get_hci_connection (bt_avrcp_channel_t *channel)
 Get HCI connection for a channel. More...
 
bt_bool bt_avrcp_send_cmd (bt_avrcp_channel_t *channel, bt_av_command_t *command)
 Send AVRCP command. More...
 
bt_bool bt_avrcp_add_to_now_playing (bt_avrcp_channel_t *channel, bt_byte scope, bt_av_element_id_t *element_id, bt_uint counter)
 Add to "now playing" list. More...
 
bt_bool bt_avrcp_get_company_id_list (bt_avrcp_channel_t *channel)
 Get Company ID list. More...
 
bt_bool bt_avrcp_get_supported_event_id_list (bt_avrcp_channel_t *channel)
 Get supported events. More...
 
bt_bool bt_avrcp_get_current_player_application_setting_value (bt_avrcp_channel_t *channel, bt_av_player_setting_current_values_t *response_buffer)
 Get current player setting values. More...
 
bt_bool bt_avrcp_get_element_attributes (bt_avrcp_channel_t *channel, bt_av_element_id_t *element_id, bt_uint attr_mask)
 Get media element attributes. More...
 
bt_bool bt_avrcp_get_play_status (bt_avrcp_channel_t *channel, bt_uint repeat_interval)
 Get playback status. More...
 
bt_bool bt_avrcp_get_player_application_setting_attr_text (bt_avrcp_channel_t *channel, bt_av_player_settings_text_t *response_buffer)
 Get player setting attribute text. More...
 
bt_bool bt_avrcp_get_player_application_setting_value_text (bt_avrcp_channel_t *channel, bt_byte attr_id, bt_av_player_setting_values_text_t *response_buffer)
 Get player setting value text. More...
 
bt_bool bt_avrcp_inform_battery_status (bt_avrcp_channel_t *channel, bt_byte status)
 Inform controller's battery status. More...
 
bt_bool bt_avrcp_inform_displayable_character_set (bt_avrcp_channel_t *channel, bt_uint *charset_list, bt_byte charset_count)
 Inform displayable character set. More...
 
bt_bool bt_avrcp_list_player_application_setting_attributes (bt_avrcp_channel_t *channel, bt_av_player_settings_t *response_buffer)
 Get supported player setting attributes. More...
 
bt_bool bt_avrcp_list_player_application_setting_values (bt_avrcp_channel_t *channel, bt_byte attr_id, bt_av_player_setting_values_t *response_buffer)
 Get player setting attribute values. More...
 
bt_bool bt_avrcp_play_item (bt_avrcp_channel_t *channel, bt_byte scope, bt_av_element_id_t *element_id, bt_uint counter)
 Play media item. More...
 
bt_bool bt_avrcp_register_notification (bt_avrcp_channel_t *channel, bt_byte event_id, bt_ulong playback_interval)
 Register notification. More...
 
bt_bool bt_avrcp_register_notifications (bt_avrcp_channel_t *channel, bt_uint event_mask)
 Register notifications. More...
 
bt_bool bt_avrcp_set_absolute_volume (bt_avrcp_channel_t *channel, bt_byte volume)
 Set absolute volume. More...
 
bt_bool bt_avrcp_set_addressed_player (bt_avrcp_channel_t *channel, bt_uint player_id)
 Set addressed player. More...
 
bt_bool bt_avrcp_set_player_application_setting_value (bt_avrcp_channel_t *channel, bt_byte *attr_id_list, bt_byte *attr_value_list, bt_byte attr_id_count)
 Set player setting attribute values. More...
 
bt_bool bt_avrcp_set_browsed_player (bt_avrcp_channel_t *channel, bt_uint player_id)
 Set browsed player. More...
 
bt_bool bt_avrcp_find_targets (bt_byte search_length)
 Find Targets. More...
 
bt_bool bt_avrcp_cancel_find (void)
 Cancel finding Targets. More...
 
bt_bool bt_avrcp_find_target (bt_bdaddr_t *deviceAddress, bt_avrcp_find_callback_fp callback, bt_sdp_client_callback_fp client_callback, void *callback_param)
 Find Target. More...
 
bt_bool bt_avrcp_find_controller (bt_bdaddr_t *deviceAddress, bt_avrcp_find_callback_fp callback, bt_sdp_client_callback_fp client_callback, void *callback_param)
 Find Controller. More...
 
void bt_avrcp_tg_set_play_status (bt_ulong song_length, bt_ulong song_position, bt_byte play_status)
 Set playback status. More...
 
void bt_avrcp_tg_set_current_track (bt_av_element_id_t *track_id, bt_ulong song_length, bt_ulong song_position)
 Set current track. More...
 
void bt_avrcp_tg_set_absolute_volume (bt_byte volume)
 Set absolute volume. More...
 
void bt_avrcp_tg_set_battery_status (bt_byte status)
 Set battery status. More...
 
void bt_avrcp_tg_set_system_status (bt_byte status)
 Set system status. More...
 
bt_bool bt_avrcp_tg_send_element_attributes (bt_avrcp_channel_t *channel, bt_byte tran_id, bt_av_element_attribute_t *attrs, bt_byte attr_count)
 Send media element attributes. More...
 
bt_bool bt_avrcp_get_unit_info (bt_avrcp_channel_t *channel)
 Get unit info. More...
 
bt_bool bt_avrcp_get_subuint_info (bt_avrcp_channel_t *channel)
 Get subunit info. More...
 
bt_bool bt_avrcp_send_simple_panel_cmd (bt_avrcp_channel_t *channel, bt_byte ctype, bt_byte opid, bt_byte button_state)
 Send AV/C Panel Subunit PASS THROUGH command. More...
 
bt_bool bt_avrcp_send_press_panel_control (bt_avrcp_channel_t *channel, bt_byte opid)
 Send AV/C Panel Subunit "pressed" PASS THROUGH command. More...
 
bt_bool bt_avrcp_send_release_panel_control (bt_avrcp_channel_t *channel, bt_byte opid)
 Send AV/C Panel Subunit "released" PASS THROUGH command. More...
 
bt_bool bt_avrcp_send_panel_control (bt_avrcp_channel_t *channel, bt_byte opid, bt_byte button_state)
 Send AV/C Panel Subunit "control" PASS THROUGH command. More...
 
bt_bool bt_avrcp_send_button_click (bt_avrcp_channel_t *channel, bt_byte button_id)
 Send AV/C Panel Subunit "click" PASS THROUGH command. More...
 

Events

The following is a list of events AVRCP layer generates and can report to the upper layer when it completes executing an operation initiated by either local or remote device.

#define AVCTP_EVT_NOTHING   0
 
#define AVCTP_EVT_CHANNEL_CONNECTED   1
 This event is generated when a channel between two AVCTP entities has been established.
 
#define AVCTP_EVT_CHANNEL_DISCONNECTED   2
 This event is generated when a channel between two AVCTP entities has been terminated.
 
#define AVCTP_EVT_CONNECTION_FAILED   3
 This event is generated when a local device failed to create a channel between two AVCTP entities.
 
#define AVCTP_EVT_COMMAND_RECEIVED   50
 This event is generated when a local device received a command.
 
#define AVCTP_EVT_RESPONE_RECEIVED   51
 This event is generated when a local device received a response.
 
#define AVCTP_EVT_COMMAND_SENT   52
 This event is generated when a local device finished sending a command.
 
#define AVCTP_EVT_RESPONSE_SENT   53
 This event is generated when a local device finished sending a response.
 
#define AVCTP_EVT_COMMAND_CANCELLED   54
 This event is generated when a command has been canceled.
 
#define AVCTP_EVT_RESPONSE_CANCELLED   55
 This event is generated when a response has been canceled.
 

Events

The following is a list of events AVRCP layer generates and can report to the upper layer when it completes executing an operation initiated by either local or remote device.

#define AVRCP_EVT_NOTHING   0
 
#define AVRCP_EVT_CONTROL_CHANNEL_CONNECTED   1
 This event is generated when a control channel between two AVRCP entities has been established.
 
#define AVRCP_EVT_CONTROL_CHANNEL_DISCONNECTED   2
 This event is generated when a control channel between two AVRCP entities has been terminated.
 
#define AVRCP_EVT_CONTROL_CONNECTION_FAILED   3
 This event is generated when a local device failed to create a control channel between two AVRCP entities.
 
#define AVRCP_EVT_BROWSING_CHANNEL_CONNECTED   4
 This event is generated when a browsing channel between two AVRCP entities has been established.
 
#define AVRCP_EVT_BROWSING_CHANNEL_DISCONNECTED   5
 This event is generated when a browsing channel between two AVRCP entities has been terminated.
 
#define AVRCP_EVT_BROWSING_CONNECTION_FAILED   6
 This event is generated when a local device failed to create a browsing channel between two AVRCP entities.
 
#define AVRCP_EVT_SEARCH_COMPLETED   7
 This event is generated when a local device completed searching for nearby targets.
 
#define AVRCP_EVT_COVER_ART_CHANNEL_CONNECTED   8
 This event is generated when a browsing channel between two AVRCP entities has been established.
 
#define AVRCP_EVT_COVER_ART_CHANNEL_DISCONNECTED   9
 This event is generated when a browsing channel between two AVRCP entities has been terminated.
 
#define AVRCP_EVT_PANEL_RESPONSE_RECEIVED   50
 This event is generated when a local device received a response to a PASS THROUGH command.
 
#define AVRCP_EVT_COMPANY_ID_LIST_RECEIVED   51
 This event is generated when a local device received a response to a "get company id" request.
 
#define AVRCP_EVT_EVENT_ID_LIST_RECEIVED   52
 This event is generated when a local device received a response to a "get supported events" request.
 
#define AVRCP_EVT_PLAYER_SETTING_ATTRIBUTES_RECEIVED   53
 This event is generated when a local device received a response to a "get supported player setting attributes" request.
 
#define AVRCP_EVT_PLAYER_SETTING_VALUES_RECEIVED   54
 This event is generated when a local device received a response to a "get player setting attribute values" request.
 
#define AVRCP_EVT_PLAYER_CURRENT_SETTING_VALUES_RECEIVED   55
 This event is generated when a local device received a response to a "get current player setting attribute values" request.
 
#define AVRCP_EVT_SET_PLAYER_SETTING_VALUES_COMPLETED   56
 This event is generated when a local device received a response to a "set player setting attribute values" request.
 
#define AVRCP_EVT_PLAYER_SETTING_ATTRIBUTES_TEXT_RECEIVED   57
 This event is generated when a local device received a response to a "get player setting attributes displayable text" request.
 
#define AVRCP_EVT_PLAYER_SETTING_VALUES_TEXT_RECEIVED   58
 This event is generated when a local device received a response to a "get player setting attribute values displayable text" request.
 
#define AVRCP_EVT_INFORM_DISPLAYABLE_CHARACTER_SET_COMPLETED   59
 This event is generated when a local device received a response to a "inform displayable character set" request.
 
#define AVRCP_EVT_INFORM_BATTERY_STATUS_OF_CT_COMPLETED   60
 This event is generated when a local device received a response to a "inform battery status" request.
 
#define AVRCP_EVT_GET_ELEMENT_ATTRIBUTES_RECEIVED   61
 This event is generated when a local device received a response to a "get media element attributes" request.
 
#define AVRCP_EVT_GET_PLAY_STATUS_RECEIVED   62
 This event is generated when a local device received a response to a "get play status" request.
 
#define AVRCP_EVT_PLAYBACK_STATUS_CHANGED   63
 This event is generated when a local device received a "play status changed" notification.
 
#define AVRCP_EVT_TRACK_CHANGED   64
 This event is generated when a local device received a "track changed changed" notification.
 
#define AVRCP_EVT_TRACK_REACHED_END   65
 This event is generated when a local device received a "track reached end" notification.
 
#define AVRCP_EVT_TRACK_REACHED_START   66
 This event is generated when a local device received a "track reached start" notification.
 
#define AVRCP_EVT_PLAYBACK_POS_CHANGED   67
 This event is generated when a local device received a "playback position changed" notification.
 
#define AVRCP_EVT_BATT_STATUS_CHANGED   68
 This event is generated when a local device received a "battery status changed" notification.
 
#define AVRCP_EVT_SYSTEM_STATUS_CHANGED   69
 This event is generated when a local device received a "system status changed" notification.
 
#define AVRCP_EVT_PLAYER_APPLICATION_SETTING_CHANGED   70
 This event is generated when a local device received a "player application setting changed" notification.
 
#define AVRCP_EVT_NOW_PLAYING_CONTENT_CHANGED   71
 This event is generated when a local device received a "now playing content changed" notification.
 
#define AVRCP_EVT_AVAILABLE_PLAYERS_CHANGED   72
 This event is generated when a local device received a "available players changed" notification.
 
#define AVRCP_EVT_ADDRESSED_PLAYER_CHANGED   73
 This event is generated when a local device received a "addressed player changed" notification.
 
#define AVRCP_EVT_UIDS_CHANGED   74
 This event is generated when a local device received a "UIDs changed" notification.
 
#define AVRCP_EVT_VOLUME_CHANGED   75
 This event is generated when a local device received a "volume changed" notification.
 
#define AVRCP_EVT_SET_ABSOLUTE_VOLUME_COMPLETED   76
 This event is generated when a local device received a response to a "set absolute volume" request.
 
#define AVRCP_EVT_SET_ADDRESSED_PLAYER_COMPLETED   77
 This event is generated when a local device received a response to a "set addressed player" request.
 
#define AVRCP_EVT_PLAY_ITEM_COMPLETED   78
 This event is generated when a local device received a response to a "play item" request.
 
#define AVRCP_EVT_ADD_TO_NOW_PLAYING_COMPLETED   79
 This event is generated when a local device received a response to a "add to now playing" request.
 
#define AVRCP_EVT_REGISTER_NOTIFICATIONS_COMPLETED   80
 This event is generated when a local device received a response to a "register notification" request.
 
#define AVRCP_EVT_PANEL_COMMAND_RECEIVED   81
 This event is generated when a local device received a PASS THROUGH command.
 
#define AVRCP_EVT_SET_ABSOLUTE_VOLUME_REQUESTED   82
 This event is generated when a local device received a "set absolute volume" request.
 
#define AVRCP_EVT_BATTERY_STATUS_OF_CT_RECEIVED   83
 This event is generated when a local device received a "battery status of controller" command.
 
#define AVRCP_EVT_DISPLAYABLE_CHARACTER_SET_RECEIVED   84
 This event is generated when a local device received a "displayable chracter set command" request.
 
#define AVRCP_EVT_ELEMENT_ATTRIBUTES_REQUESTED   85
 This event is generated when a local device received a "get element attributes" request.
 
#define AVRCP_EVT_REGISTER_NOTIFICATION_REQUESTED   86
 This event is generated when a local device received a "register notification" request.
 
#define AVRCP_EVT_GET_FOLDER_ITEMS_COMPLETED   87
 
#define AVRCP_EVT_MEDIA_PLAYER_RECEIVED   88
 
#define AVRCP_EVT_FOLDER_RECEIVED   89
 
#define AVRCP_EVT_MEDIA_ELEMENT_RECEIVED   90
 
#define AVRCP_EVT_CHANGE_PATH_COMPLETED   91
 
#define AVRCP_EVT_SET_BROWSED_PLAYER_COMPLETED   92
 
#define AVRCP_EVT_GET_ITEM_ATTRIBUTES_RECEIVED   93
 This event is generated when a local device received a response to a "get media item attributes" request.
 
#define AVRCP_EVT_GET_TOTAL_NUMBER_OF_ITEMS_RECEIVED   94
 
#define AVRCP_EVT_MEDIA_SEARCH_COMPLETED   95
 
#define AVRCP_EVT_GENERAL_REJECT   96
 
#define AVRCP_EVT_IMAGE_FRAGMENT_RECEIVED   97
 
#define AVRCP_EVT_IMAGE_THUMB_FRAGMENT_RECEIVED   98
 
#define AVRCP_EVT_IMAGE_PROPS_RECEIVED   99
 
#define AVRCP_EVT_IMAGE_PROPERTY   100
 

Command types

#define AVC_CTYPE_CONTROL   0
 
#define AVC_CTYPE_STATUS   1
 
#define AVC_CTYPE_SPECIFIC_IQUIRY   2
 
#define AVC_CTYPE_NOTIFY   3
 
#define AVC_CTYPE_GENERAL_INQUORY   4
 

Response types

#define AVC_RESPONSE_NOT_IMPLEMENTED   0x8
 
#define AVC_RESPONSE_ACCEPTED   0x9
 
#define AVC_RESPONSE_REJECTED   0xA
 
#define AVC_RESPONSE_IN_TRANSITION   0xB
 
#define AVC_RESPONSE_STABLE   0xC
 
#define AVC_RESPONSE_IMPLEMENTED   0xC
 
#define AVC_RESPONSE_CHANGED   0xD
 
#define AVC_RESPONSE_INTERIM   0xF
 
#define AVC_RESPONSE_TIMEOUT   0xF0
 

Subunit types

#define AVC_SUBUNIT_TYPE_MONITOR   0x00
 
#define AVC_SUBUNIT_TYPE_AUDIO   0x01
 
#define AVC_SUBUNIT_TYPE_PRINTER   0x02
 
#define AVC_SUBUNIT_TYPE_DISC   0x03
 
#define AVC_SUBUNIT_TYPE_TAPE_RECORDER_PLAYER   0x04
 
#define AVC_SUBUNIT_TYPE_TUNER   0x05
 
#define AVC_SUBUNIT_TYPE_CA   0x06
 
#define AVC_SUBUNIT_TYPE_CAMERA   0x07
 
#define AVC_SUBUNIT_TYPE_PANEL   0x09
 
#define AVC_SUBUNIT_TYPE_BULLETIN_BOARD   0x0A
 
#define AVC_SUBUNIT_TYPE_CAMERA_STORAGE   0x0B
 
#define AVC_SUBUNIT_TYPE_VENDOR_UNIQUE   0x1C
 
#define AVC_SUBUNIT_TYPE_EXTENDED_TO_NEXT_BYTE   0x1E
 
#define AVC_SUBUNIT_TYPE_UNIT   0x1F
 

AV/C Panel PASS THROUGH operation IDs

#define AVC_PANEL_OPID_SELECT   0x00
 
#define AVC_PANEL_OPID_UP   0x01
 
#define AVC_PANEL_OPID_DOWN   0x02
 
#define AVC_PANEL_OPID_LEFT   0x03
 
#define AVC_PANEL_OPID_RIGHT   0x04
 
#define AVC_PANEL_OPID_RIGHT_UP   0x05
 
#define AVC_PANEL_OPID_RIGHT_DOWN   0x06
 
#define AVC_PANEL_OPID_LEFT_UP   0x07
 
#define AVC_PANEL_OPID_LEFT_DOWN   0x08
 
#define AVC_PANEL_OPID_ROOT_MENU   0x09
 
#define AVC_PANEL_OPID_SETUP_MENU   0x0A
 
#define AVC_PANEL_OPID_CONTENTS_MENU   0x0B
 
#define AVC_PANEL_OPID_FAVORITE_MENU   0x0C
 
#define AVC_PANEL_OPID_EXIT   0x0D
 
#define AVC_PANEL_OPID_ON_DEMAND_MENU   0x0E
 
#define AVC_PANEL_OPID_APPS_MENU   0x0F
 
#define AVC_PANEL_OPID_0   0x20
 
#define AVC_PANEL_OPID_1   0x21
 
#define AVC_PANEL_OPID_2   0x22
 
#define AVC_PANEL_OPID_3   0x23
 
#define AVC_PANEL_OPID_4   0x24
 
#define AVC_PANEL_OPID_5   0x25
 
#define AVC_PANEL_OPID_6   0x26
 
#define AVC_PANEL_OPID_7   0x27
 
#define AVC_PANEL_OPID_8   0x28
 
#define AVC_PANEL_OPID_9   0x29
 
#define AVC_PANEL_OPID_DOT   0x2A
 
#define AVC_PANEL_OPID_ENTER   0x2B
 
#define AVC_PANEL_OPID_CLEAR   0x2C
 
#define AVC_PANEL_OPID_CHANNEL_UP   0x30
 
#define AVC_PANEL_OPID_CHANNEL_DOWN   0x31
 
#define AVC_PANEL_OPID_PREVIOUS_CHANNEL   0x32
 
#define AVC_PANEL_OPID_SOUND_SELECT   0x33
 
#define AVC_PANEL_OPID_INPUT_SELECT   0x34
 
#define AVC_PANEL_OPID_DISPLAY_INFORMATION   0x35
 
#define AVC_PANEL_OPID_HELP   0x36
 
#define AVC_PANEL_OPID_PAGE_UP   0x37
 
#define AVC_PANEL_OPID_PAGE_DOWN   0x38
 
#define AVC_PANEL_OPID_LIVE_TV   0x39
 
#define AVC_PANEL_OPID_ZOOM   0x3A
 
#define AVC_PANEL_OPID_LOCK   0x3B
 
#define AVC_PANEL_OPID_SKIP   0x3C
 
#define AVC_PANEL_OPID_NEXT_DAY   0x3D
 
#define AVC_PANEL_OPID_PREVIOUS_DAY   0x3E
 
#define AVC_PANEL_OPID_LINKED_CONTENT   0x3F
 
#define AVC_PANEL_OPID_POWER_TOGGLE   0x40
 
#define AVC_PANEL_OPID_VOLUME_UP   0x41
 
#define AVC_PANEL_OPID_VOLUME_DOWN   0x42
 
#define AVC_PANEL_OPID_MUTE   0x43
 
#define AVC_PANEL_OPID_PLAY   0x44
 
#define AVC_PANEL_OPID_STOP   0x45
 
#define AVC_PANEL_OPID_PAUSE   0x46
 
#define AVC_PANEL_OPID_RECORD   0x47
 
#define AVC_PANEL_OPID_REWIND   0x48
 
#define AVC_PANEL_OPID_FAST_FORWARD   0x49
 
#define AVC_PANEL_OPID_EJECT   0x4A
 
#define AVC_PANEL_OPID_FORWARD   0x4B
 
#define AVC_PANEL_OPID_BACKWARD   0x4C
 
#define AVC_PANEL_OPID_LIST   0x4D
 
#define AVC_PANEL_OPID_ANGLE   0x50
 
#define AVC_PANEL_OPID_SUBPICTURE   0x51
 
#define AVC_PANEL_OPID_PIP_MOVE   0x52
 
#define AVC_PANEL_OPID_PIP_DOWN   0x53
 
#define AVC_PANEL_OPID_PIP_UP   0x54
 
#define AVC_PANEL_OPID_RF_BYPASS   0x55
 
#define AVC_PANEL_OPID_PLAY_FUNCTION   0x60
 
#define AVC_PANEL_OPID_PAUSE_PLAY_FUNCTION   0x61
 
#define AVC_PANEL_OPID_RECORD_FUNCTION   0x62
 
#define AVC_PANEL_OPID_PAUSE_RECORD_FUNCTION   0x63
 
#define AVC_PANEL_OPID_STOP_FUNCTION   0x64
 
#define AVC_PANEL_OPID_MUTE_FUNCTION   0x65
 
#define AVC_PANEL_OPID_RESTORE_FOLUME_FUNCTION   0x66
 
#define AVC_PANEL_OPID_TUNE_FUNCTION   0x67
 
#define AVC_PANEL_OPID_SELECT_DISK_FUNCTION   0x68
 
#define AVC_PANEL_OPID_SELECT_AV_INPUT_FUNCTION   0x69
 
#define AVC_PANEL_OPID_SELECT_AUDIO_INPUT_FUNCTION   0x6A
 
#define AVC_PANEL_OPID_POWER_STATE_FUNCTION   0x6B
 
#define AVC_PANEL_OPID_KEYBORD_FUNCTION   0x6C
 
#define AVC_PANEL_OPID_F1   0x71
 
#define AVC_PANEL_OPID_F2   0x72
 
#define AVC_PANEL_OPID_F3   0x73
 
#define AVC_PANEL_OPID_F4   0x74
 
#define AVC_PANEL_OPID_F5   0x75
 
#define AVC_PANEL_OPID_F6   0x76
 
#define AVC_PANEL_OPID_F7   0x77
 
#define AVC_PANEL_OPID_F8   0x78
 
#define AVC_PANEL_OPID_F9   0x79
 
#define AVC_PANEL_OPID_A   0x7A
 
#define AVC_PANEL_OPID_B   0x7B
 
#define AVC_PANEL_OPID_C   0x7C
 
#define AVC_PANEL_OPID_D   0x7D
 
#define AVC_PANEL_OPID_VENDOR_UNIQUE   0x7E
 

Battery status

#define AVC_BATTERY_STATUS_NORMAL   0
 
#define AVC_BATTERY_STATUS_WARNING   1
 
#define AVC_BATTERY_STATUS_CRITICAL   2
 
#define AVC_BATTERY_STATUS_EXTERNAL   3
 
#define AVC_BATTERY_STATUS_FULL_CHARGE   4
 

Media attribute IDs

#define AVC_MEDIA_ATTR_ID_TITLE   1
 
#define AVC_MEDIA_ATTR_ID_ARTIST   2
 
#define AVC_MEDIA_ATTR_ID_ALBUM   3
 
#define AVC_MEDIA_ATTR_ID_NUMBER   4
 
#define AVC_MEDIA_ATTR_ID_TOTAL_NUMBER   5
 
#define AVC_MEDIA_ATTR_ID_GENRE   6
 
#define AVC_MEDIA_ATTR_ID_PLAYING_TIME   7
 
#define AVC_MEDIA_ATTR_ID_DEF_COVER_ART   8
 

Media attribute bitmask

#define AVC_MEDIA_ATTR_FLAG_TITLE   0x01
 
#define AVC_MEDIA_ATTR_FLAG_ARTIST   0x02
 
#define AVC_MEDIA_ATTR_FLAG_ALBUM   0x04
 
#define AVC_MEDIA_ATTR_FLAG_NUMBER   0x08
 
#define AVC_MEDIA_ATTR_FLAG_TOTAL_NUMBER   0x10
 
#define AVC_MEDIA_ATTR_FLAG_GENRE   0x20
 
#define AVC_MEDIA_ATTR_FLAG_PLAYING_TIME   0x40
 
#define AVC_MEDIA_ATTR_FLAG_DEF_COVER_ART   0x80
 
#define AVC_MEDIA_ATTR_FLAG_ALL   0xFF
 

Play status

#define AVC_PLAY_STATUS_STOPPED   0
 
#define AVC_PLAY_STATUS_PLAYING   1
 
#define AVC_PLAY_STATUS_PAUSED   2
 
#define AVC_PLAY_STATUS_FW_SEEK   3
 
#define AVC_PLAY_STATUS_REV_SEEK   4
 
#define AVC_PLAY_STATUS_ERROR   0xFF
 

Notifications

#define AVC_EVENT_PLAYBACK_STATUS_CHANGED   0x01
 Change in playback status of the current track.
 
#define AVC_EVENT_TRACK_CHANGED   0x02
 Change of current track.
 
#define AVC_EVENT_TRACK_REACHED_END   0x03
 Reached end of a track.
 
#define AVC_EVENT_TRACK_REACHED_START   0x04
 Reached start of a track.
 
#define AVC_EVENT_PLAYBACK_POS_CHANGED   0x05
 Change in playback position. Returned after the specified playback notification change notification interval.
 
#define AVC_EVENT_BATT_STATUS_CHANGED   0x06
 Change in battery status.
 
#define AVC_EVENT_SYSTEM_STATUS_CHANGED   0x07
 Change in system status.
 
#define AVC_EVENT_PLAYER_APPLICATION_SETTING_CHANGED   0x08
 Change in player application setting.
 
#define AVC_EVENT_NOW_PLAYING_CONTENT_CHANGED   0x09
 The content of the Now Playing list has changed, see 6.9.5.
 
#define AVC_EVENT_AVAILABLE_PLAYERS_CHANGED   0x0a
 The available players have changed, see 6.9.
 
#define AVC_EVENT_ADDRESSED_PLAYER_CHANGED   0x0b
 The Addressed Player has been changed, see 6.9.2.
 
#define AVC_EVENT_UIDS_CHANGED   0x0c
 The UIDs have changed, see 6.10.3.3.
 
#define AVC_EVENT_VOLUME_CHANGED   0x0d
 The volume has been changed locally on the TG, see 6.13.3.
 

Notifications mask

#define AVC_EVENT_FLAG_PLAYBACK_STATUS_CHANGED   0x0001
 
#define AVC_EVENT_FLAG_TRACK_CHANGED   0x0002
 
#define AVC_EVENT_FLAG_TRACK_REACHED_END   0x0004
 
#define AVC_EVENT_FLAG_TRACK_REACHED_START   0x0008
 
#define AVC_EVENT_FLAG_PLAYBACK_POS_CHANGED   0x0010
 
#define AVC_EVENT_FLAG_BATT_STATUS_CHANGED   0x0020
 
#define AVC_EVENT_FLAG_SYSTEM_STATUS_CHANGED   0x0040
 
#define AVC_EVENT_FLAG_PLAYER_APPLICATION_SETTING_CHANGED   0x0080
 
#define AVC_EVENT_FLAG_NOW_PLAYING_CONTENT_CHANGED   0x0100
 
#define AVC_EVENT_FLAG_AVAILABLE_PLAYERS_CHANGED   0x0200
 
#define AVC_EVENT_FLAG_ADDRESSED_PLAYER_CHANGED   0x0400
 
#define AVC_EVENT_FLAG_UIDS_CHANGED   0x0800
 
#define AVC_EVENT_FLAG_VOLUME_CHANGED   0x1000
 
#define AVC_EVENT_FLAG_ALL   0x1FFF
 

Media navigation scope

#define AVC_SCOPE_MEDIA_PLAYER_LIST   0x00
 
#define AVC_MEDIA_PLAYER_VIRTUAL_FILESYSTEM   0x01
 
#define AVC_SEARCH   0x02
 
#define AVC_NOW_PLAYING   0x03
 

Detailed Description

The Audio/Video Remote Control Profile (AVRCP) defines the features and procedures required in order to ensure interoperability between Bluetooth devices with audio/video control functions in the Audio/Video distribution scenarios.

Typedef Documentation

typedef void(* bt_avrcp_find_callback_fp) (bt_bool found, bt_uint features, bt_int bip_psm, void *param)

Find Controller/Target callback.

This callback is called when search for Controller/Target has finished.

Parameters
foundThis can be one of the following values:
  • TRUE if Controller/Target was found.
  • FALSE otherwise.
callback_paramA pointer to an arbitrary data set by a call to bt_avrcp_find_target/bt_avrcp_find_controller.
typedef void(* bt_avrcp_mgr_callback_fp) (bt_avrcp_mgr_t *mgr, bt_byte evt, bt_avrcp_event_t *evt_param, void *callback_param)

AVRCP application callback.

In order to be notified of various events a consumer of the AVRCP layer has to register a callback function (done with bt_avrcp_start()). The stack will call that function whenever a new event has been generated.

Parameters
mgrAVRCP manager.
evtAVRCP event. The event can be one of the following values:
  • AVRCP_EVT_CONTROL_CHANNEL_CONNECTED This event is generated when a control channel between two AVRCP entities has been established.
  • AVRCP_EVT_CONTROL_CHANNEL_DISCONNECTED This event is generated when a control channel between two AVRCP entities has been terminated.
  • AVRCP_EVT_CONTROL_CONNECTION_FAILED This event is generated when a local device failed to create a control channel between two AVRCP entities.
  • AVRCP_EVT_BROWSING_CHANNEL_CONNECTED This event is generated when a browsing channel between two AVRCP entities has been established.
  • AVRCP_EVT_BROWSING_CHANNEL_DISCONNECTED This event is generated when a browsing channel between two AVRCP entities has been terminated.
  • AVRCP_EVT_BROWSING_CONNECTION_FAILED This event is generated when a local device failed to create a browsing channel between two AVRCP entities.
  • AVRCP_EVT_SEARCH_COMPLETED This event is generated when a local device completed searching for nearby targets.
  • AVRCP_EVT_PANEL_RESPONSE_RECEIVED This event is generated when a local device received a response to a PASS THROUGH command.
  • AVRCP_EVT_COMPANY_ID_LIST_RECEIVED This event is generated when a local device received a response to a "get company id" request.
  • AVRCP_EVT_EVENT_ID_LIST_RECEIVED This event is generated when a local device received a response to a "get supported events" request.
  • AVRCP_EVT_PLAYER_SETTING_ATTRIBUTES_RECEIVED This event is generated when a local device received a response to a "get supported player setting attributes" request.
  • AVRCP_EVT_PLAYER_SETTING_VALUES_RECEIVED This event is generated when a local device received a response to a "get player setting attribute values" request.
  • AVRCP_EVT_PLAYER_CURRENT_SETTING_VALUES_RECEIVED This event is generated when a local device received a response to a "get current player setting attribute values" request.
  • AVRCP_EVT_SET_PLAYER_SETTING_VALUES_COMPLETED This event is generated when a local device received a response to a "set player setting attribute values" request.
  • AVRCP_EVT_PLAYER_SETTING_ATTRIBUTES_TEXT_RECEIVED This event is generated when a local device received a response to a "get player setting attributes displayable text" request.
  • AVRCP_EVT_PLAYER_SETTING_VALUES_TEXT_RECEIVED This event is generated when a local device received a response to a "get player setting attribute values displayable text" request.
  • AVRCP_EVT_INFORM_DISPLAYABLE_CHARACTER_SET_COMPLETED This event is generated when a local device received a response to a "inform displayable character set" request.
  • AVRCP_EVT_INFORM_BATTERY_STATUS_OF_CT_COMPLETED This event is generated when a local device received a response to a "inform battery status" request.
  • AVRCP_EVT_GET_ELEMENT_ATTRIBUTES_RECEIVED This event is generated when a local device received a response to a "get media element attributes" request.
  • AVRCP_EVT_GET_PLAY_STATUS_RECEIVED This event is generated when a local device received a response to a "get play status" request.
  • AVRCP_EVT_PLAYBACK_STATUS_CHANGED This event is generated when a local device received a "play status changed" notification.
  • AVRCP_EVT_TRACK_CHANGED This event is generated when a local device received a "track changed changed" notification.
  • AVRCP_EVT_TRACK_REACHED_END This event is generated when a local device received a "track reached end" notification.
  • AVRCP_EVT_TRACK_REACHED_START This event is generated when a local device received a "track reached start" notification.
  • AVRCP_EVT_PLAYBACK_POS_CHANGED This event is generated when a local device received a "playback position changed" notification.
  • AVRCP_EVT_BATT_STATUS_CHANGED This event is generated when a local device received a "battery status changed" notification.
  • AVRCP_EVT_SYSTEM_STATUS_CHANGED This event is generated when a local device received a "system status changed" notification.
  • AVRCP_EVT_PLAYER_APPLICATION_SETTING_CHANGED This event is generated when a local device received a "player application setting changed" notification.
  • AVRCP_EVT_NOW_PLAYING_CONTENT_CHANGED This event is generated when a local device received a "now playing content changed" notification.
  • AVRCP_EVT_AVAILABLE_PLAYERS_CHANGED This event is generated when a local device received a "available players changed" notification.
  • AVRCP_EVT_ADDRESSED_PLAYER_CHANGED This event is generated when a local device received a "addressed player changed" notification.
  • AVRCP_EVT_UIDS_CHANGED This event is generated when a local device received a "UIDs changed" notification.
  • AVRCP_EVT_VOLUME_CHANGED This event is generated when a local device received a "volume changed" notification.
  • AVRCP_EVT_SET_ABSOLUTE_VOLUME_COMPLETED This event is generated when a local device received a response to a "set absolute volume" request.
  • AVRCP_EVT_SET_ADDRESSED_PLAYER_COMPLETED This event is generated when a local device received a response to a "set addressed player" request.
  • AVRCP_EVT_PLAY_ITEM_COMPLETED This event is generated when a local device received a response to a "play item" request.
  • AVRCP_EVT_ADD_TO_NOW_PLAYING_COMPLETED This event is generated when a local device received a response to a "add to now playing" request.
  • AVRCP_EVT_REGISTER_NOTIFICATIONS_COMPLETED This event is generated when a local device received a response to a "register notification" request.
  • AVRCP_EVT_PANEL_COMMAND_RECEIVED This event is generated when a local device received a PASS THROUGH command.
  • AVRCP_EVT_SET_ABSOLUTE_VOLUME_REQUESTED This event is generated when a local device received a "set absolute volume" request.
  • AVRCP_EVT_BATTERY_STATUS_OF_CT_RECEIVED This event is generated when a local device received a "battery status of controller" command.
  • AVRCP_EVT_DISPLAYABLE_CHARACTER_SET_RECEIVED This event is generated when a local device received a "displayable chracter set command" request.
  • AVRCP_EVT_ELEMENT_ATTRIBUTES_REQUESTED This event is generated when a local device received a "get element attributes" request.
evt_paramEvent parameter. Which member of the bt_avrcp_event_t union is valid depends on the event:
callback_paramA pointer to an arbitrary data set by a call to bt_avrcp_start.

Function Documentation

bt_bool bt_avrcp_add_to_now_playing ( bt_avrcp_channel_t *  channel,
bt_byte  scope,
bt_av_element_id_t element_id,
bt_uint  counter 
)

Add to "now playing" list.

This function adds a media element specified by element_id to the "now playing" list on the target.

Parameters
channelAVRCP channel.
scopeThe scope in which the element_id is valid. This value can be on the following values:
  • AVC_SCOPE_MEDIA_PLAYER_LIST
  • AVC_MEDIA_PLAYER_VIRTUAL_FILESYSTEM
  • AVC_SEARCH
  • AVC_NOW_PLAYING
element_idUID of the media element to be added to the "now playing" list.
counterUID counter.
Returns
  • TRUE if the function succeeds.
  • FALSE otherwise.
bt_bool bt_avrcp_cancel_find ( void  )

Cancel finding Targets.

This function stops AVRCP layer looking for targets on nearby devices. As a result of this operation the AVRCP_EVT_SEARCH_COMPLETED event will be generated.

Returns
  • TRUE if the function succeeds.
  • FALSE otherwise. the callback is not called in this case.
void bt_avrcp_cancel_listen ( bt_avrcp_channel_t *  channel)

Cancel listening for incoming connections.

This function stops listening for incoming connections on a specified channel.

Parameters
channelAVRCP channel.
Returns
  • TRUE if the function succeeds.
  • FALSE otherwise.
bt_bool bt_avrcp_connect ( bt_avrcp_channel_t *  channel,
bt_bdaddr_t *  remote_address 
)

Connect to a remote device.

This function establishes a connection to a remote device specified by the remote_address. If connection cannot be initiated for some reason, for example, there is not enough resources, it returns FALSE and no events are generated. Otherwise the result of an attempt to connect to the remote device is reported via the AVRCP callback. The events generated will either be AVRCP_EVT_CONTROL_CHANNEL_CONNECTED or AVRCP_EVT_CONTROL_CONNECTION_FAILED.

Parameters
channelAVRCP channel.
remote_addressThe address of a remote device.
Returns
  • TRUE if connection establishment has been started.
  • FALSE otherwise.
bt_avrcp_channel_t* bt_avrcp_create_channel ( bt_avrcp_mgr_t *  mgr,
bt_bool  create_browsing_channel 
)

Allocate AVRCP channel.

This function allocates a new incoming AVRCP channel. The channel is intended to be used to accept a connection from a remote device. There can be only one incoming channel.

Parameters
mgrAVRCP manager.
create_browsing_channelDefines weather a browsing channel will be created.
Returns
  • A pointer to the new AVRCP channel if the function succeeds.
  • NULL otherwise.
bt_avrcp_channel_t* bt_avrcp_create_outgoing_channel ( bt_avrcp_mgr_t *  mgr,
bt_bool  create_browsing_channel 
)

Allocate AVRCP channel.

This function allocates a new outgoing AVRCP channel. The channel is intended to be used to create a connection to a remote device. There can be multiple outgoing channels.

Parameters
mgrAVRCP manager.
create_browsing_channelDefines weather a browsing channel will be created.
Returns
  • A pointer to the new AVRCP channel if the function succeeds.
  • NULL otherwise.
bt_bool bt_avrcp_destroy_channel ( bt_avrcp_channel_t *  channel)

Destroy AVRCP channel.

This function frees memory used by the channel. The channel has to exist and be in the "idle" state for this function to succeed. I.e. the channel has to be disconnected before this function can be called.

Parameters
channelAVRCP channel.
Returns
  • TRUE if the function succeeds.
  • FALSE otherwise.
bt_bool bt_avrcp_disconnect ( bt_avrcp_channel_t *  channel)

Disconnect from a remote device.

This function closes a connection to a remote device.

Parameters
channelAVRCP channel.
Returns
  • TRUE if disconnection has been started.
  • FALSE otherwise. No events will be generated.
bt_bool bt_avrcp_find_controller ( bt_bdaddr_t *  deviceAddress,
bt_avrcp_find_callback_fp  callback,
bt_sdp_client_callback_fp  client_callback,
void *  callback_param 
)

Find Controller.

This function looks for a controller on a remote device specified by deviceAddress.

Parameters
deviceAddressThe address of a remote device.
callbackThe callback function that will be called when search has completed.
client_callbackThe optional callback function that an application can set if it wants to be notified of state changes of the SDP client. The evt parameter of the callback can be one of the following values:
  • SDP_CLIENT_STATE_IDLE
  • SDP_CLIENT_STATE_CONNECTING
  • SDP_CLIENT_STATE_DISCONNECTING
  • SDP_CLIENT_STATE_CONNECTED
callback_paramA pointer to arbitrary data to be passed to the callback and client_callback callbacks.
Returns
  • TRUE if the function succeeds.
  • FALSE otherwise. the callback is not called in this case.
bt_bool bt_avrcp_find_target ( bt_bdaddr_t *  deviceAddress,
bt_avrcp_find_callback_fp  callback,
bt_sdp_client_callback_fp  client_callback,
void *  callback_param 
)

Find Target.

This function looks for a target on a remote device specified by deviceAddress.

Parameters
deviceAddressThe address of a remote device.
callbackThe callback function that will be called when search has completed.
client_callbackThe optional callback function that an application can set if it wants to be notified of state changes of the SDP client. The evt parameter of the callback can be one of the following values:
  • SDP_CLIENT_STATE_IDLE
  • SDP_CLIENT_STATE_CONNECTING
  • SDP_CLIENT_STATE_DISCONNECTING
  • SDP_CLIENT_STATE_CONNECTED
callback_paramA pointer to arbitrary data to be passed to the callback and client_callback callbacks.
Returns
  • TRUE if the function succeeds.
  • FALSE otherwise. the callback is not called in this case.
bt_bool bt_avrcp_find_targets ( bt_byte  search_length)

Find Targets.

This function looks for targets on nearby devices. The AVRCP_EVT_SEARCH_COMPLETED event is generated when the search has completed.

Parameters
search_lengthThe amount of time the search will be performed for.
Returns
  • TRUE if the function succeeds.
  • FALSE otherwise. the callback is not called in this case.
bt_byte bt_avrcp_get_browsing_channel_state ( bt_avrcp_channel_t *  channel)

Get AVCTP browsing channel state.

This function returns status of the AVCTP browsing channel.

Parameters
channelAVRCP channel.
Returns
Returns of the following values:
  • AVCTP_CHANNEL_STATE_FREE
  • AVCTP_CHANNEL_STATE_IDLE
  • AVCTP_CHANNEL_STATE_CONNECTING
  • AVCTP_CHANNEL_STATE_CONNECTED
  • AVCTP_CHANNEL_STATE_DISCONNECTING
bt_bdaddr_t* bt_avrcp_get_channel_remote_address ( bt_avrcp_channel_t *  channel)

Get channel's remote BT address.

This function returns the address of the remote device associated with the channel.

Parameters
channelAVRCP channel.
Returns
  • The address of the remote device if channel is connected.
  • NULL otherwise.
bt_bool bt_avrcp_get_company_id_list ( bt_avrcp_channel_t *  channel)

Get Company ID list.

This function requests a list of company id's supported by the remote device

Parameters
channelAVRCP channel.
Returns
  • TRUE if the function succeeds.
  • FALSE otherwise.
bt_byte bt_avrcp_get_control_channel_state ( bt_avrcp_channel_t *  channel)

Get AVCTP control channel state.

This function returns status of the AVCTP control channel.

Parameters
channelAVRCP channel.
Returns
Returns of the following values:
  • AVCTP_CHANNEL_STATE_FREE
  • AVCTP_CHANNEL_STATE_IDLE
  • AVCTP_CHANNEL_STATE_CONNECTING
  • AVCTP_CHANNEL_STATE_CONNECTED
  • AVCTP_CHANNEL_STATE_DISCONNECTING
bt_bool bt_avrcp_get_current_player_application_setting_value ( bt_avrcp_channel_t *  channel,
bt_av_player_setting_current_values_t response_buffer 
)

Get current player setting values.

This function requests a list of current set values for the player application on the target. The list of attribute ids whose values have to be returned is passed via the response_buffer parameter. The caller has to set bt_av_player_setting_current_values_t::setting_id_list to a list of player setting attribute ids, bt_av_player_setting_current_values_t::count to the number of entries in the list, bt_av_player_setting_current_values_t::setting_value_id_list to a buffer where returned values will be stored.

Parameters
channelAVRCP channel.
response_bufferPointer to bt_av_player_setting_current_values_t structure initialized as stated above.
Returns
  • TRUE if the function succeeds.
  • FALSE otherwise.
bt_bool bt_avrcp_get_element_attributes ( bt_avrcp_channel_t *  channel,
bt_av_element_id_t element_id,
bt_uint  attr_mask 
)

Get media element attributes.

This function requests the attributes of the element specified with element_id.

Note
Currently element_id is ignored. The AVRCP specification defines that only UID 0 can be used to return the attributes of the current track.
Parameters
channelAVRCP channel.
element_idUID of the media element whose attributes are requested.
attr_maskBitmask that defines which attributes are requested. This value can be a combination of the following values:
  • AVC_MEDIA_ATTR_FLAG_TITLE
  • AVC_MEDIA_ATTR_FLAG_ARTIST
  • AVC_MEDIA_ATTR_FLAG_ALBUM
  • AVC_MEDIA_ATTR_FLAG_NUMBER
  • AVC_MEDIA_ATTR_FLAG_TOTAL_NUMBER
  • AVC_MEDIA_ATTR_FLAG_GENRE
  • AVC_MEDIA_ATTR_FLAG_PLAYING_TIME
  • AVC_MEDIA_ATTR_FLAG_ALL
Returns
  • TRUE if the function succeeds.
  • FALSE otherwise.
bt_hci_conn_state_t* bt_avrcp_get_hci_connection ( bt_avrcp_channel_t *  channel)

Get HCI connection for a channel.

This function returns a pointer to a structure that describes an HCI connection a channel 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.

Parameters
channelAVRCP channel.
Returns
  • Pointer to a structure that describes an HCI connection if the function succeeds.
  • NULL otherwise. The function fails only if a channel specified by the channel parameter
  • does not exist or there is no HCI connection between local and remote devices associated with the channel.
bt_avrcp_mgr_t* bt_avrcp_get_mgr ( void  )

Return a pointer to an instance of the AVRCP manager.

This function returns a pointer to an instance of the AVRCP manager. There is only one instance of the manager allocated by the stack.

bt_bool bt_avrcp_get_play_status ( bt_avrcp_channel_t *  channel,
bt_uint  repeat_interval 
)

Get playback status.

This function requests the status of the currently playing media at the target.

Parameters
channelAVRCP channel.
repeat_intervalInterval in milliseconds at which AVRCP polls the target for playback status. If 0 is passed polling is stopped.
Returns
  • TRUE if the function succeeds.
  • FALSE otherwise.
bt_bool bt_avrcp_get_player_application_setting_attr_text ( bt_avrcp_channel_t *  channel,
bt_av_player_settings_text_t response_buffer 
)

Get player setting attribute text.

This function requests the target device to provide supported player application setting attribute displayable text for the provided player application setting attributes. The list of attribute ids whose displayable text have to be returned is passed via the response_buffer parameter. The caller has to set bt_av_player_settings_text_t::setting_id_list to a list of player setting attribute ids, bt_av_player_settings_text_t::count to the number of entries in the list, bt_av_player_settings_text_t::setting_text_list to a buffer where returned values will be stored.

Parameters
channelAVRCP channel.
response_bufferPointer to bt_av_player_settings_text_t structure initialized as stated above.
Returns
  • TRUE if the function succeeds.
  • FALSE otherwise.
bt_bool bt_avrcp_get_player_application_setting_value_text ( bt_avrcp_channel_t *  channel,
bt_byte  attr_id,
bt_av_player_setting_values_text_t response_buffer 
)

Get player setting value text.

This function request the target device to provide target supported player application setting value displayable text for the provided player application setting attribute values. The list of attribute ids whose value displayable text have to be returned is passed via the response_buffer parameter. The caller has to set bt_av_player_setting_values_text_t::setting_value_id_list to a list of player setting attribute value ids, bt_av_player_setting_values_text_t::count to the number of entries in the list, bt_av_player_setting_values_text_t::setting_value_text_list to a buffer where returned values will be stored.

Parameters
channelAVRCP channel.
response_bufferPointer to bt_av_player_setting_values_text_t structure initialized as stated above.
Returns
  • TRUE if the function succeeds.
  • FALSE otherwise.
bt_bool bt_avrcp_get_subuint_info ( bt_avrcp_channel_t *  channel)

Get subunit info.

This function is used to request subunit info from the target.

Parameters
channelAVRCP channel.
Returns
  • TRUE if the function succeeds.
  • FALSE otherwise.
bt_bool bt_avrcp_get_supported_event_id_list ( bt_avrcp_channel_t *  channel)

Get supported events.

This function requests a list of events supported by the remote device

Parameters
channelAVRCP channel.
Returns
  • TRUE if the function succeeds.
  • FALSE otherwise.
bt_bool bt_avrcp_get_unit_info ( bt_avrcp_channel_t *  channel)

Get unit info.

This function is used to request unit info from the target.

Parameters
channelAVRCP channel.
Returns
  • TRUE if the function succeeds.
  • FALSE otherwise.
bt_bool bt_avrcp_inform_battery_status ( bt_avrcp_channel_t *  channel,
bt_byte  status 
)

Inform controller's battery status.

This function is used to inform the target about the controller's battery status.

Parameters
channelAVRCP channel.
statusBattery status. This can be one of the following values:
  • AVC_BATTERY_STATUS_NORMAL
  • AVC_BATTERY_STATUS_WARNING
  • AVC_BATTERY_STATUS_CRITICAL
  • AVC_BATTERY_STATUS_EXTERNAL
  • AVC_BATTERY_STATUS_FULL_CHARGE
Returns
  • TRUE if the function succeeds.
  • FALSE otherwise.
bt_bool bt_avrcp_inform_displayable_character_set ( bt_avrcp_channel_t *  channel,
bt_uint *  charset_list,
bt_byte  charset_count 
)

Inform displayable character set.

This function informs the list of character set supported by the controller to the target.

Parameters
channelAVRCP channel.
charset_listList of displayable character sets.
charset_countNumber of entries in the list.
Returns
  • TRUE if the function succeeds.
  • FALSE otherwise.
void bt_avrcp_init_controller ( void  )

Initialize AVRCP to be used in controller mode.

This function initializes the AVRCP layer of the stack in controller mode. It must be called prior to any other AVRCP function can be called.

void bt_avrcp_init_target ( bt_ulong  company_id,
bt_uint  supported_events 
)

Initialize AVRCP to be used in target mode.

This function initializes the AVRCP layer of the stack in target mode. It must be called prior to any other AVRCP function can be called.

Parameters
company_idThe 24-bit unique ID obtained from the IEEE Registration Authority Committee. If the vendor of a TG device does not have the unique ID, the value 0xFFFFFF may be used.
supported_eventsBitmask that specifies events supported by the target. This value can be a combination of the following values:
  • AVC_EVENT_FLAG_PLAYBACK_STATUS_CHANGED
  • AVC_EVENT_FLAG_TRACK_CHANGED
  • AVC_EVENT_FLAG_TRACK_REACHED_END
  • AVC_EVENT_FLAG_TRACK_REACHED_START
  • AVC_EVENT_FLAG_PLAYBACK_POS_CHANGED
  • AVC_EVENT_FLAG_BATT_STATUS_CHANGED
  • AVC_EVENT_FLAG_SYSTEM_STATUS_CHANGED
  • AVC_EVENT_FLAG_PLAYER_APPLICATION_SETTING_CHANGED
  • AVC_EVENT_FLAG_NOW_PLAYING_CONTENT_CHANGED
  • AVC_EVENT_FLAG_AVAILABLE_PLAYERS_CHANGED
  • AVC_EVENT_FLAG_ADDRESSED_PLAYER_CHANGED
  • AVC_EVENT_FLAG_UIDS_CHANGED
  • AVC_EVENT_FLAG_VOLUME_CHANGED
bt_bool bt_avrcp_list_player_application_setting_attributes ( bt_avrcp_channel_t *  channel,
bt_av_player_settings_t response_buffer 
)

Get supported player setting attributes.

This function request the target device to provide target supported player application setting attributes. The list of attribute ids is stored in the setting_id_list member of the response_buffer parameter. The caller has to set bt_av_player_settings_t::setting_id_list to a buffer where returned values will be stored and bt_av_player_settings_t::count to the number of entries in the list.

Parameters
channelAVRCP channel.
response_bufferPointer to bt_av_player_settings_t structure initialized as stated above.
Returns
  • TRUE if the function succeeds.
  • FALSE otherwise.
bt_bool bt_avrcp_list_player_application_setting_values ( bt_avrcp_channel_t *  channel,
bt_byte  attr_id,
bt_av_player_setting_values_t response_buffer 
)

Get player setting attribute values.

This function requests the target device to list the set of possible values for the requested player application setting attribute. The list of attribute value ids is stored in the setting_value_id_list member of the response_buffer parameter. The caller has to set bt_av_player_setting_values_t::setting_value_id_list to a buffer where returned values will be stored and bt_av_player_setting_values_t::count to the number of entries in the list.

Parameters
channelAVRCP channel.
response_bufferPointer to bt_av_player_setting_values_t structure initialized as stated above.
Returns
  • TRUE if the function succeeds.
  • FALSE otherwise.
bt_bool bt_avrcp_listen ( bt_avrcp_channel_t *  channel)

Listen for incoming connections.

This function enables incoming connections on the specified AVRCP channel.

Parameters
channelAVRCP channel.
Returns
  • TRUE if the function succeeds.
  • FALSE otherwise.
bt_bool bt_avrcp_play_item ( bt_avrcp_channel_t *  channel,
bt_byte  scope,
bt_av_element_id_t element_id,
bt_uint  counter 
)

Play media item.

This function starts playing an item indicated by the UID.

Parameters
channelAVRCP channel.
scopeThe scope in which the element_id is valid. This value can be on the following values:
  • AVC_SCOPE_MEDIA_PLAYER_LIST
  • AVC_MEDIA_PLAYER_VIRTUAL_FILESYSTEM
  • AVC_SEARCH
  • AVC_NOW_PLAYING
element_idUID of the media element to be played.
counterUID counter.
Returns
  • TRUE if the function succeeds.
  • FALSE otherwise.
bt_bool bt_avrcp_register_notification ( bt_avrcp_channel_t *  channel,
bt_byte  event_id,
bt_ulong  playback_interval 
)

Register notification.

This function registers with the target to receive notifications asynchronously based on specific events occurring.

Parameters
channelAVRCP channel.
event_idEvent Id. This value can be one of the following values:
  • AVC_EVENT_PLAYBACK_STATUS_CHANGED
  • AVC_EVENT_TRACK_CHANGED
  • AVC_EVENT_TRACK_REACHED_END
  • AVC_EVENT_TRACK_REACHED_START
  • AVC_EVENT_PLAYBACK_POS_CHANGED
  • AVC_EVENT_BATT_STATUS_CHANGED
  • AVC_EVENT_SYSTEM_STATUS_CHANGED
  • AVC_EVENT_PLAYER_APPLICATION_SETTING_CHANGED
  • AVC_EVENT_NOW_PLAYING_CONTENT_CHANGED
  • AVC_EVENT_AVAILABLE_PLAYERS_CHANGED
  • AVC_EVENT_ADDRESSED_PLAYER_CHANGED
  • AVC_EVENT_UIDS_CHANGED
  • AVC_EVENT_VOLUME_CHANGED
playback_intervalThe time interval (in seconds) at which the change in playback position will be notified. Applicable for AVC_EVENT_PLAYBACK_POS_CHANGED event.
Returns
  • TRUE if the function succeeds.
  • FALSE otherwise.
bt_bool bt_avrcp_register_notifications ( bt_avrcp_channel_t *  channel,
bt_uint  event_mask 
)

Register notifications.

This function registers with the target to receive notifications asynchronously based on specific events occurring. This function is used to register multiple notifications with one call.

Note
This function cannot be used to register for AVC_EVENT_PLAYBACK_POS_CHANGED event.
Parameters
channelAVRCP channel.
event_maskBitmask that specifies which events to register for. This value can be a combination of the following values:
  • AVC_EVENT_FLAG_PLAYBACK_STATUS_CHANGED
  • AVC_EVENT_FLAG_TRACK_CHANGED
  • AVC_EVENT_FLAG_TRACK_REACHED_END
  • AVC_EVENT_FLAG_TRACK_REACHED_START
  • AVC_EVENT_FLAG_BATT_STATUS_CHANGED
  • AVC_EVENT_FLAG_SYSTEM_STATUS_CHANGED
  • AVC_EVENT_FLAG_PLAYER_APPLICATION_SETTING_CHANGED
  • AVC_EVENT_FLAG_NOW_PLAYING_CONTENT_CHANGED
  • AVC_EVENT_FLAG_AVAILABLE_PLAYERS_CHANGED
  • AVC_EVENT_FLAG_ADDRESSED_PLAYER_CHANGED
  • AVC_EVENT_FLAG_UIDS_CHANGED
  • AVC_EVENT_FLAG_VOLUME_CHANGED
  • AVC_EVENT_FLAG_ALL
Returns
  • TRUE if the function succeeds.
  • FALSE otherwise.
bt_bool bt_avrcp_send_button_click ( bt_avrcp_channel_t *  channel,
bt_byte  button_id 
)

Send AV/C Panel Subunit "click" PASS THROUGH command.

This function is used to send a button click. Two PATH THROUGTH commands are sent. The first command has button state set to AVC_PANEL_BUTTON_PRESSED. The second command gas button state set to AVC_PANEL_BUTTON_RELEASED

Parameters
channelAVRCP channel.
button_idOperation Id. This value can be on of the AVC_PANEL_OPID_... constants
Returns
  • TRUE if the function succeeds.
  • FALSE otherwise.
bt_bool bt_avrcp_send_cmd ( bt_avrcp_channel_t *  channel,
bt_av_command_t *  command 
)

Send AVRCP command.

This function sends a command to the remote device.

Parameters
channelAVRCP channel.
commandCommand to be sent.
Returns
  • TRUE if the function succeeds.
  • FALSE otherwise.
bt_bool bt_avrcp_send_panel_control ( bt_avrcp_channel_t *  channel,
bt_byte  opid,
bt_byte  button_state 
)

Send AV/C Panel Subunit "control" PASS THROUGH command.

This function is used to send AV/C Panel Subunit PASS THROUGH command with command type set to AVC_CTYPE_CONTROL.

Parameters
channelAVRCP channel.
opidOperation Id. This value can be on of the AVC_PANEL_OPID_... constants
button_stateButton state. This can be on of the following values:
  • AVC_PANEL_BUTTON_PRESSED
  • AVC_PANEL_BUTTON_RELEASED
Returns
  • TRUE if the function succeeds.
  • FALSE otherwise.
bt_bool bt_avrcp_send_press_panel_control ( bt_avrcp_channel_t *  channel,
bt_byte  opid 
)

Send AV/C Panel Subunit "pressed" PASS THROUGH command.

This function is used to send AV/C Panel Subunit PASS THROUGH command with button state set to AVC_PANEL_BUTTON_PRESSED.

Parameters
channelAVRCP channel.
opidOperation Id. This value can be on of the AVC_PANEL_OPID_... constants
Returns
  • TRUE if the function succeeds.
  • FALSE otherwise.
bt_bool bt_avrcp_send_release_panel_control ( bt_avrcp_channel_t *  channel,
bt_byte  opid 
)

Send AV/C Panel Subunit "released" PASS THROUGH command.

This function is used to send AV/C Panel Subunit PASS THROUGH command with button state set to AVC_PANEL_BUTTON_RELEASED.

Parameters
channelAVRCP channel.
opidOperation Id. This value can be on of the AVC_PANEL_OPID_... constants
Returns
  • TRUE if the function succeeds.
  • FALSE otherwise.
bt_bool bt_avrcp_send_simple_panel_cmd ( bt_avrcp_channel_t *  channel,
bt_byte  ctype,
bt_byte  opid,
bt_byte  button_state 
)

Send AV/C Panel Subunit PASS THROUGH command.

This function is used to send AV/C Panel Subunit PASS THROUGH command to the target.

Parameters
channelAVRCP channel.
ctypeCommand type. This value can be on of the following values:
  • AVC_CTYPE_CONTROL 0
  • AVC_CTYPE_STATUS 1
  • AVC_CTYPE_SPECIFIC_IQUIRY 2
  • AVC_CTYPE_NOTIFY 3
  • AVC_CTYPE_GENERAL_INQUORY 4
opidOperation Id. This value can be on of the AVC_PANEL_OPID_... constants
button_stateButton state. This can be on of the following values:
  • AVC_PANEL_BUTTON_PRESSED
  • AVC_PANEL_BUTTON_RELEASED
Returns
  • TRUE if the function succeeds.
  • FALSE otherwise.
bt_bool bt_avrcp_set_absolute_volume ( bt_avrcp_channel_t *  channel,
bt_byte  volume 
)

Set absolute volume.

This function is used to set an absolute volume to be used by the rendering device.

Parameters
channelAVRCP channel.
volumeVolume
Returns
  • TRUE if the function succeeds.
  • FALSE otherwise.
bt_bool bt_avrcp_set_addressed_player ( bt_avrcp_channel_t *  channel,
bt_uint  player_id 
)

Set addressed player.

This function is used to inform the target of which media player the controller wishes to control.

Parameters
channelAVRCP channel.
player_idPlayer Id.
Returns
  • TRUE if the function succeeds.
  • FALSE otherwise.
bt_bool bt_avrcp_set_browsed_player ( bt_avrcp_channel_t *  channel,
bt_uint  player_id 
)

Set browsed player.

This function is used to control to which player browsing commands should be routed.

Parameters
channelAVRCP channel.
player_idPlayer Id.
Returns
  • TRUE if the function succeeds.
  • FALSE otherwise.
bt_bool bt_avrcp_set_player_application_setting_value ( bt_avrcp_channel_t *  channel,
bt_byte *  attr_id_list,
bt_byte *  attr_value_list,
bt_byte  attr_id_count 
)

Set player setting attribute values.

This function requests to set the player application setting list of player application setting values on the target device for the corresponding defined list of setting attributes. for the requested player application setting attribute. The list of attribute value ids is stored in the setting_value_id_list member of the response_buffer parameter. The caller has to set bt_av_player_setting_values_t::setting_value_id_list to a buffer where returned values will be stored and bt_av_player_setting_values_t::count to the number of entries in the list.

Parameters
channelAVRCP channel.
attr_id_listList of setting attribute ids.
attr_value_listList of setting attribute value ids.
attr_id_countThe number of entries in both lists.
Returns
  • TRUE if the function succeeds.
  • FALSE otherwise.
void bt_avrcp_start ( bt_avrcp_mgr_t *  mgr,
bt_avrcp_mgr_callback_fp  callback,
void *  callback_param 
)

Start the AVRCP layer.

In order to be notified of various events a consumer of the AVRCP layer has to register a callback function. The stack will call the callback function whenever a new event has been generated passing the code of the event as the second parameter. bt_avrcp_start() stores pointers to the callback and callback_param in the bt_avrcp_mgr_t structure.

Parameters
mgrAVRCP manager.
callbackThe callback function that will be called when the AVRCP generates an event.
callback_paramA pointer to arbitrary data to be passed to the callback callback.
bt_bool bt_avrcp_tg_send_element_attributes ( bt_avrcp_channel_t *  channel,
bt_byte  tran_id,
bt_av_element_attribute_t attrs,
bt_byte  attr_count 
)

Send media element attributes.

This function is used to send the system status when AVRCP is running in target mode. If there are active connections with controllers, the ones that registered for AVC_EVENT_SYSTEM_STATUS_CHANGED event will be notified.

Parameters
statusBattery status
void bt_avrcp_tg_set_absolute_volume ( bt_byte  volume)

Set absolute volume.

This function is used to set the absolute volume when AVRCP is running in target mode. If there are active connections with controllers, the ones that registered for AVC_EVENT_VOLUME_CHANGED event will be notified.

Parameters
track_idTrack Id
song_lengthThe length of the current track.
song_positionThe position of the current track.
void bt_avrcp_tg_set_battery_status ( bt_byte  status)

Set battery status.

This function is used to set the battery status when AVRCP is running in target mode. If there are active connections with controllers, the ones that registered for AVC_EVENT_BATT_STATUS_CHANGED event will be notified.

Parameters
statusBattery status
void bt_avrcp_tg_set_current_track ( bt_av_element_id_t track_id,
bt_ulong  song_length,
bt_ulong  song_position 
)

Set current track.

This function is used to set the current track when AVRCP is running in target mode. If there are active connections with controllers, the ones that registered for AVC_EVENT_TRACK_CHANGED event will be notified.

Parameters
track_idTrack Id
song_lengthThe length of the current track.
song_positionThe position of the current track.
void bt_avrcp_tg_set_play_status ( bt_ulong  song_length,
bt_ulong  song_position,
bt_byte  play_status 
)

Set playback status.

This function is used to set the playback status when AVRCP is running in target mode. If there are active connections with controllers, the ones that registered for AVC_EVENT_PLAYBACK_STATUS_CHANGED event will be notified.

Parameters
song_lengthThe length of the current track.
song_positionThe position of the current track.
play_statusPlayback status. This value can be one of the following values:
  • AVC_PLAY_STATUS_STOPPED
  • AVC_PLAY_STATUS_PLAYING
  • AVC_PLAY_STATUS_PAUSED
  • AVC_PLAY_STATUS_FW_SEEK
  • AVC_PLAY_STATUS_REV_SEEK
void bt_avrcp_tg_set_system_status ( bt_byte  status)

Set system status.

This function is used to set the system status when AVRCP is running in target mode. If there are active connections with controllers, the ones that registered for AVC_EVENT_SYSTEM_STATUS_CHANGED event will be notified.

Parameters
statusBattery status