]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - share/man/man4/meteor.4
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / share / man / man4 / meteor.4
1 .\"
2 .\" $FreeBSD$
3 .\"
4 .Dd August 15, 1995
5 .Dt METEOR 4
6 .Os
7 .Sh NAME
8 .Nm meteor
9 .Nd "video capture driver interface"
10 .Sh DESCRIPTION
11 The
12 .Nm
13 driver defined a video capture interface.
14 The
15 .Nm
16 driver is no longer in the tree, but other devices support this interface
17 so the interface portion is documented here.
18 .Ss Meteor Capture Modes
19 The
20 .Nm
21 capture driver has three modes of capture operation.
22 .Bl -enum
23 .It
24 Conventional
25 .Xr read 2
26 interface.
27 .Pp
28 This mode is the easiest and slowest to use.
29 This mode is great for
30 capturing a single field at little programming cost.
31 .Pp
32 In this mode, the user opens the device, sets the capture mode
33 and size (see:
34 .Dv METEORSETGEO
35 .Xr ioctl 2
36 call), and uses the
37 .Xr read 2
38 system
39 call to load the data into a buffer.
40 .Pp
41 .Pa meteor_read.c ;
42 read 400x300 RGB24 into a viewable PPM file
43 .Bd -literal
44 #include <sys/fcntl.h>
45 #include <machine/ioctl_meteor.h>
46
47 extern int errno;
48 #define ROWS 300
49 #define COLS 400
50 #define SIZE (ROWS * COLS * 4)
51 main()
52 {
53         struct meteor_geomet geo;
54         char buf[SIZE],b[4],header[16],*p;
55         int i,o,c;
56
57         if ((i = open("/dev/meteor0", O_RDONLY)) < 0) {
58                 printf("open failed: %d\\n", errno);
59                 exit(1);
60         }
61         /* set up the capture type and size */
62         geo.rows = ROWS;
63         geo.columns = COLS;
64         geo.frames = 1;
65         geo.oformat = METEOR_GEO_RGB24 ;
66
67         if (ioctl(i, METEORSETGEO, &geo) < 0) {
68                 printf("ioctl failed: %d\\n", errno);
69                 exit(1);
70         }
71
72         c = METEOR_FMT_NTSC;
73
74         if (ioctl(i, METEORSFMT, &c) < 0) {
75                 printf("ioctl failed: %d\\n", errno);
76                 exit(1);
77         }
78
79         c = METEOR_INPUT_DEV0;
80
81         if (ioctl(i, METEORSINPUT, &c) < 0) {
82                 printf("ioctl failed: %d\\n", errno);
83                 exit(1);
84         }
85
86         if ((c=read(i, &buf[0], SIZE)) < SIZE) {
87                 printf("read failed %d %d %d\\n", c, i, errno);
88                 close(i);
89                 exit(1);
90         }
91         close(i);
92
93         if ((o = open("rgb24.ppm", O_WRONLY | O_CREAT, 0644)) < 0) {
94                 printf("ppm open failed: %d\\n", errno);
95                 exit(1);
96         }
97
98         /* make PPM header and save to file */
99         strcpy(&header[0], "P6 400 300 255 ");
100         header[2] = header[6]  = header[10] = header[14] = '\\n';
101         write (o, &header[0], 15);
102         /* save the RGB data to PPM file */
103         for (p = &buf[0]; p < &buf[SIZE]; ) {
104                 b[2] = *p++;            /* blue */
105                 b[1] = *p++;            /* green */
106                 b[0] = *p++;            /* red */
107                 *p++;                   /* NULL byte */
108                 write(o,&b[0], 3);      /* not very efficient */
109         }
110         close(o);
111         exit(0);
112 }
113 .Ed
114 .It
115 Memory mapped single capture or unsynchronized continuous capture.
116 .Pp
117 The single capture mode is designed for conferencing tools such as
118 .Nm nv .
119 These tools need to control the starting of the image capture and also
120 need several frames a second.
121 The continuous capture mode is designed
122 for applications that want free-running data.
123 .Pp
124 In this mode, the user opens the device, sets the capture mode
125 and size (see:
126 .Dv METEORSETGEO
127 .Xr ioctl 2
128 call),
129 .Xr mmap 2 Ns s
130 the frame buffer
131 memory into the user process space, and issues either the
132 single-capture or the continuous capture call (see:
133 .Dv METEORCAPTUR
134 .Xr ioctl 2
135 call) to load the data into the memory mapped buffer.
136 .Pp
137 As explained in the
138 .Dv METEORCAPTUR
139 .Xr ioctl 2
140 call, the single frame capture
141 .Xr ioctl 2
142 will block until the capture is complete, the continuous capture
143 will return immediately.
144 .Pp
145 .Pa meteor_mmap_single_continuous.c
146 .Bd -literal
147 #include <sys/types.h>
148 #include <sys/mman.h>
149 #include <sys/fcntl.h>
150 #include <machine/ioctl_meteor.h>
151
152 extern int errno;
153 #define ROWS 480
154 #define COLS 640
155 #define SIZE (ROWS * COLS * 2)
156 main()
157 {
158         struct meteor_geomet geo;
159         char buf[SIZE];
160         char *mmbuf;
161         int i,c;
162
163         if ((i = open("/dev/meteor0", O_RDONLY)) < 0) {
164                 printf("open failed\\n");
165                 exit(1);
166         }
167
168         geo.rows = ROWS;
169         geo.columns = COLS;
170         geo.frames = 1;
171         geo.oformat = METEOR_GEO_RGB16 ;
172
173         if (ioctl(i, METEORSETGEO, &geo) < 0) {
174                 printf("ioctl failed: %d\\n", errno);
175                 exit(1);
176         }
177
178         c = METEOR_FMT_NTSC;
179
180         if (ioctl(i, METEORSFMT, &c) < 0) {
181                 printf("ioctl failed: %d\\n", errno);
182                 exit(1);
183         }
184
185         c = METEOR_INPUT_DEV0;
186
187         if (ioctl(i, METEORSINPUT, &c) < 0) {
188                 printf("ioctl failed: %d\\n", errno);
189                 exit(1);
190         }
191
192         mmbuf=(char *)mmap((caddr_t)0, SIZE, PROT_READ,
193                 MAP_SHARED, i, (off_t)0);
194
195 #ifdef SINGLE_MODE
196         /* single frame capture */
197         c = METEOR_CAP_SINGLE ;
198         ioctl(i, METEORCAPTUR, &c);     /* wait for the frame */
199
200         /* directly access the frame buffer array data in mmbuf */
201 #else
202         /* continuous frame capture */
203         c = METEOR_CAP_CONTINOUS ;
204         ioctl(i, METEORCAPTUR, &c);     /* returns immediately */
205
206         /* directly access the frame buffer array data in mmbuf */
207
208         c = METEOR_CAP_STOP_CONT ;
209         ioctl(i, METEORCAPTUR, &c);     /* close will also stop capture */
210 #endif
211
212         close(i);
213         exit(0);
214 }
215 .Ed
216 .It
217 Memory mapped, multi-frame ring buffer synchronize capture.
218 .Pp
219 This continuous capture mode is synchronized with the application that
220 processes up to 32 frames.
221 This gives the advantages of both single and
222 continuous capture modes.
223 .Pp
224 The kernel notifies the application of a new data by raising an
225 application defined signal.
226 The driver also shares a structure with
227 the application that allows them to communicate which frame has been
228 written by the kernel and which frame has been read by the application.
229 .Pp
230 The shared structure starts on the first page after your data.
231 The
232 structure address can be found by calculation:
233 .Pp
234 .Dl "(number_rows * number_columns * pixel_depth + 4095) & 0xfffff000"
235 or
236 .Dl "((number_rows * number_columns * pixel_depth + 4095)/4096) * 4096"
237 .Pp
238 The shared structure is of type
239 .Va struct meteor_mem .
240 The two most
241 important fields are called
242 .Va active
243 and
244 .Va num_active_buf .
245 .Va active
246 is a bitmap of frames written by the kernel.
247 .Va num_active_bufs
248 is
249 a count of frames marked in the
250 .Va active
251 field.
252 When a frame is read
253 in by the driver, the
254 .Va num_active_bufs
255 count is tested, if this
256 count is below the threshold of number of active frames (value
257 in
258 .Va meteor_mem Ns 's
259 .Va hiwat
260 variable), the bit representing frame
261 number in the buffer is stored in the
262 .Va active
263 variable, the
264 .Va num_active_bufs
265 is incremented, the kernel then raises the specified
266 signal to activate the user application.
267 The user application's
268 responsibility when getting the signal is to check the active bitmap
269 to determine the lowest active frame, use the data as the application
270 desires, clear the bitmap entry for that frame, and decrement the
271 .Va num_active_bufs .
272 If the threshold of number of active frames
273 .Pq Va hiwat
274 has been exceeded, no new frames or signal from the kernel will occur
275 until the
276 .Va num_active_bufs
277 is less than or equal to
278 .Va lowat .
279 .Pp
280 The driver loads the frames in a round-robin fashion.
281 It is expected
282 that the user removes them in the same order.
283 The driver does not
284 check to see if the frame is already active.
285 .Pp
286 The
287 .Va frame_size
288 and number of frames in the buffer are also provided
289 to the
290 .Va meteor_mem
291 structure, but changing these fields in the
292 application will not change the operation of the driver.
293 .Pp
294 In programming for this mode, the user opens the device, sets the
295 geometry,
296 .Xr mmap 2 Ns s
297 the data/common control structure, then starts the
298 continuous capture mode.
299 A special signal catcher is required to
300 process the frames as they are read by the kernel.
301 .Pp
302 When specifying the geometry (see:
303 .Dv METEORSETGEO
304 .Xr ioctl 2
305 call),
306 it
307 is important that the number of frames is set greater than 1.
308 .Pp
309 .Pa skeleton_capture_n.c
310 .Bd -literal
311 #include <sys/types.h>
312 #include <sys/mman.h>
313 #include <sys/fcntl.h>
314 #include <sys/signal.h>
315 #include <machine/ioctl_meteor.h>
316
317 int video;  /* made global if you wish to stop capture in signal handler */
318 caddr_t data_frames;
319 struct meteor_mem *common_mem;
320 extern int errno;
321
322 #define FRAME_MAX
323
324 void
325 usr2_catcher()
326 {
327 #ifdef SIGNAL_STOP
328         struct meteor_capframe capframe;        /* for ioctl */
329 #endif
330         char *frame;
331
332         /* find frame */
333         frame = (char *) (data_frames + sig_cnt * common_mem->frame_size) ;
334
335         /* add frame processing here */
336         /* deactivate frame */
337         common_mem->active &= ~(1 << (sig_cnt % 16));
338         common_mem->num_active_bufs--;
339
340         /* process next frame on next interrupt */
341         sig_cnt = ((sig_cnt+1) % FRAME_MAX);
342
343 #ifdef SIGNAL_STOP
344         if (some_condition_requiring_stopping) {
345                 capframe.command=METEOR_CAP_STOP_FRAMES;
346
347                 if (ioctl(i, METEORCAPFRM, &capframe) < 0) {
348                         printf("METEORCAPFRM failed %d\\n", errno);
349                         exit(1);
350                 }
351         }
352 #endif
353 }
354
355 main()
356 {
357         struct meteor_geomet geo;
358         int height, width, depth, frames, size;
359         struct meteor_capframe capframe;
360
361         if ((i = open("/dev/meteor0", O_RDONLY)) < 0) {
362                 printf("open failed\\n");
363                 exit(1);
364         }
365         printf("test %d %d\\n", errno, i);
366
367         height = geo.rows = 120;
368         width= geo.columns = 320;
369         frames = geo.frames = FRAME_MAX;
370         depth = 2;      /* 2 bytes per pixel for RGB*/
371
372
373         geo.oformat = METEOR_GEO_RGB16;
374
375         if (ioctl(i, METEORSETGEO, &geo) < 0) {
376                 printf("METEORSETGEO failed %d\\n", errno);
377                 exit(1);
378         }
379
380         c = METEOR_FMT_NTSC;
381
382         if (ioctl(i, METEORSFMT, &c) < 0) {
383                 printf("ioctl failed: %d\\n", errno);
384                 exit(1);
385         }
386
387         c = METEOR_INPUT_DEV0;
388
389         if (ioctl(i, METEORSINPUT, &c) < 0) {
390                 printf("ioctl failed: %d\\n", errno);
391                 exit(1);
392         }
393
394         size = ((width*height*depth*frames+4095)/4096)*4096;
395         /* add one page after data for meteor_mem */
396         data_frames = mmap((caddr_t)0, size + 4096, PROT_READ | PROT_WRITE,
397                                                 MAP_SHARED, i, (off_t)0);
398
399         if (data_frames == (caddr_t) MAP_FAILED) return (0);
400
401         /* common_mem is located at page following data */
402         common_mem = (struct meteor_mem *) (y + size);
403
404         signal(SIGUSR2, usr2_catcher);  /* catch new frame message */
405
406         capframe.command=METEOR_CAP_N_FRAMES;
407         capframe.signal=SIGUSR2;
408         capframe.lowat=12;              /* must be < hiwat */
409         capframe.hiwat=14;              /* must be < FRAME_MAX */
410
411                                         /* start the sync capture */
412         if (ioctl(i, METEORCAPFRM, &capframe) < 0) {
413                 printf("METEORCAPFRM failed %d\\n", errno);
414                 exit(1);
415         }
416
417         /* this is the background working area, or you can sleep */
418
419
420         /* to stop capture */
421         capframe.command=METEOR_CAP_STOP_FRAMES;
422
423         if (ioctl(i, METEORCAPFRM, &capframe) < 0) {
424                 printf("METEORCAPFRM failed %d\\n", errno);
425                 exit(1);
426         }
427 }
428 .Ed
429 .El
430 .Ss Meteor IOCTL Call and Parameters
431 The
432 .Nm
433 capture driver has
434 .Xr ioctl 2
435 requests for capturing, reading card
436 status, for setting and reading the geometry, and for setting and reading the
437 attributes.
438 .Pp
439 .Bf -symbolic
440 IT IS VERY IMPORTANT TO CHECK FOR ERRORS ON THESE RETURNING IOCTLs.
441 .Ef
442 Errors indicate that something is very wrong with the
443 .Xr ioctl 2
444 and the
445 application should not attempt to proceed further with capturing.
446 The
447 .Nm
448 capture driver still makes attempts to stop the next capture step if
449 an error occurred in a previous step but was ignored by the application
450 programmer.
451 .Bl -enum
452 .It
453 .Xr ioctl 2
454 requests
455 .Dv METEORSETGEO
456 and
457 .Dv METEORGETGEO
458 .Pp
459 .Dv METEORSETGEO
460 and
461 .Dv METEORGETGEO
462 are used to set and read the input
463 size, input device, and output format for frame capture.
464 .Pp
465 These
466 .Xr ioctl 2
467 routines use the
468 .Va meteor_geomet
469 structure that has the
470 following entries:
471 .Bl -tag -width columns
472 .It Va rows
473 number of rows (lines high) in output image
474 .It Va columns
475 number of pixels in a row (width) in output image
476 .It Va frames
477 number of frames in buffer.
478 Should be 1, unless using
479 the multi-framed synchronous capture mode
480 .Pq Dv METEORCAPFRM
481 which REQUIRES frames to be larger than 1.
482 .Pp
483 Note: if
484 .Va rows , columns
485 or
486 .Va frames
487 is not changed, then
488 the existing values are used.
489 The system defaults
490 is 640x480x1.
491 .It Va oformat
492 you may choose one of the following output format:
493 .Bl -tag -width METEOR_GEO_YUV_PACKED
494 .It Dv METEOR_GEO_RGB16
495 (RGB 16 bits xrrrrrgg gggbbbbb default)
496 .It Dv METEOR_GEO_RGB24
497 (RGB 24 bits packed in 32 bits:
498 00000000 rrrrrrrr gggggggg bbbbbbbb)
499 .It Dv METEOR_GEO_YUV_PACKED
500 (4-2-2 YUV 16 bits packed byte format:
501 u0 y0 v0 y1 u1 y2 v1 y3 ...)
502 .It Dv METEOR_GEO_YUV_PLANER
503 (4-2-2 YUV 16 bits planer format:
504 rows * columns bytes of y
505 rows * column / 4 bytes of even u
506 rows * column / 4 bytes of even v
507 rows * column / 4 bytes of odd u
508 rows * column / 4 bytes of odd v)
509 .El
510 .El
511 .Pp
512 The
513 .Dv METEORSETGEO
514 .Xr ioctl 2
515 will fail if more than one entry from a category
516 is selected.
517 It is highly recommended that a
518 .Dv METEORSETGEO
519 is done
520 before capturing data because you cannot guarantee the initial mode
521 the card.
522 .Pp
523 The
524 .Dv METEORSETGEO
525 will also attempt to reallocate a new contiguous
526 kernel buffer if the new geometry exceeds the old geometry.
527 On the
528 other hand, if the new geometry will fit in the existing buffer,
529 the existing buffer is used.
530 .Pp
531 If
532 .Dv METEORSETGEO
533 fails the
534 .Xr ioctl 2
535 will return a value of -1 and the
536 external variable
537 .Va errno
538 will be set to:
539 .Bl -tag -width Er
540 .It Bq Er EINVAL
541 invalid
542 .Va meteor_geomet
543 structure pointer,
544 .Va rows , columns , frames
545 were invalid.
546 .It Bq Er ENOMEM
547 could not allocate the contiguous block.
548 .El
549 .It
550 .Xr ioctl 2
551 requests
552 .Dv METEORSFMT
553 and
554 .Dv METEORGFMT
555 .Pp
556 .Dv METEORSFMT
557 and
558 .Dv METEORGFMT
559 are used to set and read the camera input
560 standard format.
561 .Pp
562 Possible formats are:
563 .Pp
564 .Bl -tag -width METEOR_FMT_AUTOMODE -compact
565 .It Dv METEOR_FMT_NTSC
566 NTSC (default mode)
567 .It Dv METEOR_FMT_PAL
568 PAL
569 .It Dv METEOR_FMT_SECAM
570 SECAM
571 .It Dv METEOR_FMT_AUTOMODE
572 Autodetect.
573 .El
574 .It
575 .Xr ioctl 2
576 requests
577 .Dv METEORSINPUT
578 and
579 .Dv METEORGINPUT
580 .Pp
581 .Dv METEORSINPUT
582 and
583 .Dv METEORGINPUT
584 are used to set and read the camera
585 input device.
586 Using the DB9 connector on the
587 .Tn Meteor
588 card, 4 input
589 devices can be connected and an input camera can be selected with this
590 .Xr ioctl 2 .
591 .Pp
592 Possible formats are:
593 .Pp
594 .Bl -tag -width METEOR_INPUT_DEV_SVIDEO -compact
595 .It Dv METEOR_INPUT_DEV0
596 (default if none specified)
597 .It Dv METEOR_INPUT_DEV_RCA
598 (same as METEOR_INPUT_DEV0)
599 .It Dv METEOR_INPUT_DEV1
600 .It Dv METEOR_INPUT_DEV2
601 .It Dv METEOR_INPUT_DEV_SVIDEO
602 (same as METEOR_INPUT_DEV2)
603 .El
604 .It
605 .Xr ioctl 2
606 request
607 .Dv METEORSTATUS
608 .Pp
609 .Dv METEORSTATUS
610 is used to read the status of the
611 .Tn Meteor
612 capture card
613 and returns the following information:
614 .Bl -column "METEOR_STATUS_ID_MASK" "\&"
615 .It Dv METEOR_STATUS_ID_MASK "  4 bit ID of the SAA7196 scaler chip."
616 .Pp
617 .It Dv METEOR_STATUS_DIR "      0 =     scaler uses internal source."
618 .It "   1 =     scaler uses external data of expansion bus."
619 .Pp
620 .It Dv METEOR_STATUS_OEF "      0 =     even field detected."
621 .It "   1 =     odd field detected."
622 .Pp
623 .It Dv METEOR_STATUS_SVP "      VRAM Port state:"
624 .It "   0 =     inputs HFL and INCADDR inactive."
625 .It "   1 =     inputs HFL and INCADDR active."
626 .Pp
627 .It Dv METEOR_STATUS_STTC "     0 =     TV horizontal time constant (slow)."
628 .It "   1 =     VCR horizontal time constant (fast)."
629 .Pp
630 .It Dv METEOR_STATUS_HCLK "     0 =     Horizontal Phase Lock Loop locked."
631 .It "   1 =     Horizontal Phase Lock Loop unlocked."
632 .Pp
633 .It Dv METEOR_STATUS_FIDT "     0 =     50 Hz Field detected."
634 .It "   1 =     60 Hz Field detected."
635 .Pp
636 .It Dv METEOR_STATUS_ALTD "     0 =     no line alternating color burst detected."
637 .It "   1 =     line alternating color burst detected (PAL/SECAM)."
638 .Pp
639 .It Dv METEOR_STATUS_CODE "     0 =     no color information detected."
640 .It "   1 =     color information detected."
641 .El
642 .It
643 .Xr ioctl 2
644 request
645 .Dv METEORCAPTUR
646 .Pp
647 .Dv METEORCAPTUR
648 is used to single frame capture or unsynchronized
649 continuous capture.
650 .Pp
651 The single frame capture
652 .Xr ioctl 2
653 request will return only after a
654 frame has been captured and transferred to the frame buffer.
655 .Pp
656 The unsynchronized continuous capture will return immediately and
657 data is directly deposited into the buffer when it is available.
658 Since this is unsynchronized, it is possible the data is being
659 written by the kernel while being read by the application.
660 .Pp
661 These
662 .Xr ioctl 2
663 routines use the following settings:
664 .Pp
665 .Bl -tag -width METEOR_CAP_CONTINOUS -compact
666 .It Dv METEOR_CAP_SINGLE
667 capture one frame
668 .It Dv METEOR_CAP_CONTINOUS
669 unsynchronized continuous capture
670 .It Dv METEOR_CAP_STOP_CONT
671 stop the unsynchronized continuous
672 capture
673 .El
674 .Pp
675 If
676 .Dv METEORCAPTUR
677 fails the
678 .Xr ioctl 2
679 will return a value of -1 and the
680 external variable
681 .Va errno
682 will be set to:
683 .Bl -tag -width Er
684 .It Bq Er EINVAL
685 invalid capture command value
686 .It Bq Er ENXIO
687 there is not internal buffer to hold the frame.
688 This indicates the previous set geometry
689 .Xr ioctl 2
690 failed.
691 .It Bq Er EIO
692 card is already capturing.
693 .El
694 .It
695 .Xr ioctl 2
696 request
697 .Dv METEORCAPFRM
698 .Pp
699 .Dv METEORCAPFRM
700 is used for synchronous capture of multiple frames.
701 .Pp
702 This
703 .Xr ioctl 2
704 routine uses the
705 .Va meteor_capture
706 structure that has the
707 following entries:
708 .Bl -tag -width command
709 .It Va command
710 possible values for
711 .Va command
712 are:
713 .Bl -tag -width METEOR_CAP_STOP_FRAMES
714 .It Dv METEOR_CAP_STOP_FRAMES
715 stop the capture; does not use the
716 other variable in structure.
717 .It Dv METEOR_CAP_N_FRAMES
718 start the capture using the other
719 variables in the structure as inputs
720 .El
721 .It Va signal
722 signal to send to application when a new
723 frame has been captured.
724 This signal will
725 only be raised if the captured frame is saved.
726 .It Va lowat
727 see below
728 .It Va hiwat
729 see below
730 .El
731 .Pp
732 When a new frame is completed, the driver checks the current unread
733 frame count stored in shared variable (the shared variable is stored
734 in the
735 .Va meteor_mem
736 structure)
737 .Va num_active_buf ;
738 if the count is larger
739 than
740 .Va hiwat ,
741 the driver will not store any new frames and will not
742 send capture signal to the user application until the
743 .Va num_active_buf
744 is lower than
745 .Va lowat .
746 .Pp
747 If
748 .Dv METEORCAPFRM
749 fails the
750 .Xr ioctl 2
751 will return a value of -1 and the
752 external variable
753 .Va errno
754 will be set to:
755 .Bl -tag -width Er
756 .It Bq Er EINVAL
757 invalid meteor_geomet structure pointer or bad command.
758 .It Bq Er ENXIO
759 there is not internal buffer to hold the frame.
760 This indicates the previous set geometry
761 .Xr ioctl 2
762 failed.
763 .It Bq Er EIO
764 card is already capturing.
765 .El
766 .It
767 .Xr ioctl 2
768 requests
769 .Dv METEORSCHCV
770 and
771 .Dv METEORGCHCV
772 .Pp
773 .Dv METEORSCHCV
774 and
775 .Dv METEORGCHCV
776 are used to set and get the chrominance
777 gain control and effects the UV output amplitude.
778 .Pp
779 If
780 .Dv METEORSCHCV
781 or
782 .Dv METEORGCHCV
783 fails the
784 .Xr ioctl 2
785 will return a value
786 of -1 and the external variable
787 .Va errno
788 will be set to:
789 .Bl -tag -width Er
790 .It Bq Er EINVAL
791 invalid unsigned char pointer.
792 .El
793 .It
794 .Xr ioctl 2
795 requests
796 .Dv METEORGHUE
797 and
798 .Dv METEORSHUE
799 .Pp
800 .Dv METEORGHUE
801 and
802 .Dv METEORSHUE
803 are used to get and set the hue.
804 The
805 signed character has legal values are from +127 which represent
806 +178.6 degrees to -128 which represents -180 degrees.
807 .Pp
808 If
809 .Dv METEORGHUE
810 or
811 .Dv METEORSHUE
812 fails the
813 .Xr ioctl 2
814 will return a value of
815 -1 and the external variable
816 .Va errno
817 will be set to:
818 .Bl -tag -width Er
819 .It Bq Er EINVAL
820 invalid signed char pointer.
821 .El
822 .It
823 .Xr ioctl 2
824 requests
825 .Dv METEORSCOUNT
826 and
827 .Dv METEORGCOUNT
828 .Pp
829 .Dv METEORGCOUNT
830 is used to get the count of frame errors, DMA errors and
831 count of the number of frames captured that have occurred since
832 the device was opened.
833 .Dv METEORSCOUNT
834 can be used to reinitialize the
835 counters.
836 .Pp
837 This
838 .Xr ioctl 2
839 routines use the
840 .Va meteor_counts
841 structure that has the
842 following entries:
843 .Bl -tag -width frame_count
844 .It Va fifo_errors
845 number of FIFO errors since device was opened.
846 .It Va dma_errors
847 number of DMA errors since device was opened.
848 .It Va frame_count
849 number of frames captured since device was opened.
850 .El
851 .Pp
852 If
853 .Dv METEORSCOUNT
854 or
855 .Dv METEORGCOUNT
856 fails the
857 .Xr ioctl 2
858 will return a value
859 of -1 and the external variable
860 .Va errno
861 will be set to:
862 .Bl -tag -width Er
863 .It Bq Er EINVAL
864 invalid meteor_counts structure pointer.
865 .El
866 .El
867 .Sh AUTHORS
868 .An Jim Lowe Aq james@miller.cs.uwm.edu ,
869 .An Mark Tinguely Aq tinguely@plains.nodak.edu
870 .Sh BUGS
871 The
872 .Nm
873 driver no longer works at all.