Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Namespace Members | Data Fields | Globals

ioctl_bt848.h

Go to the documentation of this file.
00001 #ifndef __IOCTL_BT848_H__
00002 #define __IOCTL_BT848_H__
00003 
00004 /*
00005  * extensions to ioctl_meteor.h for the bt848 cards
00006  */
00007 
00008 /*
00009  * frequency sets
00010  */
00011 #define CHNLSET_NABCST          1
00012 #define CHNLSET_CABLEIRC        2
00013 #define CHNLSET_CABLEHRC        3
00014 #define CHNLSET_WEUROPE         4
00015 #define CHNLSET_JPNBCST         5
00016 #define CHNLSET_MIN             CHNLSET_NABCST
00017 #define CHNLSET_MAX             CHNLSET_JPNBCST
00018 
00019 
00020 /*
00021  * constants for various tuner registers
00022  */
00023 #define BT848_HUEMIN            (-90)
00024 #define BT848_HUEMAX            90
00025 #define BT848_HUECENTER         0
00026 #define BT848_HUERANGE          179.3
00027 #define BT848_HUEREGMIN         (-128)
00028 #define BT848_HUEREGMAX         127
00029 #define BT848_HUESTEPS          256
00030 
00031 #define BT848_BRIGHTMIN         (-50)
00032 #define BT848_BRIGHTMAX         50
00033 #define BT848_BRIGHTCENTER      0
00034 #define BT848_BRIGHTRANGE       99.6
00035 #define BT848_BRIGHTREGMIN      (-128)
00036 #define BT848_BRIGHTREGMAX      127
00037 #define BT848_BRIGHTSTEPS       256
00038 
00039 #define BT848_CONTRASTMIN       0
00040 #define BT848_CONTRASTMAX       237
00041 #define BT848_CONTRASTCENTER    100
00042 #define BT848_CONTRASTRANGE     236.57
00043 #define BT848_CONTRASTREGMIN    0
00044 #define BT848_CONTRASTREGMAX    511
00045 #define BT848_CONTRASTSTEPS     512
00046 
00047 #define BT848_CHROMAMIN         0
00048 #define BT848_CHROMAMAX         284
00049 #define BT848_CHROMACENTER      100
00050 #define BT848_CHROMARANGE       283.89
00051 #define BT848_CHROMAREGMIN      0
00052 #define BT848_CHROMAREGMAX      511
00053 #define BT848_CHROMASTEPS       512
00054 
00055 #define BT848_SATUMIN           0
00056 #define BT848_SATUMAX           202
00057 #define BT848_SATUCENTER        100
00058 #define BT848_SATURANGE         201.18
00059 #define BT848_SATUREGMIN        0
00060 #define BT848_SATUREGMAX        511
00061 #define BT848_SATUSTEPS         512
00062 
00063 #define BT848_SATVMIN           0
00064 #define BT848_SATVMAX           284
00065 #define BT848_SATVCENTER        100
00066 #define BT848_SATVRANGE         283.89
00067 #define BT848_SATVREGMIN        0
00068 #define BT848_SATVREGMAX        511
00069 #define BT848_SATVSTEPS         512
00070 
00071 
00072 /*
00073  * audio stuff
00074  */
00075 #define AUDIO_TUNER             0x00    /* command for the audio routine */
00076 #define AUDIO_EXTERN            0x01    /* don't confuse them with bit */
00077 #define AUDIO_INTERN            0x02    /* settings */
00078 #define AUDIO_MUTE              0x80
00079 #define AUDIO_UNMUTE            0x81
00080 
00081 
00082 /*
00083  * EEProm stuff
00084  */
00085 struct eeProm {
00086         short   offset;
00087         short   count;
00088         u_char  bytes[ 256 ];
00089 };
00090 
00091 
00092 /*
00093  * XXX: this is a hack, should be in ioctl_meteor.h
00094  * here to avoid touching that file for now...
00095  */
00096 #define TVTUNER_SETCHNL    _IOW('x', 32, unsigned int)  /* set channel */
00097 #define TVTUNER_GETCHNL    _IOR('x', 32, unsigned int)  /* get channel */
00098 #define TVTUNER_SETTYPE    _IOW('x', 33, unsigned int)  /* set tuner type */
00099 #define TVTUNER_GETTYPE    _IOR('x', 33, unsigned int)  /* get tuner type */
00100 #define TVTUNER_GETSTATUS  _IOR('x', 34, unsigned int)  /* get tuner status */
00101 #define TVTUNER_SETFREQ    _IOW('x', 35, unsigned int)  /* set frequency */
00102 #define TVTUNER_GETFREQ    _IOR('x', 36, unsigned int)  /* get frequency */
00103 
00104 
00105 #define BT848_SHUE      _IOW('x', 37, int)              /* set hue */
00106 #define BT848_GHUE      _IOR('x', 37, int)              /* get hue */
00107 #define BT848_SBRIG     _IOW('x', 38, int)              /* set brightness */
00108 #define BT848_GBRIG     _IOR('x', 38, int)              /* get brightness */
00109 #define BT848_SCSAT     _IOW('x', 39, int)              /* set chroma sat */
00110 #define BT848_GCSAT     _IOR('x', 39, int)              /* get UV saturation */
00111 #define BT848_SCONT     _IOW('x', 40, int)              /* set contrast */
00112 #define BT848_GCONT     _IOR('x', 40, int)              /* get contrast */
00113 #define BT848_SVSAT     _IOW('x', 41, int)              /* set chroma V sat */
00114 #define BT848_GVSAT     _IOR('x', 41, int)              /* get V saturation */
00115 #define BT848_SUSAT     _IOW('x', 42, int)              /* set chroma U sat */
00116 #define BT848_GUSAT     _IOR('x', 42, int)              /* get U saturation */
00117 
00118 #define BT848_SCBARS    _IOR('x', 43, int)              /* set colorbar */
00119 #define BT848_CCBARS    _IOR('x', 44, int)              /* clear colorbar */
00120 
00121 #define BT848_SAUDIO    _IOW('x', 46, int)              /* set audio channel */
00122 #define BT848_GAUDIO    _IOR('x', 47, int)              /* get audio channel */
00123 #define BT848_SBTSC     _IOW('x', 48, int)              /* set audio channel */
00124 
00125 #define BT848_GSTATUS   _IOR('x', 49, unsigned int)     /* reap status */
00126 
00127 #define BT848_WEEPROM   _IOWR('x', 50, struct eeProm)   /* write to EEProm */
00128 #define BT848_REEPROM   _IOWR('x', 51, struct eeProm)   /* read from EEProm */
00129 
00130 #define BT848_SIGNATURE _IOWR('x', 52, struct eeProm)   /* read card sig */
00131 
00132 #define TVTUNER_SETAFC  _IOW('x', 53, int)              /* turn AFC on/off */
00133 #define TVTUNER_GETAFC  _IOR('x', 54, int)              /* query AFC on/off */
00134 #define BT848_SLNOTCH   _IOW('x', 55, int)              /* set luma notch */
00135 #define BT848_GLNOTCH   _IOR('x', 56, int)              /* get luma notch */
00136 
00137 /*
00138  * XXX: more bad magic,
00139  *      we need to fix the METEORGINPUT to return something public
00140  *      duplicate them here for now...
00141  */
00142 #define METEOR_DEV0             0x00001000
00143 #define METEOR_DEV1             0x00002000
00144 #define METEOR_DEV2             0x00004000
00145 
00146 /*
00147  * right now I don't know were to put these, but as they are suppose to be
00148  * a part of a common video capture interface, these should be relocated to
00149  * another place.  Probably most of the METEOR_xxx defines need to be
00150  * renamed and moved to a common header
00151  */
00152 
00153 typedef enum { METEOR_PIXTYPE_RGB, METEOR_PIXTYPE_YUV,
00154                METEOR_PIXTYPE_YUV_PACKED  } METEOR_PIXTYPE;
00155 
00156 struct meteor_pixfmt {
00157         u_int          index;         /* Index in supported pixfmt list     */
00158         METEOR_PIXTYPE type;          /* What's the board gonna feed us     */
00159         u_int          Bpp;           /* Bytes per pixel                    */
00160         u_long         masks[3];      /* R,G,B or Y,U,V masks, respectively */
00161         unsigned       swap_bytes :1; /* Bytes  swapped within shorts       */
00162         unsigned       swap_shorts:1; /* Shorts swapped within longs        */
00163 };
00164 
00165 
00166 struct bktr_clip {
00167     int          x_min;
00168     int          x_max;
00169     int          y_min;
00170     int          y_max;
00171 };
00172 
00173 #define BT848_MAX_CLIP_NODE 100
00174 struct _bktr_clip {
00175     struct bktr_clip x[BT848_MAX_CLIP_NODE];
00176 };
00177 
00178 /*
00179  * I'm using METEOR_xxx just because that will be common to other interface
00180  * and less of a surprise
00181  */
00182 #define METEORSACTPIXFMT        _IOW('x', 64, int )
00183 #define METEORGACTPIXFMT        _IOR('x', 64, int )
00184 #define METEORGSUPPIXFMT        _IOWR('x', 65, struct meteor_pixfmt)
00185 
00186 /* set clip list */
00187 #define BT848SCLIP     _IOW('x', 66, struct _bktr_clip )
00188 #define BT848GCLIP     _IOR('x', 66, struct _bktr_clip )
00189 
00190 #define BT848_INITPXC200  _IOW('x', 67, int)
00191 
00192 #endif /* __IOCTL_BT848_H__ */

Generated on Wed Oct 5 14:36:12 2005 for RobotFlow by  doxygen 1.4.4