1 /****************************************************************************** 2 / 3 / File: Theater200.h 4 / 5 / Description: ATI Rage Theater Video Decoder interface. 6 / 7 / Based on code from X.org 8 / 9 *******************************************************************************/ 10 11 #ifndef __THEATER200_H__ 12 #define __THEATER200_H__ 13 14 #include "Theater.h" 15 #include "Radeon.h" 16 #include "VIPPort.h" 17 18 enum theater200_state 19 { 20 MODE_UNINITIALIZED, 21 MODE_INITIALIZATION_IN_PROGRESS, 22 MODE_INITIALIZED_FOR_TV_IN 23 }; 24 25 class CTheater200 : public CTheater { 26 public: 27 CTheater200(CRadeon & radeon, int device); 28 29 ~CTheater200(); 30 31 status_t InitCheck() const; 32 33 void Reset(); 34 35 void SetEnable(bool enable, bool vbi); 36 37 void SetStandard(theater_standard standard, theater_source source); 38 39 void SetSize(int hactive, int vactive); 40 41 void SetDeinterlace(bool deinterlace); 42 43 void SetSharpness(int sharpness); 44 45 void SetBrightness(int brightness); 46 47 void SetContrast(int contrast); 48 49 void SetSaturation(int saturation); 50 51 void SetHue(int hue); 52 53 int CurrentLine(); 54 55 // help no idea 56 void getActiveRange( theater_standard standard, CRadeonRect &rect ); 57 58 // help no idea. 59 void getVBIRange( theater_standard standard, CRadeonRect &rect ); 60 61 void PrintToStream(); 62 63 private: 64 65 status_t DspInit(); 66 67 status_t DspLoad( struct rt200_microc_data* microc_datap ); 68 69 status_t DspGetMicrocode( char* micro_path, 70 char* micro_type, 71 struct rt200_microc_data* microc_datap ); 72 73 status_t DSPLoadMicrocode( char* micro_path, 74 char* micro_type, 75 struct rt200_microc_data* microc_datap ); 76 77 void DSPCleanMicrocode(struct rt200_microc_data* microc_datap); 78 79 status_t DspSendCommand( uint32 fb_scratch1, uint32 fb_scratch0 ); 80 81 void InitTheatre(); 82 83 int DSPDownloadMicrocode(); 84 85 void ShutdownTheatre(); 86 87 // in accelerant? 88 void ResetTheatreRegsForNoTVout(); 89 void ResetTheatreRegsForTVout(); 90 91 int32 DspSetVideostreamformat(int32 format); 92 int32 DspGetSignalLockStatus(); 93 int32 DspAudioMute(int8 left, int8 right); 94 int32 DspSetAudioVolume(int8 left, int8 right, int8 auto_mute); 95 int32 DspConfigureI2SPort(int8 tx_mode, int8 rx_mode, int8 clk_mode); 96 int32 DspConfigureSpdifPort(int8 state); 97 98 // does nothing now SetClock(theater_standard standard,radeon_video_clock clock)99 void SetClock(theater_standard standard, radeon_video_clock clock){;}; 100 101 // source not correct values for PAL NTSC etc... 102 void SetADC(theater_standard standard, theater_source source); 103 104 // does nothing now SetHSYNC(theater_standard standard)105 void SetHSYNC(theater_standard standard){;}; 106 107 void WaitHSYNC(); 108 109 // does nothing now SetVSYNC(theater_standard standard)110 void SetVSYNC(theater_standard standard){;}; 111 112 void WaitVSYNC(); 113 114 // does nothing now SetSyncGenerator(theater_standard standard)115 void SetSyncGenerator(theater_standard standard){;}; 116 117 // does nothing now SetCombFilter(theater_standard standard,theater_source source)118 void SetCombFilter(theater_standard standard, theater_source source){;}; 119 120 // does nothing now SetLuminanceProcessor(theater_standard standard)121 void SetLuminanceProcessor(theater_standard standard){;}; 122 123 void SetLuminanceLevels(theater_standard standard, int brightness, int contrast); 124 125 // does nothing now 126 void SetChromaProcessor(theater_standard standard); 127 128 void SetChromaLevels(theater_standard standard, int saturation, int hue); 129 130 // does nothing now 131 void SetClipWindow(theater_standard standard, bool vbi); 132 133 // um, help 134 void SetScaler(theater_standard standard, int hactive, int vactive, bool deinterlace); 135 136 public: 137 int ReadFifo(uint32 address, uint8 *buffer); 138 139 int WriteFifo(uint32 address, uint32 count, uint8 *buffer); 140 141 private: 142 theater200_state fMode; 143 char* microcode_path; 144 char* microcode_type; 145 }; 146 147 #endif 148