#ifndef __DSP_DEC_INTF_H__
#define __DSP_DEC_INTF_H__

#if CONFIG_MW_DSPB_TO_RISC
#include "queue.h"
#include "pthread.h"
#include "tsemaphore.h"
#include "u_common.h"
#include "u_priority.h"
#include "x_os.h"
#include "u_os.h"
#include "aud_dec.h"
#include "u_scc.h"
#include "u_pbinf.h"



typedef struct
{
    UINT32 u4DecType;
    UINT32 u4ChNum;
    UINT32 u4decoding_ch_config0;
    UINT32 u4decoding_ch_config1;
    UINT32 u4SampleRate;
    UINT32 u4AudSideinfoCfg;
    UINT32 u4BankSize;
    UINT32 u4Bank64;
    UINT32 u4BankMax;
    UINT32 u4BankMaxBytes;
    UINT8* pu1Buf;
    UINT8* pu1RiscBuf;
    UINT32 u4BufIdx;
    UINT32 u4BufSize;
    UINT8  u1DumpFlow[8];

}DSP_DEC_INFO_T;


typedef enum AUD_DSPB_STATUS
{
    AUD_DEC_WAIT_DSPB_INFO,
    AUD_DEC_WAIT_DSPB_READY,
    AUD_DEC_STOPPED,
    AUD_DEC_WAIT_MGR_START,
    AUD_DEC_FREE_RUNNING,
}AUD_DSPB_STATUS_T;

INT32 i4AudDSPCodecStop(UINT16 u2CompId);    // for stop
INT32 i4AudDSPCodecPaser(UINT16 u2CompId, AUD_DEC_AFIFO_T *ptAudAfifo,AUD_DEC_OUTPUT_BUF_T *ptAudDecMngrOutputBuf);    // for play
INT32 i4AudDSPCodecStart(UINT16 u2CompId, AUD_DEC_OUTPUT_BUF_T *ptAudDecMngrOutputBuf);
INT32 i4AudDspCodecFlush(UINT16 u2CompId);    // for flush
INT32 i4AudDSPSetParameter(UINT16 u2CompId, AUD_DEC_SET_INFO_T eAudDecAdaptorSetParam, void *pDecAdaptorParam);    // for set parameter
INT32 i4AudDSPGetParameter(UINT16 u2CompId, AUD_DEC_GET_INFO_T eAudDecAdaptorGetParam, void *pDecAdaptorParam);    // for get parameter
INT32 i4AudDSPLoadDecoder(AUD_DEC_FMT_T eAudFmt, UINT16 u2CompId);    // for load decoder
INT32 i4AudDSPAdaptorTrigger(UINT16 u2CompId);
INT32 i4UpDateDSPDecInfo(DSPB_INFO_T* pAudInfo,UINT32 u4DecId);
void vAudStopDspbThread(AUD_PLAYBACK_T *pAudPlayback);
void vAudFlushDoneNotify(AUD_PLAYBACK_T *pAudPlayback);
void vAudDspBDecThread();
INT32 i4AudDSPDumpEnable(BOOL u1DumpEnable);    // for stop



#endif
#endif

