diff options
Diffstat (limited to 'sound/soc/codecs/pcm512x.h')
-rw-r--r-- | sound/soc/codecs/pcm512x.h | 109 |
1 files changed, 104 insertions, 5 deletions
diff --git a/sound/soc/codecs/pcm512x.h b/sound/soc/codecs/pcm512x.h index 6ee76aaca09a..b7c310207223 100644 --- a/sound/soc/codecs/pcm512x.h +++ b/sound/soc/codecs/pcm512x.h | |||
@@ -37,6 +37,10 @@ | |||
37 | #define PCM512x_DSP_GPIO_INPUT (PCM512x_PAGE_BASE(0) + 10) | 37 | #define PCM512x_DSP_GPIO_INPUT (PCM512x_PAGE_BASE(0) + 10) |
38 | #define PCM512x_MASTER_MODE (PCM512x_PAGE_BASE(0) + 12) | 38 | #define PCM512x_MASTER_MODE (PCM512x_PAGE_BASE(0) + 12) |
39 | #define PCM512x_PLL_REF (PCM512x_PAGE_BASE(0) + 13) | 39 | #define PCM512x_PLL_REF (PCM512x_PAGE_BASE(0) + 13) |
40 | #define PCM512x_DAC_REF (PCM512x_PAGE_BASE(0) + 14) | ||
41 | #define PCM512x_GPIO_DACIN (PCM512x_PAGE_BASE(0) + 16) | ||
42 | #define PCM512x_GPIO_PLLIN (PCM512x_PAGE_BASE(0) + 18) | ||
43 | #define PCM512x_SYNCHRONIZE (PCM512x_PAGE_BASE(0) + 19) | ||
40 | #define PCM512x_PLL_COEFF_0 (PCM512x_PAGE_BASE(0) + 20) | 44 | #define PCM512x_PLL_COEFF_0 (PCM512x_PAGE_BASE(0) + 20) |
41 | #define PCM512x_PLL_COEFF_1 (PCM512x_PAGE_BASE(0) + 21) | 45 | #define PCM512x_PLL_COEFF_1 (PCM512x_PAGE_BASE(0) + 21) |
42 | #define PCM512x_PLL_COEFF_2 (PCM512x_PAGE_BASE(0) + 22) | 46 | #define PCM512x_PLL_COEFF_2 (PCM512x_PAGE_BASE(0) + 22) |
@@ -77,6 +81,7 @@ | |||
77 | #define PCM512x_RATE_DET_2 (PCM512x_PAGE_BASE(0) + 92) | 81 | #define PCM512x_RATE_DET_2 (PCM512x_PAGE_BASE(0) + 92) |
78 | #define PCM512x_RATE_DET_3 (PCM512x_PAGE_BASE(0) + 93) | 82 | #define PCM512x_RATE_DET_3 (PCM512x_PAGE_BASE(0) + 93) |
79 | #define PCM512x_RATE_DET_4 (PCM512x_PAGE_BASE(0) + 94) | 83 | #define PCM512x_RATE_DET_4 (PCM512x_PAGE_BASE(0) + 94) |
84 | #define PCM512x_CLOCK_STATUS (PCM512x_PAGE_BASE(0) + 95) | ||
80 | #define PCM512x_ANALOG_MUTE_DET (PCM512x_PAGE_BASE(0) + 108) | 85 | #define PCM512x_ANALOG_MUTE_DET (PCM512x_PAGE_BASE(0) + 108) |
81 | #define PCM512x_GPIN (PCM512x_PAGE_BASE(0) + 119) | 86 | #define PCM512x_GPIN (PCM512x_PAGE_BASE(0) + 119) |
82 | #define PCM512x_DIGITAL_MUTE_DET (PCM512x_PAGE_BASE(0) + 120) | 87 | #define PCM512x_DIGITAL_MUTE_DET (PCM512x_PAGE_BASE(0) + 120) |
@@ -91,7 +96,10 @@ | |||
91 | 96 | ||
92 | #define PCM512x_CRAM_CTRL (PCM512x_PAGE_BASE(44) + 1) | 97 | #define PCM512x_CRAM_CTRL (PCM512x_PAGE_BASE(44) + 1) |
93 | 98 | ||
94 | #define PCM512x_MAX_REGISTER (PCM512x_PAGE_BASE(44) + 1) | 99 | #define PCM512x_FLEX_A (PCM512x_PAGE_BASE(253) + 63) |
100 | #define PCM512x_FLEX_B (PCM512x_PAGE_BASE(253) + 64) | ||
101 | |||
102 | #define PCM512x_MAX_REGISTER (PCM512x_PAGE_BASE(253) + 64) | ||
95 | 103 | ||
96 | /* Page 0, Register 1 - reset */ | 104 | /* Page 0, Register 1 - reset */ |
97 | #define PCM512x_RSTR (1 << 0) | 105 | #define PCM512x_RSTR (1 << 0) |
@@ -108,8 +116,8 @@ | |||
108 | #define PCM512x_RQML_SHIFT 4 | 116 | #define PCM512x_RQML_SHIFT 4 |
109 | 117 | ||
110 | /* Page 0, Register 4 - PLL */ | 118 | /* Page 0, Register 4 - PLL */ |
111 | #define PCM512x_PLCE (1 << 0) | 119 | #define PCM512x_PLLE (1 << 0) |
112 | #define PCM512x_RLCE_SHIFT 0 | 120 | #define PCM512x_PLLE_SHIFT 0 |
113 | #define PCM512x_PLCK (1 << 4) | 121 | #define PCM512x_PLCK (1 << 4) |
114 | #define PCM512x_PLCK_SHIFT 4 | 122 | #define PCM512x_PLCK_SHIFT 4 |
115 | 123 | ||
@@ -119,8 +127,66 @@ | |||
119 | #define PCM512x_DEMP (1 << 4) | 127 | #define PCM512x_DEMP (1 << 4) |
120 | #define PCM512x_DEMP_SHIFT 4 | 128 | #define PCM512x_DEMP_SHIFT 4 |
121 | 129 | ||
130 | /* Page 0, Register 8 - GPIO output enable */ | ||
131 | #define PCM512x_G1OE (1 << 0) | ||
132 | #define PCM512x_G2OE (1 << 1) | ||
133 | #define PCM512x_G3OE (1 << 2) | ||
134 | #define PCM512x_G4OE (1 << 3) | ||
135 | #define PCM512x_G5OE (1 << 4) | ||
136 | #define PCM512x_G6OE (1 << 5) | ||
137 | |||
138 | /* Page 0, Register 9 - BCK, LRCLK configuration */ | ||
139 | #define PCM512x_LRKO (1 << 0) | ||
140 | #define PCM512x_LRKO_SHIFT 0 | ||
141 | #define PCM512x_BCKO (1 << 4) | ||
142 | #define PCM512x_BCKO_SHIFT 4 | ||
143 | #define PCM512x_BCKP (1 << 5) | ||
144 | #define PCM512x_BCKP_SHIFT 5 | ||
145 | |||
146 | /* Page 0, Register 12 - Master mode BCK, LRCLK reset */ | ||
147 | #define PCM512x_RLRK (1 << 0) | ||
148 | #define PCM512x_RLRK_SHIFT 0 | ||
149 | #define PCM512x_RBCK (1 << 1) | ||
150 | #define PCM512x_RBCK_SHIFT 1 | ||
151 | |||
122 | /* Page 0, Register 13 - PLL reference */ | 152 | /* Page 0, Register 13 - PLL reference */ |
123 | #define PCM512x_SREF (1 << 4) | 153 | #define PCM512x_SREF (7 << 4) |
154 | #define PCM512x_SREF_SHIFT 4 | ||
155 | #define PCM512x_SREF_SCK (0 << 4) | ||
156 | #define PCM512x_SREF_BCK (1 << 4) | ||
157 | #define PCM512x_SREF_GPIO (3 << 4) | ||
158 | |||
159 | /* Page 0, Register 14 - DAC reference */ | ||
160 | #define PCM512x_SDAC (7 << 4) | ||
161 | #define PCM512x_SDAC_SHIFT 4 | ||
162 | #define PCM512x_SDAC_MCK (0 << 4) | ||
163 | #define PCM512x_SDAC_PLL (1 << 4) | ||
164 | #define PCM512x_SDAC_SCK (3 << 4) | ||
165 | #define PCM512x_SDAC_BCK (4 << 4) | ||
166 | #define PCM512x_SDAC_GPIO (5 << 4) | ||
167 | |||
168 | /* Page 0, Register 16, 18 - GPIO source for DAC, PLL */ | ||
169 | #define PCM512x_GREF (7 << 0) | ||
170 | #define PCM512x_GREF_SHIFT 0 | ||
171 | #define PCM512x_GREF_GPIO1 (0 << 0) | ||
172 | #define PCM512x_GREF_GPIO2 (1 << 0) | ||
173 | #define PCM512x_GREF_GPIO3 (2 << 0) | ||
174 | #define PCM512x_GREF_GPIO4 (3 << 0) | ||
175 | #define PCM512x_GREF_GPIO5 (4 << 0) | ||
176 | #define PCM512x_GREF_GPIO6 (5 << 0) | ||
177 | |||
178 | /* Page 0, Register 19 - synchronize */ | ||
179 | #define PCM512x_RQSY (1 << 0) | ||
180 | #define PCM512x_RQSY_RESUME (0 << 0) | ||
181 | #define PCM512x_RQSY_HALT (1 << 0) | ||
182 | |||
183 | /* Page 0, Register 34 - fs speed mode */ | ||
184 | #define PCM512x_FSSP (3 << 0) | ||
185 | #define PCM512x_FSSP_SHIFT 0 | ||
186 | #define PCM512x_FSSP_48KHZ (0 << 0) | ||
187 | #define PCM512x_FSSP_96KHZ (1 << 0) | ||
188 | #define PCM512x_FSSP_192KHZ (2 << 0) | ||
189 | #define PCM512x_FSSP_384KHZ (3 << 0) | ||
124 | 190 | ||
125 | /* Page 0, Register 37 - Error detection */ | 191 | /* Page 0, Register 37 - Error detection */ |
126 | #define PCM512x_IPLK (1 << 0) | 192 | #define PCM512x_IPLK (1 << 0) |
@@ -131,6 +197,20 @@ | |||
131 | #define PCM512x_IDBK (1 << 5) | 197 | #define PCM512x_IDBK (1 << 5) |
132 | #define PCM512x_IDFS (1 << 6) | 198 | #define PCM512x_IDFS (1 << 6) |
133 | 199 | ||
200 | /* Page 0, Register 40 - I2S configuration */ | ||
201 | #define PCM512x_ALEN (3 << 0) | ||
202 | #define PCM512x_ALEN_SHIFT 0 | ||
203 | #define PCM512x_ALEN_16 (0 << 0) | ||
204 | #define PCM512x_ALEN_20 (1 << 0) | ||
205 | #define PCM512x_ALEN_24 (2 << 0) | ||
206 | #define PCM512x_ALEN_32 (3 << 0) | ||
207 | #define PCM512x_AFMT (3 << 4) | ||
208 | #define PCM512x_AFMT_SHIFT 4 | ||
209 | #define PCM512x_AFMT_I2S (0 << 4) | ||
210 | #define PCM512x_AFMT_DSP (1 << 4) | ||
211 | #define PCM512x_AFMT_RTJ (2 << 4) | ||
212 | #define PCM512x_AFMT_LTJ (3 << 4) | ||
213 | |||
134 | /* Page 0, Register 42 - DAC routing */ | 214 | /* Page 0, Register 42 - DAC routing */ |
135 | #define PCM512x_AUPR_SHIFT 0 | 215 | #define PCM512x_AUPR_SHIFT 0 |
136 | #define PCM512x_AUPL_SHIFT 4 | 216 | #define PCM512x_AUPL_SHIFT 4 |
@@ -152,7 +232,26 @@ | |||
152 | /* Page 0, Register 65 - Digital mute enables */ | 232 | /* Page 0, Register 65 - Digital mute enables */ |
153 | #define PCM512x_ACTL_SHIFT 2 | 233 | #define PCM512x_ACTL_SHIFT 2 |
154 | #define PCM512x_AMLE_SHIFT 1 | 234 | #define PCM512x_AMLE_SHIFT 1 |
155 | #define PCM512x_AMLR_SHIFT 0 | 235 | #define PCM512x_AMRE_SHIFT 0 |
236 | |||
237 | /* Page 0, Register 80-85, GPIO output selection */ | ||
238 | #define PCM512x_GxSL (31 << 0) | ||
239 | #define PCM512x_GxSL_SHIFT 0 | ||
240 | #define PCM512x_GxSL_OFF (0 << 0) | ||
241 | #define PCM512x_GxSL_DSP (1 << 0) | ||
242 | #define PCM512x_GxSL_REG (2 << 0) | ||
243 | #define PCM512x_GxSL_AMUTB (3 << 0) | ||
244 | #define PCM512x_GxSL_AMUTL (4 << 0) | ||
245 | #define PCM512x_GxSL_AMUTR (5 << 0) | ||
246 | #define PCM512x_GxSL_CLKI (6 << 0) | ||
247 | #define PCM512x_GxSL_SDOUT (7 << 0) | ||
248 | #define PCM512x_GxSL_ANMUL (8 << 0) | ||
249 | #define PCM512x_GxSL_ANMUR (9 << 0) | ||
250 | #define PCM512x_GxSL_PLLLK (10 << 0) | ||
251 | #define PCM512x_GxSL_CPCLK (11 << 0) | ||
252 | #define PCM512x_GxSL_UV0_7 (14 << 0) | ||
253 | #define PCM512x_GxSL_UV0_3 (15 << 0) | ||
254 | #define PCM512x_GxSL_PLLCK (16 << 0) | ||
156 | 255 | ||
157 | /* Page 1, Register 2 - analog volume control */ | 256 | /* Page 1, Register 2 - analog volume control */ |
158 | #define PCM512x_RAGN_SHIFT 0 | 257 | #define PCM512x_RAGN_SHIFT 0 |