summaryrefslogtreecommitdiffstats
path: root/sys/i386/include/spigot.h
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-02-06 23:20:17 +0000
committerjkh <jkh@FreeBSD.org>1995-02-06 23:20:17 +0000
commitcf3a878379438c57a0061b76504645d924fe8076 (patch)
tree1e42996e9bb791ba623cc0fbf60eff5f0b178211 /sys/i386/include/spigot.h
parent630cf84ab0f8b733bce8492a0a15a4324c089069 (diff)
downloadFreeBSD-src-cf3a878379438c57a0061b76504645d924fe8076.zip
FreeBSD-src-cf3a878379438c57a0061b76504645d924fe8076.tar.gz
The very minimum driver required to support a Video Spigot. See the
copyright notices in the code for information on where to go to pick up additional useful bits. Submitted by: Jim Lowe <james@blatz.cs.uwm.edu>
Diffstat (limited to 'sys/i386/include/spigot.h')
-rw-r--r--sys/i386/include/spigot.h80
1 files changed, 80 insertions, 0 deletions
diff --git a/sys/i386/include/spigot.h b/sys/i386/include/spigot.h
new file mode 100644
index 0000000..6d95033
--- /dev/null
+++ b/sys/i386/include/spigot.h
@@ -0,0 +1,80 @@
+/*
+ * Video spigot capture driver.
+ *
+ * Copyright (c) 1995, 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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.
+ *
+ * Version 1.1, Feb 1, 1995.
+ */
+
+/*
+ * Set up a user interrupt.
+ */
+#define SPIGOT_SETINT _IOW('s', 5, int)
+/*
+ * Allow/disallow access to the I/O Page.
+ */
+#define SPIGOT_IOPL_ON _IO ('s', 6)
+#define SPIGOT_IOPL_OFF _IO ('s', 7)
+
+#ifndef KERNEL
+/*
+ * Defines for spigot library.
+ */
+unsigned short * spigot_open(char *dev);
+void spigot_close(void);
+void spigot_set_capture_size(int width, int vtof);
+unsigned char spigot_start_xfer(int num_frames);
+void spigot_stop_xfer(void);
+unsigned char spigot_status(void);
+
+/*
+ * Define the status bits.
+ */
+#define SPIGOT_COLOR 0x01 /* Color present (No color) */
+#define SPIGOT_60HZ 0x02 /* 60 hz input signal (50hz) */
+#define SPIGOT_NO_HORIZONTAL_LOCK 0x04 /* Horizontal lock present */
+#define SPIGOT_HPLL_LOCKED 0x08 /* HPLL locked (HPLL unlocked)*/
+#define SPIGOT_VCR_MODE 0x10 /* VCR mode (TV mode) */
+#define SPIGOT_VSYNC_PRESENT 0x20 /* Vsync present */
+
+/*
+ * spigot_open() returns a data address pointing to the spigot data.
+ * Each read from this address returns the next word. The ``dev'' passed
+ * is usually "/dev/spigot". Data is described in the phillips desktop
+ * video data handbook under the 7191 chip. Formats may be either
+ * YUV 4:2:2 or YUV 4:1:1. A sample device driver for ``nv'' is included
+ * with this code.
+ *
+ * spigot_close() cleans up and closes the device.
+ *
+ * spigot_set_capture_size() will set the capture window size. Width should be
+ * one of: 80, 160, 240, 320, or 640 for NTSC or
+ * 96, 192, 288, 384 for PAL.
+ * vtof is the Vertical top of frame offset and must be between 0 and 15 lines.
+ *
+ * spigot_start_xfer() will start a transfer from the 7191 to the data fifo.
+ * spigot_stop_xfer() will clear the data fifo and abort any transfers.
+ *
+ * spigot_status() will return the above status bits.
+ */
+#endif
OpenPOWER on IntegriCloud