Audio APIs
重要
The Audio API v1.0 is the lastest and stable Audio APIs. All new applications should use Audio API v1.0.
Audio Interface
The BK Audio Driver supports following functions:
adc function
dac function
eq function
The adc and dac function can be operated independently. However the eq function need to use with dac function together.
Audio API Categories
Most of Audio APIs can be categoried as:
Common APIs
The common APIs are prefixed with bk_aud, the APIs may be common for adc and dac interfaces, e.g. bk_aud_driver_init() etc.
Adc function APIs.
The APIs provide support for adc function. e.g. bk_aud_adc_init() etc.
Dac function APIs.
The APIs provide support for dac function. e.g. bk_aud_dac_init() etc.
Eq function APIs.
The APIs provide support for eq function. e.g. bk_aud_eq_init() etc.
- Common APIs:
bk_aud_driver_init()
- init the audio driverbk_aud_driver_deinit()
- deinit the audio driverbk_aud_register_aud_isr()
- register audio isr
- Adc APIs:
bk_aud_adc_init()
- init the adc module of audiobk_aud_adc_deinit()
- deinit the adc module of audiobk_aud_set_adc_samp_rate()
- set the sample rate in adc work modebk_aud_get_adc_fifo_addr()
- get the adc fifo address in adc work modebk_aud_get_dtmf_fifo_addr()
- get the dtmf fifo address in adc work modebk_aud_get_adc_status()
- get the adc status information in adc work modebk_aud_get_dtmf_status()
- get the dtmf status information in dtmf work modebk_aud_enable_adc_int()
- enable adc interruptbk_aud_disable_adc_int()
- disable adc interruptbk_aud_start_adc()
- start adc functionbk_aud_stop_adc()
- stop adc functionbk_aud_get_adc_fifo_data()
- get adc databk_aud_get_dtmf_fifo_data()
- get dtmf data
- Dac APIs:
bk_aud_dac_init()
- init the dac module of audiobk_aud_dac_deinit()
- deinit the dac module of audiobk_aud_set_dac_samp_rate()
- set the sample rate of audio dac functionbk_aud_get_dac_fifo_addr()
- get the dac fifo addressbk_aud_enable_dac_int()
- enable dac interrupt functionbk_aud_disable_dac_int()
- disable dac interrupt functionbk_aud_get_dac_status()
- get the dac fifo status informationbk_aud_start_dac()
- start dac functionbk_aud_stop_dac()
- stop dac function
- Eq APIs:
bk_aud_eq_init()
- init the eq module of audiobk_aud_eq_deinit()
- deinit the eq module of audio
API Reference
Header File
Functions
-
bk_err_t bk_aud_driver_init(void)
Init the AUD driver.
This API init the resoure common:
Init AUD driver control memory
Configure clock and power
Configure mic enable
Register AUD isr interrupt
This API should be called before any other AUD APIs.
- 返回
BK_OK: succeed
others: other errors.
-
bk_err_t bk_aud_driver_deinit(void)
Deinit the AUD driver.
This API free all resource related to AUD, power down AUD and mic.
- 返回
BK_OK: succeed
others: other errors.
-
bk_err_t bk_aud_adc_init(aud_adc_work_mode_t adc_work_mode, const aud_adc_config_t *adc_config, const aud_dtmf_config_t *dtmf_config)
Init the adc module of audio.
This API init the adc module:
Set adc work mode: adc/dtmf
Configure the adc/dtmf parameters
disable adc/dtmf
disable adc/dtmf interrupts
- 参数
adc_work_mode – adc work mode adc/dtmf
adc_config – adc configure of adc work mode
dtmf_config – dtmf configure of dtmf work mode
- 返回
BK_OK: succeed
BK_ERR_AUD_ADC_MODE: adc work mode is error
BK_ERR_NULL_PARAM: config is NULL
BK_ERR_AUD_NOT_INIT: audio driver is not init
others: other errors.
-
bk_err_t bk_aud_adc_deinit(void)
Deinit adc module.
This API deinit the adc module of audio:
Disable adc and dtmf
- 返回
BK_OK: succeed
others: other errors.
-
bk_err_t bk_aud_set_adc_samp_rate(aud_adc_samp_rate_t samp_rate)
Set the sample rate in adc work mode.
- 参数
samp_rate – adc sample rate of adc work mode
- 返回
BK_OK: succeed
BK_ERR_AUD_NOT_INIT: audio driver is not init
others: other errors.
-
bk_err_t bk_aud_set_adc_gain(uint32_t value)
Set the adc gain in adc work mode.
- 参数
value – the gain value of adc work mode
- 返回
BK_OK: succeed
BK_ERR_AUD_NOT_INIT: audio driver is not init
others: other errors.
-
bk_err_t bk_aud_set_mic_chl(aud_mic_enable_t mic_chl)
Set the adc gain in adc work mode.
- 参数
mic_chl – the mic channel value of adc work mode
- 返回
BK_OK: succeed
BK_ERR_AUD_NOT_INIT: audio driver is not init
others: other errors.
-
bk_err_t bk_aud_set_mic_intf_mode(aud_mic_id_t mic_id, aud_adc_intf_mode_t intf_mode)
Set the mic external interface mode in adc work mode.
- 参数
mic_id – the mic id
intf_mode – signal end or difference
- 返回
BK_OK: succeed
BK_ERR_AUD_NOT_INIT: audio driver is not init
others: other errors.
-
bk_err_t bk_aud_get_adc_fifo_addr(uint32_t *adc_fifo_addr)
Get the adc fifo address in adc work mode.
- 参数
adc_fifo_addr – adc fifo address of adc work mode
- 返回
BK_OK: succeed
BK_ERR_AUD_NOT_INIT: audio driver is not init
others: other errors.
-
bk_err_t bk_aud_get_dtmf_fifo_addr(uint32_t *dtmf_fifo_addr)
Get the dtmf fifo address in adc work mode.
- 参数
dtmf_fifo_addr – dtmf fifo address of dtmf work mode
- 返回
BK_OK: succeed
BK_ERR_AUD_NOT_INIT: audio driver is not init
others: other errors.
-
bk_err_t bk_aud_get_dac_fifo_addr(uint32_t *dac_fifo_addr)
Get the dac fifo address.
- 参数
dac_fifo_addr, : – dac fifo address
- 返回
BK_OK: succeed
BK_ERR_AUD_NOT_INIT: audio driver is not init
others: other errors.
-
bk_err_t bk_aud_get_adc_status(uint32_t *adc_status)
Get the adc status information in adc work mode.
This API get the adc status of adc work mode:
Get fifo status
- 参数
adc_status – adc fifo status and agc status
- 返回
BK_OK: succeed
BK_ERR_AUD_NOT_INIT: audio driver is not init
others: other errors.
-
bk_err_t bk_aud_get_dtmf_status(uint32_t *dtmf_status)
Get the dtmf status information in dtmf work mode.
This API get the adc status of dtmf work mode:
Get fifo status
- 参数
dtmf_status – dtmf fifo status
- 返回
BK_OK: succeed
BK_ERR_AUD_NOT_INIT: audio driver is not init
others: other errors.
-
bk_err_t bk_aud_enable_adc_int(void)
Enable adc interrupt.
This API enable adc interrupt:
Enable adc interrupt if work mode is adc work mode
Enable dtmf interrupt if work mode is dtmf work mode
- 返回
BK_OK: succeed
BK_ERR_AUD_NOT_INIT: audio driver is not init
others: other errors.
-
bk_err_t bk_aud_disable_adc_int(void)
Disable adc interrupt.
This API disable adc interrupt:
Disable adc interrupt if work mode is adc work mode
Disable dtmf interrupt if work mode is dtmf work mode
- 返回
BK_OK: succeed
BK_ERR_AUD_NOT_INIT: audio driver is not init
others: other errors.
-
bk_err_t bk_aud_start_adc(void)
Start adc.
This API start adc:
Enable adc if work mode is adc work mode
Enable dtmf if work mode is dtmf work mode
Usage example:
//init audio driver bk_aud_driver_init(); //init adc configuration aud_adc_config_t adc_config; adc_config.samp_rate = AUD_ADC_SAMP_RATE_8K; adc_config.adc_enable = AUD_ADC_DISABLE; adc_config.line_enable = AUD_ADC_LINE_DISABLE; adc_config.dtmf_enable = AUD_DTMF_DISABLE; adc_config.adc_hpf2_coef_B2 = 0; adc_config.adc_hpf2_bypass_enable = AUD_ADC_HPF_BYPASS_ENABLE; adc_config.adc_hpf1_bypass_enable = AUD_ADC_HPF_BYPASS_ENABLE; adc_config.adc_set_gain = 0x2d; adc_config.adc_samp_edge = AUD_ADC_SAMP_EDGE_RISING; adc_config.adc_hpf2_coef_B0 = 0; adc_config.adc_hpf2_coef_B1 = 0; adc_config.adc_hpf2_coef_A0 = 0; adc_config.adc_hpf2_coef_A1 = 0; adc_config.dtmf_wr_threshold = 8; adc_config.adcl_wr_threshold = 8; adc_config.dtmf_int_enable = AUD_DTMF_INT_DISABLE; adc_config.adcl_int_enable = AUD_ADCL_INT_DISABLE; adc_config.loop_adc2dac = AUD_LOOP_ADC2DAC_DISABLE; adc_config.agc_noise_thrd = 101; adc_config.agc_noise_high = 101; adc_config.agc_noise_low = 160; adc_config.agc_noise_min = 1; adc_config.agc_noise_tout = 0; adc_config.agc_high_dur = 3; adc_config.agc_low_dur = 3; adc_config.agc_min = 1; adc_config.agc_max = 4; adc_config.agc_ng_method = AUD_AGC_NG_METHOD_MUTE; adc_config.agc_ng_enable = AUD_AGC_NG_DISABLE; adc_config.agc_decay_time = AUD_AGC_DECAY_TIME_128; adc_config.agc_attack_time = AUD_AGC_ATTACK_TIME_128; adc_config.agc_high_thrd = 18; adc_config.agc_low_thrd = 0; adc_config.agc_iir_coef = AUD_AGC_IIR_COEF_1_1024; adc_config.agc_enable = AUD_AGC_DISABLE; adc_config.manual_pga_value = 0; adc_config.manual_pga_enable = AUD_GAC_MANUAL_PGA_DISABLE; bk_aud_adc_init(AUD_ADC_WORK_MODE_ADC, &adc_config, NULL); CLI_LOGI("init adc successful\n"); //start adc and dac bk_aud_start_adc();
- 返回
BK_OK: succeed
BK_ERR_AUD_ADC_MODE: adc work mode is NULL
BK_ERR_AUD_NOT_INIT: audio driver is not init
others: other errors.
-
bk_err_t bk_aud_stop_adc(void)
Stop adc.
This API stop adc:
Disable adc if work mode is adc work mode
Disable dtmf if work mode is dtmf work mode
- 返回
BK_OK: succeed
BK_ERR_AUD_ADC_MODE: adc work mode is NULL
BK_ERR_AUD_NOT_INIT: audio driver is not init
others: other errors.
-
bk_err_t bk_aud_get_adc_fifo_data(uint32_t *adc_data)
Get adc data.
This API get adc fifo data
- 返回
BK_OK: succeed
BK_ERR_AUD_ADC_MODE: adc work mode is NULL
BK_ERR_AUD_NOT_INIT: audio driver is not init
others: other errors.
-
bk_err_t bk_aud_get_dtmf_fifo_data(uint32_t *dtmf_data)
Get dtmf data.
This API get dtmf fifo data
- 参数
dtmf_data, : – save dtmf data
- 返回
BK_OK: succeed
BK_ERR_AUD_ADC_MODE: dtmf work mode is NULL
BK_ERR_AUD_NOT_INIT: audio driver is not init
others: other errors.
-
bk_err_t bk_aud_dac_init(const aud_dac_config_t *dac_config)
Init the dac module of audio.
This API init the dac module:
Configure the dac parameters to enable dac function.
- 参数
dac_config, : – dac parameters configure
- 返回
BK_OK: succeed
BK_ERR_NULL_PARAM: config is NULL
BK_ERR_AUD_NOT_INIT: audio driver is not init
-
bk_err_t bk_aud_dac_deinit(void)
Deinit dac module of audio.
This API deinit the dac module:
Configure the dac parameters to default value.
- 参数
None –
- 返回
BK_OK: succeed
-
bk_err_t bk_aud_set_dac_samp_rate(aud_dac_samp_rate_t samp_rate)
Set the dac sample rate.
This API set the dac sample rate value.
- 参数
samp_rate, : – dac sample rate
- 返回
BK_OK: succeed
BK_ERR_AUD_NOT_INIT: audio driver is not init
-
bk_err_t bk_aud_set_dac_gain(uint32_t value)
Set the dac gain.
- 参数
value – the gain value, range:0x00 ~ 0x3f
- 返回
BK_OK: succeed
BK_ERR_AUD_NOT_INIT: audio driver is not init
others: other errors.
-
bk_err_t bk_aud_set_dac_chl(aud_dac_chl_enable_t dac_chl)
Set the dac channel.
- 参数
dac_chl – the channel value
- 返回
BK_OK: succeed
BK_ERR_AUD_NOT_INIT: audio driver is not init
others: other errors.
-
bk_err_t bk_aud_enable_dac_int(void)
Enable dac interrupt.
This API enable dac interrupt:
- 参数
None –
- 返回
BK_OK: succeed
BK_ERR_AUD_NOT_INIT: audio driver is not init
-
bk_err_t bk_aud_disable_dac_int(void)
Disable dac interrupt.
This API disable dac interrupt:
- 参数
None –
- 返回
BK_OK: succeed
BK_ERR_AUD_NOT_INIT: audio driver is not init
-
bk_err_t bk_aud_get_dac_status(uint32_t *dac_status)
Get the dac status information.
This API get the dac fifo status.
Usage example:
uint32_t dac_fifo_status = 0; bk_aud_get_dac_status(&dac_fifo_status); if (dac_fifo_status & AUD_DACL_NEAR_EMPTY_MASK) { }
- 参数
dac_status, : – dac fifo status
- 返回
BK_OK: succeed
BK_ERR_AUD_NOT_INIT: audio driver is not init
-
bk_err_t bk_aud_start_dac(void)
Start dac.
This API start dac function.
- 参数
None –
- 返回
BK_OK: succeed
BK_ERR_AUD_NOT_INIT: audio driver is not init
-
bk_err_t bk_aud_stop_dac(void)
Stop dac.
This API stop dac function.
- 参数
None –
- 返回
BK_OK: succeed
BK_ERR_AUD_NOT_INIT: audio driver is not init
-
bk_err_t bk_aud_eq_init(const aud_eq_config_t *eq_config)
Init the eq module of audio.
This API init the eq module:
Configure the eq parameters to enable the eq function.
- 参数
eq_config, : – eq parameter configure
- 返回
BK_OK: succeed
BK_ERR_NULL_PARAM: config is NULL
BK_ERR_AUD_NOT_INIT: audio driver is not init
-
bk_err_t bk_aud_eq_deinit(aud_eq_config_t *eq_config)
Deinit the eq module of audio.
This API deinit the eq module:
Configure the eq parameters to default value.
- 参数
eq_config, : – eq parameter configure
- 返回
BK_OK: succeed
BK_ERR_NULL_PARAM: config is NULL
-
bk_err_t bk_aud_register_aud_isr(aud_isr_id_t isr_id, aud_isr_t isr, void *param)
Register audio isr.
This API register audio isr:
Disable adc if work mode is adc work mode
Disable dtmf if work mode is dtmf work mode
Usage example:
void cli_aud_adcl_isr(void *param) { uint32_t adc_data; uint32_t adc_status; bk_aud_get_adc_status(&adc_status); if (adc_status & AUD_ADCL_NEAR_FULL_MASK) { bk_aud_get_adc_fifo_data(&adc_data); bk_aud_dac_write(adc_data); } } //register isr ret = bk_aud_register_aud_isr(AUD_ISR_ADCL, cli_aud_adcl_isr, NULL); CLI_LOGI("register adc isr successful\n"); //enable audio interrupt bk_aud_enable_adc_int(); CLI_LOGI("enable adc interrupt successful\n");
- 参数
isr_id – adc work mode adc/dtmf
isr – audio isr callback
param – audio isr callback parameter
- 返回
BK_OK: succeed
BK_ERR_AUD_ADC_MODE: adc work mode is NULL
BK_ERR_AUD_NOT_INIT: audio driver is not init
others: other errors.
API Typedefs
Header File
Structures
-
struct aud_int_config_t
-
struct aud_dtmf_config_t
Public Members
-
aud_adc_enable_t adc_enable
AUD adc enable
-
aud_adc_line_enable_t line_enable
AUD line in enable
-
aud_dtmf_enable_t dtmf_enable
AUD dtmf enable
-
aud_dtmf_tone_pattern_t tone_pattern
AUD dtmf tone pattern
-
aud_dtmf_tone_mode_t tone_mode
AUD dtmf tone mode
-
uint32_t tone_pause_time
AUD dtmf tone pause time
-
uint32_t tone_active_time
AUD dtmf tone active time
-
uint32_t tone1_step
AUD dtmf Tone1 frequency set Step = F(KHz) * 8191
-
aud_dtmf_tone_attu_t tone1_attu
AUD dtmf Tone1 damp set 0 :-1 :-15 dB
-
aud_dtmf_tone_enable_t tone1_enable
AUD dtmf tone1 enable
-
uint32_t tone2_step
AUD dtmf Tone2 frequency set Step = F(KHz) * 8191
-
aud_dtmf_tone_attu_t tone2_attu
AUD dtmf Tone2 damp set 0 :-1 :-15 dB
-
aud_dtmf_tone_enable_t tone2_enable
AUD dtmf tone2 enable
-
uint32_t dtmf_wr_threshold
AUD dtmf write threshold value
-
aud_dtmf_int_t dtmf_int_enable
AUD dtmf interrupt request enable
-
aud_loop_dtmf2dac_t loop_ton2dac
AUD dtmf to DAC loop test enable
-
aud_adc_enable_t adc_enable
-
struct aud_adc_config_t
Public Members
-
aud_adc_samp_rate_t samp_rate
AUD adc sample rate
-
aud_adc_enable_t adc_enable
AUD adc enable
-
aud_adc_line_enable_t line_enable
AUD line in enable
-
aud_dtmf_enable_t dtmf_enable
AUD dtmf enable
-
uint32_t adc_hpf2_coef_B2
AUD adc HPF2 coefficient B2
-
aud_adc_hpf_bypass_t adc_hpf2_bypass_enable
AUD adc hpf2 disable
-
aud_adc_hpf_bypass_t adc_hpf1_bypass_enable
AUD adc hpf1 disable
-
uint32_t adc_set_gain
AUD adc gain set
-
aud_adc_samp_edge_t adc_samp_edge
ADC data sampling clock edge select rising/falling
-
uint32_t adc_hpf2_coef_B0
AUD adc HPF2 coefficient B0
-
uint32_t adc_hpf2_coef_B1
AUD adc HPF2 coefficient B1
-
uint32_t adc_hpf2_coef_A0
AUD adc HPF2 coefficient A0
-
uint32_t adc_hpf2_coef_A1
AUD adc HPF2 coefficient A1
-
uint32_t dtmf_wr_threshold
AUD dtmf write threshold value
-
uint32_t adcl_wr_threshold
AUD adcl write threshold value
-
aud_dtmf_int_t dtmf_int_enable
AUD dtmf interrupt request enable
-
aud_adcl_int_t adcl_int_enable
AUD adcl interrupt request enable
-
aud_loop_adc2dac_t loop_adc2dac
AUD adc to DAC loop test enable
-
uint32_t agc_noise_thrd
AUD AGC noise gating of excute,noise gating work when audio value is little
-
uint32_t agc_noise_high
AUD AGC corresponding MIC_RSSI low 10 bit
-
uint32_t agc_noise_low
AUD AGC corresponding MIC_RSSI low 10 bit
-
uint32_t agc_noise_min
AUD AGC {GAIN2[2:0] GAIN1[3:0]} when signal level below NOISE_LOW, when noise gating is enabled
-
aud_gac_noise_tout_t agc_noise_tout
AUD AGC noise tout
-
aud_gac_high_dur_t agc_high_dur
AUD AGC high noise gating work duration
-
aud_gac_low_dur_t agc_low_dur
AUD AGC low noise gating work duration
-
uint32_t agc_min
AUD AGC Minimum value of {GAIN2[2:0] GAIN1[3:0]}
-
uint32_t agc_max
AUD AGC Maximum value of {GAIN2[2:0] GAIN1[3:0]} Also the default gain setting when AGC is disabled
-
aud_agc_method_t agc_ng_method
AUD AGC noise gating method
-
aud_agc_ng_enable_t agc_ng_enable
AUD AGC enable noise gating
-
aud_agc_decay_time_t agc_decay_time
AUD AGC agc decay time
-
aud_agc_attack_time_t agc_attack_time
AUD AGC agc attack time
-
uint32_t agc_high_thrd
AUD AGC coefficient high five bit of MIC_RSSI
-
uint32_t agc_low_thrd
AUD AGC coefficient low five bit of MIC_RSSI
-
aud_agc_iir_coef_t agc_iir_coef
AUD AGC iir coefficient select
-
aud_agc_enable_t agc_enable
AUD AGC enable
-
uint32_t manual_pga_value
AUD AGC manual set PGA value
-
aud_agc_manual_pga_en_t manual_pga_enable
AUD AGC manual set PGA enable
-
aud_adc_samp_rate_t samp_rate
-
struct aud_dac_config_t
Public Members
-
aud_dac_enable_t dac_enable
AUD dac enable
-
aud_dac_samp_rate_t samp_rate
AUD dac sample rate
-
aud_dac_chl_enable_t dac_chl
AUD dac channel
-
aud_dac_work_mode_t work_mode
AUD dac work mode
-
uint16_t dac_hpf2_coef_B2
AUD dac HPF2 coefficient B2
-
aud_dac_hpf_bypass_t dac_hpf2_bypass_enable
AUD dac hpf2 disable
-
aud_dac_hpf_bypass_t dac_hpf1_bypass_enable
AUD dac hpf1 disable
-
uint16_t dac_set_gain
AUD dac gain set
-
aud_dac_clk_invert_t dac_clk_invert
AUD dac output clock edge select
-
uint16_t dac_hpf2_coef_B0
AUD dac HPF2 coefficient B0
-
uint16_t dac_hpf2_coef_B1
AUD dac HPF2 coefficient B1
-
uint16_t dac_hpf2_coef_A1
AUD dac HPF2 coefficient A1
-
uint16_t dac_hpf2_coef_A2
AUD dac HPF2 coefficient A2
-
uint8_t dacr_rd_threshold
AUD dacl read threshold value
-
uint8_t dacl_rd_threshold
AUD dacr read threshold value
-
uint8_t dacr_int_enable
AUD dacr interrupt request enable
-
uint8_t dacl_int_enable
AUD dacl interrupt request enable
-
aud_dac_filt_enable_t dac_filt_enable
AUD dac filter enable
-
aud_dac_enable_t dac_enable
-
struct aud_eq_config_t
Macros
-
BK_ERR_AUD_NOT_INIT
AUD driver not init
-
BK_ERR_AUD_ISR_ID
AUD isr id is invalid
-
BK_ERR_AUD_ADC_MODE
AUD adc work mode is invalid
-
AUD_HAL_REG_BASE
-
AUD_DAC_FIFO_ADDR
Type Definitions
-
typedef void (*aud_isr_t)(void *param)
Enumerations
-
enum aud_isr_id_t
Values:
-
enumerator AUD_ISR_DTMF
dtmf_int_en
-
enumerator AUD_ISR_ADCL
adcl_int_en
-
enumerator AUD_ISR_DACR
dacr_int_en
-
enumerator AUD_ISR_DACL
dacl_int_en
-
enumerator AUD_ISR_MAX
AUD isr id max
-
enumerator AUD_ISR_DTMF
-
enum aud_adc_work_mode_t
Values:
-
enumerator AUD_ADC_WORK_MODE_NULL
no mode
-
enumerator AUD_ADC_WORK_MODE_ADC
ADC mode
-
enumerator AUD_ADC_WORK_MODE_DTMF
DTMF mode
-
enumerator AUD_ADC_WORK_MODE_MAX
-
enumerator AUD_ADC_WORK_MODE_NULL
-
enum aud_adc_intf_mode_t
Values:
-
enumerator AUD_ADC_INTF_MODE_DIFFEN
-
enumerator AUD_ADC_INTF_MODE_SIGNAL_END
-
enumerator AUD_ADC_INTF_MODE_MAX
-
enumerator AUD_ADC_INTF_MODE_DIFFEN
-
enum aud_adc_samp_rate_t
Values:
-
enumerator AUD_ADC_SAMP_RATE_8K
ADC sample rate : 8k
-
enumerator AUD_ADC_SAMP_RATE_11_025K
ADC sample rate : 11.025k
-
enumerator AUD_ADC_SAMP_RATE_12K
ADC sample rate : 12k
-
enumerator AUD_ADC_SAMP_RATE_16K
ADC sample rate : 16k
-
enumerator AUD_ADC_SAMP_RATE_22_05K
ADC sample rate : 22.05k
-
enumerator AUD_ADC_SAMP_RATE_24K
ADC sample rate : 24k
-
enumerator AUD_ADC_SAMP_RATE_32K
ADC sample rate : 32k
-
enumerator AUD_ADC_SAMP_RATE_44_1K
ADC sample rate : 44.1k
-
enumerator AUD_ADC_SAMP_RATE_48K
ADC sample rate : 48k
-
enumerator AUD_ADC_SAMP_RATE_MAX
-
enumerator AUD_ADC_SAMP_RATE_8K
-
enum aud_adc_hpf_bypass_t
Values:
-
enumerator AUD_ADC_HPF_BYPASS_DISABLE
AUD ADC hpf bypass disable
-
enumerator AUD_ADC_HPF_BYPASS_ENABLE
AUD ADC hpf bypass enable
-
enumerator AUD_ADC_HPF_BYPASS_MAX
-
enumerator AUD_ADC_HPF_BYPASS_DISABLE
-
enum aud_adc_samp_edge_t
Values:
-
enumerator AUD_ADC_SAMP_EDGE_RISING
AUD ADC sampling clock edge : rising edge
-
enumerator AUD_ADC_SAMP_EDGE_FALLING
AUD ADC sampling clock edge : falling edge
-
enumerator AUD_ADC_SAMP_EDGE_MAX
-
enumerator AUD_ADC_SAMP_EDGE_RISING
-
enum aud_adcl_int_t
Values:
-
enumerator AUD_ADCL_INT_DISABLE
AUD ADCL interrupt disable
-
enumerator AUD_ADCL_INT_ENABLE
AUD ADCL interrupt enable
-
enumerator AUD_ADCL_INT_MAX
-
enumerator AUD_ADCL_INT_DISABLE
-
enum aud_dtmf_int_t
Values:
-
enumerator AUD_DTMF_INT_DISABLE
AUD DTMF interrupt disable
-
enumerator AUD_DTMF_INT_ENABLE
AUD DTMF interrupt enable
-
enumerator AUD_DTMF_INT_MAX
-
enumerator AUD_DTMF_INT_DISABLE
-
enum aud_loop_adc2dac_t
Values:
-
enumerator AUD_LOOP_ADC2DAC_DISABLE
ADC to DAC loop test disable
-
enumerator AUD_LOOP_ADC2DAC_ENABLE
ADC to DAC loop test enable
-
enumerator AUD_LOOP_ADC2DAC_MAX
-
enumerator AUD_LOOP_ADC2DAC_DISABLE
-
enum aud_loop_dtmf2dac_t
Values:
-
enumerator AUD_LOOP_DTMF2DAC_DISABLE
DTMF to DAC loop test disable
-
enumerator AUD_LOOP_DTMF2DAC_ENABLE
DTMF to DAC loop test enable
-
enumerator AUD_LOOP_DTMF2DAC_MAX
-
enumerator AUD_LOOP_DTMF2DAC_DISABLE
-
enum aud_agc_ng_enable_t
Values:
-
enumerator AUD_AGC_NG_DISABLE
disable noise gating
-
enumerator AUD_AGC_NG_ENABLE
enable noise gating
-
enumerator AUD_AGC_NG_MAX
-
enumerator AUD_AGC_NG_DISABLE
-
enum aud_agc_method_t
Values:
-
enumerator AUD_AGC_NG_METHOD_MUTE
mute or demute : default
-
enumerator AUD_AGC_NG_METHOD_CREASE
gradually increase or decrease gac
-
enumerator AUD_AGC_NG_METHOD_MAX
-
enumerator AUD_AGC_NG_METHOD_MUTE
-
enum aud_agc_decay_time_t
Values:
-
enumerator AUD_AGC_DECAY_TIME_128
AGC decay time :128 2.7ms
-
enumerator AUD_AGC_DECAY_TIME_256
AGC decay time :256
-
enumerator AUD_AGC_DECAY_TIME_512
AGC decay time :512
-
enumerator AUD_AGC_DECAY_TIME_1024
AGC decay time :1024
-
enumerator AUD_AGC_DECAY_TIME_2048
AGC decay time :2048
-
enumerator AUD_AGC_DECAY_TIME_4096
AGC decay time :4096
-
enumerator AUD_AGC_DECAY_TIME_8192
AGC decay time :8192
-
enumerator AUD_AGC_DECAY_TIME_16384
AGC decay time :16384 340ms
-
enumerator AUD_AGC_DECAY_TIME_MAX
-
enumerator AUD_AGC_DECAY_TIME_128
-
enum aud_agc_attack_time_t
Values:
-
enumerator AUD_AGC_ATTACK_TIME_8
AGC attack time :8 0.1667ms
-
enumerator AUD_AGC_ATTACK_TIME_16
AGC attack time :16
-
enumerator AUD_AGC_ATTACK_TIME_32
AGC attack time :32
-
enumerator AUD_AGC_ATTACK_TIME_64
AGC attack time :64
-
enumerator AUD_AGC_ATTACK_TIME_128
AGC attack time :128
-
enumerator AUD_AGC_ATTACK_TIME_256
AGC attack time :256
-
enumerator AUD_AGC_ATTACK_TIME_512
AGC attack time :512
-
enumerator AUD_AGC_ATTACK_TIME_1024
AGC attack time :1024 21 ms
-
enumerator AUD_AGC_ATTACK_TIME_MAX
-
enumerator AUD_AGC_ATTACK_TIME_8
-
enum aud_agc_iir_coef_t
Values:
-
enumerator AUD_AGC_IIR_COEF_1_32
AGC IRR coefficient : 1/32
-
enumerator AUD_AGC_IIR_COEF_1_64
AGC IRR coefficient : 1/64
-
enumerator AUD_AGC_IIR_COEF_1_128
AGC IRR coefficient : 1/128
-
enumerator AUD_AGC_IIR_COEF_1_256
AGC IRR coefficient : 1/256
-
enumerator AUD_AGC_IIR_COEF_1_512
AGC IRR coefficient : 1/512
-
enumerator AUD_AGC_IIR_COEF_1_1024
AGC IRR coefficient : 1/1024
-
enumerator AUD_AGC_IIR_COEF_1_2048
AGC IRR coefficient : 1/2048
-
enumerator AUD_AGC_IIR_COEF_1_4096
AGC IRR coefficient : 1/4096
-
enumerator AUD_AGC_IIR_COEF_MAX
-
enumerator AUD_AGC_IIR_COEF_1_32
-
enum aud_agc_enable_t
Values:
-
enumerator AUD_AGC_DISABLE
disable AGC
-
enumerator AUD_AGC_ENABLE
enable AGC
-
enumerator AUD_AGC_MAX
-
enumerator AUD_AGC_DISABLE
-
enum aud_agc_manual_pga_en_t
Values:
-
enumerator AUD_GAC_MANUAL_PGA_DISABLE
disable AGC manual set pga
-
enumerator AUD_GAC_MANUAL_PGA_ENABLE
enable AGC manual set pga
-
enumerator AUD_GAC_MANUAL_PGA_MAX
-
enumerator AUD_GAC_MANUAL_PGA_DISABLE
-
enum aud_adc_enable_t
Values:
-
enumerator AUD_ADC_DISABLE
disable adc
-
enumerator AUD_ADC_ENABLE
enable adc
-
enumerator AUD_ADC_ENABLE_MAX
-
enumerator AUD_ADC_DISABLE
-
enum aud_adc_line_enable_t
Values:
-
enumerator AUD_ADC_LINE_DISABLE
disable line in
-
enumerator AUD_ADC_LINE_ENABLE
enable line in
-
enumerator AUD_ADC_LINE_ENABLE_MAX
-
enumerator AUD_ADC_LINE_DISABLE
-
enum aud_mic_enable_t
Values:
-
enumerator AUD_MIC_DISABLE
disable all mic
-
enumerator AUD_MIC_MIC1_ENABLE
enable mic1
-
enumerator AUD_MIC_MIC2_ENABLE
enable mic2
-
enumerator AUD_MIC_ALL_ENABLE
enable all mic
-
enumerator AUD_MIC_MAX
-
enumerator AUD_MIC_DISABLE
-
enum aud_mic_id_t
Values:
-
enumerator AUD_MIC_MIC1
enable mic1
-
enumerator AUD_MIC_MIC2
enable mic2
-
enumerator AUD_MIC_BOTH
enable mic1 and mic2
-
enumerator AUD_MIC_MIC1
-
enum aud_gac_noise_tout_t
Values:
-
enumerator AUD_GAC_NOISE_TOUT_0
AGC noise tout: 0 0ms
-
enumerator AUD_GAC_NOISE_TOUT_4
AGC noise tout: 4 0.5ms
-
enumerator AUD_GAC_NOISE_TOUT_8
AGC noise tout: 8
-
enumerator AUD_GAC_NOISE_TOUT_16
AGC noise tout: 16
-
enumerator AUD_GAC_NOISE_TOUT_32
AGC noise tout: 32
-
enumerator AUD_GAC_NOISE_TOUT_64
AGC noise tout: 64
-
enumerator AUD_GAC_NOISE_TOUT_128
AGC noise tout: 128
-
enumerator AUD_GAC_NOISE_TOUT_256
AGC noise tout: 256 32ms
-
enumerator AUD_GAC_NOISE_TOUT_MAX
-
enumerator AUD_GAC_NOISE_TOUT_0
-
enum aud_gac_high_dur_t
Values:
-
enumerator AUD_GAC_HIGH_DUR_0
AGC 0 ms,as soon as MIC_RSSI value higher than NOISE_HIGH,Noise gating work,leave off noise status
-
enumerator AUD_GAC_HIGH_DUR_4
AGC high duration: 4 0.5ms
-
enumerator AUD_GAC_HIGH_DUR_8
AGC high duration: 8
-
enumerator AUD_GAC_HIGH_DUR_16
AGC high duration: 16
-
enumerator AUD_GAC_HIGH_DUR_32
AGC high duration: 32
-
enumerator AUD_GAC_HIGH_DUR_64
AGC high duration: 64
-
enumerator AUD_GAC_HIGH_DUR_128
AGC high duration: 128
-
enumerator AUD_GAC_HIGH_DUR_256
AGC high duration: 256 32ms
-
enumerator AUD_GAC_HIGH_DUR_MAX
-
enumerator AUD_GAC_HIGH_DUR_0
-
enum aud_gac_low_dur_t
Values:
-
enumerator AUD_GAC_LOW_DUR_0
AGC 0 ms,as soon as MIC_RSSI value lower than NOISE_HIGH,Noise gating work,leave off noise status
-
enumerator AUD_GAC_LOW_DUR_4
AGC low duration: 4 0.5ms
-
enumerator AUD_GAC_LOW_DUR_8
AGC low duration: 8
-
enumerator AUD_GAC_LOW_DUR_16
AGC low duration: 16
-
enumerator AUD_GAC_LOW_DUR_32
AGC low duration: 32
-
enumerator AUD_GAC_LOW_DUR_64
AGC low duration: 64
-
enumerator AUD_GAC_LOW_DUR_128
AGC low duration: 128
-
enumerator AUD_GAC_LOW_DUR_256
AGC low duration: 256 32ms
-
enumerator AUD_GAC_LOW_DUR_MAX
-
enumerator AUD_GAC_LOW_DUR_0
-
enum aud_dtmf_enable_t
Values:
-
enumerator AUD_DTMF_DISABLE
disable dtmf
-
enumerator AUD_DTMF_ENABLE
enable dtmf
-
enumerator AUD_DTMF_ENABLE_MAX
-
enumerator AUD_DTMF_DISABLE
-
enum aud_dtmf_tone_pattern_t
Values:
-
enumerator AUD_DTMF_TONE_PATTERN_DTMF
0: DTMF(Active_Time) + Zeros(Pause_Time)
-
enumerator AUD_DTMF_TONE_PATTERN_TONE
1:Tone1(Active_Time) + Tone2(Pause_Time)
-
enumerator AUD_DTMF_TONE_PATTERN_MAX
-
enumerator AUD_DTMF_TONE_PATTERN_DTMF
-
enum aud_dtmf_tone_mode_t
Values:
-
enumerator AUD_DTMF_TONE_MODE_SIGNAL
0:signal mode
-
enumerator AUD_DTMF_TONE_MODE_CONTIUS
1:continuous mode
-
enumerator AUD_DTMF_TONE_MODE_MAX
-
enumerator AUD_DTMF_TONE_MODE_SIGNAL
-
enum aud_dtmf_tone_attu_t
Values:
-
enumerator AUD_DTMF_TONE_ATTU_MINUS_1
Tone1 damp set: -1 db
-
enumerator AUD_DTMF_TONE_ATTU_MINUS_2
Tone1 damp set: -2 db
-
enumerator AUD_DTMF_TONE_ATTU_MINUS_3
Tone1 damp set: -3 db
-
enumerator AUD_DTMF_TONE_ATTU_MINUS_4
Tone1 damp set: -4 db
-
enumerator AUD_DTMF_TONE_ATTU_MINUS_5
Tone1 damp set: -5 db
-
enumerator AUD_DTMF_TONE_ATTU_MINUS_6
Tone1 damp set: -6 db
-
enumerator AUD_DTMF_TONE_ATTU_MINUS_7
Tone1 damp set: -7 db
-
enumerator AUD_DTMF_TONE_ATTU_MINUS_8
Tone1 damp set: -8 db
-
enumerator AUD_DTMF_TONE_ATTU_MINUS_9
Tone1 damp set: -9 db
-
enumerator AUD_DTMF_TONE_ATTU_MINUS_10
Tone1 damp set: -10 db
-
enumerator AUD_DTMF_TONE_ATTU_MINUS_11
Tone1 damp set: -11 db
-
enumerator AUD_DTMF_TONE_ATTU_MINUS_12
Tone1 damp set: -12 db
-
enumerator AUD_DTMF_TONE_ATTU_MINUS_13
Tone1 damp set: -13 db
-
enumerator AUD_DTMF_TONE_ATTU_MINUS_14
Tone1 damp set: -14 db
-
enumerator AUD_DTMF_TONE_ATTU_MINUS_15
Tone1 damp set: -15 db
-
enumerator AUD_DTMF_TONE_ATTU_MINUS_MAX
-
enumerator AUD_DTMF_TONE_ATTU_MINUS_1
-
enum aud_dtmf_tone_enable_t
Values:
-
enumerator AUD_DTMF_TONE_DISABLE
0:disable tone
-
enumerator AUD_DTMF_TONE_ENABLE
1:enable tone
-
enumerator AUD_DTMF_TONE_ENABLE_MAX
-
enumerator AUD_DTMF_TONE_DISABLE
-
enum aud_adc_fracmod_manual_en_t
Values:
-
enumerator AUD_ADC_TRACMOD_MANUAL_DISABLE
0:disable ADC fractional frequency division of manual set
-
enumerator AUD_ADC_TRACMOD_MANUAL_ENABLE
1:enable ADC fractional frequency division of manual set
-
enumerator AUD_ADC_TRACMOD_MANUAL_EN_MAX
-
enumerator AUD_ADC_TRACMOD_MANUAL_DISABLE
-
enum aud_dac_enable_t
dac enum
Values:
-
enumerator AUD_DAC_DISABLE
0:disable dac
-
enumerator AUD_DAC_ENABLE
1:enable dac
-
enumerator AUD_DAC_OTHERS
-
enumerator AUD_DAC_DISABLE
-
enum aud_dac_chl_enable_t
Values:
-
enumerator AUD_DAC_CHL_DISABLE
disable all dac channel
-
enumerator AUD_DAC_CHL_L_ENABLE
enable dac left channel
-
enumerator AUD_DAC_CHL_R_ENABLE
enable dac right channel
-
enumerator AUD_DAC_CHL_LR_ENABLE
enable dac left and right channel
-
enumerator AUD_DAC_CHL_MAX
-
enumerator AUD_DAC_CHL_DISABLE
-
enum aud_dac_work_mode_t
Values:
-
enumerator AUD_DAC_WORK_MODE_SIGNAL_END
-
enumerator AUD_DAC_WORK_MODE_DIFFEN
-
enumerator AUD_DAC_WORK_MODE_MAX
-
enumerator AUD_DAC_WORK_MODE_SIGNAL_END
-
enum aud_dac_samp_rate_t
Values:
-
enumerator AUD_DAC_SAMP_RATE_8K
DAC sample rate : 8k
-
enumerator AUD_DAC_SAMP_RATE_11_025K
DAC sample rate : 11.025k
-
enumerator AUD_DAC_SAMP_RATE_12K
DAC sample rate : 12k
-
enumerator AUD_DAC_SAMP_RATE_16K
DAC sample rate : 16k
-
enumerator AUD_DAC_SAMP_RATE_22_05K
DAC sample rate : 22.05k
-
enumerator AUD_DAC_SAMP_RATE_24K
DAC sample rate : 24k
-
enumerator AUD_DAC_SAMP_RATE_32K
DAC sample rate : 32k
-
enumerator AUD_DAC_SAMP_RATE_44_1K
DAC sample rate : 44.1k
-
enumerator AUD_DAC_SAMP_RATE_48K
DAC sample rate : 48k
-
enumerator AUD_DAC_SAMP_RATE_MAX
-
enumerator AUD_DAC_SAMP_RATE_8K
-
enum aud_dac_hpf_bypass_t
Values:
-
enumerator AUD_DAC_HPF_BYPASS_DISABLE
AUD DAC hpf bypass disable
-
enumerator AUD_DAC_HPF_BYPASS_ENABLE
AUD DAC hpf bypass enable
-
enumerator AUD_DAC_HPF_BYPASS_OTHERS
-
enumerator AUD_DAC_HPF_BYPASS_DISABLE
-
enum aud_dac_clk_invert_t
Values:
-
enumerator AUD_DAC_CLK_INVERT_RISING
AUD dac output clock edge rising
-
enumerator AUD_DAC_CLK_INVERT_FALLING
AUD dac output clock edge falling
-
enumerator AUD_DAC_CLK_INVERT_OTHERS
-
enumerator AUD_DAC_CLK_INVERT_RISING
-
enum aud_dac_int_enable_t
Values:
-
enumerator AUD_DACR_INT_DISABLE
AUD dac right channel interrupt disable
-
enumerator AUD_DACR_INT_ENABLE
AUD dac right channel interrupt enable
-
enumerator AUD_DACL_INT_DISABLE
AUD dac left channel interrupt disable
-
enumerator AUD_DACL_INT_ENABLE
AUD dac left channel interrupt enable
-
enumerator AUD_DAC_INT_OTHERS
-
enumerator AUD_DACR_INT_DISABLE
-
enum aud_dac_filt_enable_t
Values:
-
enumerator AUD_DAC_FILT_DISABLE
AUD dac filter disable
-
enumerator AUD_DAC_FILT_ENABLE
AUD dac filter enable
-
enumerator AUD_DAC_FILT_OTHERS
-
enumerator AUD_DAC_FILT_DISABLE
-
enum aud_dac_fracmod_manual_t
Values:
-
enumerator AUD_DAC_FRACMOD_MANUAL_DISABLE
disable dac fractional frequency division of manual set
-
enumerator AUD_DAC_FRACMOD_MANUAL_ENABLE
enable ADC fractional frequency division of manual set
-
enumerator ADU_DAC_FRACMOD_MANUAL_OTHERS
-
enumerator AUD_DAC_FRACMOD_MANUAL_DISABLE
-
enum aud_adc_status_mask_t
Values:
-
enumerator AUD_ADCL_NEAR_FULL_MASK
AUD ADC left channel FIFO near full
-
enumerator AUD_DTMF_NEAR_FULL_MASK
AUD DTMF FIFO near full
-
enumerator AUD_ADCL_NEAR_EMPTY_MASK
AUD ADC left channel FIFO near empty
-
enumerator AUD_DTMF_NEAR_EMPTY_MASK
AUD DTMF FIFO near empty
-
enumerator AUD_ADCL_FIFO_FULL_MASK
AUD ADC left channel FIFO full
-
enumerator AUD_DTMF_FIFO_FULL_MASK
AUD DTMF FIFO full
-
enumerator AUD_ADCL_FIFO_EMPTY_MASK
AUD ADC left channel FIFO empty
-
enumerator AUD_DTMF_FIFO_EMPTY_MASK
AUD DTMF FIFO empty
-
enumerator AUD_ADCL_NEAR_FULL_MASK
-
enum aud_dac_status_mask_t
Values:
-
enumerator AUD_DACR_NEAR_FULL_MASK
AUD DAC right channel fifo near full
-
enumerator AUD_DACL_NEAR_FULL_MASK
AUD DAC left channel fifo near full
-
enumerator AUD_DACR_NEAR_EMPTY_MASK
AUD DAC right channel fifo near empty
-
enumerator AUD_DACL_NEAR_EMPTY_MASK
AUD DAC left channel fifo near empty
-
enumerator AUD_DACR_FIFO_FULL_MASK
AUD DAC right channel fifo full
-
enumerator AUD_DACL_FIFO_FULL_MASK
AUD DAC left channel fifo full
-
enumerator AUD_DACR_FIFO_EMPTY_MASK
AUD DAC right channel fifo empty
-
enumerator AUD_DACL_FIFO_EMPTY_MASK
AUD DAC left channel fifo empty
-
enumerator AUD_DACR_NEAR_FULL_MASK