mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
change(bt/bluedroid): Change AVRCP version according to feature enabled
- Version will be set to 1.6 if Cover Art feature enabled - Otherwise, version will be set to 1.5
This commit is contained in:
@@ -98,7 +98,9 @@ menu "AVRCP Features"
|
|||||||
default y
|
default y
|
||||||
select BT_GOEPC_ENABLED
|
select BT_GOEPC_ENABLED
|
||||||
help
|
help
|
||||||
This enable Cover Art feature of AVRCP CT role
|
This enable Cover Art feature for AVRCP CT role, Cover Art requires AVRCP
|
||||||
|
version 1.6 or higher. Therefore, if the Cover Art feature is enabled,
|
||||||
|
AVRCP version will set to 1.6, otherwise, it will remain at 1.5
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
|
|||||||
@@ -29,8 +29,14 @@
|
|||||||
|
|
||||||
#if (defined(AVRC_INCLUDED) && AVRC_INCLUDED == TRUE)
|
#if (defined(AVRC_INCLUDED) && AVRC_INCLUDED == TRUE)
|
||||||
|
|
||||||
#ifndef SDP_AVRCP_1_6
|
#if AVRC_CA_INCLUDED == TRUE
|
||||||
|
/* If Cover Art feature is enabled, set AVRCP version to 1.6 */
|
||||||
#define SDP_AVRCP_1_6 TRUE
|
#define SDP_AVRCP_1_6 TRUE
|
||||||
|
#define SDP_AVRCP_1_5 FALSE
|
||||||
|
#else
|
||||||
|
/* Otherwise, set to 1.5 */
|
||||||
|
#define SDP_AVRCP_1_6 FALSE
|
||||||
|
#define SDP_AVRCP_1_5 TRUE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef SDP_AVCTP_1_4
|
#ifndef SDP_AVCTP_1_4
|
||||||
@@ -52,7 +58,7 @@ const tSDP_PROTOCOL_ELEM avrc_proto_list [] = {
|
|||||||
#if SDP_AVCTP_1_4 == TRUE
|
#if SDP_AVCTP_1_4 == TRUE
|
||||||
{UUID_PROTOCOL_AVCTP, 1, {AVCT_REV_1_4, 0} }
|
{UUID_PROTOCOL_AVCTP, 1, {AVCT_REV_1_4, 0} }
|
||||||
#else
|
#else
|
||||||
#if SDP_AVRCP_1_6 == TRUE
|
#if (SDP_AVRCP_1_5 == TRUE || SDP_AVRCP_1_6 == TRUE)
|
||||||
{UUID_PROTOCOL_AVCTP, 1, {AVCT_REV_1_3, 0} }
|
{UUID_PROTOCOL_AVCTP, 1, {AVCT_REV_1_3, 0} }
|
||||||
#else
|
#else
|
||||||
#if AVRC_METADATA_INCLUDED == TRUE
|
#if AVRC_METADATA_INCLUDED == TRUE
|
||||||
@@ -64,7 +70,7 @@ const tSDP_PROTOCOL_ELEM avrc_proto_list [] = {
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#if SDP_AVRCP_1_6 == TRUE
|
#if (SDP_AVRCP_1_5 == TRUE || SDP_AVRCP_1_6 == TRUE)
|
||||||
const tSDP_PROTO_LIST_ELEM avrc_add_proto_list [] = {
|
const tSDP_PROTO_LIST_ELEM avrc_add_proto_list [] = {
|
||||||
{
|
{
|
||||||
AVRC_NUM_PROTO_ELEMS,
|
AVRC_NUM_PROTO_ELEMS,
|
||||||
@@ -251,7 +257,7 @@ UINT16 AVRC_AddRecord(UINT16 service_uuid, char *p_service_name, char *p_provide
|
|||||||
|
|
||||||
/* add service class id list */
|
/* add service class id list */
|
||||||
class_list[0] = service_uuid;
|
class_list[0] = service_uuid;
|
||||||
#if (SDP_AVCTP_1_4 == TRUE || SDP_AVRCP_1_6 == TRUE)
|
#if (SDP_AVCTP_1_4 == TRUE || SDP_AVRCP_1_5 == TRUE || SDP_AVRCP_1_6 == TRUE)
|
||||||
if ( service_uuid == UUID_SERVCLASS_AV_REMOTE_CONTROL ) {
|
if ( service_uuid == UUID_SERVCLASS_AV_REMOTE_CONTROL ) {
|
||||||
class_list[1] = UUID_SERVCLASS_AV_REM_CTRL_CONTROL;
|
class_list[1] = UUID_SERVCLASS_AV_REM_CTRL_CONTROL;
|
||||||
count = 2;
|
count = 2;
|
||||||
@@ -263,7 +269,7 @@ UINT16 AVRC_AddRecord(UINT16 service_uuid, char *p_service_name, char *p_provide
|
|||||||
result &= SDP_AddProtocolList(sdp_handle, AVRC_NUM_PROTO_ELEMS, (tSDP_PROTOCOL_ELEM *)avrc_proto_list);
|
result &= SDP_AddProtocolList(sdp_handle, AVRC_NUM_PROTO_ELEMS, (tSDP_PROTOCOL_ELEM *)avrc_proto_list);
|
||||||
|
|
||||||
/* add profile descriptor list */
|
/* add profile descriptor list */
|
||||||
#if SDP_AVRCP_1_6 == TRUE
|
#if (SDP_AVRCP_1_5 == TRUE || SDP_AVRCP_1_6 == TRUE)
|
||||||
if (browsing_en) {
|
if (browsing_en) {
|
||||||
add_additional_protocol_list = TRUE;
|
add_additional_protocol_list = TRUE;
|
||||||
} else if (service_uuid == UUID_SERVCLASS_AV_REM_CTRL_TARGET &&
|
} else if (service_uuid == UUID_SERVCLASS_AV_REM_CTRL_TARGET &&
|
||||||
@@ -277,7 +283,11 @@ UINT16 AVRC_AddRecord(UINT16 service_uuid, char *p_service_name, char *p_provide
|
|||||||
result &= SDP_AddAdditionProtoLists( sdp_handle, 1, (tSDP_PROTO_LIST_ELEM *)avrc_add_proto_list);
|
result &= SDP_AddAdditionProtoLists( sdp_handle, 1, (tSDP_PROTO_LIST_ELEM *)avrc_add_proto_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if SDP_AVRCP_1_5 == TRUE
|
||||||
|
result &= SDP_AddProfileDescriptorList(sdp_handle, UUID_SERVCLASS_AV_REMOTE_CONTROL, AVRC_REV_1_5);
|
||||||
|
#elif SDP_AVRCP_1_6 == TRUE
|
||||||
result &= SDP_AddProfileDescriptorList(sdp_handle, UUID_SERVCLASS_AV_REMOTE_CONTROL, AVRC_REV_1_6);
|
result &= SDP_AddProfileDescriptorList(sdp_handle, UUID_SERVCLASS_AV_REMOTE_CONTROL, AVRC_REV_1_6);
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#if AVRC_METADATA_INCLUDED == TRUE
|
#if AVRC_METADATA_INCLUDED == TRUE
|
||||||
result &= SDP_AddProfileDescriptorList(sdp_handle, UUID_SERVCLASS_AV_REMOTE_CONTROL, AVRC_REV_1_3);
|
result &= SDP_AddProfileDescriptorList(sdp_handle, UUID_SERVCLASS_AV_REMOTE_CONTROL, AVRC_REV_1_3);
|
||||||
|
|||||||
Reference in New Issue
Block a user