| 1 | /**************************************************************************** |
|---|
| 2 | * Copyright (c) 2004 DST Technologies Inc. All Rights Reserved. |
|---|
| 3 | * |
|---|
| 4 | * Module: dsthhaldebug.h |
|---|
| 5 | * |
|---|
| 6 | * Description: DST HAL VIDEO Interface function definition |
|---|
| 7 | * |
|---|
| 8 | * |
|---|
| 9 | * |
|---|
| 10 | * notes: jfet0525 |
|---|
| 11 | * |
|---|
| 12 | ***************************************************************************/ |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | #if !defined (_DHLDEBUG_H_) |
|---|
| 16 | #define _DHLDEBUG_H_ |
|---|
| 17 | |
|---|
| 18 | #if 0 |
|---|
| 19 | #if !defined(DHL_DBGPRINTF) |
|---|
| 20 | #include <stdio.h> |
|---|
| 21 | #define DHL_DBGPRINTF printf |
|---|
| 22 | #endif |
|---|
| 23 | #endif |
|---|
| 24 | |
|---|
| 25 | #include <stdarg.h> |
|---|
| 26 | |
|---|
| 27 | #ifndef __cplusplus |
|---|
| 28 | # define DHL_DbgPrintf(...) DHL_DBGPRINTF(__FUNCTION__, __VA_ARGS__) |
|---|
| 29 | #endif |
|---|
| 30 | |
|---|
| 31 | /* |
|---|
| 32 | ACL Framework debug levels |
|---|
| 33 | */ |
|---|
| 34 | typedef enum |
|---|
| 35 | { |
|---|
| 36 | DHL_DEBUGLEVEL_None = 0, |
|---|
| 37 | DHL_DEBUGLEVEL_CriticalError, |
|---|
| 38 | DHL_DEBUGLEVEL_CriticalEvent, |
|---|
| 39 | DHL_DEBUGLEVEL_Error, |
|---|
| 40 | DHL_DEBUGLEVEL_Warning, |
|---|
| 41 | DHL_DEBUGLEVEL_Info, |
|---|
| 42 | DHL_DEBUGLEVEL_Verbose, |
|---|
| 43 | DHL_DEBUGLEVEL_Maximum |
|---|
| 44 | } DHL_DEBUGLEVEL; |
|---|
| 45 | |
|---|
| 46 | typedef enum { |
|---|
| 47 | DHLDBG_AV_AC3INFO_BITRATE = (1 << 0), //Dump Ac3 bitrate info |
|---|
| 48 | DHLDBG_AV_ADCSIBUF_FULL = (1 << 1), //Check the ADC SI buffer full (overflow) |
|---|
| 49 | DHLDBG_AV_ADCSIBUF_EMPTY = (1 << 2), //check the ADCSI buffer empty (underflow) |
|---|
| 50 | DHLDBG_AV_ADCSIBUF_DEPTH = (1 << 3), //check the ADCSI fifo buffer depth |
|---|
| 51 | DHLDBG_DBGMSG_ALL_ON = (1 << 4), //On hal debeg message |
|---|
| 52 | DHLDBG_DBGMSG_ALL_OFF = (1 << 5), //Off hal debug message |
|---|
| 53 | DHLDBG_ASKED_FE_TEST = (1 << 6), //FE test |
|---|
| 54 | DHLDBG_ASKED_INFO_TEST = (1 << 7), |
|---|
| 55 | DHLDBG_ASKED_INFO_END |
|---|
| 56 | }DHLDBG_ASKED_INFO; |
|---|
| 57 | |
|---|
| 58 | typedef enum { |
|---|
| 59 | DHLDBG_SYS = (1<<0), |
|---|
| 60 | DHLDBG_DMX = (1<<1), |
|---|
| 61 | DHLDBG_DTV = (1<<2), |
|---|
| 62 | DHLDBG_FE = (1<<3), |
|---|
| 63 | DHLDBG_DEV = (1<<4), |
|---|
| 64 | DHLDBG_COMM = (1<<5), |
|---|
| 65 | DHLDBG_CAP = (1<<6), //JFET20040615 - insert for AVCapture module |
|---|
| 66 | DDDBG_SYS = (1<<7), |
|---|
| 67 | DDDBG_DMX = (1<<8), |
|---|
| 68 | DDDBG_V = (1<<9), |
|---|
| 69 | DDDBG_AV = (1<<9), |
|---|
| 70 | DDDBG_A = (1<<10), |
|---|
| 71 | DDDBG_CAP = (1<<11), |
|---|
| 72 | DHLDBG_AUD = (1<<12), |
|---|
| 73 | DDDBG_CC = (1<<13), |
|---|
| 74 | DDDBG_G = (1<<14), |
|---|
| 75 | DHLDBG_CA = (1<<15), |
|---|
| 76 | DHLDBG_IR = (1<<16), |
|---|
| 77 | DDDBG_IR = (1<<17), |
|---|
| 78 | DHLDBG_PIC = (1<<18), |
|---|
| 79 | DHLDBG_MVS = (1<<19), //for Macrovision |
|---|
| 80 | DDDBG_MVS = (1<<20), //for Macrovision |
|---|
| 81 | DHLDBG_GFX = (1<<21), |
|---|
| 82 | DDDBG_GFX = (1<<22), |
|---|
| 83 | DHLDBG_PSI = (1<<23), |
|---|
| 84 | DDDBG_COMM = (1<<24), |
|---|
| 85 | DDDBG_FE = (1<<25), |
|---|
| 86 | DDDBG_PSI = (1<<26), |
|---|
| 87 | DHLDBG_EXT = (1<<27), |
|---|
| 88 | |
|---|
| 89 | DHLDBG_ALL = 0xFFFFFFFF |
|---|
| 90 | |
|---|
| 91 | } DHLDBG_Bitmap; |
|---|
| 92 | |
|---|
| 93 | #define DHL_ASSERT(func,result) do { if ( ((result)=(func)) != DHL_OK ) { printf("|%s| ERROR, LINE=%d\n", __FUNCTION__, __LINE__); } } while(0) |
|---|
| 94 | #define DHL_REQUIRE(cond) do { if ( !(cond) ) { printf("|%s| ERROR, LINE=%d\n", __FUNCTION__, __LINE__); } } while(0) |
|---|
| 95 | #define DHL_ENSURE(cond) do { if ( !(cond) ) { printf("|%s| ERROR, LINE=%d\n", __FUNCTION__, __LINE__); } } while(0) |
|---|
| 96 | #define DHL_CHECK(cond,result,failure) do { if ( !(cond) ) { printf("|%s| ERROR, LINE=%d\n", __FUNCTION__, __LINE__); (result)=(failure); goto done; } } while(0) |
|---|
| 97 | #define DHL_NEVER_GET_HERE() do { printf("|%s:%d| NEVER GET HERE.\n", __FUNCTION__, __LINE__); } while(0) |
|---|
| 98 | |
|---|
| 99 | #if defined __cplusplus |
|---|
| 100 | extern "C" { |
|---|
| 101 | #endif |
|---|
| 102 | |
|---|
| 103 | void DHL_DBGPRINTF(const char *Function, DS_U32 Level, DS_U32 bmDbgComponent, char *Format, ...); |
|---|
| 104 | void DHL_SetDbgLevel( DS_U32 Level ); |
|---|
| 105 | DS_U32 DHL_GetDbgLevel( void ); |
|---|
| 106 | void DHL_SetDbgMsgLevel( DS_U32 MsgLevel ); |
|---|
| 107 | void DHL_SetDbgComponent( DS_U32 bmDbgComponent ); |
|---|
| 108 | void DHL_ClrDbgComponent( DS_U32 bmDbgComponent ); |
|---|
| 109 | void DHL_DbgStatus(void); |
|---|
| 110 | //set the ACL Debug level |
|---|
| 111 | void DHL_DBG_SetAclDbgLvl(DHL_DEBUGLEVEL DebugLevel); |
|---|
| 112 | void DHL_DBG_SetHkdDbgLvl(DS_U32 HkdDbgLvl); |
|---|
| 113 | |
|---|
| 114 | #if defined __cplusplus |
|---|
| 115 | } |
|---|
| 116 | #endif |
|---|
| 117 | |
|---|
| 118 | #endif /* _DHLDEBUG_H_ */ |
|---|
| 119 | |
|---|