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/pci/autrivar.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: autrivar.h,v 1.2 2001/11/18 17:15:48 augustss Exp $    */
    2 
    3 /*
    4  * Copyright (c) 2001 SOMEYA Yoshihiko and KUROSAWA Takahiro.
    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  *
   16  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
   17  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   18  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
   19  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
   20  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
   21  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
   22  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
   23  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
   25  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   26  */
   27 
   28 #ifndef _DEV_PCI_AUTRIVAR_H_
   29 #define _DEV_PCI_AUTRIVAR_H_
   30 
   31 /*
   32  * softc
   33  */
   34 struct autri_dma {
   35         bus_dmamap_t            map;
   36         caddr_t                 addr;           /* VA */
   37         bus_dma_segment_t       segs[1];
   38         int                     nsegs;
   39         size_t                  size;
   40         struct autri_dma        *next;
   41 };
   42 
   43 struct autri_codec_softc {
   44         struct device           sc_dev;         /* base device */
   45         struct autri_softc      *sc;
   46         int                     id;
   47         int                     status_data;
   48         int                     status_addr;
   49         struct ac97_host_if     host_if;
   50         struct ac97_codec_if    *codec_if;
   51 };
   52 
   53 struct autri_chstatus {
   54         void            (*intr)(void *); /* rint/pint */
   55         void            *intr_arg;      /* arg for intr */
   56         u_int           offset;         /* filled up to here */
   57         u_int           blksize;
   58         u_int           factor;         /* byte per sample */
   59         u_int           length;         /* ring buffer length */
   60         struct autri_dma *dma;          /* DMA handle for ring buf */
   61 
   62         int             ch;
   63         int             ch_intr;
   64 #if 0
   65         u_int           csoint;
   66         u_int           count;
   67 #endif
   68 };
   69 
   70 struct autri_softc {
   71         struct device           sc_dev;         /* base device */
   72         pci_chipset_tag_t       sc_pc;
   73         pcitag_t                sc_pt;
   74         pcireg_t                sc_devid;
   75         void                    *sc_ih;         /* interrupt vectoring */
   76         bus_space_tag_t         memt;
   77         bus_space_handle_t      memh;
   78         bus_space_tag_t         iot;
   79         bus_space_handle_t      ioh;
   80         bus_dma_tag_t           sc_dmatag;      /* DMA tag */
   81         u_int                   sc_flags;
   82 
   83         struct autri_codec_softc sc_codec;
   84         struct autri_dma        *sc_dmas;       /* List of DMA handles */
   85 
   86         u_int32_t               sc_class;
   87         int                     sc_revision;
   88 
   89         int                     sc_old_power;
   90 
   91         /*
   92          * Play/record status
   93          */
   94         struct autri_chstatus   sc_play, sc_rec;
   95 
   96 #if NMIDI > 0
   97         void    (*sc_iintr)(void *, int);       /* midi input ready handler */
   98         void    (*sc_ointr)(void *);            /* midi output ready handler */
   99         void    *sc_arg;
  100 #endif
  101 
  102 };
  103 
  104 #endif /* _DEV_PCI_AUTRIVAR_H_ */
  105 

Cache object: f3e5902550aaf588839eb1809ae8921b


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