This source file includes following definitions.
- METEOR_PIXTYPE_YUV_PACKED
- METEOR_PIXTYPE_YUV_12
- METEOR_PIXTYPE
1
2
3
4
5
6
7 #ifndef _DEV_IC_BT8XX_H_
8 #define _DEV_IC_BT8XX_H_
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46 #ifndef _KERNEL
47 #include <sys/types.h>
48 #endif
49 #include <sys/ioccom.h>
50
51 struct meteor_capframe {
52 short command;
53 short lowat;
54 short hiwat;
55 } ;
56
57
58 struct meteor_geomet {
59 u_short rows;
60 u_short columns;
61 u_short frames;
62 u_int oformat;
63 } ;
64
65
66 struct meteor_counts {
67 u_int fifo_errors;
68 u_int dma_errors;
69 u_int frames_captured;
70 u_int even_fields_captured;
71 u_int odd_fields_captured;
72 } ;
73
74
75 struct meteor_video {
76 u_int addr;
77 u_int width;
78 u_int banksize;
79 u_int ramsize;
80 };
81
82 #define METEORCAPTUR _IOW('x', 1, int)
83 #define METEORCAPFRM _IOW('x', 2, struct meteor_capframe)
84 #define METEORSETGEO _IOW('x', 3, struct meteor_geomet)
85 #define METEORGETGEO _IOR('x', 4, struct meteor_geomet)
86 #define METEORSTATUS _IOR('x', 5, unsigned short)
87 #define METEORSHUE _IOW('x', 6, signed char)
88 #define METEORGHUE _IOR('x', 6, signed char)
89 #define METEORSFMT _IOW('x', 7, unsigned int)
90 #define METEORGFMT _IOR('x', 7, unsigned int)
91 #define METEORSINPUT _IOW('x', 8, unsigned int)
92 #define METEORGINPUT _IOR('x', 8, unsigned int)
93 #define METEORSCHCV _IOW('x', 9, unsigned char)
94 #define METEORGCHCV _IOR('x', 9, unsigned char)
95 #define METEORSCOUNT _IOW('x',10, struct meteor_counts)
96 #define METEORGCOUNT _IOR('x',10, struct meteor_counts)
97 #define METEORSFPS _IOW('x',11, unsigned short)
98 #define METEORGFPS _IOR('x',11, unsigned short)
99 #define METEORSSIGNAL _IOW('x', 12, unsigned int)
100 #define METEORGSIGNAL _IOR('x', 12, unsigned int)
101 #define METEORSVIDEO _IOW('x', 13, struct meteor_video)
102 #define METEORGVIDEO _IOR('x', 13, struct meteor_video)
103 #define METEORSBRIG _IOW('x', 14, unsigned char)
104 #define METEORGBRIG _IOR('x', 14, unsigned char)
105 #define METEORSCSAT _IOW('x', 15, unsigned char)
106 #define METEORGCSAT _IOR('x', 15, unsigned char)
107 #define METEORSCONT _IOW('x', 16, unsigned char)
108 #define METEORGCONT _IOR('x', 16, unsigned char)
109 #define METEORSBT254 _IOW('x', 17, unsigned short)
110 #define METEORGBT254 _IOR('x', 17, unsigned short)
111 #define METEORSHWS _IOW('x', 18, unsigned char)
112 #define METEORGHWS _IOR('x', 18, unsigned char)
113 #define METEORSVWS _IOW('x', 19, unsigned char)
114 #define METEORGVWS _IOR('x', 19, unsigned char)
115 #define METEORSTS _IOW('x', 20, unsigned char)
116 #define METEORGTS _IOR('x', 20, unsigned char)
117
118 #define METEOR_STATUS_ID_MASK 0xf000
119 #define METEOR_STATUS_DIR 0x0800
120 #define METEOR_STATUS_OEF 0x0200
121 #define METEOR_STATUS_SVP 0x0100
122 #define METEOR_STATUS_STTC 0x0080
123 #define METEOR_STATUS_HCLK 0x0040
124 #define METEOR_STATUS_FIDT 0x0020
125 #define METEOR_STATUS_ALTD 0x0002
126 #define METEOR_STATUS_CODE 0x0001
127
128
129 #define METEOR_CAP_SINGLE 0x0001
130 #define METEOR_CAP_CONTINOUS 0x0002
131 #define METEOR_CAP_STOP_CONT 0x0004
132
133
134 #define METEOR_CAP_N_FRAMES 0x0001
135 #define METEOR_CAP_STOP_FRAMES 0x0002
136 #define METEOR_HALT_N_FRAMES 0x0003
137 #define METEOR_CONT_N_FRAMES 0x0004
138
139
140 #define METEOR_FMT_NTSC 0x00100
141 #define METEOR_FMT_PAL 0x00200
142 #define METEOR_FMT_SECAM 0x00400
143 #define METEOR_FMT_AUTOMODE 0x00800
144 #define METEOR_INPUT_DEV0 0x01000
145 #define METEOR_INPUT_DEV_RCA METEOR_INPUT_DEV0
146 #define METEOR_INPUT_DEV1 0x02000
147 #define METEOR_INPUT_DEV2 0x04000
148 #define METEOR_INPUT_DEV3 0x08000
149 #define METEOR_INPUT_DEV_RGB 0x0a000
150 #define METEOR_INPUT_DEV_SVIDEO 0x06000
151
152
153 #define METEOR_GEO_RGB16 0x0010000
154 #define METEOR_GEO_RGB24 0x0020000
155
156 #define METEOR_GEO_YUV_PACKED 0x0040000
157 #define METEOR_GEO_YUV_PLANAR 0x0080000
158 #define METEOR_GEO_YUV_PLANER METEOR_GEO_YUV_PLANAR
159 #define METEOR_GEO_UNSIGNED 0x0400000
160 #define METEOR_GEO_EVEN_ONLY 0x1000000
161 #define METEOR_GEO_ODD_ONLY 0x2000000
162 #define METEOR_GEO_FIELD_MASK 0x3000000
163 #define METEOR_GEO_YUV_422 0x4000000
164 #define METEOR_GEO_OUTPUT_MASK 0x40f0000
165 #define METEOR_GEO_YUV_12 0x10000000
166 #define METEOR_GEO_YUV_9 0x40000000
167
168 #define METEOR_FIELD_MODE 0x80000000
169
170 #define METEOR_SIG_MODE_MASK 0xffff0000
171 #define METEOR_SIG_FRAME 0x00000000
172 #define METEOR_SIG_FIELD 0x00010000
173
174
175
176 struct meteor_mem {
177
178 int frame_size;
179 unsigned num_bufs;
180
181 int lowat;
182 int hiwat;
183
184 unsigned active;
185
186 int num_active_bufs;
187
188
189
190 caddr_t buf;
191 } ;
192
193
194
195
196
197
198
199
200
201
202
203 #define CHNLSET_NABCST 1
204 #define CHNLSET_CABLEIRC 2
205 #define CHNLSET_CABLEHRC 3
206 #define CHNLSET_WEUROPE 4
207 #define CHNLSET_JPNBCST 5
208 #define CHNLSET_JPNCABLE 6
209 #define CHNLSET_XUSSR 7
210 #define CHNLSET_AUSTRALIA 8
211 #define CHNLSET_FRANCE 9
212 #define CHNLSET_MIN CHNLSET_NABCST
213 #define CHNLSET_MAX CHNLSET_FRANCE
214
215
216
217
218
219 #define BT848_HUEMIN (-90)
220 #define BT848_HUEMAX 90
221 #define BT848_HUECENTER 0
222 #define BT848_HUERANGE 179.3
223 #define BT848_HUEREGMIN (-128)
224 #define BT848_HUEREGMAX 127
225 #define BT848_HUESTEPS 256
226
227 #define BT848_BRIGHTMIN (-50)
228 #define BT848_BRIGHTMAX 50
229 #define BT848_BRIGHTCENTER 0
230 #define BT848_BRIGHTRANGE 99.6
231 #define BT848_BRIGHTREGMIN (-128)
232 #define BT848_BRIGHTREGMAX 127
233 #define BT848_BRIGHTSTEPS 256
234
235 #define BT848_CONTRASTMIN 0
236 #define BT848_CONTRASTMAX 237
237 #define BT848_CONTRASTCENTER 100
238 #define BT848_CONTRASTRANGE 236.57
239 #define BT848_CONTRASTREGMIN 0
240 #define BT848_CONTRASTREGMAX 511
241 #define BT848_CONTRASTSTEPS 512
242
243 #define BT848_CHROMAMIN 0
244 #define BT848_CHROMAMAX 284
245 #define BT848_CHROMACENTER 100
246 #define BT848_CHROMARANGE 283.89
247 #define BT848_CHROMAREGMIN 0
248 #define BT848_CHROMAREGMAX 511
249 #define BT848_CHROMASTEPS 512
250
251 #define BT848_SATUMIN 0
252 #define BT848_SATUMAX 202
253 #define BT848_SATUCENTER 100
254 #define BT848_SATURANGE 201.18
255 #define BT848_SATUREGMIN 0
256 #define BT848_SATUREGMAX 511
257 #define BT848_SATUSTEPS 512
258
259 #define BT848_SATVMIN 0
260 #define BT848_SATVMAX 284
261 #define BT848_SATVCENTER 100
262 #define BT848_SATVRANGE 283.89
263 #define BT848_SATVREGMIN 0
264 #define BT848_SATVREGMAX 511
265 #define BT848_SATVSTEPS 512
266
267
268
269
270
271 #define AUDIO_TUNER 0x00
272 #define AUDIO_EXTERN 0x01
273 #define AUDIO_INTERN 0x02
274 #define AUDIO_MUTE 0x80
275 #define AUDIO_UNMUTE 0x81
276
277
278
279
280
281 struct eeProm {
282 short offset;
283 short count;
284 u_char bytes[ 256 ];
285 };
286
287
288
289
290
291
292 #define TVTUNER_SETCHNL _IOW('x', 32, unsigned int)
293 #define TVTUNER_GETCHNL _IOR('x', 32, unsigned int)
294 #define TVTUNER_SETTYPE _IOW('x', 33, unsigned int)
295 #define TVTUNER_GETTYPE _IOR('x', 33, unsigned int)
296 #define TVTUNER_GETSTATUS _IOR('x', 34, unsigned int)
297 #define TVTUNER_SETFREQ _IOW('x', 35, unsigned int)
298 #define TVTUNER_GETFREQ _IOR('x', 36, unsigned int)
299
300
301 #define BT848_SHUE _IOW('x', 37, int)
302 #define BT848_GHUE _IOR('x', 37, int)
303 #define BT848_SBRIG _IOW('x', 38, int)
304 #define BT848_GBRIG _IOR('x', 38, int)
305 #define BT848_SCSAT _IOW('x', 39, int)
306 #define BT848_GCSAT _IOR('x', 39, int)
307 #define BT848_SCONT _IOW('x', 40, int)
308 #define BT848_GCONT _IOR('x', 40, int)
309 #define BT848_SVSAT _IOW('x', 41, int)
310 #define BT848_GVSAT _IOR('x', 41, int)
311 #define BT848_SUSAT _IOW('x', 42, int)
312 #define BT848_GUSAT _IOR('x', 42, int)
313
314 #define BT848_SCBARS _IOR('x', 43, int)
315 #define BT848_CCBARS _IOR('x', 44, int)
316
317
318 #define BT848_SAUDIO _IOW('x', 46, int)
319 #define BT848_GAUDIO _IOR('x', 47, int)
320 #define BT848_SBTSC _IOW('x', 48, int)
321
322 #define BT848_GSTATUS _IOR('x', 49, unsigned int)
323
324 #define BT848_WEEPROM _IOWR('x', 50, struct eeProm)
325 #define BT848_REEPROM _IOWR('x', 51, struct eeProm)
326
327 #define BT848_SIGNATURE _IOWR('x', 52, struct eeProm)
328
329 #define TVTUNER_SETAFC _IOW('x', 53, int)
330 #define TVTUNER_GETAFC _IOR('x', 54, int)
331 #define BT848_SLNOTCH _IOW('x', 55, int)
332 #define BT848_GLNOTCH _IOR('x', 56, int)
333
334
335
336
337
338
339
340 #define BT848_I2CWR _IOWR('x', 57, u_int)
341
342 struct bktr_msp_control {
343 unsigned char function;
344 unsigned int address;
345 unsigned int data;
346 };
347
348 #define BT848_MSP_RESET _IO('x', 76)
349 #define BT848_MSP_READ _IOWR('x', 77, struct bktr_msp_control)
350 #define BT848_MSP_WRITE _IOWR('x', 78, struct bktr_msp_control)
351
352
353 #define RADIO_SETMODE _IOW('x', 58, unsigned int)
354 #define RADIO_GETMODE _IOR('x', 58, unsigned char)
355 #define RADIO_AFC 0x01
356 #define RADIO_MONO 0x02
357 #define RADIO_MUTE 0x08
358 #define RADIO_SETFREQ _IOW('x', 59, unsigned int)
359 #define RADIO_GETFREQ _IOR('x', 59, unsigned int)
360
361
362
363
364
365
366
367 #define METEOR_DEV0 0x00001000
368 #define METEOR_DEV1 0x00002000
369 #define METEOR_DEV2 0x00004000
370 #define METEOR_DEV3 0x00008000
371 #define METEOR_DEV_SVIDEO 0x00006000
372
373
374
375
376
377
378
379 typedef enum { METEOR_PIXTYPE_RGB, METEOR_PIXTYPE_YUV,
380 METEOR_PIXTYPE_YUV_PACKED,
381 METEOR_PIXTYPE_YUV_12 } METEOR_PIXTYPE;
382
383
384 struct meteor_pixfmt {
385 u_int index;
386 METEOR_PIXTYPE type;
387 u_int Bpp;
388 u_int masks[3];
389 unsigned swap_bytes :1;
390 unsigned swap_shorts:1;
391 };
392
393
394 struct bktr_clip {
395 int x_min;
396 int x_max;
397 int y_min;
398 int y_max;
399 };
400
401 #define BT848_MAX_CLIP_NODE 100
402 struct _bktr_clip {
403 struct bktr_clip x[BT848_MAX_CLIP_NODE];
404 };
405
406
407
408
409
410 #define METEORSACTPIXFMT _IOW('x', 64, int )
411 #define METEORGACTPIXFMT _IOR('x', 64, int )
412 #define METEORGSUPPIXFMT _IOWR('x', 65, struct meteor_pixfmt)
413
414
415 #define BT848SCLIP _IOW('x', 66, struct _bktr_clip )
416 #define BT848GCLIP _IOR('x', 66, struct _bktr_clip )
417
418
419
420 #define BT848SFMT _IOW('x', 67, unsigned int )
421 #define BT848GFMT _IOR('x', 67, unsigned int )
422
423
424 #define BT848SCBUF _IOW('x', 68, int)
425 #define BT848GCBUF _IOR('x', 68, int)
426
427
428
429
430
431
432
433
434 struct bktr_capture_area {
435 int x_offset;
436 int y_offset;
437 int x_size;
438 int y_size;
439 };
440 #define BT848_SCAPAREA _IOW('x', 69, struct bktr_capture_area)
441 #define BT848_GCAPAREA _IOR('x', 69, struct bktr_capture_area)
442
443
444
445 #define BT848_MAX_CHNLSET_NAME_LEN 16
446 struct bktr_chnlset {
447 short index;
448 short max_channel;
449 char name[BT848_MAX_CHNLSET_NAME_LEN];
450 };
451 #define TVTUNER_GETCHNLSET _IOWR('x', 70, struct bktr_chnlset)
452
453
454
455
456 struct bktr_remote {
457 unsigned char data[3];
458 };
459 #define REMOTE_GETKEY _IOR('x', 71, struct bktr_remote)
460
461
462
463
464
465
466
467
468 #define BT848_GPIO_SET_EN _IOW('x', 72, int)
469 #define BT848_GPIO_GET_EN _IOR('x', 73, int)
470 #define BT848_GPIO_SET_DATA _IOW('x', 74, int)
471 #define BT848_GPIO_GET_DATA _IOR('x', 75, int)
472
473
474
475
476 #define BT848_IFORM_FORMAT (0x7<<0)
477 # define BT848_IFORM_F_RSVD (0x7)
478 # define BT848_IFORM_F_SECAM (0x6)
479 # define BT848_IFORM_F_PALN (0x5)
480 # define BT848_IFORM_F_PALM (0x4)
481 # define BT848_IFORM_F_PALBDGHI (0x3)
482 # define BT848_IFORM_F_NTSCJ (0x2)
483 # define BT848_IFORM_F_NTSCM (0x1)
484 # define BT848_IFORM_F_AUTO (0x0)
485
486
487
488
489 #ifndef TRUE
490 #define TRUE 1
491 #endif
492 #ifndef FALSE
493 #define FALSE 0
494 #endif
495
496
497 #endif