Lines Matching refs:p_ccb
367 void avdt_ccb_event(AvdtpCcb* p_ccb, uint8_t event, tAVDT_CCB_EVT* p_data) { in avdt_ccb_event() argument
374 avdt_ccb_to_idx(p_ccb), avdt_ccb_evt_str[event], in avdt_ccb_event()
375 avdt_ccb_st_str[p_ccb->state], p_ccb); in avdt_ccb_event()
379 state_table = avdt_ccb_st_tbl[p_ccb->state]; in avdt_ccb_event()
382 if (p_ccb->state != state_table[event][AVDT_CCB_NEXT_STATE]) { in avdt_ccb_event()
383 p_ccb->state = state_table[event][AVDT_CCB_NEXT_STATE]; in avdt_ccb_event()
390 avdt_ccb_evt_str[event], avdt_ccb_st_str[p_ccb->state], in avdt_ccb_event()
393 (*avdtp_cb.p_ccb_act[action])(p_ccb, p_data); in avdt_ccb_event()
411 AvdtpCcb* p_ccb = &avdtp_cb.ccb[0]; in avdt_ccb_by_bd() local
414 for (i = 0; i < AVDT_NUM_LINKS; i++, p_ccb++) { in avdt_ccb_by_bd()
416 if (p_ccb->allocated && p_ccb->peer_addr == bd_addr) { in avdt_ccb_by_bd()
423 p_ccb = NULL; in avdt_ccb_by_bd()
427 return p_ccb; in avdt_ccb_by_bd()
442 AvdtpCcb* p_ccb = &avdtp_cb.ccb[0]; in avdt_ccb_alloc() local
443 for (int i = 0; i < AVDT_NUM_LINKS; i++, p_ccb++) { in avdt_ccb_alloc()
444 if (!p_ccb->allocated) { in avdt_ccb_alloc()
445 p_ccb->Allocate(bd_addr); in avdt_ccb_alloc()
448 return p_ccb; in avdt_ccb_alloc()
464 AvdtpCcb* p_ccb = &avdtp_cb.ccb[channel_index]; in avdt_ccb_alloc_by_channel_index() local
465 if (p_ccb->allocated) { in avdt_ccb_alloc_by_channel_index()
470 p_ccb->Allocate(bd_addr); in avdt_ccb_alloc_by_channel_index()
472 channel_index, p_ccb->peer_addr.ToString().c_str(), p_ccb); in avdt_ccb_alloc_by_channel_index()
473 return p_ccb; in avdt_ccb_alloc_by_channel_index()
497 void avdt_ccb_dealloc(AvdtpCcb* p_ccb, UNUSED_ATTR tAVDT_CCB_EVT* p_data) { in avdt_ccb_dealloc() argument
499 avdt_ccb_to_idx(p_ccb), p_ccb->peer_addr.ToString().c_str(), in avdt_ccb_dealloc()
500 p_ccb); in avdt_ccb_dealloc()
501 p_ccb->ResetCcb(); in avdt_ccb_dealloc()
514 uint8_t avdt_ccb_to_idx(AvdtpCcb* p_ccb) { in avdt_ccb_to_idx() argument
516 return (uint8_t)(p_ccb - avdtp_cb.ccb); in avdt_ccb_to_idx()
530 AvdtpCcb* p_ccb; in avdt_ccb_by_idx() local
534 p_ccb = &avdtp_cb.ccb[idx]; in avdt_ccb_by_idx()
536 p_ccb = NULL; in avdt_ccb_by_idx()
539 return p_ccb; in avdt_ccb_by_idx()