diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2017-08-01 07:59:36 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2017-08-01 07:59:36 +0000 |
commit | 3568ed17b53f30321e6ec13436e009a2e08390af (patch) | |
tree | 3e3b9544e9427e93d479d35c900b9ea518340629 | |
parent | 60a5b95359778b20e77fe037d61e2a5176fed115 (diff) | |
parent | d45e7eacb539fe35a9189342a045b64feac2a7c1 (diff) | |
download | android_system_bt-3568ed17b53f30321e6ec13436e009a2e08390af.tar.gz android_system_bt-3568ed17b53f30321e6ec13436e009a2e08390af.tar.bz2 android_system_bt-3568ed17b53f30321e6ec13436e009a2e08390af.zip |
Merge "Use the correct AVDTP version-specific features" into oc-dr1-dev
-rw-r--r-- | bta/av/bta_av_aact.cc | 5 | ||||
-rw-r--r-- | stack/a2dp/a2dp_api.cc | 2 | ||||
-rw-r--r-- | stack/include/a2dp_api.h | 11 | ||||
-rw-r--r-- | stack/include/avdt_api.h | 2 |
4 files changed, 17 insertions, 3 deletions
diff --git a/bta/av/bta_av_aact.cc b/bta/av/bta_av_aact.cc index acc4c2c5f..2b94e2bd6 100644 --- a/bta/av/bta_av_aact.cc +++ b/bta/av/bta_av_aact.cc @@ -387,7 +387,8 @@ static bool bta_av_next_getcap(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) { /* we got a stream; get its capabilities */ if (p_scb->p_cap == NULL) p_scb->p_cap = (tAVDT_CFG*)osi_malloc(sizeof(tAVDT_CFG)); - if (p_scb->avdt_version >= AVDT_VERSION_SYNC) { + if ((p_scb->avdt_version >= AVDT_VERSION_1_3) && + (A2DP_GetAvdtpVersion() >= AVDT_VERSION_1_3)) { p_req = AVDT_GetAllCapReq; } else { p_req = AVDT_GetCapReq; @@ -1264,7 +1265,7 @@ void bta_av_setconfig_rsp(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) { p_scb->num_seps = num; if (p_scb->cur_psc_mask & AVDT_PSC_DELAY_RPT) - p_scb->avdt_version = AVDT_VERSION_SYNC; + p_scb->avdt_version = AVDT_VERSION_1_3; if (A2DP_GetCodecType(p_scb->cfg.codec_info) == A2DP_MEDIA_CT_SBC || num > 1) { diff --git a/stack/a2dp/a2dp_api.cc b/stack/a2dp/a2dp_api.cc index a52924a02..11d3bf2cb 100644 --- a/stack/a2dp/a2dp_api.cc +++ b/stack/a2dp/a2dp_api.cc @@ -377,3 +377,5 @@ void A2DP_Init(void) { a2dp_cb.trace_level = BT_TRACE_LEVEL_NONE; #endif } + +uint16_t A2DP_GetAvdtpVersion() { return a2dp_cb.avdt_sdp_ver; } diff --git a/stack/include/a2dp_api.h b/stack/include/a2dp_api.h index c4ab73709..15d30d870 100644 --- a/stack/include/a2dp_api.h +++ b/stack/include/a2dp_api.h @@ -162,6 +162,17 @@ extern tA2DP_STATUS A2DP_FindService(uint16_t service_uuid, BD_ADDR bd_addr, /****************************************************************************** * + * Function A2DP_GetAvdtpVersion() + * + * Description Gets the local version of AVDTP + * + * Returns The local version of AVDTP. + * + *****************************************************************************/ +extern uint16_t A2DP_GetAvdtpVersion(void); + +/****************************************************************************** + * * Function A2DP_SetTraceLevel * * Description Sets the trace level for A2D. If 0xff is passed, the diff --git a/stack/include/avdt_api.h b/stack/include/avdt_api.h index 24108bc0e..aaee2daa7 100644 --- a/stack/include/avdt_api.h +++ b/stack/include/avdt_api.h @@ -34,7 +34,7 @@ #ifndef AVDT_VERSION #define AVDT_VERSION 0x0102 #endif -#define AVDT_VERSION_SYNC 0x0103 +#define AVDT_VERSION_1_3 0x0103 /* Maximum size in bytes of the codec capabilities information element. */ #define AVDT_CODEC_SIZE 20 |