FreeRTOS port on GAP8/RISC-V
|
Functions | |
static int32_t | __pi_asrc_conf_apply (struct asrc_itf_data_s *itf_data) |
static void | __pi_asrc_conversion_start (struct asrc_itf_data_s *itf_data) |
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... | |
Variables | |
static struct asrc_itf_data_s * | g_asrc_itf_data [UDMA_NB_ASRC] |
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().
|
static |
References ASRC_NB_CHAN_PER_LANE, ASRC_NB_LANE, ASRC_TRACE, ASRC_TRACE_ERR, asrc_itf_data_s::channels, asrc_itf_data_s::ctrl_cfg, asrc_itf_data_s::device_id, asrc_itf_data_s::fs_in, asrc_itf_data_s::fs_out, hal_udma_asrc_ctrl_cfg_get(), hal_udma_asrc_ctrl_cfg_set(), hal_udma_asrc_lane_cfg_get(), hal_udma_asrc_lane_cfg_set(), asrc_itf_data_s::lane_id, offset, and asrc_itf_data_s::options.
Referenced by __pi_asrc_open().
void __pi_asrc_conf_init | ( | struct pi_asrc_conf * | conf | ) |
conf | Pointer to asrc conf. |
Referenced by pi_asrc_conf_init().
|
static |
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().
|
static |