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