xref: /linux/sound/aoa/codecs/tas.h (revision d6869352cb3c3cf3450637a52349e2e87c1354aa)
1*d6869352SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */
2888dcb7cSJohannes Berg /*
3888dcb7cSJohannes Berg  * Apple Onboard Audio driver for tas codec (header)
4888dcb7cSJohannes Berg  *
5888dcb7cSJohannes Berg  * Copyright 2006 Johannes Berg <johannes@sipsolutions.net>
6888dcb7cSJohannes Berg  */
7888dcb7cSJohannes Berg #ifndef __SND_AOA_CODECTASH
8888dcb7cSJohannes Berg #define __SND_AOA_CODECTASH
9888dcb7cSJohannes Berg 
10888dcb7cSJohannes Berg #define TAS_REG_MCS	0x01	/* main control */
11888dcb7cSJohannes Berg #	define TAS_MCS_FASTLOAD		(1<<7)
12888dcb7cSJohannes Berg #	define TAS_MCS_SCLK64		(1<<6)
13888dcb7cSJohannes Berg #	define TAS_MCS_SPORT_MODE_MASK	(3<<4)
14888dcb7cSJohannes Berg #	define TAS_MCS_SPORT_MODE_I2S	(2<<4)
15888dcb7cSJohannes Berg #	define TAS_MCS_SPORT_MODE_RJ	(1<<4)
16888dcb7cSJohannes Berg #	define TAS_MCS_SPORT_MODE_LJ	(0<<4)
17888dcb7cSJohannes Berg #	define TAS_MCS_SPORT_WL_MASK	(3<<0)
18888dcb7cSJohannes Berg #	define TAS_MCS_SPORT_WL_16BIT	(0<<0)
19888dcb7cSJohannes Berg #	define TAS_MCS_SPORT_WL_18BIT	(1<<0)
20888dcb7cSJohannes Berg #	define TAS_MCS_SPORT_WL_20BIT	(2<<0)
21888dcb7cSJohannes Berg #	define TAS_MCS_SPORT_WL_24BIT	(3<<0)
22888dcb7cSJohannes Berg 
23888dcb7cSJohannes Berg #define TAS_REG_DRC	0x02
24888dcb7cSJohannes Berg #define TAS_REG_VOL	0x04
25888dcb7cSJohannes Berg #define TAS_REG_TREBLE	0x05
26888dcb7cSJohannes Berg #define TAS_REG_BASS	0x06
27888dcb7cSJohannes Berg #define TAS_REG_LMIX	0x07
28888dcb7cSJohannes Berg #define TAS_REG_RMIX	0x08
29888dcb7cSJohannes Berg 
30888dcb7cSJohannes Berg #define TAS_REG_ACR	0x40	/* analog control */
31888dcb7cSJohannes Berg #	define TAS_ACR_B_MONAUREAL	(1<<7)
32888dcb7cSJohannes Berg #	define TAS_ACR_B_MON_SEL_RIGHT	(1<<6)
33888dcb7cSJohannes Berg #	define TAS_ACR_DEEMPH_MASK	(3<<2)
34888dcb7cSJohannes Berg #	define TAS_ACR_DEEMPH_OFF	(0<<2)
35888dcb7cSJohannes Berg #	define TAS_ACR_DEEMPH_48KHz	(1<<2)
36888dcb7cSJohannes Berg #	define TAS_ACR_DEEMPH_44KHz	(2<<2)
37888dcb7cSJohannes Berg #	define TAS_ACR_INPUT_B		(1<<1)
38888dcb7cSJohannes Berg #	define TAS_ACR_ANALOG_PDOWN	(1<<0)
39888dcb7cSJohannes Berg 
40888dcb7cSJohannes Berg #define TAS_REG_MCS2	0x43	/* main control 2 */
41888dcb7cSJohannes Berg #	define TAS_MCS2_ALLPASS		(1<<1)
42888dcb7cSJohannes Berg 
43888dcb7cSJohannes Berg #define TAS_REG_LEFT_BIQUAD6	0x10
44888dcb7cSJohannes Berg #define TAS_REG_RIGHT_BIQUAD6	0x19
45888dcb7cSJohannes Berg 
46888dcb7cSJohannes Berg #define TAS_REG_LEFT_LOUDNESS		0x21
47888dcb7cSJohannes Berg #define TAS_REG_RIGHT_LOUDNESS		0x22
48888dcb7cSJohannes Berg #define TAS_REG_LEFT_LOUDNESS_GAIN	0x23
49888dcb7cSJohannes Berg #define TAS_REG_RIGHT_LOUDNESS_GAIN	0x24
50888dcb7cSJohannes Berg 
51888dcb7cSJohannes Berg #define TAS3001_DRC_MAX		0x5f
52888dcb7cSJohannes Berg #define TAS3004_DRC_MAX		0xef
53888dcb7cSJohannes Berg 
54888dcb7cSJohannes Berg #endif /* __SND_AOA_CODECTASH */
55