![]() |
Synergy Software Package User's Manual
|
RTOS-integrated ADC implementation of Audio Recording Interface. More...
Data Structures | |
| struct | sf_audio_record_adc_instance_ctrl_t |
| Control block for audio recording Initialization occurs when sf_audio_record_api_t::open is called. More... | |
Macros | |
| #define | SF_AUDIO_RECORD_CODE_VERSION_MAJOR (2U) |
Functions | |
| ssp_err_t | SF_AUDIO_RECORD_ADC_Open (sf_audio_record_ctrl_t *const p_api_ctrl, sf_audio_record_cfg_t const *const p_cfg) |
| Configure the ADC with user configurations. More... | |
| ssp_err_t | SF_AUDIO_RECORD_ADC_Close (sf_audio_record_ctrl_t *const p_api_ctrl) |
| Call the ADC periodic framework Close. More... | |
| ssp_err_t | SF_AUDIO_RECORD_ADC_Start (sf_audio_record_ctrl_t *const p_api_ctrl) |
| Call the ADC periodic framework Start. More... | |
| ssp_err_t | SF_AUDIO_RECORD_ADC_Stop (sf_audio_record_ctrl_t *const p_api_ctrl) |
| Call the ADC periodic framework Stop. More... | |
| ssp_err_t | SF_AUDIO_RECORD_ADC_InfoGet (sf_audio_record_ctrl_t *const p_api_ctrl, sf_audio_record_info_t *p_info) |
| Provide information about the channel supported by audio recording framework(MONO) More... | |
| ssp_err_t | SF_AUDIO_RECORD_ADC_VersionGet (ssp_version_t *const p_version) |
| Gets version and stores it in provided pointer p_version. More... | |
RTOS-integrated ADC implementation of Audio Recording Interface.
The Audio Recording Framework implementation uses the ADC periodic interface for audio recording.
| #define SF_AUDIO_RECORD_CODE_VERSION_MAJOR (2U) |
Version of code that implements the API defined in this file
| ssp_err_t SF_AUDIO_RECORD_ADC_Close | ( | sf_audio_record_ctrl_t *const | p_api_ctrl | ) |
Call the ADC periodic framework Close.
| SSP_SUCCESS | Successful close. |
| SSP_ERR_ASSERTION | p_ctrl is NULL. |
| SSP_ERR_NOT_OPEN | Control block p_ctrl is not initialized. Call SF_AUDIO_RECORD_ADC_Open to configure. |
Call the underlying ADC periodic close
| ssp_err_t SF_AUDIO_RECORD_ADC_InfoGet | ( | sf_audio_record_ctrl_t *const | p_api_ctrl, |
| sf_audio_record_info_t * | p_info | ||
| ) |
Provide information about the channel supported by audio recording framework(MONO)
| SSP_SUCCESS | InfoGet returns successfully. |
| SSP_ERR_ASSERTION | p_ctrl or p_info is null. |
| SSP_ERR_NOT_OPEN | Control block p_ctrl is not initialized. Call SF_AUDIO_RECORD_ADC_Open to configure. |
Verify the parameters are valid
Set the channel support as MONO
| ssp_err_t SF_AUDIO_RECORD_ADC_Open | ( | sf_audio_record_ctrl_t *const | p_api_ctrl, |
| sf_audio_record_cfg_t const *const | p_cfg | ||
| ) |
Configure the ADC with user configurations.
The SF_AUDIO_RECORD_ADC_Open will initialize the configurations for the underlying ADC periodic framework.
| SSP_SUCCESS | Initialization was successful. |
| SSP_ERR_ASSERTION | The parameter p_ctrl or p_cfg is NULL. Or any one of the following p_cfg parameter is NULL/zero. p_cfg->p_capture_data_buffer, p_cfg->sample_count, p_cfg->capture_data_buffer_size, p_cfg->p_callback, p_cfg->sampling_rate_hz. Or resolution or time period is not matching. for other possible causes. |
| SSP_ERR_IN_USE | The channel specified has already been opened. |
Initialize the ADC periodic framework
Initialize the configuration parameters for ADC periodic configuration structure
Configure the ADC resolution depending on the data width in cfg
Call the underlying ADC periodic open
| ssp_err_t SF_AUDIO_RECORD_ADC_Start | ( | sf_audio_record_ctrl_t *const | p_api_ctrl | ) |
Call the ADC periodic framework Start.
| SSP_SUCCESS | ADC Periodic Scan started successfully. |
| SSP_ERR_ASSERTION | p_ctrl is NULL. |
| SSP_ERR_NOT_OPEN | Control block p_ctrl is not initialized. Call SF_AUDIO_RECORD_ADC_Open to configure. |
Call the underlying ADC periodic start
| ssp_err_t SF_AUDIO_RECORD_ADC_Stop | ( | sf_audio_record_ctrl_t *const | p_api_ctrl | ) |
Call the ADC periodic framework Stop.
| SSP_SUCCESS | Periodic ADC scan stopped successfully. |
| SSP_ERR_ASSERTION | p_ctrl is NULL. |
| SSP_ERR_NOT_OPEN | Control block p_ctrl is not initialized. Call SF_AUDIO_RECORD_ADC_Open to configure. |
Call the underlying ADC periodic start
| ssp_err_t SF_AUDIO_RECORD_ADC_VersionGet | ( | ssp_version_t *const | p_version | ) |
Gets version and stores it in provided pointer p_version.
| SSP_SUCCESS | VersionGet returned successfully. |
| SSP_ERR_ASSERTION | Parameter p_version was null. |