avdt_scb_free_pkt,
avdt_scb_clr_pkt,
avdt_scb_chk_snd_pkt,
- avdt_scb_tc_timer,
+ avdt_scb_transport_channel_timer,
avdt_scb_clr_vars,
avdt_scb_dealloc
};
{
if (!p_scb->allocated)
{
- fixed_queue_free(p_scb->frag_q, NULL);
memset(p_scb,0,sizeof(tAVDT_SCB));
p_scb->allocated = TRUE;
p_scb->p_ccb = NULL;
- /* initialize sink as activated */
- if (p_cs->tsep == AVDT_TSEP_SNK)
- {
- p_scb->sink_activated = TRUE;
- }
-
memcpy(&p_scb->cs, p_cs, sizeof(tAVDT_CS));
#if AVDT_MULTIPLEXING == TRUE
/* initialize fragments gueue */
#endif
}
#endif
- p_scb->timer_entry.param = p_scb;
+ p_scb->transport_channel_timer =
+ alarm_new("avdt_scb.transport_channel_timer");
AVDT_TRACE_DEBUG("avdt_scb_alloc hdl=%d, psc_mask:0x%x", i+1, p_cs->cfg.psc_mask);
break;
}
*******************************************************************************/
void avdt_scb_dealloc(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data)
{
-#if AVDT_MULTIPLEXING == TRUE
- void *p_buf;
-#endif
UNUSED(p_data);
AVDT_TRACE_DEBUG("avdt_scb_dealloc hdl=%d", avdt_scb_to_hdl(p_scb));
- btu_stop_timer(&p_scb->timer_entry);
+ alarm_free(p_scb->transport_channel_timer);
#if AVDT_MULTIPLEXING == TRUE
/* free fragments we're holding, if any; it shouldn't happen */
- while ((p_buf = fixed_queue_try_dequeue(p_scb->frag_q)) != NULL)
- osi_freebuf(p_buf);
- fixed_queue_free(p_scb->frag_q, NULL);
+ fixed_queue_free(p_scb->frag_q, osi_free);
#endif
memset(p_scb, 0, sizeof(tAVDT_SCB));