📄 winav.h
字号:
/************************************************************************** (C)Copyright Cheertek Inc. 2002-2003, D300, all right reserved Product : Cheertek W99AV series Firmware Chip : CT908 Date : 2001.02.26. Author : Cheertek (D300 Micky) Purpose : types, macro and definitions Version 2.00 Sources : winav.h****************************************************************************///////////////////////////////////////////////////////////////// ***** Big Modification History Area *****// Micky1.00// - Remove W9928AF VERSION_xxx// - Remove W9928AF related system define DVD28A_xxx/ DVD_28C_xxx.// - Remove the CHIP_9928 related codes#ifndef __WINAV_H__#define __WINAV_H__// Micky2.17c#ifdef __cplusplus extern "C" {#endif// Micky2.17#include "platform.h"//Auto testing definition, open this definition to enable Auto testing //#define SUPPORT_OSDTIME_OUTPUT//AutoTuning definition, open this definition to use AutoTuning, Ben, May/05/2006.//#define AutoTuning_MPEG// LLY2.36a, don't power donw MPLL while do servo do auto tuning job.#ifdef AutoTuning_MPEG#define NOT_POWERDOWN_MPLL#endif // #ifdef AutoTuning_MPEG// wyc2.76-909P,// IC Version// peteryu275, add for IC check version, 2007/3/22 11:31AM#define IC_VERSION_RESERVED (0x0001) //reserved for old version#define IC_VERSION_909R (0x0010) //909S#define IC_VERSION_219 (0x0011)#define IC_VERSION_909P_A_W (0x0020)#define IC_VERSION_909P_B_X (0x0021)#define IC_VERSION_909G (0x0030)#define IC_VERSION_950A (0x0040)#define IC_VERSION_952A (0x0041)#define IC_VERSION_955A (0x0042)#define IC_VERSION_956A (0x0043)#define IC_VERSION_956A_DEV (0x0044)#define IC_VERSION_951 (0x0045)#define IC_VERSION_908G (0x00f0)//peteryu275, add for IC check version, 2007/3/22 11:31AM end////////////////////////////////////////////////// ****** Programmer/Developer's Zone ******////////////////////////////////////////////////// Flash code version//alex1.21,Support 4M W29C040// F/W write the version to DRAM, Flash tool will check the version from DRAM.//alex080. support cd rom upgrade#define TOOLS_SW_VERSION 6L // Alex080, must use mergerom 003#define ECOS_PACKAGE_VERSION 0x200// wyc2.03-909s, move 909S relative define to here because of decoder system define in customer.h need to reference it.#define FLASH_SW_VERSION 1300L // Alex080, must use flash 075// Micky1.10-2, add define for select MCCRBASE#define PLL_399MHZ 1 // PLL run 399 MMz#define PLL_360MHZ 2 // PLL run 360 MHz#define MPEG_PLL PLL_360MHZ#define SUPPORT_HW_DETECT_CHIPS_VERSION //Kevin1.08, detect CT908-A/D/M/Z//////////////////////////////////////// Can define it for release// define it, the following definitions will be Enable// [ENABLE_PANEL_KEYSCAN];// define it, F/W will suppport panel volume adjustment button// [ENABLE_PANEL_VOLUME_ADJUSTMENT_BUTTON];// define it, the following definitions will be Disable// [_DEBUG_INFO];//#define RELEASE_SETTING////////////////////////////////////////////////// ****** System Configuration Zone ******////////////////////////////////////////////////// Must select only one interface and others should be disable// define it, the stream input path is from HOST_IF#define BITSTREAM_ATAPIIF 1#define BITSTREAM_DVDIF 2#define BITSTREAM_CDIF 3#define BITSTREAM_HOSTIF 4// add chip version number protect// define the chip version number that F/W can support// for BAE, the value should be VERSION_BAE///#define SUPPORT_CHIP_VERSION VERSION_BBA//////////////////////////////////////////////////////////////////////////// LLY.171-1, define all the power on mode// bit[0]: 1, pseudo power down; 2, total shutdown;// It will be refered by HAL_PowerDown() & INITIAL_System()// [IR_POWERDOWN_MODE]// Total shutdown for MPEG chip/ PANEL/ TV Encoder/ Audio DAC// and reserve uP and SRAM active#define TOTAL_SHUTDOWN 0x02// Pseudo power down mode: only turn-off some MPEG chip block, and only reserve// three block -- VBI VCLK/ DBI SDCLK/ RISC/DBI MCLK-- PWRCR[3, 5, 12]#define PSEUDO_SHUTDOWN 0x01 // pseudo power down mode// The combination of hareware shutdown case : all peripheral all enter power down// it's only for F/W reference#define HARDWARE_SHUTDOWN 0x04 // hardware power on | total shutdown// bit[7]: 1, enter power down mode; 0, wake-up from power down mode#define ENTER_POWERDOWN 0x20 // enter power down mode#define INITIAL_SYSTEM 0x10 // leave power down mode#define USB1_1_CT909R 1#define USB2_0_CHIPIDEA 2#define USB2_0_JUNGO 3// wyc2.75-909P, add one case to define no USB mode.#define USB_NONE 4//CoCo2.37, move it before customer.h//#define SUPPORT_ATAPI_SOURCE#define SUPPORT_SERVO_SOURCE// wyc1.01-909, support USB in DVD_101.// wyc1.02-909, don't enable USB when ATAPI is enabled. Because not sure if there are bugs in this situration.#ifndef SUPPORT_ATAPI_SOURCE#if defined(CT909R_IC_SYSTEM) || defined(CT909P_IC_SYSTEM)#define SUPPORT_USB//wyc2.78-909P, the define to support usb host+device mode.// #define SUPPORT_USB_HOST_DEVICE#elif defined(CT909G_IC_SYSTEM)#define USB_SYSTEM USB_NONE#endif //#ifdef SUPPORT_USB#define SUPPORT_USB_SOURCE#define SUPPORT_FAT_FILE_SYSTEM// wyc2.77-909p, the define to enable the usb performance code. Default is disabled.// #define TEST_DEVICE_PERFORMANCE// wyc1.05-909, add one define to only parse in video / audio only files.//#define USB_DONT_SUPPORT_MOTION_FILES// wyc2.71-portusb,#if defined (CT909P_IC_SYSTEM)#define USB_SYSTEM USB2_0_JUNGO#define CTK_CARDREADER#elif defined (CT909R_IC_SYSTEM)#define USB_SYSTEM USB1_1_CT909R#endif //#endif //#endif //// DVD_100Micky, put customer setting into customer.h#include "customer.h"// wyc2.16-909S, include internal.h here.#include "internal.h"#ifdef SERIAL_DEBUG#include "debug.h"// Micky2.17c#ifdef APPLICATION_WINDOWS#define PRINTF DBG_Printf_Simple#define printf DBG_Printf_Simplevoid DBG_Printf_Simple(char *fmt, ...);#else#define PRINTF(x, y...) DBG_Printf(DBG_THREAD_CHEERDVD, DBG_INFO_PRINTF, x, ## y)#define printf(x, y...) DBG_Printf(DBG_THREAD_CHEERDVD, DBG_INFO_PRINTF, x, ## y)#endif// wyc2.16-909Svoid PRINTF_GENE(char *fmt, ...);void printf_GENE(char *fmt, ...);//#define PRINTF PRINTF_GENE//#define printf printf_GENE#endif //#ifndef CPU_SPEED// LLY2.13, set CPU working speed as 133MHz as default#define CPU_SPEED CPU_133M#endif // #ifndef CPU_SPEED////////////////////////////////////////// Please choose one IC.// Must Assign the ID(TV_ENCODER_ID) as I2C ID if the IC use I2C to control.#define TV_GENERAL 0x00 // no-need for control#define TV_W9954 0x01#define TV_SAA7120 0x03 //#define TV_ADV7170 0x04 // TV encoder with YUV#define TV_CS4954 0x05 // ** 0.40;#define TV_AV3168 0x06 // ** 0.45;#define I2C_ID_EEPROM 0xA0//audio DAC configuration#define DAC_GENERAL 0 //If No need to program, define as DAC_GENERAL#define DAC_CS4334 DAC_GENERAL#define DAC_WM8746 1#define DAC_PCM1723 2#define DAC_PCM1723_WM8746 3#define DAC_CE2752 4#define DAC_W571C161 5#define DAC_INTERNAL 6 // LLY1.50//AUDIO_ALIGN_FORMAT#define RIGHT_ALIGN 0#define I2S_ALIGN 1#define LEFT_ALIGN 2//FS#define ACLK_384FS 0#define ACLK_256FS 1#define ACLK_192FS 2#define ACLK_128FS 3//audio volume adjustment source in AV system#define ANALOG_WM8746 0x1#define DIGITAL_DDX8000 0x2// LLY2.11, define the storage type ID#define SERIAL_FLASH 1#define EEPROM 2#define NO_STORAGE 0xff// ******************************// SUPPORT zone for the explanation of supporting variety// ******************************// DVD_161Micky, support Loading-> Setup-> Exit, will continue loading action/// #define SUPPORT_LOADING_SETUP// DVD_104Micky, add a define for mic. control//define it, means system support mic. on/off control pin./// #define SUPPORT_MIC_CONTROL/// #define SUPPORT_MIC_CONTROL_INV // inverse control// ** TCH1.54; Support __sbMicDetect Pin for Mic I/P./// #define SUPPORT_MIC_DETECT // Active= LOW. Mic has I/P/// #define SUPPORT_MIC_DETECT_INV // Active= HIGH. Mic has I/P.// define it, means System support Scart_IF only.// Depends on Board Configuration.// SUPPORT_SCART_IF_GPIO is controlled by GPIO,// SUPPORT_SCART_IF is controlled by CPU_IO.//#define SUPPORT_SCART_IF//#define SUPPORT_SCART_IF_GPIO // ** TCH1.00a;// define it, means System support max. PCM_LENGTH.// Depends on AudioDAC Configuration.//#define SUPPORT_PCM_WORD_LENGTH xx (xx mean "16", "18", "20", 24")// define it, means System support Audio DAC Reset Pin. Active is LOW, means reset state.// Depends on Board Configuration.//#define SUPPORT_AUDIODAC_RESET//////////////////////////////////////////////////////// Configuration for the Decoder System// If NO need to program ADAC, #define AUDIO_DAC DAC_GENERAL//Note: #define SUPPORT_PCM_WORD_LENGTH 24 for Dolby Certification#if (DECODER_SYSTEM == DVD909_EVAL)#define SUPPORT_PCM_WORD_LENGTH 16#define AUDIO_DAC DAC_WM8746 // default format is right align + 24#define AUDIO_ALIGN_FORMAT I2S_ALIGN#endif#if (DECODER_SYSTEM == DVD909_HFY)#define SUPPORT_PCM_WORD_LENGTH 24#define AUDIO_DAC DAC_W571C161 // default format is right align + 16 bit#define AUDIO_ALIGN_FORMAT RIGHT_ALIGN#endif// LLY1.50, add for CT909S evaluation board#if (DECODER_SYSTEM == DVD909S_EVAL)// [Audio DAC]// (1) : Internal ADAC + W571C161// Notice: Internal ADAC default format : I2S + 24 bit#define ENABLE_INTERNAL_ADAC#define AUDIO_DAC DAC_W571C161#define SUPPORT_PCM_WORD_LENGTH 24#define AUDIO_ALIGN_FORMAT I2S_ALIGN// (2) : Internal ADAC only// LLY2.17, use internal Audio DAC only (default format is I2S + 24 bit)// So, support two channel only: disable PCMSD0/1/2, and let it work as GPIO// Notice: Don't choose any AUDIO_DAC for external ADAC//#define USE_INTERNAL_ADAC_ONLY//#define ENABLE_INTERNAL_ADAC//#define AUDIO_DAC DAC_INTERNAL//#define SUPPORT_PCM_WORD_LENGTH 24//#define AUDIO_ALIGN_FORMAT I2S_ALIGN// [Storage Type]#define STORAGE_TYPE EEPROM// [Total pin define]#define PIN_216#define IC_VERSION_ID IC_VERSION_909R#define CS_UPGAP_NAME "UPG909S.AP"#endif // #if (DECODER_SYSTEM == DVD909S_EVAL)// LLY2.11, add for CT909R evaluation board#if (DECODER_SYSTEM == DVD909R_EVAL)// [Audio DAC] : Internal ADAC only// LLY2.17, use internal Audio DAC only (default format is I2S + 24 bit)// So, support two channel only: disable PCMSD0/1/2, and let it work as GPIO// Notice: Don't choose any AUDIO_DAC for external ADAC#define USE_INTERNAL_ADAC_ONLY#define ENABLE_INTERNAL_ADAC#define AUDIO_DAC DAC_INTERNAL#define SUPPORT_PCM_WORD_LENGTH 24#define AUDIO_ALIGN_FORMAT I2S_ALIGN// [Storage Type]// Use serial flash to save setup information.#define STORAGE_TYPE SERIAL_FLASH#define IC_VERSION_ID IC_VERSION_909R#define CS_UPGAP_NAME "UPG909R.AP"#endif // #if (DECODER_SYSTEM == DVD909R_EVAL)// LLY2.15, add for CT909R HFY board#if (DECODER_SYSTEM == DVD909R_HFY)// [Audio DAC] : Internal ADAC + WM8746// Notice: Internal ADAC default format : I2S + 24 bit// WM8746 default format: Right + 24 bit#define ENABLE_INTERNAL_ADAC#define AUDIO_DAC DAC_WM8746#define SUPPORT_PCM_WORD_LENGTH 24#define AUDIO_ALIGN_FORMAT I2S_ALIGN// [Storage Type]// Use serial flash to save setup information.#define STORAGE_TYPE SERIAL_FLASH#define IC_VERSION_ID IC_VERSION_909R#define CS_UPGAP_NAME "UPG909R.AP"#endif // #if (DECODER_SYSTEM == DVD909R_HFY)// LLY2.16, add for STB219 HCN board#if (DECODER_SYSTEM == STB219_HCN)// [Audio DAC] : Internal ADAC only// LLY2.17, use internal Audio DAC only (default format is I2S + 24 bit)// So, support two channel only: disable PCMSD0/1/2, and let it work as GPIO// Notice: Don't choose any AUDIO_DAC for external ADAC#define USE_INTERNAL_ADAC_ONLY#define ENABLE_INTERNAL_ADAC#define AUDIO_DAC DAC_INTERNAL#define SUPPORT_PCM_WORD_LENGTH 24#define AUDIO_ALIGN_FORMAT I2S_ALIGN// [Storage Type]// Use serial flash to save setup information.#define STORAGE_TYPE SERIAL_FLASH#define IC_VERSION_ID IC_VERSION_219#define CS_UPGAP_NAME "UPG219.AP"#endif // #if (DECODER_SYSTEM == DVD909R_HCN)// LLY2.16, add for STB219 YHI board#if (DECODER_SYSTEM == STB219_YHI)// [Audio DAC] : Internal ADAC only// LLY2.17, use internal Audio DAC only (default format is I2S + 24 bit)// So, support two channel only: disable PCMSD0/1/2, and let it work as GPIO// Notice: Don't choose any AUDIO_DAC for external ADAC#define USE_INTERNAL_ADAC_ONLY#define ENABLE_INTERNAL_ADAC#define AUDIO_DAC DAC_INTERNAL#define SUPPORT_PCM_WORD_LENGTH 24#define AUDIO_ALIGN_FORMAT I2S_ALIGN// [Storage Type]// Use serial flash to save setup information.#define STORAGE_TYPE SERIAL_FLASH#define IC_VERSION_ID IC_VERSION_219#define CS_UPGAP_NAME "UPG219.AP"#endif // #if (DECODER_SYSTEM == DVD909R_YHI)#if (DECODER_SYSTEM == DVD909P_A_EVAL)// [Audio DAC] : Internal ADAC only// Notice: Don't choose any AUDIO_DAC for external ADAC#define USE_INTERNAL_ADAC_ONLY#define ENABLE_INTERNAL_ADAC#define AUDIO_DAC DAC_INTERNAL#define SUPPORT_PCM_WORD_LENGTH 24#define AUDIO_ALIGN_FORMAT I2S_ALIGN#define REGTABLE "VD\Regtable_CT909P_A.H" //Set TFT include register table . Jeff VD 1.23 Add#define SUPPORT_TFT#ifndef NO_SCREEN_SAVER#define NO_SCREEN_SAVER#endif //NO_SCREEN_SAVER#define LED_BackLight#define SUPPORT_CCIR656// [Storage Type]// Use serial flash to save setup information.#define STORAGE_TYPE SERIAL_FLASH#define IC_VERSION_ID IC_VERSION_909P_A_W#define CS_UPGAP_NAME "UPG909PA.AP"// LLY2.60, don't support PSCAN output for CT909P/ CT95x serial IC#define NO_PSCAN_OUTPUT#endif // #if (DECODER_SYSTEM == DVD909P_A_EVAL)#if (DECODER_SYSTEM == DVD909P_B_EVAL)// [Audio DAC] : Internal ADAC only// Notice: Don't choose any AUDIO_DAC for external ADAC#define USE_INTERNAL_ADAC_ONLY#define ENABLE_INTERNAL_ADAC#define AUDIO_DAC DAC_INTERNAL#define SUPPORT_PCM_WORD_LENGTH 24#define AUDIO_ALIGN_FORMAT I2S_ALIGN#define REGTABLE "VD\Regtable_CT909P_A.H" //Set TFT include register table . Jeff VD 1.23 Add// [Storage Type]// Use serial flash to save setup information.#define STORAGE_TYPE SERIAL_FLASH
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -