Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
avrcp.h File Reference

Audio Video Remote Control Profile header. More...

Go to the source code of this file.

Data Structures

struct  bt_avrcp_unit_info_rsp
struct  bt_avrcp_subunit_info_rsp
struct  bt_avrcp_passthrough_opvu_data
struct  bt_avrcp_passthrough_cmd
struct  bt_avrcp_passthrough_rsp
struct  bt_avrcp_get_caps_rsp
struct  bt_avrcp_folder_name
 get folder name (response) More...
struct  bt_avrcp_set_browsed_player_rsp
 Set browsed player response structure. More...
struct  bt_avrcp_get_element_attrs_cmd
 GetElementAttributes command request structure. More...
struct  bt_avrcp_media_attr
 AVRCP Media Attribute structure. More...
struct  bt_avrcp_get_element_attrs_rsp
 GetElementAttributes response structure. More...
struct  bt_avrcp_list_app_setting_attr_rsp
 ListPlayerApplicationSettingAttributes response. More...
struct  bt_avrcp_list_player_app_setting_vals_cmd
 ListPlayerApplicationSettingValues command request. More...
struct  bt_avrcp_list_player_app_setting_vals_rsp
 ListPlayerApplicationSettingValues response. More...
struct  bt_avrcp_get_curr_player_app_setting_val_cmd
 GetCurrentPlayerApplicationSettingValue command request. More...
struct  bt_avrcp_app_setting_attr_val
 AVRCP Attribute-Value Pair. More...
struct  bt_avrcp_get_curr_player_app_setting_val_rsp
 GetCurrentPlayerApplicationSettingValue response. More...
struct  bt_avrcp_set_player_app_setting_val_cmd
 SetPlayerApplicationSettingValue command request. More...
struct  bt_avrcp_get_player_app_setting_attr_text_cmd
 GetPlayerApplicationSettingAttributeText command request. More...
struct  bt_avrcp_app_setting_attr_text
 AVRCP Attribute Text Entry. More...
struct  bt_avrcp_get_player_app_setting_attr_text_rsp
 GetPlayerApplicationSettingAttributeText response. More...
struct  bt_avrcp_get_player_app_setting_val_text_cmd
 GetPlayerApplicationSettingValueText command request. More...
struct  bt_avrcp_app_setting_val_text
 AVRCP Attribute Text Entry. More...
struct  bt_avrcp_get_player_app_setting_val_text_rsp
 GetPlayerApplicationSettingValueText response. More...
struct  bt_avrcp_inform_displayable_char_set_cmd
 InformDisplayableCharacterSet command request. More...
struct  bt_avrcp_inform_batt_status_of_ct_cmd
 InformBatteryStatusOfCT command request. More...
struct  bt_avrcp_get_play_status_rsp
 GetPlayStatus response. More...
struct  bt_avrcp_register_notification_cmd
 RegisterNotification command request. More...
struct  bt_avrcp_set_absolute_volume_cmd
 SetAbsoluteVolume command request. More...
struct  bt_avrcp_set_absolute_volume_rsp
 SetAbsoluteVolume response. More...
struct  bt_avrcp_set_addressed_player_cmd
 SetAddressedPlayer command request. More...
struct  bt_avrcp_play_item_cmd
 PlayItem command request. More...
struct  bt_avrcp_add_to_now_playing_cmd
 AddToNowPlaying command request. More...
struct  bt_avrcp_event_data
struct  bt_avrcp_ct_cb
struct  bt_avrcp_tg_cb

Macros

#define BT_AVRCP_COMPANY_ID_SIZE   (3)
#define BT_AVRCP_COMPANY_ID_BLUETOOTH_SIG   (0x001958)
#define BT_AVRCP_PASSTHROUGH_GET_STATE(payload)
#define BT_AVRCP_PASSTHROUGH_GET_OPID(payload)
#define BT_AVRCP_PASSTHROUGH_SET_STATE_OPID(payload, state, opid)
#define BT_AVRCP_MAX_ABSOLUTE_VOLUME   0x7F
 AVRCP MAX absolute volume.

Typedefs

typedef void(* bt_avrcp_notify_changed_cb_t) (struct bt_avrcp_ct *ct, uint8_t event_id, struct bt_avrcp_event_data *data)
 Callback for AVRCP event notifications (CHANGED only).

Enumerations

enum  bt_avrcp_cap_t { BT_AVRCP_CAP_COMPANY_ID = 0x2 , BT_AVRCP_CAP_EVENTS_SUPPORTED = 0x3 }
 AVRCP Capability ID. More...
enum  bt_avrcp_evt_t {
  BT_AVRCP_EVT_PLAYBACK_STATUS_CHANGED = 0x01 , BT_AVRCP_EVT_TRACK_CHANGED = 0x02 , BT_AVRCP_EVT_TRACK_REACHED_END = 0x03 , BT_AVRCP_EVT_TRACK_REACHED_START = 0x04 ,
  BT_AVRCP_EVT_PLAYBACK_POS_CHANGED = 0x05 , BT_AVRCP_EVT_BATT_STATUS_CHANGED = 0x06 , BT_AVRCP_EVT_SYSTEM_STATUS_CHANGED = 0x07 , BT_AVRCP_EVT_PLAYER_APP_SETTING_CHANGED = 0x08 ,
  BT_AVRCP_EVT_NOW_PLAYING_CONTENT_CHANGED = 0x09 , BT_AVRCP_EVT_AVAILABLE_PLAYERS_CHANGED = 0x0a , BT_AVRCP_EVT_ADDRESSED_PLAYER_CHANGED = 0x0b , BT_AVRCP_EVT_UIDS_CHANGED = 0x0c ,
  BT_AVRCP_EVT_VOLUME_CHANGED = 0x0d
}
 AVRCP Notification Events. More...
enum  bt_avrcp_ctype_t {
  BT_AVRCP_CTYPE_CONTROL = 0x0 , BT_AVRCP_CTYPE_STATUS = 0x1 , BT_AVRCP_CTYPE_SPECIFIC_INQUIRY = 0x2 , BT_AVRCP_CTYPE_NOTIFY = 0x3 ,
  BT_AVRCP_CTYPE_GENERAL_INQUIRY = 0x4
}
 AV/C command types. More...
enum  bt_avrcp_rsp_t {
  BT_AVRCP_RSP_NOT_IMPLEMENTED = 0x8 , BT_AVRCP_RSP_ACCEPTED = 0x9 , BT_AVRCP_RSP_REJECTED = 0xa , BT_AVRCP_RSP_IN_TRANSITION = 0xb ,
  BT_AVRCP_RSP_IMPLEMENTED = 0xc , BT_AVRCP_RSP_STABLE = 0xc , BT_AVRCP_RSP_CHANGED = 0xd , BT_AVRCP_RSP_INTERIM = 0xf
}
 AV/C response codes. More...
enum  bt_avrcp_subunit_type_t { BT_AVRCP_SUBUNIT_TYPE_PANEL = 0x09 , BT_AVRCP_SUBUNIT_TYPE_UNIT = 0x1f }
 AV/C subunit type, also used for unit type. More...
enum  bt_avrcp_opid_t {
  BT_AVRCP_OPID_SELECT = 0x00 , BT_AVRCP_OPID_UP = 0x01 , BT_AVRCP_OPID_DOWN = 0x02 , BT_AVRCP_OPID_LEFT = 0x03 ,
  BT_AVRCP_OPID_RIGHT = 0x04 , BT_AVRCP_OPID_RIGHT_UP = 0x05 , BT_AVRCP_OPID_RIGHT_DOWN = 0x06 , BT_AVRCP_OPID_LEFT_UP = 0x07 ,
  BT_AVRCP_OPID_LEFT_DOWN = 0x08 , BT_AVRCP_OPID_ROOT_MENU = 0x09 , BT_AVRCP_OPID_SETUP_MENU = 0x0a , BT_AVRCP_OPID_CONTENTS_MENU = 0x0b ,
  BT_AVRCP_OPID_FAVORITE_MENU = 0x0c , BT_AVRCP_OPID_EXIT = 0x0d , BT_AVRCP_OPID_0 = 0x20 , BT_AVRCP_OPID_1 = 0x21 ,
  BT_AVRCP_OPID_2 = 0x22 , BT_AVRCP_OPID_3 = 0x23 , BT_AVRCP_OPID_4 = 0x24 , BT_AVRCP_OPID_5 = 0x25 ,
  BT_AVRCP_OPID_6 = 0x26 , BT_AVRCP_OPID_7 = 0x27 , BT_AVRCP_OPID_8 = 0x28 , BT_AVRCP_OPID_9 = 0x29 ,
  BT_AVRCP_OPID_DOT = 0x2a , BT_AVRCP_OPID_ENTER = 0x2b , BT_AVRCP_OPID_CLEAR = 0x2c , BT_AVRCP_OPID_CHANNEL_UP = 0x30 ,
  BT_AVRCP_OPID_CHANNEL_DOWN = 0x31 , BT_AVRCP_OPID_PREVIOUS_CHANNEL = 0x32 , BT_AVRCP_OPID_SOUND_SELECT = 0x33 , BT_AVRCP_OPID_INPUT_SELECT = 0x34 ,
  BT_AVRCP_OPID_DISPLAY_INFORMATION = 0x35 , BT_AVRCP_OPID_HELP = 0x36 , BT_AVRCP_OPID_PAGE_UP = 0x37 , BT_AVRCP_OPID_PAGE_DOWN = 0x38 ,
  BT_AVRCP_OPID_POWER = 0x40 , BT_AVRCP_OPID_VOLUME_UP = 0x41 , BT_AVRCP_OPID_VOLUME_DOWN = 0x42 , BT_AVRCP_OPID_MUTE = 0x43 ,
  BT_AVRCP_OPID_PLAY = 0x44 , BT_AVRCP_OPID_STOP = 0x45 , BT_AVRCP_OPID_PAUSE = 0x46 , BT_AVRCP_OPID_RECORD = 0x47 ,
  BT_AVRCP_OPID_REWIND = 0x48 , BT_AVRCP_OPID_FAST_FORWARD = 0x49 , BT_AVRCP_OPID_EJECT = 0x4a , BT_AVRCP_OPID_FORWARD = 0x4b ,
  BT_AVRCP_OPID_BACKWARD = 0x4c , BT_AVRCP_OPID_ANGLE = 0x50 , BT_AVRCP_OPID_SUBPICTURE = 0x51 , BT_AVRCP_OPID_F1 = 0x71 ,
  BT_AVRCP_OPID_F2 = 0x72 , BT_AVRCP_OPID_F3 = 0x73 , BT_AVRCP_OPID_F4 = 0x74 , BT_AVRCP_OPID_F5 = 0x75 ,
  BT_AVRCP_OPID_VENDOR_UNIQUE = 0x7e
}
 AV/C operation ids used in AVRCP passthrough commands. More...
enum  bt_avrcp_button_state_t { BT_AVRCP_BUTTON_PRESSED = 0 , BT_AVRCP_BUTTON_RELEASED = 1 }
 AVRCP button state flag. More...
enum  bt_avrcp_status_t {
  BT_AVRCP_STATUS_INVALID_COMMAND = 0x00 , BT_AVRCP_STATUS_INVALID_PARAMETER = 0x01 , BT_AVRCP_STATUS_PARAMETER_CONTENT_ERROR = 0x02 , BT_AVRCP_STATUS_INTERNAL_ERROR = 0x03 ,
  BT_AVRCP_STATUS_OPERATION_COMPLETED = 0x04 , BT_AVRCP_STATUS_UID_CHANGED = 0x05 , BT_AVRCP_STATUS_INVALID_DIRECTION = 0x07 , BT_AVRCP_STATUS_NOT_A_DIRECTORY = 0x08 ,
  BT_AVRCP_STATUS_DOES_NOT_EXIST = 0x09 , BT_AVRCP_STATUS_INVALID_SCOPE = 0x0a , BT_AVRCP_STATUS_RANGE_OUT_OF_BOUNDS = 0x0b , BT_AVRCP_STATUS_FOLDER_ITEM_IS_NOT_PLAYABLE = 0x0c ,
  BT_AVRCP_STATUS_MEDIA_IN_USE = 0x0d , BT_AVRCP_STATUS_NOW_PLAYING_LIST_FULL = 0x0e , BT_AVRCP_STATUS_SEARCH_NOT_SUPPORTED = 0x0f , BT_AVRCP_STATUS_SEARCH_IN_PROGRESS = 0x10 ,
  BT_AVRCP_STATUS_INVALID_PLAYER_ID = 0x11 , BT_AVRCP_STATUS_PLAYER_NOT_BROWSABLE = 0x12 , BT_AVRCP_STATUS_PLAYER_NOT_ADDRESSED = 0x13 , BT_AVRCP_STATUS_NO_VALID_SEARCH_RESULTS = 0x14 ,
  BT_AVRCP_STATUS_NO_AVAILABLE_PLAYERS = 0x15 , BT_AVRCP_STATUS_ADDRESSED_PLAYER_CHANGED = 0x16 , BT_AVRCP_STATUS_IN_TRANSITION = 0xfd , BT_AVRCP_STATUS_NOT_IMPLEMENTED = 0xfe ,
  BT_AVRCP_STATUS_SUCCESS = BT_AVRCP_STATUS_OPERATION_COMPLETED
}
 AVRCP status and error codes. More...
enum  bt_avrcp_charset_t { BT_AVRCP_CHARSET_UTF8 = 0x006a }
 AVRCP Character Set IDs. More...
enum  bt_avrcp_playback_status_t {
  BT_AVRCP_PLAYBACK_STATUS_STOPPED = 0x00 , BT_AVRCP_PLAYBACK_STATUS_PLAYING = 0x01 , BT_AVRCP_PLAYBACK_STATUS_PAUSED = 0x02 , BT_AVRCP_PLAYBACK_STATUS_FWD_SEEK = 0x03 ,
  BT_AVRCP_PLAYBACK_STATUS_REV_SEEK = 0x04 , BT_AVRCP_PLAYBACK_STATUS_ERROR = 0xFF
}
 AVRCP Playback Status. More...
enum  bt_avrcp_system_status_t { BT_AVRCP_SYSTEM_STATUS_POWER_ON = 0x00 , BT_AVRCP_SYSTEM_STATUS_POWER_OFF = 0x01 , BT_AVRCP_SYSTEM_STATUS_UNPLUGGED = 0x02 }
 AVRCP System Status Code. More...
enum  bt_avrcp_battery_status_t {
  BT_AVRCP_BATTERY_STATUS_NORMAL = 0x00 , BT_AVRCP_BATTERY_STATUS_WARNING = 0x01 , BT_AVRCP_BATTERY_STATUS_CRITICAL = 0x02 , BT_AVRCP_BATTERY_STATUS_EXTERNAL = 0x03 ,
  BT_AVRCP_BATTERY_STATUS_FULL = 0x04
}
 AVRCP Battery Status Code. More...
enum  bt_avrcp_media_attr_t {
  BT_AVRCP_MEDIA_ATTR_TITLE = 0x01 , BT_AVRCP_MEDIA_ATTR_ARTIST = 0x02 , BT_AVRCP_MEDIA_ATTR_ALBUM = 0x03 , BT_AVRCP_MEDIA_ATTR_TRACK_NUMBER = 0x04 ,
  BT_AVRCP_MEDIA_ATTR_TOTAL_TRACKS = 0x05 , BT_AVRCP_MEDIA_ATTR_GENRE = 0x06 , BT_AVRCP_MEDIA_ATTR_PLAYING_TIME = 0x07
}
 AVRCP Media Attribute IDs. More...
enum  bt_avrcp_player_attr_id_t { BT_AVRCP_PLAYER_ATTR_EQUALIZER = 0x01U , BT_AVRCP_PLAYER_ATTR_REPEAT_MODE = 0x02U , BT_AVRCP_PLAYER_ATTR_SHUFFLE = 0x03U , BT_AVRCP_PLAYER_ATTR_SCAN = 0x04U }
 AVRCP Player Application Setting Attribute IDs. More...
enum  bt_avrcp_equalizer_value_t { BT_AVRCP_EQUALIZER_OFF = 0x01U , BT_AVRCP_EQUALIZER_ON = 0x02U }
 AVRCP Player Application Setting Values for Equalizer. More...
enum  bt_avrcp_repeat_mode_value_t { BT_AVRCP_REPEAT_MODE_OFF = 0x01U , BT_AVRCP_REPEAT_MODE_SINGLE_TRACK = 0x02U , BT_AVRCP_REPEAT_MODE_ALL_TRACKS = 0x03U , BT_AVRCP_REPEAT_MODE_GROUP = 0x04U }
 AVRCP Player Application Setting Values for Repeat Mode. More...
enum  bt_avrcp_shuffle_value_t { BT_AVRCP_SHUFFLE_OFF = 0x01U , BT_AVRCP_SHUFFLE_ALL_TRACKS = 0x02U , BT_AVRCP_SHUFFLE_GROUP = 0x03U }
 AVRCP Player Application Setting Values for Shuffle. More...
enum  bt_avrcp_scan_value_t { BT_AVRCP_SCAN_OFF = 0x01U , BT_AVRCP_SCAN_ALL_TRACKS = 0x02U , BT_AVRCP_SCAN_GROUP = 0x03U }
 AVRCP Player Application Setting Values for Scan. More...
enum  bt_avrcp_scope_t { BT_AVRCP_SCOPE_MEDIA_PLAYER_LIST = 0x00U , BT_AVRCP_SCOPE_FILESYSTEM = 0x01U , BT_AVRCP_SCOPE_SEARCH = 0x02U , BT_AVRCP_SCOPE_NOW_PLAYING = 0x03U }
 AVRCP Scope Values 0x00 = Media Player List 0x01 = Filesystem 0x02 = Search 0x03 = Now Playing. More...

Functions

int bt_avrcp_connect (struct bt_conn *conn)
 Connect AVRCP.
int bt_avrcp_disconnect (struct bt_conn *conn)
 Disconnect AVRCP.
struct net_bufbt_avrcp_create_pdu (struct net_buf_pool *pool)
 Allocate a net_buf for AVRCP PDU transmission, reserving headroom for AVRCP, AVRCTP, L2CAP, and ACL headers.
struct net_bufbt_avrcp_create_vendor_pdu (struct net_buf_pool *pool)
 Allocate a net_buf for AVRCP Vendor-Dependent PDU transmission, reserving headroom for the Vendor PDU header in addition to AVRCP, AVCTP, L2CAP, and ACL headers.
int bt_avrcp_browsing_connect (struct bt_conn *conn)
 Connect AVRCP browsing channel.
int bt_avrcp_browsing_disconnect (struct bt_conn *conn)
 Disconnect AVRCP browsing channel.
int bt_avrcp_ct_register_cb (const struct bt_avrcp_ct_cb *cb)
 Register callback.
int bt_avrcp_ct_get_caps (struct bt_avrcp_ct *ct, uint8_t tid, uint8_t cap_id)
 Get AVRCP Capabilities.
int bt_avrcp_ct_get_unit_info (struct bt_avrcp_ct *ct, uint8_t tid)
 Get AVRCP Unit Info.
int bt_avrcp_ct_get_subunit_info (struct bt_avrcp_ct *ct, uint8_t tid)
 Get AVRCP Subunit Info.
int bt_avrcp_ct_passthrough (struct bt_avrcp_ct *ct, uint8_t tid, uint8_t opid, uint8_t state, const uint8_t *payload, uint8_t len)
 Send AVRCP Pass Through command.
int bt_avrcp_ct_set_browsed_player (struct bt_avrcp_ct *ct, uint8_t tid, uint16_t player_id)
 Set browsed player.
int bt_avrcp_ct_register_notification (struct bt_avrcp_ct *ct, uint8_t tid, uint8_t event_id, uint32_t interval, bt_avrcp_notify_changed_cb_t cb)
 Register for AVRCP changed notifications with callback.
int bt_avrcp_ct_list_player_app_setting_attrs (struct bt_avrcp_ct *ct, uint8_t tid)
 Send AVRCP vendor dependent command for LIST_PLAYER_APP_SETTING_ATTRS.
int bt_avrcp_ct_list_player_app_setting_vals (struct bt_avrcp_ct *ct, uint8_t tid, uint8_t attr_id)
 Send AVRCP vendor dependent command for LIST_PLAYER_APP_SETTING_VALS.
int bt_avrcp_ct_get_curr_player_app_setting_val (struct bt_avrcp_ct *ct, uint8_t tid, struct net_buf *buf)
 Send AVRCP vendor dependent command for GET_CURR_PLAYER_APP_SETTING_VAL.
int bt_avrcp_ct_set_player_app_setting_val (struct bt_avrcp_ct *ct, uint8_t tid, struct net_buf *buf)
 Send AVRCP vendor dependent command for SET_PLAYER_APP_SETTING_VAL.
int bt_avrcp_ct_get_player_app_setting_attr_text (struct bt_avrcp_ct *ct, uint8_t tid, struct net_buf *buf)
 Send AVRCP vendor dependent command for GET_PLAYER_APP_SETTING_ATTR_TEXT.
int bt_avrcp_ct_get_player_app_setting_val_text (struct bt_avrcp_ct *ct, uint8_t tid, struct net_buf *buf)
 Send AVRCP vendor dependent command for GET_PLAYER_APP_SETTING_VAL_TEXT.
int bt_avrcp_ct_inform_displayable_char_set (struct bt_avrcp_ct *ct, uint8_t tid, struct net_buf *buf)
 Send AVRCP vendor dependent command for INFORM_DISPLAYABLE_CHAR_SET.
int bt_avrcp_ct_inform_batt_status_of_ct (struct bt_avrcp_ct *ct, uint8_t tid, uint8_t battery_status)
 Send AVRCP vendor dependent command for INFORM_BATT_STATUS_OF_CT.
int bt_avrcp_ct_set_absolute_volume (struct bt_avrcp_ct *ct, uint8_t tid, uint8_t absolute_volume)
 Send Set Absolute Volume command (CT).
int bt_avrcp_ct_get_element_attrs (struct bt_avrcp_ct *ct, uint8_t tid, struct net_buf *buf)
 Send AVRCP vendor dependent command for GET_ELEMENT_ATTRS.
int bt_avrcp_ct_get_play_status (struct bt_avrcp_ct *ct, uint8_t tid)
 Send AVRCP vendor dependent command for GET_PLAY_STATUS.
int bt_avrcp_ct_set_addressed_player (struct bt_avrcp_ct *ct, uint8_t tid, uint16_t player_id)
 Send AVRCP vendor dependent command for SET_ADDRESSED_PLAYER.
int bt_avrcp_ct_play_item (struct bt_avrcp_ct *ct, uint8_t tid, struct net_buf *buf)
 Send AVRCP vendor dependent command for PLAY_ITEM.
int bt_avrcp_ct_add_to_now_playing (struct bt_avrcp_ct *ct, uint8_t tid, struct net_buf *buf)
 Send AVRCP vendor dependent command for ADD_TO_NOW_PLAYING.
int bt_avrcp_tg_register_cb (const struct bt_avrcp_tg_cb *cb)
 Register callback.
int bt_avrcp_tg_send_unit_info_rsp (struct bt_avrcp_tg *tg, uint8_t tid, struct bt_avrcp_unit_info_rsp *rsp)
 Send the unit info response.
int bt_avrcp_tg_send_subunit_info_rsp (struct bt_avrcp_tg *tg, uint8_t tid)
 Send the subunit info response.
int bt_avrcp_tg_get_caps (struct bt_avrcp_tg *tg, uint8_t tid, uint8_t status, struct net_buf *buf)
 Send GET_CAPABILITIES response.
int bt_avrcp_tg_notification (struct bt_avrcp_tg *tg, uint8_t tid, uint8_t status, uint8_t event_id, struct bt_avrcp_event_data *data)
 Send notification response.
int bt_avrcp_tg_send_set_browsed_player_rsp (struct bt_avrcp_tg *tg, uint8_t tid, struct net_buf *buf)
 Send the set browsed player response.
int bt_avrcp_tg_send_passthrough_rsp (struct bt_avrcp_tg *tg, uint8_t tid, bt_avrcp_rsp_t result, struct net_buf *buf)
 Send AVRCP Pass Through response.
int bt_avrcp_tg_list_player_app_setting_attrs (struct bt_avrcp_tg *tg, uint8_t tid, uint8_t status, struct net_buf *buf)
 Send response for PDU ID BT_AVRCP_PDU_ID_LIST_PLAYER_APP_SETTING_ATTRS.
int bt_avrcp_tg_list_player_app_setting_vals (struct bt_avrcp_tg *tg, uint8_t tid, uint8_t status, struct net_buf *buf)
 Send response for PDU ID BT_AVRCP_PDU_ID_LIST_PLAYER_APP_SETTING_VALS.
int bt_avrcp_tg_get_curr_player_app_setting_val (struct bt_avrcp_tg *tg, uint8_t tid, uint8_t status, struct net_buf *buf)
 Send response for PDU ID BT_AVRCP_PDU_ID_GET_CURR_PLAYER_APP_SETTING_VAL.
int bt_avrcp_tg_set_player_app_setting_val (struct bt_avrcp_tg *tg, uint8_t tid, uint8_t status)
 Send response for PDU ID BT_AVRCP_PDU_ID_SET_PLAYER_APP_SETTING_VAL.
int bt_avrcp_tg_get_player_app_setting_attr_text (struct bt_avrcp_tg *tg, uint8_t tid, uint8_t status, struct net_buf *buf)
 Send response for PDU ID BT_AVRCP_PDU_ID_GET_PLAYER_APP_SETTING_ATTR_TEXT.
int bt_avrcp_tg_get_player_app_setting_val_text (struct bt_avrcp_tg *tg, uint8_t tid, uint8_t status, struct net_buf *buf)
 Send response for PDU ID BT_AVRCP_PDU_ID_GET_PLAYER_APP_SETTING_VAL_TEXT.
int bt_avrcp_tg_inform_displayable_char_set (struct bt_avrcp_tg *tg, uint8_t tid, uint8_t status)
 Send response for PDU ID BT_AVRCP_PDU_ID_INFORM_DISPLAYABLE_CHAR_SET.
int bt_avrcp_tg_inform_batt_status_of_ct (struct bt_avrcp_tg *tg, uint8_t tid, uint8_t status)
 Send response for PDU ID BT_AVRCP_PDU_ID_INFORM_BATT_STATUS_OF_CT.
int bt_avrcp_tg_absolute_volume (struct bt_avrcp_tg *tg, uint8_t tid, uint8_t status, uint8_t absolute_volume)
 Send Set Absolute Volume response (TG).
int bt_avrcp_tg_get_element_attrs (struct bt_avrcp_tg *tg, uint8_t tid, uint8_t status, struct net_buf *buf)
 Send response for PDU ID BT_AVRCP_PDU_ID_GET_ELEMENT_ATTRS.
int bt_avrcp_tg_get_play_status (struct bt_avrcp_tg *tg, uint8_t tid, uint8_t status, struct net_buf *buf)
 Send response for PDU ID BT_AVRCP_PDU_ID_GET_PLAY_STATUS.
int bt_avrcp_tg_set_addressed_player (struct bt_avrcp_tg *tg, uint8_t tid, uint8_t status)
 Send response for PDU ID BT_AVRCP_PDU_ID_SET_ADDRESSED_PLAYER.
int bt_avrcp_tg_play_item (struct bt_avrcp_tg *tg, uint8_t tid, uint8_t status)
 Send response for PDU ID BT_AVRCP_PDU_ID_PLAY_ITEM.
int bt_avrcp_tg_add_to_now_playing (struct bt_avrcp_tg *tg, uint8_t tid, uint8_t status)
 Send response for PDU ID BT_AVRCP_PDU_ID_ADD_TO_NOW_PLAYING.

Detailed Description

Audio Video Remote Control Profile header.

Macro Definition Documentation

◆ BT_AVRCP_COMPANY_ID_BLUETOOTH_SIG

#define BT_AVRCP_COMPANY_ID_BLUETOOTH_SIG   (0x001958)

◆ BT_AVRCP_COMPANY_ID_SIZE

#define BT_AVRCP_COMPANY_ID_SIZE   (3)

◆ BT_AVRCP_MAX_ABSOLUTE_VOLUME

#define BT_AVRCP_MAX_ABSOLUTE_VOLUME   0x7F

AVRCP MAX absolute volume.

◆ BT_AVRCP_PASSTHROUGH_GET_OPID

#define BT_AVRCP_PASSTHROUGH_GET_OPID ( payload)
Value:
((bt_avrcp_button_state_t)(FIELD_GET(GENMASK(6, 0), ((payload)->opid_state))))
bt_avrcp_button_state_t
AVRCP button state flag.
Definition avrcp.h:139
#define GENMASK(h, l)
Create a contiguous bitmask starting at bit position l and ending at position h.
Definition util.h:80
#define FIELD_GET(mask, value)
Definition silabs-pinctrl-siwx91x.h:14

◆ BT_AVRCP_PASSTHROUGH_GET_STATE

#define BT_AVRCP_PASSTHROUGH_GET_STATE ( payload)
Value:
((bt_avrcp_opid_t)(FIELD_GET(BIT(7), ((payload)->opid_state))))
bt_avrcp_opid_t
AV/C operation ids used in AVRCP passthrough commands.
Definition avrcp.h:73
#define BIT(n)
Unsigned integer with bit position n set (signed in assembly language).
Definition util_macro.h:44

◆ BT_AVRCP_PASSTHROUGH_SET_STATE_OPID

#define BT_AVRCP_PASSTHROUGH_SET_STATE_OPID ( payload,
state,
opid )
Value:
(payload)->opid_state = FIELD_PREP(BIT(7), state) | FIELD_PREP(GENMASK(6, 0), opid)
state
Definition parser_state.h:29
#define FIELD_PREP(mask, value)
Definition silabs-pinctrl-siwx91x.h:15

Typedef Documentation

◆ bt_avrcp_notify_changed_cb_t

typedef void(* bt_avrcp_notify_changed_cb_t) (struct bt_avrcp_ct *ct, uint8_t event_id, struct bt_avrcp_event_data *data)

Callback for AVRCP event notifications (CHANGED only).

This callback is invoked by the AVRCP Target (TG) when a registered event occurs and a "changed" notification needs to be sent to the Controller (CT).

For interim and rejected error cases, the callback will trigger the notification function registered by the Controller

Parameters
ctAVRCP CT connection object.
event_idThe AVRCP event identifier. bt_avrcp_event_data This corresponds to one of the AVRCP event types such as EVENT_PLAYBACK_STATUS_CHANGED, EVENT_TRACK_CHANGED, etc.
dataPointer to bt_avrcp_event_data structure containing the event-specific data. The content of the union depends on the event_id.
Note
The callback implementation should not block or perform heavy operations. If needed, defer processing to another thread or task.

Enumeration Type Documentation

◆ bt_avrcp_battery_status_t

AVRCP Battery Status Code.

Enumerator
BT_AVRCP_BATTERY_STATUS_NORMAL 
BT_AVRCP_BATTERY_STATUS_WARNING 
BT_AVRCP_BATTERY_STATUS_CRITICAL 
BT_AVRCP_BATTERY_STATUS_EXTERNAL 
BT_AVRCP_BATTERY_STATUS_FULL 

◆ bt_avrcp_button_state_t

AVRCP button state flag.

Enumerator
BT_AVRCP_BUTTON_PRESSED 
BT_AVRCP_BUTTON_RELEASED 

◆ bt_avrcp_cap_t

AVRCP Capability ID.

Enumerator
BT_AVRCP_CAP_COMPANY_ID 
BT_AVRCP_CAP_EVENTS_SUPPORTED 

◆ bt_avrcp_charset_t

AVRCP Character Set IDs.

Enumerator
BT_AVRCP_CHARSET_UTF8 

◆ bt_avrcp_ctype_t

AV/C command types.

Enumerator
BT_AVRCP_CTYPE_CONTROL 
BT_AVRCP_CTYPE_STATUS 
BT_AVRCP_CTYPE_SPECIFIC_INQUIRY 
BT_AVRCP_CTYPE_NOTIFY 
BT_AVRCP_CTYPE_GENERAL_INQUIRY 

◆ bt_avrcp_equalizer_value_t

AVRCP Player Application Setting Values for Equalizer.

Enumerator
BT_AVRCP_EQUALIZER_OFF 
BT_AVRCP_EQUALIZER_ON 

◆ bt_avrcp_evt_t

AVRCP Notification Events.

Enumerator
BT_AVRCP_EVT_PLAYBACK_STATUS_CHANGED 
BT_AVRCP_EVT_TRACK_CHANGED 
BT_AVRCP_EVT_TRACK_REACHED_END 
BT_AVRCP_EVT_TRACK_REACHED_START 
BT_AVRCP_EVT_PLAYBACK_POS_CHANGED 
BT_AVRCP_EVT_BATT_STATUS_CHANGED 
BT_AVRCP_EVT_SYSTEM_STATUS_CHANGED 
BT_AVRCP_EVT_PLAYER_APP_SETTING_CHANGED 
BT_AVRCP_EVT_NOW_PLAYING_CONTENT_CHANGED 
BT_AVRCP_EVT_AVAILABLE_PLAYERS_CHANGED 
BT_AVRCP_EVT_ADDRESSED_PLAYER_CHANGED 
BT_AVRCP_EVT_UIDS_CHANGED 
BT_AVRCP_EVT_VOLUME_CHANGED 

◆ bt_avrcp_media_attr_t

AVRCP Media Attribute IDs.

Enumerator
BT_AVRCP_MEDIA_ATTR_TITLE 
BT_AVRCP_MEDIA_ATTR_ARTIST 
BT_AVRCP_MEDIA_ATTR_ALBUM 
BT_AVRCP_MEDIA_ATTR_TRACK_NUMBER 
BT_AVRCP_MEDIA_ATTR_TOTAL_TRACKS 
BT_AVRCP_MEDIA_ATTR_GENRE 
BT_AVRCP_MEDIA_ATTR_PLAYING_TIME 

◆ bt_avrcp_opid_t

AV/C operation ids used in AVRCP passthrough commands.

Enumerator
BT_AVRCP_OPID_SELECT 
BT_AVRCP_OPID_UP 
BT_AVRCP_OPID_DOWN 
BT_AVRCP_OPID_LEFT 
BT_AVRCP_OPID_RIGHT 
BT_AVRCP_OPID_RIGHT_UP 
BT_AVRCP_OPID_RIGHT_DOWN 
BT_AVRCP_OPID_LEFT_UP 
BT_AVRCP_OPID_LEFT_DOWN 
BT_AVRCP_OPID_ROOT_MENU 
BT_AVRCP_OPID_SETUP_MENU 
BT_AVRCP_OPID_CONTENTS_MENU 
BT_AVRCP_OPID_FAVORITE_MENU 
BT_AVRCP_OPID_EXIT 
BT_AVRCP_OPID_0 
BT_AVRCP_OPID_1 
BT_AVRCP_OPID_2 
BT_AVRCP_OPID_3 
BT_AVRCP_OPID_4 
BT_AVRCP_OPID_5 
BT_AVRCP_OPID_6 
BT_AVRCP_OPID_7 
BT_AVRCP_OPID_8 
BT_AVRCP_OPID_9 
BT_AVRCP_OPID_DOT 
BT_AVRCP_OPID_ENTER 
BT_AVRCP_OPID_CLEAR 
BT_AVRCP_OPID_CHANNEL_UP 
BT_AVRCP_OPID_CHANNEL_DOWN 
BT_AVRCP_OPID_PREVIOUS_CHANNEL 
BT_AVRCP_OPID_SOUND_SELECT 
BT_AVRCP_OPID_INPUT_SELECT 
BT_AVRCP_OPID_DISPLAY_INFORMATION 
BT_AVRCP_OPID_HELP 
BT_AVRCP_OPID_PAGE_UP 
BT_AVRCP_OPID_PAGE_DOWN 
BT_AVRCP_OPID_POWER 
BT_AVRCP_OPID_VOLUME_UP 
BT_AVRCP_OPID_VOLUME_DOWN 
BT_AVRCP_OPID_MUTE 
BT_AVRCP_OPID_PLAY 
BT_AVRCP_OPID_STOP 
BT_AVRCP_OPID_PAUSE 
BT_AVRCP_OPID_RECORD 
BT_AVRCP_OPID_REWIND 
BT_AVRCP_OPID_FAST_FORWARD 
BT_AVRCP_OPID_EJECT 
BT_AVRCP_OPID_FORWARD 
BT_AVRCP_OPID_BACKWARD 
BT_AVRCP_OPID_ANGLE 
BT_AVRCP_OPID_SUBPICTURE 
BT_AVRCP_OPID_F1 
BT_AVRCP_OPID_F2 
BT_AVRCP_OPID_F3 
BT_AVRCP_OPID_F4 
BT_AVRCP_OPID_F5 
BT_AVRCP_OPID_VENDOR_UNIQUE 

◆ bt_avrcp_playback_status_t

AVRCP Playback Status.

Enumerator
BT_AVRCP_PLAYBACK_STATUS_STOPPED 
BT_AVRCP_PLAYBACK_STATUS_PLAYING 
BT_AVRCP_PLAYBACK_STATUS_PAUSED 
BT_AVRCP_PLAYBACK_STATUS_FWD_SEEK 
BT_AVRCP_PLAYBACK_STATUS_REV_SEEK 
BT_AVRCP_PLAYBACK_STATUS_ERROR 

◆ bt_avrcp_player_attr_id_t

AVRCP Player Application Setting Attribute IDs.

Enumerator
BT_AVRCP_PLAYER_ATTR_EQUALIZER 
BT_AVRCP_PLAYER_ATTR_REPEAT_MODE 
BT_AVRCP_PLAYER_ATTR_SHUFFLE 
BT_AVRCP_PLAYER_ATTR_SCAN 

◆ bt_avrcp_repeat_mode_value_t

AVRCP Player Application Setting Values for Repeat Mode.

Enumerator
BT_AVRCP_REPEAT_MODE_OFF 
BT_AVRCP_REPEAT_MODE_SINGLE_TRACK 
BT_AVRCP_REPEAT_MODE_ALL_TRACKS 
BT_AVRCP_REPEAT_MODE_GROUP 

◆ bt_avrcp_rsp_t

AV/C response codes.

Enumerator
BT_AVRCP_RSP_NOT_IMPLEMENTED 
BT_AVRCP_RSP_ACCEPTED 
BT_AVRCP_RSP_REJECTED 
BT_AVRCP_RSP_IN_TRANSITION 
BT_AVRCP_RSP_IMPLEMENTED 

For SPECIFIC_INQUIRY and GENERAL_INQUIRY commands.

BT_AVRCP_RSP_STABLE 

For STATUS commands.

BT_AVRCP_RSP_CHANGED 
BT_AVRCP_RSP_INTERIM 

◆ bt_avrcp_scan_value_t

AVRCP Player Application Setting Values for Scan.

Enumerator
BT_AVRCP_SCAN_OFF 
BT_AVRCP_SCAN_ALL_TRACKS 
BT_AVRCP_SCAN_GROUP 

◆ bt_avrcp_scope_t

AVRCP Scope Values 0x00 = Media Player List 0x01 = Filesystem 0x02 = Search 0x03 = Now Playing.

Enumerator
BT_AVRCP_SCOPE_MEDIA_PLAYER_LIST 
BT_AVRCP_SCOPE_FILESYSTEM 
BT_AVRCP_SCOPE_SEARCH 
BT_AVRCP_SCOPE_NOW_PLAYING 

◆ bt_avrcp_shuffle_value_t

AVRCP Player Application Setting Values for Shuffle.

Enumerator
BT_AVRCP_SHUFFLE_OFF 
BT_AVRCP_SHUFFLE_ALL_TRACKS 
BT_AVRCP_SHUFFLE_GROUP 

◆ bt_avrcp_status_t

AVRCP status and error codes.

These status codes are used in AVRCP responses to indicate the result of a command.

Enumerator
BT_AVRCP_STATUS_INVALID_COMMAND 

Invalid command.

Valid for Commands: All

BT_AVRCP_STATUS_INVALID_PARAMETER 

Invalid parameter.

Valid for Commands: All

BT_AVRCP_STATUS_PARAMETER_CONTENT_ERROR 

Parameter content error.

Valid for Commands: All

BT_AVRCP_STATUS_INTERNAL_ERROR 

Internal error.

Valid for Commands: All

BT_AVRCP_STATUS_OPERATION_COMPLETED 

Operation completed without error.

Valid for Commands: All except where the response CType is AV/C REJECTED

BT_AVRCP_STATUS_UID_CHANGED 

The UIDs on the device have changed.

Valid for Commands: All

BT_AVRCP_STATUS_INVALID_DIRECTION 

The Direction parameter is invalid.

Valid for Commands: ChangePath

BT_AVRCP_STATUS_NOT_A_DIRECTORY 

The UID provided does not refer to a folder item.

Valid for Commands: ChangePath

BT_AVRCP_STATUS_DOES_NOT_EXIST 

The UID provided does not refer to any currently valid item.

Valid for Commands: ChangePath, PlayItem, AddToNowPlaying, GetItemAttributes

BT_AVRCP_STATUS_INVALID_SCOPE 

Invalid scope.

Valid for Commands: GetFolderItems, PlayItem, AddToNowPlayer, GetItemAttributes, GetTotalNumberOfItems

BT_AVRCP_STATUS_RANGE_OUT_OF_BOUNDS 

Range out of bounds.

Valid for Commands: GetFolderItems

BT_AVRCP_STATUS_FOLDER_ITEM_IS_NOT_PLAYABLE 

Folder item is not playable.

Valid for Commands: Play Item, AddToNowPlaying

BT_AVRCP_STATUS_MEDIA_IN_USE 

Media in use.

Valid for Commands: PlayItem, AddToNowPlaying

BT_AVRCP_STATUS_NOW_PLAYING_LIST_FULL 

Now Playing List full.

Valid for Commands: AddToNowPlaying

BT_AVRCP_STATUS_SEARCH_NOT_SUPPORTED 

Search not supported.

Valid for Commands: Search

BT_AVRCP_STATUS_SEARCH_IN_PROGRESS 

Search in progress.

Valid for Commands: Search

BT_AVRCP_STATUS_INVALID_PLAYER_ID 

The specified Player Id does not refer to a valid player.

Valid for Commands: SetAddressedPlayer, SetBrowsedPlayer

BT_AVRCP_STATUS_PLAYER_NOT_BROWSABLE 

Player not browsable.

Valid for Commands: SetBrowsedPlayer

BT_AVRCP_STATUS_PLAYER_NOT_ADDRESSED 

Player not addressed.

Valid for Commands: Search, SetBrowsedPlayer

BT_AVRCP_STATUS_NO_VALID_SEARCH_RESULTS 

No valid search results.

Valid for Commands: GetFolderItems

BT_AVRCP_STATUS_NO_AVAILABLE_PLAYERS 

No available players.

Valid for Commands: ALL

BT_AVRCP_STATUS_ADDRESSED_PLAYER_CHANGED 

Addressed player changed.

Valid for Commands: All Register Notification commands

BT_AVRCP_STATUS_IN_TRANSITION 

In transition response.

The target is currently changing state (e.g., between play/pause). Note: This status is not used for browsing commands.

BT_AVRCP_STATUS_NOT_IMPLEMENTED 

Not implemented response.

The command/PDU is not supported by the target device. Note: This status is not used for browsing commands.

BT_AVRCP_STATUS_SUCCESS 

Successful response.

The requested command or PDU was processed successfully by the target device.

For control commands, it means the request was accepted. For status commands, it means the state is stable and reported successfully.

◆ bt_avrcp_subunit_type_t

AV/C subunit type, also used for unit type.

Enumerator
BT_AVRCP_SUBUNIT_TYPE_PANEL 
BT_AVRCP_SUBUNIT_TYPE_UNIT 

◆ bt_avrcp_system_status_t

AVRCP System Status Code.

Enumerator
BT_AVRCP_SYSTEM_STATUS_POWER_ON 
BT_AVRCP_SYSTEM_STATUS_POWER_OFF 
BT_AVRCP_SYSTEM_STATUS_UNPLUGGED 

Function Documentation

◆ bt_avrcp_browsing_connect()

int bt_avrcp_browsing_connect ( struct bt_conn * conn)

Connect AVRCP browsing channel.

This function is to be called after the AVRCP control channel is established. The API is to be used to establish AVRCP browsing connection between devices.

Parameters
connPointer to bt_conn structure.
Returns
0 in case of success or error code in case of error.

◆ bt_avrcp_browsing_disconnect()

int bt_avrcp_browsing_disconnect ( struct bt_conn * conn)

Disconnect AVRCP browsing channel.

This function close AVCTP browsing channel L2CAP connection.

Parameters
connPointer to bt_conn structure.
Returns
0 in case of success or error code in case of error.

◆ bt_avrcp_connect()

int bt_avrcp_connect ( struct bt_conn * conn)

Connect AVRCP.

This function is to be called after the conn parameter is obtained by performing a GAP procedure. The API is to be used to establish AVRCP connection between devices.

Parameters
connPointer to bt_conn structure.
Returns
0 in case of success or error code in case of error.

◆ bt_avrcp_create_pdu()

struct net_buf * bt_avrcp_create_pdu ( struct net_buf_pool * pool)

Allocate a net_buf for AVRCP PDU transmission, reserving headroom for AVRCP, AVRCTP, L2CAP, and ACL headers.

This function allocates a buffer from the specified pool and reserves sufficient headroom for protocol headers required by AVRCP over Bluetooth.

Parameters
poolThe buffer pool to allocate from.
Returns
A newly allocated net_buf with reserved headroom.

◆ bt_avrcp_create_vendor_pdu()

struct net_buf * bt_avrcp_create_vendor_pdu ( struct net_buf_pool * pool)

Allocate a net_buf for AVRCP Vendor-Dependent PDU transmission, reserving headroom for the Vendor PDU header in addition to AVRCP, AVCTP, L2CAP, and ACL headers.

This function allocates a buffer from the specified pool and reserves sufficient headroom for protocol headers required by AVRCP Vendor-Dependent PDUs over Bluetooth.

Parameters
poolThe buffer pool to allocate from.
Returns
A newly allocated net_buf with reserved headroom.

◆ bt_avrcp_ct_add_to_now_playing()

int bt_avrcp_ct_add_to_now_playing ( struct bt_avrcp_ct * ct,
uint8_t tid,
struct net_buf * buf )

Send AVRCP vendor dependent command for ADD_TO_NOW_PLAYING.

Parameters
ctAVRCP CT connection object.
tidThe transaction label of the response, valid from 0 to 15.
bufThe command buffer containing the ADD_TO_NOW_PLAYING request payload, formatted as bt_avrcp_add_to_now_playing_cmd. Note that all multi-octet fields are encoded in big-endian format.
Returns
0 on success or error code.

◆ bt_avrcp_ct_get_caps()

int bt_avrcp_ct_get_caps ( struct bt_avrcp_ct * ct,
uint8_t tid,
uint8_t cap_id )

Get AVRCP Capabilities.

This function gets the capabilities supported by remote device.

Parameters
ctThe AVRCP CT instance.
tidThe transaction label of the response, valid from 0 to 15.
cap_idSpecific capability requested, see bt_avrcp_cap_t.
Returns
0 in case of success or error code in case of error.

◆ bt_avrcp_ct_get_curr_player_app_setting_val()

int bt_avrcp_ct_get_curr_player_app_setting_val ( struct bt_avrcp_ct * ct,
uint8_t tid,
struct net_buf * buf )

Send AVRCP vendor dependent command for GET_CURR_PLAYER_APP_SETTING_VAL.

Parameters
ctAVRCP CT connection object.
tidThe transaction label of the response, valid from 0 to 15.
bufThe command buffer containing the GET_CURR_PLAYER_APP_SETTING_VAL request payload, formatted as bt_avrcp_get_curr_player_app_setting_val_cmd. Note that all multi-octet fields are encoded in big-endian format.
Returns
0 on success or error code.

◆ bt_avrcp_ct_get_element_attrs()

int bt_avrcp_ct_get_element_attrs ( struct bt_avrcp_ct * ct,
uint8_t tid,
struct net_buf * buf )

Send AVRCP vendor dependent command for GET_ELEMENT_ATTRS.

Parameters
ctAVRCP CT connection object.
tidThe transaction label of the response, valid from 0 to 15.
bufThe command buffer containing the GET_ELEMENT_ATTRS request payload, formatted as bt_avrcp_get_element_attrs_cmd. Note that all multi-octet fields are encoded in big-endian format.
Returns
0 on success or error code.

◆ bt_avrcp_ct_get_play_status()

int bt_avrcp_ct_get_play_status ( struct bt_avrcp_ct * ct,
uint8_t tid )

Send AVRCP vendor dependent command for GET_PLAY_STATUS.

Parameters
ctAVRCP CT connection object.
tidThe transaction label of the response, valid from 0 to 15.
Returns
0 on success or error code.

◆ bt_avrcp_ct_get_player_app_setting_attr_text()

int bt_avrcp_ct_get_player_app_setting_attr_text ( struct bt_avrcp_ct * ct,
uint8_t tid,
struct net_buf * buf )

Send AVRCP vendor dependent command for GET_PLAYER_APP_SETTING_ATTR_TEXT.

Parameters
ctAVRCP CT connection object.
tidThe transaction label of the response, valid from 0 to 15.
bufThe command buffer containing the GET_PLAYER_APP_SETTING_ATTR_TEXT request payload, formatted as bt_avrcp_get_player_app_setting_attr_text_cmd. Note that all multi-octet fields are encoded in big-endian format.
Returns
0 on success or error code.

◆ bt_avrcp_ct_get_player_app_setting_val_text()

int bt_avrcp_ct_get_player_app_setting_val_text ( struct bt_avrcp_ct * ct,
uint8_t tid,
struct net_buf * buf )

Send AVRCP vendor dependent command for GET_PLAYER_APP_SETTING_VAL_TEXT.

Parameters
ctAVRCP CT connection object.
tidThe transaction label of the response, valid from 0 to 15.
bufThe command buffer containing the GET_PLAYER_APP_SETTING_VAL_TEXT request payload, formatted as bt_avrcp_get_player_app_setting_val_text_cmd. Note that all multi-octet fields are encoded in big-endian format.
Returns
0 on success or error code.

◆ bt_avrcp_ct_get_subunit_info()

int bt_avrcp_ct_get_subunit_info ( struct bt_avrcp_ct * ct,
uint8_t tid )

Get AVRCP Subunit Info.

This function obtains information about the subunit(s) of an AV/C unit. A device with AVRCP may support other subunits than the panel subunit if other profiles co-exist in the device.

Parameters
ctThe AVRCP CT instance.
tidThe transaction label of the response, valid from 0 to 15.
Returns
0 in case of success or error code in case of error.

◆ bt_avrcp_ct_get_unit_info()

int bt_avrcp_ct_get_unit_info ( struct bt_avrcp_ct * ct,
uint8_t tid )

Get AVRCP Unit Info.

This function obtains information that pertains to the AV/C unit as a whole.

Parameters
ctThe AVRCP CT instance.
tidThe transaction label of the response, valid from 0 to 15.
Returns
0 in case of success or error code in case of error.

◆ bt_avrcp_ct_inform_batt_status_of_ct()

int bt_avrcp_ct_inform_batt_status_of_ct ( struct bt_avrcp_ct * ct,
uint8_t tid,
uint8_t battery_status )

Send AVRCP vendor dependent command for INFORM_BATT_STATUS_OF_CT.

Parameters
ctAVRCP CT connection object.
tidThe transaction label of the response, valid from 0 to 15.
battery_statusBattery status value bt_avrcp_battery_status_t
Returns
0 on success or error code.

◆ bt_avrcp_ct_inform_displayable_char_set()

int bt_avrcp_ct_inform_displayable_char_set ( struct bt_avrcp_ct * ct,
uint8_t tid,
struct net_buf * buf )

Send AVRCP vendor dependent command for INFORM_DISPLAYABLE_CHAR_SET.

Parameters
ctAVRCP CT connection object.
tidThe transaction label of the response, valid from 0 to 15.
bufThe command buffer containing the INFORM_DISPLAYABLE_CHAR_SET request payload, formatted as bt_avrcp_inform_displayable_char_set_cmd. Note that all multi-octet fields are encoded in big-endian format
Returns
0 on success or error code.

◆ bt_avrcp_ct_list_player_app_setting_attrs()

int bt_avrcp_ct_list_player_app_setting_attrs ( struct bt_avrcp_ct * ct,
uint8_t tid )

Send AVRCP vendor dependent command for LIST_PLAYER_APP_SETTING_ATTRS.

Parameters
ctAVRCP CT connection object.
tidThe transaction label of the response, valid from 0 to 15.
Returns
0 on success or error code.

◆ bt_avrcp_ct_list_player_app_setting_vals()

int bt_avrcp_ct_list_player_app_setting_vals ( struct bt_avrcp_ct * ct,
uint8_t tid,
uint8_t attr_id )

Send AVRCP vendor dependent command for LIST_PLAYER_APP_SETTING_VALS.

Parameters
ctAVRCP CT connection object.
tidThe transaction label of the response, valid from 0 to 15.
attr_idPlayer application setting attribute ID for which the possible values should be listed (e.g., Equalizer, Repeat Mode, Shuffle, Scan).
Returns
0 on success or error code.

◆ bt_avrcp_ct_passthrough()

int bt_avrcp_ct_passthrough ( struct bt_avrcp_ct * ct,
uint8_t tid,
uint8_t opid,
uint8_t state,
const uint8_t * payload,
uint8_t len )

Send AVRCP Pass Through command.

This function send a pass through command to the remote device. Passsthhrough command is used to transfer user operation information from a CT to Panel subunit of TG.

Parameters
ctThe AVRCP CT instance.
tidThe transaction label of the response, valid from 0 to 15.
opidThe user operation id, see bt_avrcp_opid_t.
stateThe button state, see bt_avrcp_button_state_t.
payloadThe payload of the pass through command. Should not be NULL if len is not zero.
lenThe length of the payload.
Returns
0 in case of success or error code in case of error.

◆ bt_avrcp_ct_play_item()

int bt_avrcp_ct_play_item ( struct bt_avrcp_ct * ct,
uint8_t tid,
struct net_buf * buf )

Send AVRCP vendor dependent command for PLAY_ITEM.

Parameters
ctAVRCP CT connection object.
tidThe transaction label of the response, valid from 0 to 15.
bufThe command buffer containing the PLAY_ITEM request payload, formatted as bt_avrcp_play_item_cmd. Note that all multi-octet fields are encoded in big-endian format.
Returns
0 on success or error code.

◆ bt_avrcp_ct_register_cb()

int bt_avrcp_ct_register_cb ( const struct bt_avrcp_ct_cb * cb)

Register callback.

Register AVRCP callbacks to monitor the state and interact with the remote device.

Parameters
cbThe AVRCP CT callback function.
Returns
0 in case of success or error code in case of error.

◆ bt_avrcp_ct_register_notification()

int bt_avrcp_ct_register_notification ( struct bt_avrcp_ct * ct,
uint8_t tid,
uint8_t event_id,
uint32_t interval,
bt_avrcp_notify_changed_cb_t cb )

Register for AVRCP changed notifications with callback.

This function registers for notifications from the target device. The notification response will be received through the provided callback function.

Parameters
ctThe AVRCP CT instance.
tidThe transaction label of the response, valid from 0 to 15.
event_idThe event ID to register for, see bt_avrcp_evt_t.
intervalThe playback interval for position changed events. Other events will have this value set to 0 to ignore.
cbThe callback function to handle the changed notification response.
Returns
0 in case of success or error code in case of error.

◆ bt_avrcp_ct_set_absolute_volume()

int bt_avrcp_ct_set_absolute_volume ( struct bt_avrcp_ct * ct,
uint8_t tid,
uint8_t absolute_volume )

Send Set Absolute Volume command (CT).

This function sends the Set Absolute Volume command to the TG.

Parameters
ctThe AVRCP CT instance.
tidThe transaction label of the command, valid from 0 to 15.
absolute_volumeThe absolute volume value (0x00-0x7F).
Returns
0 in case of success or error code in case of error.

◆ bt_avrcp_ct_set_addressed_player()

int bt_avrcp_ct_set_addressed_player ( struct bt_avrcp_ct * ct,
uint8_t tid,
uint16_t player_id )

Send AVRCP vendor dependent command for SET_ADDRESSED_PLAYER.

Parameters
ctAVRCP CT connection object.
tidThe transaction label of the response, valid from 0 to 15.
player_idThe player ID to be set as addressed player.
Returns
0 on success or error code.

◆ bt_avrcp_ct_set_browsed_player()

int bt_avrcp_ct_set_browsed_player ( struct bt_avrcp_ct * ct,
uint8_t tid,
uint16_t player_id )

Set browsed player.

This function sets the browsed player on the remote device.

Parameters
ctThe AVRCP CT instance.
tidThe transaction label of the response, valid from 0 to 15.
player_idThe player ID to be set as browsed player.
Returns
0 in case of success or error code in case of error.

◆ bt_avrcp_ct_set_player_app_setting_val()

int bt_avrcp_ct_set_player_app_setting_val ( struct bt_avrcp_ct * ct,
uint8_t tid,
struct net_buf * buf )

Send AVRCP vendor dependent command for SET_PLAYER_APP_SETTING_VAL.

Parameters
ctAVRCP CT connection object.
tidThe transaction label of the response, valid from 0 to 15.
bufThe command buffer containing the SET_PLAYER_APP_SETTING_VAL request payload, formatted as bt_avrcp_set_player_app_setting_val_cmd. Note that all multi-octet fields are encoded in big-endian format.
Returns
0 on success or error code.

◆ bt_avrcp_disconnect()

int bt_avrcp_disconnect ( struct bt_conn * conn)

Disconnect AVRCP.

This function close AVCTP L2CAP connection.

Parameters
connPointer to bt_conn structure.
Returns
0 in case of success or error code in case of error.

◆ bt_avrcp_tg_absolute_volume()

int bt_avrcp_tg_absolute_volume ( struct bt_avrcp_tg * tg,
uint8_t tid,
uint8_t status,
uint8_t absolute_volume )

Send Set Absolute Volume response (TG).

This function sends the Set Absolute Volume response to the CT.

Parameters
tgThe AVRCP TG instance.
tidThe transaction label of the response, valid from 0 to 15.
statusStatus code of the operation bt_avrcp_status_t.
absolute_volumeThe absolute volume value (0x00-0x7F).
Returns
0 in case of success or error code in case of error.

◆ bt_avrcp_tg_add_to_now_playing()

int bt_avrcp_tg_add_to_now_playing ( struct bt_avrcp_tg * tg,
uint8_t tid,
uint8_t status )

Send response for PDU ID BT_AVRCP_PDU_ID_ADD_TO_NOW_PLAYING.

Parameters
tgAVRCP TG connection object.
tidThe transaction label of the request.
statusStatus code of the operation bt_avrcp_status_t.
Returns
0 on success or error code.

◆ bt_avrcp_tg_get_caps()

int bt_avrcp_tg_get_caps ( struct bt_avrcp_tg * tg,
uint8_t tid,
uint8_t status,
struct net_buf * buf )

Send GET_CAPABILITIES response.

This function is called by the application to send the GET_CAPABILITIES response.

Parameters
tgThe AVRCP TG instance.
tidThe transaction label of the response, valid from 0 to 15.
statusStatus code of the operation bt_avrcp_status_t.
bufThe response buffer containing the GET_CAPS payload, formatted as bt_avrcp_get_caps_rsp. Note that all multi-octet fields are encoded in big-endian format.
Returns
0 in case of success or error code in case of error.

◆ bt_avrcp_tg_get_curr_player_app_setting_val()

int bt_avrcp_tg_get_curr_player_app_setting_val ( struct bt_avrcp_tg * tg,
uint8_t tid,
uint8_t status,
struct net_buf * buf )

Send response for PDU ID BT_AVRCP_PDU_ID_GET_CURR_PLAYER_APP_SETTING_VAL.

Parameters
tgAVRCP TG connection object.
tidThe transaction label of the request.
statusStatus code of the operation bt_avrcp_status_t.
bufThe response buffer containing the GET_CURR_PLAYER_APP_SETTING_VAL payload, formatted as bt_avrcp_get_curr_player_app_setting_val_rsp. Note that all multi-octet fields are encoded in big-endian format.
Returns
0 on success or error code.

◆ bt_avrcp_tg_get_element_attrs()

int bt_avrcp_tg_get_element_attrs ( struct bt_avrcp_tg * tg,
uint8_t tid,
uint8_t status,
struct net_buf * buf )

Send response for PDU ID BT_AVRCP_PDU_ID_GET_ELEMENT_ATTRS.

Parameters
tgAVRCP TG connection object.
tidThe transaction label of the request.
statusStatus code of the operation bt_avrcp_status_t.
bufThe response buffer containing the GET_ELEMENT_ATTRS payload, formatted as bt_avrcp_get_element_attrs_rsp. Note that all multi-octet fields are encoded in big-endian format.
Returns
0 on success or error code.

◆ bt_avrcp_tg_get_play_status()

int bt_avrcp_tg_get_play_status ( struct bt_avrcp_tg * tg,
uint8_t tid,
uint8_t status,
struct net_buf * buf )

Send response for PDU ID BT_AVRCP_PDU_ID_GET_PLAY_STATUS.

Parameters
tgAVRCP TG connection object.
tidThe transaction label of the request.
statusStatus code of the operation bt_avrcp_status_t.
bufThe response buffer containing the GET_PLAY_STATUS payload, formatted as bt_avrcp_get_play_status_rsp. Note that all multi-octet fields are encoded in big-endian format.
Returns
0 on success or error code.

◆ bt_avrcp_tg_get_player_app_setting_attr_text()

int bt_avrcp_tg_get_player_app_setting_attr_text ( struct bt_avrcp_tg * tg,
uint8_t tid,
uint8_t status,
struct net_buf * buf )

Send response for PDU ID BT_AVRCP_PDU_ID_GET_PLAYER_APP_SETTING_ATTR_TEXT.

Parameters
tgAVRCP TG connection object.
tidThe transaction label of the request.
statusStatus code of the operation bt_avrcp_status_t.
bufThe response buffer containing the GET_PLAYER_APP_SETTING_ATTR_TEXT payload, formatted as bt_avrcp_get_player_app_setting_attr_text_rsp. Note that all multi-octet fields are encoded in big-endian format.
Returns
0 on success or error code.

◆ bt_avrcp_tg_get_player_app_setting_val_text()

int bt_avrcp_tg_get_player_app_setting_val_text ( struct bt_avrcp_tg * tg,
uint8_t tid,
uint8_t status,
struct net_buf * buf )

Send response for PDU ID BT_AVRCP_PDU_ID_GET_PLAYER_APP_SETTING_VAL_TEXT.

Parameters
tgAVRCP TG connection object.
tidThe transaction label of the request.
statusStatus code of the operation bt_avrcp_status_t.
bufThe response buffer containing the GET_PLAYER_APP_SETTING_VAL_TEXT payload, formatted as bt_avrcp_get_player_app_setting_val_text_rsp. Note that all multi-octet fields are encoded in big-endian format.
Returns
0 on success or error code.

◆ bt_avrcp_tg_inform_batt_status_of_ct()

int bt_avrcp_tg_inform_batt_status_of_ct ( struct bt_avrcp_tg * tg,
uint8_t tid,
uint8_t status )

Send response for PDU ID BT_AVRCP_PDU_ID_INFORM_BATT_STATUS_OF_CT.

Parameters
tgAVRCP TG connection object.
tidThe transaction label of the request.
statusStatus code of the operation bt_avrcp_status_t.
Returns
0 on success or error code.

◆ bt_avrcp_tg_inform_displayable_char_set()

int bt_avrcp_tg_inform_displayable_char_set ( struct bt_avrcp_tg * tg,
uint8_t tid,
uint8_t status )

Send response for PDU ID BT_AVRCP_PDU_ID_INFORM_DISPLAYABLE_CHAR_SET.

Parameters
tgAVRCP TG connection object.
tidThe transaction label of the request.
statusStatus code of the operation bt_avrcp_status_t.
Returns
0 on success or error code.

◆ bt_avrcp_tg_list_player_app_setting_attrs()

int bt_avrcp_tg_list_player_app_setting_attrs ( struct bt_avrcp_tg * tg,
uint8_t tid,
uint8_t status,
struct net_buf * buf )

Send response for PDU ID BT_AVRCP_PDU_ID_LIST_PLAYER_APP_SETTING_ATTRS.

Parameters
tgAVRCP TG connection object.
tidThe transaction label of the request.
statusStatus code of the operation bt_avrcp_status_t.
bufThe response buffer containing the LIST_PLAYER_APP_SETTING_ATTRS payload, formatted as bt_avrcp_list_app_setting_attr_rsp. Note that all multi-octet fields are encoded in big-endian format.
Returns
0 on success or error code.

◆ bt_avrcp_tg_list_player_app_setting_vals()

int bt_avrcp_tg_list_player_app_setting_vals ( struct bt_avrcp_tg * tg,
uint8_t tid,
uint8_t status,
struct net_buf * buf )

Send response for PDU ID BT_AVRCP_PDU_ID_LIST_PLAYER_APP_SETTING_VALS.

Parameters
tgAVRCP TG connection object.
tidThe transaction label of the request.
statusStatus code of the operation bt_avrcp_status_t.
bufThe response buffer containing the LIST_PLAYER_APP_SETTING_VALS payload, formatted as bt_avrcp_list_player_app_setting_vals_rsp. Note that all multi-octet fields are encoded in big-endian format.
Returns
0 on success or error code.

◆ bt_avrcp_tg_notification()

int bt_avrcp_tg_notification ( struct bt_avrcp_tg * tg,
uint8_t tid,
uint8_t status,
uint8_t event_id,
struct bt_avrcp_event_data * data )

Send notification response.

This function sends a notification response from the AVRCP Target (TG) to the Controller (CT) for a previously registered event. The response can be:

  • INTERIM: Sent on the first call for the given event_id to indicate that the event is being monitored.
  • CHANGED: Sent on the next call for the same event_id when the event state has changed.
Parameters
tgThe AVRCP TG instance.
tidThe transaction label of the response, valid from 0 to 15.
statusStatus code of the operation bt_avrcp_status_t.
event_idThe AVRCP event ID for which the notification is sent, bt_avrcp_evt_t.
dataPointer to an bt_avrcp_event_data structure containing the event-specific data. The content of the union depends on the event_id.
Returns
0 in case of success or error code in case of error.
Note
  • The first successful call for a given event_id sends an INTERIM response.
  • The next successful call for the same event_id sends a CHANGED response.
  • If status is BT_AVRCP_STATUS_NOT_IMPLEMENTED, a NOT_IMPLEMENTED response is sent.
  • If status is any other non-SUCCESS value, a REJECTED response is sent.

◆ bt_avrcp_tg_play_item()

int bt_avrcp_tg_play_item ( struct bt_avrcp_tg * tg,
uint8_t tid,
uint8_t status )

Send response for PDU ID BT_AVRCP_PDU_ID_PLAY_ITEM.

Parameters
tgAVRCP TG connection object.
tidThe transaction label of the request.
statusStatus code of the operation bt_avrcp_status_t.
Returns
0 on success or error code.

◆ bt_avrcp_tg_register_cb()

int bt_avrcp_tg_register_cb ( const struct bt_avrcp_tg_cb * cb)

Register callback.

Register AVRCP callbacks to monitor the state and interact with the remote device.

Parameters
cbThe AVRCP TG callback function.
Returns
0 in case of success or error code in case of error.

◆ bt_avrcp_tg_send_passthrough_rsp()

int bt_avrcp_tg_send_passthrough_rsp ( struct bt_avrcp_tg * tg,
uint8_t tid,
bt_avrcp_rsp_t result,
struct net_buf * buf )

Send AVRCP Pass Through response.

This function is called by the application to send the Pass Through response.

Parameters
tgThe AVRCP TG instance.
tidThe transaction label of the response, valid from 0 to 15.
resultThe response code, see bt_avrcp_rsp_t, can support 0x8(NOT_IMPLEMENTED), 0x9 (ACCEPTED), 0xA (REJECTED)
bufThe buffer containing the PASS THROUGH command payload. The application can construct this payload according to the format defined in bt_avrcp_passthrough_rsp. Note that the data is encoded in big-endian format.
Returns
0 in case of success or error code in case of error.

◆ bt_avrcp_tg_send_set_browsed_player_rsp()

int bt_avrcp_tg_send_set_browsed_player_rsp ( struct bt_avrcp_tg * tg,
uint8_t tid,
struct net_buf * buf )

Send the set browsed player response.

This function is called by the application to send the set browsed player response.

Parameters
tgThe AVRCP TG instance.
tidThe transaction label of the response, valid from 0 to 15.
bufThe response buffer containing the set browsed player response data.
Returns
0 in case of success or error code in case of error.

◆ bt_avrcp_tg_send_subunit_info_rsp()

int bt_avrcp_tg_send_subunit_info_rsp ( struct bt_avrcp_tg * tg,
uint8_t tid )

Send the subunit info response.

This function is called by the application to send the subunit info response.

Parameters
tgThe AVRCP TG instance.
tidThe transaction label of the response, valid from 0 to 15.
Returns
0 in case of success or error code in case of error.

◆ bt_avrcp_tg_send_unit_info_rsp()

int bt_avrcp_tg_send_unit_info_rsp ( struct bt_avrcp_tg * tg,
uint8_t tid,
struct bt_avrcp_unit_info_rsp * rsp )

Send the unit info response.

This function is called by the application to send the unit info response.

Parameters
tgThe AVRCP TG instance.
tidThe transaction label of the response, valid from 0 to 15.
rspThe response for UNIT INFO command.
Returns
0 in case of success or error code in case of error.

◆ bt_avrcp_tg_set_addressed_player()

int bt_avrcp_tg_set_addressed_player ( struct bt_avrcp_tg * tg,
uint8_t tid,
uint8_t status )

Send response for PDU ID BT_AVRCP_PDU_ID_SET_ADDRESSED_PLAYER.

Parameters
tgAVRCP TG connection object.
tidThe transaction label of the request.
statusStatus code of the operation bt_avrcp_status_t.
Returns
0 on success or error code.

◆ bt_avrcp_tg_set_player_app_setting_val()

int bt_avrcp_tg_set_player_app_setting_val ( struct bt_avrcp_tg * tg,
uint8_t tid,
uint8_t status )

Send response for PDU ID BT_AVRCP_PDU_ID_SET_PLAYER_APP_SETTING_VAL.

Parameters
tgAVRCP TG connection object.
tidThe transaction label of the request.
statusStatus code of the operation bt_avrcp_status_t.
Returns
0 on success or error code.