diff --git a/share/man/man4/man4.i386/meteor.4 b/share/man/man4/man4.i386/meteor.4 index a17a23aae925..8f0df306ec5d 100644 --- a/share/man/man4/man4.i386/meteor.4 +++ b/share/man/man4/man4.i386/meteor.4 @@ -2,15 +2,13 @@ .\" $FreeBSD$ .\" .Dd August 15, 1995 -.br -.in +0.5i .Dt METEOR 4 i386 .Os FreeBSD .Sh NAME .Nm meteor -.Nd video capture driver +.Nd "video capture driver" .Sh SYNOPSIS -.Nm video meteor +.Cd "device meteor" .Sh DESCRIPTION The .Nm @@ -20,90 +18,103 @@ capture. It allows the capture of 24 bit RGB, 16 bit RGB and 16 bit YUV output formats. .Pp -.Sh Meteor Driver Installation -To use the Matrox Meteor card in your system, you need a computer -that support the PCI (preferably the Type 2 or better) interface bus. -It is recommended that the system has as more than 16 MB of RAM since this +.Ss Meteor Driver Installation +To use the +.Tn "Matrox Meteor" +card in your system, you need a computer +that supports the PCI (preferably the Type 2 or better) interface bus. +It is recommended that the system has more than 16 MB of RAM since this capture card directly deposits the image to system RAM. .Pp -The files required for Matrox Meteor card are: -.br -.in +0.5i -/sys/pci/meteor.c -.br -/sys/i386/include/ioctl_meteor.h (also known as: -.br -/usr/include/machine/ioctl_meteor.h) -.br -.in -0.5i +The files required for +.Tn "Matrox Meteor" +card are: +.Pp +.Bl -item -offset indent -compact +.It +.Pa /sys/pci/meteor.c +.It +.Pa /sys/i386/include/ioctl_meteor.h +.El +.Pp For .Fx release versions 2.1 and earlier, the following patch files are also required: -.br -.in +0.5i -meteor/usr/sys/i386/i386/conf.patch -.br -meteor/usr/sys/conf/files.patch -.br -meteor/sys/i386/conf/LINT.patch -.br -These files are available for anonymous ftp at: -.br -.in +0.5i -ftp://joy.cs.ndsu.nodak.edu/pub/meteor.tgz -.br -.in -1.0i .Pp -1) In the configuration file, add the line (as shown in -meteor/usr/sys/i386/conf/LINT.patch): +.Bl -item -offset indent -compact +.It +.Pa meteor/usr/sys/i386/i386/conf.patch +.It +.Pa meteor/usr/sys/conf/files.patch +.It +.Pa meteor/sys/i386/conf/LINT.patch +.El .Pp -.Em device meteor0 +These files are available for anonymous FTP at: +.Pa ftp://joy.cs.ndsu.nodak.edu/pub/meteor.tgz .Pp -2) There is also a couple of optional parameters you may use +.Bl -enum +.It +In the configuration file, add the line (as shown in +.Pa meteor/usr/sys/i386/conf/LINT.patch ) : .Pp -.Em options "METEOR_ALLOC_PAGES=xxx" -specifies the number of contiguous pages to allocate when successfully -probed. The default number of pages allocated by the kernel is 151. +.Cd "device meteor0" +.It +There is also a couple of optional parameters you may use: +.Bl -tag -width indent +.It Cd "options ""METEOR_ALLOC_PAGES=xxx""" +Specifies the number of contiguous pages to allocate when successfully +probed. +The default number of pages allocated by the kernel is 151. This means that there are (151*4096) bytes available for use. -.Pp -.Em options METEOR_DEALLOC_PAGES -deallocate all pages when closing the device. -Note, the chance of -contiguously re-allocating new pages are very small. The default +.It Cd "options METEOR_DEALLOC_PAGES" +Deallocate all pages when closing the device. +Note, the chances of +contiguously re-allocating new pages are very small. +The default behavior is to not deallocate pages. -.Pp -.Em options "METEOR_DEALLOC_ABOVE=xxx" -deallocate all pages above the specified number. The default action is +.It Cd "options ""METEOR_DEALLOC_ABOVE=xxx""" +Deallocate all pages above the specified number. +The default action is to not deallocate above any pages. +.El +.It +Make and install the kernel. +.It +Make the special file name: .Pp -3) Make and install the kernel. +.Dl "# mknod /dev/meteor0 c 0" .Pp -4) Make the special file name: -.Pp -.Em mknod /dev/meteor0 c 0 -The major number is determined by the placement of the device in conf.c. +The major number is determined by the placement of the device in +.Pa conf.c . The patch supplied with the driver will make the major number 67. -.Pp -.Sh Meteor Capture Modes -The Meteor capture driver has three modes of capture operation. -.Pp -1) Conventional +.El +.Ss Meteor Capture Modes +The +.Nm +capture driver has three modes of capture operation. +.Bl -enum +.It +Conventional .Xr read 2 interface. -.in +0.5i .Pp This mode is the easiest and slowest to use. This mode is great for capturing a single field at little programming cost. .Pp -In this mode, the user opens the device, set the capture mode -and size (See: METEORSETGEO ioctl call), and uses the read system +In this mode, the user opens the device, sets the capture mode +and size (see: +.Dv METEORSETGEO +.Xr ioctl 2 +call), and uses the +.Xr read 2 +system call to load the data into a buffer. .Pp -meteor_read.c; read 400x300 RGB24 into a viewable PPM file -.Pp -.in -0.5i -.nf +.Pa meteor_read.c ; +read 400x300 RGB24 into a viewable PPM file +.Bd -literal #include #include @@ -121,7 +132,7 @@ main() printf("open failed: %d\\n", errno); exit(1); } - /* set up the capture type and size */ + /* set up the capture type and size */ geo.rows = ROWS; geo.columns = COLS; geo.frames = 1; @@ -158,11 +169,11 @@ main() exit(1); } - /* make PPM header and save to file */ + /* make PPM header and save to file */ strcpy(&header[0], "P6 400 300 255 "); header[2] = header[6] = header[10] = header[14] = '\\n'; write (o, &header[0], 15); - /* save the RGB data to PPM file */ + /* save the RGB data to PPM file */ for (p = &buf[0]; p < &buf[SIZE]; ) { b[2] = *p++; /* blue */ b[1] = *p++; /* green */ @@ -173,31 +184,40 @@ main() close(o); exit(0); } -.if +.Ed +.It +Memory mapped single capture or unsynchronized continuous capture. .Pp - 2) Memory mapped single capture or unsynchronized continuous capture. -.in +0.5i -.Pp -The single capture mode is designed for conferencing tools such as nv. +The single capture mode is designed for conferencing tools such as +.Nm nv . These tools need to control the starting of the image capture and also need several frames a second. The continuous capture mode is designed for applications that want free-running data. .Pp -In this mode, the user opens the device, set the capture mode -and size (See: METEORSETGEO ioctl call), memory maps the frame buffer +In this mode, the user opens the device, sets the capture mode +and size (see: +.Dv METEORSETGEO +.Xr ioctl 2 +call), +.Xr mmap 2 Ns s +the frame buffer memory into the user process space, and issues either the -single-capture or the continuous capture call (See: METEORCAPTUR ioctl +single-capture or the continuous capture call (see: +.Dv METEORCAPTUR +.Xr ioctl 2 call) to load the data into the memory mapped buffer. .Pp -As explained in the METEORCAPTUR ioctl call, the single frame capture -ioctl will block until the capture is complete, the continuous capture +As explained in the +.Dv METEORCAPTUR +.Xr ioctl 2 +call, the single frame capture +.Xr ioctl 2 +will block until the capture is complete, the continuous capture will return immediately. -.in -0.5i .Pp - meteor_mmap_single_continuous.c -.Pp -.nf +.Pa meteor_mmap_single_continuous.c +.Bd -literal #include #include #include @@ -247,13 +267,13 @@ main() MAP_SHARED, i, (off_t)0); #ifdef SINGLE_MODE - /* single frame capture */ + /* single frame capture */ c = METEOR_CAP_SINGLE ; ioctl(i, METEORCAPTUR, &c); /* wait for the frame */ /* directly access the frame buffer array data in mmbuf */ #else - /* continuous frame capture */ + /* continuous frame capture */ c = METEOR_CAP_CONTINOUS ; ioctl(i, METEORCAPTUR, &c); /* returns immediately */ @@ -266,11 +286,10 @@ main() close(i); exit(0); } -.if +.Ed +.It +Memory mapped, multi-frame ring buffer synchronize capture. .Pp - 3) Memory mapped, multi-frame ring buffer synchronize capture. -.Pp -.in +0.5i This continuous capture mode is synchronized with the application that processes up to 32 frames. This gives the advantages of both single and @@ -285,67 +304,91 @@ written by the kernel and which frame has been read by the application. The shared structure starts on the first page after your data. The structure address can be found by calculation: -.in +0.5i .Pp -(number_rows * number_columns * pixel_depth + 4095) & 0xfffff000 -.in -0.5i +.Dl "(number_rows * number_columns * pixel_depth + 4095) & 0xfffff000" +or +.Dl "((number_rows * number_columns * pixel_depth + 4095)/4096) * 4096" .Pp - or -.in +0.5i -.Pp -((number_rows * number_columns * pixel_depth + 4095)/4096) * 4096 -.in -0.5i -.Pp -The shared structure is of type struct meteor_mem. +The shared structure is of type +.Va struct meteor_mem . The two most -important fields are called active and num_active_buf. active -is a bitmap of frames written by the kernel. num_active_bufs is -a count of frames marked in the active field. +important fields are called +.Va active +and +.Va num_active_buf . +.Va active +is a bitmap of frames written by the kernel. +.Va num_active_bufs +is +a count of frames marked in the +.Va active +field. When a frame is read -in by the driver, the num_active_bufs count is tested, if this +in by the driver, the +.Va num_active_bufs +count is tested, if this count is below the threshold of number of active frames (value -in meteor_mem's hiwat variable), the bit representing frame -number in the buffer is stored in the active variable, the -num_active_bufs is incremented, the kernel then raises the specified +in +.Va meteor_mem Ns 's +.Va hiwat +variable), the bit representing frame +number in the buffer is stored in the +.Va active +variable, the +.Va num_active_bufs +is incremented, the kernel then raises the specified signal to activate the user application. The user application's responsibility when getting the signal is to check the active bitmap to determine the lowest active frame, use the data as the application desires, clear the bitmap entry for that frame, and decrement the -num_active_bufs. -If the threshold of number of active frames (hiwat) +.Va num_active_bufs . +If the threshold of number of active frames +.Pq Va hiwat has been exceeded, no new frames or signal from the kernel will occur -until the num_active_bufs is less than or equal to lowat. +until the +.Va num_active_bufs +is less than or equal to +.Va lowat . .Pp -The driver loads the frames in a round-robin fashion. it is expected +The driver loads the frames in a round-robin fashion. +It is expected that the user removes them in the same order. The driver does not check to see if the frame is already active. .Pp -The frame_size and number of frames in the buffer are also provided -to the meteor_mem structure, but changing these fields in the +The +.Va frame_size +and number of frames in the buffer are also provided +to the +.Va meteor_mem +structure, but changing these fields in the application will not change the operation of the driver. .Pp In programming for this mode, the user opens the device, sets the -geometry, mmaps the data/common control structure, then starts the +geometry, +.Xr mmap 2 Ns s +the data/common control structure, then starts the continuous capture mode. A special signal catcher is required to process the frames as they are read by the kernel. .Pp -When specifying the geometry (See: ioctl METEORSETGEO), it +When specifying the geometry (see: +.Dv METEORSETGEO +.Xr ioctl 2 +call), +it is important that the number of frames is set greater than 1. -.in -0.5i .Pp - skeleton_capture_n.c -.Pp -.nf +.Pa skeleton_capture_n.c +.Bd -literal #include #include #include #include #include -int video; /* made global if you wish to stop capture in signal handler */ +int video; /* made global if you wish to stop capture in signal handler */ caddr_t data_frames; struct meteor_mem *common_mem; extern int errno; @@ -360,15 +403,15 @@ usr2_catcher() #endif char *frame; - /* find frame */ + /* find frame */ frame = (char *) (data_frames + sig_cnt * common_mem->frame_size) ; /* add frame processing here */ - /* deactivate frame */ + /* deactivate frame */ common_mem->active &= ~(1 << (sig_cnt % 16)); common_mem->num_active_bufs--; - /* process next frame on next interrupt */ + /* process next frame on next interrupt */ sig_cnt = ((sig_cnt+1) % FRAME_MAX); #ifdef SIGNAL_STOP @@ -398,7 +441,7 @@ main() height = geo.rows = 120; width= geo.columns = 320; frames = geo.frames = FRAME_MAX; - depth = 2; /* 2 bytes per pixel for RGB*/ + depth = 2; /* 2 bytes per pixel for RGB*/ geo.oformat = METEOR_GEO_RGB16; @@ -423,16 +466,16 @@ main() } size = ((width*height*depth*frames+4095)/4096)*4096; - /* add one page after data for meteor_mem */ + /* add one page after data for meteor_mem */ data_frames = mmap((caddr_t)0, size + 4096, PROT_READ | PROT_WRITE, MAP_SHARED, i, (off_t)0); if (data_frames == (caddr_t) MAP_FAILED) return (0); - /* common_mem is located at page following data */ + /* common_mem is located at page following data */ common_mem = (struct meteor_mem *) (y + size); - signal(SIGUSR2, usr2_catcher); /* catch new frame message */ + signal(SIGUSR2, usr2_catcher); /* catch new frame message */ capframe.command=METEOR_CAP_N_FRAMES; capframe.signal=SIGUSR2; @@ -448,7 +491,7 @@ main() /* this is the background working area, or you can sleep */ - /* to stop capture */ + /* to stop capture */ capframe.command=METEOR_CAP_STOP_FRAMES; if (ioctl(i, METEORCAPFRM, &capframe) < 0) { @@ -456,55 +499,80 @@ main() exit(1); } } -.if -.Pp -.Sh Meteor IOCTL Call and Parameters -.Pp -The Meteor capture driver has ioctl requests for capturing, reading card +.Ed +.El +.Ss Meteor IOCTL Call and Parameters +The +.Nm +capture driver has +.Xr ioctl 2 +requests for capturing, reading card status, for setting and reading the geometry, and for setting and reading the attributes. .Pp +.Bf -symbolic IT IS VERY IMPORTANT TO CHECK FOR ERRORS ON THESE RETURNING IOCTLs. -Errors indicate that something is very wrong with the ioctl and the +.Ef +Errors indicate that something is very wrong with the +.Xr ioctl 2 +and the application should not attempt to proceed further with capturing. The -meteor capture driver still makes attempts to stop the next capture step if +.Nm +capture driver still makes attempts to stop the next capture step if an error occurred in a previous step but was ignored by the application programmer. +.Bl -enum +.It +.Xr ioctl 2 +requests +.Dv METEORSETGEO +and +.Dv METEORGETGEO .Pp -1) ioctl requests METEORSETGEO and METEORGETGEO -.in +0.5i -METEORSETGEO and METEORGETGEO are used to set and read the input +.Dv METEORSETGEO +and +.Dv METEORGETGEO +are used to set and read the input size, input device, and output format for frame capture. .Pp -These ioctl routines use the meteor_geomet structure that has the +These +.Xr ioctl 2 +routines use the +.Va meteor_geomet +structure that has the following entries: .Pp .Bl -tag -width columns -.It Dv rows +.It Va rows number of rows (lines high) in output image -.It Dv columns +.It Va columns number of pixels in a row (width) in output image -.It Dv frames +.It Va frames number of frames in buffer. Should be 1, unless using -the multi-framed synchronous capture mode (METEORCAPFRM) +the multi-framed synchronous capture mode +.Pq Dv METEORCAPFRM which REQUIRES frames to be larger than 1. .Pp -Note: if rows, columns or frames is not changed, then +Note: if +.Va rows , columns +or +.Va frames +is not changed, then the existing values are used. The system defaults is 640x480x1. -.It Dv oformat +.It Va oformat you may choose one of the following output format: .Bl -tag -width METEOR_GEO_YUV_PACKED .It Dv METEOR_GEO_RGB16 -RGB 16 bits xrrrrrgg gggbbbbb default) +(RGB 16 bits xrrrrrgg gggbbbbb default) .It Dv METEOR_GEO_RGB24 (RGB 24 bits packed in 32 bits: 00000000 rrrrrrrr gggggggg bbbbbbbb) .It Dv METEOR_GEO_YUV_PACKED -(4-2-2 YUV 16 bits packed. byte format: +(4-2-2 YUV 16 bits packed byte format: u0 y0 v0 y1 u1 y2 v1 y3 ...) .It Dv METEOR_GEO_YUV_PLANER (4-2-2 YUV 16 bits planer format: @@ -516,38 +584,59 @@ rows * column / 4 bytes of odd v) .El .El .Pp -The METEORSETGEO ioctl will fail if more than one entry from a category +The +.Dv METEORSETGEO +.Xr ioctl 2 +will fail if more than one entry from a category is selected. -It is highly recommended that a METEORSETGEO is done +It is highly recommended that a +.Dv METEORSETGEO +is done before capturing data because you cannot guarantee the initial mode the card. .Pp -The METEORSETGEO will also attempt to reallocate a new contiguous +The +.Dv METEORSETGEO +will also attempt to reallocate a new contiguous kernel buffer if the new geometry exceeds the old geometry. On other hand, if the new geometry will fit in the existing buffer, the existing buffer is used. .Pp -If METEORSETGEO fails the ioctl() will return a value of -1 and the -external variable errno will be set to: -.Pp +If +.Dv METEORSETGEO +fails the +.Xr ioctl 2 +will return a value of -1 and the +external variable +.Va errno +will be set to: .Bl -tag -width Er .It Bq Er EINVAL -invalid meteor_geomet structure pointer, rows, columns, -frames were invalid. +invalid +.Va meteor_geomet +structure pointer, +.Va rows , columns , frames +were invalid. .It Bq Er ENOMEM could not allocate the contiguous block. .El -.in -0.5i +.It +.Xr ioctl 2 +requests +.Dv METEORSFMT +and +.Dv METEORGFMT .Pp -2) ioctl requests METEORSFMT and METEORGFMT -.in +0.5i -.Pp -METEORSFMT and METEORGFMT are used to set and read the camera input +.Dv METEORSFMT +and +.Dv METEORGFMT +are used to set and read the camera input standard format. .Pp Possible formats are: -.Bl -tag -width METEOR_FMT_AUTOMODE +.Pp +.Bl -tag -width METEOR_FMT_AUTOMODE -compact .It Dv METEOR_FMT_NTSC NTSC (default mode) .It Dv METEOR_FMT_PAL @@ -557,19 +646,27 @@ SECAM .It Dv METEOR_FMT_AUTOMODE Autodetect. .El -.in -0.5i +.It +.Xr ioctl 2 +requests +.Dv METEORSINPUT +and +.Dv METEORGINPUT .Pp -3) ioctl requests METEORSINPUT and METEORGINPUT -.in +0.5i -.Pp -METEORSINPUT and METEORGINPUT are used to set and read the camera +.Dv METEORSINPUT +and +.Dv METEORGINPUT +are used to set and read the camera input device. -Using the DB9 connector on the Meteor card, 4 input +Using the DB9 connector on the +.Tn Meteor +card, 4 input devices can be connected and an input camera can be selected with this -ioctl. +.Xr ioctl 2 . .Pp Possible formats are: -.Bl -tag -width METEOR_INPUT_DEV_SVIDEO +.Pp +.Bl -tag -width METEOR_INPUT_DEV_SVIDEO -compact .It Dv METEOR_INPUT_DEV0 (default if none specified) .It Dv METEOR_INPUT_DEV_RCA @@ -579,62 +676,56 @@ Possible formats are: .It Dv METEOR_INPUT_DEV_SVIDEO (same as METEOR_INPUT_DEV2) .El -.in -0.5i +.It +.Xr ioctl 2 +request +.Dv METEORSTATUS .Pp -4) ioctl request METEORSTATUS -.in +0.5i -.Pp -METEORSTATUS is used to read the status of the Meteor capture card +.Dv METEORSTATUS +is used to read the status of the +.Tn Meteor +capture card and returns the following information: +.Bl -column "METEOR_STATUS_ID_MASK" "" +.It Dv METEOR_STATUS_ID_MASK " 4 bit ID of the SAA7196 scaler chip." .Pp -.Bl -tag -width METEOR_STATUS_ID_MASK -.It Dv METEOR_STATUS_ID_MASK -4 bit ID of the SAA7196 scaler chip. -.It Dv METEOR_STATUS_DIR -0 = scaler uses internal source. -.br -1 = scaler uses external data of expansion bus. -.It Dv METEOR_STATUS_OEF -0 = even field detected. -.br -1 = odd field detected. -.It Dv METEOR_STATUS_SVP -VRAM Port state: -.br -0 = inputs HFL and INCADDR inactive. -.br -1 = inputs HFL and INCADDR active. -.It Dv METEOR_STATUS_STTC -0 = TV horizontal time constant (slow). -.br -1 = VCR horizontal time constant (fast). -.It Dv METEOR_STATUS_HCLK -0 = Horizontal Phase Lock Loop locked. -.br -1 = Horizontal Phase Lock Loop unlocked. -.It Dv METEOR_STATUS_FIDT -0 = 50 Hz Field detected. -.br -1 = 60 Hz Field detected. -.It Dv METEOR_STATUS_ALTD -0 = no line alternating color burst detected. -.br -1 = line alternating color burst detected -(PAL/SECAM). -.It Dv METEOR_STATUS_CODE -0 = no color information detected. -.br -1 = color information detected. +.It Dv METEOR_STATUS_DIR " 0 = scaler uses internal source." +.It " 1 = scaler uses external data of expansion bus." +.Pp +.It Dv METEOR_STATUS_OEF " 0 = even field detected." +.It " 1 = odd field detected." +.Pp +.It Dv METEOR_STATUS_SVP " VRAM Port state:" +.It " 0 = inputs HFL and INCADDR inactive." +.It " 1 = inputs HFL and INCADDR active." +.Pp +.It Dv METEOR_STATUS_STTC " 0 = TV horizontal time constant (slow)." +.It " 1 = VCR horizontal time constant (fast)." +.Pp +.It Dv METEOR_STATUS_HCLK " 0 = Horizontal Phase Lock Loop locked." +.It " 1 = Horizontal Phase Lock Loop unlocked." +.Pp +.It Dv METEOR_STATUS_FIDT " 0 = 50 Hz Field detected." +.It " 1 = 60 Hz Field detected." +.Pp +.It Dv METEOR_STATUS_ALTD " 0 = no line alternating color burst detected." +.It " 1 = line alternating color burst detected (PAL/SECAM)." +.Pp +.It Dv METEOR_STATUS_CODE " 0 = no color information detected." +.It " 1 = color information detected." .El -.in -0.5i +.It +.Xr ioctl 2 +request +.Dv METEORCAPTUR .Pp -5) ioctl request METEORCAPTUR -.in +0.5i -.Pp -METEORCAPTUR is used to single frame capture or unsynchronized +.Dv METEORCAPTUR +is used to single frame capture or unsynchronized continuous capture. .Pp -The single frame capture ioctl request will return only after a +The single frame capture +.Xr ioctl 2 +request will return only after a frame has been captured and transfered to the frame buffer. .Pp The unsynchronized continuous capture will return immediately and @@ -642,10 +733,11 @@ data is directly deposited into the buffer when it is available. Since this is unsynchronized, it is possible the data is being written by the kernel while being read by the application. .Pp -These ioctl routines use the following settings: -following entries: +These +.Xr ioctl 2 +routines use the following settings: .Pp -.Bl -tag -width METEOR_CAP_CONTINOUS +.Bl -tag -width METEOR_CAP_CONTINOUS -compact .It Dv METEOR_CAP_SINGLE capture one frame .It Dv METEOR_CAP_CONTINOUS @@ -655,147 +747,215 @@ stop the unsynchronized continuous capture .El .Pp -If METEORCAPTUR fails the ioctl() will return a value of -1 and the -external variable errno will be set to: -.Pp +If +.Dv METEORCAPTUR +fails the +.Xr ioctl 2 +will return a value of -1 and the +external variable +.Va errno +will be set to: .Bl -tag -width Er .It Bq Er EINVAL invalid capture command value .It Bq Er ENXIO there is not internal buffer to hold the frame. -this indicates the previous set geometry ioctl failed. +this indicates the previous set geometry +.Xr ioctl 2 +failed. .It Bq Er EIO card is already capturing. .El -.in -0.5i +.It +.Xr ioctl 2 +request +.Dv METEORCAPFRM .Pp -6) ioctl request METEORCAPFRM -.in +0.5i +.Dv METEORCAPFRM +is used for synchronous capture of multiple frames. .Pp -METEORCAPFRM is used for synchronous capture of multiple frames. -.Pp -This ioctl routines use the meteor_capture structure that has the +This +.Xr ioctl 2 +routine uses the +.Va meteor_capture +structure that has the following entries: -.Pp .Bl -tag -width command -.It Dv command -possible values for command are: +.It Va command +possible values for +.Va command +are: .Bl -tag -width METEOR_CAP_STOP_FRAMES -.It Dv METEOR_CAP_STOP_FRAMES stop the capture does not use the +.It Dv METEOR_CAP_STOP_FRAMES +stop the capture; does not use the other variable in structure. -.It Dv METEOR_CAP_N_FRAMES start the capture using the other +.It Dv METEOR_CAP_N_FRAMES +start the capture using the other variables in the structure as inputs .El -.It Dv signal +.It Va signal signal to send to application when a new frame has been captured. This signal will only be raised if the captured frame is saved. -.It Dv lowat +.It Va lowat see below -.It Dv hiwat +.It Va hiwat see below .El .Pp When a new frame is completed, the driver checks the current unread -frame count stored in shared variable (the shared variable are stored -in the meteor_mem structure) num_active_buf, if the count is larger -than hiwat, the driver will not store any new frames and will not -send capture signal to the user application until the num_active_buf -is lower than lowat. -.Pp -If METEORCAPFRM fails the ioctl() will return a value of -1 and the -external variable errno will be set to: +frame count stored in shared variable (the shared variable is stored +in the +.Va meteor_mem +structure) +.Va num_active_buf ; +if the count is larger +than +.Va hiwat , +the driver will not store any new frames and will not +send capture signal to the user application until the +.Va num_active_buf +is lower than +.Va lowat . .Pp +If +.Dv METEORCAPFRM +fails the +.Xr ioctl 2 +will return a value of -1 and the +external variable +.Va errno +will be set to: .Bl -tag -width Er .It Bq Er EINVAL invalid meteor_geomet structure pointer or bad command. .It Bq Er ENXIO there is not internal buffer to hold the frame. -this indicates the previous set geometry ioctl failed. +this indicates the previous set geometry +.Xr ioctl 2 +failed. .It Bq Er EIO card is already capturing. .El -.in -0.5i +.It +.Xr ioctl 2 +requests +.Dv METEORSCHCV +and +.Dv METEORGCHCV .Pp -7) ioctl requests METEORSCHCV and METEORGCHCV -.in +0.5i -.Pp -METEORSCHCV and METEORGCHCV are used to set and get the chrominance +.Dv METEORSCHCV +and +.Dv METEORGCHCV +are used to set and get the chrominance gain control and effects the UV output amplitude. .Pp -If METEORSCHCV or METEORGCHCV fails the ioctl() will return a value -of -1 and the external variable errno will be set to: -.Pp +If +.Dv METEORSCHCV +or +.Dv METEORGCHCV +fails the +.Xr ioctl 2 +will return a value +of -1 and the external variable +.Va errno +will be set to: .Bl -tag -width Er .It Bq Er EINVAL invalid unsigned char pointer. .El -.in -0.5i +.It +.Xr ioctl 2 +requests +.Dv METEORGHUE +and +.Dv METEORSHUE .Pp -8) ioctl requests METEORGHUE and METEORSHUE -.in +0.5i -.Pp -METEORGHUE and METEORSHUE are used to get and set the hue. +.Dv METEORGHUE +and +.Dv METEORSHUE +are used to get and set the hue. The signed character has legal values are from +127 which represent +178.6 degrees to -128 which represents -180 degrees. .Pp -If METEORGHUE or METEORSHUE fails the ioctl() will return a value of --1 and the external variable errno will be set to: -.Pp +If +.Dv METEORGHUE +or +.Dv METEORSHUE +fails the +.Xr ioctl 2 +will return a value of +-1 and the external variable +.Va errno +will be set to: .Bl -tag -width Er .It Bq Er EINVAL invalid signed char pointer. .El -.in -0.5i +.It +.Xr ioctl 2 +requests +.Dv METEORSCOUNT +and +.Dv METEORGCOUNT .Pp -9) ioctl requests METEORSCOUNT and METEORGCOUNT -.in +0.5i -.Pp -METEORGCOUNT is used to get the count of frame errors, DMA errors and +.Dv METEORGCOUNT +is used to get the count of frame errors, DMA errors and count of the number of frames captured that have occurred since the device was opened. -METEORSCOUNT can be used to reinitialize the +.Dv METEORSCOUNT +can be used to reinitialize the counters. .Pp -This ioctl routines use the meteor_counts structure that has the +This +.Xr ioctl 2 +routines use the +.Va meteor_counts +structure that has the following entries: -.Pp .Bl -tag -width frame_count -.It Dv fifo_errors +.It Va fifo_errors number of FIFO errors since device was opened. -.It Dv dma_errors number of DMA errors since device was opened. - -.It Dv frame_count number of frames captured since device was opened. +.It Va dma_errors +number of DMA errors since device was opened. +.It Va frame_count +number of frames captured since device was opened. .El .Pp -If METEORSCOUNT or METEORGCOUNT fails the ioctl() will return a value -of -1 and the external variable errno will be set to: +If +.Dv METEORSCOUNT +or +.Dv METEORGCOUNT +fails the +.Xr ioctl 2 +will return a value +of -1 and the external variable +.Va errno +will be set to: .Bl -tag -width Er .It Bq Er EINVAL invalid meteor_counts structure pointer. .El -.in -0.5i -.Pp -.Sh Known Bugs: -.in +0.5i -.Pp -1) IIC register is difficult to set. +.El +.Sh BUGS +.Bl -enum +.It +IIC register is difficult to set. We got around that by adding a long wait at each IIC register write. -.Pp -2) We had difficulties getting the Meteor capture card to work on systems +.It +We had difficulties getting the +.Tn Meteor +capture card to work on systems that used NCR chipset SCSI cards. -It is possible that the Meteor and NCR SCSI +It is possible that the +.Tn Meteor +and +.Tn "NCR SCSI" could work together using the newer TRITON motherboards. -.in -0.5i -.Pp -.Sh Authors: -.Pp -.Bl -tag -width Mark_Tinguely -.It Dv Jim Lowe -(james@miller.cs.uwm.edu) -.It Dv Mark Tinguely -(tinguely@plains.nodak.edu) .El +.Sh AUTHORS +.An Jim Lowe Aq james@miller.cs.uwm.edu , +.An Mark Tinguely Aq tinguely@plains.nodak.edu