/**************************************************************************** * Copyright (c) 2004 DST Technologies Inc. All Rights Reserved. * * Module: dsthhaldebug.h * * Description: DST HAL VIDEO Interface function definition * * * * notes: jfet0525 * ***************************************************************************/ #if !defined (_DHLDEBUG_H_) #define _DHLDEBUG_H_ #if 0 #if !defined(DHL_DBGPRINTF) #include #define DHL_DBGPRINTF printf #endif #endif #include #ifndef __cplusplus # define DHL_DbgPrintf(...) DHL_DBGPRINTF(__FUNCTION__, __VA_ARGS__) #endif /* ACL Framework debug levels */ typedef enum { DHL_DEBUGLEVEL_None = 0, DHL_DEBUGLEVEL_CriticalError, DHL_DEBUGLEVEL_CriticalEvent, DHL_DEBUGLEVEL_Error, DHL_DEBUGLEVEL_Warning, DHL_DEBUGLEVEL_Info, DHL_DEBUGLEVEL_Verbose, DHL_DEBUGLEVEL_Maximum } DHL_DEBUGLEVEL; typedef enum { DHLDBG_AV_AC3INFO_BITRATE = (1 << 0), //Dump Ac3 bitrate info DHLDBG_AV_ADCSIBUF_FULL = (1 << 1), //Check the ADC SI buffer full (overflow) DHLDBG_AV_ADCSIBUF_EMPTY = (1 << 2), //check the ADCSI buffer empty (underflow) DHLDBG_AV_ADCSIBUF_DEPTH = (1 << 3), //check the ADCSI fifo buffer depth DHLDBG_DBGMSG_ALL_ON = (1 << 4), //On hal debeg message DHLDBG_DBGMSG_ALL_OFF = (1 << 5), //Off hal debug message DHLDBG_ASKED_FE_TEST = (1 << 6), //FE test DHLDBG_ASKED_INFO_TEST = (1 << 7), DHLDBG_ASKED_INFO_END }DHLDBG_ASKED_INFO; typedef enum { DHLDBG_SYS = (1<<0), DHLDBG_DMX = (1<<1), DHLDBG_DTV = (1<<2), DHLDBG_FE = (1<<3), DHLDBG_DEV = (1<<4), DHLDBG_COMM = (1<<5), DHLDBG_CAP = (1<<6), //JFET20040615 - insert for AVCapture module DDDBG_SYS = (1<<7), DDDBG_DMX = (1<<8), DDDBG_V = (1<<9), DDDBG_AV = (1<<9), DDDBG_A = (1<<10), DDDBG_CAP = (1<<11), DHLDBG_AUD = (1<<12), DDDBG_CC = (1<<13), DDDBG_G = (1<<14), DHLDBG_CA = (1<<15), DHLDBG_IR = (1<<16), DDDBG_IR = (1<<17), DHLDBG_PIC = (1<<18), DHLDBG_MVS = (1<<19), //for Macrovision DDDBG_MVS = (1<<20), //for Macrovision DHLDBG_GFX = (1<<21), DDDBG_GFX = (1<<22), DHLDBG_PSI = (1<<23), DDDBG_COMM = (1<<24), DDDBG_FE = (1<<25), DDDBG_PSI = (1<<26), DHLDBG_EXT = (1<<27), DHLDBG_ALL = 0xFFFFFFFF } DHLDBG_Bitmap; #define DHL_ASSERT(func,result) do { if ( ((result)=(func)) != DHL_OK ) { printf("|%s| ERROR, LINE=%d\n", __FUNCTION__, __LINE__); } } while(0) #define DHL_REQUIRE(cond) do { if ( !(cond) ) { printf("|%s| ERROR, LINE=%d\n", __FUNCTION__, __LINE__); } } while(0) #define DHL_ENSURE(cond) do { if ( !(cond) ) { printf("|%s| ERROR, LINE=%d\n", __FUNCTION__, __LINE__); } } while(0) #define DHL_CHECK(cond,result,failure) do { if ( !(cond) ) { printf("|%s| ERROR, LINE=%d\n", __FUNCTION__, __LINE__); (result)=(failure); goto done; } } while(0) #define DHL_NEVER_GET_HERE() do { printf("|%s:%d| NEVER GET HERE.\n", __FUNCTION__, __LINE__); } while(0) #if defined __cplusplus extern "C" { #endif void DHL_DBGPRINTF(const char *Function, DS_U32 Level, DS_U32 bmDbgComponent, char *Format, ...); void DHL_SetDbgLevel( DS_U32 Level ); DS_U32 DHL_GetDbgLevel( void ); void DHL_SetDbgMsgLevel( DS_U32 MsgLevel ); void DHL_SetDbgComponent( DS_U32 bmDbgComponent ); void DHL_ClrDbgComponent( DS_U32 bmDbgComponent ); void DHL_DbgStatus(void); //set the ACL Debug level void DHL_DBG_SetAclDbgLvl(DHL_DEBUGLEVEL DebugLevel); void DHL_DBG_SetHkdDbgLvl(DS_U32 HkdDbgLvl); #if defined __cplusplus } #endif #endif /* _DHLDEBUG_H_ */