* Returns void
*
******************************************************************************/
-void bta_ar_reg_avct(uint16_t mtu, uint16_t mtu_br) {
+void bta_ar_reg_avct(uint16_t mtu_br) {
if (bta_ar_cb.avct_registered == 0) {
- AVCT_Register(mtu, mtu_br);
+ AVCT_Register(mtu_br);
}
bta_ar_cb.avct_registered |= BTA_AR_AV_MASK;
}
if (bta_av_cb.features & (BTA_AV_FEAT_RCTG)) {
/* register with no authorization; let AVDTP use authorization instead
*/
- bta_ar_reg_avct(kAvrcMtu, p_bta_av_cfg->avrc_br_mtu);
+ bta_ar_reg_avct(p_bta_av_cfg->avrc_br_mtu);
/* For the Audio Sink role we support additional TG to support
* absolute volume.
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(kAvrcMtu, p_bta_av_cfg->avrc_br_mtu);
+ bta_ar_reg_avct(p_bta_av_cfg->avrc_br_mtu);
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
* Returns void
*
******************************************************************************/
-extern void bta_ar_reg_avct(uint16_t mtu, uint16_t mtu_br);
+extern void bta_ar_reg_avct(uint16_t mtu_br);
/*******************************************************************************
*
union tBTA_AV_DATA;
typedef void (*tBTA_AV_ACT)(tBTA_AV_SCB* p_cb, tBTA_AV_DATA* p_data);
-constexpr uint16_t kAvrcMtu = 512; /* AVRCP MTU at L2CAP for control channel */
-
/* AV configuration structure */
typedef struct {
uint32_t company_id; /* AVRCP Company ID */
* Returns void
*
******************************************************************************/
-void AVCT_Register(uint16_t mtu, UNUSED_ATTR uint16_t mtu_br) {
+void AVCT_Register(uint16_t mtu_br) {
AVCT_TRACE_API("AVCT_Register");
/* initialize AVCTP data structures */
memset(&avct_cb, 0, sizeof(tAVCT_CB));
- if (mtu < AVCT_MIN_CONTROL_MTU) mtu = AVCT_MIN_CONTROL_MTU;
- /* store mtu */
- avct_cb.mtu = mtu;
-
/* register PSM with L2CAP */
L2CA_Register2(AVCT_PSM, avct_l2c_appl, true /* enable_snoop */, nullptr,
- avct_cb.mtu, BTA_SEC_AUTHENTICATE);
+ kAvrcMtu, BTA_SEC_AUTHENTICATE);
/* Include the browsing channel which uses eFCR */
tL2CAP_ERTM_INFO ertm_info;
tAVCT_LCB lcb[AVCT_NUM_LINKS]; /* link control blocks */
tAVCT_BCB bcb[AVCT_NUM_LINKS]; /* browse control blocks */
tAVCT_CCB ccb[AVCT_NUM_CONN]; /* connection control blocks */
- uint16_t mtu; /* our L2CAP MTU */
uint16_t mtu_br; /* our L2CAP MTU for the Browsing channel */
uint8_t trace_level; /* trace level */
} tAVCT_CB;
void avct_l2c_disconnect(uint16_t lcid, uint16_t result);
void avct_l2c_br_disconnect(uint16_t lcid, uint16_t result);
+constexpr uint16_t kAvrcMtu = 512;
#endif /* AVCT_INT_H */
/* Send L2CAP config req */
memset(&cfg, 0, sizeof(tL2CAP_CFG_INFO));
cfg.mtu_present = true;
- cfg.mtu = avct_cb.mtu;
+ cfg.mtu = kAvrcMtu;
L2CA_ConfigReq(lcid, &cfg);
AVCT_TRACE_DEBUG("avct_l2c snd Cfg Req");
}
/* Send L2CAP config req */
memset(&cfg, 0, sizeof(tL2CAP_CFG_INFO));
cfg.mtu_present = true;
- cfg.mtu = avct_cb.mtu;
+ cfg.mtu = kAvrcMtu;
L2CA_ConfigReq(lcid, &cfg);
AVCT_TRACE_DEBUG("avct_l2c snd Cfg Req");
}
* Returns void
*
******************************************************************************/
-extern void AVCT_Register(uint16_t mtu, uint16_t mtu_br);
+extern void AVCT_Register(uint16_t mtu_br);
/*******************************************************************************
*