Lines Matching refs:hdl
203 static isoal_status_t isoal_sink_allocate(isoal_sink_handle_t *hdl) in isoal_sink_allocate() argument
211 *hdl = i; in isoal_sink_allocate()
223 static void isoal_sink_deallocate(isoal_sink_handle_t hdl) in isoal_sink_deallocate() argument
225 if (hdl < ARRAY_SIZE(isoal_global.sink_allocated)) { in isoal_sink_deallocate()
226 isoal_global.sink_allocated[hdl] = ISOAL_ALLOC_STATE_FREE; in isoal_sink_deallocate()
231 if (hdl < ARRAY_SIZE(isoal_global.sink_state)) { in isoal_sink_deallocate()
232 (void)memset(&isoal_global.sink_state[hdl], 0, sizeof(struct isoal_sink)); in isoal_sink_deallocate()
270 isoal_sink_handle_t *hdl) in isoal_sink_create() argument
281 err = isoal_sink_allocate(hdl); in isoal_sink_create()
286 struct isoal_sink_session *session = &isoal_global.sink_state[*hdl].session; in isoal_sink_create()
371 void isoal_sink_enable(isoal_sink_handle_t hdl) in isoal_sink_enable() argument
373 if (hdl < ARRAY_SIZE(isoal_global.sink_state)) { in isoal_sink_enable()
375 memset(&isoal_global.sink_state[hdl].sdu_production, 0, in isoal_sink_enable()
376 sizeof(isoal_global.sink_state[hdl].sdu_production)); in isoal_sink_enable()
379 isoal_global.sink_state[hdl].sdu_production.mode = ISOAL_PRODUCTION_MODE_ENABLED; in isoal_sink_enable()
389 void isoal_sink_disable(isoal_sink_handle_t hdl) in isoal_sink_disable() argument
391 if (hdl < ARRAY_SIZE(isoal_global.sink_state)) { in isoal_sink_disable()
393 isoal_global.sink_state[hdl].sdu_production.mode = ISOAL_PRODUCTION_MODE_DISABLED; in isoal_sink_disable()
403 void isoal_sink_destroy(isoal_sink_handle_t hdl) in isoal_sink_destroy() argument
406 isoal_sink_disable(hdl); in isoal_sink_destroy()
409 isoal_sink_deallocate(hdl); in isoal_sink_destroy()
1434 static isoal_status_t isoal_source_allocate(isoal_source_handle_t *hdl) in isoal_source_allocate() argument
1442 *hdl = i; in isoal_source_allocate()
1454 static void isoal_source_deallocate(isoal_source_handle_t hdl) in isoal_source_deallocate() argument
1459 if (hdl < ARRAY_SIZE(isoal_global.source_state)) { in isoal_source_deallocate()
1460 source = &isoal_global.source_state[hdl]; in isoal_source_deallocate()
1477 if (hdl < ARRAY_SIZE(isoal_global.source_allocated)) { in isoal_source_deallocate()
1478 isoal_global.source_allocated[hdl] = ISOAL_ALLOC_STATE_FREE; in isoal_source_deallocate()
1491 static isoal_status_t isoal_check_source_hdl_valid(isoal_source_handle_t hdl) in isoal_check_source_hdl_valid() argument
1493 if (hdl < ARRAY_SIZE(isoal_global.source_allocated) && in isoal_check_source_hdl_valid()
1494 isoal_global.source_allocated[hdl] == ISOAL_ALLOC_STATE_TAKEN) { in isoal_check_source_hdl_valid()
1498 LOG_ERR("Invalid source handle (0x%02x)", hdl); in isoal_check_source_hdl_valid()
1539 isoal_source_handle_t *hdl) in isoal_source_create() argument
1544 err = isoal_source_allocate(hdl); in isoal_source_create()
1549 struct isoal_source_session *session = &isoal_global.source_state[*hdl].session; in isoal_source_create()
1587 void isoal_source_enable(isoal_source_handle_t hdl) in isoal_source_enable() argument
1589 if (hdl < ARRAY_SIZE(isoal_global.source_state)) { in isoal_source_enable()
1591 memset(&isoal_global.source_state[hdl].pdu_production, 0, in isoal_source_enable()
1592 sizeof(isoal_global.source_state[hdl].pdu_production)); in isoal_source_enable()
1595 isoal_global.source_state[hdl].pdu_production.mode = ISOAL_PRODUCTION_MODE_ENABLED; in isoal_source_enable()
1605 void isoal_source_disable(isoal_source_handle_t hdl) in isoal_source_disable() argument
1607 if (hdl < ARRAY_SIZE(isoal_global.source_state)) { in isoal_source_disable()
1609 isoal_global.source_state[hdl].pdu_production.mode = ISOAL_PRODUCTION_MODE_DISABLED; in isoal_source_disable()
1619 void isoal_source_destroy(isoal_source_handle_t hdl) in isoal_source_destroy() argument
1622 isoal_source_disable(hdl); in isoal_source_destroy()
1625 isoal_source_deallocate(hdl); in isoal_source_destroy()