xref: /linux/sound/ppc/burgundy.h (revision 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2)
1*1da177e4SLinus Torvalds /*
2*1da177e4SLinus Torvalds  * Driver for PowerMac Burgundy onboard soundchips
3*1da177e4SLinus Torvalds  * Copyright (c) 2001 by Takashi Iwai <tiwai@suse.de>
4*1da177e4SLinus Torvalds  *   based on dmasound.c.
5*1da177e4SLinus Torvalds  *
6*1da177e4SLinus Torvalds  *   This program is free software; you can redistribute it and/or modify
7*1da177e4SLinus Torvalds  *   it under the terms of the GNU General Public License as published by
8*1da177e4SLinus Torvalds  *   the Free Software Foundation; either version 2 of the License, or
9*1da177e4SLinus Torvalds  *   (at your option) any later version.
10*1da177e4SLinus Torvalds  *
11*1da177e4SLinus Torvalds  *   This program is distributed in the hope that it will be useful,
12*1da177e4SLinus Torvalds  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
13*1da177e4SLinus Torvalds  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14*1da177e4SLinus Torvalds  *   GNU General Public License for more details.
15*1da177e4SLinus Torvalds  *
16*1da177e4SLinus Torvalds  *   You should have received a copy of the GNU General Public License
17*1da177e4SLinus Torvalds  *   along with this program; if not, write to the Free Software
18*1da177e4SLinus Torvalds  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19*1da177e4SLinus Torvalds  */
20*1da177e4SLinus Torvalds 
21*1da177e4SLinus Torvalds 
22*1da177e4SLinus Torvalds #ifndef __BURGUNDY_H
23*1da177e4SLinus Torvalds #define __BURGUNDY_H
24*1da177e4SLinus Torvalds 
25*1da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_INPSEL21 (0x11 << 12)
26*1da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_INPSEL3 (0x12 << 12)
27*1da177e4SLinus Torvalds 
28*1da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_GAINCH1 (0x13 << 12)
29*1da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_GAINCH2 (0x14 << 12)
30*1da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_GAINCH3 (0x15 << 12)
31*1da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_GAINCH4 (0x16 << 12)
32*1da177e4SLinus Torvalds 
33*1da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_VOLCH1 (0x20 << 12)
34*1da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_VOLCH2 (0x21 << 12)
35*1da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_VOLCH3 (0x22 << 12)
36*1da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_VOLCH4 (0x23 << 12)
37*1da177e4SLinus Torvalds 
38*1da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_OUTPUTSELECTS (0x2B << 12)
39*1da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_OUTPUTENABLES (0x2F << 12)
40*1da177e4SLinus Torvalds 
41*1da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_MASTER_VOLUME (0x30 << 12)
42*1da177e4SLinus Torvalds 
43*1da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_MORE_OUTPUTENABLES (0x60 << 12)
44*1da177e4SLinus Torvalds 
45*1da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_ATTENSPEAKER (0x62 << 12)
46*1da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_ATTENLINEOUT (0x63 << 12)
47*1da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_ATTENHP (0x64 << 12)
48*1da177e4SLinus Torvalds 
49*1da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_VOLCD (MASK_ADDR_BURGUNDY_VOLCH1)
50*1da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_VOLLINE (MASK_ADDR_BURGUNDY_VOLCH2)
51*1da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_VOLMIC (MASK_ADDR_BURGUNDY_VOLCH3)
52*1da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_VOLMODEM (MASK_ADDR_BURGUNDY_VOLCH4)
53*1da177e4SLinus Torvalds 
54*1da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_GAINCD (MASK_ADDR_BURGUNDY_GAINCH1)
55*1da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_GAINLINE (MASK_ADDR_BURGUNDY_GAINCH2)
56*1da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_GAINMIC (MASK_ADDR_BURGUNDY_GAINCH3)
57*1da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_GAINMODEM (MASK_ADDR_BURGUNDY_VOLCH4)
58*1da177e4SLinus Torvalds 
59*1da177e4SLinus Torvalds 
60*1da177e4SLinus Torvalds /* These are all default values for the burgundy */
61*1da177e4SLinus Torvalds #define DEF_BURGUNDY_INPSEL21 (0xAA)
62*1da177e4SLinus Torvalds #define DEF_BURGUNDY_INPSEL3 (0x0A)
63*1da177e4SLinus Torvalds 
64*1da177e4SLinus Torvalds #define DEF_BURGUNDY_GAINCD (0x33)
65*1da177e4SLinus Torvalds #define DEF_BURGUNDY_GAINLINE (0x44)
66*1da177e4SLinus Torvalds #define DEF_BURGUNDY_GAINMIC (0x44)
67*1da177e4SLinus Torvalds #define DEF_BURGUNDY_GAINMODEM (0x06)
68*1da177e4SLinus Torvalds 
69*1da177e4SLinus Torvalds /* Remember: lowest volume here is 0x9b */
70*1da177e4SLinus Torvalds #define DEF_BURGUNDY_VOLCD (0xCCCCCCCC)
71*1da177e4SLinus Torvalds #define DEF_BURGUNDY_VOLLINE (0x00000000)
72*1da177e4SLinus Torvalds #define DEF_BURGUNDY_VOLMIC (0x00000000)
73*1da177e4SLinus Torvalds #define DEF_BURGUNDY_VOLMODEM (0xCCCCCCCC)
74*1da177e4SLinus Torvalds 
75*1da177e4SLinus Torvalds #define DEF_BURGUNDY_OUTPUTSELECTS (0x010f010f)
76*1da177e4SLinus Torvalds #define DEF_BURGUNDY_OUTPUTENABLES (0x0A)
77*1da177e4SLinus Torvalds 
78*1da177e4SLinus Torvalds /* #define DEF_BURGUNDY_MASTER_VOLUME (0xFFFFFFFF) */ /* too loud */
79*1da177e4SLinus Torvalds #define DEF_BURGUNDY_MASTER_VOLUME (0xDDDDDDDD)
80*1da177e4SLinus Torvalds 
81*1da177e4SLinus Torvalds #define DEF_BURGUNDY_MORE_OUTPUTENABLES (0x7E)
82*1da177e4SLinus Torvalds 
83*1da177e4SLinus Torvalds #define DEF_BURGUNDY_ATTENSPEAKER (0x44)
84*1da177e4SLinus Torvalds #define DEF_BURGUNDY_ATTENLINEOUT (0xCC)
85*1da177e4SLinus Torvalds #define DEF_BURGUNDY_ATTENHP (0xCC)
86*1da177e4SLinus Torvalds 
87*1da177e4SLinus Torvalds /* OUTPUTENABLES bits */
88*1da177e4SLinus Torvalds #define BURGUNDY_OUTPUT_LEFT	0x02
89*1da177e4SLinus Torvalds #define BURGUNDY_OUTPUT_RIGHT	0x04
90*1da177e4SLinus Torvalds #define BURGUNDY_OUTPUT_INTERN	0x80
91*1da177e4SLinus Torvalds 
92*1da177e4SLinus Torvalds /* volume offset */
93*1da177e4SLinus Torvalds #define BURGUNDY_VOLUME_OFFSET	155
94*1da177e4SLinus Torvalds 
95*1da177e4SLinus Torvalds #endif /* __BURGUNDY_H */
96