Audio ADA
概述
Audio ADA(以下简称 ADA)是dump RX-DFE、TX-DFE、meter adc 内部指定节点数据的硬件模块
功能特性
ADA 支持如下特性:
支持dump RX-DFE、TX-DFE、meter adc 内部指定节点数据
支持DMA或总线方式dump数据到指定内存
ADA 与其它模块的连接关系如下图所示。
ADA 与其它模块连接示意图
API 介绍
-
struct wq_ada_rx_dfe_param
-
struct wq_ada_tx_dfe_param
-
struct wq_ada_dump_param
Public Members
-
union wq_ada_dump_param::wq_ada_module_param _module
-
uint8_t *dump_buffer
-
uint32_t buffer_length
-
union wq_ada_module_param
Public Members
-
wq_ada_rx_dfe_param_t rx_dfe
-
wq_ada_tx_dfe_param_t tx_dfe
-
wq_ada_mdfe_param_t mdfe
-
wq_ada_rx_dfe_param_t rx_dfe
-
union wq_ada_dump_param::wq_ada_module_param _module
Typedefs
-
typedef enum _WQ_ADA_TRIGGER_SRC WQ_ADA_TRIGGER_SRC
For specific definitions, please refer to the header file wq_audio_resource.h.
-
typedef enum _WQ_ADA_DUMP_MODULE WQ_ADA_DUMP_MODULE
For specific definitions, please refer to the header file wq_audio_resource.h.
-
typedef void (*ada_dump_callback)(uint8_t *buffer, uint32_t length)
Audio ADA dump irq callback.
-
typedef struct wq_ada_rx_dfe_param wq_ada_rx_dfe_param_t
For specific definitions, please refer to the header file wq_ada.h.
-
typedef struct wq_ada_tx_dfe_param wq_ada_tx_dfe_param_t
For specific definitions, please refer to the header file wq_ada.h.
-
typedef struct wq_ada_mdfe_param wq_ada_mdfe_param_t
For specific definitions, please refer to the header file wq_ada.h.
-
typedef struct wq_ada_dump_param wq_ada_dump_param_t
For specific definitions, please refer to the header file wq_ada.h.
Functions
-
void wq_ada_init(void)
This function is to init ADA module.
-
void wq_ada_clk_enable(void)
This function is to enable ADA module's clock.
-
void wq_ada_irq_config(void)
This function is to configure ADA module's IRQ.
-
WQ_RET wq_ada_prepare_dma(void)
This function is to prepare for ADA module's DMA.
- 返回:
WQ_RET_OK - success, other - failed
-
bool wq_ada_get_dump_complete(void)
This function is to get dump done flag.
- 返回:
bool
-
void wq_ada_dump_src_link(WQ_ADA_TRIGGER_SRC src)
This function is to set DMA's src.
- 参数:
src -- is DMA's src
-
WQ_RET wq_ada_pull_set(char *dst, uint32_t size, wq_dma_peri_done_cb cb)
This function is to set DMA's parameter and callback.
- 参数:
dst -- is DMA dst buffer.
size -- is DMA size
cb -- is DMA complete's callback
- 返回:
WQ_RET_OK - success, other - failed
-
WQ_RET wq_ada_dump_config(WQ_ADA_DUMP_MODULE module, const wq_ada_dump_param_t *param)
This function is to configure ADA module's dump parameters.
- 参数:
module -- is ADA dump ID
param -- is ADA dump parameter
- 返回:
WQ_RET_OK - success, other - failed
-
void wq_ada_read_data_polling(void)
This function is to read data with polling.
-
void wq_ada_read_data_int(void)
This function is to read data with interrupt.