AVRCP Interface Functions

[English]

AVRCP_IF API Brief

Application

Brief

avrcp_if_disconnect()

AVRCP disconnect API

avrcp_if_connect()

AVRCP connect API

avrcp_if_tg_set_dft_vol()

AVRCP tg set default volume value, need volume value is AVRCP_INVALID_VOL first

avrcp_if_tg_vol_changed_ntf()

AVRCP TG notify volume changed event

avrcp_if_ct_register_ntf()

AVRCP CT register event notify to TG

avrcp_if_ct_play()

send AVCRP play command

avrcp_if_ct_pause()

send AVCRP pause command

avrcp_if_ct_stop()

send AVCRP stop command

avrcp_if_ct_forword()

send AVCRP forward command

avrcp_if_ct_backword()

send AVCRP backward command

avrcp_if_ct_fast_forword_start()

send press command with opreation id fast forward

avrcp_if_ct_fast_forword_stop()

send release command for fast forword stop

avrcp_if_ct_rewind_start()

send press command with opreation id rewind

avrcp_if_ct_rewind_stop()

send release command for rewind stop

avrcp_if_ct_get_play_status()

send get play status command

avrcp_if_ct_get_support_evt()

send the command which get capability id event

avrcp_if_ct_set_absolute_volume()

set AVRCP absolute volume

avrcp_if_ct_cmd_exchange_ongoing()

check AVRCP is processing command or not

avrcp_if_register_event_callback()

AVCRP register event callback API

avrcp_if_init()

Initial AVRCP

avrcp_if_get_sync_len()

return the profile sync used max buffer size

avrcp_if_conn_sync()

TWS master used to send sync profile data

avrcp_if_conn_restore()

TWS slave used to rebuild its host stack

avrcp_if_conn_restore_specific()

TWS slave update AVRCP connection handle and recover relevant settings

AVRCP_IF API Reference

Header File

Functions

btif_ret_t avrcp_if_disconnect(uint16_t handle)

avrcp_if_disconnect brief description

AVRCP disconnect API

参数:

handle[in] connection handle

返回值:
  • 0 – success

  • other – fail

返回:

result

btif_ret_t avrcp_if_connect(btif_bd_addr_t *p_addr)

avrcp_if_connect brief description

AVRCP connect API

参数:

p_addr[in] remote BT MAC address

返回值:
  • 0 – success

  • other – fail

返回:

result

btif_ret_t avrcp_if_tg_set_dft_vol(uint16_t handle, uint8_t vol)

avrcp_if_tg_set_dft_vol brief description

AVRCP tg set default volume value, need volume value is AVRCP_INVALID_VOL first

参数:
  • handle[in] connection handle

  • vol[in] volume value

返回值:
  • 0 – success

  • other – fail

返回:

result

btif_ret_t avrcp_if_tg_vol_changed_ntf(uint16_t handle, uint8_t vol)

avrcp_if_tg_vol_changed_ntf brief description

AVRCP TG notify volume changed event

参数:
  • handle[in] connection handle

  • vol[in] volume changed value

返回值:
  • 0 – success

  • other – fail

返回:

result

btif_ret_t avrcp_if_ct_register_ntf(uint16_t handle, btif_avrcp_ntf_evt_id_t evt_id)

avrcp_if_ct_register_ntf brief description

AVRCP CT register event notify to TG

参数:
  • handle[in] connection handle

  • evt_id[in] AVRCP event ID

返回值:
  • 0 – success

  • other – fail

返回:

result

btif_ret_t avrcp_if_ct_play(uint16_t handle)

avrcp_if_ct_play brief description

send AVCRP play command

参数:

handle[in] connection handle

返回值:
  • 0 – success

  • other – fail

返回:

result

btif_ret_t avrcp_if_ct_pause(uint16_t handle)

avrcp_if_ct_pause brief description

send AVCRP pause command

参数:

handle[in] connection handle

返回值:
  • 0 – success

  • other – fail

返回:

result

btif_ret_t avrcp_if_ct_stop(uint16_t handle)

avrcp_if_ct_stop brief description

send AVCRP stop command

参数:

handle[in] connection handle

返回值:
  • 0 – success

  • other – fail

返回:

result

btif_ret_t avrcp_if_ct_forword(uint16_t handle)

avrcp_if_ct_forward brief description

send AVCRP forward command

参数:

handle[in] connection handle

返回值:
  • 0 – success

  • other – fail

返回:

result

btif_ret_t avrcp_if_ct_backword(uint16_t handle)

avrcp_if_ct_backward brief description

send AVCRP backward command

参数:

handle[in] connection handle

返回值:
  • 0 – success

  • other – fail

返回:

result

btif_ret_t avrcp_if_ct_fast_forword_start(uint16_t handle)

avrcp_if_ct_fast_forward_start brief description

send press command with opreation id fast forward

参数:

handle[in] connection handle

返回值:
  • 0 – success

  • other – fail

返回:

result

btif_ret_t avrcp_if_ct_fast_forword_stop(uint16_t handle)

avrcp_if_ct_fast_forward_stop brief description

send release command for fast forword stop

参数:

handle[in] connection handle

返回值:
  • 0 – success

  • other – fail

返回:

result

btif_ret_t avrcp_if_ct_rewind_start(uint16_t handle)

avrcp_if_ct_rewind_start brief description

send press command with opreation id rewind

参数:

handle[in] connection handle

返回值:
  • 0 – success

  • other – fail

返回:

result

btif_ret_t avrcp_if_ct_rewind_stop(uint16_t handle)

avrcp_if_ct_rewind_stop brief description

send release command for rewind stop

参数:

handle[in] connnection handle

返回值:
  • 0 – success

  • other – fail

返回:

result

btif_ret_t avrcp_if_ct_get_play_status(uint16_t handle)

avrcp_if_ct_get_play_status brief description

send get play status command

参数:

handle[in] connection handle

返回值:
  • 0 – success

  • other – fail

返回:

result

btif_ret_t avrcp_if_ct_get_support_evt(uint16_t handle)

avrcp_if_ct_get_support_evt brief description

send the command which get capability id event

参数:

handle[in] connection handle

返回值:
  • 0 – success

  • other – fail

返回:

result

btif_ret_t avrcp_if_ct_set_absolute_volume(uint16_t handle, uint8_t vol)

avrcp_if_ct_set_absolute_volume brief description

set AVRCP absolute volume

参数:
  • handle[in] connection handle

  • vol[in] volume value

返回值:
  • 0 – success

  • other – fail

返回:

result

btif_ret_t avrcp_if_ct_cmd_exchange_ongoing(uint16_t handle)

avrcp_if_ct_cmd_exchange_ongoing brief description

check AVRCP is processing command or not

参数:

handle[in] connection handle

返回值:
  • 1 – on going

  • 0 – idle

返回:

result

void avrcp_if_register_event_callback(btif_avrcp_register_t *p_callback)

avrcp_if_register_event_callback brief description

AVCRP register event callback API

参数:

p_callback[in] strcut of callback function

返回:

N/A

void avrcp_if_init(void)

avrcp_if_init brief description

返回:

N/A

uint16_t avrcp_if_get_sync_len(btif_bd_addr_t *p_addr)

avrcp_if_get_sync_len brief description

return the profile sync used max buffer size

参数:

p_addr[in] remote BT MAC address

返回:

data length

btif_ret_t avrcp_if_conn_sync(btif_bd_addr_t *p_addr, uint8_t *p_buff, uint16_t buff_len, uint16_t *p_length)

avrcp_if_conn_sync brief description

TWS master used to send sync profile data

参数:
  • p_addr[in] remote BT MAC addresss

  • p_buff[out] buffer used to sync profile data

  • buff_len[in] p_buff allocated length

  • p_length[out] sync profile data length will be sent

返回值:
  • 0 – success

  • other – fail

返回:

result

btif_ret_t avrcp_if_conn_restore(btif_bd_addr_t *p_addr, uint8_t *p_buff, uint16_t length)

avrcp_if_conn_restore brief description

TWS slave used to rebuild its host stack

参数:
  • p_addr[in] remote BT MAC address

  • p_buff[in] sync profile data

  • length[in] p_buff data length

返回值:
  • 0 – success

  • other – fail

返回:

result

btif_ret_t avrcp_if_conn_restore_specific(btif_bd_addr_t *p_addr, uint16_t handle)

avrcp_if_conn_restore_specific brief description

TWS slave update AVRCP connection handle and recover relevant settings

参数:
  • p_addr[in] remote BT MAC address

  • handle[in] connection handle

返回值:
  • 0 – success

  • other – fail

返回:

result

Structures

struct btif_avrcp_cb_hdr_t

AVRCP header data struct defintion.

Public Members

btif_avrcp_evt_code_t evt

AVRCP event index

uint16_t handle

connection handle

struct btif_avcrp_conn_cb_t

AVRCP connection data struct definition.

Public Members

btif_avrcp_cb_hdr_t hdr

AVRCP header data struct

uint16_t cid

cid value

btif_bd_addr_t addr

remote BT MAC address

btif_ret_t status

status result @btif_ret_t

struct btif_avcrp_gen_cb_t

AVRCP general data struct definition.

Public Members

btif_avrcp_cb_hdr_t hdr

AVRCP header data struct

uint8_t len

length of p_data

const uint8_t *p_data

data buffer pointer

struct btif_avrcp_play_status_cb_t

AVRCP play status data struct definition.

Public Members

btif_avrcp_cb_hdr_t hdr

AVRCP header data struct

uint32_t song_len

total length of playing song

uint32_t song_position

current position of playing song

uint8_t play_status

playing status @avrcp_play_sts_t

struct btif_avrcp_playback_status_change_cb_t

AVRCP playback status data struct definitino.

Public Members

btif_avrcp_cb_hdr_t hdr

AVRCP header data struct

btif_avrcp_cmd_type_t cmd_type

command type

uint8_t status

status value @btif_avrcp_play_sts_t

struct btif_avrcp_vol_change_cb_t

AVRCP volume change data struct definition.

Public Members

btif_avrcp_cb_hdr_t hdr

AVRCP header data struct

uint8_t vol

volume value

struct btif_avrcp_cmd_oper_cb_t

AVRCP command operation data struct definition.

Public Members

btif_avrcp_cb_hdr_t hdr

AVRCP header data struct

btif_avrcp_oper_id_t oper_id

index of operation ID

struct btif_avrcp_supp_evt_cb_t

AVRCP supported event data struct definition.

Public Members

btif_avrcp_cb_hdr_t hdr

AVRCP header data struct

uint8_t evt_cnt

event count

const uint8_t *p_evt

pointer to supported list

struct btif_avrcp_forward_rewind_cb_t

AVRCP forward backward data struct definition.

Public Members

btif_avrcp_cb_hdr_t hdr

AVRCP header data struct

btif_avrcp_cmd_sts_t cmd_sts

command status

btif_avrcp_oper_id_t oper_id

operation ID

struct btif_avrcp_register_t

callback struct definition

Public Members

dl_list_t dlst_node

node for application handler will be linked to orthers

btif_avrcp_event_callback callback

function pointer for callback function

Macros

BTIF_AVRCP_EVT_CONN

callback struct see @btif_avcrp_conn_cb_t

BTIF_AVRCP_EVT_DISC

callback struct see @btif_avcrp_conn_cb_t

BTIF_AVRCP_EVT_BROWSING_CONN

callback struct see @btif_avcrp_conn_cb_t

BTIF_AVRCP_EVT_BROWSING_DISC

callback struct see @btif_avcrp_conn_cb_t

BTIF_AVRCP_EVT_NTF_PLAYBACK_STATUS_CHANGED

callback struct see @btif_avrcp_playback_status_change_cb_t

BTIF_AVRCP_EVT_PLAY_STATUS

callback struct see @btif_avrcp_play_status_cb_t

BTIF_AVRCP_EVT_VOL_CHANGED

callback struct see @btif_avrcp_vol_change_cb_t

BTIF_AVRCP_EVT_CMD_OPERATION

callback struct see @btif_avrcp_cmd_oper_cb_t

BTIF_AVRCP_EVT_SUPPORT_EVT_IDS

callback struct see @btif_avrcp_supp_evt_cb_t

BTIF_AVRCP_EVT_SET_ADDRESSED_PLAYER

callback struct see @ NULL

BTIF_AVRCP_EVT_L2CAP_DATA

callback struct see @btif_avcrp_gen_cb_t

BTIF_AVRCP_EVT_BROWSING_DATA

callback struct see @btif_avcrp_gen_cb_t

BTIF_AVRCP_EVT_FORWARD_REWIND_CMD_STAT

callback struct see @btif_avrcp_forward_rewind_cb_t

Type Definitions

typedef uint8_t btif_avrcp_evt_code_t