Zephyr API Documentation 4.2.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_rsp
struct  bt_avrcp_get_cap_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_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)

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
}
 AVRCP status and error codes. More...
enum  bt_avrcp_charset_t { BT_AVRCP_CHARSET_UTF8 = 0x006a }
 AVRCP Character Set IDs. 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.
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_cap (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_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_set_browsed_player_rsp (struct bt_avrcp_tg *tg, uint8_t tid, struct net_buf *buf)
 Send the set browsed player response.

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_PASSTHROUGH_GET_OPID

#define BT_AVRCP_PASSTHROUGH_GET_OPID ( payload)
Value:
((bt_avrcp_opid_t)(FIELD_GET(GENMASK(6, 0), ((payload)->byte0))))
bt_avrcp_opid_t
AV/C operation ids used in AVRCP passthrough commands.
Definition avrcp.h:73
#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_button_state_t)(FIELD_GET(BIT(7), ((payload)->byte0))))
bt_avrcp_button_state_t
AVRCP button state flag.
Definition avrcp.h:139
#define BIT(n)
Unsigned integer with bit position n set (signed in assembly language).
Definition util_macro.h:44

Enumeration Type Documentation

◆ 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_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_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_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_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_subunit_type_t

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

Enumerator
BT_AVRCP_SUBUNIT_TYPE_PANEL 
BT_AVRCP_SUBUNIT_TYPE_UNIT 

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_ct_get_cap()

int bt_avrcp_ct_get_cap ( 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_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_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_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_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_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_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_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_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.