AudSys
概述
AudSys 是一个管理音频外设的系统. 它提供了一种基于命令的调用方式, 操作用户创建的音频流. 抽象出3种音频模块: record 上行模块, playbk 下行模块以及ANC模块.
- 功能简介:
驱动管理
资源分配
时序控制
同步操作
杂音消除
转采样
频偏校准
啸叫检测
能量估计
饱和检测
增益控制
主动降噪
均衡器调整
语音检测等
模块功能特性
- record 模块支持以下功能:
支持 ADC PDM_rx I2S_rx VAD DUMP 等外设采样率配置, 频率率转换功能
支持 -95dB~95dB 数字音量调整, 支持 -6dB~-12dB 模拟 gain 调整
支持 Amic, Dmic 支持16bit和24bit位宽, 支持I2S_rx UAC_rx 16bit 24bit 位宽
支持 Amic, Dmic I2S_rx数据啸叫检测
支持 audio timer 定时触发 Amic, Dmic I2S_rx 数据启动, 精度 0.5us
支持 Amic 和 Dmic 混合开启
- playbk 模块支持以下功能:
支持 DAC, PDM_tx, I2S_tx通过ASRC转采样,调频偏
支持 -95dB~95dB 数字音量调整, 支持-19dB~-3dB模拟gain调整
支持 DAC, PDM_tx, 16bit,24bit位宽, 支持I2S_tx UAC_tx 16bit 24bit 位宽
支持 DAC, PDM_tx, I2S_tx 数据啸叫检测
支持 DAC, PDM_tx, I2S_tx 能量估计和饱和检测
支持 audio timer 定时触发DAC, I2S_tx数据启动, 精度 0.5us
支持 DAC spk PA(Power Amplifier)动态开关
支持 DAC spk DRE(Dynamic range enhancer)动态开关
支持 DAC, PDM_tx, I2S_tx 主辅两路数据硬件混合, 如 tone 和音乐混合
支持 DAC, PDM_tx, I2S_tx 混音主辅两路音量占比设置
支持 DAC, PDM_tx, I2S_tx 硬件EQ(均衡器)切换,每路数据支持28个 biquad 滤波器
- ANC 模块支持以下功能:
支持输入外设选择 Amic, Dmic 或混合Amic Dmic
支持输出外设选择 DAC spk
支持 -19dB~-3dB DAC spk 模拟 gain, 支持 -95dB~95dB 数字音量调整
支持 -6dB~-12dB Amic模拟 gain 固定调整
支持输入输出硬件数据啸叫检测
支持输入输出能量估计和饱和检测
支持输出 spk PA(Power Amplifier)动态开关
支持输出 spk DRE(Dynamic range enhancer)动态开关
支持灵活可配的 biquad 滤波器系数操控
支持无杂音的切换 ANC 滤波器系数
支持最短 200ms 左右的场景系数切换
Audsys框图
以对象的方式操作 AudSys, 提供的3种音频流硬件资源, 使用简易.
内部外设模块化, 方便定制和裁剪.
不同产品的音频流控制和数据传输保持一致, 代码继承性强.
增加新的音频外设, 不影响原有产品代码, 扩展容易.
音频流控制和传输以命令方式, 可读性强.
AudSys包括接口层和设备层
资源依赖
AUDIO_ADC
AUDIO_DAC
PDM
I2S
ANC
ASRC
AUDIO_INTERFACE
AUDIO_DUMP
DMA
USB_LIB
AudSys用法流程
- 用法流程简介
AudSys 创建销毁接口
audsys对外提供init,deinit和3个create和destroy接口.
init和deinit只初始化软件状态, 包括创建audsys task, 创建锁, 队列等全局变量.不直接操作寄存器.
可多次创建销毁, 每次创建表示开启一个stream流, 如录音, 播放, 语音检测, ANC等stream.
1 WQ_RET audsys_record_create(audsys_record_info_t *info, audsys_record_obj_t **obj);
2 WQ_RET audsys_record_destroy(audsys_record_obj_t *obj);
3 WQ_RET audsys_playbk_create(audsys_playbk_info_t *info, audsys_playbk_obj_t **obj);
4 WQ_RET audsys_playbk_destroy(audsys_playbk_obj_t *obj);
5 WQ_RET audsys_anc_create(audsys_anc_info_t *info, audsys_anc_obj_t **obj);
6 WQ_RET audsys_anc_destroy(audsys_anc_obj_t *obj);
AudSys 创建参数
每次创建传入资源信息和 object 指针的指针, 会获取 object 对应的外设信息和操作函数指针
用户通过 obj 下发命令和操作audio功能模块
1 typedef struct audsys_record_obj {
2 audsys_record_t *record;
3 audsys_record_cmd_fn cmd_fn;
4 } audsys_record_obj_t;
5
6 typedef struct audsys_playbk_obj {
7 audsys_playbk_t *playback;
8 audsys_playbk_cmd_fn cmd_fn;
9 } audsys_playbk_obj_t;
10
11 typedef struct audsys_anc_obj {
12 audsys_anc_t *anc;
13 audsys_anc_cmd_fn cmd_fn;
14 } audsys_anc_obj_t;
AudSys 命令枚举
以 recorder 为例, 用户通过传入命令 ID 操作功能对应的函数,命令 ID 如下
1 enum {
2 AUDSYS_RECORD_CMD_OPEN,
3 AUDSYS_RECORD_CMD_CLOSE,
4 AUDSYS_RECORD_CMD_START,
5 AUDSYS_RECORD_CMD_STOP,
6 AUDSYS_RECORD_CMD_GAIN,
7 AUDSYS_RECORD_CMD_HOWL_DET,
8 AUDSYS_RECORD_CMD_PM,
9 AUDSYS_RECORD_CMD_VAD,
10 AUDSYS_RECORD_CMD_DUMP,
11 AUDSYS_RECORD_CMD_TIMER,
12 AUDSYS_RECORD_CMD_PREPARE_DATA,
13 AUDSYS_RECORD_CMD_GET_INFO,
14 AUDSYS_RECORD_CMD_TYPE_MAX,
15 };
16 typedef uint8_t audsys_record_cmd_t;
AudSys 命令函数
以 recorder 为例, 命令对应函数如下.
1 static audsys_record_cmd_ops_t g_record_cmd_ops_tbl[AUDSYS_RECORD_CMD_TYPE_MAX] = {
2 [AUDSYS_RECORD_CMD_OPEN] = record_cmd_open,
3 [AUDSYS_RECORD_CMD_CLOSE] = record_cmd_close,
4 [AUDSYS_RECORD_CMD_START] = record_cmd_start,
5 [AUDSYS_RECORD_CMD_STOP] = record_cmd_stop,
6 [AUDSYS_RECORD_CMD_GAIN] = record_cmd_gain,
7 [AUDSYS_RECORD_CMD_HOWL_DET] = record_cmd_howl_det,
8 [AUDSYS_RECORD_CMD_PM] = record_cmd_power_monitor,
9 [AUDSYS_RECORD_CMD_VAD] = record_cmd_vad,
10 [AUDSYS_RECORD_CMD_DUMP] = record_cmd_dump,
11 [AUDSYS_RECORD_CMD_TIMER] = record_cmd_timer,
12 [AUDSYS_RECORD_CMD_PREPARE_DATA] = record_cmd_prepare_data,
13 [AUDSYS_RECORD_CMD_GET_INFO] = record_cmd_get_info,
14 };
AudSys 命令参数
以 recorder 为例, 每条命令都要对应参数, 用户通过参数传递音频外设信息
1 typedef union audsys_record_msg {
2 record_cfg_t record_cfg;
3 record_dump_cfg_t record_dump;
4 record_gain_t record_gain;
5 audsys_record_get_info_t record_info;
6 record_data_t record_data;
7 aud_howl_detect_cfg_t howl_detect;
8 aud_power_monitor_cfg_t power_monitor;
9 aud_timer_cfg_t aud_timer;
10 } audsys_record_msg_u;
AudSys 注册外设
以 recorder 为例, stream创建时, 设备层会注册外设函数表,用户通过创建时传入的device type决定使用哪些外设.
1 aud_record_dev_ops_t *aud_dev_register_record_ops(void)
2 {
3 aud_record_dev_ops_t *ops =
4 wq_heap_caps_malloc(sizeof(aud_record_dev_ops_t), MALLOC_CAP_NONE);
5
6 ops->amic_ops = aud_adc_get_ops();
7 ops->dmic_ops = aud_pdm_get_rx_ops();
8 ops->i2s_ops = aud_i2s_get_rx_ops();
9 #if is_defined(CONFIG_AUDIO_UAC_RX_ENABLE)
10 ops->uac_ops = aud_uac_get_rx_ops();
11 #endif
12 ops->vad_ops = aud_vad_get_ops();
13 ops->dump_ops = aud_dump_get_ops();
14 ops->gain_ops = aud_gain_rx_get_ops();
15 #ifdef CONFIG_AUDIO_HOWL_DETECT_ENABLE
16 ops->howl_det_ops = aud_howl_det_get_ops();
17 #endif
18 ops->pm_ops = aud_pm_get_ops();
19 ops->timer_ops = aud_timer_get_ops();
20
21 return ops;
22 }
音频功能模块宏控制使能
可通过配置宏, 控制device或功能模块是否使能和编译.
1 CONFIG_AUDIO_CLOCK_15_36M=y
2 /* CONFIG_AUDIO_CLOCK_16M is not set */
3 /* CONFIG_AUDIO_CLOCK_32M is not set */
4 CONFIG_AUDIO_CLOCK=15360000
5 /* CONFIG_AUDIO_PDM_RX_ENABLE is not set */
6 /* CONFIG_AUDIO_PDM_TX_ENABLE is not set */
7 /* CONFIG_AUDIO_DAC_ENABLE is not set */
8 /* CONFIG_AUDIO_ANC_ENABLE is not set */
9 CONFIG_AUDIO_I2S_TX_ENABLE=y
10 /* CONFIG_AUDIO_EQ_ENABLE is not set */
11 /* CONFIG_AUDIO_HOWL_DETECT_ENABLE is not set */
12 /* CONFIG_AUDIO_POWER_MONITOR_ENABLE is not set */
13 /* CONFIG_AUDIO_DRE_USER_CTL is not set */
14 /* CONFIG_LOOPBACK_ENABLE is not set */
15 CONFIG_AUDIO_UAC_RX_ENABLE=y
开I2S TX stream
以I2S TX stream为例介绍配置流程
1 /** 该参数为外设固定参数,每次创建stream只需传入一次 */
2 static aud_dev_out_map_t g_playbk_i2s_map = {
3 /** 选择外设类型,如I2S,PDM,ADC,DAC,USB... */
4 .dev_type = AUD_DEV_TYPE_I2S,
5 /** 选择使用i2s port0或其他i2s模块 */
6 .port_id = 0,
7 /** 设置音频通路个数,0:通道0, 1:通道1, 2:双通道,4:4通道,8:8通道 */
8 .out_chns = 2,
9 /** 音频外设的固定属性参数 */
10 .param = i2s_out_param,
11 };
12
13 /** 声明 i2s out stream 的对象指针,和参数变量 */
14 audsys_playbk_obj_t *playbk_i2s_obj;
15 audsys_playbk_msg_u playbk_msg;
16 g_playbk_i2s_info.map = &g_playbk_i2s_map;
17
18 /** 创建i2s out 音频流,申请必要内存,音存储频信息 */
19 audsys_playbk_create(&g_playbk_i2s_info, &playbk_i2s_obj);
20
21 /** 下发启动 i2s tx外设的必要信息 */
22 playbk_msg.playbk_cfg.sample_rate = 48000;
23 playbk_msg.playbk_cfg.bit_width = AUDSYS_PLAYBK_BIT_WIDTH_24_L;
24 playbk_msg.playbk_cfg.trigger_mode = AUDSYS_PLAYBK_TIMER_TRIGGER;
25 playbk_msg.playbk_cfg.timer_id = 0;
26 playbk_msg.playbk_cfg.path = AUDSYS_PLAYBK_PATH_MAIN;
27 playbk_msg.playbk_cfg.done_cb = playbk_i2s_complete_callback;
28
29 /** 通过命令下发启动参数,等待complete callback回调,启动完成 */
30 playbk_i2s_obj->cmd_fn(playbk_i2s_obj, AUDSYS_PLAYBK_CMD_OPEN, &playbk_msg);
31 playbk_i2s_obj->cmd_fn(playbk_i2s_obj, AUDSYS_PLAYBK_CMD_START, &playbk_msg);
32
33 /** 通过命令下发数据参数,上传dma数据信息,等待dma 传输完成中断 callback*/
34 g_playbk_i2s_obj->cmd_fn(g_playbk_i2s_obj, AUDSYS_PLAYBK_CMD_PREPARE_DATA, &playbk_msg);
35
36 /** 通过命令下发关闭参数,等待complete callback回调,关闭完成 */
37 playbk_i2s_obj->cmd_fn(playbk_i2s_obj, AUDSYS_PLAYBK_CMD_STOP, &playbk_msg);
38 playbk_i2s_obj->cmd_fn(playbk_i2s_obj, AUDSYS_PLAYBK_CMD_CLOSE, &playbk_msg);
39
40 /** 销毁i2s out音频流,释放内存,恢复存储信息为初始值 */
41 audsys_record_destroy(playbk_i2s_obj);
参考示例
- ::
examples/audio_sys_loopback_demo
examples/usb_demo/uac_speaker
API 介绍
Defines
-
DBGLOG_LIB_AUDIO_INFO(fmt, ...)
-
DBGLOG_LIB_AUDIO_WARNING(fmt, ...)
-
DBGLOG_LIB_AUDIO_ERROR(fmt, ...)
-
AUDSYS_SAMPLE_RATE_16K
-
AUDSYS_SAMPLE_RATE_32K
-
AUDSYS_SAMPLE_RATE_44P1K
-
AUDSYS_SAMPLE_RATE_48K
-
AUDSYS_SAMPLE_RATE_88P2K
-
AUDSYS_SAMPLE_RATE_96K
-
AUDSYS_SAMPLE_RATE_128K
-
AUDSYS_SAMPLE_RATE_192K
-
AUDSYS_SAMPLE_RATE_384K
Functions
-
WQ_RET audsys_init(void)
create audsys task, lock, queue, initialize audio peripheral software state, do not manipulate hardware registers
-
void audsys_deinit(void)
destroy audsys tasks, locks, queues, restores audio peripheral software state, does not operate hardware registers
-
WQ_RET audsys_record_create(audsys_record_info_t *info, audsys_record_obj_t **obj)
create an uplink audio data stream, request the necessary memory for the audio data stream, provide user-set audio map information, and provide linked list nodes for each peripheral. Obtain the audio peripheral information and function pointer information required for the data stream. Users can operate peripherals corresponding to data flows by using commands and parameters
- 参数:
info -- create recorder audio object parameters
obj -- recorder audio object
- 返回:
WQ_RET
-
WQ_RET audsys_record_destroy(audsys_record_obj_t *obj)
destroy data stream,release the memory of the record request, clear the status, clear the linked list and peripheral nodes
- 参数:
obj -- recorder audio object
- 返回:
WQ_RET
-
WQ_RET audsys_playbk_create(audsys_playbk_info_t *info, audsys_playbk_obj_t **obj)
create an downlink audio data stream, request the necessary memory for the audio data stream, provide user-set audio map information, and provide linked list nodes for each peripheral. Obtain the audio peripheral information and function pointer information required for the data stream. Users can operate peripherals corresponding to data flows by using commands and parameters
- 参数:
info -- create playback audio object parameters
obj -- playback audio object
- 返回:
WQ_RET
-
WQ_RET audsys_playbk_destroy(audsys_playbk_obj_t *obj)
destroy data stream,release the memory of the playback request, clear the status, clear the linked list and peripheral nodes
- 参数:
obj -- playback audio object
- 返回:
WQ_RET
-
WQ_RET audsys_anc_create(audsys_anc_info_t *info, audsys_anc_obj_t **obj)
create an anc audio data stream, request the necessary memory for the audio data stream, provide user-set audio map information, and provide linked list nodes for each peripheral. Obtain the audio peripheral information and function pointer information required for the data stream. Users can operate peripherals corresponding to data flows by using commands and parameters
- 参数:
info -- create anc audio object parameters
obj -- anc audio object
- 返回:
WQ_RET
-
WQ_RET audsys_anc_destroy(audsys_anc_obj_t *obj)
destroy data stream,release the memory of the anc request, clear the status, clear the linked list and peripheral nodes
- 参数:
obj -- anc audio object
- 返回:
WQ_RET
Typedefs
-
typedef uint8_t audsys_playbk_cmd_t
-
typedef uint8_t audsys_playbk_gain_type_id_t
-
typedef uint8_t audsys_playbk_path_type_t
-
typedef uint8_t audsys_playbk_bit_width_t
-
typedef uint8_t playbk_get_info_id_t
-
typedef uint8_t audsys_playbk_trigger_mode
-
typedef void (*audsys_playbk_complete_callback)(audsys_playbk_cmd_t cmd, audsys_playbk_path_type_t path)
-
typedef void (*audsys_playbk_underrun_callback)(audsys_playbk_path_type_t path)
-
typedef void (*audsys_playbk_gain_callback)(uint32_t id)
-
typedef void (*audsys_playbk_data_callback)(void *buf, uint32_t length, void *param)
-
typedef struct audsys_playbk_cfg audsys_playbk_cfg_t
playback open configure structure
-
typedef struct audsys_playbk_eq_cfg audsys_playbk_eq_cfg_t
playback eq structure
-
typedef struct audsys_playbk_gain audsys_playbk_gain_t
playback gain structure
-
typedef struct audsys_playbk_pa audsys_playbk_pa_t
playback pa structure
-
typedef struct audsys_playbk_dre audsys_playbk_dre_t
playback dre structure
-
typedef struct audsys_playbk_lp audsys_playbk_lp_t
playback lowpower structure
-
typedef struct audsys_playbk_mixer audsys_playbk_mixer_t
playback mixer structure
-
typedef union _playbk_info_param playbk_info_param_u
-
typedef struct audsys_playbk_get_info audsys_playbk_get_info_t
-
typedef struct _playeback_eq_set playeback_eq_set_t
new eq paramater from app
-
typedef struct audsys_playbk_buf_entry audsys_playbk_buf_entry_t
-
typedef struct audsys_playbk_data audsys_playbk_data_t
-
typedef struct playbk_howl_detect_src playbk_howl_detect_src_t
-
typedef struct audsys_playbk_howl_detect_param audsys_playbk_howl_detect_param_t
-
typedef union audsys_playbk_msg audsys_playbk_msg_u
-
typedef void (*audsys_playbk_cmd_ops_t)(const void *obj, const audsys_playbk_msg_u *msg)
-
typedef struct audsys_playbk_info audsys_playbk_info_t
-
typedef struct audsys_playbk audsys_playbk_t
audio sys msg info
-
typedef void (*audsys_playbk_cmd_fn)(const void *obj, audsys_playbk_cmd_t cmd, const audsys_playbk_msg_u *msg)
-
typedef struct audsys_playbk_obj audsys_playbk_obj_t
playback object information,contains global variables, functions, os locks and more
Enums
-
enum [anonymous]
Values:
-
enumerator AUDSYS_PLAYBK_CMD_OPEN
audio output stream open cmd
-
enumerator AUDSYS_PLAYBK_CMD_CLOSE
audio output stream close cmd
-
enumerator AUDSYS_PLAYBK_CMD_START
audio output stream start cmd
-
enumerator AUDSYS_PLAYBK_CMD_STOP
audio output stream stop cmd
-
enumerator AUDSYS_PLAYBK_CMD_LP
audio output stream lowpower on off cmd
-
enumerator AUDSYS_PLAYBK_CMD_MIXER
audio output stream mixer set ratio cmd
-
enumerator AUDSYS_PLAYBK_CMD_TIMER
audio output stream audio timer config cmd
-
enumerator AUDSYS_PLAYBK_CMD_PREPARE_DATA
audio output stream transfer prepare data cmd
-
enumerator AUDSYS_PLAYBK_CMD_GET_INFO
audio output stream get information cmd
-
enumerator AUDSYS_PLAYBK_CMD_GET_GAIN
audio output stream get gain operate cmd
-
enumerator AUDSYS_PLAYBK_CMD_TYPE_MAX
audio output stream cmd id maximum number
-
enumerator AUDSYS_PLAYBK_CMD_OPEN
-
enum [anonymous]
playbk gain type options
Values:
-
enumerator AUDSYS_PLAYBK_GAIN_MUTE
-
enumerator AUDSYS_PLAYBK_GAIN_UNMUTE
-
enumerator AUDSYS_PLAYBK_GAIN_SET_TGT_DB
-
enumerator AUDSYS_PLAYBK_GAIN_GET_CUR_DB
-
enumerator AUDSYS_PLAYBK_GAIN_MUTE
-
enum [anonymous]
data path options
Values:
-
enumerator AUDSYS_PLAYBK_PATH_MAIN
for music/voice
-
enumerator AUDSYS_PLAYBK_PATH_AUX
for tone or loopback
-
enumerator AUDSYS_PLAYBK_PATH_MAX
playback path module max
-
enumerator AUDSYS_PLAYBK_PATH_MAIN
-
enum [anonymous]
Values:
-
enumerator AUDSYS_PLAYBK_BIT_WIDTH_24_L
low 24bit valid bit in 32bit
-
enumerator AUDSYS_PLAYBK_BIT_WIDTH_16_L
16bit valid bit in 32bit
-
enumerator AUDSYS_PLAYBK_BIT_WIDTH_16
16bit valid bit in 16bit
-
enumerator AUDSYS_PLAYBK_BIT_WIDTH_24_H
-
enumerator AUDSYS_PLAYBK_BIT_WIDTH_24_L
-
enum [anonymous]
this enumeration is the id that gets the information
Values:
-
enumerator AUDSYS_PLAYBK_GET_LATCHED_CNT
audio output stream get latch asrc output sample points cnt
-
enumerator AUDSYS_PLAYBK_GET_FREERUN_CNT
audio output stream get asrc output sample points cnt
-
enumerator AUDSYS_PLAYBK_GET_INFO_TIMER
audio output stream get timer information
-
enumerator AUDSYS_PLAYBK_GET_INFO_OUT_CHN
audio output stream get out channel
-
enumerator AUDSYS_PLAYBK_GET_INFO_SPK_DC_CAL
audio output stream get dc offset calibration
-
enumerator AUDSYS_PLAYBK_GET_INFO_SPK_DC_CAL_CHECK
audio output stream get dc offset whether is successful
-
enumerator AUDSYS_PLAYBK_GET_LATCHED_CNT
-
enum [anonymous]
Values:
-
enumerator AUDSYS_PLAYBK_SELF_TRIGGER
audio output stream data trigger by self
-
enumerator AUDSYS_PLAYBK_TIMER_TRIGGER
audio output stream data trigger by audio timer
-
enumerator AUDSYS_PLAYBK_SOFTWARE_TRIGGER
audio output stream data trigger by software
-
enumerator AUDSYS_PLAYBK_BT_TRIGGER
audio output stream data trigger by BT
-
enumerator AUDSYS_PLAYBK_TRIGGER_MODE_MAX
-
enumerator AUDSYS_PLAYBK_SELF_TRIGGER
Functions
-
audsys_playbk_cmd_ops_t *audsys_playbk_get_cmd_ops(void)
-
void audsys_playbk_init(audsys_playbk_obj_t *obj)
playback init the software status
playback init the software status
- 参数:
obj -- object point
-
void audsys_playbk_deinit(audsys_playbk_obj_t *obj)
playback deinit the software status
- 参数:
obj -- object point
-
struct audsys_playbk_cfg
- #include <audsys_playbk.h>
playback open configure structure
Public Members
-
audsys_playbk_complete_callback done_cb
reference playback complete callback
-
uint32_t sample_rate
the sample rate of data input to device, 16k,44.1k,48k,96k...
-
uint8_t bit_width
reference to audsys_bit_width
-
uint8_t trigger_mode
reference to audsys_trigger_mode
-
uint8_t timer_id
audio timer id is valid if trigger mode is timer mode
-
audsys_playbk_path_type_t path
reference to data path
-
audsys_playbk_complete_callback done_cb
-
struct audsys_playbk_eq_cfg
- #include <audsys_playbk.h>
playback eq structure
Public Members
-
aud_eq_cfg_t *cfg
equalizer config parameter
-
aud_eq_cfg_t *cfg
-
struct audsys_playbk_gain
- #include <audsys_playbk.h>
playback gain structure
Public Members
-
audsys_playbk_gain_type_id_t type_id
playbk gain type id
-
int8_t db
gain value(unit db)
-
audsys_playbk_path_type_t path
data path
-
audsys_playbk_gain_type_id_t type_id
-
struct audsys_playbk_pa
- #include <audsys_playbk.h>
playback pa structure
-
struct audsys_playbk_dre
- #include <audsys_playbk.h>
playback dre structure
Public Members
-
aud_gain_dac_analog_gain_t analog_gain
target analog gain
-
aud_gain_done_mode_t done_mode
gain adjust done mode
-
aud_gain_ctrl_mode_t ctrl_mode
dre control mode
-
audsys_playbk_gain_callback cb
set done callback
-
aud_gain_dac_analog_gain_t analog_gain
-
struct audsys_playbk_lp
- #include <audsys_playbk.h>
playback lowpower structure
Public Members
-
bool lp_en
lowpower enable
-
bool lp_en
-
struct audsys_playbk_mixer
- #include <audsys_playbk.h>
playback mixer structure
Public Members
-
uint8_t ratio
mix rate = (aux / main)*100%
-
uint8_t ratio
-
union _playbk_info_param
Public Members
-
uint32_t latched_sample_cnt
BT latch asrc sample counter
-
audsys_playbk_path_type_t path
main path or aux path
-
struct _playbk_info_param::[anonymous] latched_cnt
-
uint32_t freerun_sample_cnt
asrc freerun sample counter
-
struct _playbk_info_param::[anonymous] freerun_cnt
-
wq_spk_dc_cal_t *spk_dc_cal
dc offset calibration information
-
WQ_SPK_DAC_OUT_VRMS vrms
spk out voltage type
-
bool lp_en
lowpower enable
-
bool is_correct
spk dc off calibration return, true is ok, false is wrong
-
struct _playbk_info_param::[anonymous] dc_cal
-
uint8_t timer_id
audio timer id for when trigger mode is timer trigger
-
uint8_t out_chn
output channel,0 is mono0, 1 is mono1, 2 is dual channel,3 is 3 channel
-
uint32_t latched_sample_cnt
-
struct audsys_playbk_get_info
Public Members
-
playbk_info_param_u param
module infomation
-
playbk_get_info_id_t info_id
infomation module id
-
playbk_info_param_u param
-
struct _playeback_eq_set
- #include <audsys_playbk.h>
new eq paramater from app
Public Members
-
float overgain
all the frequence gain offset
-
uint32_t reserved
reserved for future
-
aud_eq_band_param_t *band
eq band paramater pointer
-
int16_t *gain
eq gain offset pointer
-
uint8_t band_num
eq band paramater number
-
uint8_t gain_num
eq gain paramater number
-
bool ready
whther to switch eq
-
bool use_default
whether to use default paramater svaed in kv
-
float overgain
-
struct audsys_playbk_buf_entry
-
struct audsys_playbk_data
Public Members
-
audsys_playbk_buf_entry_t *buf
buffer parameter
-
audsys_playbk_data_callback cb
data complete callback
-
audsys_playbk_path_type_t path
main path or aux path
-
audsys_playbk_buf_entry_t *buf
-
struct playbk_howl_detect_src
-
struct audsys_playbk_howl_detect_param
Public Members
-
aud_howl_detect_cfg_t cfg
audio howling detect config
-
playbk_howl_detect_src_t src[AUD_HOWL_DETECT_SRC_MAX]
audio howling detect source
-
aud_howl_detect_cfg_t cfg
-
union audsys_playbk_msg
Public Members
-
audsys_playbk_cfg_t playbk_cfg
-
audsys_playbk_eq_cfg_t playbk_eq
-
audsys_playbk_gain_t playbk_gain
-
audsys_playbk_pa_t playbk_pa
-
audsys_playbk_dre_t playbk_dre
-
audsys_playbk_lp_t playbk_lp
-
audsys_playbk_mixer_t playbk_mixer
-
audsys_playbk_get_info_t playbk_info
-
audsys_playbk_data_t playbk_data
-
audsys_playbk_howl_detect_param_t howl_detect
-
aud_power_monitor_cfg_t power_monitor
-
aud_timer_cfg_t aud_timer
-
audsys_playbk_cfg_t playbk_cfg
-
struct audsys_playbk_info
Public Members
-
aud_dev_out_map_t *map
playback audmap information
-
audsys_playbk_underrun_callback underrun_cb
playback underflow callback
-
aud_dev_out_map_t *map
-
struct audsys_playbk
- #include <audsys_playbk.h>
audio sys msg info
Public Members
-
audsys_playbk_info_t *dev_info
audio_map_info_t *map;
-
aud_playbk_dev_ops_t *dev_ops
device operate interface pointer
-
audsys_playbk_cmd_ops_t *cmd_ops
playback cmd operate interface pointer
-
struct list_head play_list
playback list
-
uint8_t out_chn
out channel refs AUD_DEV_OUT_CHN_MAX
-
audsys_playbk_info_t *dev_info
-
struct audsys_playbk_obj
- #include <audsys_playbk.h>
playback object information,contains global variables, functions, os locks and more
Typedefs
-
typedef uint8_t audsys_record_cmd_t
-
typedef uint8_t record_set_info_id_t
-
typedef uint8_t record_get_info_id_t
-
typedef uint8_t record_gain_type_id_t
-
typedef uint8_t record_vad_cmd_id_t
-
typedef uint8_t record_type_id_t
-
typedef uint8_t audsys_record_trigger_mode
-
typedef void (*audsys_record_complete_callback)(audsys_record_cmd_t cmd)
-
typedef void (*audsys_record_overflow_cb_t)(uint32_t path_id)
-
typedef union _record_set_info_param record_set_info_param_u
-
typedef union _record_info_param record_info_param_u
record status structure
-
typedef struct audsys_record_set_info audsys_record_set_info_t
-
typedef struct audsys_record_get_info audsys_record_get_info_t
-
typedef struct _record_cfg record_cfg_t
record start configure structure
-
typedef struct _record_gain record_gain_t
record gain structure
-
typedef struct _record_howl_detect_src record_howl_detect_src_t
-
typedef struct _record_howl_detect_param record_howl_detect_param_t
-
typedef struct audsys_record_buf_entry audsys_record_buf_entry_t
-
typedef void (*audsys_record_data_callback)(void *buf, uint32_t length, void *param)
-
typedef struct _record_data record_data_t
-
typedef union audsys_record_msg audsys_record_msg_u
-
typedef void (*audsys_record_cmd_ops_t)(const void *obj, const audsys_record_msg_u *msg)
-
typedef struct audsys_record_info audsys_record_info_t
-
typedef struct audsys_record audsys_record_t
-
typedef void (*audsys_record_cmd_fn)(const void *obj, audsys_record_cmd_t cmd, const audsys_record_msg_u *msg)
-
typedef struct audsys_record_obj audsys_record_obj_t
recorder object information,contains global variables, functions, os locks, vad parameter and more
Enums
-
enum [anonymous]
Values:
-
enumerator AUDIO_VOICE_PATH_0
audio input channel 0
-
enumerator AUDIO_VOICE_PATH_1
audio input channel 1
-
enumerator AUDIO_VOICE_PATH_2
audio input channel 2
-
enumerator AUDIO_VOICE_PATH_3
audio input channel 3
-
enumerator AUDIO_VOICE_PATH_4
audio input channel 4
-
enumerator AUDIO_VOICE_PATH_5
audio input channel 5
-
enumerator AUDIO_VOICE_PATH_VAD
audio input vad channel
-
enumerator AUDIO_VOICE_PATH_MAX
audio input channel maximum number
-
enumerator AUDIO_VOICE_PATH_0
-
enum [anonymous]
Values:
-
enumerator AUDSYS_RECORD_CMD_OPEN
audio input stream open cmd
-
enumerator AUDSYS_RECORD_CMD_CLOSE
audio input stream close cmd
-
enumerator AUDSYS_RECORD_CMD_START
audio input stream start cmd
-
enumerator AUDSYS_RECORD_CMD_STOP
audio input stream stop cmd
-
enumerator AUDSYS_RECORD_CMD_SET_GAIN
audio input stream set gain operate cmd
-
enumerator AUDSYS_RECORD_CMD_DUMP
audio input stream dump on off cmd
-
enumerator AUDSYS_RECORD_CMD_PRE_RECORD_OPEN
-
enumerator AUDSYS_RECORD_CMD_PRE_RECORD_CLOSE
-
enumerator AUDSYS_RECORD_CMD_TIMER
audio input stream timer config cmd
-
enumerator AUDSYS_RECORD_CMD_PREPARE_DATA
audio input stream transfer prepare data cmd
-
enumerator AUDSYS_RECORD_CMD_SET_INFO
audio input stream set information cmd
-
enumerator AUDSYS_RECORD_CMD_GET_INFO
audio input stream get information cmd
-
enumerator AUDSYS_RECORD_CMD_GET_GAIN
audio input stream get gain operate cmd
-
enumerator AUDSYS_RECORD_CMD_TYPE_MAX
audio input stream cmd id maximum number
-
enumerator AUDSYS_RECORD_CMD_OPEN
-
enum [anonymous]
Values:
-
enumerator RECORD_SET_INFO_DATA_STOP
audio input stream set data stop infomation
-
enumerator RECORD_SET_INFO_DATA_STOP
-
enum [anonymous]
Values:
-
enumerator RECORD_GET_INFO_MIC
audio input stream get mic parameters information
-
enumerator RECORD_GET_INFO_TIMER
audio input stream get mic audio timer information
-
enumerator RECORD_GET_INFO_PATH_BITMAP
audio input stream get channel used bitmap information
-
enumerator RECORD_GET_INFO_VAD
audio input stream get vad information
-
enumerator RECORD_GET_INFO_MIC
-
enum [anonymous]
Values:
-
enumerator RECORD_GAIN_SET_DIG_GAIN
set digital gain
-
enumerator RECORD_GAIN_GET_DIG_GAIN
get digital gain
-
enumerator RECORD_GAIN_SET_ANA_GAIN
set analog gain
-
enumerator RECORD_GAIN_GET_ANA_GAIN
get analog gain
-
enumerator RECORD_GAIN_SET_DIG_GAIN
-
enum [anonymous]
Values:
-
enumerator RECORD_VAD_CMD_OPEN
vad open
-
enumerator RECORD_VAD_CMD_START
vad start
-
enumerator RECORD_VAD_CMD_STOP
vad stop
-
enumerator RECORD_VAD_CMD_CLOSE
vad close
-
enumerator RECORD_VAD_CMD_SET_STATUS
vad set status
-
enumerator RECORD_VAD_CMD_OPEN
-
enum [anonymous]
Values:
-
enumerator RECORD_TYPE_VOICE
audio input stream recorder module
-
enumerator RECORD_TYPE_VAD
audio input stream vad module
-
enumerator RECORD_TYPE_DUMP
audio input stream audio dump module
-
enumerator RECORD_TYPE_VOICE
-
enum [anonymous]
Values:
-
enumerator AUDSYS_RECORD_SELF_TRIGGER
audio input stream data trigger by self
-
enumerator AUDSYS_RECORD_TIMER_TRIGGER
audio input stream data trigger by audio timer
-
enumerator AUDSYS_RECORD_SOFTWARE_TRIGGER
audio input stream data trigger by software
-
enumerator AUDSYS_RECORD_TIMER_AND_SW_TRIGGER
audio input stream data trigger by software and audio timer
-
enumerator AUDSYS_RECORD_BT_TRIGGER
audio input stream data trigger by BT
-
enumerator AUDSYS_RECORD_TRIGGER_MODE_MAX
-
enumerator AUDSYS_RECORD_SELF_TRIGGER
Functions
-
audsys_record_cmd_ops_t *audsys_record_get_cmd_ops(void)
-
void audsys_record_init(audsys_record_obj_t *obj)
recorde init the software status
- 参数:
obj -- record audio object
-
void audsys_record_deinit(audsys_record_obj_t *obj)
recorde deinit the software status
- 参数:
obj -- record audio object
-
union _record_info_param
- #include <audsys_record.h>
record status structure
-
struct audsys_record_set_info
Public Members
-
record_set_info_param_u param
module infomation
-
record_set_info_id_t info_id
infomation module id
-
record_set_info_param_u param
-
struct audsys_record_get_info
Public Members
-
record_info_param_u param
module infomation
-
record_get_info_id_t info_id
infomation module id
-
record_info_param_u param
-
struct _record_cfg
- #include <audsys_record.h>
record start configure structure
Public Members
-
audsys_record_complete_callback done_cb
record complete callback
-
uint32_t sample_rate
the sample rate of device output to data, 16k,44.1k,48k,96k
-
bool is_16_bitwidth
reference to mic bit width. true:16bit false:24bit
-
uint8_t trigger_mode
reference to audsys_record_trigger_mode
-
uint8_t timer_id
audio timer id for when trigger mode is timer trigger
-
bool less_delay_en
enable less delay mode
-
uint8_t voice_path_bitmap
record open/close voice path mic bitmap
-
audsys_record_complete_callback done_cb
-
struct _record_gain
- #include <audsys_record.h>
record gain structure
Public Members
-
int16_t gain_db
mic gain value, unit 1 dB
-
record_gain_type_id_t type_id
input stream gain module id
-
uint8_t mic_id
mic id
-
uint8_t chn_id
mic digital front end channel
-
int16_t gain_db
-
struct _dump_cfg
-
struct _record_howl_detect_src
-
struct _record_howl_detect_param
Public Members
-
aud_howl_detect_cfg_t cfg
audio howling detect config
-
record_howl_detect_src_t src[AUD_HOWL_DETECT_SRC_MAX]
audio howling detect source
-
aud_howl_detect_cfg_t cfg
-
struct audsys_record_buf_entry
-
struct _record_data
Public Members
-
audsys_record_buf_entry_t buf
buffer parameter
-
audsys_record_data_callback cb
data complete callback
-
uint8_t id
data channel device id
-
record_type_id_t type
recorder module id
-
audsys_record_buf_entry_t buf
-
union audsys_record_msg
Public Members
-
record_cfg_t record_cfg
-
record_dump_cfg_t record_dump
-
record_gain_t record_gain
-
audsys_record_set_info_t set_info
-
audsys_record_get_info_t record_info
-
record_data_t record_data
-
record_howl_detect_param_t howl_detect
-
aud_power_monitor_cfg_t power_monitor
-
aud_timer_cfg_t aud_timer
-
record_cfg_t record_cfg
-
struct audsys_record_info
Public Members
-
aud_dev_in_map_t *map
recorderr audmap information
-
audsys_record_overflow_cb_t overflow_cb
record overflow callback
-
uint8_t map_cnt
the number of groups using audmap
-
uint8_t vad_en
if using vad, is vad path id. otherwise, is 0xff
-
aud_dev_in_map_t *map
-
struct audsys_record
Public Members
-
audsys_record_info_t *dev_info
audio_map_info_t *map;
-
aud_record_dev_ops_t *dev_ops
device operate interface pointer
-
audsys_record_cmd_ops_t *cmd_ops
recorderr cmd operate interface pointer
-
struct list_head voice_list
voice list
-
uint32_t in_path_bitmap
mic input path channels bitmap
-
audsys_record_info_t *dev_info
-
struct audsys_record_obj
- #include <audsys_record.h>
recorder object information,contains global variables, functions, os locks, vad parameter and more
Typedefs
-
typedef uint8_t audsys_anc_cmd_t
-
typedef uint8_t audsys_anc_get_info_id_t
-
typedef uint8_t audsys_anc_gain_type_id_t
-
typedef void (*audsys_anc_gain_callback)(uint32_t id)
-
typedef union _anc_info_param audsys_anc_info_param_t
-
typedef struct audsys_anc_get_info audsys_anc_get_info_t
-
typedef struct audsys_anc_switch audsys_anc_switch_t
-
typedef struct audsys_anc_open_info audsys_anc_open_info_t
-
typedef struct audsys_anc_close_info audsys_anc_close_info_t
-
typedef struct audsys_anc_pa audsys_anc_pa_t
-
typedef struct audsys_anc_switch_done_info audsys_anc_switch_done_info_t
-
typedef struct audsys_anc_start_info audsys_anc_start_info_t
-
typedef struct audsys_anc_dre audsys_anc_dre_t
playback dre structure
-
typedef struct audsys_anc_drc_time audsys_anc_drc_time_t
-
typedef struct audsys_anc_drc_amplitude audsys_anc_drc_amplitude_t
-
typedef union anc_howl_detect_src anc_howl_detect_src_u
-
typedef struct audsys_anc_howl_detect audsys_anc_howl_detect_t
-
typedef union audsys_anc_msg audsys_anc_msg_u
-
typedef struct audsys_anc_dev_record_map audsys_anc_dev_record_map_t
-
typedef void (*audsys_anc_cmd_ops_t)(const void *obj, const audsys_anc_msg_u *msg)
-
typedef struct audsys_anc_info audsys_anc_info_t
-
typedef struct audsys_anc audsys_anc_t
-
typedef void (*audsys_anc_cmd_fn)(const void *obj, audsys_anc_cmd_t cmd, const audsys_anc_msg_u *msg)
-
typedef struct audsys_anc_obj audsys_anc_obj_t
anc object information,contains global variables, functions, os locks, anc coeff parameter and more
Enums
-
enum [anonymous]
Values:
-
enumerator AUDIO_ANC_PATH_FF0_L
audio anc ff mic 0
-
enumerator AUDIO_ANC_PATH_FF1_L
audio anc ff mic 1
-
enumerator AUDIO_ANC_PATH_FF2_L
audio anc ff mic 2
-
enumerator AUDIO_ANC_PATH_FF3_L
audio anc ff mic 3
-
enumerator AUDIO_ANC_PATH_FF0_R
audio anc stereo right channel ff mic 0
-
enumerator AUDIO_ANC_PATH_FF1_R
audio anc stereo right channel ff mic 1
-
enumerator AUDIO_ANC_PATH_FF2_R
audio anc stereo right channel ff mic 2
-
enumerator AUDIO_ANC_PATH_FF3_R
audio anc stereo right channel ff mic 3
-
enumerator AUDIO_ANC_PATH_FB0_L
audio anc left fb mic 0
-
enumerator AUDIO_ANC_PATH_FB1_L
audio anc left fb mic 1
-
enumerator AUDIO_ANC_PATH_FB2_L
audio anc left fb mic 2
-
enumerator AUDIO_ANC_PATH_FB3_L
audio anc left fb mic 3
-
enumerator AUDIO_ANC_PATH_FB0_R
audio anc right fb mic 0
-
enumerator AUDIO_ANC_PATH_FB1_R
audio anc right fb mic 1
-
enumerator AUDIO_ANC_PATH_FB2_R
audio anc right fb mic 2
-
enumerator AUDIO_ANC_PATH_FB3_R
audio anc right fb mic 3
-
enumerator AUDIO_ANC_PATH_MAX
audio anc data path maximum number
-
enumerator AUDIO_ANC_PATH_FF0_L
-
enum [anonymous]
Values:
-
enumerator AUDSYS_ANC_CMD_TIMER
audio anc stream audio timer config cmd
-
enumerator AUDSYS_ANC_CMD_DRC_USER_CTRL_ENTER
audio anc stream drc user control mode enter cmd
-
enumerator AUDSYS_ANC_CMD_DRC_USER_CTRL_EXIT
audio anc stream drc user control mode exit cmd
-
enumerator AUDSYS_ANC_CMD_GET_IN_GAIN
audio anc stream get input gain operate cmd
-
enumerator AUDSYS_ANC_CMD_GET_INFO
audio anc stream get information cmd audio anc stream switch cmd ATTENTION!!! less than or equal to get_info, audsys will directly manipulate the function without queue massage
-
enumerator AUDSYS_ANC_CMD_OPEN
audio anc open adc dac, and connect anc path
-
enumerator AUDSYS_ANC_CMD_CLOSE
audio anc close adc dac, and disconnect anc path
-
enumerator AUDSYS_ANC_CMD_SWITCH
audio anc coeff switch
-
enumerator AUDSYS_ANC_CMD_SET_IN_GAIN
audio anc stream set input gain operate cmd
-
enumerator AUDSYS_ANC_CMD_SET_DRC_TIME
audio anc stream set drc time
-
enumerator AUDSYS_ANC_CMD_TYPE_MAX
audio anc stream cmd id max
-
enumerator AUDSYS_ANC_CMD_TIMER
-
enum audsys_switch_anc_mode_t
Values:
-
enumerator AUDSYS_SWITCH_ANC_MODE_NORMAL
use config slow way to switch anc mode
-
enumerator AUDSYS_SWITCH_ANC_MODE_FAST
use default param and not have pop way to fast switch anc mode
-
enumerator AUDSYS_SWITCH_ANC_MODE_IMDL
switch same as AUDSYS_SWITCH_ANC_MODE_FAST
-
enumerator AUDSYS_SWITCH_ANC_MODE_DIRECT
switch anc mode just 1 step
-
enumerator AUDSYS_SWITCH_ANC_JUST_CLOSE
switch anc mode just need to close anc coeff
-
enumerator AUDSYS_SWITCH_ANC_MODE_MAX
switch anc mode max
-
enumerator AUDSYS_SWITCH_ANC_MODE_NORMAL
-
enum [anonymous]
Values:
-
enumerator ANC_GET_ENABLE_STATE
this is to get anc enable status, true is use anc module, false is not
-
enumerator ANC_GET_IN_USE
this is to get anc open status, 1 is started, 0 is not
-
enumerator ANC_GET_FB_COEFF_IDX
this is to get anc fb coeff idx
-
enumerator ANC_GET_DENOISE_MODE
get anc flash coeff by fb and ff coeff idx parameters is aud_anc_get_coeff_addr_t
this is to get anc current denoise mode, reference to AUD_DENOISE_MODE
- Return:
uint8_t WQ_RET WQ_RET_OK for anc get succeed.
-
enumerator ANC_GET_FLASH_COEFF_BY_COEFF_IDX
-
enumerator ANC_GET_COEFF_INUSE
get the anc mode of the ff/fb coeff idx parameters is aud_anc_get_coeff_idx_t
get in use coeff
- Return:
uint8_t WQ_RET WQ_RET_OK for anc get succeed.
-
enumerator ANC_GET_ANC_MODE_COEFF_IDX
-
enumerator ANC_GET_DRC_TIME
get DRC time configuration
-
enumerator ANC_GET_SWITCHING_STATE
get audio switching state
-
enumerator ANC_GET_TIMER_IDX
get audio timer id
-
enumerator ANC_GET_ANC_FS
get ANC frequence of sample rate
-
enumerator ANC_GET_ENABLE_STATE
Functions
-
audsys_anc_cmd_ops_t *audsys_anc_get_cmd_ops(void)
This function is to get anc command option table.
- 返回:
audsys_anc_cmd_ops_t *, the anc command option table pointer
-
void audsys_anc_init(audsys_anc_obj_t *obj)
This function is to init anc software status.
- 参数:
obj -- config anc obj parameter
-
void audsys_anc_deinit(audsys_anc_obj_t *obj)
This function is to deinit anc software status.
- 参数:
obj -- config anc obj parameter
-
union _anc_info_param
Public Members
-
aud_anc_get_coeff_addr_t coeff_addr
anc coeff from flash, refer to aud_anc_get_coeff_addr_t
-
aud_anc_get_coeff_inuse_t coeff_inuse
anc coeff in use, refer to aud_anc_get_coeff_inuse_t
-
aud_anc_get_coeff_idx_t coeff_idx
anc coeff index, refer to aud_anc_get_coeff_idx_t
-
uint8_t anc_en
whether to use the anc module
-
uint8_t in_use
if 1 anc is open, else anc is close
-
uint8_t denoise_mode
-
uint8_t fb_coeff_idx
-
uint8_t timer_id
-
uint32_t anc_fs
-
aud_anc_drc_time_cfg_t drc_time_cfg
-
aud_anc_get_coeff_addr_t coeff_addr
-
struct audsys_anc_get_info
Public Members
-
audsys_anc_get_info_id_t info_id
anc get info index, refer to audsys_anc_get_info_id_t
-
audsys_anc_info_param_t param
anc get info parameter, refer to audsys_anc_info_param_t
-
audsys_anc_get_info_id_t info_id
-
struct audsys_anc_switch
-
struct audsys_anc_open_info
Public Members
-
uint32_t sample_rate
mic data sample rate, must be equale to the recorder sample rate
-
uint32_t sample_rate
-
struct _anc_gain
Public Members
-
int16_t gain_db
anc mic gain value, unit 1 dB
-
audsys_anc_gain_type_id_t gain_type_id
anc gain config type
-
uint8_t mic_id
anc source mic index
-
uint8_t chn_id
anc source rxdfe channel
-
int16_t gain_db
-
struct audsys_anc_pa
-
struct audsys_anc_switch_done_info
-
struct audsys_anc_dre
- #include <audsys_anc.h>
playback dre structure
Public Members
-
aud_gain_dac_analog_gain_t analog_gain
anc config dynamic range enhancer target analog gain
-
aud_gain_done_mode_t done_mode
anc config dynamic range enhancer gain adjust done mode
-
aud_gain_ctrl_mode_t ctrl_mode
anc config dynamic range enhancer mode, refer to aud_gain_ctrl_mode_t
-
audsys_anc_gain_callback cb
anc config dynamic range enhancer mode done callback
-
aud_gain_dac_analog_gain_t analog_gain
-
struct audsys_anc_drc_amplitude
Public Members
-
aud_anc_drc_amplitude_cfg_t drc_amplitude_cfg
DRC amplitude config
-
aud_anc_drc_amplitude_cfg_t drc_amplitude_cfg
-
union anc_howl_detect_src
Public Members
-
aud_dev_type_t dev_type
adc, pdm or i2s, usb type...
-
uint8_t port_id
adc port id, pdm rx port id or i2s rx module id, usb audio rx port id
-
struct anc_howl_detect_src::[anonymous] mic_src
howling detect MIC source
-
uint8_t out_chn
Speaker output channel, 0 or 1
-
uint8_t rxdfe_chn
RX-DFE channel used to dump speaker
-
struct anc_howl_detect_src::[anonymous] spk_src
howling detect SPK source
-
aud_dev_type_t dev_type
-
struct audsys_anc_howl_detect
Public Members
-
aud_howl_detect_cfg_t cfg
audio howling detect config
-
aud_howl_detect_type_t type
audio howling detect type
-
anc_howl_detect_src_u src[AUD_HOWL_DETECT_SRC_MAX]
audio howling detect source
-
aud_howl_detect_cfg_t cfg
-
union audsys_anc_msg
Public Members
-
audsys_anc_switch_done_info_t done_info
anc message switch done info
-
audsys_anc_switch_t anc_switch
anc message switch config
-
audsys_anc_get_info_t anc_info
anc message get anc cofig info
-
audsys_anc_open_info_t open_info
anc message open info
-
audsys_anc_close_info_t close_info
anc message close info
-
audsys_anc_start_info_t start_info
anc message start info
-
audsys_anc_gain_t anc_gain
anc message gain info
-
audsys_anc_pa_t anc_pa
anc message pa contrl
-
audsys_anc_dre_t anc_dre
anc message dre contrl
-
audsys_anc_drc_time_t anc_drc_time
anc message drc time
-
audsys_anc_howl_detect_t howl_detect
anc message howling detect config
-
aud_power_monitor_cfg_t power_monitor
anc message power monitor config
-
aud_timer_cfg_t aud_timer
anc message audio timer config
-
audsys_anc_drc_amplitude_t anc_drc_amplitude
anc message drc amplitude config
-
audsys_anc_switch_done_info_t done_info
-
struct audsys_anc_dev_record_map
-
struct audsys_anc_info
Public Members
-
aud_dev_in_map_t *in_map
anc input audmap
-
aud_dev_out_map_t *out_map
anc output audmap
-
aud_anc_storage_cfg_t *storage
anc path and coeff config Explanation on parameter record_info This parameter is used by ANC during creation and requires users to configure it according to the actual situation. The specific configuration is as follows: 1、If anc and rxdfe share rxdfe, then this parameter requires a non empty audmap with a value of record. Please refer to the structure of Audsys-anc_dev_record_map_t for details;
2、If anc and record do not share rxdfe, then this parameter needs to be explicitly set to NULL. Therefore, users need to accurately set the audmap based on their actual needs
-
audsys_anc_dev_record_map_t *record_info
-
uint8_t in_path_num
anc input channels
-
aud_dev_in_map_t *in_map
-
struct audsys_anc
Public Members
-
audsys_anc_info_t *dev_info
anc config info
-
aud_anc_coeff_param_t *coeff_param
anc coeff param, refer to aud_anc_coeff_param_t
-
aud_anc_dev_ops_t *dev_ops
anc device option
-
audsys_anc_cmd_ops_t *cmd_ops
anc command option
-
struct list_head in_list
anc input list
-
struct list_head out_list
anc output list
-
struct list_head rxdfe_in_list
anc rxdfe input list
-
uint32_t in_path_bitmap
mic input path channels bitmap
-
uint8_t out_chn
anc out channels
-
audsys_anc_info_t *dev_info
-
struct audsys_anc_obj
- #include <audsys_anc.h>
anc object information,contains global variables, functions, os locks, anc coeff parameter and more