1
2
3
4
5
6
7
8
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 #include <machine/bus.h>
39 #include <sys/device.h>
40 #include <sys/selinfo.h>
41
42 #ifdef DEBUG
43 # define bootverbose 1
44 #else
45 # define bootverbose 0
46 #endif
47
48
49
50
51
52
53 #if defined(BROOKTREE_ALLOC_PAGES)
54 #define BKTR_ALLOC_PAGES BROOKTREE_ALLOC_PAGES
55 #endif
56
57 #if defined(BROOKTREE_SYSTEM_DEFAULT)
58 #define BKTR_SYSTEM_DEFAULT BROOKTREE_SYSTEM_DEFAULT
59 #endif
60
61 #if defined(OVERRIDE_CARD)
62 #define BKTR_OVERRIDE_CARD OVERRIDE_CARD
63 #endif
64
65 #if defined(OVERRIDE_TUNER)
66 #define BKTR_OVERRIDE_TUNER OVERRIDE_TUNER
67 #endif
68
69 #if defined(OVERRIDE_DBX)
70 #define BKTR_OVERRIDE_DBX OVERRIDE_DBX
71 #endif
72
73 #if defined(OVERRIDE_MSP)
74 #define BKTR_OVERRIDE_MSP OVERRIDE_MSP
75 #endif
76
77 #ifndef PCI_LATENCY_TIMER
78 #define PCI_LATENCY_TIMER 0x0c
79 #endif
80
81
82
83
84 #include <dev/pci/pcivar.h>
85
86
87 #define PCI_VENDOR_BROOKTREE 0x109e
88
89 #define PCI_PRODUCT_BROOKTREE_BT848 0x0350
90 #define PCI_PRODUCT_BROOKTREE_BT849 0x0351
91 #define PCI_PRODUCT_BROOKTREE_BT878 0x036e
92 #define PCI_PRODUCT_BROOKTREE_BT879 0x036f
93
94 #define BROOKTREE_848 1
95 #define BROOKTREE_848A 2
96 #define BROOKTREE_849A 3
97 #define BROOKTREE_878 4
98 #define BROOKTREE_879 5
99
100 typedef volatile u_int bregister_t;
101
102
103
104
105
106 #define BTBYTE(what) bregister_t what:8; int :24
107 #define BTWORD(what) bregister_t what:16; int: 16
108 #define BTLONG(what) bregister_t what:32
109
110 struct bt848_registers {
111 BTBYTE (dstatus);
112 #define BT848_DSTATUS_PRES (1<<7)
113 #define BT848_DSTATUS_HLOC (1<<6)
114 #define BT848_DSTATUS_FIELD (1<<5)
115 #define BT848_DSTATUS_NUML (1<<4)
116 #define BT848_DSTATUS_CSEL (1<<3)
117 #define BT848_DSTATUS_PLOCK (1<<2)
118 #define BT848_DSTATUS_LOF (1<<1)
119 #define BT848_DSTATUS_COF (1<<0)
120 BTBYTE (iform);
121 #define BT848_IFORM_MUXSEL (0x3<<5)
122 # define BT848_IFORM_M_MUX1 (0x03<<5)
123 # define BT848_IFORM_M_MUX0 (0x02<<5)
124 # define BT848_IFORM_M_MUX2 (0x01<<5)
125 # define BT848_IFORM_M_MUX3 (0x0)
126 # define BT848_IFORM_M_RSVD (0x00<<5)
127 #define BT848_IFORM_XTSEL (0x3<<3)
128 # define BT848_IFORM_X_AUTO (0x03<<3)
129 # define BT848_IFORM_X_XT1 (0x02<<3)
130 # define BT848_IFORM_X_XT0 (0x01<<3)
131 # define BT848_IFORM_X_RSVD (0x00<<3)
132 BTBYTE (tdec);
133 BTBYTE (e_crop);
134 BTBYTE (e_vdelay_lo);
135 BTBYTE (e_vactive_lo);
136 BTBYTE (e_delay_lo);
137 BTBYTE (e_hactive_lo);
138 BTBYTE (e_hscale_hi);
139 BTBYTE (e_hscale_lo);
140 BTBYTE (bright);
141 BTBYTE (e_control);
142 #define BT848_E_CONTROL_LNOTCH (1<<7)
143 #define BT848_E_CONTROL_COMP (1<<6)
144 #define BT848_E_CONTROL_LDEC (1<<5)
145 #define BT848_E_CONTROL_CBSENSE (1<<4)
146 #define BT848_E_CONTROL_RSVD (1<<3)
147 #define BT848_E_CONTROL_CON_MSB (1<<2)
148 #define BT848_E_CONTROL_SAT_U_MSB (1<<1)
149 #define BT848_E_CONTROL_SAT_V_MSB (1<<0)
150 BTBYTE (contrast_lo);
151 BTBYTE (sat_u_lo);
152 BTBYTE (sat_v_lo);
153 BTBYTE (hue);
154 BTBYTE (e_scloop);
155 #define BT848_E_SCLOOP_RSVD1 (1<<7)
156 #define BT848_E_SCLOOP_CAGC (1<<6)
157 #define BT848_E_SCLOOP_CKILL (1<<5)
158 #define BT848_E_SCLOOP_HFILT (0x3<<3)
159 # define BT848_E_SCLOOP_HFILT_ICON (0x3<<3)
160 # define BT848_E_SCLOOP_HFILT_QCIF (0x2<<3)
161 # define BT848_E_SCLOOP_HFILT_CIF (0x1<<3)
162 # define BT848_E_SCLOOP_HFILT_AUTO (0x0<<3)
163 #define BT848_E_SCLOOP_RSVD0 (0x7<<0)
164 int :32;
165 BTBYTE (oform);
166 BTBYTE (e_vscale_hi);
167 BTBYTE (e_vscale_lo);
168 BTBYTE (test);
169 int :32;
170 int :32;
171 BTLONG (adelay);
172 BTBYTE (bdelay);
173 BTBYTE (adc);
174 #define BT848_ADC_RESERVED (0x80)
175 #define BT848_ADC_SYNC_T (1<<5)
176 #define BT848_ADC_AGC_EN (1<<4)
177 #define BT848_ADC_CLK_SLEEP (1<<3)
178 #define BT848_ADC_Y_SLEEP (1<<2)
179 #define BT848_ADC_C_SLEEP (1<<1)
180 #define BT848_ADC_CRUSH (1<<0)
181 BTBYTE (e_vtc);
182 int :32;
183 int :32;
184 int :32;
185 BTLONG (sreset);
186 u_char filler1[0x84-0x80];
187 BTBYTE (tgctrl);
188 #define BT848_TGCTRL_TGCKI (3<<3)
189 #define BT848_TGCTRL_TGCKI_XTAL (0<<3)
190 #define BT848_TGCTRL_TGCKI_PLL (1<<3)
191 #define BT848_TGCTRL_TGCKI_GPCLK (2<<3)
192 #define BT848_TGCTRL_TGCKI_GPCLK_I (3<<3)
193 u_char filler[0x8c-0x88];
194 BTBYTE (o_crop);
195 BTBYTE (o_vdelay_lo);
196 BTBYTE (o_vactive_lo);
197 BTBYTE (o_delay_lo);
198 BTBYTE (o_hactive_lo);
199 BTBYTE (o_hscale_hi);
200 BTBYTE (o_hscale_lo);
201 int :32;
202 BTBYTE (o_control);
203 #define BT848_O_CONTROL_LNOTCH (1<<7)
204 #define BT848_O_CONTROL_COMP (1<<6)
205 #define BT848_O_CONTROL_LDEC (1<<5)
206 #define BT848_O_CONTROL_CBSENSE (1<<4)
207 #define BT848_O_CONTROL_RSVD (1<<3)
208 #define BT848_O_CONTROL_CON_MSB (1<<2)
209 #define BT848_O_CONTROL_SAT_U_MSB (1<<1)
210 #define BT848_O_CONTROL_SAT_V_MSB (1<<0)
211 u_char fillter4[16];
212 BTBYTE (o_scloop);
213 #define BT848_O_SCLOOP_RSVD1 (1<<7)
214 #define BT848_O_SCLOOP_CAGC (1<<6)
215 #define BT848_O_SCLOOP_CKILL (1<<5)
216 #define BT848_O_SCLOOP_HFILT (0x3<<3)
217 #define BT848_O_SCLOOP_HFILT_ICON (0x3<<3)
218 #define BT848_O_SCLOOP_HFILT_QCIF (0x2<<3)
219 #define BT848_O_SCLOOP_HFILT_CIF (0x1<<3)
220 #define BT848_O_SCLOOP_HFILT_AUTO (0x0<<3)
221 #define BT848_O_SCLOOP_RSVD0 (0x7<<0)
222 int :32;
223 int :32;
224 BTBYTE (o_vscale_hi);
225 BTBYTE (o_vscale_lo);
226 BTBYTE (color_fmt);
227 bregister_t color_ctl_swap :4;
228 #define BT848_COLOR_CTL_WSWAP_ODD (1<<3)
229 #define BT848_COLOR_CTL_WSWAP_EVEN (1<<2)
230 #define BT848_COLOR_CTL_BSWAP_ODD (1<<1)
231 #define BT848_COLOR_CTL_BSWAP_EVEN (1<<0)
232 bregister_t color_ctl_gamma :1;
233 bregister_t color_ctl_rgb_ded :1;
234 bregister_t color_ctl_color_bars :1;
235 bregister_t color_ctl_ext_frmrate :1;
236 #define BT848_COLOR_CTL_GAMMA (1<<4)
237 #define BT848_COLOR_CTL_RGB_DED (1<<5)
238 #define BT848_COLOR_CTL_COLOR_BARS (1<<6)
239 #define BT848_COLOR_CTL_EXT_FRMRATE (1<<7)
240 int :24;
241 BTBYTE (cap_ctl);
242 #define BT848_CAP_CTL_DITH_FRAME (1<<4)
243 #define BT848_CAP_CTL_VBI_ODD (1<<3)
244 #define BT848_CAP_CTL_VBI_EVEN (1<<2)
245 #define BT848_CAP_CTL_ODD (1<<1)
246 #define BT848_CAP_CTL_EVEN (1<<0)
247 BTBYTE (vbi_pack_size);
248 BTBYTE (vbi_pack_del);
249 int :32;
250 BTBYTE (o_vtc);
251 BTBYTE (pll_f_lo);
252 BTBYTE (pll_f_hi);
253 BTBYTE (pll_f_xci);
254 #define BT848_PLL_F_C (1<<6)
255 #define BT848_PLL_F_X (1<<7)
256 u_char filler2[0x100-0xfc];
257 BTLONG (int_stat);
258 BTLONG (int_mask);
259 #define BT848_INT_RISCS (0xf<<28)
260 #define BT848_INT_RISC_EN (1<<27)
261 #define BT848_INT_RACK (1<<25)
262 #define BT848_INT_FIELD (1<<24)
263 #define BT848_INT_MYSTERYBIT (1<<23)
264 #define BT848_INT_SCERR (1<<19)
265 #define BT848_INT_OCERR (1<<18)
266 #define BT848_INT_PABORT (1<<17)
267 #define BT848_INT_RIPERR (1<<16)
268 #define BT848_INT_PPERR (1<<15)
269 #define BT848_INT_FDSR (1<<14)
270 #define BT848_INT_FTRGT (1<<13)
271 #define BT848_INT_FBUS (1<<12)
272 #define BT848_INT_RISCI (1<<11)
273 #define BT848_INT_GPINT (1<<9)
274 #define BT848_INT_I2CDONE (1<<8)
275 #define BT848_INT_RSV1 (1<<7)
276 #define BT848_INT_RSV0 (1<<6)
277 #define BT848_INT_VPRES (1<<5)
278 #define BT848_INT_HLOCK (1<<4)
279 #define BT848_INT_OFLOW (1<<3)
280 #define BT848_INT_HSYNC (1<<2)
281 #define BT848_INT_VSYNC (1<<1)
282 #define BT848_INT_FMTCHG (1<<0)
283 #define BT848_INT_BITS \
284 ("\020\01FMTCHG\02VSYNC\03HSYNC\04OFLOW\05HLOCK\06VPRES\07RSV0"\
285 "\010RSV1\011I2CDONE\012GPINT\014RISCI\015FBUS\016FTRGT\017FDSR"\
286 "\020PPERR\021RIPERR\022PABORT\023OCERR\024SCERR"\
287 "\030MYSTERYBIT\031FIELD\032RACK\034RISC_EN")
288 int :32;
289 BTWORD (gpio_dma_ctl);
290 #define BT848_DMA_CTL_PL23TP4 (0<<6)
291 #define BT848_DMA_CTL_PL23TP8 (1<<6)
292 #define BT848_DMA_CTL_PL23TP16 (2<<6)
293 #define BT848_DMA_CTL_PL23TP32 (3<<6)
294 #define BT848_DMA_CTL_PL1TP4 (0<<4)
295 #define BT848_DMA_CTL_PL1TP8 (1<<4)
296 #define BT848_DMA_CTL_PL1TP16 (2<<4)
297 #define BT848_DMA_CTL_PL1TP32 (3<<4)
298 #define BT848_DMA_CTL_PKTP4 (0<<2)
299 #define BT848_DMA_CTL_PKTP8 (1<<2)
300 #define BT848_DMA_CTL_PKTP16 (2<<2)
301 #define BT848_DMA_CTL_PKTP32 (3<<2)
302 #define BT848_DMA_CTL_RISC_EN (1<<1)
303 #define BT848_DMA_CTL_FIFO_EN (1<<0)
304 BTLONG (i2c_data_ctl);
305 #define BT848_DATA_CTL_I2CDIV (0xf<<4)
306 #define BT848_DATA_CTL_I2CSYNC (1<<3)
307 #define BT848_DATA_CTL_I2CW3B (1<<2)
308 #define BT848_DATA_CTL_I2CSCL (1<<1)
309 #define BT848_DATA_CTL_I2CSDA (1<<0)
310 BTLONG (risc_strt_add);
311 BTLONG (gpio_out_en);
312 BTLONG (gpio_reg_inp);
313 BTLONG (risc_count);
314 u_char filler3[0x200-0x124];
315 BTLONG (gpio_data);
316 };
317
318
319 #define BKTR_DSTATUS 0x000
320 #define BKTR_IFORM 0x004
321 #define BKTR_TDEC 0x008
322 #define BKTR_E_CROP 0x00C
323 #define BKTR_O_CROP 0x08C
324 #define BKTR_E_VDELAY_LO 0x010
325 #define BKTR_O_VDELAY_LO 0x090
326 #define BKTR_E_VACTIVE_LO 0x014
327 #define BKTR_O_VACTIVE_LO 0x094
328 #define BKTR_E_DELAY_LO 0x018
329 #define BKTR_O_DELAY_LO 0x098
330 #define BKTR_E_HACTIVE_LO 0x01C
331 #define BKTR_O_HACTIVE_LO 0x09C
332 #define BKTR_E_HSCALE_HI 0x020
333 #define BKTR_O_HSCALE_HI 0x0A0
334 #define BKTR_E_HSCALE_LO 0x024
335 #define BKTR_O_HSCALE_LO 0x0A4
336 #define BKTR_BRIGHT 0x028
337 #define BKTR_E_CONTROL 0x02C
338 #define BKTR_O_CONTROL 0x0AC
339 #define BKTR_CONTRAST_LO 0x030
340 #define BKTR_SAT_U_LO 0x034
341 #define BKTR_SAT_V_LO 0x038
342 #define BKTR_HUE 0x03C
343 #define BKTR_E_SCLOOP 0x040
344 #define BKTR_O_SCLOOP 0x0C0
345 #define BKTR_OFORM 0x048
346 #define BKTR_E_VSCALE_HI 0x04C
347 #define BKTR_O_VSCALE_HI 0x0CC
348 #define BKTR_E_VSCALE_LO 0x050
349 #define BKTR_O_VSCALE_LO 0x0D0
350 #define BKTR_TEST 0x054
351 #define BKTR_ADELAY 0x060
352 #define BKTR_BDELAY 0x064
353 #define BKTR_ADC 0x068
354 #define BKTR_E_VTC 0x06C
355 #define BKTR_O_VTC 0x0EC
356 #define BKTR_SRESET 0x07C
357 #define BKTR_COLOR_FMT 0x0D4
358 #define BKTR_COLOR_CTL 0x0D8
359 #define BKTR_CAP_CTL 0x0DC
360 #define BKTR_VBI_PACK_SIZE 0x0E0
361 #define BKTR_VBI_PACK_DEL 0x0E4
362 #define BKTR_INT_STAT 0x100
363 #define BKTR_INT_MASK 0x104
364 #define BKTR_RISC_COUNT 0x120
365 #define BKTR_RISC_STRT_ADD 0x114
366 #define BKTR_GPIO_DMA_CTL 0x10C
367 #define BKTR_GPIO_OUT_EN 0x118
368 #define BKTR_GPIO_REG_INP 0x11C
369 #define BKTR_GPIO_DATA 0x200
370 #define BKTR_I2C_DATA_CTL 0x110
371 #define BKTR_TGCTRL 0x084
372 #define BKTR_PLL_F_LO 0x0F0
373 #define BKTR_PLL_F_HI 0x0F4
374 #define BKTR_PLL_F_XCI 0x0F8
375
376
377
378
379
380
381 struct TVTUNER {
382 int frequency;
383 u_char chnlset;
384 u_char channel;
385 u_char band;
386 u_char afc;
387 u_char radio_mode;
388 int tuner_mode;
389 #define BT848_TUNER_MODE_TV 1
390 #define BT848_TUNER_MODE_RADIO 2
391 };
392
393
394 struct TUNER {
395 char *name;
396 u_char type;
397 u_char pllControl[4];
398 u_char bandLimits[ 2 ];
399 u_char bandAddrs[ 4 ];
400
401
402
403
404 };
405
406
407 #define EEPROMBLOCKSIZE 32
408 struct CARDTYPE {
409 unsigned int card_id;
410 char *name;
411 const struct TUNER* tuner;
412 u_char tuner_pllAddr;
413 u_char dbx;
414 u_char msp3400c;
415 u_char dpl3518a;
416 u_char eepromAddr;
417 u_char eepromSize;
418 u_int audiomuxs[ 5 ];
419
420
421 u_int gpio_mux_bits;
422 };
423
424 struct format_params {
425
426 int vtotal, vdelay, vactive;
427
428 int htotal, hdelay, hactive;
429
430 int scaled_hactive, scaled_htotal;
431
432 int frame_rate;
433
434 u_char adelay, bdelay;
435
436 int iform_xtsel;
437
438 int vbi_num_lines, vbi_num_samples;
439 };
440
441
442
443
444
445
446
447
448 #define INB(sc,o) (({ \
449 u_int8_t __v; \
450 __v = bus_space_read_1((sc)->memt, (sc)->memh, (o)); \
451 bus_space_barrier((sc)->memt, (sc)->memh, (o), 1, \
452 BUS_SPACE_BARRIER_READ); \
453 (__v); \
454 }))
455 #define INW(sc,o) (({ \
456 u_int16_t __v; \
457 __v = bus_space_read_2((sc)->memt, (sc)->memh, (o)); \
458 bus_space_barrier((sc)->memt, (sc)->memh, (o), 4, \
459 BUS_SPACE_BARRIER_READ); \
460 (__v); \
461 }))
462 #define INL(sc,o) (({ \
463 u_int32_t __v; \
464 __v = bus_space_read_4((sc)->memt, (sc)->memh, (o)); \
465 bus_space_barrier((sc)->memt, (sc)->memh, (o), 4, \
466 BUS_SPACE_BARRIER_READ); \
467 (__v); \
468 }))
469 #define OUTB(sc,o,v) do { \
470 bus_space_write_1((sc)->memt, (sc)->memh, (o), (v)); \
471 bus_space_barrier((sc)->memt, (sc)->memh, (o), 1, \
472 BUS_SPACE_BARRIER_WRITE); \
473 } while (0)
474 #define OUTW(sc,o,v) do { \
475 bus_space_write_2((sc)->memt, (sc)->memh, (o), (v)); \
476 bus_space_barrier((sc)->memt, (sc)->memh, (o), 2, \
477 BUS_SPACE_BARRIER_WRITE); \
478 } while (0)
479 #define OUTL(sc,o,v) do { \
480 bus_space_write_4((sc)->memt, (sc)->memh, (o), (v)); \
481 bus_space_barrier((sc)->memt, (sc)->memh, (o), 4, \
482 BUS_SPACE_BARRIER_WRITE); \
483 } while (0)
484
485 typedef struct bktr_clip bktr_clip_t;
486
487
488
489
490 struct bktr_softc {
491 struct device bktr_dev;
492 bus_dma_tag_t dmat;
493 bus_space_tag_t memt;
494 bus_space_handle_t memh;
495 bus_size_t obmemsz;
496 void *ih;
497 bus_dmamap_t dm_prog;
498 bus_dmamap_t dm_oprog;
499 bus_dmamap_t dm_mem;
500 bus_dmamap_t dm_vbidata;
501 bus_dmamap_t dm_vbibuffer;
502
503 vaddr_t bigbuf;
504 vaddr_t vbidata;
505 vaddr_t vbibuffer;
506 vaddr_t dma_prog;
507 vaddr_t odd_dma_prog;
508
509
510 int alloc_pages;
511 int vbiinsert;
512 int vbistart;
513 int vbisize;
514 u_int vbi_sequence_number;
515 int vbi_read_blocked;
516 struct selinfo vbi_select;
517
518
519 struct proc *proc;
520 int signal;
521 int clr_on_start;
522 #define METEOR_SIG_MODE_MASK 0xffff0000
523 #define METEOR_SIG_FIELD_MODE 0x00010000
524 #define METEOR_SIG_FRAME_MODE 0x00000000
525 char dma_prog_loaded;
526 struct meteor_mem *mem;
527 u_int synch_wait;
528 short current;
529 short rows;
530 short cols;
531 int capture_area_x_offset;
532 int capture_area_y_offset;
533 int capture_area_x_size;
534 int capture_area_y_size;
535 char capture_area_enabled;
536 int pixfmt;
537 int pixfmt_compat;
538 u_int format;
539 short frames;
540 int frame_size;
541 u_int fifo_errors;
542 u_int dma_errors;
543 u_int frames_captured;
544 u_int even_fields_captured;
545 u_int odd_fields_captured;
546 u_int range_enable;
547 u_short capcontrol;
548 u_short bktr_cap_ctl;
549 volatile u_int flags;
550 #define METEOR_INITALIZED 0x00000001
551 #define METEOR_OPEN 0x00000002
552 #define METEOR_MMAP 0x00000004
553 #define METEOR_INTR 0x00000008
554 #define METEOR_READ 0x00000010
555 #define METEOR_SINGLE 0x00000020
556 #define METEOR_CONTIN 0x00000040
557 #define METEOR_SYNCAP 0x00000080
558 #define METEOR_CAP_MASK 0x000000f0
559 #define METEOR_NTSC 0x00000100
560 #define METEOR_PAL 0x00000200
561 #define METEOR_SECAM 0x00000400
562 #define BROOKTREE_NTSC 0x00000100
563 #define BROOKTREE_PAL 0x00000200
564 #define BROOKTREE_SECAM 0x00000400
565 #define METEOR_AUTOMODE 0x00000800
566 #define METEOR_FORM_MASK 0x00000f00
567 #define METEOR_DEV0 0x00001000
568 #define METEOR_DEV1 0x00002000
569 #define METEOR_DEV2 0x00004000
570 #define METEOR_DEV3 0x00008000
571 #define METEOR_DEV_SVIDEO 0x00006000
572 #define METEOR_DEV_RGB 0x0000a000
573 #define METEOR_DEV_MASK 0x0000f000
574 #define METEOR_RGB16 0x00010000
575 #define METEOR_RGB24 0x00020000
576 #define METEOR_YUV_PACKED 0x00040000
577 #define METEOR_YUV_PLANAR 0x00080000
578 #define METEOR_WANT_EVEN 0x00100000
579 #define METEOR_WANT_ODD 0x00200000
580 #define METEOR_WANT_MASK 0x00300000
581 #define METEOR_ONLY_EVEN_FIELDS 0x01000000
582 #define METEOR_ONLY_ODD_FIELDS 0x02000000
583 #define METEOR_ONLY_FIELDS_MASK 0x03000000
584 #define METEOR_YUV_422 0x04000000
585 #define METEOR_OUTPUT_FMT_MASK 0x040f0000
586 #define METEOR_WANT_TS 0x08000000
587 #define METEOR_RGB 0x20000000
588 #define METEOR_FIELD_MODE 0x80000000
589 u_char tflags;
590 #define TUNER_INITALIZED 0x00000001
591 #define TUNER_OPEN 0x00000002
592 u_char vbiflags;
593 #define VBI_INITALIZED 0x00000001
594 #define VBI_OPEN 0x00000002
595 #define VBI_CAPTURE 0x00000004
596 u_short fps;
597 struct meteor_video video;
598 struct TVTUNER tuner;
599 struct CARDTYPE card;
600 u_char audio_mux_select;
601 u_char audio_mute_state;
602 u_char format_params;
603 u_int current_sol;
604 u_int current_col;
605 int clip_start;
606 int line_length;
607 int last_y;
608 int y;
609 int y2;
610 int yclip;
611 int yclip2;
612 int max_clip_node;
613 bktr_clip_t clip_list[100];
614 int reverse_mute;
615 int bt848_tuner;
616 int bt848_card;
617 u_int id;
618 #define BT848_USE_XTALS 0
619 #define BT848_USE_PLL 1
620 int xtal_pll_mode;
621 int remote_control;
622 int remote_control_addr;
623 char msp_version_string[9];
624 int msp_addr;
625 char dpl_version_string[9];
626 int dpl_addr;
627 int slow_msp_audio;
628
629
630 int msp_use_mono_source;
631 int audio_mux_present;
632 int msp_source_selected;
633
634 };
635
636 typedef struct bktr_softc bktr_reg_t;
637 typedef struct bktr_softc* bktr_ptr_t;
638
639 #define Bt848_MAX_SIGN 16
640
641 struct bt848_card_sig {
642 int card;
643 int tuner;
644 u_char signature[Bt848_MAX_SIGN];
645 };
646
647
648
649
650
651 typedef u_long ioctl_cmd_t;