/******************************************************************************* ** ** Function bta_av_chk_start ** ** Description if this is audio channel, check if more than one audio ** channel is connected & already started. ** ** Returns TRUE, if need api_start ** *******************************************************************************/ BOOLEAN bta_av_chk_start(tBTA_AV_SCB *p_scb) { BOOLEAN start = FALSE; tBTA_AV_SCB *p_scbi; int i; if(p_scb->chnl == BTA_AV_CHNL_AUDIO) { if ((bta_av_cb.audio_open_cnt >= 2) && ((0 == (p_scb->role & BTA_AV_ROLE_AD_ACP)) || /* Outgoing connection or */ (bta_av_cb.features & BTA_AV_FEAT_ACP_START))) /* auto-starting option */ { /* more than one audio channel is connected */ /* if this is the 2nd stream as ACP, give INT a chance to issue the START command */ for(i=0; i<BTA_AV_NUM_STRS; i++) { p_scbi = bta_av_cb.p_scb[i]; if(p_scbi && p_scbi->chnl == BTA_AV_CHNL_AUDIO && p_scbi->co_started) { start = TRUE; /* may need to update the flush timeout of this already started stream */ if(p_scbi->co_started != bta_av_cb.audio_open_cnt) { p_scbi->co_started = bta_av_cb.audio_open_cnt; L2CA_SetFlushTimeout(p_scbi->peer_addr, p_bta_av_cfg->p_audio_flush_to[p_scbi->co_started - 1] ); } } } } } return start; }
static BOOLEAN L2cap_SetFlushTimeout (BD_ADDR bd_addr, UINT16 flush_tout) { BTIF_TRACE_DEBUG("L2cap_SetFlushTimeout:: Invoked"); return L2CA_SetFlushTimeout (bd_addr, flush_tout); }