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/dev/pcmcia/eslvar.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 /*      $NetBSD: eslvar.h,v 1.3 2001/12/25 03:46:34 jmcneill Exp $      */
    2 
    3 /*
    4  * Copyright (c) 2001 Jared D. McNeill <jmcneill@invisible.yi.org>
    5  * All rights reserved.
    6  *
    7  * Redistribution and use in source and binary forms, with or without
    8  * modification, are permitted provided that the following conditions
    9  * are met:
   10  * 1. Redistributions of source code must retain the above copyright
   11  *    notice, this list of conditions and the following disclaimer.
   12  * 2. Redistributions in binary form must reproduce the above copyright
   13  *    notice, this list of conditions and the following disclaimer in the
   14  *    documentation and/or other materials provided with the distribution.
   15  * 3. All advertising materials mentioning features or use of this software
   16  *    must display the following acknowledgement:
   17  *      This product includes software developed by Jared D. McNeill.
   18  * 4. Neither the name of the author nor the names of any contributors may
   19  *    be used to endorse or promote products derived from this software
   20  *    without specific prior written permission.
   21  *
   22  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
   23  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   24  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   25  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
   26  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   27  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   28  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   29  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   31  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   32  * SUCH DAMAGE.
   33  *
   34  */
   35 
   36 #include <sys/device.h>
   37 
   38 #define ESS_DAC_PLAY_VOL        0
   39 #define ESS_SYNTH_PLAY_VOL      1
   40 #define ESS_INPUT_CLASS         2
   41 
   42 #define ESS_MASTER_VOL          3
   43 #define ESS_OUTPUT_CLASS        4
   44 
   45 #define ESS_MAX_NDEVS           5
   46 
   47 /* Model numbers */
   48 #define ESS_UNSUPPORTED -1
   49 #define ESS_1688        0
   50 #define ESS_688         1       
   51 
   52 /* FIFO Size */
   53 #define ESS_FIFO_SIZE   256     /* in bytes */
   54 
   55 struct esl_softc
   56 {
   57         struct  device sc_dev;          /* base device */
   58         u_short sc_open;                /* reference count of open calls */
   59         u_char  gain[ESS_MAX_NDEVS][2]; /* kept in input levels */
   60 #define ESS_LEFT 0
   61 #define ESS_RIGHT 1
   62 
   63         void    (*intr)(void *);        /* ISR for FIFO Half-Empty */
   64         void    *arg;                   /* argument for intr() */
   65 
   66         /* Pseudo-DMA state vars */
   67         int     active;                 /* are we active? */
   68         u_char  *sc_dmaaddr;
   69         u_char  *sc_dmastart;
   70         u_char  *sc_dmaend;
   71         int     sc_blksize;
   72         int     sc_blkpos;
   73 
   74         u_int   sc_version;             /* Legacy ES688/ES1688 ID */
   75 };
   76 
   77 struct esl_pcmcia_softc {
   78         struct esl_softc sc_esl;
   79         struct pcmcia_io_handle sc_pcioh;
   80         int sc_io_window;
   81         struct pcmcia_function *sc_pf;
   82         void *sc_ih;
   83         struct device *sc_audiodev;
   84         struct device *sc_opldev;
   85 
   86         int (*sc_enable)(struct esl_pcmcia_softc *);
   87         void (*sc_disable)(struct esl_pcmcia_softc *);
   88 };
   89 
   90 int     esl_init(struct esl_pcmcia_softc *sc);
   91 int     esl_intr(void *);

Cache object: ba2288037ae00f0e49709d22b980e4dc


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