![]() |
Synergy Software Package User's Manual
|
RTOS-integrated I2S implementation of Audio Playback Interface. More...
Data Structures | |
| struct | sf_audio_playback_hw_i2s_instance_ctrl_t |
| struct | sf_audio_playback_hw_i2s_cfg_t |
Functions | |
| ssp_err_t | SF_AUDIO_PLAYBACK_HW_I2S_Open (sf_audio_playback_hw_ctrl_t *const p_api_ctrl, sf_audio_playback_hw_cfg_t const *const p_cfg) |
| Open the I2S audio driver, including the I2S HAL driver and helper timer and transfer HAL drivers. More... | |
| ssp_err_t | SF_AUDIO_PLAYBACK_HW_I2S_Start (sf_audio_playback_hw_ctrl_t *const p_ctrl) |
| Start the I2S and timer HAL drivers. More... | |
| ssp_err_t | SF_AUDIO_PLAYBACK_HW_I2S_Stop (sf_audio_playback_hw_ctrl_t *const p_api_ctrl) |
| Stop the I2S and timer HAL drivers. More... | |
| ssp_err_t | SF_AUDIO_PLAYBACK_HW_I2S_Play (sf_audio_playback_hw_ctrl_t *const p_api_ctrl, int16_t const *const p_buffer, uint32_t length) |
| Play a single audio buffer by input samples to the I2S at the sampling frequency configured by the timer. More... | |
| ssp_err_t | SF_AUDIO_PLAYBACK_HW_I2S_DataTypeGet (sf_audio_playback_hw_ctrl_t *const p_ctrl, sf_audio_playback_data_type_t *const p_data_type) |
| Provides the expected data type in the pointer p_data_type. More... | |
| ssp_err_t | SF_AUDIO_PLAYBACK_HW_I2S_Close (sf_audio_playback_hw_ctrl_t *const p_api_ctrl) |
| Close open audio driver. More... | |
| ssp_err_t | SF_AUDIO_PLAYBACK_HW_I2S_VersionGet (ssp_version_t *const p_version) |
| Stores the version of the firmware and API in provided pointer p_version. More... | |
RTOS-integrated I2S implementation of Audio Playback Interface.
The Audio Playback Framework I2S implementation uses the I2S interface for audio playback.
Name of module used by error logger macro
| ssp_err_t SF_AUDIO_PLAYBACK_HW_I2S_Close | ( | sf_audio_playback_hw_ctrl_t *const | p_api_ctrl | ) |
Close open audio driver.
| SSP_SUCCESS | Successful close. |
| SSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
Close I2S driver.
| ssp_err_t SF_AUDIO_PLAYBACK_HW_I2S_DataTypeGet | ( | sf_audio_playback_hw_ctrl_t *const | p_ctrl, |
| sf_audio_playback_data_type_t *const | p_data_type | ||
| ) |
Provides the expected data type in the pointer p_data_type.
| SSP_SUCCESS | Data type stored in p_data_type. |
| SSP_ERR_ASSERTION | The parameter p_ctrl or p_data_type is NULL. |
Store data type. The audio framework supports only 16-bit signed data.
| ssp_err_t SF_AUDIO_PLAYBACK_HW_I2S_Open | ( | sf_audio_playback_hw_ctrl_t *const | p_api_ctrl, |
| sf_audio_playback_hw_cfg_t const *const | p_cfg | ||
| ) |
Open the I2S audio driver, including the I2S HAL driver and helper timer and transfer HAL drivers.
| SSP_SUCCESS | Configuration of lower level drivers completed successfully. |
| SSP_ERR_ASSERTION | One of the following parameter is null: p_ctrl or p_cfg or p_cfg_extend->p_lower_lvl_i2s or p_cfg_extend->p_lower_lvl_i2s->p_api. |
Open I2S module
Store driver data.
| ssp_err_t SF_AUDIO_PLAYBACK_HW_I2S_Play | ( | sf_audio_playback_hw_ctrl_t *const | p_api_ctrl, |
| int16_t const *const | p_buffer, | ||
| uint32_t | length | ||
| ) |
Play a single audio buffer by input samples to the I2S at the sampling frequency configured by the timer.
| SSP_SUCCESS | Buffer playback began successfully. |
| SSP_ERR_ASSERTION | The parameter p_ctrl or p_buffer is NULL or length is less than 0x10000U. |
Reset transfer.
| ssp_err_t SF_AUDIO_PLAYBACK_HW_I2S_Start | ( | sf_audio_playback_hw_ctrl_t *const | p_ctrl | ) |
Start the I2S and timer HAL drivers.
| SSP_SUCCESS | Audio playback hardware started successfully. |
This API is not used - I2S is started when write is called from SF_AUDIO_PLAYBACK_HW_I2S_Play.
| ssp_err_t SF_AUDIO_PLAYBACK_HW_I2S_Stop | ( | sf_audio_playback_hw_ctrl_t *const | p_api_ctrl | ) |
Stop the I2S and timer HAL drivers.
| SSP_SUCCESS | Audio playback hardware stopped successfully. |
| SSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
Stop I2S.
| ssp_err_t SF_AUDIO_PLAYBACK_HW_I2S_VersionGet | ( | ssp_version_t *const | p_version | ) |
Stores the version of the firmware and API in provided pointer p_version.
| SSP_ERR_ASSERTION | The parameter p_version is NULL. |
| SSP_SUCCESS | Module version successfully stored in p_version. |