mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
Remote meteor driver. It hasn't compiled in over 3 years. If someone
makes it compile again, and can test it, we can restore the driver to the tree.
This commit is contained in:
parent
1da8b3b984
commit
65b4a1b917
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=123213
@ -2,9 +2,9 @@
|
||||
|
||||
MAN= aic.4 alpm.4 amdpm.4 apm.4 ar.4 asc.4 \
|
||||
CPU_ELAN.4 cs.4 cx.4 cy.4 \
|
||||
dgb.4 el.4 ep.4 ex.4 fe.4 gsc.4 \
|
||||
el.4 ep.4 ex.4 fe.4 gsc.4 \
|
||||
ie.4 io.4 le.4 linux.4 lnc.4 longrun.4 mcd.4 \
|
||||
meteor.4 mse.4 npx.4 \
|
||||
mse.4 npx.4 \
|
||||
pae.4 pcf.4 perfmon.4 pnp.4 pnpbios.4 \
|
||||
ray.4 rdp.4 sbni.4 smapi.4 scd.4 \
|
||||
spkr.4 sr.4 streams.4 svr4.4 \
|
||||
|
@ -1,961 +0,0 @@
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd August 15, 1995
|
||||
.Dt METEOR 4 i386
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm meteor
|
||||
.Nd "video capture driver"
|
||||
.Sh SYNOPSIS
|
||||
.Cd "device meteor"
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm
|
||||
driver provides support for a PCI
|
||||
.Em video
|
||||
capture.
|
||||
It allows the capture of 24 bit RGB, 16 bit RGB and 16 bit YUV
|
||||
output formats.
|
||||
.Pp
|
||||
.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
|
||||
.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:
|
||||
.Pp
|
||||
.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
|
||||
These files are available for anonymous FTP at:
|
||||
.Pa ftp://joy.cs.ndsu.nodak.edu/pub/meteor.tgz
|
||||
.Pp
|
||||
.Bl -enum
|
||||
.It
|
||||
In the configuration file, add the line (as shown in
|
||||
.Pa meteor/usr/sys/i386/conf/LINT.patch ) :
|
||||
.Pp
|
||||
.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.
|
||||
.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.
|
||||
.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
|
||||
.Dl "# mknod /dev/meteor0 c <major> 0"
|
||||
.Pp
|
||||
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.
|
||||
.El
|
||||
.Ss Meteor Capture Modes
|
||||
The
|
||||
.Nm
|
||||
capture driver has three modes of capture operation.
|
||||
.Bl -enum
|
||||
.It
|
||||
Conventional
|
||||
.Xr read 2
|
||||
interface.
|
||||
.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, 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
|
||||
.Pa meteor_read.c ;
|
||||
read 400x300 RGB24 into a viewable PPM file
|
||||
.Bd -literal
|
||||
#include <sys/fcntl.h>
|
||||
#include <machine/ioctl_meteor.h>
|
||||
|
||||
extern int errno;
|
||||
#define ROWS 300
|
||||
#define COLS 400
|
||||
#define SIZE (ROWS * COLS * 4)
|
||||
main()
|
||||
{
|
||||
struct meteor_geomet geo;
|
||||
char buf[SIZE],b[4],header[16],*p;
|
||||
int i,o,c;
|
||||
|
||||
if ((i = open("/dev/meteor0", O_RDONLY)) < 0) {
|
||||
printf("open failed: %d\\n", errno);
|
||||
exit(1);
|
||||
}
|
||||
/* set up the capture type and size */
|
||||
geo.rows = ROWS;
|
||||
geo.columns = COLS;
|
||||
geo.frames = 1;
|
||||
geo.oformat = METEOR_GEO_RGB24 ;
|
||||
|
||||
if (ioctl(i, METEORSETGEO, &geo) < 0) {
|
||||
printf("ioctl failed: %d\\n", errno);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
c = METEOR_FMT_NTSC;
|
||||
|
||||
if (ioctl(i, METEORSFMT, &c) < 0) {
|
||||
printf("ioctl failed: %d\\n", errno);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
c = METEOR_INPUT_DEV0;
|
||||
|
||||
if (ioctl(i, METEORSINPUT, &c) < 0) {
|
||||
printf("ioctl failed: %d\\n", errno);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ((c=read(i, &buf[0], SIZE)) < SIZE) {
|
||||
printf("read failed %d %d %d\\n", c, i, errno);
|
||||
close(i);
|
||||
exit(1);
|
||||
}
|
||||
close(i);
|
||||
|
||||
if ((o = open("rgb24.ppm", O_WRONLY | O_CREAT, 0644)) < 0) {
|
||||
printf("ppm open failed: %d\\n", errno);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* 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 */
|
||||
for (p = &buf[0]; p < &buf[SIZE]; ) {
|
||||
b[2] = *p++; /* blue */
|
||||
b[1] = *p++; /* green */
|
||||
b[0] = *p++; /* red */
|
||||
*p++; /* NULL byte */
|
||||
write(o,&b[0], 3); /* not very efficient */
|
||||
}
|
||||
close(o);
|
||||
exit(0);
|
||||
}
|
||||
.Ed
|
||||
.It
|
||||
Memory mapped single capture or unsynchronized continuous capture.
|
||||
.Pp
|
||||
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, 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:
|
||||
.Dv METEORCAPTUR
|
||||
.Xr ioctl 2
|
||||
call) to load the data into the memory mapped buffer.
|
||||
.Pp
|
||||
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.
|
||||
.Pp
|
||||
.Pa meteor_mmap_single_continuous.c
|
||||
.Bd -literal
|
||||
#include <sys/types.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <machine/ioctl_meteor.h>
|
||||
|
||||
extern int errno;
|
||||
#define ROWS 480
|
||||
#define COLS 640
|
||||
#define SIZE (ROWS * COLS * 2)
|
||||
main()
|
||||
{
|
||||
struct meteor_geomet geo;
|
||||
char buf[SIZE];
|
||||
char *mmbuf;
|
||||
int i,c;
|
||||
|
||||
if ((i = open("/dev/meteor0", O_RDONLY)) < 0) {
|
||||
printf("open failed\\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
geo.rows = ROWS;
|
||||
geo.columns = COLS;
|
||||
geo.frames = 1;
|
||||
geo.oformat = METEOR_GEO_RGB16 ;
|
||||
|
||||
if (ioctl(i, METEORSETGEO, &geo) < 0) {
|
||||
printf("ioctl failed: %d\\n", errno);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
c = METEOR_FMT_NTSC;
|
||||
|
||||
if (ioctl(i, METEORSFMT, &c) < 0) {
|
||||
printf("ioctl failed: %d\\n", errno);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
c = METEOR_INPUT_DEV0;
|
||||
|
||||
if (ioctl(i, METEORSINPUT, &c) < 0) {
|
||||
printf("ioctl failed: %d\\n", errno);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
mmbuf=(char *)mmap((caddr_t)0, SIZE, PROT_READ,
|
||||
MAP_SHARED, i, (off_t)0);
|
||||
|
||||
#ifdef SINGLE_MODE
|
||||
/* 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 */
|
||||
c = METEOR_CAP_CONTINOUS ;
|
||||
ioctl(i, METEORCAPTUR, &c); /* returns immediately */
|
||||
|
||||
/* directly access the frame buffer array data in mmbuf */
|
||||
|
||||
c = METEOR_CAP_STOP_CONT ;
|
||||
ioctl(i, METEORCAPTUR, &c); /* close will also stop capture */
|
||||
#endif
|
||||
|
||||
close(i);
|
||||
exit(0);
|
||||
}
|
||||
.Ed
|
||||
.It
|
||||
Memory mapped, multi-frame ring buffer synchronize capture.
|
||||
.Pp
|
||||
This continuous capture mode is synchronized with the application that
|
||||
processes up to 32 frames.
|
||||
This gives the advantages of both single and
|
||||
continuous capture modes.
|
||||
.Pp
|
||||
The kernel notifies the application of a new data by raising an
|
||||
application defined signal.
|
||||
The driver also shares a structure with
|
||||
the application that allows them to communicate which frame has been
|
||||
written by the kernel and which frame has been read by the application.
|
||||
.Pp
|
||||
The shared structure starts on the first page after your data.
|
||||
The
|
||||
structure address can be found by calculation:
|
||||
.Pp
|
||||
.Dl "(number_rows * number_columns * pixel_depth + 4095) & 0xfffff000"
|
||||
or
|
||||
.Dl "((number_rows * number_columns * pixel_depth + 4095)/4096) * 4096"
|
||||
.Pp
|
||||
The shared structure is of type
|
||||
.Va struct meteor_mem .
|
||||
The two most
|
||||
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
|
||||
.Va num_active_bufs
|
||||
count is tested, if this
|
||||
count is below the threshold of number of active frames (value
|
||||
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
|
||||
.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
|
||||
.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
|
||||
that the user removes them in the same order.
|
||||
The driver does not
|
||||
check to see if the frame is already active.
|
||||
.Pp
|
||||
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,
|
||||
.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:
|
||||
.Dv METEORSETGEO
|
||||
.Xr ioctl 2
|
||||
call),
|
||||
it
|
||||
is important that the number of frames is set greater than 1.
|
||||
.Pp
|
||||
.Pa skeleton_capture_n.c
|
||||
.Bd -literal
|
||||
#include <sys/types.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/signal.h>
|
||||
#include <machine/ioctl_meteor.h>
|
||||
|
||||
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;
|
||||
|
||||
#define FRAME_MAX
|
||||
|
||||
void
|
||||
usr2_catcher()
|
||||
{
|
||||
#ifdef SIGNAL_STOP
|
||||
struct meteor_capframe capframe; /* for ioctl */
|
||||
#endif
|
||||
char *frame;
|
||||
|
||||
/* find frame */
|
||||
frame = (char *) (data_frames + sig_cnt * common_mem->frame_size) ;
|
||||
|
||||
/* add frame processing here */
|
||||
/* deactivate frame */
|
||||
common_mem->active &= ~(1 << (sig_cnt % 16));
|
||||
common_mem->num_active_bufs--;
|
||||
|
||||
/* process next frame on next interrupt */
|
||||
sig_cnt = ((sig_cnt+1) % FRAME_MAX);
|
||||
|
||||
#ifdef SIGNAL_STOP
|
||||
if (some_condition_requiring_stopping) {
|
||||
capframe.command=METEOR_CAP_STOP_FRAMES;
|
||||
|
||||
if (ioctl(i, METEORCAPFRM, &capframe) < 0) {
|
||||
printf("METEORCAPFRM failed %d\\n", errno);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
main()
|
||||
{
|
||||
struct meteor_geomet geo;
|
||||
int height, width, depth, frames, size;
|
||||
struct meteor_capframe capframe;
|
||||
|
||||
if ((i = open("/dev/meteor0", O_RDONLY)) < 0) {
|
||||
printf("open failed\\n");
|
||||
exit(1);
|
||||
}
|
||||
printf("test %d %d\\n", errno, i);
|
||||
|
||||
height = geo.rows = 120;
|
||||
width= geo.columns = 320;
|
||||
frames = geo.frames = FRAME_MAX;
|
||||
depth = 2; /* 2 bytes per pixel for RGB*/
|
||||
|
||||
|
||||
geo.oformat = METEOR_GEO_RGB16;
|
||||
|
||||
if (ioctl(i, METEORSETGEO, &geo) < 0) {
|
||||
printf("METEORSETGEO failed %d\\n", errno);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
c = METEOR_FMT_NTSC;
|
||||
|
||||
if (ioctl(i, METEORSFMT, &c) < 0) {
|
||||
printf("ioctl failed: %d\\n", errno);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
c = METEOR_INPUT_DEV0;
|
||||
|
||||
if (ioctl(i, METEORSINPUT, &c) < 0) {
|
||||
printf("ioctl failed: %d\\n", errno);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
size = ((width*height*depth*frames+4095)/4096)*4096;
|
||||
/* 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 = (struct meteor_mem *) (y + size);
|
||||
|
||||
signal(SIGUSR2, usr2_catcher); /* catch new frame message */
|
||||
|
||||
capframe.command=METEOR_CAP_N_FRAMES;
|
||||
capframe.signal=SIGUSR2;
|
||||
capframe.lowat=12; /* must be < hiwat */
|
||||
capframe.hiwat=14; /* must be < FRAME_MAX */
|
||||
|
||||
/* start the sync capture */
|
||||
if (ioctl(i, METEORCAPFRM, &capframe) < 0) {
|
||||
printf("METEORCAPFRM failed %d\\n", errno);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* this is the background working area, or you can sleep */
|
||||
|
||||
|
||||
/* to stop capture */
|
||||
capframe.command=METEOR_CAP_STOP_FRAMES;
|
||||
|
||||
if (ioctl(i, METEORCAPFRM, &capframe) < 0) {
|
||||
printf("METEORCAPFRM failed %d\\n", errno);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
.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.
|
||||
.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
|
||||
.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
|
||||
.Dv METEORSETGEO
|
||||
and
|
||||
.Dv METEORGETGEO
|
||||
are used to set and read the input
|
||||
size, input device, and output format for frame capture.
|
||||
.Pp
|
||||
These
|
||||
.Xr ioctl 2
|
||||
routines use the
|
||||
.Va meteor_geomet
|
||||
structure that has the
|
||||
following entries:
|
||||
.Pp
|
||||
.Bl -tag -width columns
|
||||
.It Va rows
|
||||
number of rows (lines high) in output image
|
||||
.It Va columns
|
||||
number of pixels in a row (width) in output image
|
||||
.It Va frames
|
||||
number of frames in buffer.
|
||||
Should be 1, unless using
|
||||
the multi-framed synchronous capture mode
|
||||
.Pq Dv METEORCAPFRM
|
||||
which REQUIRES frames to be larger than 1.
|
||||
.Pp
|
||||
Note: if
|
||||
.Va rows , columns
|
||||
or
|
||||
.Va frames
|
||||
is not changed, then
|
||||
the existing values are used.
|
||||
The system defaults
|
||||
is 640x480x1.
|
||||
.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)
|
||||
.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:
|
||||
u0 y0 v0 y1 u1 y2 v1 y3 ...)
|
||||
.It Dv METEOR_GEO_YUV_PLANER
|
||||
(4-2-2 YUV 16 bits planer format:
|
||||
rows * columns bytes of y
|
||||
rows * column / 4 bytes of even u
|
||||
rows * column / 4 bytes of even v
|
||||
rows * column / 4 bytes of odd u
|
||||
rows * column / 4 bytes of odd v)
|
||||
.El
|
||||
.El
|
||||
.Pp
|
||||
The
|
||||
.Dv METEORSETGEO
|
||||
.Xr ioctl 2
|
||||
will fail if more than one entry from a category
|
||||
is selected.
|
||||
It is highly recommended that a
|
||||
.Dv METEORSETGEO
|
||||
is done
|
||||
before capturing data because you cannot guarantee the initial mode
|
||||
the card.
|
||||
.Pp
|
||||
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
|
||||
.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
|
||||
.Va meteor_geomet
|
||||
structure pointer,
|
||||
.Va rows , columns , frames
|
||||
were invalid.
|
||||
.It Bq Er ENOMEM
|
||||
could not allocate the contiguous block.
|
||||
.El
|
||||
.It
|
||||
.Xr ioctl 2
|
||||
requests
|
||||
.Dv METEORSFMT
|
||||
and
|
||||
.Dv METEORGFMT
|
||||
.Pp
|
||||
.Dv METEORSFMT
|
||||
and
|
||||
.Dv METEORGFMT
|
||||
are used to set and read the camera input
|
||||
standard format.
|
||||
.Pp
|
||||
Possible formats are:
|
||||
.Pp
|
||||
.Bl -tag -width METEOR_FMT_AUTOMODE -compact
|
||||
.It Dv METEOR_FMT_NTSC
|
||||
NTSC (default mode)
|
||||
.It Dv METEOR_FMT_PAL
|
||||
PAL
|
||||
.It Dv METEOR_FMT_SECAM
|
||||
SECAM
|
||||
.It Dv METEOR_FMT_AUTOMODE
|
||||
Autodetect.
|
||||
.El
|
||||
.It
|
||||
.Xr ioctl 2
|
||||
requests
|
||||
.Dv METEORSINPUT
|
||||
and
|
||||
.Dv METEORGINPUT
|
||||
.Pp
|
||||
.Dv METEORSINPUT
|
||||
and
|
||||
.Dv METEORGINPUT
|
||||
are used to set and read the camera
|
||||
input device.
|
||||
Using the DB9 connector on the
|
||||
.Tn Meteor
|
||||
card, 4 input
|
||||
devices can be connected and an input camera can be selected with this
|
||||
.Xr ioctl 2 .
|
||||
.Pp
|
||||
Possible formats are:
|
||||
.Pp
|
||||
.Bl -tag -width METEOR_INPUT_DEV_SVIDEO -compact
|
||||
.It Dv METEOR_INPUT_DEV0
|
||||
(default if none specified)
|
||||
.It Dv METEOR_INPUT_DEV_RCA
|
||||
(same as METEOR_INPUT_DEV0)
|
||||
.It Dv METEOR_INPUT_DEV1
|
||||
.It Dv METEOR_INPUT_DEV2
|
||||
.It Dv METEOR_INPUT_DEV_SVIDEO
|
||||
(same as METEOR_INPUT_DEV2)
|
||||
.El
|
||||
.It
|
||||
.Xr ioctl 2
|
||||
request
|
||||
.Dv METEORSTATUS
|
||||
.Pp
|
||||
.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
|
||||
.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
|
||||
.It
|
||||
.Xr ioctl 2
|
||||
request
|
||||
.Dv METEORCAPTUR
|
||||
.Pp
|
||||
.Dv METEORCAPTUR
|
||||
is used to single frame capture or unsynchronized
|
||||
continuous capture.
|
||||
.Pp
|
||||
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
|
||||
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
|
||||
.Xr ioctl 2
|
||||
routines use the following settings:
|
||||
.Pp
|
||||
.Bl -tag -width METEOR_CAP_CONTINOUS -compact
|
||||
.It Dv METEOR_CAP_SINGLE
|
||||
capture one frame
|
||||
.It Dv METEOR_CAP_CONTINOUS
|
||||
unsynchronized continuous capture
|
||||
.It Dv METEOR_CAP_STOP_CONT
|
||||
stop the unsynchronized continuous
|
||||
capture
|
||||
.El
|
||||
.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
|
||||
.Xr ioctl 2
|
||||
failed.
|
||||
.It Bq Er EIO
|
||||
card is already capturing.
|
||||
.El
|
||||
.It
|
||||
.Xr ioctl 2
|
||||
request
|
||||
.Dv METEORCAPFRM
|
||||
.Pp
|
||||
.Dv METEORCAPFRM
|
||||
is used for synchronous capture of multiple frames.
|
||||
.Pp
|
||||
This
|
||||
.Xr ioctl 2
|
||||
routine uses the
|
||||
.Va meteor_capture
|
||||
structure that has the
|
||||
following entries:
|
||||
.Bl -tag -width command
|
||||
.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
|
||||
other variable in structure.
|
||||
.It Dv METEOR_CAP_N_FRAMES
|
||||
start the capture using the other
|
||||
variables in the structure as inputs
|
||||
.El
|
||||
.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 Va lowat
|
||||
see below
|
||||
.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 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
|
||||
.Xr ioctl 2
|
||||
failed.
|
||||
.It Bq Er EIO
|
||||
card is already capturing.
|
||||
.El
|
||||
.It
|
||||
.Xr ioctl 2
|
||||
requests
|
||||
.Dv METEORSCHCV
|
||||
and
|
||||
.Dv METEORGCHCV
|
||||
.Pp
|
||||
.Dv METEORSCHCV
|
||||
and
|
||||
.Dv METEORGCHCV
|
||||
are used to set and get the chrominance
|
||||
gain control and effects the UV output amplitude.
|
||||
.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
|
||||
.It
|
||||
.Xr ioctl 2
|
||||
requests
|
||||
.Dv METEORGHUE
|
||||
and
|
||||
.Dv METEORSHUE
|
||||
.Pp
|
||||
.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
|
||||
.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
|
||||
.It
|
||||
.Xr ioctl 2
|
||||
requests
|
||||
.Dv METEORSCOUNT
|
||||
and
|
||||
.Dv METEORGCOUNT
|
||||
.Pp
|
||||
.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.
|
||||
.Dv METEORSCOUNT
|
||||
can be used to reinitialize the
|
||||
counters.
|
||||
.Pp
|
||||
This
|
||||
.Xr ioctl 2
|
||||
routines use the
|
||||
.Va meteor_counts
|
||||
structure that has the
|
||||
following entries:
|
||||
.Bl -tag -width frame_count
|
||||
.It Va fifo_errors
|
||||
number of FIFO errors 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
|
||||
.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
|
||||
.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.
|
||||
.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
|
||||
.Tn Meteor
|
||||
and
|
||||
.Tn "NCR SCSI"
|
||||
could work together using the newer TRITON motherboards.
|
||||
.El
|
||||
.Sh AUTHORS
|
||||
.An Jim Lowe Aq james@miller.cs.uwm.edu ,
|
||||
.An Mark Tinguely Aq tinguely@plains.nodak.edu
|
@ -1,187 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1995 Mark Tinguely and Jim Lowe
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Mark Tinguely and Jim Lowe
|
||||
* 4. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
/*
|
||||
* ioctl constants for Matrox Meteor Capture card.
|
||||
*/
|
||||
|
||||
#ifndef _MACHINE_IOCTL_METEOR_H_
|
||||
#define _MACHINE_IOCTL_METEOR_H_
|
||||
|
||||
#ifndef _KERNEL
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#include <sys/ioccom.h>
|
||||
|
||||
struct meteor_capframe {
|
||||
short command; /* see below for valid METEORCAPFRM commands */
|
||||
short lowat; /* start transfer if < this number */
|
||||
short hiwat; /* stop transfer if > this number */
|
||||
} ;
|
||||
|
||||
/* structure for METEOR[GS]ETGEO - get/set geometry */
|
||||
struct meteor_geomet {
|
||||
u_short rows;
|
||||
u_short columns;
|
||||
u_short frames;
|
||||
u_long oformat;
|
||||
} ;
|
||||
|
||||
/* structure for METEORGCOUNT-get count of frames, fifo errors and dma errors */
|
||||
struct meteor_counts {
|
||||
u_long fifo_errors; /* count of fifo errors since open */
|
||||
u_long dma_errors; /* count of dma errors since open */
|
||||
u_long frames_captured; /* count of frames captured since open */
|
||||
u_long even_fields_captured; /* count of even fields captured */
|
||||
u_long odd_fields_captured; /* count of odd fields captured */
|
||||
} ;
|
||||
|
||||
/* structure for getting and setting direct transfers to vram */
|
||||
struct meteor_video {
|
||||
u_long addr; /* Address of location to dma to */
|
||||
u_long width; /* Width of memory area */
|
||||
u_long banksize; /* Size of Vram bank */
|
||||
u_long ramsize; /* Size of Vram */
|
||||
};
|
||||
|
||||
#define METEORCAPTUR _IOW('x', 1, int) /* capture a frame */
|
||||
#define METEORCAPFRM _IOW('x', 2, struct meteor_capframe) /* sync capture */
|
||||
#define METEORSETGEO _IOW('x', 3, struct meteor_geomet) /* set geometry */
|
||||
#define METEORGETGEO _IOR('x', 4, struct meteor_geomet) /* get geometry */
|
||||
#define METEORSTATUS _IOR('x', 5, unsigned short) /* get status */
|
||||
#define METEORSHUE _IOW('x', 6, signed char) /* set hue */
|
||||
#define METEORGHUE _IOR('x', 6, signed char) /* get hue */
|
||||
#define METEORSFMT _IOW('x', 7, unsigned long) /* set format */
|
||||
#define METEORGFMT _IOR('x', 7, unsigned long) /* get format */
|
||||
#define METEORSINPUT _IOW('x', 8, unsigned long) /* set input dev */
|
||||
#define METEORGINPUT _IOR('x', 8, unsigned long) /* get input dev */
|
||||
#define METEORSCHCV _IOW('x', 9, unsigned char) /* set uv gain */
|
||||
#define METEORGCHCV _IOR('x', 9, unsigned char) /* get uv gain */
|
||||
#define METEORSCOUNT _IOW('x',10, struct meteor_counts)
|
||||
#define METEORGCOUNT _IOR('x',10, struct meteor_counts)
|
||||
#define METEORSFPS _IOW('x',11, unsigned short) /* set fps */
|
||||
#define METEORGFPS _IOR('x',11, unsigned short) /* get fps */
|
||||
#define METEORSSIGNAL _IOW('x', 12, unsigned int) /* set signal */
|
||||
#define METEORGSIGNAL _IOR('x', 12, unsigned int) /* get signal */
|
||||
#define METEORSVIDEO _IOW('x', 13, struct meteor_video) /* set video */
|
||||
#define METEORGVIDEO _IOR('x', 13, struct meteor_video) /* get video */
|
||||
#define METEORSBRIG _IOW('x', 14, unsigned char) /* set brightness */
|
||||
#define METEORGBRIG _IOR('x', 14, unsigned char) /* get brightness */
|
||||
#define METEORSCSAT _IOW('x', 15, unsigned char) /* set chroma sat */
|
||||
#define METEORGCSAT _IOR('x', 15, unsigned char) /* get uv saturation */
|
||||
#define METEORSCONT _IOW('x', 16, unsigned char) /* set contrast */
|
||||
#define METEORGCONT _IOR('x', 16, unsigned char) /* get contrast */
|
||||
#define METEORSBT254 _IOW('x', 17, unsigned short) /* set Bt254 reg */
|
||||
#define METEORGBT254 _IOR('x', 17, unsigned short) /* get Bt254 reg */
|
||||
#define METEORSHWS _IOW('x', 18, unsigned char) /* set hor start reg */
|
||||
#define METEORGHWS _IOR('x', 18, unsigned char) /* get hor start reg */
|
||||
#define METEORSVWS _IOW('x', 19, unsigned char) /* set vert start reg */
|
||||
#define METEORGVWS _IOR('x', 19, unsigned char) /* get vert start reg */
|
||||
#define METEORSTS _IOW('x', 20, unsigned char) /* set time stamp */
|
||||
#define METEORGTS _IOR('x', 20, unsigned char) /* get time stamp */
|
||||
|
||||
#define METEOR_STATUS_ID_MASK 0xf000 /* ID of 7196 */
|
||||
#define METEOR_STATUS_DIR 0x0800 /* Direction of Expansion port YUV */
|
||||
#define METEOR_STATUS_OEF 0x0200 /* Field detected: Even/Odd */
|
||||
#define METEOR_STATUS_SVP 0x0100 /* State of VRAM Port:inactive/active */
|
||||
#define METEOR_STATUS_STTC 0x0080 /* Time Constant: TV/VCR */
|
||||
#define METEOR_STATUS_HCLK 0x0040 /* Horiz PLL: locked/unlocked */
|
||||
#define METEOR_STATUS_FIDT 0x0020 /* Field detect: 50/60hz */
|
||||
#define METEOR_STATUS_ALTD 0x0002 /* Line alt: no line alt/line alt */
|
||||
#define METEOR_STATUS_CODE 0x0001 /* Colour info: no colour/colour */
|
||||
|
||||
/* METEORCAPTUR capture options */
|
||||
#define METEOR_CAP_SINGLE 0x0001 /* capture one frame */
|
||||
#define METEOR_CAP_CONTINOUS 0x0002 /* continuously capture */
|
||||
#define METEOR_CAP_STOP_CONT 0x0004 /* stop the continuous capture */
|
||||
|
||||
/* METEORCAPFRM capture commands */
|
||||
#define METEOR_CAP_N_FRAMES 0x0001 /* capture N frames */
|
||||
#define METEOR_CAP_STOP_FRAMES 0x0002 /* stop capture N frames */
|
||||
#define METEOR_HALT_N_FRAMES 0x0003 /* halt of capture N frames */
|
||||
#define METEOR_CONT_N_FRAMES 0x0004 /* continue after above halt */
|
||||
|
||||
/* valid video input formats: */
|
||||
#define METEOR_FMT_NTSC 0x00100 /* NTSC -- initialized default */
|
||||
#define METEOR_FMT_PAL 0x00200 /* PAL */
|
||||
#define METEOR_FMT_SECAM 0x00400 /* SECAM */
|
||||
#define METEOR_FMT_AUTOMODE 0x00800 /* auto-mode */
|
||||
#define METEOR_INPUT_DEV0 0x01000 /* camera input 0 -- default */
|
||||
#define METEOR_INPUT_DEV_RCA METEOR_INPUT_DEV0
|
||||
#define METEOR_INPUT_DEV1 0x02000 /* camera input 1 */
|
||||
#define METEOR_INPUT_DEV2 0x04000 /* camera input 2 */
|
||||
#define METEOR_INPUT_DEV3 0x08000 /* camera input 3 */
|
||||
#define METEOR_INPUT_DEV_RGB 0x0a000 /* for rgb version of meteor */
|
||||
#define METEOR_INPUT_DEV_SVIDEO 0x06000 /* S-video input port */
|
||||
|
||||
/* valid video output formats: */
|
||||
#define METEOR_GEO_RGB16 0x0010000 /* packed -- initialized default */
|
||||
#define METEOR_GEO_RGB24 0x0020000 /* RBG 24 bits packed */
|
||||
/* internally stored in 32 bits */
|
||||
#define METEOR_GEO_YUV_PACKED 0x0040000 /* 4-2-2 YUV 16 bits packed */
|
||||
#define METEOR_GEO_YUV_PLANAR 0x0080000 /* 4-2-2 YUV 16 bits planer */
|
||||
#define METEOR_GEO_YUV_PLANER METEOR_GEO_YUV_PLANAR
|
||||
#define METEOR_GEO_UNSIGNED 0x0400000 /* unsigned uv outputs */
|
||||
#define METEOR_GEO_EVEN_ONLY 0x1000000 /* set for even only field capture */
|
||||
#define METEOR_GEO_ODD_ONLY 0x2000000 /* set for odd only field capture */
|
||||
#define METEOR_GEO_FIELD_MASK 0x3000000
|
||||
#define METEOR_GEO_YUV_422 0x4000000 /* 4-2-2 YUV in Y-U-V combined */
|
||||
#define METEOR_GEO_OUTPUT_MASK 0x40f0000
|
||||
#define METEOR_GEO_YUV_12 0x10000000 /* YUV 12 format */
|
||||
#define METEOR_GEO_YUV_9 0x40000000 /* YUV 9 format */
|
||||
|
||||
#define METEOR_FIELD_MODE 0x80000000 /* Field cap or Frame cap */
|
||||
|
||||
#define METEOR_SIG_MODE_MASK 0xffff0000
|
||||
#define METEOR_SIG_FRAME 0x00000000 /* signal every frame */
|
||||
#define METEOR_SIG_FIELD 0x00010000 /* signal every field */
|
||||
|
||||
/* following structure is used to coordinate the synchronous */
|
||||
|
||||
struct meteor_mem {
|
||||
/* kernel write only */
|
||||
int frame_size; /* row*columns*depth */
|
||||
unsigned num_bufs; /* number of frames in buffer (1-32) */
|
||||
/* user and kernel change these */
|
||||
int lowat; /* kernel starts capture if < this number */
|
||||
int hiwat; /* kernel stops capture if > this number.
|
||||
hiwat <= numbufs */
|
||||
unsigned active; /* bit mask of active frame buffers
|
||||
kernel sets, user clears */
|
||||
int num_active_bufs; /* count of active frame buffer
|
||||
kernel increments, user decrements */
|
||||
|
||||
/* reference to mmapped data */
|
||||
caddr_t buf; /* The real space (virtual addr) */
|
||||
} ;
|
||||
|
||||
#endif /* !_MACHINE_IOCTL_METEOR_H_ */
|
@ -1832,7 +1832,6 @@ hint.gusc.0.flags="0x13"
|
||||
#
|
||||
# scd: Sony CD-ROM using proprietary (non-ATAPI) interface
|
||||
# mcd: Mitsumi CD-ROM using proprietary (non-ATAPI) interface
|
||||
# meteor: Matrox Meteor video capture board
|
||||
# bktr: Brooktree bt848/848a/849a/878/879 video capture and TV Tuner board
|
||||
# cy: Cyclades serial driver
|
||||
# joy: joystick (including IO DATA PCJOY PC Card joystick)
|
||||
@ -1897,17 +1896,6 @@ hint.si.0.maddr="0xd0000"
|
||||
hint.si.0.irq="12"
|
||||
device nmdm
|
||||
|
||||
#
|
||||
# The `meteor' device is a PCI video capture board. It can also have the
|
||||
# following options:
|
||||
# options METEOR_ALLOC_PAGES=xxx preallocate kernel pages for data entry
|
||||
# figure (ROWS*COLUMN*BYTES_PER_PIXEL*FRAME+PAGE_SIZE-1)/PAGE_SIZE
|
||||
# options METEOR_DEALLOC_PAGES remove all allocated pages on close(2)
|
||||
# options METEOR_DEALLOC_ABOVE=xxx remove all allocated pages above the
|
||||
# specified amount. If this value is below the allocated amount no action
|
||||
# taken
|
||||
# options METEOR_SYSTEM_DEFAULT={METEOR_PAL|METEOR_NTSC|METEOR_SECAM}, used
|
||||
# for initialization of fps routine when a signal is not present.
|
||||
#
|
||||
# The 'bktr' device is a PCI video capture device using the Brooktree
|
||||
# bt848/bt848a/bt849a/bt878/bt879 chipset. When used with a TV Tuner it forms a
|
||||
@ -1954,8 +1942,6 @@ device nmdm
|
||||
# Should fix stereo autodetection if the old driver does only output
|
||||
# mono sound.
|
||||
|
||||
device meteor 1
|
||||
|
||||
#
|
||||
# options BKTR_USE_FREEBSD_SMBUS
|
||||
# Compile with FreeBSD SMBus implementation
|
||||
@ -2409,8 +2395,6 @@ options AAC_DEBUG
|
||||
##options BKTR_ALLOC_PAGES=(217*4+1)
|
||||
options BROOKTREE_ALLOC_PAGES=(217*4+1)
|
||||
options MAXFILES=999
|
||||
# METEOR_TEST_VIDEO has no effect since meteor is broken.
|
||||
options METEOR_TEST_VIDEO
|
||||
options NDEVFSINO=1025
|
||||
options NDEVFSOVERFLOW=32769
|
||||
|
||||
|
@ -1609,7 +1609,6 @@ pci/if_vr.c optional vr pci
|
||||
pci/if_wb.c optional wb pci
|
||||
pci/if_xl.c optional xl pci
|
||||
pci/intpm.c optional intpm pci
|
||||
pci/meteor.c count meteor pci nowerror
|
||||
pci/ncr.c optional ncr pci
|
||||
pci/viapm.c optional viapm pci
|
||||
pci/xrpu.c optional xrpu pci
|
||||
|
@ -74,7 +74,7 @@
|
||||
64 ?? Talisman
|
||||
65 *targ SCSI target sample driver
|
||||
66 labpc National Instruments LabPC
|
||||
67 *meteor Matrox Meteor video capture
|
||||
67 - was meteor Matrox Meteor video capture
|
||||
68 *si Specialix SI/XIO (peter@freebsd.org)
|
||||
69 *wcd ATAPI CDROM client of "wd"
|
||||
70 crypto Device-independent crypto interface (from openbsd)
|
||||
|
@ -529,13 +529,6 @@ BKTR_SIS_VIA_MODE opt_bktr.h
|
||||
BKTR_USE_FREEBSD_SMBUS opt_bktr.h
|
||||
BKTR_NEW_MSP34XX_DRIVER opt_bktr.h
|
||||
|
||||
# meteor opt_meteor.h
|
||||
METEOR_ALLOC_PAGES opt_meteor.h
|
||||
METEOR_TEST_VIDEO opt_meteor.h
|
||||
METEOR_SYSTEM_DEFAULT opt_meteor.h
|
||||
METEOR_DEALLOC_PAGES opt_meteor.h
|
||||
METEOR_DEALLOC_ABOVE opt_meteor.h
|
||||
|
||||
# options for serial support
|
||||
COM_ESP opt_sio.h
|
||||
COM_MULTIPORT opt_sio.h
|
||||
|
@ -1,187 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1995 Mark Tinguely and Jim Lowe
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Mark Tinguely and Jim Lowe
|
||||
* 4. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
/*
|
||||
* ioctl constants for Matrox Meteor Capture card.
|
||||
*/
|
||||
|
||||
#ifndef _MACHINE_IOCTL_METEOR_H_
|
||||
#define _MACHINE_IOCTL_METEOR_H_
|
||||
|
||||
#ifndef _KERNEL
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#include <sys/ioccom.h>
|
||||
|
||||
struct meteor_capframe {
|
||||
short command; /* see below for valid METEORCAPFRM commands */
|
||||
short lowat; /* start transfer if < this number */
|
||||
short hiwat; /* stop transfer if > this number */
|
||||
} ;
|
||||
|
||||
/* structure for METEOR[GS]ETGEO - get/set geometry */
|
||||
struct meteor_geomet {
|
||||
u_short rows;
|
||||
u_short columns;
|
||||
u_short frames;
|
||||
u_long oformat;
|
||||
} ;
|
||||
|
||||
/* structure for METEORGCOUNT-get count of frames, fifo errors and dma errors */
|
||||
struct meteor_counts {
|
||||
u_long fifo_errors; /* count of fifo errors since open */
|
||||
u_long dma_errors; /* count of dma errors since open */
|
||||
u_long frames_captured; /* count of frames captured since open */
|
||||
u_long even_fields_captured; /* count of even fields captured */
|
||||
u_long odd_fields_captured; /* count of odd fields captured */
|
||||
} ;
|
||||
|
||||
/* structure for getting and setting direct transfers to vram */
|
||||
struct meteor_video {
|
||||
u_long addr; /* Address of location to dma to */
|
||||
u_long width; /* Width of memory area */
|
||||
u_long banksize; /* Size of Vram bank */
|
||||
u_long ramsize; /* Size of Vram */
|
||||
};
|
||||
|
||||
#define METEORCAPTUR _IOW('x', 1, int) /* capture a frame */
|
||||
#define METEORCAPFRM _IOW('x', 2, struct meteor_capframe) /* sync capture */
|
||||
#define METEORSETGEO _IOW('x', 3, struct meteor_geomet) /* set geometry */
|
||||
#define METEORGETGEO _IOR('x', 4, struct meteor_geomet) /* get geometry */
|
||||
#define METEORSTATUS _IOR('x', 5, unsigned short) /* get status */
|
||||
#define METEORSHUE _IOW('x', 6, signed char) /* set hue */
|
||||
#define METEORGHUE _IOR('x', 6, signed char) /* get hue */
|
||||
#define METEORSFMT _IOW('x', 7, unsigned long) /* set format */
|
||||
#define METEORGFMT _IOR('x', 7, unsigned long) /* get format */
|
||||
#define METEORSINPUT _IOW('x', 8, unsigned long) /* set input dev */
|
||||
#define METEORGINPUT _IOR('x', 8, unsigned long) /* get input dev */
|
||||
#define METEORSCHCV _IOW('x', 9, unsigned char) /* set uv gain */
|
||||
#define METEORGCHCV _IOR('x', 9, unsigned char) /* get uv gain */
|
||||
#define METEORSCOUNT _IOW('x',10, struct meteor_counts)
|
||||
#define METEORGCOUNT _IOR('x',10, struct meteor_counts)
|
||||
#define METEORSFPS _IOW('x',11, unsigned short) /* set fps */
|
||||
#define METEORGFPS _IOR('x',11, unsigned short) /* get fps */
|
||||
#define METEORSSIGNAL _IOW('x', 12, unsigned int) /* set signal */
|
||||
#define METEORGSIGNAL _IOR('x', 12, unsigned int) /* get signal */
|
||||
#define METEORSVIDEO _IOW('x', 13, struct meteor_video) /* set video */
|
||||
#define METEORGVIDEO _IOR('x', 13, struct meteor_video) /* get video */
|
||||
#define METEORSBRIG _IOW('x', 14, unsigned char) /* set brightness */
|
||||
#define METEORGBRIG _IOR('x', 14, unsigned char) /* get brightness */
|
||||
#define METEORSCSAT _IOW('x', 15, unsigned char) /* set chroma sat */
|
||||
#define METEORGCSAT _IOR('x', 15, unsigned char) /* get uv saturation */
|
||||
#define METEORSCONT _IOW('x', 16, unsigned char) /* set contrast */
|
||||
#define METEORGCONT _IOR('x', 16, unsigned char) /* get contrast */
|
||||
#define METEORSBT254 _IOW('x', 17, unsigned short) /* set Bt254 reg */
|
||||
#define METEORGBT254 _IOR('x', 17, unsigned short) /* get Bt254 reg */
|
||||
#define METEORSHWS _IOW('x', 18, unsigned char) /* set hor start reg */
|
||||
#define METEORGHWS _IOR('x', 18, unsigned char) /* get hor start reg */
|
||||
#define METEORSVWS _IOW('x', 19, unsigned char) /* set vert start reg */
|
||||
#define METEORGVWS _IOR('x', 19, unsigned char) /* get vert start reg */
|
||||
#define METEORSTS _IOW('x', 20, unsigned char) /* set time stamp */
|
||||
#define METEORGTS _IOR('x', 20, unsigned char) /* get time stamp */
|
||||
|
||||
#define METEOR_STATUS_ID_MASK 0xf000 /* ID of 7196 */
|
||||
#define METEOR_STATUS_DIR 0x0800 /* Direction of Expansion port YUV */
|
||||
#define METEOR_STATUS_OEF 0x0200 /* Field detected: Even/Odd */
|
||||
#define METEOR_STATUS_SVP 0x0100 /* State of VRAM Port:inactive/active */
|
||||
#define METEOR_STATUS_STTC 0x0080 /* Time Constant: TV/VCR */
|
||||
#define METEOR_STATUS_HCLK 0x0040 /* Horiz PLL: locked/unlocked */
|
||||
#define METEOR_STATUS_FIDT 0x0020 /* Field detect: 50/60hz */
|
||||
#define METEOR_STATUS_ALTD 0x0002 /* Line alt: no line alt/line alt */
|
||||
#define METEOR_STATUS_CODE 0x0001 /* Colour info: no colour/colour */
|
||||
|
||||
/* METEORCAPTUR capture options */
|
||||
#define METEOR_CAP_SINGLE 0x0001 /* capture one frame */
|
||||
#define METEOR_CAP_CONTINOUS 0x0002 /* continuously capture */
|
||||
#define METEOR_CAP_STOP_CONT 0x0004 /* stop the continuous capture */
|
||||
|
||||
/* METEORCAPFRM capture commands */
|
||||
#define METEOR_CAP_N_FRAMES 0x0001 /* capture N frames */
|
||||
#define METEOR_CAP_STOP_FRAMES 0x0002 /* stop capture N frames */
|
||||
#define METEOR_HALT_N_FRAMES 0x0003 /* halt of capture N frames */
|
||||
#define METEOR_CONT_N_FRAMES 0x0004 /* continue after above halt */
|
||||
|
||||
/* valid video input formats: */
|
||||
#define METEOR_FMT_NTSC 0x00100 /* NTSC -- initialized default */
|
||||
#define METEOR_FMT_PAL 0x00200 /* PAL */
|
||||
#define METEOR_FMT_SECAM 0x00400 /* SECAM */
|
||||
#define METEOR_FMT_AUTOMODE 0x00800 /* auto-mode */
|
||||
#define METEOR_INPUT_DEV0 0x01000 /* camera input 0 -- default */
|
||||
#define METEOR_INPUT_DEV_RCA METEOR_INPUT_DEV0
|
||||
#define METEOR_INPUT_DEV1 0x02000 /* camera input 1 */
|
||||
#define METEOR_INPUT_DEV2 0x04000 /* camera input 2 */
|
||||
#define METEOR_INPUT_DEV3 0x08000 /* camera input 3 */
|
||||
#define METEOR_INPUT_DEV_RGB 0x0a000 /* for rgb version of meteor */
|
||||
#define METEOR_INPUT_DEV_SVIDEO 0x06000 /* S-video input port */
|
||||
|
||||
/* valid video output formats: */
|
||||
#define METEOR_GEO_RGB16 0x0010000 /* packed -- initialized default */
|
||||
#define METEOR_GEO_RGB24 0x0020000 /* RBG 24 bits packed */
|
||||
/* internally stored in 32 bits */
|
||||
#define METEOR_GEO_YUV_PACKED 0x0040000 /* 4-2-2 YUV 16 bits packed */
|
||||
#define METEOR_GEO_YUV_PLANAR 0x0080000 /* 4-2-2 YUV 16 bits planer */
|
||||
#define METEOR_GEO_YUV_PLANER METEOR_GEO_YUV_PLANAR
|
||||
#define METEOR_GEO_UNSIGNED 0x0400000 /* unsigned uv outputs */
|
||||
#define METEOR_GEO_EVEN_ONLY 0x1000000 /* set for even only field capture */
|
||||
#define METEOR_GEO_ODD_ONLY 0x2000000 /* set for odd only field capture */
|
||||
#define METEOR_GEO_FIELD_MASK 0x3000000
|
||||
#define METEOR_GEO_YUV_422 0x4000000 /* 4-2-2 YUV in Y-U-V combined */
|
||||
#define METEOR_GEO_OUTPUT_MASK 0x40f0000
|
||||
#define METEOR_GEO_YUV_12 0x10000000 /* YUV 12 format */
|
||||
#define METEOR_GEO_YUV_9 0x40000000 /* YUV 9 format */
|
||||
|
||||
#define METEOR_FIELD_MODE 0x80000000 /* Field cap or Frame cap */
|
||||
|
||||
#define METEOR_SIG_MODE_MASK 0xffff0000
|
||||
#define METEOR_SIG_FRAME 0x00000000 /* signal every frame */
|
||||
#define METEOR_SIG_FIELD 0x00010000 /* signal every field */
|
||||
|
||||
/* following structure is used to coordinate the synchronous */
|
||||
|
||||
struct meteor_mem {
|
||||
/* kernel write only */
|
||||
int frame_size; /* row*columns*depth */
|
||||
unsigned num_bufs; /* number of frames in buffer (1-32) */
|
||||
/* user and kernel change these */
|
||||
int lowat; /* kernel starts capture if < this number */
|
||||
int hiwat; /* kernel stops capture if > this number.
|
||||
hiwat <= numbufs */
|
||||
unsigned active; /* bit mask of active frame buffers
|
||||
kernel sets, user clears */
|
||||
int num_active_bufs; /* count of active frame buffer
|
||||
kernel increments, user decrements */
|
||||
|
||||
/* reference to mmapped data */
|
||||
caddr_t buf; /* The real space (virtual addr) */
|
||||
} ;
|
||||
|
||||
#endif /* !_MACHINE_IOCTL_METEOR_H_ */
|
@ -1,187 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1995 Mark Tinguely and Jim Lowe
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Mark Tinguely and Jim Lowe
|
||||
* 4. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
/*
|
||||
* ioctl constants for Matrox Meteor Capture card.
|
||||
*/
|
||||
|
||||
#ifndef _MACHINE_IOCTL_METEOR_H_
|
||||
#define _MACHINE_IOCTL_METEOR_H_
|
||||
|
||||
#ifndef _KERNEL
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#include <sys/ioccom.h>
|
||||
|
||||
struct meteor_capframe {
|
||||
short command; /* see below for valid METEORCAPFRM commands */
|
||||
short lowat; /* start transfer if < this number */
|
||||
short hiwat; /* stop transfer if > this number */
|
||||
} ;
|
||||
|
||||
/* structure for METEOR[GS]ETGEO - get/set geometry */
|
||||
struct meteor_geomet {
|
||||
u_short rows;
|
||||
u_short columns;
|
||||
u_short frames;
|
||||
u_long oformat;
|
||||
} ;
|
||||
|
||||
/* structure for METEORGCOUNT-get count of frames, fifo errors and dma errors */
|
||||
struct meteor_counts {
|
||||
u_long fifo_errors; /* count of fifo errors since open */
|
||||
u_long dma_errors; /* count of dma errors since open */
|
||||
u_long frames_captured; /* count of frames captured since open */
|
||||
u_long even_fields_captured; /* count of even fields captured */
|
||||
u_long odd_fields_captured; /* count of odd fields captured */
|
||||
} ;
|
||||
|
||||
/* structure for getting and setting direct transfers to vram */
|
||||
struct meteor_video {
|
||||
u_long addr; /* Address of location to dma to */
|
||||
u_long width; /* Width of memory area */
|
||||
u_long banksize; /* Size of Vram bank */
|
||||
u_long ramsize; /* Size of Vram */
|
||||
};
|
||||
|
||||
#define METEORCAPTUR _IOW('x', 1, int) /* capture a frame */
|
||||
#define METEORCAPFRM _IOW('x', 2, struct meteor_capframe) /* sync capture */
|
||||
#define METEORSETGEO _IOW('x', 3, struct meteor_geomet) /* set geometry */
|
||||
#define METEORGETGEO _IOR('x', 4, struct meteor_geomet) /* get geometry */
|
||||
#define METEORSTATUS _IOR('x', 5, unsigned short) /* get status */
|
||||
#define METEORSHUE _IOW('x', 6, signed char) /* set hue */
|
||||
#define METEORGHUE _IOR('x', 6, signed char) /* get hue */
|
||||
#define METEORSFMT _IOW('x', 7, unsigned long) /* set format */
|
||||
#define METEORGFMT _IOR('x', 7, unsigned long) /* get format */
|
||||
#define METEORSINPUT _IOW('x', 8, unsigned long) /* set input dev */
|
||||
#define METEORGINPUT _IOR('x', 8, unsigned long) /* get input dev */
|
||||
#define METEORSCHCV _IOW('x', 9, unsigned char) /* set uv gain */
|
||||
#define METEORGCHCV _IOR('x', 9, unsigned char) /* get uv gain */
|
||||
#define METEORSCOUNT _IOW('x',10, struct meteor_counts)
|
||||
#define METEORGCOUNT _IOR('x',10, struct meteor_counts)
|
||||
#define METEORSFPS _IOW('x',11, unsigned short) /* set fps */
|
||||
#define METEORGFPS _IOR('x',11, unsigned short) /* get fps */
|
||||
#define METEORSSIGNAL _IOW('x', 12, unsigned int) /* set signal */
|
||||
#define METEORGSIGNAL _IOR('x', 12, unsigned int) /* get signal */
|
||||
#define METEORSVIDEO _IOW('x', 13, struct meteor_video) /* set video */
|
||||
#define METEORGVIDEO _IOR('x', 13, struct meteor_video) /* get video */
|
||||
#define METEORSBRIG _IOW('x', 14, unsigned char) /* set brightness */
|
||||
#define METEORGBRIG _IOR('x', 14, unsigned char) /* get brightness */
|
||||
#define METEORSCSAT _IOW('x', 15, unsigned char) /* set chroma sat */
|
||||
#define METEORGCSAT _IOR('x', 15, unsigned char) /* get uv saturation */
|
||||
#define METEORSCONT _IOW('x', 16, unsigned char) /* set contrast */
|
||||
#define METEORGCONT _IOR('x', 16, unsigned char) /* get contrast */
|
||||
#define METEORSBT254 _IOW('x', 17, unsigned short) /* set Bt254 reg */
|
||||
#define METEORGBT254 _IOR('x', 17, unsigned short) /* get Bt254 reg */
|
||||
#define METEORSHWS _IOW('x', 18, unsigned char) /* set hor start reg */
|
||||
#define METEORGHWS _IOR('x', 18, unsigned char) /* get hor start reg */
|
||||
#define METEORSVWS _IOW('x', 19, unsigned char) /* set vert start reg */
|
||||
#define METEORGVWS _IOR('x', 19, unsigned char) /* get vert start reg */
|
||||
#define METEORSTS _IOW('x', 20, unsigned char) /* set time stamp */
|
||||
#define METEORGTS _IOR('x', 20, unsigned char) /* get time stamp */
|
||||
|
||||
#define METEOR_STATUS_ID_MASK 0xf000 /* ID of 7196 */
|
||||
#define METEOR_STATUS_DIR 0x0800 /* Direction of Expansion port YUV */
|
||||
#define METEOR_STATUS_OEF 0x0200 /* Field detected: Even/Odd */
|
||||
#define METEOR_STATUS_SVP 0x0100 /* State of VRAM Port:inactive/active */
|
||||
#define METEOR_STATUS_STTC 0x0080 /* Time Constant: TV/VCR */
|
||||
#define METEOR_STATUS_HCLK 0x0040 /* Horiz PLL: locked/unlocked */
|
||||
#define METEOR_STATUS_FIDT 0x0020 /* Field detect: 50/60hz */
|
||||
#define METEOR_STATUS_ALTD 0x0002 /* Line alt: no line alt/line alt */
|
||||
#define METEOR_STATUS_CODE 0x0001 /* Colour info: no colour/colour */
|
||||
|
||||
/* METEORCAPTUR capture options */
|
||||
#define METEOR_CAP_SINGLE 0x0001 /* capture one frame */
|
||||
#define METEOR_CAP_CONTINOUS 0x0002 /* continuously capture */
|
||||
#define METEOR_CAP_STOP_CONT 0x0004 /* stop the continuous capture */
|
||||
|
||||
/* METEORCAPFRM capture commands */
|
||||
#define METEOR_CAP_N_FRAMES 0x0001 /* capture N frames */
|
||||
#define METEOR_CAP_STOP_FRAMES 0x0002 /* stop capture N frames */
|
||||
#define METEOR_HALT_N_FRAMES 0x0003 /* halt of capture N frames */
|
||||
#define METEOR_CONT_N_FRAMES 0x0004 /* continue after above halt */
|
||||
|
||||
/* valid video input formats: */
|
||||
#define METEOR_FMT_NTSC 0x00100 /* NTSC -- initialized default */
|
||||
#define METEOR_FMT_PAL 0x00200 /* PAL */
|
||||
#define METEOR_FMT_SECAM 0x00400 /* SECAM */
|
||||
#define METEOR_FMT_AUTOMODE 0x00800 /* auto-mode */
|
||||
#define METEOR_INPUT_DEV0 0x01000 /* camera input 0 -- default */
|
||||
#define METEOR_INPUT_DEV_RCA METEOR_INPUT_DEV0
|
||||
#define METEOR_INPUT_DEV1 0x02000 /* camera input 1 */
|
||||
#define METEOR_INPUT_DEV2 0x04000 /* camera input 2 */
|
||||
#define METEOR_INPUT_DEV3 0x08000 /* camera input 3 */
|
||||
#define METEOR_INPUT_DEV_RGB 0x0a000 /* for rgb version of meteor */
|
||||
#define METEOR_INPUT_DEV_SVIDEO 0x06000 /* S-video input port */
|
||||
|
||||
/* valid video output formats: */
|
||||
#define METEOR_GEO_RGB16 0x0010000 /* packed -- initialized default */
|
||||
#define METEOR_GEO_RGB24 0x0020000 /* RBG 24 bits packed */
|
||||
/* internally stored in 32 bits */
|
||||
#define METEOR_GEO_YUV_PACKED 0x0040000 /* 4-2-2 YUV 16 bits packed */
|
||||
#define METEOR_GEO_YUV_PLANAR 0x0080000 /* 4-2-2 YUV 16 bits planer */
|
||||
#define METEOR_GEO_YUV_PLANER METEOR_GEO_YUV_PLANAR
|
||||
#define METEOR_GEO_UNSIGNED 0x0400000 /* unsigned uv outputs */
|
||||
#define METEOR_GEO_EVEN_ONLY 0x1000000 /* set for even only field capture */
|
||||
#define METEOR_GEO_ODD_ONLY 0x2000000 /* set for odd only field capture */
|
||||
#define METEOR_GEO_FIELD_MASK 0x3000000
|
||||
#define METEOR_GEO_YUV_422 0x4000000 /* 4-2-2 YUV in Y-U-V combined */
|
||||
#define METEOR_GEO_OUTPUT_MASK 0x40f0000
|
||||
#define METEOR_GEO_YUV_12 0x10000000 /* YUV 12 format */
|
||||
#define METEOR_GEO_YUV_9 0x40000000 /* YUV 9 format */
|
||||
|
||||
#define METEOR_FIELD_MODE 0x80000000 /* Field cap or Frame cap */
|
||||
|
||||
#define METEOR_SIG_MODE_MASK 0xffff0000
|
||||
#define METEOR_SIG_FRAME 0x00000000 /* signal every frame */
|
||||
#define METEOR_SIG_FIELD 0x00010000 /* signal every field */
|
||||
|
||||
/* following structure is used to coordinate the synchronous */
|
||||
|
||||
struct meteor_mem {
|
||||
/* kernel write only */
|
||||
int frame_size; /* row*columns*depth */
|
||||
unsigned num_bufs; /* number of frames in buffer (1-32) */
|
||||
/* user and kernel change these */
|
||||
int lowat; /* kernel starts capture if < this number */
|
||||
int hiwat; /* kernel stops capture if > this number.
|
||||
hiwat <= numbufs */
|
||||
unsigned active; /* bit mask of active frame buffers
|
||||
kernel sets, user clears */
|
||||
int num_active_bufs; /* count of active frame buffer
|
||||
kernel increments, user decrements */
|
||||
|
||||
/* reference to mmapped data */
|
||||
caddr_t buf; /* The real space (virtual addr) */
|
||||
} ;
|
||||
|
||||
#endif /* !_MACHINE_IOCTL_METEOR_H_ */
|
@ -1,187 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1995 Mark Tinguely and Jim Lowe
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Mark Tinguely and Jim Lowe
|
||||
* 4. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
/*
|
||||
* ioctl constants for Matrox Meteor Capture card.
|
||||
*/
|
||||
|
||||
#ifndef _MACHINE_IOCTL_METEOR_H_
|
||||
#define _MACHINE_IOCTL_METEOR_H_
|
||||
|
||||
#ifndef _KERNEL
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#include <sys/ioccom.h>
|
||||
|
||||
struct meteor_capframe {
|
||||
short command; /* see below for valid METEORCAPFRM commands */
|
||||
short lowat; /* start transfer if < this number */
|
||||
short hiwat; /* stop transfer if > this number */
|
||||
} ;
|
||||
|
||||
/* structure for METEOR[GS]ETGEO - get/set geometry */
|
||||
struct meteor_geomet {
|
||||
u_short rows;
|
||||
u_short columns;
|
||||
u_short frames;
|
||||
u_long oformat;
|
||||
} ;
|
||||
|
||||
/* structure for METEORGCOUNT-get count of frames, fifo errors and dma errors */
|
||||
struct meteor_counts {
|
||||
u_long fifo_errors; /* count of fifo errors since open */
|
||||
u_long dma_errors; /* count of dma errors since open */
|
||||
u_long frames_captured; /* count of frames captured since open */
|
||||
u_long even_fields_captured; /* count of even fields captured */
|
||||
u_long odd_fields_captured; /* count of odd fields captured */
|
||||
} ;
|
||||
|
||||
/* structure for getting and setting direct transfers to vram */
|
||||
struct meteor_video {
|
||||
u_long addr; /* Address of location to dma to */
|
||||
u_long width; /* Width of memory area */
|
||||
u_long banksize; /* Size of Vram bank */
|
||||
u_long ramsize; /* Size of Vram */
|
||||
};
|
||||
|
||||
#define METEORCAPTUR _IOW('x', 1, int) /* capture a frame */
|
||||
#define METEORCAPFRM _IOW('x', 2, struct meteor_capframe) /* sync capture */
|
||||
#define METEORSETGEO _IOW('x', 3, struct meteor_geomet) /* set geometry */
|
||||
#define METEORGETGEO _IOR('x', 4, struct meteor_geomet) /* get geometry */
|
||||
#define METEORSTATUS _IOR('x', 5, unsigned short) /* get status */
|
||||
#define METEORSHUE _IOW('x', 6, signed char) /* set hue */
|
||||
#define METEORGHUE _IOR('x', 6, signed char) /* get hue */
|
||||
#define METEORSFMT _IOW('x', 7, unsigned long) /* set format */
|
||||
#define METEORGFMT _IOR('x', 7, unsigned long) /* get format */
|
||||
#define METEORSINPUT _IOW('x', 8, unsigned long) /* set input dev */
|
||||
#define METEORGINPUT _IOR('x', 8, unsigned long) /* get input dev */
|
||||
#define METEORSCHCV _IOW('x', 9, unsigned char) /* set uv gain */
|
||||
#define METEORGCHCV _IOR('x', 9, unsigned char) /* get uv gain */
|
||||
#define METEORSCOUNT _IOW('x',10, struct meteor_counts)
|
||||
#define METEORGCOUNT _IOR('x',10, struct meteor_counts)
|
||||
#define METEORSFPS _IOW('x',11, unsigned short) /* set fps */
|
||||
#define METEORGFPS _IOR('x',11, unsigned short) /* get fps */
|
||||
#define METEORSSIGNAL _IOW('x', 12, unsigned int) /* set signal */
|
||||
#define METEORGSIGNAL _IOR('x', 12, unsigned int) /* get signal */
|
||||
#define METEORSVIDEO _IOW('x', 13, struct meteor_video) /* set video */
|
||||
#define METEORGVIDEO _IOR('x', 13, struct meteor_video) /* get video */
|
||||
#define METEORSBRIG _IOW('x', 14, unsigned char) /* set brightness */
|
||||
#define METEORGBRIG _IOR('x', 14, unsigned char) /* get brightness */
|
||||
#define METEORSCSAT _IOW('x', 15, unsigned char) /* set chroma sat */
|
||||
#define METEORGCSAT _IOR('x', 15, unsigned char) /* get uv saturation */
|
||||
#define METEORSCONT _IOW('x', 16, unsigned char) /* set contrast */
|
||||
#define METEORGCONT _IOR('x', 16, unsigned char) /* get contrast */
|
||||
#define METEORSBT254 _IOW('x', 17, unsigned short) /* set Bt254 reg */
|
||||
#define METEORGBT254 _IOR('x', 17, unsigned short) /* get Bt254 reg */
|
||||
#define METEORSHWS _IOW('x', 18, unsigned char) /* set hor start reg */
|
||||
#define METEORGHWS _IOR('x', 18, unsigned char) /* get hor start reg */
|
||||
#define METEORSVWS _IOW('x', 19, unsigned char) /* set vert start reg */
|
||||
#define METEORGVWS _IOR('x', 19, unsigned char) /* get vert start reg */
|
||||
#define METEORSTS _IOW('x', 20, unsigned char) /* set time stamp */
|
||||
#define METEORGTS _IOR('x', 20, unsigned char) /* get time stamp */
|
||||
|
||||
#define METEOR_STATUS_ID_MASK 0xf000 /* ID of 7196 */
|
||||
#define METEOR_STATUS_DIR 0x0800 /* Direction of Expansion port YUV */
|
||||
#define METEOR_STATUS_OEF 0x0200 /* Field detected: Even/Odd */
|
||||
#define METEOR_STATUS_SVP 0x0100 /* State of VRAM Port:inactive/active */
|
||||
#define METEOR_STATUS_STTC 0x0080 /* Time Constant: TV/VCR */
|
||||
#define METEOR_STATUS_HCLK 0x0040 /* Horiz PLL: locked/unlocked */
|
||||
#define METEOR_STATUS_FIDT 0x0020 /* Field detect: 50/60hz */
|
||||
#define METEOR_STATUS_ALTD 0x0002 /* Line alt: no line alt/line alt */
|
||||
#define METEOR_STATUS_CODE 0x0001 /* Colour info: no colour/colour */
|
||||
|
||||
/* METEORCAPTUR capture options */
|
||||
#define METEOR_CAP_SINGLE 0x0001 /* capture one frame */
|
||||
#define METEOR_CAP_CONTINOUS 0x0002 /* continuously capture */
|
||||
#define METEOR_CAP_STOP_CONT 0x0004 /* stop the continuous capture */
|
||||
|
||||
/* METEORCAPFRM capture commands */
|
||||
#define METEOR_CAP_N_FRAMES 0x0001 /* capture N frames */
|
||||
#define METEOR_CAP_STOP_FRAMES 0x0002 /* stop capture N frames */
|
||||
#define METEOR_HALT_N_FRAMES 0x0003 /* halt of capture N frames */
|
||||
#define METEOR_CONT_N_FRAMES 0x0004 /* continue after above halt */
|
||||
|
||||
/* valid video input formats: */
|
||||
#define METEOR_FMT_NTSC 0x00100 /* NTSC -- initialized default */
|
||||
#define METEOR_FMT_PAL 0x00200 /* PAL */
|
||||
#define METEOR_FMT_SECAM 0x00400 /* SECAM */
|
||||
#define METEOR_FMT_AUTOMODE 0x00800 /* auto-mode */
|
||||
#define METEOR_INPUT_DEV0 0x01000 /* camera input 0 -- default */
|
||||
#define METEOR_INPUT_DEV_RCA METEOR_INPUT_DEV0
|
||||
#define METEOR_INPUT_DEV1 0x02000 /* camera input 1 */
|
||||
#define METEOR_INPUT_DEV2 0x04000 /* camera input 2 */
|
||||
#define METEOR_INPUT_DEV3 0x08000 /* camera input 3 */
|
||||
#define METEOR_INPUT_DEV_RGB 0x0a000 /* for rgb version of meteor */
|
||||
#define METEOR_INPUT_DEV_SVIDEO 0x06000 /* S-video input port */
|
||||
|
||||
/* valid video output formats: */
|
||||
#define METEOR_GEO_RGB16 0x0010000 /* packed -- initialized default */
|
||||
#define METEOR_GEO_RGB24 0x0020000 /* RBG 24 bits packed */
|
||||
/* internally stored in 32 bits */
|
||||
#define METEOR_GEO_YUV_PACKED 0x0040000 /* 4-2-2 YUV 16 bits packed */
|
||||
#define METEOR_GEO_YUV_PLANAR 0x0080000 /* 4-2-2 YUV 16 bits planer */
|
||||
#define METEOR_GEO_YUV_PLANER METEOR_GEO_YUV_PLANAR
|
||||
#define METEOR_GEO_UNSIGNED 0x0400000 /* unsigned uv outputs */
|
||||
#define METEOR_GEO_EVEN_ONLY 0x1000000 /* set for even only field capture */
|
||||
#define METEOR_GEO_ODD_ONLY 0x2000000 /* set for odd only field capture */
|
||||
#define METEOR_GEO_FIELD_MASK 0x3000000
|
||||
#define METEOR_GEO_YUV_422 0x4000000 /* 4-2-2 YUV in Y-U-V combined */
|
||||
#define METEOR_GEO_OUTPUT_MASK 0x40f0000
|
||||
#define METEOR_GEO_YUV_12 0x10000000 /* YUV 12 format */
|
||||
#define METEOR_GEO_YUV_9 0x40000000 /* YUV 9 format */
|
||||
|
||||
#define METEOR_FIELD_MODE 0x80000000 /* Field cap or Frame cap */
|
||||
|
||||
#define METEOR_SIG_MODE_MASK 0xffff0000
|
||||
#define METEOR_SIG_FRAME 0x00000000 /* signal every frame */
|
||||
#define METEOR_SIG_FIELD 0x00010000 /* signal every field */
|
||||
|
||||
/* following structure is used to coordinate the synchronous */
|
||||
|
||||
struct meteor_mem {
|
||||
/* kernel write only */
|
||||
int frame_size; /* row*columns*depth */
|
||||
unsigned num_bufs; /* number of frames in buffer (1-32) */
|
||||
/* user and kernel change these */
|
||||
int lowat; /* kernel starts capture if < this number */
|
||||
int hiwat; /* kernel stops capture if > this number.
|
||||
hiwat <= numbufs */
|
||||
unsigned active; /* bit mask of active frame buffers
|
||||
kernel sets, user clears */
|
||||
int num_active_bufs; /* count of active frame buffer
|
||||
kernel increments, user decrements */
|
||||
|
||||
/* reference to mmapped data */
|
||||
caddr_t buf; /* The real space (virtual addr) */
|
||||
} ;
|
||||
|
||||
#endif /* !_MACHINE_IOCTL_METEOR_H_ */
|
2129
sys/pci/meteor.c
2129
sys/pci/meteor.c
File diff suppressed because it is too large
Load Diff
@ -1,246 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1995 Mark Tinguely and Jim Lowe
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Mark Tinguely and Jim Lowe
|
||||
* 4. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
#ifndef PCI_LATENCY_TIMER
|
||||
#define PCI_LATENCY_TIMER 0x0c /* pci timer register */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Definitions for the Philips SAA7116 digital video to pci interface.
|
||||
*/
|
||||
#define SAA7116_PHILIPS_ID 0x12238086ul
|
||||
#define SAA7116_I2C_WRITE 0x00
|
||||
#define SAA7116_I2C_READ 0x01
|
||||
#define SAA7116_IIC_NEW_CYCLE 0x1000000L
|
||||
#define SAA7116_IIC_DIRECT_TRANSFER_ABORTED 0x0000200L
|
||||
|
||||
typedef volatile u_int mreg_t;
|
||||
struct saa7116_regs {
|
||||
mreg_t dma1e; /* Base address for even field dma chn 1 */
|
||||
mreg_t dma2e; /* Base address for even field dma chn 2 */
|
||||
mreg_t dma3e; /* Base address for even field dma chn 3 */
|
||||
mreg_t dma1o; /* Base address for odd field dma chn 1 */
|
||||
mreg_t dma2o; /* Base address for odd field dma chn 2 */
|
||||
mreg_t dma3o; /* Base address for odd field dma chn 3 */
|
||||
mreg_t stride1e; /* Address stride for even field dma chn 1 */
|
||||
mreg_t stride2e; /* Address stride for even field dma chn 2 */
|
||||
mreg_t stride3e; /* Address stride for even field dma chn 3 */
|
||||
mreg_t stride1o; /* Address stride for odd field dma chn 1 */
|
||||
mreg_t stride2o; /* Address stride for odd field dma chn 2 */
|
||||
mreg_t stride3o; /* Address stride for odd field dma chn 3 */
|
||||
mreg_t routee; /* Route/mode even */
|
||||
mreg_t routeo; /* Route/mode odd */
|
||||
mreg_t fifo_t; /* FIFO trigger for PCI int */
|
||||
mreg_t field_t; /* Field toggle */
|
||||
mreg_t cap_cntl; /* Capture control */
|
||||
mreg_t retry_wait_cnt; /* Clks for master to wait after disconnect */
|
||||
mreg_t irq_stat; /* IRQ mask and status reg */
|
||||
mreg_t fme; /* Field Mask even */
|
||||
mreg_t fmo; /* Field mask odd */
|
||||
mreg_t fml; /* Field mask length */
|
||||
mreg_t fifo_t_err; /* FIFO almost empty/almost full ptrs */
|
||||
mreg_t i2c_phase; /* i2c phase register */
|
||||
mreg_t i2c_read; /* i2c read register */
|
||||
mreg_t i2c_write; /* i2c write register */
|
||||
mreg_t i2c_auto_a_e; /* i2c auto register a, even */
|
||||
mreg_t i2c_auto_b_e; /* i2c auto register b, even */
|
||||
mreg_t i2c_auto_c_e; /* i2c auto register c, even */
|
||||
mreg_t i2c_auto_d_e; /* i2c auto register d, even */
|
||||
mreg_t i2c_auto_a_o; /* i2c auto register a, odd */
|
||||
mreg_t i2c_auto_b_o; /* i2c auto register b, odd */
|
||||
mreg_t i2c_auto_c_o; /* i2c auto register c, odd */
|
||||
mreg_t i2c_auto_d_o; /* i2c auto register d, odd */
|
||||
mreg_t i2c_auto_enable;/* enable above auto registers */
|
||||
mreg_t dma_end_e; /* DMA end even (range) */
|
||||
mreg_t dma_end_o; /* DMA end odd (range) */
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Definitions for the Philips SAA7196 digital video decoder,
|
||||
* scalar, and clock generator circuit (DESCpro).
|
||||
*/
|
||||
#define NUM_SAA7196_I2C_REGS 49
|
||||
#define SAA7196_I2C_ADDR 0x40
|
||||
#define SAA7196_WRITE(mtr, reg, data) \
|
||||
i2c_write(mtr, SAA7196_I2C_ADDR, SAA7116_I2C_WRITE, reg, data), \
|
||||
mtr->saa7196_i2c[reg] = data
|
||||
#define SAA7196_REG(mtr, reg) mtr->saa7196_i2c[reg]
|
||||
#define SAA7196_READ(mtr) \
|
||||
i2c_write(mtr, SAA7196_I2C_ADDR, SAA7116_I2C_READ, 0x0, 0x0)
|
||||
|
||||
#define SAA7196_IDEL 0x00 /* Increment delay */
|
||||
#define SAA7196_HSB5 0x01 /* H-sync begin; 50 hz */
|
||||
#define SAA7196_HSS5 0x02 /* H-sync stop; 50 hz */
|
||||
#define SAA7196_HCB5 0x03 /* H-clamp begin; 50 hz */
|
||||
#define SAA7196_HCS5 0x04 /* H-clamp stop; 50 hz */
|
||||
#define SAA7196_HSP5 0x05 /* H-sync after PHI1; 50 hz */
|
||||
#define SAA7196_LUMC 0x06 /* Luminance control */
|
||||
#define SAA7196_HUEC 0x07 /* Hue control */
|
||||
#define SAA7196_CKTQ 0x08 /* Colour Killer Threshold QAM (PAL, NTSC) */
|
||||
#define SAA7196_CKTS 0x09 /* Colour Killer Threshold SECAM */
|
||||
#define SAA7196_PALS 0x0a /* PAL switch sensitivity */
|
||||
#define SAA7196_SECAMS 0x0b /* SECAM switch sensitivity */
|
||||
#define SAA7196_CGAINC 0x0c /* Chroma gain control */
|
||||
#define SAA7196_STDC 0x0d /* Standard/Mode control */
|
||||
#define SAA7196_IOCC 0x0e /* I/O and Clock Control */
|
||||
#define SAA7196_CTRL1 0x0f /* Control #1 */
|
||||
#define SAA7196_CTRL2 0x10 /* Control #2 */
|
||||
#define SAA7196_CGAINR 0x11 /* Chroma Gain Reference */
|
||||
#define SAA7196_CSAT 0x12 /* Chroma Saturation */
|
||||
#define SAA7196_CONT 0x13 /* Luminance Contrast */
|
||||
#define SAA7196_HSB6 0x14 /* H-sync begin; 60 hz */
|
||||
#define SAA7196_HSS6 0x15 /* H-sync stop; 60 hz */
|
||||
#define SAA7196_HCB6 0x16 /* H-clamp begin; 60 hz */
|
||||
#define SAA7196_HCS6 0x17 /* H-clamp stop; 60 hz */
|
||||
#define SAA7196_HSP6 0x18 /* H-sync after PHI1; 60 hz */
|
||||
#define SAA7196_BRIG 0x19 /* Luminance Brightness */
|
||||
#define SAA7196_FMTS 0x20 /* Formats and sequence */
|
||||
#define SAA7196_OUTPIX 0x21 /* Output data pixel/line */
|
||||
#define SAA7196_INPIX 0x22 /* Input data pixel/line */
|
||||
#define SAA7196_HWS 0x23 /* Horiz. window start */
|
||||
#define SAA7196_HFILT 0x24 /* Horiz. filter */
|
||||
#define SAA7196_OUTLINE 0x25 /* Output data lines/field */
|
||||
#define SAA7196_INLINE 0x26 /* Input data lines/field */
|
||||
#define SAA7196_VWS 0x27 /* Vertical window start */
|
||||
#define SAA7196_VYP 0x28 /* AFS/vertical Y processing */
|
||||
#define SAA7196_VBS 0x29 /* Vertical Bypass start */
|
||||
#define SAA7196_VBCNT 0x2a /* Vertical Bypass count */
|
||||
#define SAA7196_VBP 0x2b /* veritcal Bypass Polarity */
|
||||
#define SAA7196_VLOW 0x2c /* Colour-keying lower V limit */
|
||||
#define SAA7196_VHIGH 0x2d /* Colour-keying upper V limit */
|
||||
#define SAA7196_ULOW 0x2e /* Colour-keying lower U limit */
|
||||
#define SAA7196_UHIGH 0x2f /* Colour-keying upper U limit */
|
||||
#define SAA7196_DPATH 0x30 /* Data path setting */
|
||||
|
||||
/*
|
||||
* Defines for the PCF8574.
|
||||
*/
|
||||
#define NUM_PCF8574_I2C_REGS 2
|
||||
#define PCF8574_CTRL_I2C_ADDR 0x70
|
||||
#define PCF8574_DATA_I2C_ADDR 0x72
|
||||
#define PCF8574_CTRL_WRITE(mtr, data) \
|
||||
i2c_write(mtr, PCF8574_CTRL_I2C_ADDR, SAA7116_I2C_WRITE, data, data), \
|
||||
mtr->pcf_i2c[0] = data
|
||||
#define PCF8574_DATA_WRITE(mtr, data) \
|
||||
i2c_write(mtr, PCF8574_DATA_I2C_ADDR, SAA7116_I2C_WRITE, data, data), \
|
||||
mtr->pcf_i2c[1] = data
|
||||
#define PCF8574_CTRL_REG(mtr) mtr->pcf_i2c[0]
|
||||
#define PCF8574_DATA_REG(mtr) mtr->pcf_i2c[1]
|
||||
|
||||
|
||||
/*
|
||||
* Defines for the BT254.
|
||||
*/
|
||||
#define NUM_BT254_REGS 7
|
||||
|
||||
#define BT254_COMMAND 0
|
||||
#define BT254_IOUT1 1
|
||||
#define BT254_IOUT2 2
|
||||
#define BT254_IOUT3 3
|
||||
#define BT254_IOUT4 4
|
||||
#define BT254_IOUT5 5
|
||||
#define BT254_IOUT6 6
|
||||
|
||||
/*
|
||||
* Meteor info structure, one per meteor card installed.
|
||||
*/
|
||||
typedef struct meteor_softc {
|
||||
struct saa7116_regs *base; /* saa7116 register virtual address */
|
||||
vm_offset_t phys_base; /* saa7116 register physical address */
|
||||
pcici_t tag; /* PCI tag, for doing PCI commands */
|
||||
vm_offset_t bigbuf; /* buffer that holds the captured image */
|
||||
int alloc_pages; /* number of pages in bigbuf */
|
||||
struct proc *proc; /* process to receive raised signal */
|
||||
int signal; /* signal to send to process */
|
||||
#define METEOR_SIG_MODE_MASK 0xffff0000
|
||||
#define METEOR_SIG_FIELD_MODE 0x00010000
|
||||
#define METEOR_SIG_FRAME_MODE 0x00000000
|
||||
struct meteor_mem *mem; /* used to control sync. multi-frame output */
|
||||
u_long synch_wait; /* wait for free buffer before continuing */
|
||||
short current; /* frame number in buffer (1-frames) */
|
||||
short rows; /* number of rows in a frame */
|
||||
short cols; /* number of columns in a frame */
|
||||
short depth; /* number of byte per pixel */
|
||||
short frames; /* number of frames allocated */
|
||||
int frame_size; /* number of bytes in a frame */
|
||||
u_long fifo_errors; /* number of fifo capture errors since open */
|
||||
u_long dma_errors; /* number of DMA capture errors since open */
|
||||
u_long frames_captured;/* number of frames captured since open */
|
||||
u_long even_fields_captured; /* number of even fields captured */
|
||||
u_long odd_fields_captured; /* number of odd fields captured */
|
||||
u_long range_enable; /* enable range checking ?? */
|
||||
unsigned flags;
|
||||
#define METEOR_INITALIZED 0x00000001
|
||||
#define METEOR_OPEN 0x00000002
|
||||
#define METEOR_MMAP 0x00000004
|
||||
#define METEOR_INTR 0x00000008
|
||||
#define METEOR_READ 0x00000010 /* XXX never gets referenced */
|
||||
#define METEOR_SINGLE 0x00000020 /* get single frame */
|
||||
#define METEOR_CONTIN 0x00000040 /* continuously get frames */
|
||||
#define METEOR_SYNCAP 0x00000080 /* synchronously get frames */
|
||||
#define METEOR_CAP_MASK 0x000000f0
|
||||
#define METEOR_NTSC 0x00000100
|
||||
#define METEOR_PAL 0x00000200
|
||||
#define METEOR_SECAM 0x00000400
|
||||
#define METEOR_AUTOMODE 0x00000800
|
||||
#define METEOR_FORM_MASK 0x00000f00
|
||||
#define METEOR_DEV0 0x00001000
|
||||
#define METEOR_DEV1 0x00002000
|
||||
#define METEOR_DEV2 0x00004000
|
||||
#define METEOR_DEV3 0x00008000
|
||||
#define METEOR_DEV_SVIDEO 0x00006000
|
||||
#define METEOR_DEV_RGB 0x0000a000
|
||||
#define METEOR_DEV_MASK 0x0000f000
|
||||
#define METEOR_RGB16 0x00010000
|
||||
#define METEOR_RGB24 0x00020000
|
||||
#define METEOR_YUV_PACKED 0x00040000
|
||||
#define METEOR_YUV_PLANAR 0x00080000
|
||||
#define METEOR_WANT_EVEN 0x00100000 /* want even frame */
|
||||
#define METEOR_WANT_ODD 0x00200000 /* want odd frame */
|
||||
#define METEOR_WANT_MASK 0x00300000
|
||||
#define METEOR_ONLY_EVEN_FIELDS 0x01000000
|
||||
#define METEOR_ONLY_ODD_FIELDS 0x02000000
|
||||
#define METEOR_ONLY_FIELDS_MASK 0x03000000
|
||||
#define METEOR_YUV_422 0x04000000
|
||||
#define METEOR_OUTPUT_FMT_MASK 0x040f0000
|
||||
#define METEOR_WANT_TS 0x08000000 /* time-stamp a frame */
|
||||
#define METEOR_RGB 0x20000000 /* meteor rgb unit */
|
||||
#define METEOR_FIELD_MODE 0x80000000
|
||||
u_char saa7196_i2c[NUM_SAA7196_I2C_REGS]; /* saa7196 register values */
|
||||
u_char pcf_i2c[NUM_PCF8574_I2C_REGS]; /* PCF8574 register values */
|
||||
u_char bt254_reg[NUM_BT254_REGS]; /* BT254 register values */
|
||||
u_short fps; /* frames per second */
|
||||
#ifdef METEOR_TEST_VIDEO
|
||||
struct meteor_video video;
|
||||
#endif
|
||||
} meteor_reg_t;
|
@ -1,187 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1995 Mark Tinguely and Jim Lowe
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Mark Tinguely and Jim Lowe
|
||||
* 4. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
/*
|
||||
* ioctl constants for Matrox Meteor Capture card.
|
||||
*/
|
||||
|
||||
#ifndef _MACHINE_IOCTL_METEOR_H_
|
||||
#define _MACHINE_IOCTL_METEOR_H_
|
||||
|
||||
#ifndef _KERNEL
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#include <sys/ioccom.h>
|
||||
|
||||
struct meteor_capframe {
|
||||
short command; /* see below for valid METEORCAPFRM commands */
|
||||
short lowat; /* start transfer if < this number */
|
||||
short hiwat; /* stop transfer if > this number */
|
||||
} ;
|
||||
|
||||
/* structure for METEOR[GS]ETGEO - get/set geometry */
|
||||
struct meteor_geomet {
|
||||
u_short rows;
|
||||
u_short columns;
|
||||
u_short frames;
|
||||
u_long oformat;
|
||||
} ;
|
||||
|
||||
/* structure for METEORGCOUNT-get count of frames, fifo errors and dma errors */
|
||||
struct meteor_counts {
|
||||
u_long fifo_errors; /* count of fifo errors since open */
|
||||
u_long dma_errors; /* count of dma errors since open */
|
||||
u_long frames_captured; /* count of frames captured since open */
|
||||
u_long even_fields_captured; /* count of even fields captured */
|
||||
u_long odd_fields_captured; /* count of odd fields captured */
|
||||
} ;
|
||||
|
||||
/* structure for getting and setting direct transfers to vram */
|
||||
struct meteor_video {
|
||||
u_long addr; /* Address of location to dma to */
|
||||
u_long width; /* Width of memory area */
|
||||
u_long banksize; /* Size of Vram bank */
|
||||
u_long ramsize; /* Size of Vram */
|
||||
};
|
||||
|
||||
#define METEORCAPTUR _IOW('x', 1, int) /* capture a frame */
|
||||
#define METEORCAPFRM _IOW('x', 2, struct meteor_capframe) /* sync capture */
|
||||
#define METEORSETGEO _IOW('x', 3, struct meteor_geomet) /* set geometry */
|
||||
#define METEORGETGEO _IOR('x', 4, struct meteor_geomet) /* get geometry */
|
||||
#define METEORSTATUS _IOR('x', 5, unsigned short) /* get status */
|
||||
#define METEORSHUE _IOW('x', 6, signed char) /* set hue */
|
||||
#define METEORGHUE _IOR('x', 6, signed char) /* get hue */
|
||||
#define METEORSFMT _IOW('x', 7, unsigned long) /* set format */
|
||||
#define METEORGFMT _IOR('x', 7, unsigned long) /* get format */
|
||||
#define METEORSINPUT _IOW('x', 8, unsigned long) /* set input dev */
|
||||
#define METEORGINPUT _IOR('x', 8, unsigned long) /* get input dev */
|
||||
#define METEORSCHCV _IOW('x', 9, unsigned char) /* set uv gain */
|
||||
#define METEORGCHCV _IOR('x', 9, unsigned char) /* get uv gain */
|
||||
#define METEORSCOUNT _IOW('x',10, struct meteor_counts)
|
||||
#define METEORGCOUNT _IOR('x',10, struct meteor_counts)
|
||||
#define METEORSFPS _IOW('x',11, unsigned short) /* set fps */
|
||||
#define METEORGFPS _IOR('x',11, unsigned short) /* get fps */
|
||||
#define METEORSSIGNAL _IOW('x', 12, unsigned int) /* set signal */
|
||||
#define METEORGSIGNAL _IOR('x', 12, unsigned int) /* get signal */
|
||||
#define METEORSVIDEO _IOW('x', 13, struct meteor_video) /* set video */
|
||||
#define METEORGVIDEO _IOR('x', 13, struct meteor_video) /* get video */
|
||||
#define METEORSBRIG _IOW('x', 14, unsigned char) /* set brightness */
|
||||
#define METEORGBRIG _IOR('x', 14, unsigned char) /* get brightness */
|
||||
#define METEORSCSAT _IOW('x', 15, unsigned char) /* set chroma sat */
|
||||
#define METEORGCSAT _IOR('x', 15, unsigned char) /* get uv saturation */
|
||||
#define METEORSCONT _IOW('x', 16, unsigned char) /* set contrast */
|
||||
#define METEORGCONT _IOR('x', 16, unsigned char) /* get contrast */
|
||||
#define METEORSBT254 _IOW('x', 17, unsigned short) /* set Bt254 reg */
|
||||
#define METEORGBT254 _IOR('x', 17, unsigned short) /* get Bt254 reg */
|
||||
#define METEORSHWS _IOW('x', 18, unsigned char) /* set hor start reg */
|
||||
#define METEORGHWS _IOR('x', 18, unsigned char) /* get hor start reg */
|
||||
#define METEORSVWS _IOW('x', 19, unsigned char) /* set vert start reg */
|
||||
#define METEORGVWS _IOR('x', 19, unsigned char) /* get vert start reg */
|
||||
#define METEORSTS _IOW('x', 20, unsigned char) /* set time stamp */
|
||||
#define METEORGTS _IOR('x', 20, unsigned char) /* get time stamp */
|
||||
|
||||
#define METEOR_STATUS_ID_MASK 0xf000 /* ID of 7196 */
|
||||
#define METEOR_STATUS_DIR 0x0800 /* Direction of Expansion port YUV */
|
||||
#define METEOR_STATUS_OEF 0x0200 /* Field detected: Even/Odd */
|
||||
#define METEOR_STATUS_SVP 0x0100 /* State of VRAM Port:inactive/active */
|
||||
#define METEOR_STATUS_STTC 0x0080 /* Time Constant: TV/VCR */
|
||||
#define METEOR_STATUS_HCLK 0x0040 /* Horiz PLL: locked/unlocked */
|
||||
#define METEOR_STATUS_FIDT 0x0020 /* Field detect: 50/60hz */
|
||||
#define METEOR_STATUS_ALTD 0x0002 /* Line alt: no line alt/line alt */
|
||||
#define METEOR_STATUS_CODE 0x0001 /* Colour info: no colour/colour */
|
||||
|
||||
/* METEORCAPTUR capture options */
|
||||
#define METEOR_CAP_SINGLE 0x0001 /* capture one frame */
|
||||
#define METEOR_CAP_CONTINOUS 0x0002 /* continuously capture */
|
||||
#define METEOR_CAP_STOP_CONT 0x0004 /* stop the continuous capture */
|
||||
|
||||
/* METEORCAPFRM capture commands */
|
||||
#define METEOR_CAP_N_FRAMES 0x0001 /* capture N frames */
|
||||
#define METEOR_CAP_STOP_FRAMES 0x0002 /* stop capture N frames */
|
||||
#define METEOR_HALT_N_FRAMES 0x0003 /* halt of capture N frames */
|
||||
#define METEOR_CONT_N_FRAMES 0x0004 /* continue after above halt */
|
||||
|
||||
/* valid video input formats: */
|
||||
#define METEOR_FMT_NTSC 0x00100 /* NTSC -- initialized default */
|
||||
#define METEOR_FMT_PAL 0x00200 /* PAL */
|
||||
#define METEOR_FMT_SECAM 0x00400 /* SECAM */
|
||||
#define METEOR_FMT_AUTOMODE 0x00800 /* auto-mode */
|
||||
#define METEOR_INPUT_DEV0 0x01000 /* camera input 0 -- default */
|
||||
#define METEOR_INPUT_DEV_RCA METEOR_INPUT_DEV0
|
||||
#define METEOR_INPUT_DEV1 0x02000 /* camera input 1 */
|
||||
#define METEOR_INPUT_DEV2 0x04000 /* camera input 2 */
|
||||
#define METEOR_INPUT_DEV3 0x08000 /* camera input 3 */
|
||||
#define METEOR_INPUT_DEV_RGB 0x0a000 /* for rgb version of meteor */
|
||||
#define METEOR_INPUT_DEV_SVIDEO 0x06000 /* S-video input port */
|
||||
|
||||
/* valid video output formats: */
|
||||
#define METEOR_GEO_RGB16 0x0010000 /* packed -- initialized default */
|
||||
#define METEOR_GEO_RGB24 0x0020000 /* RBG 24 bits packed */
|
||||
/* internally stored in 32 bits */
|
||||
#define METEOR_GEO_YUV_PACKED 0x0040000 /* 4-2-2 YUV 16 bits packed */
|
||||
#define METEOR_GEO_YUV_PLANAR 0x0080000 /* 4-2-2 YUV 16 bits planer */
|
||||
#define METEOR_GEO_YUV_PLANER METEOR_GEO_YUV_PLANAR
|
||||
#define METEOR_GEO_UNSIGNED 0x0400000 /* unsigned uv outputs */
|
||||
#define METEOR_GEO_EVEN_ONLY 0x1000000 /* set for even only field capture */
|
||||
#define METEOR_GEO_ODD_ONLY 0x2000000 /* set for odd only field capture */
|
||||
#define METEOR_GEO_FIELD_MASK 0x3000000
|
||||
#define METEOR_GEO_YUV_422 0x4000000 /* 4-2-2 YUV in Y-U-V combined */
|
||||
#define METEOR_GEO_OUTPUT_MASK 0x40f0000
|
||||
#define METEOR_GEO_YUV_12 0x10000000 /* YUV 12 format */
|
||||
#define METEOR_GEO_YUV_9 0x40000000 /* YUV 9 format */
|
||||
|
||||
#define METEOR_FIELD_MODE 0x80000000 /* Field cap or Frame cap */
|
||||
|
||||
#define METEOR_SIG_MODE_MASK 0xffff0000
|
||||
#define METEOR_SIG_FRAME 0x00000000 /* signal every frame */
|
||||
#define METEOR_SIG_FIELD 0x00010000 /* signal every field */
|
||||
|
||||
/* following structure is used to coordinate the synchronous */
|
||||
|
||||
struct meteor_mem {
|
||||
/* kernel write only */
|
||||
int frame_size; /* row*columns*depth */
|
||||
unsigned num_bufs; /* number of frames in buffer (1-32) */
|
||||
/* user and kernel change these */
|
||||
int lowat; /* kernel starts capture if < this number */
|
||||
int hiwat; /* kernel stops capture if > this number.
|
||||
hiwat <= numbufs */
|
||||
unsigned active; /* bit mask of active frame buffers
|
||||
kernel sets, user clears */
|
||||
int num_active_bufs; /* count of active frame buffer
|
||||
kernel increments, user decrements */
|
||||
|
||||
/* reference to mmapped data */
|
||||
caddr_t buf; /* The real space (virtual addr) */
|
||||
} ;
|
||||
|
||||
#endif /* !_MACHINE_IOCTL_METEOR_H_ */
|
Loading…
Reference in New Issue
Block a user