1209ff23fSmrg/************************************************************************************* 2209ff23fSmrg * Copyright (C) 2005 Bogdan D. bogdand@users.sourceforge.net 3209ff23fSmrg * 4209ff23fSmrg * Permission is hereby granted, free of charge, to any person obtaining a copy of this 5209ff23fSmrg * software and associated documentation files (the "Software"), to deal in the Software 6209ff23fSmrg * without restriction, including without limitation the rights to use, copy, modify, 7209ff23fSmrg * merge, publish, distribute, sublicense, and/or sell copies of the Software, 8209ff23fSmrg * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 9209ff23fSmrg * 10209ff23fSmrg * The above copyright notice and this permission notice shall be included in all copies or 11209ff23fSmrg * substantial portions of the Software. 12209ff23fSmrg * 13209ff23fSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 14209ff23fSmrg * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE 15209ff23fSmrg * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, 16209ff23fSmrg * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 17209ff23fSmrg * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18209ff23fSmrg * 19209ff23fSmrg * Except as contained in this notice, the name of the author shall not be used in advertising or 20209ff23fSmrg * otherwise to promote the sale, use or other dealings in this Software without prior written 21209ff23fSmrg * authorization from the author. 22209ff23fSmrg * 23209ff23fSmrg * $Log: theatre200.h,v $ 24209ff23fSmrg * Revision 1.1.1.1 2008/08/02 05:10:36 mrg 25209ff23fSmrg * initial import of xf86-video-ati-6.9.0 26209ff23fSmrg * 27209ff23fSmrg * Revision 1.5 2005/12/08 17:54:40 kem 28209ff23fSmrg * Allow hard-coded paths to be configurable. 29209ff23fSmrg * 30209ff23fSmrg * Revision 1.4 2005/11/07 19:28:40 bogdand 31209ff23fSmrg * Replaced the variadic macros(gcc) by macros according to C99 standard 32209ff23fSmrg * 33209ff23fSmrg * Revision 1.3 2005/08/28 18:00:23 bogdand 34209ff23fSmrg * Modified the licens type from GPL to a X/MIT one 35209ff23fSmrg * 36209ff23fSmrg * Revision 1.2 2005/07/01 22:43:11 daniels 37209ff23fSmrg * Change all misc.h and os.h references to <X11/foo.h>. 38209ff23fSmrg * 39209ff23fSmrg * 40209ff23fSmrg ************************************************************************************/ 41209ff23fSmrg 42209ff23fSmrg#ifndef __THEATRE200_H__ 43209ff23fSmrg#define __THEATRE200_H__ 44209ff23fSmrg 45209ff23fSmrg#include "theatre.h" 46209ff23fSmrg 47209ff23fSmrg#ifdef MICROC_DIR 48209ff23fSmrg#define DEFAULT_MICROC_PATH MICROC_DIR"/rt2_pmem.bin" 49209ff23fSmrg#else 50209ff23fSmrg#define DEFAULT_MICROC_PATH "/usr/X11R6/lib/modules/multimedia/rt2_pmem.bin" 51209ff23fSmrg#endif 52209ff23fSmrg#define DEFAULT_MICROC_TYPE "BINARY" 53209ff23fSmrg 54209ff23fSmrg/* #define ENABLE_DEBUG 1 */ 55209ff23fSmrg 56209ff23fSmrg#ifdef ENABLE_DEBUG 57209ff23fSmrg#define ERROR_0(str) xf86DrvMsg(screen, X_ERROR, str) 58209ff23fSmrg#define DEBUG_0(str) xf86DrvMsg(screen, X_INFO, str) 59209ff23fSmrg#define ERROR(str,param1) xf86DrvMsg(screen, X_ERROR, str, param1) 60209ff23fSmrg#define DEBUG(str,param1) xf86DrvMsg(screen, X_INFO, str, param1) 61209ff23fSmrg#define ERROR_2(str,param1,param2) xf86DrvMsg(screen, X_ERROR, str, param1, param2) 62209ff23fSmrg#define DEBUG_2(str,param1,param2) xf86DrvMsg(screen, X_INFO, str, param1, param2) 63209ff23fSmrg#define ERROR_3(str,param1,param2,param3) xf86DrvMsg(screen, X_ERROR, str, param1, param2, param3) 64209ff23fSmrg#define DEBUG_3(str,param1,param2,param3) xf86DrvMsg(screen, X_INFO, str, param1, param2, param3) 65209ff23fSmrg#else 66209ff23fSmrg#define ERROR_0(str) (void)screen 67209ff23fSmrg#define DEBUG_0(str) (void)screen 68209ff23fSmrg#define ERROR(str,param1) (void)screen 69209ff23fSmrg#define DEBUG(str,param1) (void)screen 70209ff23fSmrg#define ERROR_2(str,param1,param2) (void)screen 71209ff23fSmrg#define DEBUG_2(str,param1,param2) (void)screen 72209ff23fSmrg#define ERROR_3(str,param1,param2,param3) (void)screen 73209ff23fSmrg#define DEBUG_3(str,param1,param2,param3) (void)screen 74209ff23fSmrg#endif 75209ff23fSmrg 76209ff23fSmrg 77209ff23fSmrg#define DSP_OK 0x21 78209ff23fSmrg#define DSP_INVALID_PARAMETER 0x22 79209ff23fSmrg#define DSP_MISSING_PARAMETER 0x23 80209ff23fSmrg#define DSP_UNKNOWN_COMMAND 0x24 81209ff23fSmrg#define DSP_UNSUCCESS 0x25 82209ff23fSmrg#define DSP_BUSY 0x26 83209ff23fSmrg#define DSP_RESET_REQUIRED 0x27 84209ff23fSmrg#define DSP_UNKNOWN_RESULT 0x28 85209ff23fSmrg#define DSP_CRC_ERROR 0x29 86209ff23fSmrg#define DSP_AUDIO_GAIN_ADJ_FAIL 0x2a 87209ff23fSmrg#define DSP_AUDIO_GAIN_CHK_ERROR 0x2b 88209ff23fSmrg#define DSP_WARNING 0x2c 89209ff23fSmrg#define DSP_POWERDOWN_MODE 0x2d 90209ff23fSmrg 91209ff23fSmrg#define RT200_NTSC_M 0x01 92209ff23fSmrg#define RT200_NTSC_433 0x03 93209ff23fSmrg#define RT200_NTSC_J 0x04 94209ff23fSmrg#define RT200_PAL_B 0x05 95209ff23fSmrg#define RT200_PAL_D 0x06 96209ff23fSmrg#define RT200_PAL_G 0x07 97209ff23fSmrg#define RT200_PAL_H 0x08 98209ff23fSmrg#define RT200_PAL_I 0x09 99209ff23fSmrg#define RT200_PAL_N 0x0a 100209ff23fSmrg#define RT200_PAL_Ncomb 0x0b 101209ff23fSmrg#define RT200_PAL_M 0x0c 102209ff23fSmrg#define RT200_PAL_60 0x0d 103209ff23fSmrg#define RT200_SECAM 0x0e 104209ff23fSmrg#define RT200_SECAM_B 0x0f 105209ff23fSmrg#define RT200_SECAM_D 0x10 106209ff23fSmrg#define RT200_SECAM_G 0x11 107209ff23fSmrg#define RT200_SECAM_H 0x12 108209ff23fSmrg#define RT200_SECAM_K 0x13 109209ff23fSmrg#define RT200_SECAM_K1 0x14 110209ff23fSmrg#define RT200_SECAM_L 0x15 111209ff23fSmrg#define RT200_SECAM_L1 0x16 112209ff23fSmrg#define RT200_480i 0x17 113209ff23fSmrg#define RT200_480p 0x18 114209ff23fSmrg#define RT200_576i 0x19 115209ff23fSmrg#define RT200_720p 0x1a 116209ff23fSmrg#define RT200_1080i 0x1b 117209ff23fSmrg 118209ff23fSmrgstruct rt200_microc_head 119209ff23fSmrg{ 120209ff23fSmrg unsigned int device_id; 121209ff23fSmrg unsigned int vendor_id; 122209ff23fSmrg unsigned int revision_id; 123209ff23fSmrg unsigned int num_seg; 124209ff23fSmrg}; 125209ff23fSmrg 126209ff23fSmrgstruct rt200_microc_seg 127209ff23fSmrg{ 128209ff23fSmrg unsigned int num_bytes; 129209ff23fSmrg unsigned int download_dst; 130209ff23fSmrg unsigned int crc_val; 131209ff23fSmrg 132209ff23fSmrg unsigned char* data; 133209ff23fSmrg struct rt200_microc_seg* next; 134209ff23fSmrg}; 135209ff23fSmrg 136209ff23fSmrg 137209ff23fSmrgstruct rt200_microc_data 138209ff23fSmrg{ 139209ff23fSmrg struct rt200_microc_head microc_head; 140209ff23fSmrg struct rt200_microc_seg* microc_seg_list; 141209ff23fSmrg}; 142209ff23fSmrg 143209ff23fSmrg#endif 144