Home | History | Annotate | Line # | Download | only in ic
ics2101reg.h revision 1.3
      1 /* $NetBSD: ics2101reg.h,v 1.3 1996/02/05 02:18:52 jtc Exp $ */
      2 
      3 /*-
      4  * Copyright (c) 1996 The NetBSD Foundation, Inc.
      5  * All rights reserved.
      6  *
      7  * This code is derived from software contributed to The NetBSD Foundation
      8  * by Ken Hornstein and John Kohl.
      9  *
     10  * Redistribution and use in source and binary forms, with or without
     11  * modification, are permitted provided that the following conditions
     12  * are met:
     13  * 1. Redistributions of source code must retain the above copyright
     14  *    notice, this list of conditions and the following disclaimer.
     15  * 2. Redistributions in binary form must reproduce the above copyright
     16  *    notice, this list of conditions and the following disclaimer in the
     17  *    documentation and/or other materials provided with the distribution.
     18  * 3. All advertising materials mentioning features or use of this software
     19  *    must display the following acknowledgement:
     20  *        This product includes software developed by the NetBSD
     21  *	  Foundation, Inc. and its contributors.
     22  * 4. Neither the name of The NetBSD Foundation nor the names of its
     23  *    contributors may be used to endorse or promote products derived
     24  *    from this software without specific prior written permission.
     25  *
     26  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     27  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     28  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     29  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
     30  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     31  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     32  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     33  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     34  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     35  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     36  * POSSIBILITY OF SUCH DAMAGE.
     37  */
     38 
     39 /*
     40  * Register defs for Integrated Circuit Systems, Inc. ICS-2101 mixer
     41  * chip, used on Gravis UltraSound cards.
     42  *
     43  * Block diagram:
     44  *                                  port #
     45  *				       	0 +----+
     46  *   Mic in (Right/Left)	-->--->---|    |
     47  *					1 |    |	  amp --->---- amp out
     48  *   Line in (Right/Left)	-->--->---|    |	   |
     49  *					2 |    |	   |
     50  *   CD in (Right/Left)		-->--->---|    |--->---+---+----->---- line out
     51  *					3 |    |       |
     52  *   GF1 Out (Right/Left)	-->--->---|    |       |
     53  *					4 |    |       |
     54  *   Unused (Right/Left)	-->--->---|    |       |
     55  *					  +----+       v
     56  *					ICS 2101       |
     57  *						       |
     58  *	        To GF1 Sample Input ---<---------------+
     59  *
     60  *  Master output volume: mixer channel #5
     61  */
     62 
     63 /*
     64  * ICS Mixer registers
     65  */
     66 
     67 #define ICSMIX_CTRL_LEFT	0x00		/* Control left channel */
     68 #define ICSMIX_CTRL_RIGHT	0x01		/* Control right channel */
     69 #define ICSMIX_ATTN_LEFT	0x02		/* Attenuate left channel */
     70 #define ICSMIX_ATTN_RIGHT	0x03		/* Attenutate right channel */
     71 #define ICSMIX_PAEN		0x04		/* Panning control */
     72 #define ICSMIX_CHAN_0		0		/* Values for mixer channels */
     73 #define ICSMIX_CHAN_1		1
     74 #define ICSMIX_CHAN_2		2
     75 #define ICSMIX_CHAN_3		3
     76 #define ICSMIX_CHAN_4		4
     77 #define ICSMIX_CHAN_5		5
     78 
     79 #define	ICSMIX_MIN_ATTN		0x7f
     80 #define	ICSMIX_MAX_ATTN		0x00
     81 /*
     82  * The ICS mixer is write-only--it cannot be queried for current settings.
     83  * Drivers must keep track of current values themselves.
     84  */
     85