FreeRTOS port on GAP8/RISC-V
|
Data Structures | |
struct | asrc_itf_data_s |
Functions | |
void | __pi_asrc_conf_init (struct pi_asrc_conf *conf) |
Init asrc configuration structure. More... | |
int32_t | __pi_asrc_open (struct pi_asrc_conf *conf, struct asrc_itf_data_s **device_data) |
Open asrc device. More... | |
void | __pi_asrc_close (struct asrc_itf_data_s *itf_data) |
Close asrc device. More... | |
int32_t | __pi_asrc_convert_async (struct asrc_itf_data_s *itf_data, void *src, void *dst, pi_task_t *task) |
Convert sample rate. More... | |
void __pi_asrc_close | ( | struct asrc_itf_data_s * | itf_data | ) |
asrc_id | ID of asrc interface. |
References asrc_itf_data_s::device_id, hal_udma_ctrl_cg_enable(), hal_udma_ctrl_reset_clear(), asrc_itf_data_s::nb_open, pi_fc_l1_free(), and UDMA_ASRC_ID.
Referenced by pi_asrc_close().
void __pi_asrc_conf_init | ( | struct pi_asrc_conf * | conf | ) |
conf | Pointer to asrc conf. |
Referenced by pi_asrc_conf_init().
int32_t __pi_asrc_convert_async | ( | struct asrc_itf_data_s * | itf_data, |
void * | src, | ||
void * | dst, | ||
pi_task_t * | task | ||
) |
itf_data | Pointer to driver data. |
src | Stream data source. |
dst | Stream data dest. |
task | Pointer to struct pi_task. |
References __pi_asrc_conversion_start(), pi_task_t::data, disable_irq(), asrc_itf_data_s::fifo_head, asrc_itf_data_s::fifo_tail, pi_task_t::next, and restore_irq().
Referenced by pi_asrc_convert_async().
int32_t __pi_asrc_open | ( | struct pi_asrc_conf * | conf, |
struct asrc_itf_data_s ** | device_data | ||
) |
conf | Pointer to asrc conf. |
device_data | Pointer to device data. |
0 | Operation is successful. |
ERRNO | Error code. |
References __pi_asrc_conf_apply(), ASRC_TRACE, ASRC_TRACE_ERR, asrc_itf_data_s::channels, asrc_itf_data_s::device_id, asrc_itf_data_s::fifo_head, asrc_itf_data_s::fifo_tail, asrc_itf_data_s::fs_in, asrc_itf_data_s::fs_out, hal_udma_ctrl_cg_disable(), hal_udma_ctrl_reset_set(), asrc_itf_data_s::lane_id, asrc_itf_data_s::nb_open, asrc_itf_data_s::options, pi_fc_l1_malloc(), udma_asrc, UDMA_ASRC_ID, and udma_ctrl.
Referenced by pi_asrc_open().