xref: /linux/sound/aoa/codecs/tas.h (revision 888dcb7cb26fb85dfe3486d28a2431d69d3e8148)
1*888dcb7cSJohannes Berg /*
2*888dcb7cSJohannes Berg  * Apple Onboard Audio driver for tas codec (header)
3*888dcb7cSJohannes Berg  *
4*888dcb7cSJohannes Berg  * Copyright 2006 Johannes Berg <johannes@sipsolutions.net>
5*888dcb7cSJohannes Berg  *
6*888dcb7cSJohannes Berg  * GPL v2, can be found in COPYING.
7*888dcb7cSJohannes Berg  */
8*888dcb7cSJohannes Berg #ifndef __SND_AOA_CODECTASH
9*888dcb7cSJohannes Berg #define __SND_AOA_CODECTASH
10*888dcb7cSJohannes Berg 
11*888dcb7cSJohannes Berg #define TAS_REG_MCS	0x01	/* main control */
12*888dcb7cSJohannes Berg #	define TAS_MCS_FASTLOAD		(1<<7)
13*888dcb7cSJohannes Berg #	define TAS_MCS_SCLK64		(1<<6)
14*888dcb7cSJohannes Berg #	define TAS_MCS_SPORT_MODE_MASK	(3<<4)
15*888dcb7cSJohannes Berg #	define TAS_MCS_SPORT_MODE_I2S	(2<<4)
16*888dcb7cSJohannes Berg #	define TAS_MCS_SPORT_MODE_RJ	(1<<4)
17*888dcb7cSJohannes Berg #	define TAS_MCS_SPORT_MODE_LJ	(0<<4)
18*888dcb7cSJohannes Berg #	define TAS_MCS_SPORT_WL_MASK	(3<<0)
19*888dcb7cSJohannes Berg #	define TAS_MCS_SPORT_WL_16BIT	(0<<0)
20*888dcb7cSJohannes Berg #	define TAS_MCS_SPORT_WL_18BIT	(1<<0)
21*888dcb7cSJohannes Berg #	define TAS_MCS_SPORT_WL_20BIT	(2<<0)
22*888dcb7cSJohannes Berg #	define TAS_MCS_SPORT_WL_24BIT	(3<<0)
23*888dcb7cSJohannes Berg 
24*888dcb7cSJohannes Berg #define TAS_REG_DRC	0x02
25*888dcb7cSJohannes Berg #define TAS_REG_VOL	0x04
26*888dcb7cSJohannes Berg #define TAS_REG_TREBLE	0x05
27*888dcb7cSJohannes Berg #define TAS_REG_BASS	0x06
28*888dcb7cSJohannes Berg #define TAS_REG_LMIX	0x07
29*888dcb7cSJohannes Berg #define TAS_REG_RMIX	0x08
30*888dcb7cSJohannes Berg 
31*888dcb7cSJohannes Berg #define TAS_REG_ACR	0x40	/* analog control */
32*888dcb7cSJohannes Berg #	define TAS_ACR_B_MONAUREAL	(1<<7)
33*888dcb7cSJohannes Berg #	define TAS_ACR_B_MON_SEL_RIGHT	(1<<6)
34*888dcb7cSJohannes Berg #	define TAS_ACR_DEEMPH_MASK	(3<<2)
35*888dcb7cSJohannes Berg #	define TAS_ACR_DEEMPH_OFF	(0<<2)
36*888dcb7cSJohannes Berg #	define TAS_ACR_DEEMPH_48KHz	(1<<2)
37*888dcb7cSJohannes Berg #	define TAS_ACR_DEEMPH_44KHz	(2<<2)
38*888dcb7cSJohannes Berg #	define TAS_ACR_INPUT_B		(1<<1)
39*888dcb7cSJohannes Berg #	define TAS_ACR_ANALOG_PDOWN	(1<<0)
40*888dcb7cSJohannes Berg 
41*888dcb7cSJohannes Berg #define TAS_REG_MCS2	0x43	/* main control 2 */
42*888dcb7cSJohannes Berg #	define TAS_MCS2_ALLPASS		(1<<1)
43*888dcb7cSJohannes Berg 
44*888dcb7cSJohannes Berg #define TAS_REG_LEFT_BIQUAD6	0x10
45*888dcb7cSJohannes Berg #define TAS_REG_RIGHT_BIQUAD6	0x19
46*888dcb7cSJohannes Berg 
47*888dcb7cSJohannes Berg #define TAS_REG_LEFT_LOUDNESS		0x21
48*888dcb7cSJohannes Berg #define TAS_REG_RIGHT_LOUDNESS		0x22
49*888dcb7cSJohannes Berg #define TAS_REG_LEFT_LOUDNESS_GAIN	0x23
50*888dcb7cSJohannes Berg #define TAS_REG_RIGHT_LOUDNESS_GAIN	0x24
51*888dcb7cSJohannes Berg 
52*888dcb7cSJohannes Berg #define TAS3001_DRC_MAX		0x5f
53*888dcb7cSJohannes Berg #define TAS3004_DRC_MAX		0xef
54*888dcb7cSJohannes Berg 
55*888dcb7cSJohannes Berg #endif /* __SND_AOA_CODECTASH */
56