xref: /netbsd/sys/dev/ic/bt8xx.h (revision bf9ec67e)
1 /*	$NetBSD: bt8xx.h,v 1.4 2000/12/30 16:55:24 wiz Exp $	*/
2 
3 /* This file is merged from ioctl_meteor.h and ioctl_bt848.h from FreeBSD. */
4 /* The copyright below only applies to the ioctl_meteor.h part of this file. */
5 
6 #ifndef _DEV_IC_BT8XX_H_
7 #define _DEV_IC_BT8XX_H_
8 /*
9  * Copyright (c) 1995 Mark Tinguely and Jim Lowe
10  * All rights reserved.
11  *
12  * Redistribution and use in source and binary forms, with or without
13  * modification, are permitted provided that the following conditions
14  * are met:
15  * 1. Redistributions of source code must retain the above copyright
16  *    notice, this list of conditions and the following disclaimer.
17  * 2. Redistributions in binary form must reproduce the above copyright
18  *    notice, this list of conditions and the following disclaimer in the
19  *    documentation and/or other materials provided with the distribution.
20  * 3. All advertising materials mentioning features or use of this software
21  *    must display the following acknowledgement:
22  *	This product includes software developed by Mark Tinguely and Jim Lowe
23  * 4. The name of the author may not be used to endorse or promote products
24  *    derived from this software without specific prior written permission.
25  *
26  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
27  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
28  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
29  * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
30  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
31  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
32  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
34  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
35  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36  * POSSIBILITY OF SUCH DAMAGE.
37  *
38  * FreeBSD: src/sys/i386/include/ioctl_meteor.h,v 1.11 1999/12/29 04:33:02 peter Exp
39  */
40 /*
41  *	ioctl constants for Matrox Meteor Capture card.
42  */
43 
44 
45 #ifndef _KERNEL
46 #include <sys/types.h>
47 #endif
48 #include <sys/ioccom.h>
49 
50 struct meteor_capframe {
51 	short	command;	/* see below for valid METEORCAPFRM commands */
52 	short	lowat;		/* start transfer if < this number */
53 	short	hiwat;		/* stop transfer if > this number */
54 } ;
55 
56 /* structure for METEOR[GS]ETGEO - get/set geometry  */
57 struct meteor_geomet {
58 	u_short		rows;
59 	u_short		columns;
60 	u_short		frames;
61 	u_long		oformat;
62 } ;
63 
64 /* structure for METEORGCOUNT-get count of frames, fifo errors and dma errors */
65 struct meteor_counts {
66 	u_long fifo_errors;	/* count of fifo errors since open */
67 	u_long dma_errors;	/* count of dma errors since open */
68 	u_long frames_captured;	/* count of frames captured since open */
69 	u_long even_fields_captured; /* count of even fields captured */
70 	u_long odd_fields_captured; /* count of odd fields captured */
71 } ;
72 
73 /* structure for getting and setting direct transfers to vram */
74 struct meteor_video {
75 	u_long	addr;	/* Address of location to dma to */
76 	u_long	width;	/* Width of memory area */
77 	u_long	banksize;	/* Size of Vram bank */
78 	u_long	ramsize;	/* Size of Vram */
79 };
80 
81 #define METEORCAPTUR _IOW('x', 1, int)			 /* capture a frame */
82 #define METEORCAPFRM _IOW('x', 2, struct meteor_capframe)  /* sync capture */
83 #define METEORSETGEO _IOW('x', 3, struct meteor_geomet)  /* set geometry */
84 #define METEORGETGEO _IOR('x', 4, struct meteor_geomet)  /* get geometry */
85 #define METEORSTATUS _IOR('x', 5, unsigned short)	/* get status */
86 #define METEORSHUE   _IOW('x', 6, signed char)		/* set hue */
87 #define METEORGHUE   _IOR('x', 6, signed char)		/* get hue */
88 #define METEORSFMT   _IOW('x', 7, unsigned long)	/* set format */
89 #define METEORGFMT   _IOR('x', 7, unsigned long)	/* get format */
90 #define METEORSINPUT _IOW('x', 8, unsigned long)	/* set input dev */
91 #define METEORGINPUT _IOR('x', 8, unsigned long)	/* get input dev */
92 #define	METEORSCHCV  _IOW('x', 9, unsigned char)	/* set uv gain */
93 #define	METEORGCHCV  _IOR('x', 9, unsigned char)	/* get uv gain */
94 #define	METEORSCOUNT _IOW('x',10, struct meteor_counts)
95 #define	METEORGCOUNT _IOR('x',10, struct meteor_counts)
96 #define METEORSFPS   _IOW('x',11, unsigned short)	/* set fps */
97 #define METEORGFPS   _IOR('x',11, unsigned short)	/* get fps */
98 #define METEORSSIGNAL _IOW('x', 12, unsigned int)	/* set signal */
99 #define METEORGSIGNAL _IOR('x', 12, unsigned int)	/* get signal */
100 #define	METEORSVIDEO _IOW('x', 13, struct meteor_video)	/* set video */
101 #define	METEORGVIDEO _IOR('x', 13, struct meteor_video)	/* get video */
102 #define	METEORSBRIG  _IOW('x', 14, unsigned char)	/* set brightness */
103 #define METEORGBRIG  _IOR('x', 14, unsigned char)	/* get brightness */
104 #define	METEORSCSAT  _IOW('x', 15, unsigned char)	/* set chroma sat */
105 #define METEORGCSAT  _IOR('x', 15, unsigned char)	/* get uv saturation */
106 #define	METEORSCONT  _IOW('x', 16, unsigned char)	/* set contrast */
107 #define	METEORGCONT  _IOR('x', 16, unsigned char)	/* get contrast */
108 #define METEORSBT254 _IOW('x', 17, unsigned short)	/* set Bt254 reg */
109 #define METEORGBT254 _IOR('x', 17, unsigned short)	/* get Bt254 reg */
110 #define METEORSHWS   _IOW('x', 18, unsigned char)	/* set hor start reg */
111 #define METEORGHWS   _IOR('x', 18, unsigned char)	/* get hor start reg */
112 #define METEORSVWS   _IOW('x', 19, unsigned char)	/* set vert start reg */
113 #define METEORGVWS   _IOR('x', 19, unsigned char)	/* get vert start reg */
114 #define	METEORSTS    _IOW('x', 20, unsigned char)	/* set time stamp */
115 #define	METEORGTS    _IOR('x', 20, unsigned char)	/* get time stamp */
116 
117 #define	METEOR_STATUS_ID_MASK	0xf000	/* ID of 7196 */
118 #define	METEOR_STATUS_DIR	0x0800	/* Direction of Expansion port YUV */
119 #define	METEOR_STATUS_OEF	0x0200	/* Field detected: Even/Odd */
120 #define	METEOR_STATUS_SVP	0x0100	/* State of VRAM Port:inactive/active */
121 #define	METEOR_STATUS_STTC	0x0080	/* Time Constant: TV/VCR */
122 #define	METEOR_STATUS_HCLK	0x0040	/* Horiz PLL: locked/unlocked */
123 #define	METEOR_STATUS_FIDT	0x0020	/* Field detect: 50/60hz */
124 #define	METEOR_STATUS_ALTD	0x0002	/* Line alt: no line alt/line alt */
125 #define METEOR_STATUS_CODE	0x0001	/* Colour info: no colour/colour */
126 
127 				/* METEORCAPTUR capture options */
128 #define METEOR_CAP_SINGLE	0x0001	/* capture one frame */
129 #define METEOR_CAP_CONTINOUS	0x0002	/* continuously capture */
130 #define METEOR_CAP_STOP_CONT	0x0004	/* stop the continuous capture */
131 
132 				/* METEORCAPFRM capture commands */
133 #define METEOR_CAP_N_FRAMES	0x0001	/* capture N frames */
134 #define METEOR_CAP_STOP_FRAMES	0x0002	/* stop capture N frames */
135 #define	METEOR_HALT_N_FRAMES	0x0003	/* halt of capture N frames */
136 #define METEOR_CONT_N_FRAMES	0x0004	/* continue after above halt */
137 
138 				/* valid video input formats:  */
139 #define METEOR_FMT_NTSC		0x00100	/* NTSC --  initialized default */
140 #define METEOR_FMT_PAL		0x00200	/* PAL */
141 #define METEOR_FMT_SECAM	0x00400	/* SECAM */
142 #define METEOR_FMT_AUTOMODE	0x00800 /* auto-mode */
143 #define METEOR_INPUT_DEV0	0x01000	/* camera input 0 -- default */
144 #define METEOR_INPUT_DEV_RCA	METEOR_INPUT_DEV0
145 #define METEOR_INPUT_DEV1	0x02000	/* camera input 1 */
146 #define METEOR_INPUT_DEV2	0x04000	/* camera input 2 */
147 #define METEOR_INPUT_DEV3	0x08000	/* camera input 3 */
148 #define METEOR_INPUT_DEV_RGB	0x0a000	/* for rgb version of meteor */
149 #define METEOR_INPUT_DEV_SVIDEO	0x06000 /* S-video input port */
150 
151 				/* valid video output formats:  */
152 #define METEOR_GEO_RGB16	0x0010000 /* packed -- initialized default */
153 #define METEOR_GEO_RGB24	0x0020000 /* RBG 24 bits packed */
154 					  /* internally stored in 32 bits */
155 #define METEOR_GEO_YUV_PACKED	0x0040000 /* 4-2-2 YUV 16 bits packed */
156 #define METEOR_GEO_YUV_PLANAR	0x0080000 /* 4-2-2 YUV 16 bits planer */
157 #define METEOR_GEO_YUV_PLANER	METEOR_GEO_YUV_PLANAR
158 #define METEOR_GEO_UNSIGNED	0x0400000 /* unsigned uv outputs */
159 #define METEOR_GEO_EVEN_ONLY	0x1000000 /* set for even only field capture */
160 #define METEOR_GEO_ODD_ONLY	0x2000000 /* set for odd only field capture */
161 #define METEOR_GEO_FIELD_MASK	0x3000000
162 #define METEOR_GEO_YUV_422	0x4000000 /* 4-2-2 YUV in Y-U-V combined */
163 #define METEOR_GEO_OUTPUT_MASK	0x40f0000
164 #define METEOR_GEO_YUV_12	0x10000000	/* YUV 12 format */
165 #define METEOR_GEO_YUV_9	0x40000000	/* YUV 9 format */
166 
167 #define	METEOR_FIELD_MODE	0x80000000	/* Field cap or Frame cap */
168 
169 #define	METEOR_SIG_MODE_MASK	0xffff0000
170 #define	METEOR_SIG_FRAME	0x00000000	/* signal every frame */
171 #define	METEOR_SIG_FIELD	0x00010000	/* signal every field */
172 
173 	/* following structure is used to coordinate the synchronous */
174 
175 struct meteor_mem {
176 		/* kernel write only  */
177 	int	frame_size;	 /* row*columns*depth */
178 	unsigned num_bufs;	 /* number of frames in buffer (1-32) */
179 		/* user and kernel change these */
180 	int	lowat;		 /* kernel starts capture if < this number */
181 	int	hiwat;		 /* kernel stops capture if > this number.
182 				    hiwat <= numbufs */
183 	unsigned active;	 /* bit mask of active frame buffers
184 				    kernel sets, user clears */
185 	int	num_active_bufs; /* count of active frame buffer
186 				    kernel increments, user decrements */
187 
188 		/* reference to mmapped data */
189 	caddr_t	buf;		 /* The real space (virtual addr) */
190 } ;
191 
192 /*
193  * extensions to ioctl_meteor.h for the bt848 cards
194  *
195  * FreeBSD: src/sys/i386/include/ioctl_bt848.h,v 1.27 2000/10/26 16:41:48 roger Exp
196  */
197 
198 
199 /*
200  * frequency sets
201  */
202 #define CHNLSET_NABCST		1
203 #define CHNLSET_CABLEIRC	2
204 #define CHNLSET_CABLEHRC	3
205 #define CHNLSET_WEUROPE		4
206 #define CHNLSET_JPNBCST         5
207 #define CHNLSET_JPNCABLE        6
208 #define CHNLSET_XUSSR           7
209 #define CHNLSET_AUSTRALIA       8
210 #define CHNLSET_FRANCE          9
211 #define CHNLSET_MIN	        CHNLSET_NABCST
212 #define CHNLSET_MAX	        CHNLSET_FRANCE
213 
214 
215 /*
216  * constants for various tuner registers
217  */
218 #define BT848_HUEMIN		(-90)
219 #define BT848_HUEMAX		90
220 #define BT848_HUECENTER		0
221 #define BT848_HUERANGE		179.3
222 #define BT848_HUEREGMIN		(-128)
223 #define BT848_HUEREGMAX		127
224 #define BT848_HUESTEPS		256
225 
226 #define BT848_BRIGHTMIN		(-50)
227 #define BT848_BRIGHTMAX		50
228 #define BT848_BRIGHTCENTER	0
229 #define BT848_BRIGHTRANGE	99.6
230 #define BT848_BRIGHTREGMIN	(-128)
231 #define BT848_BRIGHTREGMAX	127
232 #define BT848_BRIGHTSTEPS	256
233 
234 #define BT848_CONTRASTMIN	0
235 #define BT848_CONTRASTMAX	237
236 #define BT848_CONTRASTCENTER	100
237 #define BT848_CONTRASTRANGE	236.57
238 #define BT848_CONTRASTREGMIN	0
239 #define BT848_CONTRASTREGMAX	511
240 #define BT848_CONTRASTSTEPS	512
241 
242 #define BT848_CHROMAMIN		0
243 #define BT848_CHROMAMAX		284
244 #define BT848_CHROMACENTER	100
245 #define BT848_CHROMARANGE	283.89
246 #define BT848_CHROMAREGMIN	0
247 #define BT848_CHROMAREGMAX	511
248 #define BT848_CHROMASTEPS	512
249 
250 #define BT848_SATUMIN		0
251 #define BT848_SATUMAX		202
252 #define BT848_SATUCENTER	100
253 #define BT848_SATURANGE		201.18
254 #define BT848_SATUREGMIN	0
255 #define BT848_SATUREGMAX	511
256 #define BT848_SATUSTEPS		512
257 
258 #define BT848_SATVMIN		0
259 #define BT848_SATVMAX		284
260 #define BT848_SATVCENTER	100
261 #define BT848_SATVRANGE		283.89
262 #define BT848_SATVREGMIN	0
263 #define BT848_SATVREGMAX	511
264 #define BT848_SATVSTEPS		512
265 
266 
267 /*
268  * audio stuff
269  */
270 #define AUDIO_TUNER		0x00	/* command for the audio routine */
271 #define AUDIO_EXTERN		0x01	/* don't confuse them with bit */
272 #define AUDIO_INTERN		0x02	/* settings */
273 #define AUDIO_MUTE		0x80
274 #define AUDIO_UNMUTE		0x81
275 
276 
277 /*
278  * EEProm stuff
279  */
280 struct eeProm {
281 	short	offset;
282 	short	count;
283 	u_char	bytes[ 256 ];
284 };
285 
286 
287 /*
288  * XXX: this is a hack, should be in ioctl_meteor.h
289  * here to avoid touching that file for now...
290  */
291 #define	TVTUNER_SETCHNL    _IOW('x', 32, unsigned int)	/* set channel */
292 #define	TVTUNER_GETCHNL    _IOR('x', 32, unsigned int)	/* get channel */
293 #define	TVTUNER_SETTYPE    _IOW('x', 33, unsigned int)	/* set tuner type */
294 #define	TVTUNER_GETTYPE    _IOR('x', 33, unsigned int)	/* get tuner type */
295 #define	TVTUNER_GETSTATUS  _IOR('x', 34, unsigned int)	/* get tuner status */
296 #define	TVTUNER_SETFREQ    _IOW('x', 35, unsigned int)	/* set frequency */
297 #define	TVTUNER_GETFREQ    _IOR('x', 36, unsigned int)	/* get frequency */
298 
299 
300 #define BT848_SHUE	_IOW('x', 37, int)		/* set hue */
301 #define BT848_GHUE	_IOR('x', 37, int)		/* get hue */
302 #define	BT848_SBRIG	_IOW('x', 38, int)		/* set brightness */
303 #define BT848_GBRIG	_IOR('x', 38, int)		/* get brightness */
304 #define	BT848_SCSAT	_IOW('x', 39, int)		/* set chroma sat */
305 #define BT848_GCSAT	_IOR('x', 39, int)		/* get UV saturation */
306 #define	BT848_SCONT	_IOW('x', 40, int)		/* set contrast */
307 #define	BT848_GCONT	_IOR('x', 40, int)		/* get contrast */
308 #define	BT848_SVSAT	_IOW('x', 41, int)		/* set chroma V sat */
309 #define BT848_GVSAT	_IOR('x', 41, int)		/* get V saturation */
310 #define	BT848_SUSAT	_IOW('x', 42, int)		/* set chroma U sat */
311 #define BT848_GUSAT	_IOR('x', 42, int)		/* get U saturation */
312 
313 #define	BT848_SCBARS	_IOR('x', 43, int)		/* set colorbar */
314 #define	BT848_CCBARS	_IOR('x', 44, int)		/* clear colorbar */
315 
316 
317 #define	BT848_SAUDIO	_IOW('x', 46, int)		/* set audio channel */
318 #define BT848_GAUDIO	_IOR('x', 47, int)		/* get audio channel */
319 #define	BT848_SBTSC	_IOW('x', 48, int)		/* set audio channel */
320 
321 #define	BT848_GSTATUS	_IOR('x', 49, unsigned int)	/* reap status */
322 
323 #define	BT848_WEEPROM	_IOWR('x', 50, struct eeProm)	/* write to EEProm */
324 #define	BT848_REEPROM	_IOWR('x', 51, struct eeProm)	/* read from EEProm */
325 
326 #define	BT848_SIGNATURE	_IOWR('x', 52, struct eeProm)	/* read card sig */
327 
328 #define	TVTUNER_SETAFC	_IOW('x', 53, int)		/* turn AFC on/off */
329 #define TVTUNER_GETAFC	_IOR('x', 54, int)		/* query AFC on/off */
330 #define BT848_SLNOTCH	_IOW('x', 55, int)		/* set luma notch */
331 #define BT848_GLNOTCH	_IOR('x', 56, int)		/* get luma notch */
332 
333 /* Read/Write the BT848's I2C bus directly
334  * b7-b0:    data (read/write)
335  * b15-b8:   internal peripheral register (write)
336  * b23-b16:  i2c addr (write)
337  * b31-b24:  1 = write, 0 = read
338  */
339 #define BT848_I2CWR     _IOWR('x', 57, u_long)    /* i2c read-write */
340 
341 struct bktr_msp_control {
342 	unsigned char function;
343 	unsigned int  address;
344 	unsigned int  data;
345 };
346 
347 #define BT848_MSP_RESET _IO('x', 76)				/* MSP chip reset */
348 #define BT848_MSP_READ  _IOWR('x', 77, struct bktr_msp_control)	/* MSP chip read */
349 #define BT848_MSP_WRITE _IOWR('x', 78, struct bktr_msp_control)	/* MSP chip write */
350 
351 /* Support for radio tuner */
352 #define RADIO_SETMODE	 _IOW('x', 58, unsigned int)  /* set radio modes */
353 #define RADIO_GETMODE	 _IOR('x', 58, unsigned char)  /* get radio modes */
354 #define   RADIO_AFC	 0x01		/* These modes will probably not */
355 #define   RADIO_MONO	 0x02		/*  work on the FRxxxx. It does	 */
356 #define   RADIO_MUTE	 0x08		/*  work on the FMxxxx.	*/
357 #define RADIO_SETFREQ    _IOW('x', 59, unsigned int)  /* set frequency   */
358 #define RADIO_GETFREQ    _IOR('x', 59, unsigned int)  /* set frequency   */
359  /*        Argument is frequency*100MHz  */
360 
361 /*
362  * XXX: more bad magic,
363  *      we need to fix the METEORGINPUT to return something public
364  *      duplicate them here for now...
365  */
366 #define	METEOR_DEV0		0x00001000
367 #define	METEOR_DEV1		0x00002000
368 #define	METEOR_DEV2		0x00004000
369 #define	METEOR_DEV3		0x00008000
370 #define	METEOR_DEV_SVIDEO	0x00006000
371 /*
372  * right now I don't know were to put these, but as they are suppose to be
373  * a part of a common video capture interface, these should be relocated to
374  * another place.  Probably most of the METEOR_xxx defines need to be
375  * renamed and moved to a common header
376  */
377 
378 typedef enum { METEOR_PIXTYPE_RGB, METEOR_PIXTYPE_YUV,
379 	       METEOR_PIXTYPE_YUV_PACKED,
380 	       METEOR_PIXTYPE_YUV_12 } METEOR_PIXTYPE;
381 
382 
383 struct meteor_pixfmt {
384 	u_int          index;         /* Index in supported pixfmt list     */
385 	METEOR_PIXTYPE type;          /* What's the board gonna feed us     */
386 	u_int          Bpp;           /* Bytes per pixel                    */
387 	u_long         masks[3];      /* R,G,B or Y,U,V masks, respectively */
388 	unsigned       swap_bytes :1; /* Bytes  swapped within shorts       */
389 	unsigned       swap_shorts:1; /* Shorts swapped within longs        */
390 };
391 
392 
393 struct bktr_clip {
394     int          x_min;
395     int          x_max;
396     int          y_min;
397     int          y_max;
398 };
399 
400 #define BT848_MAX_CLIP_NODE 100
401 struct _bktr_clip {
402     struct bktr_clip x[BT848_MAX_CLIP_NODE];
403 };
404 
405 /*
406  * I'm using METEOR_xxx just because that will be common to other interface
407  * and less of a surprise
408  */
409 #define METEORSACTPIXFMT	_IOW('x', 64, int )
410 #define METEORGACTPIXFMT	_IOR('x', 64, int )
411 #define METEORGSUPPIXFMT	_IOWR('x', 65, struct meteor_pixfmt)
412 
413 /* set clip list */
414 #define BT848SCLIP     _IOW('x', 66, struct _bktr_clip )
415 #define BT848GCLIP     _IOR('x', 66, struct _bktr_clip )
416 
417 
418 /* set input format */
419 #define BT848SFMT		_IOW('x', 67, unsigned long )
420 #define BT848GFMT		_IOR('x', 67, unsigned long )
421 
422 /* set clear-buffer-on-start */
423 #define BT848SCBUF	_IOW('x', 68, int)
424 #define BT848GCBUF	_IOR('x', 68, int)
425 
426 /* set capture area */
427 /* The capture area is the area of the video image which is grabbed */
428 /* Usually the capture area is 640x480 (768x576 PAL) pixels */
429 /* This area is then scaled to the dimensions the user requires */
430 /* using the METEORGEO ioctl */
431 /* However, the capture area could be 400x300 pixels from the top right */
432 /* corner of the video image */
433 struct bktr_capture_area {
434    int      x_offset;
435    int      y_offset;
436    int      x_size;
437    int      y_size;
438 };
439 #define BT848_SCAPAREA   _IOW('x', 69, struct bktr_capture_area)
440 #define BT848_GCAPAREA   _IOR('x', 69, struct bktr_capture_area)
441 
442 
443 /* Get channel Set */
444 #define BT848_MAX_CHNLSET_NAME_LEN 16
445 struct bktr_chnlset {
446        short   index;
447        short   max_channel;
448        char    name[BT848_MAX_CHNLSET_NAME_LEN];
449 };
450 #define	TVTUNER_GETCHNLSET _IOWR('x', 70, struct bktr_chnlset)
451 
452 
453 
454 /* Infra Red Remote Control */
455 struct bktr_remote {
456        unsigned char data[3];
457 };
458 #define	REMOTE_GETKEY      _IOR('x', 71, struct bktr_remote)/*read the remote */
459                                                             /*control receiver*/
460                                                             /*returns raw data*/
461 
462 
463 /*
464  * Direct access to GPIO pins. You must add BKTR_GPIO_ACCESS to your kernel
465  * configuration file to use these
466  */
467 #define BT848_GPIO_SET_EN      _IOW('x', 72, int)      /* set gpio_out_en */
468 #define BT848_GPIO_GET_EN      _IOR('x', 73, int)      /* get gpio_out_en */
469 #define BT848_GPIO_SET_DATA    _IOW('x', 74, int)      /* set gpio_data */
470 #define BT848_GPIO_GET_DATA    _IOR('x', 75, int)      /* get gpio_data */
471 
472 
473 
474 /*  XXX - Copied from /sys/pci/brktree_reg.h  */
475 #define BT848_IFORM_FORMAT              (0x7<<0)
476 # define BT848_IFORM_F_RSVD             (0x7)
477 # define BT848_IFORM_F_SECAM            (0x6)
478 # define BT848_IFORM_F_PALN             (0x5)
479 # define BT848_IFORM_F_PALM             (0x4)
480 # define BT848_IFORM_F_PALBDGHI         (0x3)
481 # define BT848_IFORM_F_NTSCJ            (0x2)
482 # define BT848_IFORM_F_NTSCM            (0x1)
483 # define BT848_IFORM_F_AUTO             (0x0)
484 
485 
486 
487 #endif /* _DEV_IC_BT8XX_H_ */
488