xref: /linux/sound/ppc/burgundy.h (revision 75bf465f0bc33e9b776a46d6a1b9b990f5fb7c37)
1*1a59d1b8SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */
21da177e4SLinus Torvalds /*
31da177e4SLinus Torvalds  * Driver for PowerMac Burgundy onboard soundchips
41da177e4SLinus Torvalds  * Copyright (c) 2001 by Takashi Iwai <tiwai@suse.de>
51da177e4SLinus Torvalds  *   based on dmasound.c.
61da177e4SLinus Torvalds  */
71da177e4SLinus Torvalds 
81da177e4SLinus Torvalds 
91da177e4SLinus Torvalds #ifndef __BURGUNDY_H
101da177e4SLinus Torvalds #define __BURGUNDY_H
111da177e4SLinus Torvalds 
1244deee12SRisto Suominen #define MASK_ADDR_BURGUNDY_INPBOOST (0x10 << 12)
131da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_INPSEL21 (0x11 << 12)
141da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_INPSEL3 (0x12 << 12)
151da177e4SLinus Torvalds 
161da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_GAINCH1 (0x13 << 12)
171da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_GAINCH2 (0x14 << 12)
181da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_GAINCH3 (0x15 << 12)
191da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_GAINCH4 (0x16 << 12)
201da177e4SLinus Torvalds 
211da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_VOLCH1 (0x20 << 12)
221da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_VOLCH2 (0x21 << 12)
231da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_VOLCH3 (0x22 << 12)
241da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_VOLCH4 (0x23 << 12)
251da177e4SLinus Torvalds 
2644deee12SRisto Suominen #define MASK_ADDR_BURGUNDY_CAPTURESELECTS (0x2A << 12)
271da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_OUTPUTSELECTS (0x2B << 12)
2844deee12SRisto Suominen #define MASK_ADDR_BURGUNDY_VOLMIX01 (0x2D << 12)
2944deee12SRisto Suominen #define MASK_ADDR_BURGUNDY_VOLMIX23 (0x2E << 12)
301da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_OUTPUTENABLES (0x2F << 12)
311da177e4SLinus Torvalds 
321da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_MASTER_VOLUME (0x30 << 12)
331da177e4SLinus Torvalds 
341da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_MORE_OUTPUTENABLES (0x60 << 12)
351da177e4SLinus Torvalds 
361da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_ATTENSPEAKER (0x62 << 12)
371da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_ATTENLINEOUT (0x63 << 12)
381da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_ATTENHP (0x64 << 12)
3944deee12SRisto Suominen #define MASK_ADDR_BURGUNDY_ATTENMONO (0x65 << 12)
4044deee12SRisto Suominen 
4144deee12SRisto Suominen #define MASK_ADDR_BURGUNDY_HOSTIFAD (0x78 << 12)
4244deee12SRisto Suominen #define MASK_ADDR_BURGUNDY_HOSTIFEH (0x79 << 12)
431da177e4SLinus Torvalds 
441da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_VOLCD (MASK_ADDR_BURGUNDY_VOLCH1)
451da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_VOLLINE (MASK_ADDR_BURGUNDY_VOLCH2)
461da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_VOLMIC (MASK_ADDR_BURGUNDY_VOLCH3)
471da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_VOLMODEM (MASK_ADDR_BURGUNDY_VOLCH4)
481da177e4SLinus Torvalds 
491da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_GAINCD (MASK_ADDR_BURGUNDY_GAINCH1)
501da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_GAINLINE (MASK_ADDR_BURGUNDY_GAINCH2)
511da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_GAINMIC (MASK_ADDR_BURGUNDY_GAINCH3)
521da177e4SLinus Torvalds #define MASK_ADDR_BURGUNDY_GAINMODEM (MASK_ADDR_BURGUNDY_VOLCH4)
531da177e4SLinus Torvalds 
541da177e4SLinus Torvalds 
551da177e4SLinus Torvalds /* These are all default values for the burgundy */
561da177e4SLinus Torvalds #define DEF_BURGUNDY_INPSEL21 (0xAA)
5744deee12SRisto Suominen #define DEF_BURGUNDY_INPSEL3_IMAC (0x0A)
5844deee12SRisto Suominen #define DEF_BURGUNDY_INPSEL3_PMAC (0x05)
591da177e4SLinus Torvalds 
601da177e4SLinus Torvalds #define DEF_BURGUNDY_GAINCD (0x33)
611da177e4SLinus Torvalds #define DEF_BURGUNDY_GAINLINE (0x44)
621da177e4SLinus Torvalds #define DEF_BURGUNDY_GAINMIC (0x44)
631da177e4SLinus Torvalds #define DEF_BURGUNDY_GAINMODEM (0x06)
641da177e4SLinus Torvalds 
6544deee12SRisto Suominen /* Remember: lowest volume here is 0x9B (155) */
661da177e4SLinus Torvalds #define DEF_BURGUNDY_VOLCD (0xCCCCCCCC)
671da177e4SLinus Torvalds #define DEF_BURGUNDY_VOLLINE (0x00000000)
681da177e4SLinus Torvalds #define DEF_BURGUNDY_VOLMIC (0x00000000)
691da177e4SLinus Torvalds #define DEF_BURGUNDY_VOLMODEM (0xCCCCCCCC)
701da177e4SLinus Torvalds 
7144deee12SRisto Suominen #define DEF_BURGUNDY_OUTPUTSELECTS (0x010F010F)
7244deee12SRisto Suominen #define DEF_BURGUNDY_OUTPUTENABLES (0x0100000A)
731da177e4SLinus Torvalds 
741da177e4SLinus Torvalds /* #define DEF_BURGUNDY_MASTER_VOLUME (0xFFFFFFFF) */ /* too loud */
751da177e4SLinus Torvalds #define DEF_BURGUNDY_MASTER_VOLUME (0xDDDDDDDD)
761da177e4SLinus Torvalds 
771da177e4SLinus Torvalds #define DEF_BURGUNDY_MORE_OUTPUTENABLES (0x7E)
781da177e4SLinus Torvalds 
791da177e4SLinus Torvalds #define DEF_BURGUNDY_ATTENSPEAKER (0x44)
801da177e4SLinus Torvalds #define DEF_BURGUNDY_ATTENLINEOUT (0xCC)
811da177e4SLinus Torvalds #define DEF_BURGUNDY_ATTENHP (0xCC)
821da177e4SLinus Torvalds 
8344deee12SRisto Suominen /* MORE_OUTPUTENABLES bits */
841da177e4SLinus Torvalds #define BURGUNDY_OUTPUT_LEFT	0x02
851da177e4SLinus Torvalds #define BURGUNDY_OUTPUT_RIGHT	0x04
8644deee12SRisto Suominen #define BURGUNDY_LINEOUT_LEFT	0x08
8744deee12SRisto Suominen #define BURGUNDY_LINEOUT_RIGHT	0x10
8844deee12SRisto Suominen #define BURGUNDY_HP_LEFT	0x20
8944deee12SRisto Suominen #define BURGUNDY_HP_RIGHT	0x40
901da177e4SLinus Torvalds #define BURGUNDY_OUTPUT_INTERN	0x80
911da177e4SLinus Torvalds 
9244deee12SRisto Suominen /* Headphone detection bits */
9344deee12SRisto Suominen #define BURGUNDY_HPDETECT_PMAC_BACK	0x04
9444deee12SRisto Suominen #define BURGUNDY_HPDETECT_IMAC_SIDE	0x04
9544deee12SRisto Suominen #define BURGUNDY_HPDETECT_IMAC_UPPER	0x08
9644deee12SRisto Suominen #define BURGUNDY_HPDETECT_IMAC_LOWER	0x01
9744deee12SRisto Suominen 
9844deee12SRisto Suominen /* Volume offset */
991da177e4SLinus Torvalds #define BURGUNDY_VOLUME_OFFSET	155
1001da177e4SLinus Torvalds 
1011da177e4SLinus Torvalds #endif /* __BURGUNDY_H */
102