⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 audkernel.h

📁 Sunplus 8202S source code.
💻 H
字号:
#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__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -