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

Commit 29006110 authored by Hansong Zhang's avatar Hansong Zhang
Browse files

AVRC_BR uses the same mtu

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I4a22ec350f1feff0c443dd411e223f6a58a5b282
parent 77d0494d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -122,9 +122,9 @@ void bta_ar_avdt_conn(tBTA_SYS_ID sys_id, const RawAddress& bd_addr,
 * Returns          void
 *
 ******************************************************************************/
void bta_ar_reg_avct(uint16_t mtu_br) {
void bta_ar_reg_avct() {
  if (bta_ar_cb.avct_registered == 0) {
    AVCT_Register(mtu_br);
    AVCT_Register();
  }
  bta_ar_cb.avct_registered |= BTA_AR_AV_MASK;
}
+0 −8
Original line number Diff line number Diff line
@@ -124,15 +124,9 @@ const uint8_t bta_av_meta_caps_evt_ids_avrcp13[] = {
   sizeof(bta_av_meta_caps_evt_ids_avrcp13[0]))
#endif /* BTA_AVK_NUM_RC_EVT_IDS_AVRCP13 */

/* the MTU for the AVRCP browsing channel */
#ifndef BTA_AV_MAX_RC_BR_MTU
#define BTA_AV_MAX_RC_BR_MTU 1008
#endif

/* This configuration to be used when we are Src + TG + CT( only for abs vol) */
const tBTA_AV_CFG bta_av_cfg = {
    BTA_AV_RC_COMP_ID,     /* AVRCP Company ID */
    BTA_AV_MAX_RC_BR_MTU,  /* AVRCP MTU at L2CAP for browsing channel */
    BTA_AV_RC_SUPF_CT,     /* AVRCP controller categories */
    BTA_AV_RC_SUPF_TG,     /* AVRCP target categories */
    672,                   /* AVDTP signaling channel MTU at L2CAP */
@@ -157,7 +151,6 @@ const tBTA_AV_CFG bta_av_cfg = {
 */
const tBTA_AV_CFG bta_avk_cfg = {
    AVRC_CO_METADATA,      /* AVRCP Company ID */
    BTA_AV_MAX_RC_BR_MTU,  /* AVRCP MTU at L2CAP for browsing channel */
    BTA_AVK_RC_SUPF_CT,    /* AVRCP controller categories */
    BTA_AVK_RC_SUPF_TG,    /* AVRCP target categories */
    672,                   /* AVDTP signaling channel MTU at L2CAP */
@@ -180,7 +173,6 @@ const tBTA_AV_CFG bta_avk_cfg = {
/* This configuration to be used when we are using AVRCP1.3 */
const tBTA_AV_CFG bta_av_cfg_compatibility = {
    BTA_AV_RC_COMP_ID,     /* AVRCP Company ID */
    BTA_AV_MAX_RC_BR_MTU,  /* AVRCP MTU at L2CAP for browsing channel */
    BTA_AV_RC_SUPF_CT,     /* AVRCP controller categories */
    AVRC_SUPF_TG_CAT1,     /* Only support CAT1 for AVRCP1.3 */
    672,                   /* AVDTP signaling channel MTU at L2CAP */
+2 −2
Original line number Diff line number Diff line
@@ -472,7 +472,7 @@ static void bta_av_api_register(tBTA_AV_DATA* p_data) {
      if (bta_av_cb.features & (BTA_AV_FEAT_RCTG)) {
        /* register with no authorization; let AVDTP use authorization instead
         */
        bta_ar_reg_avct(p_bta_av_cfg->avrc_br_mtu);
        bta_ar_reg_avct();

        /* For the Audio Sink role we support additional TG to support
         * absolute volume.
@@ -619,7 +619,7 @@ static void bta_av_api_register(tBTA_AV_DATA* p_data) {
      if (bta_av_cb.features & (BTA_AV_FEAT_RCCT)) {
        /* if TG is not supported, we need to register to AVCT now */
        if ((bta_av_cb.features & (BTA_AV_FEAT_RCTG)) == 0) {
          bta_ar_reg_avct(p_bta_av_cfg->avrc_br_mtu);
          bta_ar_reg_avct();
          bta_av_rc_create(&bta_av_cb, AVCT_ACP, 0, BTA_AV_NUM_LINKS + 1);
        }
        /* create an SDP record as AVRC CT. We create 1.3 for SOURCE
+1 −1
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ extern void bta_ar_avdt_conn(tBTA_SYS_ID sys_id, const RawAddress& bd_addr,
 * Returns          void
 *
 ******************************************************************************/
extern void bta_ar_reg_avct(uint16_t mtu_br);
extern void bta_ar_reg_avct();

/*******************************************************************************
 *
+0 −1
Original line number Diff line number Diff line
@@ -376,7 +376,6 @@ typedef void (*tBTA_AV_ACT)(tBTA_AV_SCB* p_cb, tBTA_AV_DATA* p_data);
/* AV configuration structure */
typedef struct {
  uint32_t company_id;  /* AVRCP Company ID */
  uint16_t avrc_br_mtu; /* AVRCP MTU at L2CAP for browsing channel */
  uint16_t avrc_ct_cat; /* AVRCP controller categories */
  uint16_t avrc_tg_cat; /* AVRCP target categories */
  uint16_t sig_mtu;     /* AVDTP signaling channel MTU at L2CAP */
Loading