|
Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
|
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). | |
Functions | |
| int | bt_avrcp_connect (struct bt_conn *conn) |
| Connect AVRCP. | |
| int | bt_avrcp_disconnect (struct bt_conn *conn) |
| Disconnect AVRCP. | |
| 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. | |
| 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. | |
| 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. | |
Audio Video Remote Control Profile header.
| #define BT_AVRCP_COMPANY_ID_BLUETOOTH_SIG (0x001958) |
| #define BT_AVRCP_COMPANY_ID_SIZE (3) |
| #define BT_AVRCP_MAX_ABSOLUTE_VOLUME 0x7F |
AVRCP MAX absolute volume.
| #define BT_AVRCP_PASSTHROUGH_GET_OPID | ( | payload | ) |
| #define BT_AVRCP_PASSTHROUGH_GET_STATE | ( | payload | ) |
| #define BT_AVRCP_PASSTHROUGH_SET_STATE_OPID | ( | payload, | |
| state, | |||
| opid ) |
| 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
| ct | AVRCP CT connection object. |
| event_id | The 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. |
| data | Pointer to bt_avrcp_event_data structure containing the event-specific data. The content of the union depends on the event_id. |
| enum bt_avrcp_cap_t |
| enum bt_avrcp_charset_t |
| enum bt_avrcp_ctype_t |
| enum bt_avrcp_evt_t |
AVRCP Notification Events.
| enum bt_avrcp_opid_t |
AV/C operation ids used in AVRCP passthrough commands.
| enum bt_avrcp_rsp_t |
| enum bt_avrcp_scope_t |
| enum bt_avrcp_status_t |
AVRCP status and error codes.
These status codes are used in AVRCP responses to indicate the result of a command.
| 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.
| conn | Pointer to bt_conn structure. |
| int bt_avrcp_browsing_disconnect | ( | struct bt_conn * | conn | ) |
Disconnect AVRCP browsing channel.
This function close AVCTP browsing channel L2CAP connection.
| conn | Pointer to bt_conn structure. |
| 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.
| conn | Pointer to bt_conn structure. |
| 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.
| pool | The buffer pool to allocate from. |
| 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.
| pool | The buffer pool to allocate from. |
Send AVRCP vendor dependent command for ADD_TO_NOW_PLAYING.
| ct | AVRCP CT connection object. |
| tid | The transaction label of the response, valid from 0 to 15. |
| buf | The 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. |
Get AVRCP Capabilities.
This function gets the capabilities supported by remote device.
| ct | The AVRCP CT instance. |
| tid | The transaction label of the response, valid from 0 to 15. |
| cap_id | Specific capability requested, see bt_avrcp_cap_t. |
| 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.
| ct | AVRCP CT connection object. |
| tid | The transaction label of the response, valid from 0 to 15. |
| buf | The 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. |
Send AVRCP vendor dependent command for GET_ELEMENT_ATTRS.
| ct | AVRCP CT connection object. |
| tid | The transaction label of the response, valid from 0 to 15. |
| buf | The 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. |
| int bt_avrcp_ct_get_play_status | ( | struct bt_avrcp_ct * | ct, |
| uint8_t | tid ) |
Send AVRCP vendor dependent command for GET_PLAY_STATUS.
| ct | AVRCP CT connection object. |
| tid | The transaction label of the response, valid from 0 to 15. |
| 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.
| ct | AVRCP CT connection object. |
| tid | The transaction label of the response, valid from 0 to 15. |
| buf | The 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. |
| 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.
| ct | AVRCP CT connection object. |
| tid | The transaction label of the response, valid from 0 to 15. |
| buf | The 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. |
| 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.
| ct | The AVRCP CT instance. |
| tid | The transaction label of the response, valid from 0 to 15. |
| 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.
| ct | The AVRCP CT instance. |
| tid | The transaction label of the response, valid from 0 to 15. |
| 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.
| ct | AVRCP CT connection object. |
| tid | The transaction label of the response, valid from 0 to 15. |
| battery_status | Battery status value bt_avrcp_battery_status_t |
| 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.
| ct | AVRCP CT connection object. |
| tid | The transaction label of the response, valid from 0 to 15. |
| buf | The 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 |
| 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.
| ct | AVRCP CT connection object. |
| tid | The transaction label of the response, valid from 0 to 15. |
| 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.
| ct | AVRCP CT connection object. |
| tid | The transaction label of the response, valid from 0 to 15. |
| attr_id | Player application setting attribute ID for which the possible values should be listed (e.g., Equalizer, Repeat Mode, Shuffle, Scan). |
| 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.
| ct | The AVRCP CT instance. |
| tid | The transaction label of the response, valid from 0 to 15. |
| opid | The user operation id, see bt_avrcp_opid_t. |
| state | The button state, see bt_avrcp_button_state_t. |
| payload | The payload of the pass through command. Should not be NULL if len is not zero. |
| len | The length of the payload. |
Send AVRCP vendor dependent command for PLAY_ITEM.
| ct | AVRCP CT connection object. |
| tid | The transaction label of the response, valid from 0 to 15. |
| buf | The 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. |
| 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.
| cb | The AVRCP CT callback function. |
| 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.
| ct | The AVRCP CT instance. |
| tid | The transaction label of the response, valid from 0 to 15. |
| event_id | The event ID to register for, see bt_avrcp_evt_t. |
| interval | The playback interval for position changed events. Other events will have this value set to 0 to ignore. |
| cb | The callback function to handle the changed notification response. |
| 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.
| ct | The AVRCP CT instance. |
| tid | The transaction label of the command, valid from 0 to 15. |
| absolute_volume | The absolute volume value (0x00-0x7F). |
Send AVRCP vendor dependent command for SET_ADDRESSED_PLAYER.
| ct | AVRCP CT connection object. |
| tid | The transaction label of the response, valid from 0 to 15. |
| player_id | The player ID to be set as addressed player. |
Set browsed player.
This function sets the browsed player on the remote device.
| ct | The AVRCP CT instance. |
| tid | The transaction label of the response, valid from 0 to 15. |
| player_id | The player ID to be set as browsed player. |
| 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.
| ct | AVRCP CT connection object. |
| tid | The transaction label of the response, valid from 0 to 15. |
| buf | The 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. |
| int bt_avrcp_disconnect | ( | struct bt_conn * | conn | ) |
Disconnect AVRCP.
This function close AVCTP L2CAP connection.
| conn | Pointer to bt_conn structure. |
| 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.
| tg | The AVRCP TG instance. |
| tid | The transaction label of the response, valid from 0 to 15. |
| status | Status code of the operation bt_avrcp_status_t. |
| absolute_volume | The absolute volume value (0x00-0x7F). |
Send response for PDU ID BT_AVRCP_PDU_ID_ADD_TO_NOW_PLAYING.
| tg | AVRCP TG connection object. |
| tid | The transaction label of the request. |
| status | Status code of the operation bt_avrcp_status_t. |
| 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.
| tg | The AVRCP TG instance. |
| tid | The transaction label of the response, valid from 0 to 15. |
| status | Status code of the operation bt_avrcp_status_t. |
| buf | The 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. |
| 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.
| tg | AVRCP TG connection object. |
| tid | The transaction label of the request. |
| status | Status code of the operation bt_avrcp_status_t. |
| buf | The 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. |
| 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.
| tg | AVRCP TG connection object. |
| tid | The transaction label of the request. |
| status | Status code of the operation bt_avrcp_status_t. |
| buf | The 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. |
| 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.
| tg | AVRCP TG connection object. |
| tid | The transaction label of the request. |
| status | Status code of the operation bt_avrcp_status_t. |
| buf | The 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. |
| 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.
| tg | AVRCP TG connection object. |
| tid | The transaction label of the request. |
| status | Status code of the operation bt_avrcp_status_t. |
| buf | The 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. |
| 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.
| tg | AVRCP TG connection object. |
| tid | The transaction label of the request. |
| status | Status code of the operation bt_avrcp_status_t. |
| buf | The 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. |
Send response for PDU ID BT_AVRCP_PDU_ID_INFORM_BATT_STATUS_OF_CT.
| tg | AVRCP TG connection object. |
| tid | The transaction label of the request. |
| status | Status code of the operation bt_avrcp_status_t. |
| 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.
| tg | AVRCP TG connection object. |
| tid | The transaction label of the request. |
| status | Status code of the operation bt_avrcp_status_t. |
| 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.
| tg | AVRCP TG connection object. |
| tid | The transaction label of the request. |
| status | Status code of the operation bt_avrcp_status_t. |
| buf | The 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. |
| 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.
| tg | AVRCP TG connection object. |
| tid | The transaction label of the request. |
| status | Status code of the operation bt_avrcp_status_t. |
| buf | The 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. |
| 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:
event_id to indicate that the event is being monitored.event_id when the event state has changed.| tg | The AVRCP TG instance. |
| tid | The transaction label of the response, valid from 0 to 15. |
| status | Status code of the operation bt_avrcp_status_t. |
| event_id | The AVRCP event ID for which the notification is sent, bt_avrcp_evt_t. |
| data | Pointer to an bt_avrcp_event_data structure containing the event-specific data. The content of the union depends on the event_id. |
event_id sends an INTERIM response.event_id sends a CHANGED response.status is BT_AVRCP_STATUS_NOT_IMPLEMENTED, a NOT_IMPLEMENTED response is sent.status is any other non-SUCCESS value, a REJECTED response is sent. Send response for PDU ID BT_AVRCP_PDU_ID_PLAY_ITEM.
| tg | AVRCP TG connection object. |
| tid | The transaction label of the request. |
| status | Status code of the operation bt_avrcp_status_t. |
| 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.
| cb | The AVRCP TG callback function. |
| 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.
| tg | The AVRCP TG instance. |
| tid | The transaction label of the response, valid from 0 to 15. |
| result | The response code, see bt_avrcp_rsp_t, can support 0x8(NOT_IMPLEMENTED), 0x9 (ACCEPTED), 0xA (REJECTED) |
| buf | The 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. |
| 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.
| tg | The AVRCP TG instance. |
| tid | The transaction label of the response, valid from 0 to 15. |
| buf | The response buffer containing the set browsed player response data. |
| 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.
| tg | The AVRCP TG instance. |
| tid | The transaction label of the response, valid from 0 to 15. |
| 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.
| tg | The AVRCP TG instance. |
| tid | The transaction label of the response, valid from 0 to 15. |
| rsp | The response for UNIT INFO command. |
Send response for PDU ID BT_AVRCP_PDU_ID_SET_ADDRESSED_PLAYER.
| tg | AVRCP TG connection object. |
| tid | The transaction label of the request. |
| status | Status code of the operation bt_avrcp_status_t. |
Send response for PDU ID BT_AVRCP_PDU_ID_SET_PLAYER_APP_SETTING_VAL.
| tg | AVRCP TG connection object. |
| tid | The transaction label of the request. |
| status | Status code of the operation bt_avrcp_status_t. |