This file provides the Audio driver for the STM32H747I_DISCO board. More...
Go to the source code of this file.
Functions | |
int32_t | BSP_AUDIO_IN_DeInit (uint32_t Instance) |
Deinit the audio IN peripherals. More... | |
__weak void | BSP_AUDIO_IN_Error_CallBack (uint32_t Instance) |
Audio IN Error callback function. More... | |
int32_t | BSP_AUDIO_IN_GetBitsPerSample (uint32_t Instance, uint32_t *BitsPerSample) |
Get Audio In Resolution. More... | |
int32_t | BSP_AUDIO_IN_GetChannelsNbr (uint32_t Instance, uint32_t *ChannelNbr) |
Get Audio In Channel number. More... | |
int32_t | BSP_AUDIO_IN_GetDevice (uint32_t Instance, uint32_t *Device) |
Get Audio In device. More... | |
int32_t | BSP_AUDIO_IN_GetSampleRate (uint32_t Instance, uint32_t *SampleRate) |
Get Audio In frequency. More... | |
int32_t | BSP_AUDIO_IN_GetState (uint32_t Instance, uint32_t *State) |
Get Audio In device. More... | |
int32_t | BSP_AUDIO_IN_GetVolume (uint32_t Instance, uint32_t *Volume) |
Get the current audio in volume level. More... | |
__weak void | BSP_AUDIO_IN_HalfTransfer_CallBack (uint32_t Instance) |
Manages the DMA Half Transfer complete event. More... | |
int32_t | BSP_AUDIO_IN_Init (uint32_t Instance, BSP_AUDIO_Init_t *AudioInit) |
Initialize wave recording. More... | |
void | BSP_AUDIO_IN_IRQHandler (uint32_t Instance, uint32_t InputDevice) |
This function handles Audio Out DMA interrupt requests. More... | |
int32_t | BSP_AUDIO_IN_Pause (uint32_t Instance) |
Pause the audio file stream. More... | |
int32_t | BSP_AUDIO_IN_PDMToPCM (uint32_t Instance, uint16_t *PDMBuf, uint16_t *PCMBuf) |
Converts audio format from PDM to PCM. More... | |
int32_t | BSP_AUDIO_IN_PDMToPCM_Init (uint32_t Instance, uint32_t AudioFreq, uint32_t ChnlNbrIn, uint32_t ChnlNbrOut) |
Initialize the PDM library. More... | |
int32_t | BSP_AUDIO_IN_Record (uint32_t Instance, uint8_t *pBuf, uint32_t NbrOfBytes) |
Start audio recording. More... | |
int32_t | BSP_AUDIO_IN_RecordPDM (uint32_t Instance, uint8_t *pBuf, uint32_t NbrOfBytes) |
Start audio recording. More... | |
int32_t | BSP_AUDIO_IN_Resume (uint32_t Instance) |
Resume the audio file stream. More... | |
int32_t | BSP_AUDIO_IN_SetBitsPerSample (uint32_t Instance, uint32_t BitsPerSample) |
Set Audio In Resolution. More... | |
int32_t | BSP_AUDIO_IN_SetChannelsNbr (uint32_t Instance, uint32_t ChannelNbr) |
Set Audio In Channel number. More... | |
int32_t | BSP_AUDIO_IN_SetDevice (uint32_t Instance, uint32_t Device) |
Set Audio In device. More... | |
int32_t | BSP_AUDIO_IN_SetSampleRate (uint32_t Instance, uint32_t SampleRate) |
Set Audio In frequency. More... | |
int32_t | BSP_AUDIO_IN_SetVolume (uint32_t Instance, uint32_t Volume) |
Set the current audio in volume level. More... | |
int32_t | BSP_AUDIO_IN_Stop (uint32_t Instance) |
Stop audio recording. More... | |
__weak void | BSP_AUDIO_IN_TransferComplete_CallBack (uint32_t Instance) |
User callback when record buffer is filled. More... | |
int32_t | BSP_AUDIO_OUT_DeInit (uint32_t Instance) |
De-initializes the audio out peripheral. More... | |
__weak void | BSP_AUDIO_OUT_Error_CallBack (uint32_t Instance) |
Manages the DMA FIFO error event. More... | |
int32_t | BSP_AUDIO_OUT_GetBitsPerSample (uint32_t Instance, uint32_t *BitsPerSample) |
Get the audio Resolution. More... | |
int32_t | BSP_AUDIO_OUT_GetChannelsNbr (uint32_t Instance, uint32_t *ChannelNbr) |
Get the audio Channels number. More... | |
int32_t | BSP_AUDIO_OUT_GetDevice (uint32_t Instance, uint32_t *Device) |
Get the Output Device. More... | |
int32_t | BSP_AUDIO_OUT_GetSampleRate (uint32_t Instance, uint32_t *SampleRate) |
Get the audio frequency. More... | |
int32_t | BSP_AUDIO_OUT_GetState (uint32_t Instance, uint32_t *State) |
Get Audio Out state. More... | |
int32_t | BSP_AUDIO_OUT_GetVolume (uint32_t Instance, uint32_t *Volume) |
Get the current audio volume level. More... | |
__weak void | BSP_AUDIO_OUT_HalfTransfer_CallBack (uint32_t Instance) |
Manages the DMA Half Transfer complete event. More... | |
int32_t | BSP_AUDIO_OUT_Init (uint32_t Instance, BSP_AUDIO_Init_t *AudioInit) |
Configures the audio peripherals. More... | |
void | BSP_AUDIO_OUT_IRQHandler (uint32_t Instance) |
int32_t | BSP_AUDIO_OUT_IsMute (uint32_t Instance, uint32_t *IsMute) |
Check whether the MUTE mode is enabled or not. More... | |
int32_t | BSP_AUDIO_OUT_Mute (uint32_t Instance) |
Enables the MUTE. More... | |
int32_t | BSP_AUDIO_OUT_Pause (uint32_t Instance) |
This function Pauses the audio file stream. In case of using DMA, the DMA Pause feature is used. More... | |
int32_t | BSP_AUDIO_OUT_Play (uint32_t Instance, uint8_t *pData, uint32_t NbrOfBytes) |
Default BSP AUDIO OUT Msp Callbacks. More... | |
int32_t | BSP_AUDIO_OUT_Resume (uint32_t Instance) |
Resumes the audio file stream. More... | |
int32_t | BSP_AUDIO_OUT_SetBitsPerSample (uint32_t Instance, uint32_t BitsPerSample) |
Set the audio Resolution. More... | |
int32_t | BSP_AUDIO_OUT_SetChannelsNbr (uint32_t Instance, uint32_t ChannelNbr) |
Set the audio Channels number. More... | |
int32_t | BSP_AUDIO_OUT_SetDevice (uint32_t Instance, uint32_t Device) |
Switch dynamically (while audio file is played) the output target (speaker or headphone). More... | |
int32_t | BSP_AUDIO_OUT_SetSampleRate (uint32_t Instance, uint32_t SampleRate) |
Updates the audio frequency. More... | |
int32_t | BSP_AUDIO_OUT_SetVolume (uint32_t Instance, uint32_t Volume) |
Controls the current audio volume level. More... | |
int32_t | BSP_AUDIO_OUT_Stop (uint32_t Instance) |
Stops audio playing and Power down the Audio Codec. More... | |
__weak void | BSP_AUDIO_OUT_TransferComplete_CallBack (uint32_t Instance) |
Manages the DMA full Transfer complete event. More... | |
int32_t | BSP_AUDIO_OUT_UnMute (uint32_t Instance) |
Disables the MUTE mode. More... | |
void | HAL_SAI_ErrorCallback (SAI_HandleTypeDef *hsai) |
SAI error callbacks. More... | |
void | HAL_SAI_RxCpltCallback (SAI_HandleTypeDef *hsai) |
Reception complete callback. More... | |
void | HAL_SAI_RxHalfCpltCallback (SAI_HandleTypeDef *hsai) |
Half reception complete callback. More... | |
void | HAL_SAI_TxCpltCallback (SAI_HandleTypeDef *hsai) |
Tx Transfer completed callbacks. More... | |
void | HAL_SAI_TxHalfCpltCallback (SAI_HandleTypeDef *hsai) |
Tx Half Transfer completed callbacks. More... | |
__weak HAL_StatusTypeDef | MX_SAI1_Block_A_Init (SAI_HandleTypeDef *hsai, MX_SAI_Config_t *MXConfig) |
Initializes the Audio Codec audio out instance (SAI). More... | |
__weak HAL_StatusTypeDef | MX_SAI1_Block_B_Init (SAI_HandleTypeDef *hsai, MX_SAI_Config_t *MXConfig) |
Initializes the Audio Codec audio in instance (SAI). More... | |
__weak HAL_StatusTypeDef | MX_SAI1_ClockConfig (SAI_HandleTypeDef *hsai, uint32_t SampleRate) |
SAI clock Config. More... | |
__weak HAL_StatusTypeDef | MX_SAI4_Block_A_Init (SAI_HandleTypeDef *hsai, MX_SAI_Config_t *MXConfig) |
Initializes the Audio Codec audio in instance (SAI). More... | |
__weak HAL_StatusTypeDef | MX_SAI4_ClockConfig (SAI_HandleTypeDef *hsai, uint32_t SampleRate) |
SAI clock Config. More... | |
static void | SAI_MspDeInit (SAI_HandleTypeDef *hsai) |
Deinitializes SAI MSP. More... | |
static void | SAI_MspInit (SAI_HandleTypeDef *hsai) |
Initialize BSP_AUDIO_OUT MSP. More... | |
Variables | |
void * | Audio_CompObj = NULL |
static AUDIO_Drv_t * | Audio_Drv = NULL |
AUDIO_IN_Ctx_t | Audio_In_Ctx [AUDIO_IN_INSTANCES_NBR] = {0} |
AUDIO_OUT_Ctx_t | Audio_Out_Ctx [AUDIO_OUT_INSTANCES_NBR] = {0} |
SAI_HandleTypeDef | haudio_in_sai |
SAI_HandleTypeDef | haudio_out_sai |
static PDM_Filter_Config_t | PDM_FilterConfig [2] |
static PDM_Filter_Handler_t | PDM_FilterHandler [2] |
This file provides the Audio driver for the STM32H747I_DISCO board.
This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause
Definition in file stm32h747i_discovery_audio.c.