MT2523 API Reference  LinkIt SDK v4
bt_avrcp.h
1 /* Copyright Statement:
2  *
3  * (C) 2005-2017 MediaTek Inc. All rights reserved.
4  *
5  * This software/firmware and related documentation ("MediaTek Software") are
6  * protected under relevant copyright laws. The information contained herein
7  * is confidential and proprietary to MediaTek Inc. ("MediaTek") and/or its licensors.
8  * Without the prior written permission of MediaTek and/or its licensors,
9  * any reproduction, modification, use or disclosure of MediaTek Software,
10  * and information contained herein, in whole or in part, shall be strictly prohibited.
11  * You may only use, reproduce, modify, or distribute (as applicable) MediaTek Software
12  * if you have agreed to and been bound by the applicable license agreement with
13  * MediaTek ("License Agreement") and been granted explicit permission to do so within
14  * the License Agreement ("Permitted User"). If you are not a Permitted User,
15  * please cease any access or use of MediaTek Software immediately.
16  * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
17  * THAT MEDIATEK SOFTWARE RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES
18  * ARE PROVIDED TO RECEIVER ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL
19  * WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
20  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
21  * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
22  * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
23  * SUPPLIED WITH MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH
24  * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES
25  * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES
26  * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK
27  * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
28  * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND
29  * CUMULATIVE LIABILITY WITH RESPECT TO MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
30  * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE MEDIATEK SOFTWARE AT ISSUE,
31  * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO
32  * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
33  */
34 
35 
36 #ifndef __BT_AVRCP_H__
37 #define __BT_AVRCP_H__
38 
172 #include "stdint.h"
173 #include "stdbool.h"
174 #include "bt_type.h"
175 
176 BT_EXTERN_C_BEGIN
186 #define BT_AVRCP_CONNECT_CNF (BT_MODULE_AVRCP | 0x0000)
187 #define BT_AVRCP_CONNECT_IND (BT_MODULE_AVRCP | 0x0001)
188 #define BT_AVRCP_DISCONNECT_IND (BT_MODULE_AVRCP | 0x0002)
191 #define BT_AVRCP_PASS_THROUGH_CNF (BT_MODULE_AVRCP | 0x0003)
192 #define BT_AVRCP_LIST_APP_SETTING_ATTRIBUTES_CNF (BT_MODULE_AVRCP | 0x0004)
193 #define BT_AVRCP_GET_APP_SETTING_VALUE_CNF (BT_MODULE_AVRCP | 0x0005)
194 #define BT_AVRCP_SET_APP_SETTING_VALUE_CNF (BT_MODULE_AVRCP | 0x0006)
195 #define BT_AVRCP_GET_ELEMENT_ATTRIBUTES_CNF (BT_MODULE_AVRCP | 0x0007)
196 #define BT_AVRCP_EVENT_NOTIFICATION_IND (BT_MODULE_AVRCP | 0x0008)
198 #define BT_AVRCP_REQUEST_CONTINUING_CNF (BT_MODULE_AVRCP | 0x0009)
199 #define BT_AVRCP_ABORT_CONTINUING_CNF (BT_MODULE_AVRCP | 0x000a)
201 #define BT_AVRCP_SET_ABSOLUTE_VOLUME_CNF (BT_MODULE_AVRCP | 0x000b)
203 #define BT_AVRCP_PASS_THROUGH_COMMAND_IND (BT_MODULE_AVRCP | 0x0010)
204 #define BT_AVRCP_SET_ABSOLUTE_VOLUME_COMMAND_IND (BT_MODULE_AVRCP | 0x0011)
205 #define BT_AVRCP_REGISTER_NOTIFICATION_IND (BT_MODULE_AVRCP | 0x0012)
206 #define BT_AVRCP_GET_PLAY_STATUS_NOTIFICATION_IND (BT_MODULE_AVRCP | 0x0013)
207 #define BT_AVRCP_ELEMENT_METADATA_IND (BT_MODULE_AVRCP | 0x0014)
208 #define BT_AVRCP_GET_CAPABILITY_IND (BT_MODULE_AVRCP | 0x0015)
209 #define BT_AVRCP_ELEMENT_METADATA_CONT_IND (BT_MODULE_AVRCP | 0x0016)
210 #define BT_AVRCP_CONTINUATION_ABORT_IND (BT_MODULE_AVRCP | 0x0017)
211 #define BT_STATUS_AVRCP_INVALID_PARAMETER (BT_MODULE_AVRCP | 0x01)
212 #define BT_STATUS_AVRCP_FAILED (BT_MODULE_AVRCP | 0x02)
213 #define BT_STATUS_AVRCP_BUSY (BT_MODULE_AVRCP | 0x03)
214 #define BT_STATUS_AVRCP_LINK_ALREADY_EXISTED (BT_MODULE_AVRCP | 0x04)
215 #define BT_STATUS_AVRCP_SDP_QUERY_FAILED (BT_MODULE_AVRCP | 0x05)
216 #define BT_STATUS_AVRCP_NOT_IMPLEMENTED (BT_MODULE_AVRCP | 0x28)
217 #define BT_STATUS_AVRCP_REJECTED (BT_MODULE_AVRCP | 0x29)
218 #define BT_STATUS_AVRCP_INTERIM (BT_MODULE_AVRCP | 0x2F)
219 #define BT_STATUS_AVRCP_REJECT_INVALID_COMMAND (BT_MODULE_AVRCP | 0x30)
220 #define BT_STATUS_AVRCP_REJECT_INVALID_PARAMETER (BT_MODULE_AVRCP | 0x31)
221 #define BT_STATUS_AVRCP_REJECT_PARAMTER_NOT_FOUND (BT_MODULE_AVRCP | 0x32)
222 #define BT_STATUS_AVRCP_REJECT_INTERNAL_ERROR (BT_MODULE_AVRCP | 0x33)
229 #define BT_AVRCP_OPERATION_ID_SELECT 0x00
230 #define BT_AVRCP_OPERATION_ID_UP 0x01
231 #define BT_AVRCP_OPERATION_ID_DOWN 0x02
232 #define BT_AVRCP_OPERATION_ID_LEFT 0x03
233 #define BT_AVRCP_OPERATION_ID_RIGHT 0x04
234 #define BT_AVRCP_OPERATION_ID_RIGHT_UP 0x05
235 #define BT_AVRCP_OPERATION_ID_RIGHT_DOWN 0x06
236 #define BT_AVRCP_OPERATION_ID_LEFT_UP 0x07
237 #define BT_AVRCP_OPERATION_ID_LEFT_DOWN 0x08
238 #define BT_AVRCP_OPERATION_ID_ROOT_MENU 0x09
239 #define BT_AVRCP_OPERATION_ID_SETUP_MENU 0x0A
240 #define BT_AVRCP_OPERATION_ID_CONTENTS_MENU 0x0B
241 #define BT_AVRCP_OPERATION_ID_FAVORITE_MENU 0x0C
242 #define BT_AVRCP_OPERATION_ID_EXIT 0x0D
244 #define BT_AVRCP_OPERATION_ID_0 0x20
245 #define BT_AVRCP_OPERATION_ID_1 0x21
246 #define BT_AVRCP_OPERATION_ID_2 0x22
247 #define BT_AVRCP_OPERATION_ID_3 0x23
248 #define BT_AVRCP_OPERATION_ID_4 0x24
249 #define BT_AVRCP_OPERATION_ID_5 0x25
250 #define BT_AVRCP_OPERATION_ID_6 0x26
251 #define BT_AVRCP_OPERATION_ID_7 0x27
252 #define BT_AVRCP_OPERATION_ID_8 0x28
253 #define BT_AVRCP_OPERATION_ID_9 0x29
254 #define BT_AVRCP_OPERATION_ID_DOT 0x2A
255 #define BT_AVRCP_OPERATION_ID_ENTER 0x2B
256 #define BT_AVRCP_OPERATION_ID_CLEAR 0x2C
258 #define BT_AVRCP_OPERATION_ID_CHANNEL_UP 0x30
259 #define BT_AVRCP_OPERATION_ID_CHANNEL_DOWN 0x31
260 #define BT_AVRCP_OPERATION_ID_PREVIOUS_CHANNEL 0x32
261 #define BT_AVRCP_OPERATION_ID_SOUND_SELECT 0x33
262 #define BT_AVRCP_OPERATION_ID_INPUT_SELECT 0x34
263 #define BT_AVRCP_OPERATION_ID_DISPLAY_INFO 0x35
264 #define BT_AVRCP_OPERATION_ID_HELP 0x36
265 #define BT_AVRCP_OPERATION_ID_PAGE_UP 0x37
266 #define BT_AVRCP_OPERATION_ID_PAGE_DOWN 0x38
268 #define BT_AVRCP_OPERATION_ID_POWER 0x40
269 #define BT_AVRCP_OPERATION_ID_VOLUME_UP 0x41
270 #define BT_AVRCP_OPERATION_ID_VOLUME_DOWN 0x42
271 #define BT_AVRCP_OPERATION_ID_MUTE 0x43
272 #define BT_AVRCP_OPERATION_ID_PLAY 0x44
273 #define BT_AVRCP_OPERATION_ID_STOP 0x45
274 #define BT_AVRCP_OPERATION_ID_PAUSE 0x46
275 #define BT_AVRCP_OPERATION_ID_RECORD 0x47
276 #define BT_AVRCP_OPERATION_ID_REWIND 0x48
277 #define BT_AVRCP_OPERATION_ID_FAST_FORWARD 0x49
278 #define BT_AVRCP_OPERATION_ID_EJECT 0x4A
279 #define BT_AVRCP_OPERATION_ID_FORWARD 0x4B
280 #define BT_AVRCP_OPERATION_ID_BACKWARD 0x4C
282 #define BT_AVRCP_OPERATION_ID_ANGLE 0x50
283 #define BT_AVRCP_OPERATION_ID_SUBPICTURE 0x51
285 #define BT_AVRCP_OPERATION_ID_F1 0x71
286 #define BT_AVRCP_OPERATION_ID_F2 0x72
287 #define BT_AVRCP_OPERATION_ID_F3 0x73
288 #define BT_AVRCP_OPERATION_ID_F4 0x74
289 #define BT_AVRCP_OPERATION_ID_F5 0x75
291 #define BT_AVRCP_OPERATION_ID_RESERVED 0x7F
292 typedef uint8_t bt_avrcp_operation_id_t;
294 #define BT_AVRCP_FALSE 0
295 #define BT_AVRCP_TRUE 1
296 
301 #define BT_AVRCP_ROLE_CT 0
302 #define BT_AVRCP_ROLE_TG 1
303 #define BT_AVRCP_ROLE_CT_AND_TG 2
304 #define BT_AVRCP_ROLE_UNDEF 255
305 #define BT_AVRCP_MAX_CHANNEL 2 /* One Target and one Controller. */
306 
307 typedef uint8_t bt_avrcp_role;
308 
309 
314 #define BT_AVRCP_OPERATION_STATE_PUSH 0
315 #define BT_AVRCP_OPERATION_STATE_RELEASED 1
316 typedef uint8_t bt_avrcp_operation_state_t;
322 #define BT_AVRCP_METADATA_PACKET_TYPE_NON_FRAGMENT 0x00
323 #define BT_AVRCP_METADATA_PACKET_TYPE_START 0x01
324 #define BT_AVRCP_METADATA_PACKET_TYPE_CONTINUE 0x02
325 #define BT_AVRCP_METADATA_PACKET_TYPE_END 0x03
326 typedef uint16_t bt_avrcp_metadata_packet_type_t;
329 /* METADATA */
330 
331 typedef enum
332 {
336  BT_AVRCP_PACKET_TYPE_IND_TOTAL
340 
345 #define BT_AVRCP_MEDIA_ATTRIBUTE_TITLE 0x01
346 #define BT_AVRCP_MEDIA_ATTRIBUTE_ARTIST_NAME 0x02
347 #define BT_AVRCP_MEDIA_ATTRIBUTE_ALBUM_NAME 0x03
348 #define BT_AVRCP_MEDIA_ATTRIBUTE_MEDIA_NUMBER 0x04
349 #define BT_AVRCP_MEDIA_ATTRIBUTE_TOTAL_MEDIA_NUMBER 0x05
350 #define BT_AVRCP_MEDIA_ATTRIBUTE_GENRE 0x06
351 #define BT_AVRCP_MEDIA_ATTRIBUTE_PLAYING_TIME 0x07
352 typedef uint32_t bt_avrcp_media_attribute_t;
358 #define BT_AVRCP_EVENT_PLAYBACK_STATUS_CHANGED 0x01
359 #define BT_AVRCP_EVENT_TRACK_CHANGED 0x02
360 #define BT_AVRCP_EVENT_TRACK_REACHED_END 0x03
361 #define BT_AVRCP_EVENT_TRACK_REACHED_START 0x04
362 #define BT_AVRCP_EVENT_PLAYBACK_POS_CHANGED 0x05
363 #define BT_AVRCP_EVENT_BATT_STATUS_CHANGED 0x06
364 #define BT_AVRCP_EVENT_SYSTEM_STATUS_CHANGED 0x07
365 #define BT_AVRCP_EVENT_PLAYER_APP_SETTING_CHANGED 0x08
366 #define BT_AVRCP_EVENT_NOW_PLAYING_CONTENT_CHANGED 0x09
367 #define BT_AVRCP_EVENT_AVAILABLE_PLAYERS_CHANGED 0x0a
368 #define BT_AVRCP_EVENT_ADDRESSED_PLAYER_CHANGED 0x0b
369 #define BT_AVRCP_EVENT_UIDS_CHANGED 0x0c
370 #define BT_AVRCP_EVENT_VOLUME_CHANGED 0x0D
371 typedef uint8_t bt_avrcp_event_t;
377 #define BT_AVRCP_STATUS_SYSTEM_POWER_ON 0x00
378 #define BT_AVRCP_STATUS_SYSTEM_POWER_OFF 0x01
379 #define BT_AVRCP_STATUS_SYSTEM_UNPLUGGED 0x02
385 #define BT_AVRCP_STATUS_BATT_NORMAL 0x00
386 #define BT_AVRCP_STATUS_BATT_WARNING 0x01
387 #define BT_AVRCP_STATUS_BATT_CRITICAL 0x02
388 #define BT_AVRCP_STATUS_BATT_EXTERNAL 0x03
389 #define BT_AVRCP_STATUS_BATT_FULL_CHARGE 0x04
395 #define BT_AVRCP_STATUS_PLAY_STOPPED 0x00
396 #define BT_AVRCP_STATUS_PLAY_PLAYING 0x01
397 #define BT_AVRCP_STATUS_PLAY_PAUSED 0x02
398 #define BT_AVRCP_STATUS_PLAY_FWD_SEEK 0x03
399 #define BT_AVRCP_STATUS_PLAY_REV_SEEK 0x04
400 #define BT_AVRCP_STATUS_PLAY_ERROR 0xFF
403 typedef uint8_t bt_avrcp_status_t;
408 #define BT_AVRCP_PDU_ID_GET_CAPABILITIES 0X10
409 #define BT_AVRCP_PDU_ID_LIST_APP_SETTING_ATTRIBUTES 0X11
410 #define BT_AVRCP_PDU_ID_GET_APP_SETTING_VALUE 0X13
411 #define BT_AVRCP_PDU_ID_SET_APP_SETTING_VALUE 0X14
412 #define BT_AVRCP_PDU_ID_GET_ELEMENT_ATTRIBUTES 0x20
413 #define BT_AVRCP_PDU_ID_GET_PLAY_STATUS 0x30
414 #define BT_AVRCP_PDU_ID_REGISTER_NOTIFICATION 0X31
415 #define BT_AVRCP_PDU_ID_REQUEST_CONTINUING_RSP 0X40
416 #define BT_AVRCP_PDU_ID_ABORT_CONTINUING_RSP 0X41
417 #define BT_AVRCP_PDU_ID_SET_ABSOLUTE_VOLUME 0x50
419 typedef uint8_t bt_avrcp_pdu_id_t;
421 #define BT_AVRCP_RESPONSE_NOT_IMPLEMENTED 0x08
422 #define BT_AVRCP_RESPONSE_ACCEPTED 0x09
423 #define BT_AVRCP_RESPONSE_REJECTED 0x0A
424 #define BT_AVRCP_RESPONSE_CHANGED 0x0D
425 #define BT_AVRCP_RESPONSE_INTERIM 0x0F
426 typedef uint8_t bt_avrcp_response_t;
428 /* Notification */
429 #define BT_AVRCP_EVENT_MEDIA_PLAY_STOPPED 0x00
430 #define BT_AVRCP_EVENT_MEDIA_PLAYING 0x01
431 #define BT_AVRCP_EVENT_MEDIA_PAUSED 0x02
432 #define BT_AVRCP_EVENT_MEDIA_FWD_SEEK 0x03
433 #define BT_AVRCP_EVENT_MEDIA_REV_SEEK 0x04
434 #define BT_AVRCP_EVENT_MEDIA_ERROR 0xFF
435 typedef uint8_t bt_avrcp_media_play_status_event_t;
438 /*4. Capabilities */
439 #define BT_AVRCP_CAPABILITY_COMPANY_ID 0x2
440 #define BT_AVRCP_CAPABILITY_EVENTS_SUPPORTED 0x3 /*Indicates the capability request from CT. */
441 typedef uint8_t bt_avrcp_capability_types_t;
442 
443 #define BT_AVRCP_ELEMENT_ATTRIBUTE_MAX_DATA_SIZE 450
444 
445 /* The maximum length of individual attribute content, including the maximum length of title, artist name, album name and genre.*/
446 #define BT_AVRCP_MAX_MEDIA_ATTRIBUTE_LEN 64
447 
458 typedef struct {
459  uint32_t role;
466 typedef struct{
467  uint32_t handle;
474 typedef struct{
475  uint32_t handle;
476  bt_bd_addr_t *address;
485 
489 typedef struct{
490  uint32_t handle;
500 
505 BT_PACKED (
506 typedef struct{
507  uint8_t attribute_id;
509 
513 BT_PACKED (
514 typedef struct{
515  uint8_t attribute_id;
516  uint8_t value_id;
518 
519 
524 BT_PACKED (
525 typedef struct{
526  bt_avrcp_media_attribute_t attribute_id;
528 
532 BT_PACKED (
533 typedef struct{
534  uint8_t attribute_id;
536 
540 typedef struct{
541  uint32_t handle;
542  bt_avrcp_metadata_packet_type_t packet_type;
543  uint16_t length;
544  union {
545  struct{
546  uint8_t number;
548  };
549  uint8_t *data;
551  };
553 
557 typedef struct{
558  uint32_t handle;
559  bt_avrcp_metadata_packet_type_t packet_type;
560  uint16_t length;
561  union {
562  struct{
563  uint8_t number;
564  bt_avrcp_app_setting_value_t *attribute_list;
565  };
566  uint8_t *data;
568  };
570 
574 typedef struct{
575  uint32_t handle;
582 typedef struct{
583  uint32_t handle;
584  uint8_t number;
585  uint8_t data[1];
589 /* @brief The struct of response values to get element attribute.
590 */
591 BT_PACKED (
592 typedef struct{
593  bt_avrcp_media_attribute_t attribute_id;
594  uint16_t character_set_id;
595  uint16_t attribute_value_length;
596  /* For big data PDUs: Metadata Attributes for Current Media Item and Player Application Settings.
597 
598  There are two options to create AVRCP data (PDU): bt_avrcp_media_attribute_t
599  Either restrict attribute_value length to 64 bytes OR restrict total size of bt_avrcp_get_element_attributes_response_t to 512 bytes
600  BT_AVRCP_MAX_PDU_LEN 512 //Total size
601  BT_AVRCP_ELEMENT_ATTRIBUTE_MAX_DATA_SIZE 400 //Combined attribute size:Title, Artist name, Album name, Genre
602  BT_AVRCP_MAX_MEDIA_ATTRIBUTE_LEN 64
603  */
604  /* The maximum AVRCP PDU length. */
605  /* Fill BT_AVRCP_MEDIA_ATTRIBUTE_TITLE as first attribute in packet/data in attribute_value array. */
606 
607  uint8_t attribute_value[1]/*[8]*/;
610 
614 typedef struct{
615  uint32_t handle;
616  bt_avrcp_metadata_packet_type_t packet_type;
617  uint16_t length;
618  union{
619  struct{
620  uint8_t number;
622  };
623  uint8_t *data;
625  };
627 
628 
632 typedef struct{
633  uint8_t number;
634  bt_avrcp_app_setting_value_t *attribute_list;
640 typedef struct{
641  uint32_t handle;
642  bt_avrcp_event_t event_id;
643  union{
645  uint64_t id;
646  uint32_t playback_position;
647  uint8_t status;
649  uint8_t volume;
650  };
656 typedef struct{
657  uint32_t handle;
658  bt_avrcp_event_t event_id;
659  uint16_t parameter_length;
660  uint8_t *parameters;
667 typedef struct{
668  uint32_t handle;
675 typedef struct{
676  uint32_t handle;
682 typedef struct{
683  uint32_t handle;
684  uint8_t volume;
691 
695 typedef struct{
696  uint32_t handle;
697  bt_status_t rejection_reason;
703 typedef struct{
704  bt_avrcp_response_t response_type;
705  uint16_t parameter_length;
706  bt_avrcp_event_t event_id;
707  union{
709  uint64_t id;
710  uint32_t playback_position;
713  uint8_t volume;
714  };
717 
718 typedef struct {
719  uint32_t song_length;
720  uint32_t song_position;
723 
724 
725 typedef struct{
726  uint32_t handle;
727  uint16_t length;
729  union {
730  struct{
731  uint8_t number;
732  bt_avrcp_event_t *attribute_list;
733  };
734  uint8_t *data;
735 
736  };
738 
739 
755 bt_status_t bt_avrcp_connect(uint32_t *handle, const bt_bd_addr_t *address);
756 
765 bt_status_t bt_avrcp_connect_response(uint32_t handle, bool accept);
766 
773 bt_status_t bt_avrcp_disconnect(uint32_t handle);
774 
787 
798 bt_status_t bt_avrcp_send_pass_through_response(uint32_t handle, bt_avrcp_response_t response, bt_avrcp_operation_id_t op_id, bt_avrcp_operation_state_t op_state);
799 
810 
821 bt_status_t bt_avrcp_get_app_setting_value(uint32_t handle, uint16_t attribute_size, bt_avrcp_get_app_setting_value_t *attribute_list);
833 bt_status_t bt_avrcp_set_app_setting_value(uint32_t handle, uint16_t attribute_size, bt_avrcp_app_setting_value_t *attribute_value_list);
834 
847 bt_status_t bt_avrcp_get_element_attributes(uint32_t handle, uint16_t attribute_size, bt_avrcp_get_element_attributes_t *attribute_list);
859 bt_status_t bt_avrcp_register_notification(uint32_t handle, bt_avrcp_event_t event_id, uint32_t play_back_interval);
871 
872 
885 
886 
896 bt_status_t bt_avrcp_set_absolute_volume(uint32_t handle, uint8_t volume);
897 
898 
909 bt_status_t bt_avrcp_send_set_absoulte_volume_response(uint32_t handle, uint8_t volume);
910 
911 
924 
925 
926 
927 /******************************************************** TG ***************************************************************************/
928 
933 void bt_avrcp_init(bt_avrcp_init_struct* bt_role);
934 
939 void bt_avrcp_deinit(void);
940 
950 
951 
958 
959 
969 
970 
978 bt_status_t bt_avrcp_send_capability_response(uint32_t handle, void* response_data_t, bt_avrcp_capability_types_t type);
979 
980 
981 
982 BT_EXTERN_C_END
983 
990 #endif
991 
bt_status_t bt_avrcp_get_element_attributes(uint32_t handle, uint16_t attribute_size, bt_avrcp_get_element_attributes_t *attribute_list)
This function obtains the detailed information on a particular media file playing currently at the TG...
bt_status_t bt_avrcp_register_notification(uint32_t handle, bt_avrcp_event_t event_id, uint32_t play_back_interval)
This function sends a register notification command to the TG device.
The struct of BT_AVRCP_EVENT_NOTIFICATION_IND.
Definition: bt_avrcp.h:643
bt_status_t bt_avrcp_set_app_setting_value(uint32_t handle, uint16_t attribute_size, bt_avrcp_app_setting_value_t *attribute_value_list)
This function sets the player application setting values to specified attribute ID at the TG device...
First or only metadata packet.
Definition: bt_avrcp.h:336
bt_status_t bt_avrcp_send_capability_response(uint32_t handle, void *response_data_t, bt_avrcp_capability_types_t type)
This function sends device/profile capability to the remote device.
void bt_avrcp_init(bt_avrcp_init_struct *bt_role)
This function initializes the AVRCP context with CT or Target role.
The struct of BT_AVRCP_ABORT_CONTINUING_CNF.
Definition: bt_avrcp.h:678
Continuation request, to continue transferring packets.
Definition: bt_avrcp.h:337
uint8_t bt_avrcp_event_t
The event type of register notification.
Definition: bt_avrcp.h:374
The struct of BT_AVRCP_GET_APP_SETTING_VALUE_CNF.
Definition: bt_avrcp.h:560
uint8_t bt_avrcp_status_t
The event type of register notification.
Definition: bt_avrcp.h:406
bt_status_t bt_avrcp_list_app_setting_attributes(uint32_t handle)
This function gets player application attributes supported at TG device.
uint16_t bt_avrcp_metadata_packet_type_t
The packet type to indicate the packet fragmentation state.
Definition: bt_avrcp.h:329
uint8_t bt_avrcp_operation_state_t
The key state type of the operation.
Definition: bt_avrcp.h:319
uint8_t bt_avrcp_operation_id_t
The operation ID type.
Definition: bt_avrcp.h:295
bt_status_t bt_avrcp_connect(uint32_t *handle, const bt_bd_addr_t *address)
This function connects to the specified remote device.
bt_avrcp_pass_through_cnf_t bt_avrcp_pass_through_command_ind_t
The struct for #BT_AVRCP_PASS_THROUGH_CMD.
Definition: bt_avrcp.h:502
bt_status_t bt_avrcp_disconnect(uint32_t handle)
This function disconnects the specified remote device.
bt_avrcp_continuation_data_req_type
Definition: bt_avrcp.h:334
The error structure of all metadata commands when the status of corresponding response is not BT_STAT...
Definition: bt_avrcp.h:698
Definition: bt_avrcp.h:461
uint8_t bt_avrcp_pdu_id_t
The type of the PDU ID.
Definition: bt_avrcp.h:422
The struct of sending register notification response parameters.
Definition: bt_avrcp.h:706
The struct of BT_AVRCP_REGISTER_NOTIFICATION_IND.
Definition: bt_avrcp.h:659
The struct of BT_AVRCP_GET_PLAY_STATUS_NOTIFICATION_IND.
Definition: bt_avrcp.h:670
The struct of player application setting value, with attribute ID and the corresponding value...
Definition: bt_avrcp.h:520
bt_status_t bt_avrcp_request_continuing_response(uint32_t handle, bt_avrcp_pdu_id_t pdu_id)
This function requests TG device to send continuing response packet for current PDU command...
The struct of response data format for BT_AVRCP_EVENT_PLAYER_APP_SETTING_CHANGED. ...
Definition: bt_avrcp.h:635
The struct for BT_AVRCP_CONNECT_CNF.
Definition: bt_avrcp.h:469
uint32_t bt_avrcp_media_attribute_t
The type of media attributes IDs.
Definition: bt_avrcp.h:355
bt_status_t bt_avrcp_send_abort_data_response(uint32_t handle)
This function sends response for the abort continuation pdu.
Indication type, to delete the pending PDU data .
Definition: bt_avrcp.h:338
The parameter of bt_avrcp_get_app_setting_value.
Definition: bt_avrcp.h:511
bt_status_t bt_avrcp_get_app_setting_value(uint32_t handle, uint16_t attribute_size, bt_avrcp_get_app_setting_value_t *attribute_list)
This function gets the player application setting values for specified attribute ID at the TG device...
The struct of BT_AVRCP_SET_APP_SETTING_VALUE_CNF.
Definition: bt_avrcp.h:577
The struct of BT_AVRCP_GET_ELEMENT_ATTRIBUTES_CNF.
Definition: bt_avrcp.h:617
bt_avrcp_connect_cnf_t bt_avrcp_disconnect_ind_t
The struct for BT_AVRCP_DISCONNECT_IND.
Definition: bt_avrcp.h:487
The struct for BT_AVRCP_PASS_THROUGH_CNF.
Definition: bt_avrcp.h:492
bt_status_t bt_avrcp_element_metadata_attributes_response(uint32_t handle, bt_avrcp_get_element_attributes_response_t *rsp_data)
This function provides metadata attributes to the remote device for some specific element(s)...
uint8_t bt_bd_addr_t[6]
Address type, defined in Bluetooth core specification version 4.2.
Definition: bt_type.h:180
int32_t bt_status_t
Define the status type, returned from the APIs, and defined as BT_STATUS_XXX.
Definition: bt_type.h:173
bt_status_t bt_avrcp_send_set_absoulte_volume_response(uint32_t handle, uint8_t volume)
This function sends the response after receiving set absolute volume command from CT device...
uint8_t bt_avrcp_media_play_status_event_t
The event type of register notification.
Definition: bt_avrcp.h:438
bt_avrcp_set_absolute_volume_response_t bt_avrcp_set_absolute_volume_event_t
The struct BT_AVRCP_SET_ABSOLUTE_VOLUME_COMMAND_IND.
Definition: bt_avrcp.h:693
bt_status_t bt_avrcp_set_absolute_volume(uint32_t handle, uint8_t volume)
This function sets the volume in percentage for the rendering device.
bt_status_t bt_avrcp_media_send_play_status_response(uint32_t handle, bt_avrcp_media_play_status_notification_t *data)
This function sends notification to the remote device for currenct status of playing media...
The parameter of bt_avrcp_get_element_attributes.
Definition: bt_avrcp.h:530
The struct of BT_AVRCP_LIST_APP_SETTING_ATTRIBUTES_CNF.
Definition: bt_avrcp.h:543
bt_status_t bt_avrcp_connect_response(uint32_t handle, bool accept)
This function responds to the specified remote device's incoming connection.
The struct of BT_AVRCP_ELEMENT_METADATA_IND.
Definition: bt_avrcp.h:585
The struct of BT_AVRCP_SET_ABSOLUTE_VOLUME_CNF.
Definition: bt_avrcp.h:685
void bt_avrcp_deinit(void)
This function removes the role from the AVRCP context.
The struct for BT_AVRCP_CONNECT_IND.
Definition: bt_avrcp.h:477
bt_status_t bt_avrcp_abort_continuing_response(uint32_t handle, bt_avrcp_pdu_id_t pdu_id)
This function requests TG device to abort continuing response packet for current PDU command...
bt_status_t bt_avrcp_send_pass_through_command(uint32_t handle, bt_avrcp_operation_id_t op_id, bt_avrcp_operation_state_t op_state)
This function sends pass through command to the specified TG device.
bt_status_t bt_avrcp_send_pass_through_response(uint32_t handle, bt_avrcp_response_t response, bt_avrcp_operation_id_t op_id, bt_avrcp_operation_state_t op_state)
This function sends pass through response after receiving pass through command from the remote CT dev...
The struct to list player application setting attribute.
Definition: bt_avrcp.h:538
bt_status_t bt_avrcp_send_register_notification_response(uint32_t handle, bt_avrcp_send_register_notification_response_t *rsp_data)
This function sends the register notification response to the CT device.