[BACK]Return to cs4231var.h CVS log [TXT][DIR] Up to [local] / sys / arch / sparc / dev

Annotation of sys/arch/sparc/dev/cs4231var.h, Revision 1.1.1.1

1.1       nbrk        1: /*     $OpenBSD: cs4231var.h,v 1.10 2006/06/02 20:00:54 miod Exp $     */
                      2:
                      3: /*
                      4:  * Copyright (c) 1999 Jason L. Wright (jason@thought.net)
                      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
                     18:  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
                     19:  * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
                     20:  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
                     21:  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
                     22:  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     23:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
                     24:  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
                     25:  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
                     26:  * POSSIBILITY OF SUCH DAMAGE.
                     27:  */
                     28:
                     29: /*
                     30:  * Driver for CS4231 based audio found in some sun4m systems
                     31:  */
                     32:
                     33: /*
                     34:  * List of device memory allocations (see cs4231_malloc/cs4231_free).
                     35:  */
                     36: struct cs_dma {
                     37:        struct cs_dma *next;
                     38:        caddr_t addr;           /* cpu address */
                     39:        caddr_t addr_dva;       /* hardware address */
                     40:        size_t size;
                     41: };
                     42:
                     43: struct cs_volume {
                     44:        u_int8_t        left;
                     45:        u_int8_t        right;
                     46: };
                     47:
                     48: struct cs_channel {
                     49:        void            (*cs_intr)(void *);     /* interrupt handler */
                     50:        void            *cs_arg;                /* interrupt arg */
                     51:        struct cs_dma   *cs_curdma;             /* current dma block */
                     52:        u_int32_t       cs_cnt;                 /* current block count */
                     53:        u_int32_t       cs_blksz;               /* current block size */
                     54:        u_int32_t       cs_segsz;               /* current segment size */
                     55:        int             cs_locked;              /* channel locked? */
                     56: };
                     57:
                     58: struct cs4231_softc {
                     59:        struct  device sc_dev;          /* base device */
                     60:        struct  intrhand sc_ih;         /* hardware interrupt vectoring */
                     61:        struct  cs4231_regs *sc_regs;   /* CS4231/APC registers */
                     62:        int     sc_node;                /* which sbus node */
                     63:        int     sc_burst;               /* XXX: DMA burst size in effect */
                     64:        int     sc_open;                /* already open? */
                     65:
                     66:        struct cs_channel sc_playback, sc_capture;
                     67:
                     68:        char            sc_mute[9];     /* which devs are muted */
                     69:        u_int8_t        sc_out_port;    /* output port */
                     70:        u_int8_t        sc_in_port;     /* input port */
                     71:        struct  cs_volume sc_volume[9]; /* software volume */
                     72:        struct  cs_volume sc_adc;       /* adc volume */
                     73:
                     74:        int sc_format_bits;
                     75:        int sc_speed_bits;
                     76:        int sc_precision;
                     77:        int sc_need_commit;
                     78:        int sc_channels;
                     79:        struct cs_dma   *sc_dmas;       /* dma list */
                     80:        struct cs_dma   *sc_nowplaying;
                     81: };

CVSweb