📄 srcfilter.h
字号:
/************************************************************************** (C)Copyright Cheertek Inc. 2002-2003, D300, all right reserved Product : WinDVD Firmware Date : 1999.8.26 Purpose : Provide all SrcFilter information Sources :****************************************************************************/#ifndef __SRCFILTER_H__#define __SRCFILTER_H__#ifdef __cplusplus extern "C" {#endif//====================================// declare type/structure/definition//====================================// define source type#define MAX_REMOVABLE_MEDIA 2/*enum tagSOURCE_TYPE{ SOURCE_USB0, SOURCE_USB1, SOURCE_SERVO, SOURCE_ATAPI, SOURCE_NULL, SOURCE_ALL = SOURCE_NULL, SOURCE_MAX_INDEX = SOURCE_NULL };*/// Brian0.65//====================================// declare type/structure/definition//====================================// Brian.ct909// define Source type ID, use 8 bits: // [7:4]: Source Main ID// [3:0]: Source Sub ID, mainly for USB card reader slot#define SOURCE_NULL 0xFF // Brian0.67#define SOURCE_ALL SOURCE_NULL#define SOURCE_ATAPI 0x10#define SOURCE_SERVO 0x20#define SOURCE_USB0_FIRST 0x30#define SOURCE_USB0_0 SOURCE_USB0_FIRST#define SOURCE_USB0_1 0x31#define SOURCE_USB0_2 0x32#define SOURCE_USB0_3 0x33#define SOURCE_USB0_4 0x34#define SOURCE_USB0_5 0x35#define SOURCE_USB0_6 0x36#define SOURCE_USB0_7 0x37#define SOURCE_USB0_LAST SOURCE_USB0_7#define SOURCE_USB1_FIRST 0x40#define SOURCE_USB1_0 SOURCE_USB1_FIRST#define SOURCE_USB1_1 0x41#define SOURCE_USB1_2 0x42#define SOURCE_USB1_3 0x43#define SOURCE_USB1_4 0x44#define SOURCE_USB1_5 0x45#define SOURCE_USB1_6 0x46#define SOURCE_USB1_7 0x47#define SOURCE_USB1_LAST SOURCE_USB1_7#define SOURCE_DVB 0x50// wyc2.51-909P, add the source type SPI.#define SOURCE_SPI 0x60//Brian0.85, add range check define for removable source#define SOURCE_REMOVABLE_FIRST SOURCE_USB0_FIRST#define SOURCE_REMOVABLE_LAST SOURCE_USB1_LAST// wyc1.01-909, modify to support max 2 bits.// wyc2.53-909P, for support MP3/JPG play together, we increase one source count here. [0] mean current playing source information.// [1] mean the backup of 1st source, [2] mean the backup of second source.#define MAX_STREAM_COUNT (2) // We allow at most three input streams in the same timetypedef struct tagSOURCE_FILTER_INPUT_STREAM_BUFFER{ BYTE bSourceIndex; // indicate this bit stream came from which source, ex. ATAPI, SERVO, USB, ... // PARSER module related members DWORD dwDataFormat; // specify the input data format// DWORD EventReport; // specify how many events needed to be reported // specify the memory buffer region for input bit stream DUMPIN DWORD dwUpperAddr; DWORD dwLowerAddr; DWORD dwReadAddr; // specify the read pointer, for buffer circular issue DWORD dwWriteAddr; // specify the write pointer DWORD dwBuffLength; // unit is sectors. // specify the total bit stream range wants to read DWORD dwStartSector; DWORD dwEndSector; DWORD dwReadSector; // indicate which sector that parser is processing DWORD dwWriteSector; // indicate which sector that source is reading // J500CSC_110, prevent some dvd titles' block start address is not alignment to 16 sectors. // This variable is updated by servo and not backward compatiable. Be careful if we want to // roll back to previous version. DWORD dwBlockOffset; // Indicate the start address's (LBA) least significant nibble of each block. // This value is valid for DVD only and it is updated by servo when // it received READ command. // wyc0.50-909 // Other purpose variables. BYTE bEnableRunning; } SOURCE_FILTER_INPUT_STREAM_BUFFER, *PSOURCE_FILTER_INPUT_STREAM_BUFFER;//====================================// declare global variables//====================================extern SOURCE_FILTER_INPUT_STREAM_BUFFER __SF_SourceGBL[MAX_STREAM_COUNT]; // declare infortmation storage for each input stream// Variables Extern Part.// Brian0.65extern DWORD __dwSFStreamID;extern DWORD __dwSFDirRead;// wyc1.06-909,extern BYTE __bSFSourcePWDown;// Global Variablesextern BYTE __bCurrentIF; // using ATAPI_IF // wyc0.62, remove __bServoAutoCtrl// wyc1.05-909, move from usbsrc.h to srcfilter.h because other module can't directly reference variables in usbsrc.#ifdef SUPPORT_USB_SOURCEextern WORD __wUSBSRCCluSize;extern DWORD __dwUSBSRCPhyOffset;extern DWORD __dwUSBStartPos;#endif //// wyc2.51-909P, extern variables.#ifdef SUPPORT_ENCODE_JPG_PICTUREextern DWORD __dwSFSPIStartAddr;extern DWORD __dwSFSPIEndAddr;#endif ////LJY0.81, servo buffer config// wyc2.76-909P,// wyc2.77-909p, when not servo source, use another alignment format.#ifdef SUPPORT_SERVO_SOURCE#define SERVO_BUFSIZE_ALIGN_UNIT (0xA000)#else#define SERVO_BUFSIZE_ALIGN_UNIT (0x800)#endif //#define SECTOR_512 512 //2048/4=512DW#define SECTOR_588 588 //2352/4=588DW#define SECTOR_581 581 //2324/4=581DW, LJY1.24a, for VCD/SVCD #define SECTOR_607 607 //(2352+4*19)/5=607DW, For non-CDG RISC code, "55805580" will be inserted per 128bytes.#define SECTOR_784 784 //((24B data+8B subcode)*98)/4=784DW, RISC won't insert "55805580"//LJY1.23, share same define for CDG & pure CDDA#ifdef SUPPORT_CDDA_WITH_SUBCODE#define SECTOR_CDDA SECTOR_784#else#define SECTOR_CDDA SECTOR_588 //55805580+2352B for pure CDDA#endif//----------------------------------------------// SERVO definition//----------------------------------------------//LJY0.75, redefine it to conform with servo's definition #define DISC_TYPE_DVD (0x00)#define DISC_TYPE_CD (0x80) #define DISC_TYPE_DVD_ROM DISC_TYPE_DVD#define DISC_TYPE_DVD_RAM (0x01)#define DISC_TYPE_DVD_R (0x02)#define DISC_TYPE_DVD_RW (0x03)#define DISC_TYPE_DVD_PLUS_RW (0x09)#define DISC_TYPE_DVD_PLUS_R (0x0A) // wyc2.38a-909s, add one mode for DVD plus R dual layer disc.#define DISC_TYPE_DVD_PLUS_R_DUAL (0x0E)#define DISC_TYPE_VCD (0x14|DISC_TYPE_CD)#define DISC_TYPE_CDI (0x0A|DISC_TYPE_CD) #define DISC_TYPE_CDDA (0x04|DISC_TYPE_CD)#define DISC_TYPE_UNKNOWN 0xff#define SERVO_MODE_CDROM 0x08#ifdef CDDA_WAITSERVO#define SERVO_MODE_AUDIO 0x10#else#define SERVO_MODE_AUDIO 0x00#endif// *** MULTI_DISC; Compatible with multiple-disc#define SRCFILTER_NODISC 0x00#define SRCFILTER_HAVEDISC 0x01#define SRCFILTER_WAITSTABLE_TIMEOUT 0x02 //LJY1.05, it means servo cannot focus-on for power-on initial.#define SRCFILTER_USER_ABORT 0x03 //LJY1.05-2#define SRCFILTER_LOADDISC_FAILED 0x04 //LJY1.25, Support opentray when servo fails to close tray.#define SRCFILTER_WAITING_STABLE 0x5#define SRCFILTER_WRONGDISC 0x6#define SRCFILTER_COMMAND_FAIL 0xff// Error Status#define ERR_RESPONSE 0xff#define ERR_NOFOUND 0#define ERR_SERVO_READ 1#define ERR_SERVO_JUMP 2#define ERR_SERVO_TRAY 3#define ERR_SERVO_SET 4#define ERR_SERVO_INFO 5#define SERVO_END_TIME 0x7fffffffL// TCC037, for control threshold#define SERVO_THRESHOLD_DISABLE 0x01#define SERVO_THRESHOLD_ENABLE 0x02#define SERVO_THRESHOLD_VIDEO 0x03#define SERVO_THRESHOLD_AUDIO 0x04///////////////////////////////////LJY0.75, redefine tray status value for CT909//LJY1.25, Support opentray when servo fails to close tray.#define SRC_TRAY_OPENED 0x00#define SRC_TRAY_OPENING 0x01#define SRC_TRAY_CLOSED 0x02#define SRC_TRAY_CLOSING 0x03#define SRC_TRAY_USER_PUSH 0x04#define SRC_TRAY_UNKNOWN 0xFF // ** TCH1.05; // ** TCH1.05; begin... SrcFilter_GetStatus()#define SRC_STATUS_NONE (0x00)#define SRC_SPINDLE_STATUS_SPINNING (0x08) // ** TCH1.05; end... ////////////////////////////////////////////// TCC172, For returning error status of the atapi command#define SERVO_ERROR_NONE 0 // No Error#define SERVO_ERROR_CMD 1 // Command Error#define SERVO_ERROR_NOTREADY 2 // Device not ready(2/xx/xx)#define SERVO_ERROR_NODISC 3 // No Disc in tray(2/3a/xx)#define SERVO_ERROR_LOADDISC 4 // Loading disc (2/4/xx)#define SERVO_ERROR_AUTH 5 // Authentication Error
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -