The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/i386/include/spigot.h

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    1 /*
    2  * Video spigot capture driver.
    3  *
    4  * Copyright (c) 1995, Jim Lowe.  All rights reserved.
    5  *
    6  * Redistribution and use in source and binary forms, with or without
    7  * modification, are permitted provided that the following conditions are
    8  * met: 1. Redistributions of source code must retain the above copyright
    9  * notice, this list of conditions and the following disclaimer. 2.
   10  * Redistributions in binary form must reproduce the above copyright notice,
   11  * this list of conditions and the following disclaimer in the documentation
   12  * and/or other materials provided with the distribution.
   13  *
   14  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
   15  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
   16  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   17  * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
   18  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   19  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
   20  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
   21  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   22  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   23  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   24  * SUCH DAMAGE.
   25  *
   26  * Version 1.2, Aug 30, 1995.
   27  * $FreeBSD: releng/5.0/sys/i386/include/spigot.h 55205 1999-12-29 04:46:21Z peter $
   28  */
   29 
   30 #ifndef _MACHINE_SPIGOT_H_
   31 #define _MACHINE_SPIGOT_H_
   32 
   33 #include <sys/ioccom.h>
   34 
   35 struct spigot_info {
   36         unsigned long   maddr;
   37         unsigned short  irq;
   38 };
   39 
   40 /*
   41  * Get memory address.
   42  */
   43 #define SPIGOT_GET_INFO         _IOR('s', 4, struct spigot_info)
   44 /*
   45  * Set up a user interrupt.
   46  */
   47 #define SPIGOT_SETINT           _IOW('s', 5, int)
   48 /*
   49  * Allow/disallow access to the I/O Page.
   50  */
   51 #define SPIGOT_IOPL_ON          _IO ('s', 6)
   52 #define SPIGOT_IOPL_OFF         _IO ('s', 7)
   53 
   54 #ifndef _KERNEL
   55 /*
   56  * Defines for spigot library.
   57  */
   58 unsigned short *        spigot_open(char *dev);
   59 void                    spigot_close(void);
   60 void                    spigot_set_capture_size(int width, int vtof);
   61 unsigned char           spigot_start_xfer(int num_frames);
   62 void                    spigot_stop_xfer(void);
   63 unsigned char           spigot_status(void);
   64 
   65 /*
   66  * Define the status bits.
   67  */
   68 #define SPIGOT_COLOR                    0x01    /* Color present (No color) */
   69 #define SPIGOT_60HZ                     0x02    /* 60 hz input signal (50hz) */
   70 #define SPIGOT_NO_HORIZONTAL_LOCK       0x04    /* Horizontal lock present */
   71 #define SPIGOT_HPLL_LOCKED              0x08    /* HPLL locked (HPLL unlocked)*/
   72 #define SPIGOT_VCR_MODE                 0x10    /* VCR mode (TV mode) */
   73 #define SPIGOT_VSYNC_PRESENT            0x20    /* Vsync present */
   74 
   75 /*
   76  * spigot_open() returns a data address pointing to the spigot data.
   77  * Each read from this address returns the next word.  The ``dev'' passed
   78  * is usually "/dev/spigot".  Data is described in the phillips desktop
   79  * video data handbook under the 7191 chip.  Formats may be either
   80  * YUV 4:2:2 or YUV 4:1:1.  A sample device driver for ``nv'' is included
   81  * with this code.
   82  *
   83  * spigot_close() cleans up and closes the device.
   84  *
   85  * spigot_set_capture_size() will set the capture window size.  Width should be
   86  * one of:      80, 160, 240, 320, or 640 for NTSC or
   87  *              96, 192, 288, 384 for PAL.
   88  * vtof is the Vertical top of frame offset and must be between 0 and 15 lines.
   89  *
   90  * spigot_start_xfer() will start a transfer from the 7191 to the data fifo.
   91  * spigot_stop_xfer() will clear the data fifo and abort any transfers.
   92  *
   93  * spigot_status() will return the above status bits.
   94  */
   95 #endif /* !_KERNEL */
   96 
   97 #endif /* !_MACHINE_SPIGOT_H_ */

Cache object: 2ab64b7e51bbf0d927318409c80282b2


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.