aud.h
上传用户:fy98168
上传日期:2015-06-26
资源大小:13771k
文件大小:3k
- /*****************************************************************************
- File Name: aud.h
- Description: 5100 AUDIO header
- COPYRIGHT (C) 2004 STMicroelectronics
- *****************************************************************************/
- /* Define to prevent recursive inclusion */
- #ifndef __AUD_H
- #define __AUD_H
- /* Includes --------------------------------------------------------------- */
- #include "stddefs.h" /* STAPI includes */
- #include "staud.h"
- //#include "staudlt.h"
- #include "service.h"
- /* Exported Types ------------------------------------------------------ */
- /* Exported Constants -------------------------------------------------- */
- /* Exported Variables -------------------------------------------------- */
- extern STAUD_Handle_t AUD_Handle;
- extern ST_DeviceName_t AUD_DeviceName;
- /* Exported Macros ----------------------------------------------------- */
- #define AUD_DEVICE_TYPE STAUD_DEVICE_STI5105
- #define AUD_CLOCKRATIO 256
- #define AUD_PCMPARAM_INVWORD FALSE
- #define AUD_PCMPARAM_FORMAT STAUD_DAC_DATA_FORMAT_I2S
- #define AUD_SPKR_LEFTSURROUND FALSE
- #define AUD_SPKR_RIGHTSURROUND FALSE
- #define AUD_SPKR_CENTER FALSE
- #define AUD_SPKR_SUBWOOFER FALSE
- #define AUD_REGISTER_WORD_WIDTH STAUD_WORD_WIDTH_32
- #define AUD_INTERFACE_TYPE STAUD_INTERFACE_EMI
- #define AUD_CD_INTERFACE_TYPE STAUD_INTERFACE_EMI
- #define AUD_CD2_INTERFACE_TYPE STAUD_INTERFACE_EMI
- #define AUD_INTERFACE_BASE_ADDRESS AUDIO_BASE_ADDRESS
- #define AUD_DAC_DATA_ALIGNMENT STAUD_DAC_DATA_ALIGNMENT_LEFT_SIGNED
- #define AUD_DAC_DATA_PRECISION STAUD_DAC_DATA_PRECISION_18BITS
- #define AUD_CD_INTERFACE_BASE_ADDRESS AUDIO_BASE_ADDRESS/*AUDIO_IF_BASE_ADDRESS*/
- #define AUD_CD2_INTERFACE_BASE_ADDRESS AUDIO_BASE_ADDRESS/*AUDIO_IF_BASE_ADDRESS*/
- #define AUD_PCM1_QUEUE_SIZE 5
- #define AUD_CD1_INTERRUPT_NUMBER ST5105_AUDIO_INTERRUPT
- #define AUD_CD2_INTERRUPT_NUMBER AUD_CD2_INTERRUPT
- #define AUD_PCM_INTERRUPT_NUMBER ST5105_AUD_PCM_INTERRUPT
- #define AUD_CD1_INTERRUPT_LEVEL AUDIO_INTERRUPT_LEVEL
- #define AUD_CD2_INTERRUPT_LEVEL AUDIO_INTERRUPT_LEVEL
- #define AUD_PCM_INTERRUPT_LEVEL AUDIO_INTERRUPT_LEVEL
- /* Exported Functions -------------------------------------------------- */
- ST_ErrorCode_t AUD_Setup(KB_ServiceMode SERVICE_Mode);
- //TMTM ST_ErrorCode_t AUD_Link(U32 PTIInst);
- //TMTM ST_ErrorCode_t AUD_Unlink(U32 PTIInst);
- ST_ErrorCode_t PTI_LinkAudio (U32 PTIInst);
- ST_ErrorCode_t PTI_UnlinkAudio(U32 PTIInst);
- ST_ErrorCode_t AUD_Start(STAUD_StartParams_t *STAUD_StartParams_p);
- #endif /* __AUD_H */
- /* EOF --------------------------------------------------------------------- */