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...
 

Detailed Description

RTOS-integrated ADC implementation of Audio Recording Interface.

The Audio Recording Framework implementation uses the ADC periodic interface for audio recording.

Macro Definition Documentation

◆ SF_AUDIO_RECORD_CODE_VERSION_MAJOR

#define SF_AUDIO_RECORD_CODE_VERSION_MAJOR   (2U)

Version of code that implements the API defined in this file

Function Documentation

◆ SF_AUDIO_RECORD_ADC_Close()

ssp_err_t SF_AUDIO_RECORD_ADC_Close ( sf_audio_record_ctrl_t *const  p_api_ctrl)

Call the ADC periodic framework Close.

Implements
Return values
SSP_SUCCESSSuccessful close.
SSP_ERR_ASSERTIONp_ctrl is NULL.
SSP_ERR_NOT_OPENControl block p_ctrl is not initialized. Call SF_AUDIO_RECORD_ADC_Open to configure.
Returns
See Common Error Codes or sf_adc_periodic for other possible return codes or causes. This function calls

Call the underlying ADC periodic close

◆ SF_AUDIO_RECORD_ADC_InfoGet()

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)

Implements
Return values
SSP_SUCCESSInfoGet returns successfully.
SSP_ERR_ASSERTIONp_ctrl or p_info is null.
SSP_ERR_NOT_OPENControl block p_ctrl is not initialized. Call SF_AUDIO_RECORD_ADC_Open to configure.
Returns
See Common Error Codes or sf_adc_periodic for other possible return codes or causes.

Verify the parameters are valid

Set the channel support as MONO

◆ SF_AUDIO_RECORD_ADC_Open()

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.

Implements
Return values
SSP_SUCCESSInitialization was successful.
SSP_ERR_ASSERTIONThe 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_USEThe channel specified has already been opened.
Returns
See Common Error Codes or sf_adc_periodic for other possible return codes or causes. This function calls
Note
This function is reentrant for any unit.

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

◆ SF_AUDIO_RECORD_ADC_Start()

ssp_err_t SF_AUDIO_RECORD_ADC_Start ( sf_audio_record_ctrl_t *const  p_api_ctrl)

Call the ADC periodic framework Start.

Implements
Return values
SSP_SUCCESSADC Periodic Scan started successfully.
SSP_ERR_ASSERTIONp_ctrl is NULL.
SSP_ERR_NOT_OPENControl block p_ctrl is not initialized. Call SF_AUDIO_RECORD_ADC_Open to configure.
Returns
See Common Error Codes or sf_adc_periodic for other possible return codes or causes. This function calls

Call the underlying ADC periodic start

◆ SF_AUDIO_RECORD_ADC_Stop()

ssp_err_t SF_AUDIO_RECORD_ADC_Stop ( sf_audio_record_ctrl_t *const  p_api_ctrl)

Call the ADC periodic framework Stop.

Implements
Return values
SSP_SUCCESSPeriodic ADC scan stopped successfully.
SSP_ERR_ASSERTIONp_ctrl is NULL.
SSP_ERR_NOT_OPENControl block p_ctrl is not initialized. Call SF_AUDIO_RECORD_ADC_Open to configure.
Returns
See Common Error Codes or sf_adc_periodic for other possible return codes or causes. This function calls

Call the underlying ADC periodic start

◆ SF_AUDIO_RECORD_ADC_VersionGet()

ssp_err_t SF_AUDIO_RECORD_ADC_VersionGet ( ssp_version_t *const  p_version)

Gets version and stores it in provided pointer p_version.

Implements
Return values
SSP_SUCCESSVersionGet returned successfully.
SSP_ERR_ASSERTIONParameter p_version was null.