audkernel.h
资源名称:8202s.rar [点击查看]
上传用户:poi891205
上传日期:2013-07-15
资源大小:9745k
文件大小:3k
源码类别:
DVD
开发平台:
C/C++
- #ifndef __AUDKRNL_H__
- #define __AUDKRNL_H__
- #include "global.h"
- #include "types.h"
- #include "audclk.h"
- #include "audcodec.h"
- #include "dsp3rom.h"
- #include "auddef.h"
- #include "dsp3_def.h"
- /***********************************************************************
- * Define Session
- ***********************************************************************/
- UINT32 pl2_init_val;
- #ifdef MESSAGE_QUEUE
- enum _Q_CMD_TYPE_
- {
- Q_EMPTY=0, //no command in queue
- Q_CMD_STATUSACK, //status waiting command in queue
- Q_CMD_GENERALACK, //general waiting command in queue
- Q_CMD_OTHER, //other command
- }Q_CMD_TYPE;
- extern INT32 cmd_in_use;
- extern INT32 wait_cmd_count;
- #endif
- /***********************************************************************
- * Debug related Session
- ***********************************************************************/
- #ifdef AUDKRNL_DBG
- #include "sio.h"
- #include "emuio.h"
- #define MONE_DOWNLOAD_CODEC
- extern BYTE linebuf[100];
- #undef auddbg_puts
- #undef auddbg_printf
- #define auddbg_puts(s) io_write(s)
- #define auddbg_printf(s...)
- do {
- psprintf(linebuf, ##s); io_write(linebuf);
- } while (0)
- #endif
- /***********************************************************************
- * Declaration Session
- ***********************************************************************/
- void AUDKRNL_Init_AudHW_CLK(void);
- void AUDKRNL_Set_AudHW_SmpRate(unsigned fs);
- INT16 AUDKRNL_Download_DSP3Codec(const BYTE *rom, int len); //(int dsp3_coding_mode);
- void AUDKRNL_Download_Codec(int coding_mode);
- //return: 0:fail, 1:success
- #if defined(SUPPORT_SOUND_EFFECT) || defined(MESSAGE_QUEUE)
- int DSP_AudioIOControl(UINT16 wCode, UINT32 cType, UINT32 wParam);
- #else
- int DSP_AudioIOControl(UINT16 wCode, BYTE cType, UINT16 wParam);
- #endif
- #if defined(SUPPORT_MIDI) && !defined(MESSAGE_QUEUE)
- int DSP_Midi_AudioIOControl(UINT16 wCode, BYTE cType, UINT16 wParam); // MidiAudioCtrl
- #endif
- //return: -1: error, others
- //extern int AudioIOStatus(UINT16 wCode);
- #ifdef MESSAGE_QUEUE
- void DSPKRNL_Reset_MQ(); // reset_cmdQ_offset
- INT32 DSPKRNL_Push_MQ(UINT16 order, UINT32 parm1, UINT32 parm2); // put_cmd_to_Q
- INT32 DSPKRNL_Rmv_cmd_from_MQ(void); // rmv_cmd_from_Q
- INT32 DSPKRNL_Chk_cmd_in_MQ(UINT16 *order, UINT32 *parm1, UINT32 *parm2); // check_cmd_in_Q
- int exe_MidiIoCtrl(UINT16 wCode, BYTE cType, UINT16 wParam);
- int DSPKRNL_Exe_AudioIOCmd(UINT16 wCode, UINT32 cType, UINT32 wParam); // exe_audioIO_cmd
- #endif
- UINT32 AUDKRNL_LPCM_Get_BitDepthParam(UINT32 bitsample);
- UINT32 AUDKRNL_LPCM_Get_FrqParam(UINT32 samprate);
- #ifndef DVDRELEASE // 2004/12/21 yltseng
- const BYTE* AUDKRNL_Get_Current_DSP3Codec_Name();
- #endif
- #endif //#ifdef __AUDKRNL_H__