Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 34ed9607 authored by Satish Kodishala's avatar Satish Kodishala Committed by android-build-merger
Browse files

Merge "Use the correct AVDTP version-specific features" into oc-dr1-dev

am: 95add6cc

Change-Id: Ic3ab9e63708b984377a6d2af3e1b72303cf5de88
parents 07bd2e30 95add6cc
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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;
@@ -1261,7 +1262,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) {
+2 −0
Original line number Diff line number Diff line
@@ -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; }
+11 −0
Original line number Diff line number Diff line
@@ -161,6 +161,17 @@ extern tA2DP_STATUS A2DP_FindService(uint16_t service_uuid,
                                     tA2DP_SDP_DB_PARAMS* p_db,
                                     tA2DP_FIND_CBACK* p_cback);

/******************************************************************************
 *
 * 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
+1 −1
Original line number Diff line number Diff line
@@ -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