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-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
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  */
   28 
   29 #ifndef _MACHINE_SPIGOT_H_
   30 #define _MACHINE_SPIGOT_H_
   31 
   32 #include <sys/ioccom.h>
   33 
   34 struct spigot_info {
   35         unsigned long   maddr;
   36         unsigned short  irq;
   37 };
   38 
   39 /*
   40  * Get memory address.
   41  */
   42 #define SPIGOT_GET_INFO         _IOR('s', 4, struct spigot_info)
   43 /*
   44  * Set up a user interrupt.
   45  */
   46 #define SPIGOT_SETINT           _IOW('s', 5, int)
   47 /*
   48  * Allow/disallow access to the I/O Page.
   49  */
   50 #define SPIGOT_IOPL_ON          _IO ('s', 6)
   51 #define SPIGOT_IOPL_OFF         _IO ('s', 7)
   52 
   53 #ifndef KERNEL
   54 /*
   55  * Defines for spigot library.
   56  */
   57 unsigned short *        spigot_open(char *dev);
   58 void                    spigot_close(void);
   59 void                    spigot_set_capture_size(int width, int vtof);
   60 unsigned char           spigot_start_xfer(int num_frames);
   61 void                    spigot_stop_xfer(void);
   62 unsigned char           spigot_status(void);
   63 
   64 /*
   65  * Define the status bits.
   66  */
   67 #define SPIGOT_COLOR                    0x01    /* Color present (No color) */
   68 #define SPIGOT_60HZ                     0x02    /* 60 hz input signal (50hz) */
   69 #define SPIGOT_NO_HORIZONTAL_LOCK       0x04    /* Horizontal lock present */
   70 #define SPIGOT_HPLL_LOCKED              0x08    /* HPLL locked (HPLL unlocked)*/
   71 #define SPIGOT_VCR_MODE                 0x10    /* VCR mode (TV mode) */
   72 #define SPIGOT_VSYNC_PRESENT            0x20    /* Vsync present */
   73 
   74 /*
   75  * spigot_open() returns a data address pointing to the spigot data.
   76  * Each read from this address returns the next word.  The ``dev'' passed
   77  * is usually "/dev/spigot".  Data is described in the phillips desktop
   78  * video data handbook under the 7191 chip.  Formats may be either
   79  * YUV 4:2:2 or YUV 4:1:1.  A sample device driver for ``nv'' is included
   80  * with this code.
   81  *
   82  * spigot_close() cleans up and closes the device.
   83  *
   84  * spigot_set_capture_size() will set the capture window size.  Width should be
   85  * one of:      80, 160, 240, 320, or 640 for NTSC or
   86  *              96, 192, 288, 384 for PAL.
   87  * vtof is the Vertical top of frame offset and must be between 0 and 15 lines.
   88  *
   89  * spigot_start_xfer() will start a transfer from the 7191 to the data fifo.
   90  * spigot_stop_xfer() will clear the data fifo and abort any transfers.
   91  *
   92  * spigot_status() will return the above status bits.
   93  */
   94 #endif /* !KERNEL */
   95 
   96 #endif /* !_MACHINE_SPIGOT_H_ */

Cache object: 6d08b042b0dce0c176ec75e3457e8958


[ 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.