1/************************************************************************************* 2 * Copyright (C) 2005 Bogdan D. bogdand@users.sourceforge.net 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a copy of this 5 * software and associated documentation files (the "Software"), to deal in the Software 6 * without restriction, including without limitation the rights to use, copy, modify, 7 * merge, publish, distribute, sublicense, and/or sell copies of the Software, 8 * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 9 * 10 * The above copyright notice and this permission notice shall be included in all copies or 11 * substantial portions of the Software. 12 * 13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 14 * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE 15 * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, 16 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 17 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 * 19 * Except as contained in this notice, the name of the author shall not be used in advertising or 20 * otherwise to promote the sale, use or other dealings in this Software without prior written 21 * authorization from the author. 22 * 23 * $Log: theatre200.h,v $ 24 * Revision 1.1.1.1 2008/08/02 05:10:36 mrg 25 * initial import of xf86-video-ati-6.9.0 26 * 27 * Revision 1.5 2005/12/08 17:54:40 kem 28 * Allow hard-coded paths to be configurable. 29 * 30 * Revision 1.4 2005/11/07 19:28:40 bogdand 31 * Replaced the variadic macros(gcc) by macros according to C99 standard 32 * 33 * Revision 1.3 2005/08/28 18:00:23 bogdand 34 * Modified the licens type from GPL to a X/MIT one 35 * 36 * Revision 1.2 2005/07/01 22:43:11 daniels 37 * Change all misc.h and os.h references to <X11/foo.h>. 38 * 39 * 40 ************************************************************************************/ 41 42#ifndef __THEATRE200_H__ 43#define __THEATRE200_H__ 44 45#include "theatre.h" 46 47#ifdef MICROC_DIR 48#define DEFAULT_MICROC_PATH MICROC_DIR"/rt2_pmem.bin" 49#else 50#define DEFAULT_MICROC_PATH "/usr/X11R6/lib/modules/multimedia/rt2_pmem.bin" 51#endif 52#define DEFAULT_MICROC_TYPE "BINARY" 53 54/* #define ENABLE_DEBUG 1 */ 55 56#ifdef ENABLE_DEBUG 57#define ERROR_0(str) xf86DrvMsg(screen, X_ERROR, str) 58#define DEBUG_0(str) xf86DrvMsg(screen, X_INFO, str) 59#define ERROR(str,param1) xf86DrvMsg(screen, X_ERROR, str, param1) 60#define DEBUG(str,param1) xf86DrvMsg(screen, X_INFO, str, param1) 61#define ERROR_2(str,param1,param2) xf86DrvMsg(screen, X_ERROR, str, param1, param2) 62#define DEBUG_2(str,param1,param2) xf86DrvMsg(screen, X_INFO, str, param1, param2) 63#define ERROR_3(str,param1,param2,param3) xf86DrvMsg(screen, X_ERROR, str, param1, param2, param3) 64#define DEBUG_3(str,param1,param2,param3) xf86DrvMsg(screen, X_INFO, str, param1, param2, param3) 65#else 66#define ERROR_0(str) (void)screen 67#define DEBUG_0(str) (void)screen 68#define ERROR(str,param1) (void)screen 69#define DEBUG(str,param1) (void)screen 70#define ERROR_2(str,param1,param2) (void)screen 71#define DEBUG_2(str,param1,param2) (void)screen 72#define ERROR_3(str,param1,param2,param3) (void)screen 73#define DEBUG_3(str,param1,param2,param3) (void)screen 74#endif 75 76 77#define DSP_OK 0x21 78#define DSP_INVALID_PARAMETER 0x22 79#define DSP_MISSING_PARAMETER 0x23 80#define DSP_UNKNOWN_COMMAND 0x24 81#define DSP_UNSUCCESS 0x25 82#define DSP_BUSY 0x26 83#define DSP_RESET_REQUIRED 0x27 84#define DSP_UNKNOWN_RESULT 0x28 85#define DSP_CRC_ERROR 0x29 86#define DSP_AUDIO_GAIN_ADJ_FAIL 0x2a 87#define DSP_AUDIO_GAIN_CHK_ERROR 0x2b 88#define DSP_WARNING 0x2c 89#define DSP_POWERDOWN_MODE 0x2d 90 91#define RT200_NTSC_M 0x01 92#define RT200_NTSC_433 0x03 93#define RT200_NTSC_J 0x04 94#define RT200_PAL_B 0x05 95#define RT200_PAL_D 0x06 96#define RT200_PAL_G 0x07 97#define RT200_PAL_H 0x08 98#define RT200_PAL_I 0x09 99#define RT200_PAL_N 0x0a 100#define RT200_PAL_Ncomb 0x0b 101#define RT200_PAL_M 0x0c 102#define RT200_PAL_60 0x0d 103#define RT200_SECAM 0x0e 104#define RT200_SECAM_B 0x0f 105#define RT200_SECAM_D 0x10 106#define RT200_SECAM_G 0x11 107#define RT200_SECAM_H 0x12 108#define RT200_SECAM_K 0x13 109#define RT200_SECAM_K1 0x14 110#define RT200_SECAM_L 0x15 111#define RT200_SECAM_L1 0x16 112#define RT200_480i 0x17 113#define RT200_480p 0x18 114#define RT200_576i 0x19 115#define RT200_720p 0x1a 116#define RT200_1080i 0x1b 117 118struct rt200_microc_head 119{ 120 unsigned int device_id; 121 unsigned int vendor_id; 122 unsigned int revision_id; 123 unsigned int num_seg; 124}; 125 126struct rt200_microc_seg 127{ 128 unsigned int num_bytes; 129 unsigned int download_dst; 130 unsigned int crc_val; 131 132 unsigned char* data; 133 struct rt200_microc_seg* next; 134}; 135 136 137struct rt200_microc_data 138{ 139 struct rt200_microc_head microc_head; 140 struct rt200_microc_seg* microc_seg_list; 141}; 142 143#endif 144