blob: 29c4cfccd6b911ff748462f9a1008a0a9c731275 [file] [log] [blame]
Mark Brown9e6e96a2010-01-29 17:47:12 +00001/*
2 * wm8994.c -- WM8994 ALSA SoC Audio driver
3 *
4 * Copyright 2009 Wolfson Microelectronics plc
5 *
6 * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
7 *
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#include <linux/module.h>
15#include <linux/moduleparam.h>
16#include <linux/init.h>
17#include <linux/delay.h>
18#include <linux/pm.h>
19#include <linux/i2c.h>
20#include <linux/platform_device.h>
21#include <linux/regulator/consumer.h>
22#include <sound/core.h>
23#include <sound/pcm.h>
24#include <sound/pcm_params.h>
25#include <sound/soc.h>
26#include <sound/soc-dapm.h>
27#include <sound/initval.h>
28#include <sound/tlv.h>
29
30#include <linux/mfd/wm8994/core.h>
31#include <linux/mfd/wm8994/registers.h>
32#include <linux/mfd/wm8994/pdata.h>
33#include <linux/mfd/wm8994/gpio.h>
34
35#include "wm8994.h"
36#include "wm_hubs.h"
37
38static struct snd_soc_codec *wm8994_codec;
39struct snd_soc_codec_device soc_codec_dev_wm8994;
40
41struct fll_config {
42 int src;
43 int in;
44 int out;
45};
46
47#define WM8994_NUM_DRC 3
48#define WM8994_NUM_EQ 3
49
50static int wm8994_drc_base[] = {
51 WM8994_AIF1_DRC1_1,
52 WM8994_AIF1_DRC2_1,
53 WM8994_AIF2_DRC_1,
54};
55
56static int wm8994_retune_mobile_base[] = {
57 WM8994_AIF1_DAC1_EQ_GAINS_1,
58 WM8994_AIF1_DAC2_EQ_GAINS_1,
59 WM8994_AIF2_EQ_GAINS_1,
60};
61
62#define WM8994_REG_CACHE_SIZE 0x621
63
Mark Brown88766982010-03-29 20:57:12 +010064struct wm8994_micdet {
65 struct snd_soc_jack *jack;
66 int det;
67 int shrt;
68};
69
Mark Brown9e6e96a2010-01-29 17:47:12 +000070/* codec private data */
71struct wm8994_priv {
72 struct wm_hubs_data hubs;
73 struct snd_soc_codec codec;
74 u16 reg_cache[WM8994_REG_CACHE_SIZE + 1];
75 int sysclk[2];
76 int sysclk_rate[2];
77 int mclk[2];
78 int aifclk[2];
79 struct fll_config fll[2], fll_suspend[2];
80
81 int dac_rates[2];
82 int lrclk_shared[2];
83
84 /* Platform dependant DRC configuration */
85 const char **drc_texts;
86 int drc_cfg[WM8994_NUM_DRC];
87 struct soc_enum drc_enum;
88
89 /* Platform dependant ReTune mobile configuration */
90 int num_retune_mobile_texts;
91 const char **retune_mobile_texts;
92 int retune_mobile_cfg[WM8994_NUM_EQ];
93 struct soc_enum retune_mobile_enum;
94
Mark Brown88766982010-03-29 20:57:12 +010095 struct wm8994_micdet micdet[2];
96
Mark Brown9e6e96a2010-01-29 17:47:12 +000097 struct wm8994_pdata *pdata;
98};
99
100static struct {
101 unsigned short readable; /* Mask of readable bits */
102 unsigned short writable; /* Mask of writable bits */
103 unsigned short vol; /* Mask of volatile bits */
104} access_masks[] = {
105 { 0xFFFF, 0xFFFF, 0x0000 }, /* R0 - Software Reset */
106 { 0x3B37, 0x3B37, 0x0000 }, /* R1 - Power Management (1) */
107 { 0x6BF0, 0x6BF0, 0x0000 }, /* R2 - Power Management (2) */
108 { 0x3FF0, 0x3FF0, 0x0000 }, /* R3 - Power Management (3) */
109 { 0x3F3F, 0x3F3F, 0x0000 }, /* R4 - Power Management (4) */
110 { 0x3F0F, 0x3F0F, 0x0000 }, /* R5 - Power Management (5) */
111 { 0x003F, 0x003F, 0x0000 }, /* R6 - Power Management (6) */
112 { 0x0000, 0x0000, 0x0000 }, /* R7 */
113 { 0x0000, 0x0000, 0x0000 }, /* R8 */
114 { 0x0000, 0x0000, 0x0000 }, /* R9 */
115 { 0x0000, 0x0000, 0x0000 }, /* R10 */
116 { 0x0000, 0x0000, 0x0000 }, /* R11 */
117 { 0x0000, 0x0000, 0x0000 }, /* R12 */
118 { 0x0000, 0x0000, 0x0000 }, /* R13 */
119 { 0x0000, 0x0000, 0x0000 }, /* R14 */
120 { 0x0000, 0x0000, 0x0000 }, /* R15 */
121 { 0x0000, 0x0000, 0x0000 }, /* R16 */
122 { 0x0000, 0x0000, 0x0000 }, /* R17 */
123 { 0x0000, 0x0000, 0x0000 }, /* R18 */
124 { 0x0000, 0x0000, 0x0000 }, /* R19 */
125 { 0x0000, 0x0000, 0x0000 }, /* R20 */
126 { 0x01C0, 0x01C0, 0x0000 }, /* R21 - Input Mixer (1) */
127 { 0x0000, 0x0000, 0x0000 }, /* R22 */
128 { 0x0000, 0x0000, 0x0000 }, /* R23 */
129 { 0x00DF, 0x01DF, 0x0000 }, /* R24 - Left Line Input 1&2 Volume */
130 { 0x00DF, 0x01DF, 0x0000 }, /* R25 - Left Line Input 3&4 Volume */
131 { 0x00DF, 0x01DF, 0x0000 }, /* R26 - Right Line Input 1&2 Volume */
132 { 0x00DF, 0x01DF, 0x0000 }, /* R27 - Right Line Input 3&4 Volume */
133 { 0x00FF, 0x01FF, 0x0000 }, /* R28 - Left Output Volume */
134 { 0x00FF, 0x01FF, 0x0000 }, /* R29 - Right Output Volume */
135 { 0x0077, 0x0077, 0x0000 }, /* R30 - Line Outputs Volume */
136 { 0x0030, 0x0030, 0x0000 }, /* R31 - HPOUT2 Volume */
137 { 0x00FF, 0x01FF, 0x0000 }, /* R32 - Left OPGA Volume */
138 { 0x00FF, 0x01FF, 0x0000 }, /* R33 - Right OPGA Volume */
139 { 0x007F, 0x007F, 0x0000 }, /* R34 - SPKMIXL Attenuation */
140 { 0x017F, 0x017F, 0x0000 }, /* R35 - SPKMIXR Attenuation */
141 { 0x003F, 0x003F, 0x0000 }, /* R36 - SPKOUT Mixers */
142 { 0x003F, 0x003F, 0x0000 }, /* R37 - ClassD */
143 { 0x00FF, 0x01FF, 0x0000 }, /* R38 - Speaker Volume Left */
144 { 0x00FF, 0x01FF, 0x0000 }, /* R39 - Speaker Volume Right */
145 { 0x00FF, 0x00FF, 0x0000 }, /* R40 - Input Mixer (2) */
146 { 0x01B7, 0x01B7, 0x0000 }, /* R41 - Input Mixer (3) */
147 { 0x01B7, 0x01B7, 0x0000 }, /* R42 - Input Mixer (4) */
148 { 0x01C7, 0x01C7, 0x0000 }, /* R43 - Input Mixer (5) */
149 { 0x01C7, 0x01C7, 0x0000 }, /* R44 - Input Mixer (6) */
150 { 0x01FF, 0x01FF, 0x0000 }, /* R45 - Output Mixer (1) */
151 { 0x01FF, 0x01FF, 0x0000 }, /* R46 - Output Mixer (2) */
152 { 0x0FFF, 0x0FFF, 0x0000 }, /* R47 - Output Mixer (3) */
153 { 0x0FFF, 0x0FFF, 0x0000 }, /* R48 - Output Mixer (4) */
154 { 0x0FFF, 0x0FFF, 0x0000 }, /* R49 - Output Mixer (5) */
155 { 0x0FFF, 0x0FFF, 0x0000 }, /* R50 - Output Mixer (6) */
156 { 0x0038, 0x0038, 0x0000 }, /* R51 - HPOUT2 Mixer */
157 { 0x0077, 0x0077, 0x0000 }, /* R52 - Line Mixer (1) */
158 { 0x0077, 0x0077, 0x0000 }, /* R53 - Line Mixer (2) */
159 { 0x03FF, 0x03FF, 0x0000 }, /* R54 - Speaker Mixer */
160 { 0x00C1, 0x00C1, 0x0000 }, /* R55 - Additional Control */
161 { 0x00F0, 0x00F0, 0x0000 }, /* R56 - AntiPOP (1) */
162 { 0x01EF, 0x01EF, 0x0000 }, /* R57 - AntiPOP (2) */
163 { 0x00FF, 0x00FF, 0x0000 }, /* R58 - MICBIAS */
164 { 0x000F, 0x000F, 0x0000 }, /* R59 - LDO 1 */
165 { 0x0007, 0x0007, 0x0000 }, /* R60 - LDO 2 */
166 { 0x0000, 0x0000, 0x0000 }, /* R61 */
167 { 0x0000, 0x0000, 0x0000 }, /* R62 */
168 { 0x0000, 0x0000, 0x0000 }, /* R63 */
169 { 0x0000, 0x0000, 0x0000 }, /* R64 */
170 { 0x0000, 0x0000, 0x0000 }, /* R65 */
171 { 0x0000, 0x0000, 0x0000 }, /* R66 */
172 { 0x0000, 0x0000, 0x0000 }, /* R67 */
173 { 0x0000, 0x0000, 0x0000 }, /* R68 */
174 { 0x0000, 0x0000, 0x0000 }, /* R69 */
175 { 0x0000, 0x0000, 0x0000 }, /* R70 */
176 { 0x0000, 0x0000, 0x0000 }, /* R71 */
177 { 0x0000, 0x0000, 0x0000 }, /* R72 */
178 { 0x0000, 0x0000, 0x0000 }, /* R73 */
179 { 0x0000, 0x0000, 0x0000 }, /* R74 */
180 { 0x0000, 0x0000, 0x0000 }, /* R75 */
181 { 0x8000, 0x8000, 0x0000 }, /* R76 - Charge Pump (1) */
182 { 0x0000, 0x0000, 0x0000 }, /* R77 */
183 { 0x0000, 0x0000, 0x0000 }, /* R78 */
184 { 0x0000, 0x0000, 0x0000 }, /* R79 */
185 { 0x0000, 0x0000, 0x0000 }, /* R80 */
186 { 0x0301, 0x0301, 0x0000 }, /* R81 - Class W (1) */
187 { 0x0000, 0x0000, 0x0000 }, /* R82 */
188 { 0x0000, 0x0000, 0x0000 }, /* R83 */
189 { 0x333F, 0x333F, 0x0000 }, /* R84 - DC Servo (1) */
190 { 0x0FEF, 0x0FEF, 0x0000 }, /* R85 - DC Servo (2) */
191 { 0x0000, 0x0000, 0x0000 }, /* R86 */
192 { 0xFFFF, 0xFFFF, 0x0000 }, /* R87 - DC Servo (4) */
193 { 0x0333, 0x0000, 0x0000 }, /* R88 - DC Servo Readback */
194 { 0x0000, 0x0000, 0x0000 }, /* R89 */
195 { 0x0000, 0x0000, 0x0000 }, /* R90 */
196 { 0x0000, 0x0000, 0x0000 }, /* R91 */
197 { 0x0000, 0x0000, 0x0000 }, /* R92 */
198 { 0x0000, 0x0000, 0x0000 }, /* R93 */
199 { 0x0000, 0x0000, 0x0000 }, /* R94 */
200 { 0x0000, 0x0000, 0x0000 }, /* R95 */
201 { 0x00EE, 0x00EE, 0x0000 }, /* R96 - Analogue HP (1) */
202 { 0x0000, 0x0000, 0x0000 }, /* R97 */
203 { 0x0000, 0x0000, 0x0000 }, /* R98 */
204 { 0x0000, 0x0000, 0x0000 }, /* R99 */
205 { 0x0000, 0x0000, 0x0000 }, /* R100 */
206 { 0x0000, 0x0000, 0x0000 }, /* R101 */
207 { 0x0000, 0x0000, 0x0000 }, /* R102 */
208 { 0x0000, 0x0000, 0x0000 }, /* R103 */
209 { 0x0000, 0x0000, 0x0000 }, /* R104 */
210 { 0x0000, 0x0000, 0x0000 }, /* R105 */
211 { 0x0000, 0x0000, 0x0000 }, /* R106 */
212 { 0x0000, 0x0000, 0x0000 }, /* R107 */
213 { 0x0000, 0x0000, 0x0000 }, /* R108 */
214 { 0x0000, 0x0000, 0x0000 }, /* R109 */
215 { 0x0000, 0x0000, 0x0000 }, /* R110 */
216 { 0x0000, 0x0000, 0x0000 }, /* R111 */
217 { 0x0000, 0x0000, 0x0000 }, /* R112 */
218 { 0x0000, 0x0000, 0x0000 }, /* R113 */
219 { 0x0000, 0x0000, 0x0000 }, /* R114 */
220 { 0x0000, 0x0000, 0x0000 }, /* R115 */
221 { 0x0000, 0x0000, 0x0000 }, /* R116 */
222 { 0x0000, 0x0000, 0x0000 }, /* R117 */
223 { 0x0000, 0x0000, 0x0000 }, /* R118 */
224 { 0x0000, 0x0000, 0x0000 }, /* R119 */
225 { 0x0000, 0x0000, 0x0000 }, /* R120 */
226 { 0x0000, 0x0000, 0x0000 }, /* R121 */
227 { 0x0000, 0x0000, 0x0000 }, /* R122 */
228 { 0x0000, 0x0000, 0x0000 }, /* R123 */
229 { 0x0000, 0x0000, 0x0000 }, /* R124 */
230 { 0x0000, 0x0000, 0x0000 }, /* R125 */
231 { 0x0000, 0x0000, 0x0000 }, /* R126 */
232 { 0x0000, 0x0000, 0x0000 }, /* R127 */
233 { 0x0000, 0x0000, 0x0000 }, /* R128 */
234 { 0x0000, 0x0000, 0x0000 }, /* R129 */
235 { 0x0000, 0x0000, 0x0000 }, /* R130 */
236 { 0x0000, 0x0000, 0x0000 }, /* R131 */
237 { 0x0000, 0x0000, 0x0000 }, /* R132 */
238 { 0x0000, 0x0000, 0x0000 }, /* R133 */
239 { 0x0000, 0x0000, 0x0000 }, /* R134 */
240 { 0x0000, 0x0000, 0x0000 }, /* R135 */
241 { 0x0000, 0x0000, 0x0000 }, /* R136 */
242 { 0x0000, 0x0000, 0x0000 }, /* R137 */
243 { 0x0000, 0x0000, 0x0000 }, /* R138 */
244 { 0x0000, 0x0000, 0x0000 }, /* R139 */
245 { 0x0000, 0x0000, 0x0000 }, /* R140 */
246 { 0x0000, 0x0000, 0x0000 }, /* R141 */
247 { 0x0000, 0x0000, 0x0000 }, /* R142 */
248 { 0x0000, 0x0000, 0x0000 }, /* R143 */
249 { 0x0000, 0x0000, 0x0000 }, /* R144 */
250 { 0x0000, 0x0000, 0x0000 }, /* R145 */
251 { 0x0000, 0x0000, 0x0000 }, /* R146 */
252 { 0x0000, 0x0000, 0x0000 }, /* R147 */
253 { 0x0000, 0x0000, 0x0000 }, /* R148 */
254 { 0x0000, 0x0000, 0x0000 }, /* R149 */
255 { 0x0000, 0x0000, 0x0000 }, /* R150 */
256 { 0x0000, 0x0000, 0x0000 }, /* R151 */
257 { 0x0000, 0x0000, 0x0000 }, /* R152 */
258 { 0x0000, 0x0000, 0x0000 }, /* R153 */
259 { 0x0000, 0x0000, 0x0000 }, /* R154 */
260 { 0x0000, 0x0000, 0x0000 }, /* R155 */
261 { 0x0000, 0x0000, 0x0000 }, /* R156 */
262 { 0x0000, 0x0000, 0x0000 }, /* R157 */
263 { 0x0000, 0x0000, 0x0000 }, /* R158 */
264 { 0x0000, 0x0000, 0x0000 }, /* R159 */
265 { 0x0000, 0x0000, 0x0000 }, /* R160 */
266 { 0x0000, 0x0000, 0x0000 }, /* R161 */
267 { 0x0000, 0x0000, 0x0000 }, /* R162 */
268 { 0x0000, 0x0000, 0x0000 }, /* R163 */
269 { 0x0000, 0x0000, 0x0000 }, /* R164 */
270 { 0x0000, 0x0000, 0x0000 }, /* R165 */
271 { 0x0000, 0x0000, 0x0000 }, /* R166 */
272 { 0x0000, 0x0000, 0x0000 }, /* R167 */
273 { 0x0000, 0x0000, 0x0000 }, /* R168 */
274 { 0x0000, 0x0000, 0x0000 }, /* R169 */
275 { 0x0000, 0x0000, 0x0000 }, /* R170 */
276 { 0x0000, 0x0000, 0x0000 }, /* R171 */
277 { 0x0000, 0x0000, 0x0000 }, /* R172 */
278 { 0x0000, 0x0000, 0x0000 }, /* R173 */
279 { 0x0000, 0x0000, 0x0000 }, /* R174 */
280 { 0x0000, 0x0000, 0x0000 }, /* R175 */
281 { 0x0000, 0x0000, 0x0000 }, /* R176 */
282 { 0x0000, 0x0000, 0x0000 }, /* R177 */
283 { 0x0000, 0x0000, 0x0000 }, /* R178 */
284 { 0x0000, 0x0000, 0x0000 }, /* R179 */
285 { 0x0000, 0x0000, 0x0000 }, /* R180 */
286 { 0x0000, 0x0000, 0x0000 }, /* R181 */
287 { 0x0000, 0x0000, 0x0000 }, /* R182 */
288 { 0x0000, 0x0000, 0x0000 }, /* R183 */
289 { 0x0000, 0x0000, 0x0000 }, /* R184 */
290 { 0x0000, 0x0000, 0x0000 }, /* R185 */
291 { 0x0000, 0x0000, 0x0000 }, /* R186 */
292 { 0x0000, 0x0000, 0x0000 }, /* R187 */
293 { 0x0000, 0x0000, 0x0000 }, /* R188 */
294 { 0x0000, 0x0000, 0x0000 }, /* R189 */
295 { 0x0000, 0x0000, 0x0000 }, /* R190 */
296 { 0x0000, 0x0000, 0x0000 }, /* R191 */
297 { 0x0000, 0x0000, 0x0000 }, /* R192 */
298 { 0x0000, 0x0000, 0x0000 }, /* R193 */
299 { 0x0000, 0x0000, 0x0000 }, /* R194 */
300 { 0x0000, 0x0000, 0x0000 }, /* R195 */
301 { 0x0000, 0x0000, 0x0000 }, /* R196 */
302 { 0x0000, 0x0000, 0x0000 }, /* R197 */
303 { 0x0000, 0x0000, 0x0000 }, /* R198 */
304 { 0x0000, 0x0000, 0x0000 }, /* R199 */
305 { 0x0000, 0x0000, 0x0000 }, /* R200 */
306 { 0x0000, 0x0000, 0x0000 }, /* R201 */
307 { 0x0000, 0x0000, 0x0000 }, /* R202 */
308 { 0x0000, 0x0000, 0x0000 }, /* R203 */
309 { 0x0000, 0x0000, 0x0000 }, /* R204 */
310 { 0x0000, 0x0000, 0x0000 }, /* R205 */
311 { 0x0000, 0x0000, 0x0000 }, /* R206 */
312 { 0x0000, 0x0000, 0x0000 }, /* R207 */
313 { 0x0000, 0x0000, 0x0000 }, /* R208 */
314 { 0x0000, 0x0000, 0x0000 }, /* R209 */
315 { 0x0000, 0x0000, 0x0000 }, /* R210 */
316 { 0x0000, 0x0000, 0x0000 }, /* R211 */
317 { 0x0000, 0x0000, 0x0000 }, /* R212 */
318 { 0x0000, 0x0000, 0x0000 }, /* R213 */
319 { 0x0000, 0x0000, 0x0000 }, /* R214 */
320 { 0x0000, 0x0000, 0x0000 }, /* R215 */
321 { 0x0000, 0x0000, 0x0000 }, /* R216 */
322 { 0x0000, 0x0000, 0x0000 }, /* R217 */
323 { 0x0000, 0x0000, 0x0000 }, /* R218 */
324 { 0x0000, 0x0000, 0x0000 }, /* R219 */
325 { 0x0000, 0x0000, 0x0000 }, /* R220 */
326 { 0x0000, 0x0000, 0x0000 }, /* R221 */
327 { 0x0000, 0x0000, 0x0000 }, /* R222 */
328 { 0x0000, 0x0000, 0x0000 }, /* R223 */
329 { 0x0000, 0x0000, 0x0000 }, /* R224 */
330 { 0x0000, 0x0000, 0x0000 }, /* R225 */
331 { 0x0000, 0x0000, 0x0000 }, /* R226 */
332 { 0x0000, 0x0000, 0x0000 }, /* R227 */
333 { 0x0000, 0x0000, 0x0000 }, /* R228 */
334 { 0x0000, 0x0000, 0x0000 }, /* R229 */
335 { 0x0000, 0x0000, 0x0000 }, /* R230 */
336 { 0x0000, 0x0000, 0x0000 }, /* R231 */
337 { 0x0000, 0x0000, 0x0000 }, /* R232 */
338 { 0x0000, 0x0000, 0x0000 }, /* R233 */
339 { 0x0000, 0x0000, 0x0000 }, /* R234 */
340 { 0x0000, 0x0000, 0x0000 }, /* R235 */
341 { 0x0000, 0x0000, 0x0000 }, /* R236 */
342 { 0x0000, 0x0000, 0x0000 }, /* R237 */
343 { 0x0000, 0x0000, 0x0000 }, /* R238 */
344 { 0x0000, 0x0000, 0x0000 }, /* R239 */
345 { 0x0000, 0x0000, 0x0000 }, /* R240 */
346 { 0x0000, 0x0000, 0x0000 }, /* R241 */
347 { 0x0000, 0x0000, 0x0000 }, /* R242 */
348 { 0x0000, 0x0000, 0x0000 }, /* R243 */
349 { 0x0000, 0x0000, 0x0000 }, /* R244 */
350 { 0x0000, 0x0000, 0x0000 }, /* R245 */
351 { 0x0000, 0x0000, 0x0000 }, /* R246 */
352 { 0x0000, 0x0000, 0x0000 }, /* R247 */
353 { 0x0000, 0x0000, 0x0000 }, /* R248 */
354 { 0x0000, 0x0000, 0x0000 }, /* R249 */
355 { 0x0000, 0x0000, 0x0000 }, /* R250 */
356 { 0x0000, 0x0000, 0x0000 }, /* R251 */
357 { 0x0000, 0x0000, 0x0000 }, /* R252 */
358 { 0x0000, 0x0000, 0x0000 }, /* R253 */
359 { 0x0000, 0x0000, 0x0000 }, /* R254 */
360 { 0x0000, 0x0000, 0x0000 }, /* R255 */
361 { 0x000F, 0x0000, 0x0000 }, /* R256 - Chip Revision */
362 { 0x0074, 0x0074, 0x0000 }, /* R257 - Control Interface */
363 { 0x0000, 0x0000, 0x0000 }, /* R258 */
364 { 0x0000, 0x0000, 0x0000 }, /* R259 */
365 { 0x0000, 0x0000, 0x0000 }, /* R260 */
366 { 0x0000, 0x0000, 0x0000 }, /* R261 */
367 { 0x0000, 0x0000, 0x0000 }, /* R262 */
368 { 0x0000, 0x0000, 0x0000 }, /* R263 */
369 { 0x0000, 0x0000, 0x0000 }, /* R264 */
370 { 0x0000, 0x0000, 0x0000 }, /* R265 */
371 { 0x0000, 0x0000, 0x0000 }, /* R266 */
372 { 0x0000, 0x0000, 0x0000 }, /* R267 */
373 { 0x0000, 0x0000, 0x0000 }, /* R268 */
374 { 0x0000, 0x0000, 0x0000 }, /* R269 */
375 { 0x0000, 0x0000, 0x0000 }, /* R270 */
376 { 0x0000, 0x0000, 0x0000 }, /* R271 */
377 { 0x807F, 0x837F, 0x0000 }, /* R272 - Write Sequencer Ctrl (1) */
378 { 0x017F, 0x0000, 0x0000 }, /* R273 - Write Sequencer Ctrl (2) */
379 { 0x0000, 0x0000, 0x0000 }, /* R274 */
380 { 0x0000, 0x0000, 0x0000 }, /* R275 */
381 { 0x0000, 0x0000, 0x0000 }, /* R276 */
382 { 0x0000, 0x0000, 0x0000 }, /* R277 */
383 { 0x0000, 0x0000, 0x0000 }, /* R278 */
384 { 0x0000, 0x0000, 0x0000 }, /* R279 */
385 { 0x0000, 0x0000, 0x0000 }, /* R280 */
386 { 0x0000, 0x0000, 0x0000 }, /* R281 */
387 { 0x0000, 0x0000, 0x0000 }, /* R282 */
388 { 0x0000, 0x0000, 0x0000 }, /* R283 */
389 { 0x0000, 0x0000, 0x0000 }, /* R284 */
390 { 0x0000, 0x0000, 0x0000 }, /* R285 */
391 { 0x0000, 0x0000, 0x0000 }, /* R286 */
392 { 0x0000, 0x0000, 0x0000 }, /* R287 */
393 { 0x0000, 0x0000, 0x0000 }, /* R288 */
394 { 0x0000, 0x0000, 0x0000 }, /* R289 */
395 { 0x0000, 0x0000, 0x0000 }, /* R290 */
396 { 0x0000, 0x0000, 0x0000 }, /* R291 */
397 { 0x0000, 0x0000, 0x0000 }, /* R292 */
398 { 0x0000, 0x0000, 0x0000 }, /* R293 */
399 { 0x0000, 0x0000, 0x0000 }, /* R294 */
400 { 0x0000, 0x0000, 0x0000 }, /* R295 */
401 { 0x0000, 0x0000, 0x0000 }, /* R296 */
402 { 0x0000, 0x0000, 0x0000 }, /* R297 */
403 { 0x0000, 0x0000, 0x0000 }, /* R298 */
404 { 0x0000, 0x0000, 0x0000 }, /* R299 */
405 { 0x0000, 0x0000, 0x0000 }, /* R300 */
406 { 0x0000, 0x0000, 0x0000 }, /* R301 */
407 { 0x0000, 0x0000, 0x0000 }, /* R302 */
408 { 0x0000, 0x0000, 0x0000 }, /* R303 */
409 { 0x0000, 0x0000, 0x0000 }, /* R304 */
410 { 0x0000, 0x0000, 0x0000 }, /* R305 */
411 { 0x0000, 0x0000, 0x0000 }, /* R306 */
412 { 0x0000, 0x0000, 0x0000 }, /* R307 */
413 { 0x0000, 0x0000, 0x0000 }, /* R308 */
414 { 0x0000, 0x0000, 0x0000 }, /* R309 */
415 { 0x0000, 0x0000, 0x0000 }, /* R310 */
416 { 0x0000, 0x0000, 0x0000 }, /* R311 */
417 { 0x0000, 0x0000, 0x0000 }, /* R312 */
418 { 0x0000, 0x0000, 0x0000 }, /* R313 */
419 { 0x0000, 0x0000, 0x0000 }, /* R314 */
420 { 0x0000, 0x0000, 0x0000 }, /* R315 */
421 { 0x0000, 0x0000, 0x0000 }, /* R316 */
422 { 0x0000, 0x0000, 0x0000 }, /* R317 */
423 { 0x0000, 0x0000, 0x0000 }, /* R318 */
424 { 0x0000, 0x0000, 0x0000 }, /* R319 */
425 { 0x0000, 0x0000, 0x0000 }, /* R320 */
426 { 0x0000, 0x0000, 0x0000 }, /* R321 */
427 { 0x0000, 0x0000, 0x0000 }, /* R322 */
428 { 0x0000, 0x0000, 0x0000 }, /* R323 */
429 { 0x0000, 0x0000, 0x0000 }, /* R324 */
430 { 0x0000, 0x0000, 0x0000 }, /* R325 */
431 { 0x0000, 0x0000, 0x0000 }, /* R326 */
432 { 0x0000, 0x0000, 0x0000 }, /* R327 */
433 { 0x0000, 0x0000, 0x0000 }, /* R328 */
434 { 0x0000, 0x0000, 0x0000 }, /* R329 */
435 { 0x0000, 0x0000, 0x0000 }, /* R330 */
436 { 0x0000, 0x0000, 0x0000 }, /* R331 */
437 { 0x0000, 0x0000, 0x0000 }, /* R332 */
438 { 0x0000, 0x0000, 0x0000 }, /* R333 */
439 { 0x0000, 0x0000, 0x0000 }, /* R334 */
440 { 0x0000, 0x0000, 0x0000 }, /* R335 */
441 { 0x0000, 0x0000, 0x0000 }, /* R336 */
442 { 0x0000, 0x0000, 0x0000 }, /* R337 */
443 { 0x0000, 0x0000, 0x0000 }, /* R338 */
444 { 0x0000, 0x0000, 0x0000 }, /* R339 */
445 { 0x0000, 0x0000, 0x0000 }, /* R340 */
446 { 0x0000, 0x0000, 0x0000 }, /* R341 */
447 { 0x0000, 0x0000, 0x0000 }, /* R342 */
448 { 0x0000, 0x0000, 0x0000 }, /* R343 */
449 { 0x0000, 0x0000, 0x0000 }, /* R344 */
450 { 0x0000, 0x0000, 0x0000 }, /* R345 */
451 { 0x0000, 0x0000, 0x0000 }, /* R346 */
452 { 0x0000, 0x0000, 0x0000 }, /* R347 */
453 { 0x0000, 0x0000, 0x0000 }, /* R348 */
454 { 0x0000, 0x0000, 0x0000 }, /* R349 */
455 { 0x0000, 0x0000, 0x0000 }, /* R350 */
456 { 0x0000, 0x0000, 0x0000 }, /* R351 */
457 { 0x0000, 0x0000, 0x0000 }, /* R352 */
458 { 0x0000, 0x0000, 0x0000 }, /* R353 */
459 { 0x0000, 0x0000, 0x0000 }, /* R354 */
460 { 0x0000, 0x0000, 0x0000 }, /* R355 */
461 { 0x0000, 0x0000, 0x0000 }, /* R356 */
462 { 0x0000, 0x0000, 0x0000 }, /* R357 */
463 { 0x0000, 0x0000, 0x0000 }, /* R358 */
464 { 0x0000, 0x0000, 0x0000 }, /* R359 */
465 { 0x0000, 0x0000, 0x0000 }, /* R360 */
466 { 0x0000, 0x0000, 0x0000 }, /* R361 */
467 { 0x0000, 0x0000, 0x0000 }, /* R362 */
468 { 0x0000, 0x0000, 0x0000 }, /* R363 */
469 { 0x0000, 0x0000, 0x0000 }, /* R364 */
470 { 0x0000, 0x0000, 0x0000 }, /* R365 */
471 { 0x0000, 0x0000, 0x0000 }, /* R366 */
472 { 0x0000, 0x0000, 0x0000 }, /* R367 */
473 { 0x0000, 0x0000, 0x0000 }, /* R368 */
474 { 0x0000, 0x0000, 0x0000 }, /* R369 */
475 { 0x0000, 0x0000, 0x0000 }, /* R370 */
476 { 0x0000, 0x0000, 0x0000 }, /* R371 */
477 { 0x0000, 0x0000, 0x0000 }, /* R372 */
478 { 0x0000, 0x0000, 0x0000 }, /* R373 */
479 { 0x0000, 0x0000, 0x0000 }, /* R374 */
480 { 0x0000, 0x0000, 0x0000 }, /* R375 */
481 { 0x0000, 0x0000, 0x0000 }, /* R376 */
482 { 0x0000, 0x0000, 0x0000 }, /* R377 */
483 { 0x0000, 0x0000, 0x0000 }, /* R378 */
484 { 0x0000, 0x0000, 0x0000 }, /* R379 */
485 { 0x0000, 0x0000, 0x0000 }, /* R380 */
486 { 0x0000, 0x0000, 0x0000 }, /* R381 */
487 { 0x0000, 0x0000, 0x0000 }, /* R382 */
488 { 0x0000, 0x0000, 0x0000 }, /* R383 */
489 { 0x0000, 0x0000, 0x0000 }, /* R384 */
490 { 0x0000, 0x0000, 0x0000 }, /* R385 */
491 { 0x0000, 0x0000, 0x0000 }, /* R386 */
492 { 0x0000, 0x0000, 0x0000 }, /* R387 */
493 { 0x0000, 0x0000, 0x0000 }, /* R388 */
494 { 0x0000, 0x0000, 0x0000 }, /* R389 */
495 { 0x0000, 0x0000, 0x0000 }, /* R390 */
496 { 0x0000, 0x0000, 0x0000 }, /* R391 */
497 { 0x0000, 0x0000, 0x0000 }, /* R392 */
498 { 0x0000, 0x0000, 0x0000 }, /* R393 */
499 { 0x0000, 0x0000, 0x0000 }, /* R394 */
500 { 0x0000, 0x0000, 0x0000 }, /* R395 */
501 { 0x0000, 0x0000, 0x0000 }, /* R396 */
502 { 0x0000, 0x0000, 0x0000 }, /* R397 */
503 { 0x0000, 0x0000, 0x0000 }, /* R398 */
504 { 0x0000, 0x0000, 0x0000 }, /* R399 */
505 { 0x0000, 0x0000, 0x0000 }, /* R400 */
506 { 0x0000, 0x0000, 0x0000 }, /* R401 */
507 { 0x0000, 0x0000, 0x0000 }, /* R402 */
508 { 0x0000, 0x0000, 0x0000 }, /* R403 */
509 { 0x0000, 0x0000, 0x0000 }, /* R404 */
510 { 0x0000, 0x0000, 0x0000 }, /* R405 */
511 { 0x0000, 0x0000, 0x0000 }, /* R406 */
512 { 0x0000, 0x0000, 0x0000 }, /* R407 */
513 { 0x0000, 0x0000, 0x0000 }, /* R408 */
514 { 0x0000, 0x0000, 0x0000 }, /* R409 */
515 { 0x0000, 0x0000, 0x0000 }, /* R410 */
516 { 0x0000, 0x0000, 0x0000 }, /* R411 */
517 { 0x0000, 0x0000, 0x0000 }, /* R412 */
518 { 0x0000, 0x0000, 0x0000 }, /* R413 */
519 { 0x0000, 0x0000, 0x0000 }, /* R414 */
520 { 0x0000, 0x0000, 0x0000 }, /* R415 */
521 { 0x0000, 0x0000, 0x0000 }, /* R416 */
522 { 0x0000, 0x0000, 0x0000 }, /* R417 */
523 { 0x0000, 0x0000, 0x0000 }, /* R418 */
524 { 0x0000, 0x0000, 0x0000 }, /* R419 */
525 { 0x0000, 0x0000, 0x0000 }, /* R420 */
526 { 0x0000, 0x0000, 0x0000 }, /* R421 */
527 { 0x0000, 0x0000, 0x0000 }, /* R422 */
528 { 0x0000, 0x0000, 0x0000 }, /* R423 */
529 { 0x0000, 0x0000, 0x0000 }, /* R424 */
530 { 0x0000, 0x0000, 0x0000 }, /* R425 */
531 { 0x0000, 0x0000, 0x0000 }, /* R426 */
532 { 0x0000, 0x0000, 0x0000 }, /* R427 */
533 { 0x0000, 0x0000, 0x0000 }, /* R428 */
534 { 0x0000, 0x0000, 0x0000 }, /* R429 */
535 { 0x0000, 0x0000, 0x0000 }, /* R430 */
536 { 0x0000, 0x0000, 0x0000 }, /* R431 */
537 { 0x0000, 0x0000, 0x0000 }, /* R432 */
538 { 0x0000, 0x0000, 0x0000 }, /* R433 */
539 { 0x0000, 0x0000, 0x0000 }, /* R434 */
540 { 0x0000, 0x0000, 0x0000 }, /* R435 */
541 { 0x0000, 0x0000, 0x0000 }, /* R436 */
542 { 0x0000, 0x0000, 0x0000 }, /* R437 */
543 { 0x0000, 0x0000, 0x0000 }, /* R438 */
544 { 0x0000, 0x0000, 0x0000 }, /* R439 */
545 { 0x0000, 0x0000, 0x0000 }, /* R440 */
546 { 0x0000, 0x0000, 0x0000 }, /* R441 */
547 { 0x0000, 0x0000, 0x0000 }, /* R442 */
548 { 0x0000, 0x0000, 0x0000 }, /* R443 */
549 { 0x0000, 0x0000, 0x0000 }, /* R444 */
550 { 0x0000, 0x0000, 0x0000 }, /* R445 */
551 { 0x0000, 0x0000, 0x0000 }, /* R446 */
552 { 0x0000, 0x0000, 0x0000 }, /* R447 */
553 { 0x0000, 0x0000, 0x0000 }, /* R448 */
554 { 0x0000, 0x0000, 0x0000 }, /* R449 */
555 { 0x0000, 0x0000, 0x0000 }, /* R450 */
556 { 0x0000, 0x0000, 0x0000 }, /* R451 */
557 { 0x0000, 0x0000, 0x0000 }, /* R452 */
558 { 0x0000, 0x0000, 0x0000 }, /* R453 */
559 { 0x0000, 0x0000, 0x0000 }, /* R454 */
560 { 0x0000, 0x0000, 0x0000 }, /* R455 */
561 { 0x0000, 0x0000, 0x0000 }, /* R456 */
562 { 0x0000, 0x0000, 0x0000 }, /* R457 */
563 { 0x0000, 0x0000, 0x0000 }, /* R458 */
564 { 0x0000, 0x0000, 0x0000 }, /* R459 */
565 { 0x0000, 0x0000, 0x0000 }, /* R460 */
566 { 0x0000, 0x0000, 0x0000 }, /* R461 */
567 { 0x0000, 0x0000, 0x0000 }, /* R462 */
568 { 0x0000, 0x0000, 0x0000 }, /* R463 */
569 { 0x0000, 0x0000, 0x0000 }, /* R464 */
570 { 0x0000, 0x0000, 0x0000 }, /* R465 */
571 { 0x0000, 0x0000, 0x0000 }, /* R466 */
572 { 0x0000, 0x0000, 0x0000 }, /* R467 */
573 { 0x0000, 0x0000, 0x0000 }, /* R468 */
574 { 0x0000, 0x0000, 0x0000 }, /* R469 */
575 { 0x0000, 0x0000, 0x0000 }, /* R470 */
576 { 0x0000, 0x0000, 0x0000 }, /* R471 */
577 { 0x0000, 0x0000, 0x0000 }, /* R472 */
578 { 0x0000, 0x0000, 0x0000 }, /* R473 */
579 { 0x0000, 0x0000, 0x0000 }, /* R474 */
580 { 0x0000, 0x0000, 0x0000 }, /* R475 */
581 { 0x0000, 0x0000, 0x0000 }, /* R476 */
582 { 0x0000, 0x0000, 0x0000 }, /* R477 */
583 { 0x0000, 0x0000, 0x0000 }, /* R478 */
584 { 0x0000, 0x0000, 0x0000 }, /* R479 */
585 { 0x0000, 0x0000, 0x0000 }, /* R480 */
586 { 0x0000, 0x0000, 0x0000 }, /* R481 */
587 { 0x0000, 0x0000, 0x0000 }, /* R482 */
588 { 0x0000, 0x0000, 0x0000 }, /* R483 */
589 { 0x0000, 0x0000, 0x0000 }, /* R484 */
590 { 0x0000, 0x0000, 0x0000 }, /* R485 */
591 { 0x0000, 0x0000, 0x0000 }, /* R486 */
592 { 0x0000, 0x0000, 0x0000 }, /* R487 */
593 { 0x0000, 0x0000, 0x0000 }, /* R488 */
594 { 0x0000, 0x0000, 0x0000 }, /* R489 */
595 { 0x0000, 0x0000, 0x0000 }, /* R490 */
596 { 0x0000, 0x0000, 0x0000 }, /* R491 */
597 { 0x0000, 0x0000, 0x0000 }, /* R492 */
598 { 0x0000, 0x0000, 0x0000 }, /* R493 */
599 { 0x0000, 0x0000, 0x0000 }, /* R494 */
600 { 0x0000, 0x0000, 0x0000 }, /* R495 */
601 { 0x0000, 0x0000, 0x0000 }, /* R496 */
602 { 0x0000, 0x0000, 0x0000 }, /* R497 */
603 { 0x0000, 0x0000, 0x0000 }, /* R498 */
604 { 0x0000, 0x0000, 0x0000 }, /* R499 */
605 { 0x0000, 0x0000, 0x0000 }, /* R500 */
606 { 0x0000, 0x0000, 0x0000 }, /* R501 */
607 { 0x0000, 0x0000, 0x0000 }, /* R502 */
608 { 0x0000, 0x0000, 0x0000 }, /* R503 */
609 { 0x0000, 0x0000, 0x0000 }, /* R504 */
610 { 0x0000, 0x0000, 0x0000 }, /* R505 */
611 { 0x0000, 0x0000, 0x0000 }, /* R506 */
612 { 0x0000, 0x0000, 0x0000 }, /* R507 */
613 { 0x0000, 0x0000, 0x0000 }, /* R508 */
614 { 0x0000, 0x0000, 0x0000 }, /* R509 */
615 { 0x0000, 0x0000, 0x0000 }, /* R510 */
616 { 0x0000, 0x0000, 0x0000 }, /* R511 */
617 { 0x001F, 0x001F, 0x0000 }, /* R512 - AIF1 Clocking (1) */
618 { 0x003F, 0x003F, 0x0000 }, /* R513 - AIF1 Clocking (2) */
619 { 0x0000, 0x0000, 0x0000 }, /* R514 */
620 { 0x0000, 0x0000, 0x0000 }, /* R515 */
621 { 0x001F, 0x001F, 0x0000 }, /* R516 - AIF2 Clocking (1) */
622 { 0x003F, 0x003F, 0x0000 }, /* R517 - AIF2 Clocking (2) */
623 { 0x0000, 0x0000, 0x0000 }, /* R518 */
624 { 0x0000, 0x0000, 0x0000 }, /* R519 */
625 { 0x001F, 0x001F, 0x0000 }, /* R520 - Clocking (1) */
626 { 0x0777, 0x0777, 0x0000 }, /* R521 - Clocking (2) */
627 { 0x0000, 0x0000, 0x0000 }, /* R522 */
628 { 0x0000, 0x0000, 0x0000 }, /* R523 */
629 { 0x0000, 0x0000, 0x0000 }, /* R524 */
630 { 0x0000, 0x0000, 0x0000 }, /* R525 */
631 { 0x0000, 0x0000, 0x0000 }, /* R526 */
632 { 0x0000, 0x0000, 0x0000 }, /* R527 */
633 { 0x00FF, 0x00FF, 0x0000 }, /* R528 - AIF1 Rate */
634 { 0x00FF, 0x00FF, 0x0000 }, /* R529 - AIF2 Rate */
635 { 0x000F, 0x0000, 0x0000 }, /* R530 - Rate Status */
636 { 0x0000, 0x0000, 0x0000 }, /* R531 */
637 { 0x0000, 0x0000, 0x0000 }, /* R532 */
638 { 0x0000, 0x0000, 0x0000 }, /* R533 */
639 { 0x0000, 0x0000, 0x0000 }, /* R534 */
640 { 0x0000, 0x0000, 0x0000 }, /* R535 */
641 { 0x0000, 0x0000, 0x0000 }, /* R536 */
642 { 0x0000, 0x0000, 0x0000 }, /* R537 */
643 { 0x0000, 0x0000, 0x0000 }, /* R538 */
644 { 0x0000, 0x0000, 0x0000 }, /* R539 */
645 { 0x0000, 0x0000, 0x0000 }, /* R540 */
646 { 0x0000, 0x0000, 0x0000 }, /* R541 */
647 { 0x0000, 0x0000, 0x0000 }, /* R542 */
648 { 0x0000, 0x0000, 0x0000 }, /* R543 */
649 { 0x0007, 0x0007, 0x0000 }, /* R544 - FLL1 Control (1) */
650 { 0x3F77, 0x3F77, 0x0000 }, /* R545 - FLL1 Control (2) */
651 { 0xFFFF, 0xFFFF, 0x0000 }, /* R546 - FLL1 Control (3) */
652 { 0x7FEF, 0x7FEF, 0x0000 }, /* R547 - FLL1 Control (4) */
653 { 0x1FDB, 0x1FDB, 0x0000 }, /* R548 - FLL1 Control (5) */
654 { 0x0000, 0x0000, 0x0000 }, /* R549 */
655 { 0x0000, 0x0000, 0x0000 }, /* R550 */
656 { 0x0000, 0x0000, 0x0000 }, /* R551 */
657 { 0x0000, 0x0000, 0x0000 }, /* R552 */
658 { 0x0000, 0x0000, 0x0000 }, /* R553 */
659 { 0x0000, 0x0000, 0x0000 }, /* R554 */
660 { 0x0000, 0x0000, 0x0000 }, /* R555 */
661 { 0x0000, 0x0000, 0x0000 }, /* R556 */
662 { 0x0000, 0x0000, 0x0000 }, /* R557 */
663 { 0x0000, 0x0000, 0x0000 }, /* R558 */
664 { 0x0000, 0x0000, 0x0000 }, /* R559 */
665 { 0x0000, 0x0000, 0x0000 }, /* R560 */
666 { 0x0000, 0x0000, 0x0000 }, /* R561 */
667 { 0x0000, 0x0000, 0x0000 }, /* R562 */
668 { 0x0000, 0x0000, 0x0000 }, /* R563 */
669 { 0x0000, 0x0000, 0x0000 }, /* R564 */
670 { 0x0000, 0x0000, 0x0000 }, /* R565 */
671 { 0x0000, 0x0000, 0x0000 }, /* R566 */
672 { 0x0000, 0x0000, 0x0000 }, /* R567 */
673 { 0x0000, 0x0000, 0x0000 }, /* R568 */
674 { 0x0000, 0x0000, 0x0000 }, /* R569 */
675 { 0x0000, 0x0000, 0x0000 }, /* R570 */
676 { 0x0000, 0x0000, 0x0000 }, /* R571 */
677 { 0x0000, 0x0000, 0x0000 }, /* R572 */
678 { 0x0000, 0x0000, 0x0000 }, /* R573 */
679 { 0x0000, 0x0000, 0x0000 }, /* R574 */
680 { 0x0000, 0x0000, 0x0000 }, /* R575 */
681 { 0x0007, 0x0007, 0x0000 }, /* R576 - FLL2 Control (1) */
682 { 0x3F77, 0x3F77, 0x0000 }, /* R577 - FLL2 Control (2) */
683 { 0xFFFF, 0xFFFF, 0x0000 }, /* R578 - FLL2 Control (3) */
684 { 0x7FEF, 0x7FEF, 0x0000 }, /* R579 - FLL2 Control (4) */
685 { 0x1FDB, 0x1FDB, 0x0000 }, /* R580 - FLL2 Control (5) */
686 { 0x0000, 0x0000, 0x0000 }, /* R581 */
687 { 0x0000, 0x0000, 0x0000 }, /* R582 */
688 { 0x0000, 0x0000, 0x0000 }, /* R583 */
689 { 0x0000, 0x0000, 0x0000 }, /* R584 */
690 { 0x0000, 0x0000, 0x0000 }, /* R585 */
691 { 0x0000, 0x0000, 0x0000 }, /* R586 */
692 { 0x0000, 0x0000, 0x0000 }, /* R587 */
693 { 0x0000, 0x0000, 0x0000 }, /* R588 */
694 { 0x0000, 0x0000, 0x0000 }, /* R589 */
695 { 0x0000, 0x0000, 0x0000 }, /* R590 */
696 { 0x0000, 0x0000, 0x0000 }, /* R591 */
697 { 0x0000, 0x0000, 0x0000 }, /* R592 */
698 { 0x0000, 0x0000, 0x0000 }, /* R593 */
699 { 0x0000, 0x0000, 0x0000 }, /* R594 */
700 { 0x0000, 0x0000, 0x0000 }, /* R595 */
701 { 0x0000, 0x0000, 0x0000 }, /* R596 */
702 { 0x0000, 0x0000, 0x0000 }, /* R597 */
703 { 0x0000, 0x0000, 0x0000 }, /* R598 */
704 { 0x0000, 0x0000, 0x0000 }, /* R599 */
705 { 0x0000, 0x0000, 0x0000 }, /* R600 */
706 { 0x0000, 0x0000, 0x0000 }, /* R601 */
707 { 0x0000, 0x0000, 0x0000 }, /* R602 */
708 { 0x0000, 0x0000, 0x0000 }, /* R603 */
709 { 0x0000, 0x0000, 0x0000 }, /* R604 */
710 { 0x0000, 0x0000, 0x0000 }, /* R605 */
711 { 0x0000, 0x0000, 0x0000 }, /* R606 */
712 { 0x0000, 0x0000, 0x0000 }, /* R607 */
713 { 0x0000, 0x0000, 0x0000 }, /* R608 */
714 { 0x0000, 0x0000, 0x0000 }, /* R609 */
715 { 0x0000, 0x0000, 0x0000 }, /* R610 */
716 { 0x0000, 0x0000, 0x0000 }, /* R611 */
717 { 0x0000, 0x0000, 0x0000 }, /* R612 */
718 { 0x0000, 0x0000, 0x0000 }, /* R613 */
719 { 0x0000, 0x0000, 0x0000 }, /* R614 */
720 { 0x0000, 0x0000, 0x0000 }, /* R615 */
721 { 0x0000, 0x0000, 0x0000 }, /* R616 */
722 { 0x0000, 0x0000, 0x0000 }, /* R617 */
723 { 0x0000, 0x0000, 0x0000 }, /* R618 */
724 { 0x0000, 0x0000, 0x0000 }, /* R619 */
725 { 0x0000, 0x0000, 0x0000 }, /* R620 */
726 { 0x0000, 0x0000, 0x0000 }, /* R621 */
727 { 0x0000, 0x0000, 0x0000 }, /* R622 */
728 { 0x0000, 0x0000, 0x0000 }, /* R623 */
729 { 0x0000, 0x0000, 0x0000 }, /* R624 */
730 { 0x0000, 0x0000, 0x0000 }, /* R625 */
731 { 0x0000, 0x0000, 0x0000 }, /* R626 */
732 { 0x0000, 0x0000, 0x0000 }, /* R627 */
733 { 0x0000, 0x0000, 0x0000 }, /* R628 */
734 { 0x0000, 0x0000, 0x0000 }, /* R629 */
735 { 0x0000, 0x0000, 0x0000 }, /* R630 */
736 { 0x0000, 0x0000, 0x0000 }, /* R631 */
737 { 0x0000, 0x0000, 0x0000 }, /* R632 */
738 { 0x0000, 0x0000, 0x0000 }, /* R633 */
739 { 0x0000, 0x0000, 0x0000 }, /* R634 */
740 { 0x0000, 0x0000, 0x0000 }, /* R635 */
741 { 0x0000, 0x0000, 0x0000 }, /* R636 */
742 { 0x0000, 0x0000, 0x0000 }, /* R637 */
743 { 0x0000, 0x0000, 0x0000 }, /* R638 */
744 { 0x0000, 0x0000, 0x0000 }, /* R639 */
745 { 0x0000, 0x0000, 0x0000 }, /* R640 */
746 { 0x0000, 0x0000, 0x0000 }, /* R641 */
747 { 0x0000, 0x0000, 0x0000 }, /* R642 */
748 { 0x0000, 0x0000, 0x0000 }, /* R643 */
749 { 0x0000, 0x0000, 0x0000 }, /* R644 */
750 { 0x0000, 0x0000, 0x0000 }, /* R645 */
751 { 0x0000, 0x0000, 0x0000 }, /* R646 */
752 { 0x0000, 0x0000, 0x0000 }, /* R647 */
753 { 0x0000, 0x0000, 0x0000 }, /* R648 */
754 { 0x0000, 0x0000, 0x0000 }, /* R649 */
755 { 0x0000, 0x0000, 0x0000 }, /* R650 */
756 { 0x0000, 0x0000, 0x0000 }, /* R651 */
757 { 0x0000, 0x0000, 0x0000 }, /* R652 */
758 { 0x0000, 0x0000, 0x0000 }, /* R653 */
759 { 0x0000, 0x0000, 0x0000 }, /* R654 */
760 { 0x0000, 0x0000, 0x0000 }, /* R655 */
761 { 0x0000, 0x0000, 0x0000 }, /* R656 */
762 { 0x0000, 0x0000, 0x0000 }, /* R657 */
763 { 0x0000, 0x0000, 0x0000 }, /* R658 */
764 { 0x0000, 0x0000, 0x0000 }, /* R659 */
765 { 0x0000, 0x0000, 0x0000 }, /* R660 */
766 { 0x0000, 0x0000, 0x0000 }, /* R661 */
767 { 0x0000, 0x0000, 0x0000 }, /* R662 */
768 { 0x0000, 0x0000, 0x0000 }, /* R663 */
769 { 0x0000, 0x0000, 0x0000 }, /* R664 */
770 { 0x0000, 0x0000, 0x0000 }, /* R665 */
771 { 0x0000, 0x0000, 0x0000 }, /* R666 */
772 { 0x0000, 0x0000, 0x0000 }, /* R667 */
773 { 0x0000, 0x0000, 0x0000 }, /* R668 */
774 { 0x0000, 0x0000, 0x0000 }, /* R669 */
775 { 0x0000, 0x0000, 0x0000 }, /* R670 */
776 { 0x0000, 0x0000, 0x0000 }, /* R671 */
777 { 0x0000, 0x0000, 0x0000 }, /* R672 */
778 { 0x0000, 0x0000, 0x0000 }, /* R673 */
779 { 0x0000, 0x0000, 0x0000 }, /* R674 */
780 { 0x0000, 0x0000, 0x0000 }, /* R675 */
781 { 0x0000, 0x0000, 0x0000 }, /* R676 */
782 { 0x0000, 0x0000, 0x0000 }, /* R677 */
783 { 0x0000, 0x0000, 0x0000 }, /* R678 */
784 { 0x0000, 0x0000, 0x0000 }, /* R679 */
785 { 0x0000, 0x0000, 0x0000 }, /* R680 */
786 { 0x0000, 0x0000, 0x0000 }, /* R681 */
787 { 0x0000, 0x0000, 0x0000 }, /* R682 */
788 { 0x0000, 0x0000, 0x0000 }, /* R683 */
789 { 0x0000, 0x0000, 0x0000 }, /* R684 */
790 { 0x0000, 0x0000, 0x0000 }, /* R685 */
791 { 0x0000, 0x0000, 0x0000 }, /* R686 */
792 { 0x0000, 0x0000, 0x0000 }, /* R687 */
793 { 0x0000, 0x0000, 0x0000 }, /* R688 */
794 { 0x0000, 0x0000, 0x0000 }, /* R689 */
795 { 0x0000, 0x0000, 0x0000 }, /* R690 */
796 { 0x0000, 0x0000, 0x0000 }, /* R691 */
797 { 0x0000, 0x0000, 0x0000 }, /* R692 */
798 { 0x0000, 0x0000, 0x0000 }, /* R693 */
799 { 0x0000, 0x0000, 0x0000 }, /* R694 */
800 { 0x0000, 0x0000, 0x0000 }, /* R695 */
801 { 0x0000, 0x0000, 0x0000 }, /* R696 */
802 { 0x0000, 0x0000, 0x0000 }, /* R697 */
803 { 0x0000, 0x0000, 0x0000 }, /* R698 */
804 { 0x0000, 0x0000, 0x0000 }, /* R699 */
805 { 0x0000, 0x0000, 0x0000 }, /* R700 */
806 { 0x0000, 0x0000, 0x0000 }, /* R701 */
807 { 0x0000, 0x0000, 0x0000 }, /* R702 */
808 { 0x0000, 0x0000, 0x0000 }, /* R703 */
809 { 0x0000, 0x0000, 0x0000 }, /* R704 */
810 { 0x0000, 0x0000, 0x0000 }, /* R705 */
811 { 0x0000, 0x0000, 0x0000 }, /* R706 */
812 { 0x0000, 0x0000, 0x0000 }, /* R707 */
813 { 0x0000, 0x0000, 0x0000 }, /* R708 */
814 { 0x0000, 0x0000, 0x0000 }, /* R709 */
815 { 0x0000, 0x0000, 0x0000 }, /* R710 */
816 { 0x0000, 0x0000, 0x0000 }, /* R711 */
817 { 0x0000, 0x0000, 0x0000 }, /* R712 */
818 { 0x0000, 0x0000, 0x0000 }, /* R713 */
819 { 0x0000, 0x0000, 0x0000 }, /* R714 */
820 { 0x0000, 0x0000, 0x0000 }, /* R715 */
821 { 0x0000, 0x0000, 0x0000 }, /* R716 */
822 { 0x0000, 0x0000, 0x0000 }, /* R717 */
823 { 0x0000, 0x0000, 0x0000 }, /* R718 */
824 { 0x0000, 0x0000, 0x0000 }, /* R719 */
825 { 0x0000, 0x0000, 0x0000 }, /* R720 */
826 { 0x0000, 0x0000, 0x0000 }, /* R721 */
827 { 0x0000, 0x0000, 0x0000 }, /* R722 */
828 { 0x0000, 0x0000, 0x0000 }, /* R723 */
829 { 0x0000, 0x0000, 0x0000 }, /* R724 */
830 { 0x0000, 0x0000, 0x0000 }, /* R725 */
831 { 0x0000, 0x0000, 0x0000 }, /* R726 */
832 { 0x0000, 0x0000, 0x0000 }, /* R727 */
833 { 0x0000, 0x0000, 0x0000 }, /* R728 */
834 { 0x0000, 0x0000, 0x0000 }, /* R729 */
835 { 0x0000, 0x0000, 0x0000 }, /* R730 */
836 { 0x0000, 0x0000, 0x0000 }, /* R731 */
837 { 0x0000, 0x0000, 0x0000 }, /* R732 */
838 { 0x0000, 0x0000, 0x0000 }, /* R733 */
839 { 0x0000, 0x0000, 0x0000 }, /* R734 */
840 { 0x0000, 0x0000, 0x0000 }, /* R735 */
841 { 0x0000, 0x0000, 0x0000 }, /* R736 */
842 { 0x0000, 0x0000, 0x0000 }, /* R737 */
843 { 0x0000, 0x0000, 0x0000 }, /* R738 */
844 { 0x0000, 0x0000, 0x0000 }, /* R739 */
845 { 0x0000, 0x0000, 0x0000 }, /* R740 */
846 { 0x0000, 0x0000, 0x0000 }, /* R741 */
847 { 0x0000, 0x0000, 0x0000 }, /* R742 */
848 { 0x0000, 0x0000, 0x0000 }, /* R743 */
849 { 0x0000, 0x0000, 0x0000 }, /* R744 */
850 { 0x0000, 0x0000, 0x0000 }, /* R745 */
851 { 0x0000, 0x0000, 0x0000 }, /* R746 */
852 { 0x0000, 0x0000, 0x0000 }, /* R747 */
853 { 0x0000, 0x0000, 0x0000 }, /* R748 */
854 { 0x0000, 0x0000, 0x0000 }, /* R749 */
855 { 0x0000, 0x0000, 0x0000 }, /* R750 */
856 { 0x0000, 0x0000, 0x0000 }, /* R751 */
857 { 0x0000, 0x0000, 0x0000 }, /* R752 */
858 { 0x0000, 0x0000, 0x0000 }, /* R753 */
859 { 0x0000, 0x0000, 0x0000 }, /* R754 */
860 { 0x0000, 0x0000, 0x0000 }, /* R755 */
861 { 0x0000, 0x0000, 0x0000 }, /* R756 */
862 { 0x0000, 0x0000, 0x0000 }, /* R757 */
863 { 0x0000, 0x0000, 0x0000 }, /* R758 */
864 { 0x0000, 0x0000, 0x0000 }, /* R759 */
865 { 0x0000, 0x0000, 0x0000 }, /* R760 */
866 { 0x0000, 0x0000, 0x0000 }, /* R761 */
867 { 0x0000, 0x0000, 0x0000 }, /* R762 */
868 { 0x0000, 0x0000, 0x0000 }, /* R763 */
869 { 0x0000, 0x0000, 0x0000 }, /* R764 */
870 { 0x0000, 0x0000, 0x0000 }, /* R765 */
871 { 0x0000, 0x0000, 0x0000 }, /* R766 */
872 { 0x0000, 0x0000, 0x0000 }, /* R767 */
873 { 0xE1F8, 0xE1F8, 0x0000 }, /* R768 - AIF1 Control (1) */
874 { 0xCD1F, 0xCD1F, 0x0000 }, /* R769 - AIF1 Control (2) */
875 { 0xF000, 0xF000, 0x0000 }, /* R770 - AIF1 Master/Slave */
876 { 0x01F0, 0x01F0, 0x0000 }, /* R771 - AIF1 BCLK */
877 { 0x0FFF, 0x0FFF, 0x0000 }, /* R772 - AIF1ADC LRCLK */
878 { 0x0FFF, 0x0FFF, 0x0000 }, /* R773 - AIF1DAC LRCLK */
879 { 0x0003, 0x0003, 0x0000 }, /* R774 - AIF1DAC Data */
880 { 0x0003, 0x0003, 0x0000 }, /* R775 - AIF1ADC Data */
881 { 0x0000, 0x0000, 0x0000 }, /* R776 */
882 { 0x0000, 0x0000, 0x0000 }, /* R777 */
883 { 0x0000, 0x0000, 0x0000 }, /* R778 */
884 { 0x0000, 0x0000, 0x0000 }, /* R779 */
885 { 0x0000, 0x0000, 0x0000 }, /* R780 */
886 { 0x0000, 0x0000, 0x0000 }, /* R781 */
887 { 0x0000, 0x0000, 0x0000 }, /* R782 */
888 { 0x0000, 0x0000, 0x0000 }, /* R783 */
889 { 0xF1F8, 0xF1F8, 0x0000 }, /* R784 - AIF2 Control (1) */
890 { 0xFD1F, 0xFD1F, 0x0000 }, /* R785 - AIF2 Control (2) */
891 { 0xF000, 0xF000, 0x0000 }, /* R786 - AIF2 Master/Slave */
892 { 0x01F0, 0x01F0, 0x0000 }, /* R787 - AIF2 BCLK */
893 { 0x0FFF, 0x0FFF, 0x0000 }, /* R788 - AIF2ADC LRCLK */
894 { 0x0FFF, 0x0FFF, 0x0000 }, /* R789 - AIF2DAC LRCLK */
895 { 0x0003, 0x0003, 0x0000 }, /* R790 - AIF2DAC Data */
896 { 0x0003, 0x0003, 0x0000 }, /* R791 - AIF2ADC Data */
897 { 0x0000, 0x0000, 0x0000 }, /* R792 */
898 { 0x0000, 0x0000, 0x0000 }, /* R793 */
899 { 0x0000, 0x0000, 0x0000 }, /* R794 */
900 { 0x0000, 0x0000, 0x0000 }, /* R795 */
901 { 0x0000, 0x0000, 0x0000 }, /* R796 */
902 { 0x0000, 0x0000, 0x0000 }, /* R797 */
903 { 0x0000, 0x0000, 0x0000 }, /* R798 */
904 { 0x0000, 0x0000, 0x0000 }, /* R799 */
905 { 0x0000, 0x0000, 0x0000 }, /* R800 */
906 { 0x0000, 0x0000, 0x0000 }, /* R801 */
907 { 0x0000, 0x0000, 0x0000 }, /* R802 */
908 { 0x0000, 0x0000, 0x0000 }, /* R803 */
909 { 0x0000, 0x0000, 0x0000 }, /* R804 */
910 { 0x0000, 0x0000, 0x0000 }, /* R805 */
911 { 0x0000, 0x0000, 0x0000 }, /* R806 */
912 { 0x0000, 0x0000, 0x0000 }, /* R807 */
913 { 0x0000, 0x0000, 0x0000 }, /* R808 */
914 { 0x0000, 0x0000, 0x0000 }, /* R809 */
915 { 0x0000, 0x0000, 0x0000 }, /* R810 */
916 { 0x0000, 0x0000, 0x0000 }, /* R811 */
917 { 0x0000, 0x0000, 0x0000 }, /* R812 */
918 { 0x0000, 0x0000, 0x0000 }, /* R813 */
919 { 0x0000, 0x0000, 0x0000 }, /* R814 */
920 { 0x0000, 0x0000, 0x0000 }, /* R815 */
921 { 0x0000, 0x0000, 0x0000 }, /* R816 */
922 { 0x0000, 0x0000, 0x0000 }, /* R817 */
923 { 0x0000, 0x0000, 0x0000 }, /* R818 */
924 { 0x0000, 0x0000, 0x0000 }, /* R819 */
925 { 0x0000, 0x0000, 0x0000 }, /* R820 */
926 { 0x0000, 0x0000, 0x0000 }, /* R821 */
927 { 0x0000, 0x0000, 0x0000 }, /* R822 */
928 { 0x0000, 0x0000, 0x0000 }, /* R823 */
929 { 0x0000, 0x0000, 0x0000 }, /* R824 */
930 { 0x0000, 0x0000, 0x0000 }, /* R825 */
931 { 0x0000, 0x0000, 0x0000 }, /* R826 */
932 { 0x0000, 0x0000, 0x0000 }, /* R827 */
933 { 0x0000, 0x0000, 0x0000 }, /* R828 */
934 { 0x0000, 0x0000, 0x0000 }, /* R829 */
935 { 0x0000, 0x0000, 0x0000 }, /* R830 */
936 { 0x0000, 0x0000, 0x0000 }, /* R831 */
937 { 0x0000, 0x0000, 0x0000 }, /* R832 */
938 { 0x0000, 0x0000, 0x0000 }, /* R833 */
939 { 0x0000, 0x0000, 0x0000 }, /* R834 */
940 { 0x0000, 0x0000, 0x0000 }, /* R835 */
941 { 0x0000, 0x0000, 0x0000 }, /* R836 */
942 { 0x0000, 0x0000, 0x0000 }, /* R837 */
943 { 0x0000, 0x0000, 0x0000 }, /* R838 */
944 { 0x0000, 0x0000, 0x0000 }, /* R839 */
945 { 0x0000, 0x0000, 0x0000 }, /* R840 */
946 { 0x0000, 0x0000, 0x0000 }, /* R841 */
947 { 0x0000, 0x0000, 0x0000 }, /* R842 */
948 { 0x0000, 0x0000, 0x0000 }, /* R843 */
949 { 0x0000, 0x0000, 0x0000 }, /* R844 */
950 { 0x0000, 0x0000, 0x0000 }, /* R845 */
951 { 0x0000, 0x0000, 0x0000 }, /* R846 */
952 { 0x0000, 0x0000, 0x0000 }, /* R847 */
953 { 0x0000, 0x0000, 0x0000 }, /* R848 */
954 { 0x0000, 0x0000, 0x0000 }, /* R849 */
955 { 0x0000, 0x0000, 0x0000 }, /* R850 */
956 { 0x0000, 0x0000, 0x0000 }, /* R851 */
957 { 0x0000, 0x0000, 0x0000 }, /* R852 */
958 { 0x0000, 0x0000, 0x0000 }, /* R853 */
959 { 0x0000, 0x0000, 0x0000 }, /* R854 */
960 { 0x0000, 0x0000, 0x0000 }, /* R855 */
961 { 0x0000, 0x0000, 0x0000 }, /* R856 */
962 { 0x0000, 0x0000, 0x0000 }, /* R857 */
963 { 0x0000, 0x0000, 0x0000 }, /* R858 */
964 { 0x0000, 0x0000, 0x0000 }, /* R859 */
965 { 0x0000, 0x0000, 0x0000 }, /* R860 */
966 { 0x0000, 0x0000, 0x0000 }, /* R861 */
967 { 0x0000, 0x0000, 0x0000 }, /* R862 */
968 { 0x0000, 0x0000, 0x0000 }, /* R863 */
969 { 0x0000, 0x0000, 0x0000 }, /* R864 */
970 { 0x0000, 0x0000, 0x0000 }, /* R865 */
971 { 0x0000, 0x0000, 0x0000 }, /* R866 */
972 { 0x0000, 0x0000, 0x0000 }, /* R867 */
973 { 0x0000, 0x0000, 0x0000 }, /* R868 */
974 { 0x0000, 0x0000, 0x0000 }, /* R869 */
975 { 0x0000, 0x0000, 0x0000 }, /* R870 */
976 { 0x0000, 0x0000, 0x0000 }, /* R871 */
977 { 0x0000, 0x0000, 0x0000 }, /* R872 */
978 { 0x0000, 0x0000, 0x0000 }, /* R873 */
979 { 0x0000, 0x0000, 0x0000 }, /* R874 */
980 { 0x0000, 0x0000, 0x0000 }, /* R875 */
981 { 0x0000, 0x0000, 0x0000 }, /* R876 */
982 { 0x0000, 0x0000, 0x0000 }, /* R877 */
983 { 0x0000, 0x0000, 0x0000 }, /* R878 */
984 { 0x0000, 0x0000, 0x0000 }, /* R879 */
985 { 0x0000, 0x0000, 0x0000 }, /* R880 */
986 { 0x0000, 0x0000, 0x0000 }, /* R881 */
987 { 0x0000, 0x0000, 0x0000 }, /* R882 */
988 { 0x0000, 0x0000, 0x0000 }, /* R883 */
989 { 0x0000, 0x0000, 0x0000 }, /* R884 */
990 { 0x0000, 0x0000, 0x0000 }, /* R885 */
991 { 0x0000, 0x0000, 0x0000 }, /* R886 */
992 { 0x0000, 0x0000, 0x0000 }, /* R887 */
993 { 0x0000, 0x0000, 0x0000 }, /* R888 */
994 { 0x0000, 0x0000, 0x0000 }, /* R889 */
995 { 0x0000, 0x0000, 0x0000 }, /* R890 */
996 { 0x0000, 0x0000, 0x0000 }, /* R891 */
997 { 0x0000, 0x0000, 0x0000 }, /* R892 */
998 { 0x0000, 0x0000, 0x0000 }, /* R893 */
999 { 0x0000, 0x0000, 0x0000 }, /* R894 */
1000 { 0x0000, 0x0000, 0x0000 }, /* R895 */
1001 { 0x0000, 0x0000, 0x0000 }, /* R896 */
1002 { 0x0000, 0x0000, 0x0000 }, /* R897 */
1003 { 0x0000, 0x0000, 0x0000 }, /* R898 */
1004 { 0x0000, 0x0000, 0x0000 }, /* R899 */
1005 { 0x0000, 0x0000, 0x0000 }, /* R900 */
1006 { 0x0000, 0x0000, 0x0000 }, /* R901 */
1007 { 0x0000, 0x0000, 0x0000 }, /* R902 */
1008 { 0x0000, 0x0000, 0x0000 }, /* R903 */
1009 { 0x0000, 0x0000, 0x0000 }, /* R904 */
1010 { 0x0000, 0x0000, 0x0000 }, /* R905 */
1011 { 0x0000, 0x0000, 0x0000 }, /* R906 */
1012 { 0x0000, 0x0000, 0x0000 }, /* R907 */
1013 { 0x0000, 0x0000, 0x0000 }, /* R908 */
1014 { 0x0000, 0x0000, 0x0000 }, /* R909 */
1015 { 0x0000, 0x0000, 0x0000 }, /* R910 */
1016 { 0x0000, 0x0000, 0x0000 }, /* R911 */
1017 { 0x0000, 0x0000, 0x0000 }, /* R912 */
1018 { 0x0000, 0x0000, 0x0000 }, /* R913 */
1019 { 0x0000, 0x0000, 0x0000 }, /* R914 */
1020 { 0x0000, 0x0000, 0x0000 }, /* R915 */
1021 { 0x0000, 0x0000, 0x0000 }, /* R916 */
1022 { 0x0000, 0x0000, 0x0000 }, /* R917 */
1023 { 0x0000, 0x0000, 0x0000 }, /* R918 */
1024 { 0x0000, 0x0000, 0x0000 }, /* R919 */
1025 { 0x0000, 0x0000, 0x0000 }, /* R920 */
1026 { 0x0000, 0x0000, 0x0000 }, /* R921 */
1027 { 0x0000, 0x0000, 0x0000 }, /* R922 */
1028 { 0x0000, 0x0000, 0x0000 }, /* R923 */
1029 { 0x0000, 0x0000, 0x0000 }, /* R924 */
1030 { 0x0000, 0x0000, 0x0000 }, /* R925 */
1031 { 0x0000, 0x0000, 0x0000 }, /* R926 */
1032 { 0x0000, 0x0000, 0x0000 }, /* R927 */
1033 { 0x0000, 0x0000, 0x0000 }, /* R928 */
1034 { 0x0000, 0x0000, 0x0000 }, /* R929 */
1035 { 0x0000, 0x0000, 0x0000 }, /* R930 */
1036 { 0x0000, 0x0000, 0x0000 }, /* R931 */
1037 { 0x0000, 0x0000, 0x0000 }, /* R932 */
1038 { 0x0000, 0x0000, 0x0000 }, /* R933 */
1039 { 0x0000, 0x0000, 0x0000 }, /* R934 */
1040 { 0x0000, 0x0000, 0x0000 }, /* R935 */
1041 { 0x0000, 0x0000, 0x0000 }, /* R936 */
1042 { 0x0000, 0x0000, 0x0000 }, /* R937 */
1043 { 0x0000, 0x0000, 0x0000 }, /* R938 */
1044 { 0x0000, 0x0000, 0x0000 }, /* R939 */
1045 { 0x0000, 0x0000, 0x0000 }, /* R940 */
1046 { 0x0000, 0x0000, 0x0000 }, /* R941 */
1047 { 0x0000, 0x0000, 0x0000 }, /* R942 */
1048 { 0x0000, 0x0000, 0x0000 }, /* R943 */
1049 { 0x0000, 0x0000, 0x0000 }, /* R944 */
1050 { 0x0000, 0x0000, 0x0000 }, /* R945 */
1051 { 0x0000, 0x0000, 0x0000 }, /* R946 */
1052 { 0x0000, 0x0000, 0x0000 }, /* R947 */
1053 { 0x0000, 0x0000, 0x0000 }, /* R948 */
1054 { 0x0000, 0x0000, 0x0000 }, /* R949 */
1055 { 0x0000, 0x0000, 0x0000 }, /* R950 */
1056 { 0x0000, 0x0000, 0x0000 }, /* R951 */
1057 { 0x0000, 0x0000, 0x0000 }, /* R952 */
1058 { 0x0000, 0x0000, 0x0000 }, /* R953 */
1059 { 0x0000, 0x0000, 0x0000 }, /* R954 */
1060 { 0x0000, 0x0000, 0x0000 }, /* R955 */
1061 { 0x0000, 0x0000, 0x0000 }, /* R956 */
1062 { 0x0000, 0x0000, 0x0000 }, /* R957 */
1063 { 0x0000, 0x0000, 0x0000 }, /* R958 */
1064 { 0x0000, 0x0000, 0x0000 }, /* R959 */
1065 { 0x0000, 0x0000, 0x0000 }, /* R960 */
1066 { 0x0000, 0x0000, 0x0000 }, /* R961 */
1067 { 0x0000, 0x0000, 0x0000 }, /* R962 */
1068 { 0x0000, 0x0000, 0x0000 }, /* R963 */
1069 { 0x0000, 0x0000, 0x0000 }, /* R964 */
1070 { 0x0000, 0x0000, 0x0000 }, /* R965 */
1071 { 0x0000, 0x0000, 0x0000 }, /* R966 */
1072 { 0x0000, 0x0000, 0x0000 }, /* R967 */
1073 { 0x0000, 0x0000, 0x0000 }, /* R968 */
1074 { 0x0000, 0x0000, 0x0000 }, /* R969 */
1075 { 0x0000, 0x0000, 0x0000 }, /* R970 */
1076 { 0x0000, 0x0000, 0x0000 }, /* R971 */
1077 { 0x0000, 0x0000, 0x0000 }, /* R972 */
1078 { 0x0000, 0x0000, 0x0000 }, /* R973 */
1079 { 0x0000, 0x0000, 0x0000 }, /* R974 */
1080 { 0x0000, 0x0000, 0x0000 }, /* R975 */
1081 { 0x0000, 0x0000, 0x0000 }, /* R976 */
1082 { 0x0000, 0x0000, 0x0000 }, /* R977 */
1083 { 0x0000, 0x0000, 0x0000 }, /* R978 */
1084 { 0x0000, 0x0000, 0x0000 }, /* R979 */
1085 { 0x0000, 0x0000, 0x0000 }, /* R980 */
1086 { 0x0000, 0x0000, 0x0000 }, /* R981 */
1087 { 0x0000, 0x0000, 0x0000 }, /* R982 */
1088 { 0x0000, 0x0000, 0x0000 }, /* R983 */
1089 { 0x0000, 0x0000, 0x0000 }, /* R984 */
1090 { 0x0000, 0x0000, 0x0000 }, /* R985 */
1091 { 0x0000, 0x0000, 0x0000 }, /* R986 */
1092 { 0x0000, 0x0000, 0x0000 }, /* R987 */
1093 { 0x0000, 0x0000, 0x0000 }, /* R988 */
1094 { 0x0000, 0x0000, 0x0000 }, /* R989 */
1095 { 0x0000, 0x0000, 0x0000 }, /* R990 */
1096 { 0x0000, 0x0000, 0x0000 }, /* R991 */
1097 { 0x0000, 0x0000, 0x0000 }, /* R992 */
1098 { 0x0000, 0x0000, 0x0000 }, /* R993 */
1099 { 0x0000, 0x0000, 0x0000 }, /* R994 */
1100 { 0x0000, 0x0000, 0x0000 }, /* R995 */
1101 { 0x0000, 0x0000, 0x0000 }, /* R996 */
1102 { 0x0000, 0x0000, 0x0000 }, /* R997 */
1103 { 0x0000, 0x0000, 0x0000 }, /* R998 */
1104 { 0x0000, 0x0000, 0x0000 }, /* R999 */
1105 { 0x0000, 0x0000, 0x0000 }, /* R1000 */
1106 { 0x0000, 0x0000, 0x0000 }, /* R1001 */
1107 { 0x0000, 0x0000, 0x0000 }, /* R1002 */
1108 { 0x0000, 0x0000, 0x0000 }, /* R1003 */
1109 { 0x0000, 0x0000, 0x0000 }, /* R1004 */
1110 { 0x0000, 0x0000, 0x0000 }, /* R1005 */
1111 { 0x0000, 0x0000, 0x0000 }, /* R1006 */
1112 { 0x0000, 0x0000, 0x0000 }, /* R1007 */
1113 { 0x0000, 0x0000, 0x0000 }, /* R1008 */
1114 { 0x0000, 0x0000, 0x0000 }, /* R1009 */
1115 { 0x0000, 0x0000, 0x0000 }, /* R1010 */
1116 { 0x0000, 0x0000, 0x0000 }, /* R1011 */
1117 { 0x0000, 0x0000, 0x0000 }, /* R1012 */
1118 { 0x0000, 0x0000, 0x0000 }, /* R1013 */
1119 { 0x0000, 0x0000, 0x0000 }, /* R1014 */
1120 { 0x0000, 0x0000, 0x0000 }, /* R1015 */
1121 { 0x0000, 0x0000, 0x0000 }, /* R1016 */
1122 { 0x0000, 0x0000, 0x0000 }, /* R1017 */
1123 { 0x0000, 0x0000, 0x0000 }, /* R1018 */
1124 { 0x0000, 0x0000, 0x0000 }, /* R1019 */
1125 { 0x0000, 0x0000, 0x0000 }, /* R1020 */
1126 { 0x0000, 0x0000, 0x0000 }, /* R1021 */
1127 { 0x0000, 0x0000, 0x0000 }, /* R1022 */
1128 { 0x0000, 0x0000, 0x0000 }, /* R1023 */
1129 { 0x00FF, 0x01FF, 0x0000 }, /* R1024 - AIF1 ADC1 Left Volume */
1130 { 0x00FF, 0x01FF, 0x0000 }, /* R1025 - AIF1 ADC1 Right Volume */
1131 { 0x00FF, 0x01FF, 0x0000 }, /* R1026 - AIF1 DAC1 Left Volume */
1132 { 0x00FF, 0x01FF, 0x0000 }, /* R1027 - AIF1 DAC1 Right Volume */
1133 { 0x00FF, 0x01FF, 0x0000 }, /* R1028 - AIF1 ADC2 Left Volume */
1134 { 0x00FF, 0x01FF, 0x0000 }, /* R1029 - AIF1 ADC2 Right Volume */
1135 { 0x00FF, 0x01FF, 0x0000 }, /* R1030 - AIF1 DAC2 Left Volume */
1136 { 0x00FF, 0x01FF, 0x0000 }, /* R1031 - AIF1 DAC2 Right Volume */
1137 { 0x0000, 0x0000, 0x0000 }, /* R1032 */
1138 { 0x0000, 0x0000, 0x0000 }, /* R1033 */
1139 { 0x0000, 0x0000, 0x0000 }, /* R1034 */
1140 { 0x0000, 0x0000, 0x0000 }, /* R1035 */
1141 { 0x0000, 0x0000, 0x0000 }, /* R1036 */
1142 { 0x0000, 0x0000, 0x0000 }, /* R1037 */
1143 { 0x0000, 0x0000, 0x0000 }, /* R1038 */
1144 { 0x0000, 0x0000, 0x0000 }, /* R1039 */
1145 { 0xF800, 0xF800, 0x0000 }, /* R1040 - AIF1 ADC1 Filters */
1146 { 0x7800, 0x7800, 0x0000 }, /* R1041 - AIF1 ADC2 Filters */
1147 { 0x0000, 0x0000, 0x0000 }, /* R1042 */
1148 { 0x0000, 0x0000, 0x0000 }, /* R1043 */
1149 { 0x0000, 0x0000, 0x0000 }, /* R1044 */
1150 { 0x0000, 0x0000, 0x0000 }, /* R1045 */
1151 { 0x0000, 0x0000, 0x0000 }, /* R1046 */
1152 { 0x0000, 0x0000, 0x0000 }, /* R1047 */
1153 { 0x0000, 0x0000, 0x0000 }, /* R1048 */
1154 { 0x0000, 0x0000, 0x0000 }, /* R1049 */
1155 { 0x0000, 0x0000, 0x0000 }, /* R1050 */
1156 { 0x0000, 0x0000, 0x0000 }, /* R1051 */
1157 { 0x0000, 0x0000, 0x0000 }, /* R1052 */
1158 { 0x0000, 0x0000, 0x0000 }, /* R1053 */
1159 { 0x0000, 0x0000, 0x0000 }, /* R1054 */
1160 { 0x0000, 0x0000, 0x0000 }, /* R1055 */
1161 { 0x02B6, 0x02B6, 0x0000 }, /* R1056 - AIF1 DAC1 Filters (1) */
1162 { 0x3F00, 0x3F00, 0x0000 }, /* R1057 - AIF1 DAC1 Filters (2) */
1163 { 0x02B6, 0x02B6, 0x0000 }, /* R1058 - AIF1 DAC2 Filters (1) */
1164 { 0x3F00, 0x3F00, 0x0000 }, /* R1059 - AIF1 DAC2 Filters (2) */
1165 { 0x0000, 0x0000, 0x0000 }, /* R1060 */
1166 { 0x0000, 0x0000, 0x0000 }, /* R1061 */
1167 { 0x0000, 0x0000, 0x0000 }, /* R1062 */
1168 { 0x0000, 0x0000, 0x0000 }, /* R1063 */
1169 { 0x0000, 0x0000, 0x0000 }, /* R1064 */
1170 { 0x0000, 0x0000, 0x0000 }, /* R1065 */
1171 { 0x0000, 0x0000, 0x0000 }, /* R1066 */
1172 { 0x0000, 0x0000, 0x0000 }, /* R1067 */
1173 { 0x0000, 0x0000, 0x0000 }, /* R1068 */
1174 { 0x0000, 0x0000, 0x0000 }, /* R1069 */
1175 { 0x0000, 0x0000, 0x0000 }, /* R1070 */
1176 { 0x0000, 0x0000, 0x0000 }, /* R1071 */
1177 { 0x0000, 0x0000, 0x0000 }, /* R1072 */
1178 { 0x0000, 0x0000, 0x0000 }, /* R1073 */
1179 { 0x0000, 0x0000, 0x0000 }, /* R1074 */
1180 { 0x0000, 0x0000, 0x0000 }, /* R1075 */
1181 { 0x0000, 0x0000, 0x0000 }, /* R1076 */
1182 { 0x0000, 0x0000, 0x0000 }, /* R1077 */
1183 { 0x0000, 0x0000, 0x0000 }, /* R1078 */
1184 { 0x0000, 0x0000, 0x0000 }, /* R1079 */
1185 { 0x0000, 0x0000, 0x0000 }, /* R1080 */
1186 { 0x0000, 0x0000, 0x0000 }, /* R1081 */
1187 { 0x0000, 0x0000, 0x0000 }, /* R1082 */
1188 { 0x0000, 0x0000, 0x0000 }, /* R1083 */
1189 { 0x0000, 0x0000, 0x0000 }, /* R1084 */
1190 { 0x0000, 0x0000, 0x0000 }, /* R1085 */
1191 { 0x0000, 0x0000, 0x0000 }, /* R1086 */
1192 { 0x0000, 0x0000, 0x0000 }, /* R1087 */
1193 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1088 - AIF1 DRC1 (1) */
1194 { 0x1FFF, 0x1FFF, 0x0000 }, /* R1089 - AIF1 DRC1 (2) */
1195 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1090 - AIF1 DRC1 (3) */
1196 { 0x07FF, 0x07FF, 0x0000 }, /* R1091 - AIF1 DRC1 (4) */
1197 { 0x03FF, 0x03FF, 0x0000 }, /* R1092 - AIF1 DRC1 (5) */
1198 { 0x0000, 0x0000, 0x0000 }, /* R1093 */
1199 { 0x0000, 0x0000, 0x0000 }, /* R1094 */
1200 { 0x0000, 0x0000, 0x0000 }, /* R1095 */
1201 { 0x0000, 0x0000, 0x0000 }, /* R1096 */
1202 { 0x0000, 0x0000, 0x0000 }, /* R1097 */
1203 { 0x0000, 0x0000, 0x0000 }, /* R1098 */
1204 { 0x0000, 0x0000, 0x0000 }, /* R1099 */
1205 { 0x0000, 0x0000, 0x0000 }, /* R1100 */
1206 { 0x0000, 0x0000, 0x0000 }, /* R1101 */
1207 { 0x0000, 0x0000, 0x0000 }, /* R1102 */
1208 { 0x0000, 0x0000, 0x0000 }, /* R1103 */
1209 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1104 - AIF1 DRC2 (1) */
1210 { 0x1FFF, 0x1FFF, 0x0000 }, /* R1105 - AIF1 DRC2 (2) */
1211 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1106 - AIF1 DRC2 (3) */
1212 { 0x07FF, 0x07FF, 0x0000 }, /* R1107 - AIF1 DRC2 (4) */
1213 { 0x03FF, 0x03FF, 0x0000 }, /* R1108 - AIF1 DRC2 (5) */
1214 { 0x0000, 0x0000, 0x0000 }, /* R1109 */
1215 { 0x0000, 0x0000, 0x0000 }, /* R1110 */
1216 { 0x0000, 0x0000, 0x0000 }, /* R1111 */
1217 { 0x0000, 0x0000, 0x0000 }, /* R1112 */
1218 { 0x0000, 0x0000, 0x0000 }, /* R1113 */
1219 { 0x0000, 0x0000, 0x0000 }, /* R1114 */
1220 { 0x0000, 0x0000, 0x0000 }, /* R1115 */
1221 { 0x0000, 0x0000, 0x0000 }, /* R1116 */
1222 { 0x0000, 0x0000, 0x0000 }, /* R1117 */
1223 { 0x0000, 0x0000, 0x0000 }, /* R1118 */
1224 { 0x0000, 0x0000, 0x0000 }, /* R1119 */
1225 { 0x0000, 0x0000, 0x0000 }, /* R1120 */
1226 { 0x0000, 0x0000, 0x0000 }, /* R1121 */
1227 { 0x0000, 0x0000, 0x0000 }, /* R1122 */
1228 { 0x0000, 0x0000, 0x0000 }, /* R1123 */
1229 { 0x0000, 0x0000, 0x0000 }, /* R1124 */
1230 { 0x0000, 0x0000, 0x0000 }, /* R1125 */
1231 { 0x0000, 0x0000, 0x0000 }, /* R1126 */
1232 { 0x0000, 0x0000, 0x0000 }, /* R1127 */
1233 { 0x0000, 0x0000, 0x0000 }, /* R1128 */
1234 { 0x0000, 0x0000, 0x0000 }, /* R1129 */
1235 { 0x0000, 0x0000, 0x0000 }, /* R1130 */
1236 { 0x0000, 0x0000, 0x0000 }, /* R1131 */
1237 { 0x0000, 0x0000, 0x0000 }, /* R1132 */
1238 { 0x0000, 0x0000, 0x0000 }, /* R1133 */
1239 { 0x0000, 0x0000, 0x0000 }, /* R1134 */
1240 { 0x0000, 0x0000, 0x0000 }, /* R1135 */
1241 { 0x0000, 0x0000, 0x0000 }, /* R1136 */
1242 { 0x0000, 0x0000, 0x0000 }, /* R1137 */
1243 { 0x0000, 0x0000, 0x0000 }, /* R1138 */
1244 { 0x0000, 0x0000, 0x0000 }, /* R1139 */
1245 { 0x0000, 0x0000, 0x0000 }, /* R1140 */
1246 { 0x0000, 0x0000, 0x0000 }, /* R1141 */
1247 { 0x0000, 0x0000, 0x0000 }, /* R1142 */
1248 { 0x0000, 0x0000, 0x0000 }, /* R1143 */
1249 { 0x0000, 0x0000, 0x0000 }, /* R1144 */
1250 { 0x0000, 0x0000, 0x0000 }, /* R1145 */
1251 { 0x0000, 0x0000, 0x0000 }, /* R1146 */
1252 { 0x0000, 0x0000, 0x0000 }, /* R1147 */
1253 { 0x0000, 0x0000, 0x0000 }, /* R1148 */
1254 { 0x0000, 0x0000, 0x0000 }, /* R1149 */
1255 { 0x0000, 0x0000, 0x0000 }, /* R1150 */
1256 { 0x0000, 0x0000, 0x0000 }, /* R1151 */
1257 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1152 - AIF1 DAC1 EQ Gains (1) */
1258 { 0xFFC0, 0xFFC0, 0x0000 }, /* R1153 - AIF1 DAC1 EQ Gains (2) */
1259 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1154 - AIF1 DAC1 EQ Band 1 A */
1260 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1155 - AIF1 DAC1 EQ Band 1 B */
1261 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1156 - AIF1 DAC1 EQ Band 1 PG */
1262 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1157 - AIF1 DAC1 EQ Band 2 A */
1263 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1158 - AIF1 DAC1 EQ Band 2 B */
1264 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1159 - AIF1 DAC1 EQ Band 2 C */
1265 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1160 - AIF1 DAC1 EQ Band 2 PG */
1266 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1161 - AIF1 DAC1 EQ Band 3 A */
1267 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1162 - AIF1 DAC1 EQ Band 3 B */
1268 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1163 - AIF1 DAC1 EQ Band 3 C */
1269 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1164 - AIF1 DAC1 EQ Band 3 PG */
1270 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1165 - AIF1 DAC1 EQ Band 4 A */
1271 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1166 - AIF1 DAC1 EQ Band 4 B */
1272 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1167 - AIF1 DAC1 EQ Band 4 C */
1273 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1168 - AIF1 DAC1 EQ Band 4 PG */
1274 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1169 - AIF1 DAC1 EQ Band 5 A */
1275 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1170 - AIF1 DAC1 EQ Band 5 B */
1276 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1171 - AIF1 DAC1 EQ Band 5 PG */
1277 { 0x0000, 0x0000, 0x0000 }, /* R1172 */
1278 { 0x0000, 0x0000, 0x0000 }, /* R1173 */
1279 { 0x0000, 0x0000, 0x0000 }, /* R1174 */
1280 { 0x0000, 0x0000, 0x0000 }, /* R1175 */
1281 { 0x0000, 0x0000, 0x0000 }, /* R1176 */
1282 { 0x0000, 0x0000, 0x0000 }, /* R1177 */
1283 { 0x0000, 0x0000, 0x0000 }, /* R1178 */
1284 { 0x0000, 0x0000, 0x0000 }, /* R1179 */
1285 { 0x0000, 0x0000, 0x0000 }, /* R1180 */
1286 { 0x0000, 0x0000, 0x0000 }, /* R1181 */
1287 { 0x0000, 0x0000, 0x0000 }, /* R1182 */
1288 { 0x0000, 0x0000, 0x0000 }, /* R1183 */
1289 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1184 - AIF1 DAC2 EQ Gains (1) */
1290 { 0xFFC0, 0xFFC0, 0x0000 }, /* R1185 - AIF1 DAC2 EQ Gains (2) */
1291 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1186 - AIF1 DAC2 EQ Band 1 A */
1292 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1187 - AIF1 DAC2 EQ Band 1 B */
1293 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1188 - AIF1 DAC2 EQ Band 1 PG */
1294 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1189 - AIF1 DAC2 EQ Band 2 A */
1295 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1190 - AIF1 DAC2 EQ Band 2 B */
1296 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1191 - AIF1 DAC2 EQ Band 2 C */
1297 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1192 - AIF1 DAC2 EQ Band 2 PG */
1298 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1193 - AIF1 DAC2 EQ Band 3 A */
1299 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1194 - AIF1 DAC2 EQ Band 3 B */
1300 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1195 - AIF1 DAC2 EQ Band 3 C */
1301 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1196 - AIF1 DAC2 EQ Band 3 PG */
1302 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1197 - AIF1 DAC2 EQ Band 4 A */
1303 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1198 - AIF1 DAC2 EQ Band 4 B */
1304 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1199 - AIF1 DAC2 EQ Band 4 C */
1305 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1200 - AIF1 DAC2 EQ Band 4 PG */
1306 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1201 - AIF1 DAC2 EQ Band 5 A */
1307 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1202 - AIF1 DAC2 EQ Band 5 B */
1308 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1203 - AIF1 DAC2 EQ Band 5 PG */
1309 { 0x0000, 0x0000, 0x0000 }, /* R1204 */
1310 { 0x0000, 0x0000, 0x0000 }, /* R1205 */
1311 { 0x0000, 0x0000, 0x0000 }, /* R1206 */
1312 { 0x0000, 0x0000, 0x0000 }, /* R1207 */
1313 { 0x0000, 0x0000, 0x0000 }, /* R1208 */
1314 { 0x0000, 0x0000, 0x0000 }, /* R1209 */
1315 { 0x0000, 0x0000, 0x0000 }, /* R1210 */
1316 { 0x0000, 0x0000, 0x0000 }, /* R1211 */
1317 { 0x0000, 0x0000, 0x0000 }, /* R1212 */
1318 { 0x0000, 0x0000, 0x0000 }, /* R1213 */
1319 { 0x0000, 0x0000, 0x0000 }, /* R1214 */
1320 { 0x0000, 0x0000, 0x0000 }, /* R1215 */
1321 { 0x0000, 0x0000, 0x0000 }, /* R1216 */
1322 { 0x0000, 0x0000, 0x0000 }, /* R1217 */
1323 { 0x0000, 0x0000, 0x0000 }, /* R1218 */
1324 { 0x0000, 0x0000, 0x0000 }, /* R1219 */
1325 { 0x0000, 0x0000, 0x0000 }, /* R1220 */
1326 { 0x0000, 0x0000, 0x0000 }, /* R1221 */
1327 { 0x0000, 0x0000, 0x0000 }, /* R1222 */
1328 { 0x0000, 0x0000, 0x0000 }, /* R1223 */
1329 { 0x0000, 0x0000, 0x0000 }, /* R1224 */
1330 { 0x0000, 0x0000, 0x0000 }, /* R1225 */
1331 { 0x0000, 0x0000, 0x0000 }, /* R1226 */
1332 { 0x0000, 0x0000, 0x0000 }, /* R1227 */
1333 { 0x0000, 0x0000, 0x0000 }, /* R1228 */
1334 { 0x0000, 0x0000, 0x0000 }, /* R1229 */
1335 { 0x0000, 0x0000, 0x0000 }, /* R1230 */
1336 { 0x0000, 0x0000, 0x0000 }, /* R1231 */
1337 { 0x0000, 0x0000, 0x0000 }, /* R1232 */
1338 { 0x0000, 0x0000, 0x0000 }, /* R1233 */
1339 { 0x0000, 0x0000, 0x0000 }, /* R1234 */
1340 { 0x0000, 0x0000, 0x0000 }, /* R1235 */
1341 { 0x0000, 0x0000, 0x0000 }, /* R1236 */
1342 { 0x0000, 0x0000, 0x0000 }, /* R1237 */
1343 { 0x0000, 0x0000, 0x0000 }, /* R1238 */
1344 { 0x0000, 0x0000, 0x0000 }, /* R1239 */
1345 { 0x0000, 0x0000, 0x0000 }, /* R1240 */
1346 { 0x0000, 0x0000, 0x0000 }, /* R1241 */
1347 { 0x0000, 0x0000, 0x0000 }, /* R1242 */
1348 { 0x0000, 0x0000, 0x0000 }, /* R1243 */
1349 { 0x0000, 0x0000, 0x0000 }, /* R1244 */
1350 { 0x0000, 0x0000, 0x0000 }, /* R1245 */
1351 { 0x0000, 0x0000, 0x0000 }, /* R1246 */
1352 { 0x0000, 0x0000, 0x0000 }, /* R1247 */
1353 { 0x0000, 0x0000, 0x0000 }, /* R1248 */
1354 { 0x0000, 0x0000, 0x0000 }, /* R1249 */
1355 { 0x0000, 0x0000, 0x0000 }, /* R1250 */
1356 { 0x0000, 0x0000, 0x0000 }, /* R1251 */
1357 { 0x0000, 0x0000, 0x0000 }, /* R1252 */
1358 { 0x0000, 0x0000, 0x0000 }, /* R1253 */
1359 { 0x0000, 0x0000, 0x0000 }, /* R1254 */
1360 { 0x0000, 0x0000, 0x0000 }, /* R1255 */
1361 { 0x0000, 0x0000, 0x0000 }, /* R1256 */
1362 { 0x0000, 0x0000, 0x0000 }, /* R1257 */
1363 { 0x0000, 0x0000, 0x0000 }, /* R1258 */
1364 { 0x0000, 0x0000, 0x0000 }, /* R1259 */
1365 { 0x0000, 0x0000, 0x0000 }, /* R1260 */
1366 { 0x0000, 0x0000, 0x0000 }, /* R1261 */
1367 { 0x0000, 0x0000, 0x0000 }, /* R1262 */
1368 { 0x0000, 0x0000, 0x0000 }, /* R1263 */
1369 { 0x0000, 0x0000, 0x0000 }, /* R1264 */
1370 { 0x0000, 0x0000, 0x0000 }, /* R1265 */
1371 { 0x0000, 0x0000, 0x0000 }, /* R1266 */
1372 { 0x0000, 0x0000, 0x0000 }, /* R1267 */
1373 { 0x0000, 0x0000, 0x0000 }, /* R1268 */
1374 { 0x0000, 0x0000, 0x0000 }, /* R1269 */
1375 { 0x0000, 0x0000, 0x0000 }, /* R1270 */
1376 { 0x0000, 0x0000, 0x0000 }, /* R1271 */
1377 { 0x0000, 0x0000, 0x0000 }, /* R1272 */
1378 { 0x0000, 0x0000, 0x0000 }, /* R1273 */
1379 { 0x0000, 0x0000, 0x0000 }, /* R1274 */
1380 { 0x0000, 0x0000, 0x0000 }, /* R1275 */
1381 { 0x0000, 0x0000, 0x0000 }, /* R1276 */
1382 { 0x0000, 0x0000, 0x0000 }, /* R1277 */
1383 { 0x0000, 0x0000, 0x0000 }, /* R1278 */
1384 { 0x0000, 0x0000, 0x0000 }, /* R1279 */
1385 { 0x00FF, 0x01FF, 0x0000 }, /* R1280 - AIF2 ADC Left Volume */
1386 { 0x00FF, 0x01FF, 0x0000 }, /* R1281 - AIF2 ADC Right Volume */
1387 { 0x00FF, 0x01FF, 0x0000 }, /* R1282 - AIF2 DAC Left Volume */
1388 { 0x00FF, 0x01FF, 0x0000 }, /* R1283 - AIF2 DAC Right Volume */
1389 { 0x0000, 0x0000, 0x0000 }, /* R1284 */
1390 { 0x0000, 0x0000, 0x0000 }, /* R1285 */
1391 { 0x0000, 0x0000, 0x0000 }, /* R1286 */
1392 { 0x0000, 0x0000, 0x0000 }, /* R1287 */
1393 { 0x0000, 0x0000, 0x0000 }, /* R1288 */
1394 { 0x0000, 0x0000, 0x0000 }, /* R1289 */
1395 { 0x0000, 0x0000, 0x0000 }, /* R1290 */
1396 { 0x0000, 0x0000, 0x0000 }, /* R1291 */
1397 { 0x0000, 0x0000, 0x0000 }, /* R1292 */
1398 { 0x0000, 0x0000, 0x0000 }, /* R1293 */
1399 { 0x0000, 0x0000, 0x0000 }, /* R1294 */
1400 { 0x0000, 0x0000, 0x0000 }, /* R1295 */
1401 { 0xF800, 0xF800, 0x0000 }, /* R1296 - AIF2 ADC Filters */
1402 { 0x0000, 0x0000, 0x0000 }, /* R1297 */
1403 { 0x0000, 0x0000, 0x0000 }, /* R1298 */
1404 { 0x0000, 0x0000, 0x0000 }, /* R1299 */
1405 { 0x0000, 0x0000, 0x0000 }, /* R1300 */
1406 { 0x0000, 0x0000, 0x0000 }, /* R1301 */
1407 { 0x0000, 0x0000, 0x0000 }, /* R1302 */
1408 { 0x0000, 0x0000, 0x0000 }, /* R1303 */
1409 { 0x0000, 0x0000, 0x0000 }, /* R1304 */
1410 { 0x0000, 0x0000, 0x0000 }, /* R1305 */
1411 { 0x0000, 0x0000, 0x0000 }, /* R1306 */
1412 { 0x0000, 0x0000, 0x0000 }, /* R1307 */
1413 { 0x0000, 0x0000, 0x0000 }, /* R1308 */
1414 { 0x0000, 0x0000, 0x0000 }, /* R1309 */
1415 { 0x0000, 0x0000, 0x0000 }, /* R1310 */
1416 { 0x0000, 0x0000, 0x0000 }, /* R1311 */
1417 { 0x02B6, 0x02B6, 0x0000 }, /* R1312 - AIF2 DAC Filters (1) */
1418 { 0x3F00, 0x3F00, 0x0000 }, /* R1313 - AIF2 DAC Filters (2) */
1419 { 0x0000, 0x0000, 0x0000 }, /* R1314 */
1420 { 0x0000, 0x0000, 0x0000 }, /* R1315 */
1421 { 0x0000, 0x0000, 0x0000 }, /* R1316 */
1422 { 0x0000, 0x0000, 0x0000 }, /* R1317 */
1423 { 0x0000, 0x0000, 0x0000 }, /* R1318 */
1424 { 0x0000, 0x0000, 0x0000 }, /* R1319 */
1425 { 0x0000, 0x0000, 0x0000 }, /* R1320 */
1426 { 0x0000, 0x0000, 0x0000 }, /* R1321 */
1427 { 0x0000, 0x0000, 0x0000 }, /* R1322 */
1428 { 0x0000, 0x0000, 0x0000 }, /* R1323 */
1429 { 0x0000, 0x0000, 0x0000 }, /* R1324 */
1430 { 0x0000, 0x0000, 0x0000 }, /* R1325 */
1431 { 0x0000, 0x0000, 0x0000 }, /* R1326 */
1432 { 0x0000, 0x0000, 0x0000 }, /* R1327 */
1433 { 0x0000, 0x0000, 0x0000 }, /* R1328 */
1434 { 0x0000, 0x0000, 0x0000 }, /* R1329 */
1435 { 0x0000, 0x0000, 0x0000 }, /* R1330 */
1436 { 0x0000, 0x0000, 0x0000 }, /* R1331 */
1437 { 0x0000, 0x0000, 0x0000 }, /* R1332 */
1438 { 0x0000, 0x0000, 0x0000 }, /* R1333 */
1439 { 0x0000, 0x0000, 0x0000 }, /* R1334 */
1440 { 0x0000, 0x0000, 0x0000 }, /* R1335 */
1441 { 0x0000, 0x0000, 0x0000 }, /* R1336 */
1442 { 0x0000, 0x0000, 0x0000 }, /* R1337 */
1443 { 0x0000, 0x0000, 0x0000 }, /* R1338 */
1444 { 0x0000, 0x0000, 0x0000 }, /* R1339 */
1445 { 0x0000, 0x0000, 0x0000 }, /* R1340 */
1446 { 0x0000, 0x0000, 0x0000 }, /* R1341 */
1447 { 0x0000, 0x0000, 0x0000 }, /* R1342 */
1448 { 0x0000, 0x0000, 0x0000 }, /* R1343 */
1449 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1344 - AIF2 DRC (1) */
1450 { 0x1FFF, 0x1FFF, 0x0000 }, /* R1345 - AIF2 DRC (2) */
1451 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1346 - AIF2 DRC (3) */
1452 { 0x07FF, 0x07FF, 0x0000 }, /* R1347 - AIF2 DRC (4) */
1453 { 0x03FF, 0x03FF, 0x0000 }, /* R1348 - AIF2 DRC (5) */
1454 { 0x0000, 0x0000, 0x0000 }, /* R1349 */
1455 { 0x0000, 0x0000, 0x0000 }, /* R1350 */
1456 { 0x0000, 0x0000, 0x0000 }, /* R1351 */
1457 { 0x0000, 0x0000, 0x0000 }, /* R1352 */
1458 { 0x0000, 0x0000, 0x0000 }, /* R1353 */
1459 { 0x0000, 0x0000, 0x0000 }, /* R1354 */
1460 { 0x0000, 0x0000, 0x0000 }, /* R1355 */
1461 { 0x0000, 0x0000, 0x0000 }, /* R1356 */
1462 { 0x0000, 0x0000, 0x0000 }, /* R1357 */
1463 { 0x0000, 0x0000, 0x0000 }, /* R1358 */
1464 { 0x0000, 0x0000, 0x0000 }, /* R1359 */
1465 { 0x0000, 0x0000, 0x0000 }, /* R1360 */
1466 { 0x0000, 0x0000, 0x0000 }, /* R1361 */
1467 { 0x0000, 0x0000, 0x0000 }, /* R1362 */
1468 { 0x0000, 0x0000, 0x0000 }, /* R1363 */
1469 { 0x0000, 0x0000, 0x0000 }, /* R1364 */
1470 { 0x0000, 0x0000, 0x0000 }, /* R1365 */
1471 { 0x0000, 0x0000, 0x0000 }, /* R1366 */
1472 { 0x0000, 0x0000, 0x0000 }, /* R1367 */
1473 { 0x0000, 0x0000, 0x0000 }, /* R1368 */
1474 { 0x0000, 0x0000, 0x0000 }, /* R1369 */
1475 { 0x0000, 0x0000, 0x0000 }, /* R1370 */
1476 { 0x0000, 0x0000, 0x0000 }, /* R1371 */
1477 { 0x0000, 0x0000, 0x0000 }, /* R1372 */
1478 { 0x0000, 0x0000, 0x0000 }, /* R1373 */
1479 { 0x0000, 0x0000, 0x0000 }, /* R1374 */
1480 { 0x0000, 0x0000, 0x0000 }, /* R1375 */
1481 { 0x0000, 0x0000, 0x0000 }, /* R1376 */
1482 { 0x0000, 0x0000, 0x0000 }, /* R1377 */
1483 { 0x0000, 0x0000, 0x0000 }, /* R1378 */
1484 { 0x0000, 0x0000, 0x0000 }, /* R1379 */
1485 { 0x0000, 0x0000, 0x0000 }, /* R1380 */
1486 { 0x0000, 0x0000, 0x0000 }, /* R1381 */
1487 { 0x0000, 0x0000, 0x0000 }, /* R1382 */
1488 { 0x0000, 0x0000, 0x0000 }, /* R1383 */
1489 { 0x0000, 0x0000, 0x0000 }, /* R1384 */
1490 { 0x0000, 0x0000, 0x0000 }, /* R1385 */
1491 { 0x0000, 0x0000, 0x0000 }, /* R1386 */
1492 { 0x0000, 0x0000, 0x0000 }, /* R1387 */
1493 { 0x0000, 0x0000, 0x0000 }, /* R1388 */
1494 { 0x0000, 0x0000, 0x0000 }, /* R1389 */
1495 { 0x0000, 0x0000, 0x0000 }, /* R1390 */
1496 { 0x0000, 0x0000, 0x0000 }, /* R1391 */
1497 { 0x0000, 0x0000, 0x0000 }, /* R1392 */
1498 { 0x0000, 0x0000, 0x0000 }, /* R1393 */
1499 { 0x0000, 0x0000, 0x0000 }, /* R1394 */
1500 { 0x0000, 0x0000, 0x0000 }, /* R1395 */
1501 { 0x0000, 0x0000, 0x0000 }, /* R1396 */
1502 { 0x0000, 0x0000, 0x0000 }, /* R1397 */
1503 { 0x0000, 0x0000, 0x0000 }, /* R1398 */
1504 { 0x0000, 0x0000, 0x0000 }, /* R1399 */
1505 { 0x0000, 0x0000, 0x0000 }, /* R1400 */
1506 { 0x0000, 0x0000, 0x0000 }, /* R1401 */
1507 { 0x0000, 0x0000, 0x0000 }, /* R1402 */
1508 { 0x0000, 0x0000, 0x0000 }, /* R1403 */
1509 { 0x0000, 0x0000, 0x0000 }, /* R1404 */
1510 { 0x0000, 0x0000, 0x0000 }, /* R1405 */
1511 { 0x0000, 0x0000, 0x0000 }, /* R1406 */
1512 { 0x0000, 0x0000, 0x0000 }, /* R1407 */
1513 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1408 - AIF2 EQ Gains (1) */
1514 { 0xFFC0, 0xFFC0, 0x0000 }, /* R1409 - AIF2 EQ Gains (2) */
1515 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1410 - AIF2 EQ Band 1 A */
1516 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1411 - AIF2 EQ Band 1 B */
1517 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1412 - AIF2 EQ Band 1 PG */
1518 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1413 - AIF2 EQ Band 2 A */
1519 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1414 - AIF2 EQ Band 2 B */
1520 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1415 - AIF2 EQ Band 2 C */
1521 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1416 - AIF2 EQ Band 2 PG */
1522 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1417 - AIF2 EQ Band 3 A */
1523 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1418 - AIF2 EQ Band 3 B */
1524 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1419 - AIF2 EQ Band 3 C */
1525 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1420 - AIF2 EQ Band 3 PG */
1526 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1421 - AIF2 EQ Band 4 A */
1527 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1422 - AIF2 EQ Band 4 B */
1528 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1423 - AIF2 EQ Band 4 C */
1529 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1424 - AIF2 EQ Band 4 PG */
1530 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1425 - AIF2 EQ Band 5 A */
1531 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1426 - AIF2 EQ Band 5 B */
1532 { 0xFFFF, 0xFFFF, 0x0000 }, /* R1427 - AIF2 EQ Band 5 PG */
1533 { 0x0000, 0x0000, 0x0000 }, /* R1428 */
1534 { 0x0000, 0x0000, 0x0000 }, /* R1429 */
1535 { 0x0000, 0x0000, 0x0000 }, /* R1430 */
1536 { 0x0000, 0x0000, 0x0000 }, /* R1431 */
1537 { 0x0000, 0x0000, 0x0000 }, /* R1432 */
1538 { 0x0000, 0x0000, 0x0000 }, /* R1433 */
1539 { 0x0000, 0x0000, 0x0000 }, /* R1434 */
1540 { 0x0000, 0x0000, 0x0000 }, /* R1435 */
1541 { 0x0000, 0x0000, 0x0000 }, /* R1436 */
1542 { 0x0000, 0x0000, 0x0000 }, /* R1437 */
1543 { 0x0000, 0x0000, 0x0000 }, /* R1438 */
1544 { 0x0000, 0x0000, 0x0000 }, /* R1439 */
1545 { 0x0000, 0x0000, 0x0000 }, /* R1440 */
1546 { 0x0000, 0x0000, 0x0000 }, /* R1441 */
1547 { 0x0000, 0x0000, 0x0000 }, /* R1442 */
1548 { 0x0000, 0x0000, 0x0000 }, /* R1443 */
1549 { 0x0000, 0x0000, 0x0000 }, /* R1444 */
1550 { 0x0000, 0x0000, 0x0000 }, /* R1445 */
1551 { 0x0000, 0x0000, 0x0000 }, /* R1446 */
1552 { 0x0000, 0x0000, 0x0000 }, /* R1447 */
1553 { 0x0000, 0x0000, 0x0000 }, /* R1448 */
1554 { 0x0000, 0x0000, 0x0000 }, /* R1449 */
1555 { 0x0000, 0x0000, 0x0000 }, /* R1450 */
1556 { 0x0000, 0x0000, 0x0000 }, /* R1451 */
1557 { 0x0000, 0x0000, 0x0000 }, /* R1452 */
1558 { 0x0000, 0x0000, 0x0000 }, /* R1453 */
1559 { 0x0000, 0x0000, 0x0000 }, /* R1454 */
1560 { 0x0000, 0x0000, 0x0000 }, /* R1455 */
1561 { 0x0000, 0x0000, 0x0000 }, /* R1456 */
1562 { 0x0000, 0x0000, 0x0000 }, /* R1457 */
1563 { 0x0000, 0x0000, 0x0000 }, /* R1458 */
1564 { 0x0000, 0x0000, 0x0000 }, /* R1459 */
1565 { 0x0000, 0x0000, 0x0000 }, /* R1460 */
1566 { 0x0000, 0x0000, 0x0000 }, /* R1461 */
1567 { 0x0000, 0x0000, 0x0000 }, /* R1462 */
1568 { 0x0000, 0x0000, 0x0000 }, /* R1463 */
1569 { 0x0000, 0x0000, 0x0000 }, /* R1464 */
1570 { 0x0000, 0x0000, 0x0000 }, /* R1465 */
1571 { 0x0000, 0x0000, 0x0000 }, /* R1466 */
1572 { 0x0000, 0x0000, 0x0000 }, /* R1467 */
1573 { 0x0000, 0x0000, 0x0000 }, /* R1468 */
1574 { 0x0000, 0x0000, 0x0000 }, /* R1469 */
1575 { 0x0000, 0x0000, 0x0000 }, /* R1470 */
1576 { 0x0000, 0x0000, 0x0000 }, /* R1471 */
1577 { 0x0000, 0x0000, 0x0000 }, /* R1472 */
1578 { 0x0000, 0x0000, 0x0000 }, /* R1473 */
1579 { 0x0000, 0x0000, 0x0000 }, /* R1474 */
1580 { 0x0000, 0x0000, 0x0000 }, /* R1475 */
1581 { 0x0000, 0x0000, 0x0000 }, /* R1476 */
1582 { 0x0000, 0x0000, 0x0000 }, /* R1477 */
1583 { 0x0000, 0x0000, 0x0000 }, /* R1478 */
1584 { 0x0000, 0x0000, 0x0000 }, /* R1479 */
1585 { 0x0000, 0x0000, 0x0000 }, /* R1480 */
1586 { 0x0000, 0x0000, 0x0000 }, /* R1481 */
1587 { 0x0000, 0x0000, 0x0000 }, /* R1482 */
1588 { 0x0000, 0x0000, 0x0000 }, /* R1483 */
1589 { 0x0000, 0x0000, 0x0000 }, /* R1484 */
1590 { 0x0000, 0x0000, 0x0000 }, /* R1485 */
1591 { 0x0000, 0x0000, 0x0000 }, /* R1486 */
1592 { 0x0000, 0x0000, 0x0000 }, /* R1487 */
1593 { 0x0000, 0x0000, 0x0000 }, /* R1488 */
1594 { 0x0000, 0x0000, 0x0000 }, /* R1489 */
1595 { 0x0000, 0x0000, 0x0000 }, /* R1490 */
1596 { 0x0000, 0x0000, 0x0000 }, /* R1491 */
1597 { 0x0000, 0x0000, 0x0000 }, /* R1492 */
1598 { 0x0000, 0x0000, 0x0000 }, /* R1493 */
1599 { 0x0000, 0x0000, 0x0000 }, /* R1494 */
1600 { 0x0000, 0x0000, 0x0000 }, /* R1495 */
1601 { 0x0000, 0x0000, 0x0000 }, /* R1496 */
1602 { 0x0000, 0x0000, 0x0000 }, /* R1497 */
1603 { 0x0000, 0x0000, 0x0000 }, /* R1498 */
1604 { 0x0000, 0x0000, 0x0000 }, /* R1499 */
1605 { 0x0000, 0x0000, 0x0000 }, /* R1500 */
1606 { 0x0000, 0x0000, 0x0000 }, /* R1501 */
1607 { 0x0000, 0x0000, 0x0000 }, /* R1502 */
1608 { 0x0000, 0x0000, 0x0000 }, /* R1503 */
1609 { 0x0000, 0x0000, 0x0000 }, /* R1504 */
1610 { 0x0000, 0x0000, 0x0000 }, /* R1505 */
1611 { 0x0000, 0x0000, 0x0000 }, /* R1506 */
1612 { 0x0000, 0x0000, 0x0000 }, /* R1507 */
1613 { 0x0000, 0x0000, 0x0000 }, /* R1508 */
1614 { 0x0000, 0x0000, 0x0000 }, /* R1509 */
1615 { 0x0000, 0x0000, 0x0000 }, /* R1510 */
1616 { 0x0000, 0x0000, 0x0000 }, /* R1511 */
1617 { 0x0000, 0x0000, 0x0000 }, /* R1512 */
1618 { 0x0000, 0x0000, 0x0000 }, /* R1513 */
1619 { 0x0000, 0x0000, 0x0000 }, /* R1514 */
1620 { 0x0000, 0x0000, 0x0000 }, /* R1515 */
1621 { 0x0000, 0x0000, 0x0000 }, /* R1516 */
1622 { 0x0000, 0x0000, 0x0000 }, /* R1517 */
1623 { 0x0000, 0x0000, 0x0000 }, /* R1518 */
1624 { 0x0000, 0x0000, 0x0000 }, /* R1519 */
1625 { 0x0000, 0x0000, 0x0000 }, /* R1520 */
1626 { 0x0000, 0x0000, 0x0000 }, /* R1521 */
1627 { 0x0000, 0x0000, 0x0000 }, /* R1522 */
1628 { 0x0000, 0x0000, 0x0000 }, /* R1523 */
1629 { 0x0000, 0x0000, 0x0000 }, /* R1524 */
1630 { 0x0000, 0x0000, 0x0000 }, /* R1525 */
1631 { 0x0000, 0x0000, 0x0000 }, /* R1526 */
1632 { 0x0000, 0x0000, 0x0000 }, /* R1527 */
1633 { 0x0000, 0x0000, 0x0000 }, /* R1528 */
1634 { 0x0000, 0x0000, 0x0000 }, /* R1529 */
1635 { 0x0000, 0x0000, 0x0000 }, /* R1530 */
1636 { 0x0000, 0x0000, 0x0000 }, /* R1531 */
1637 { 0x0000, 0x0000, 0x0000 }, /* R1532 */
1638 { 0x0000, 0x0000, 0x0000 }, /* R1533 */
1639 { 0x0000, 0x0000, 0x0000 }, /* R1534 */
1640 { 0x0000, 0x0000, 0x0000 }, /* R1535 */
1641 { 0x01EF, 0x01EF, 0x0000 }, /* R1536 - DAC1 Mixer Volumes */
1642 { 0x0037, 0x0037, 0x0000 }, /* R1537 - DAC1 Left Mixer Routing */
1643 { 0x0037, 0x0037, 0x0000 }, /* R1538 - DAC1 Right Mixer Routing */
1644 { 0x01EF, 0x01EF, 0x0000 }, /* R1539 - DAC2 Mixer Volumes */
1645 { 0x0037, 0x0037, 0x0000 }, /* R1540 - DAC2 Left Mixer Routing */
1646 { 0x0037, 0x0037, 0x0000 }, /* R1541 - DAC2 Right Mixer Routing */
1647 { 0x0003, 0x0003, 0x0000 }, /* R1542 - AIF1 ADC1 Left Mixer Routing */
1648 { 0x0003, 0x0003, 0x0000 }, /* R1543 - AIF1 ADC1 Right Mixer Routing */
1649 { 0x0003, 0x0003, 0x0000 }, /* R1544 - AIF1 ADC2 Left Mixer Routing */
1650 { 0x0003, 0x0003, 0x0000 }, /* R1545 - AIF1 ADC2 Right mixer Routing */
1651 { 0x0000, 0x0000, 0x0000 }, /* R1546 */
1652 { 0x0000, 0x0000, 0x0000 }, /* R1547 */
1653 { 0x0000, 0x0000, 0x0000 }, /* R1548 */
1654 { 0x0000, 0x0000, 0x0000 }, /* R1549 */
1655 { 0x0000, 0x0000, 0x0000 }, /* R1550 */
1656 { 0x0000, 0x0000, 0x0000 }, /* R1551 */
1657 { 0x02FF, 0x03FF, 0x0000 }, /* R1552 - DAC1 Left Volume */
1658 { 0x02FF, 0x03FF, 0x0000 }, /* R1553 - DAC1 Right Volume */
1659 { 0x02FF, 0x03FF, 0x0000 }, /* R1554 - DAC2 Left Volume */
1660 { 0x02FF, 0x03FF, 0x0000 }, /* R1555 - DAC2 Right Volume */
1661 { 0x0003, 0x0003, 0x0000 }, /* R1556 - DAC Softmute */
1662 { 0x0000, 0x0000, 0x0000 }, /* R1557 */
1663 { 0x0000, 0x0000, 0x0000 }, /* R1558 */
1664 { 0x0000, 0x0000, 0x0000 }, /* R1559 */
1665 { 0x0000, 0x0000, 0x0000 }, /* R1560 */
1666 { 0x0000, 0x0000, 0x0000 }, /* R1561 */
1667 { 0x0000, 0x0000, 0x0000 }, /* R1562 */
1668 { 0x0000, 0x0000, 0x0000 }, /* R1563 */
1669 { 0x0000, 0x0000, 0x0000 }, /* R1564 */
1670 { 0x0000, 0x0000, 0x0000 }, /* R1565 */
1671 { 0x0000, 0x0000, 0x0000 }, /* R1566 */
1672 { 0x0000, 0x0000, 0x0000 }, /* R1567 */
1673 { 0x0003, 0x0003, 0x0000 }, /* R1568 - Oversampling */
1674 { 0x03C3, 0x03C3, 0x0000 }, /* R1569 - Sidetone */
1675};
1676
1677static int wm8994_readable(unsigned int reg)
1678{
1679 if (reg >= ARRAY_SIZE(access_masks))
1680 return 0;
1681 return access_masks[reg].readable != 0;
1682}
1683
1684static int wm8994_volatile(unsigned int reg)
1685{
1686 if (reg >= WM8994_REG_CACHE_SIZE)
1687 return 1;
1688
1689 switch (reg) {
1690 case WM8994_SOFTWARE_RESET:
1691 case WM8994_CHIP_REVISION:
1692 case WM8994_DC_SERVO_1:
1693 case WM8994_DC_SERVO_READBACK:
1694 case WM8994_RATE_STATUS:
1695 case WM8994_LDO_1:
1696 case WM8994_LDO_2:
1697 return 1;
1698 default:
1699 return 0;
1700 }
1701}
1702
1703static int wm8994_write(struct snd_soc_codec *codec, unsigned int reg,
1704 unsigned int value)
1705{
Mark Brownb2c812e2010-04-14 15:35:19 +09001706 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
Mark Brown9e6e96a2010-01-29 17:47:12 +00001707
1708 BUG_ON(reg > WM8994_MAX_REGISTER);
1709
1710 if (!wm8994_volatile(reg))
1711 wm8994->reg_cache[reg] = value;
1712
1713 return wm8994_reg_write(codec->control_data, reg, value);
1714}
1715
1716static unsigned int wm8994_read(struct snd_soc_codec *codec,
1717 unsigned int reg)
1718{
1719 u16 *reg_cache = codec->reg_cache;
1720
1721 BUG_ON(reg > WM8994_MAX_REGISTER);
1722
1723 if (wm8994_volatile(reg))
1724 return wm8994_reg_read(codec->control_data, reg);
1725 else
1726 return reg_cache[reg];
1727}
1728
1729static int configure_aif_clock(struct snd_soc_codec *codec, int aif)
1730{
Mark Brownb2c812e2010-04-14 15:35:19 +09001731 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
Mark Brown9e6e96a2010-01-29 17:47:12 +00001732 int rate;
1733 int reg1 = 0;
1734 int offset;
1735
1736 if (aif)
1737 offset = 4;
1738 else
1739 offset = 0;
1740
1741 switch (wm8994->sysclk[aif]) {
1742 case WM8994_SYSCLK_MCLK1:
1743 rate = wm8994->mclk[0];
1744 break;
1745
1746 case WM8994_SYSCLK_MCLK2:
1747 reg1 |= 0x8;
1748 rate = wm8994->mclk[1];
1749 break;
1750
1751 case WM8994_SYSCLK_FLL1:
1752 reg1 |= 0x10;
1753 rate = wm8994->fll[0].out;
1754 break;
1755
1756 case WM8994_SYSCLK_FLL2:
1757 reg1 |= 0x18;
1758 rate = wm8994->fll[1].out;
1759 break;
1760
1761 default:
1762 return -EINVAL;
1763 }
1764
1765 if (rate >= 13500000) {
1766 rate /= 2;
1767 reg1 |= WM8994_AIF1CLK_DIV;
1768
1769 dev_dbg(codec->dev, "Dividing AIF%d clock to %dHz\n",
1770 aif + 1, rate);
1771 }
1772 wm8994->aifclk[aif] = rate;
1773
1774 snd_soc_update_bits(codec, WM8994_AIF1_CLOCKING_1 + offset,
1775 WM8994_AIF1CLK_SRC_MASK | WM8994_AIF1CLK_DIV,
1776 reg1);
1777
1778 return 0;
1779}
1780
1781static int configure_clock(struct snd_soc_codec *codec)
1782{
Mark Brownb2c812e2010-04-14 15:35:19 +09001783 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
Mark Brown9e6e96a2010-01-29 17:47:12 +00001784 int old, new;
1785
1786 /* Bring up the AIF clocks first */
1787 configure_aif_clock(codec, 0);
1788 configure_aif_clock(codec, 1);
1789
1790 /* Then switch CLK_SYS over to the higher of them; a change
1791 * can only happen as a result of a clocking change which can
1792 * only be made outside of DAPM so we can safely redo the
1793 * clocking.
1794 */
1795
1796 /* If they're equal it doesn't matter which is used */
1797 if (wm8994->aifclk[0] == wm8994->aifclk[1])
1798 return 0;
1799
1800 if (wm8994->aifclk[0] < wm8994->aifclk[1])
1801 new = WM8994_SYSCLK_SRC;
1802 else
1803 new = 0;
1804
1805 old = snd_soc_read(codec, WM8994_CLOCKING_1) & WM8994_SYSCLK_SRC;
1806
1807 /* If there's no change then we're done. */
1808 if (old == new)
1809 return 0;
1810
1811 snd_soc_update_bits(codec, WM8994_CLOCKING_1, WM8994_SYSCLK_SRC, new);
1812
1813 snd_soc_dapm_sync(codec);
1814
1815 return 0;
1816}
1817
1818static int check_clk_sys(struct snd_soc_dapm_widget *source,
1819 struct snd_soc_dapm_widget *sink)
1820{
1821 int reg = snd_soc_read(source->codec, WM8994_CLOCKING_1);
1822 const char *clk;
1823
1824 /* Check what we're currently using for CLK_SYS */
1825 if (reg & WM8994_SYSCLK_SRC)
1826 clk = "AIF2CLK";
1827 else
1828 clk = "AIF1CLK";
1829
1830 return strcmp(source->name, clk) == 0;
1831}
1832
1833static const char *sidetone_hpf_text[] = {
1834 "2.7kHz", "1.35kHz", "675Hz", "370Hz", "180Hz", "90Hz", "45Hz"
1835};
1836
1837static const struct soc_enum sidetone_hpf =
1838 SOC_ENUM_SINGLE(WM8994_SIDETONE, 7, 7, sidetone_hpf_text);
1839
1840static const DECLARE_TLV_DB_SCALE(aif_tlv, 0, 600, 0);
1841static const DECLARE_TLV_DB_SCALE(digital_tlv, -7200, 75, 1);
1842static const DECLARE_TLV_DB_SCALE(st_tlv, -3600, 300, 0);
1843static const DECLARE_TLV_DB_SCALE(wm8994_3d_tlv, -1600, 183, 0);
1844static const DECLARE_TLV_DB_SCALE(eq_tlv, -1200, 100, 0);
1845
1846#define WM8994_DRC_SWITCH(xname, reg, shift) \
1847{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
1848 .info = snd_soc_info_volsw, .get = snd_soc_get_volsw,\
1849 .put = wm8994_put_drc_sw, \
1850 .private_value = SOC_SINGLE_VALUE(reg, shift, 1, 0) }
1851
1852static int wm8994_put_drc_sw(struct snd_kcontrol *kcontrol,
1853 struct snd_ctl_elem_value *ucontrol)
1854{
1855 struct soc_mixer_control *mc =
1856 (struct soc_mixer_control *)kcontrol->private_value;
1857 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
1858 int mask, ret;
1859
1860 /* Can't enable both ADC and DAC paths simultaneously */
1861 if (mc->shift == WM8994_AIF1DAC1_DRC_ENA_SHIFT)
1862 mask = WM8994_AIF1ADC1L_DRC_ENA_MASK |
1863 WM8994_AIF1ADC1R_DRC_ENA_MASK;
1864 else
1865 mask = WM8994_AIF1DAC1_DRC_ENA_MASK;
1866
1867 ret = snd_soc_read(codec, mc->reg);
1868 if (ret < 0)
1869 return ret;
1870 if (ret & mask)
1871 return -EINVAL;
1872
1873 return snd_soc_put_volsw(kcontrol, ucontrol);
1874}
1875
1876
1877
1878static void wm8994_set_drc(struct snd_soc_codec *codec, int drc)
1879{
Mark Brownb2c812e2010-04-14 15:35:19 +09001880 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
Mark Brown9e6e96a2010-01-29 17:47:12 +00001881 struct wm8994_pdata *pdata = wm8994->pdata;
1882 int base = wm8994_drc_base[drc];
1883 int cfg = wm8994->drc_cfg[drc];
1884 int save, i;
1885
1886 /* Save any enables; the configuration should clear them. */
1887 save = snd_soc_read(codec, base);
1888 save &= WM8994_AIF1DAC1_DRC_ENA | WM8994_AIF1ADC1L_DRC_ENA |
1889 WM8994_AIF1ADC1R_DRC_ENA;
1890
1891 for (i = 0; i < WM8994_DRC_REGS; i++)
1892 snd_soc_update_bits(codec, base + i, 0xffff,
1893 pdata->drc_cfgs[cfg].regs[i]);
1894
1895 snd_soc_update_bits(codec, base, WM8994_AIF1DAC1_DRC_ENA |
1896 WM8994_AIF1ADC1L_DRC_ENA |
1897 WM8994_AIF1ADC1R_DRC_ENA, save);
1898}
1899
1900/* Icky as hell but saves code duplication */
1901static int wm8994_get_drc(const char *name)
1902{
1903 if (strcmp(name, "AIF1DRC1 Mode") == 0)
1904 return 0;
1905 if (strcmp(name, "AIF1DRC2 Mode") == 0)
1906 return 1;
1907 if (strcmp(name, "AIF2DRC Mode") == 0)
1908 return 2;
1909 return -EINVAL;
1910}
1911
1912static int wm8994_put_drc_enum(struct snd_kcontrol *kcontrol,
1913 struct snd_ctl_elem_value *ucontrol)
1914{
1915 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
Mark Brownb2c812e2010-04-14 15:35:19 +09001916 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
Mark Brown9e6e96a2010-01-29 17:47:12 +00001917 struct wm8994_pdata *pdata = wm8994->pdata;
1918 int drc = wm8994_get_drc(kcontrol->id.name);
1919 int value = ucontrol->value.integer.value[0];
1920
1921 if (drc < 0)
1922 return drc;
1923
1924 if (value >= pdata->num_drc_cfgs)
1925 return -EINVAL;
1926
1927 wm8994->drc_cfg[drc] = value;
1928
1929 wm8994_set_drc(codec, drc);
1930
1931 return 0;
1932}
1933
1934static int wm8994_get_drc_enum(struct snd_kcontrol *kcontrol,
1935 struct snd_ctl_elem_value *ucontrol)
1936{
1937 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
Mark Brownb2c812e2010-04-14 15:35:19 +09001938 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
Mark Brown9e6e96a2010-01-29 17:47:12 +00001939 int drc = wm8994_get_drc(kcontrol->id.name);
1940
1941 ucontrol->value.enumerated.item[0] = wm8994->drc_cfg[drc];
1942
1943 return 0;
1944}
1945
1946static void wm8994_set_retune_mobile(struct snd_soc_codec *codec, int block)
1947{
Mark Brownb2c812e2010-04-14 15:35:19 +09001948 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
Mark Brown9e6e96a2010-01-29 17:47:12 +00001949 struct wm8994_pdata *pdata = wm8994->pdata;
1950 int base = wm8994_retune_mobile_base[block];
1951 int iface, best, best_val, save, i, cfg;
1952
1953 if (!pdata || !wm8994->num_retune_mobile_texts)
1954 return;
1955
1956 switch (block) {
1957 case 0:
1958 case 1:
1959 iface = 0;
1960 break;
1961 case 2:
1962 iface = 1;
1963 break;
1964 default:
1965 return;
1966 }
1967
1968 /* Find the version of the currently selected configuration
1969 * with the nearest sample rate. */
1970 cfg = wm8994->retune_mobile_cfg[block];
1971 best = 0;
1972 best_val = INT_MAX;
1973 for (i = 0; i < pdata->num_retune_mobile_cfgs; i++) {
1974 if (strcmp(pdata->retune_mobile_cfgs[i].name,
1975 wm8994->retune_mobile_texts[cfg]) == 0 &&
1976 abs(pdata->retune_mobile_cfgs[i].rate
1977 - wm8994->dac_rates[iface]) < best_val) {
1978 best = i;
1979 best_val = abs(pdata->retune_mobile_cfgs[i].rate
1980 - wm8994->dac_rates[iface]);
1981 }
1982 }
1983
1984 dev_dbg(codec->dev, "ReTune Mobile %d %s/%dHz for %dHz sample rate\n",
1985 block,
1986 pdata->retune_mobile_cfgs[best].name,
1987 pdata->retune_mobile_cfgs[best].rate,
1988 wm8994->dac_rates[iface]);
1989
1990 /* The EQ will be disabled while reconfiguring it, remember the
1991 * current configuration.
1992 */
1993 save = snd_soc_read(codec, base);
1994 save &= WM8994_AIF1DAC1_EQ_ENA;
1995
1996 for (i = 0; i < WM8994_EQ_REGS; i++)
1997 snd_soc_update_bits(codec, base + i, 0xffff,
1998 pdata->retune_mobile_cfgs[best].regs[i]);
1999
2000 snd_soc_update_bits(codec, base, WM8994_AIF1DAC1_EQ_ENA, save);
2001}
2002
2003/* Icky as hell but saves code duplication */
2004static int wm8994_get_retune_mobile_block(const char *name)
2005{
2006 if (strcmp(name, "AIF1.1 EQ Mode") == 0)
2007 return 0;
2008 if (strcmp(name, "AIF1.2 EQ Mode") == 0)
2009 return 1;
2010 if (strcmp(name, "AIF2 EQ Mode") == 0)
2011 return 2;
2012 return -EINVAL;
2013}
2014
2015static int wm8994_put_retune_mobile_enum(struct snd_kcontrol *kcontrol,
2016 struct snd_ctl_elem_value *ucontrol)
2017{
2018 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
Mark Brownb2c812e2010-04-14 15:35:19 +09002019 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
Mark Brown9e6e96a2010-01-29 17:47:12 +00002020 struct wm8994_pdata *pdata = wm8994->pdata;
2021 int block = wm8994_get_retune_mobile_block(kcontrol->id.name);
2022 int value = ucontrol->value.integer.value[0];
2023
2024 if (block < 0)
2025 return block;
2026
2027 if (value >= pdata->num_retune_mobile_cfgs)
2028 return -EINVAL;
2029
2030 wm8994->retune_mobile_cfg[block] = value;
2031
2032 wm8994_set_retune_mobile(codec, block);
2033
2034 return 0;
2035}
2036
2037static int wm8994_get_retune_mobile_enum(struct snd_kcontrol *kcontrol,
2038 struct snd_ctl_elem_value *ucontrol)
2039{
2040 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
Mark Brownb2c812e2010-04-14 15:35:19 +09002041 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
Mark Brown9e6e96a2010-01-29 17:47:12 +00002042 int block = wm8994_get_retune_mobile_block(kcontrol->id.name);
2043
2044 ucontrol->value.enumerated.item[0] = wm8994->retune_mobile_cfg[block];
2045
2046 return 0;
2047}
2048
2049static const struct snd_kcontrol_new wm8994_snd_controls[] = {
2050SOC_DOUBLE_R_TLV("AIF1ADC1 Volume", WM8994_AIF1_ADC1_LEFT_VOLUME,
2051 WM8994_AIF1_ADC1_RIGHT_VOLUME,
2052 1, 119, 0, digital_tlv),
2053SOC_DOUBLE_R_TLV("AIF1ADC2 Volume", WM8994_AIF1_ADC2_LEFT_VOLUME,
2054 WM8994_AIF1_ADC2_RIGHT_VOLUME,
2055 1, 119, 0, digital_tlv),
2056SOC_DOUBLE_R_TLV("AIF2ADC Volume", WM8994_AIF2_ADC_LEFT_VOLUME,
2057 WM8994_AIF2_ADC_RIGHT_VOLUME,
2058 1, 119, 0, digital_tlv),
2059
2060SOC_DOUBLE_R_TLV("AIF1DAC1 Volume", WM8994_AIF1_DAC1_LEFT_VOLUME,
2061 WM8994_AIF1_DAC1_RIGHT_VOLUME, 1, 96, 0, digital_tlv),
2062SOC_DOUBLE_R_TLV("AIF1DAC2 Volume", WM8994_AIF1_DAC2_LEFT_VOLUME,
2063 WM8994_AIF1_DAC2_RIGHT_VOLUME, 1, 96, 0, digital_tlv),
2064SOC_DOUBLE_R_TLV("AIF2DAC Volume", WM8994_AIF2_DAC_LEFT_VOLUME,
2065 WM8994_AIF2_DAC_RIGHT_VOLUME, 1, 96, 0, digital_tlv),
2066
2067SOC_SINGLE_TLV("AIF1 Boost Volume", WM8994_AIF1_CONTROL_2, 10, 3, 0, aif_tlv),
2068SOC_SINGLE_TLV("AIF2 Boost Volume", WM8994_AIF2_CONTROL_2, 10, 3, 0, aif_tlv),
2069
2070SOC_SINGLE("AIF1DAC1 EQ Switch", WM8994_AIF1_DAC1_EQ_GAINS_1, 0, 1, 0),
2071SOC_SINGLE("AIF1DAC2 EQ Switch", WM8994_AIF1_DAC2_EQ_GAINS_1, 0, 1, 0),
2072SOC_SINGLE("AIF2 EQ Switch", WM8994_AIF2_EQ_GAINS_1, 0, 1, 0),
2073
2074WM8994_DRC_SWITCH("AIF1DAC1 DRC Switch", WM8994_AIF1_DRC1_1, 2),
2075WM8994_DRC_SWITCH("AIF1ADC1L DRC Switch", WM8994_AIF1_DRC1_1, 1),
2076WM8994_DRC_SWITCH("AIF1ADC1R DRC Switch", WM8994_AIF1_DRC1_1, 0),
2077
2078WM8994_DRC_SWITCH("AIF1DAC2 DRC Switch", WM8994_AIF1_DRC2_1, 2),
2079WM8994_DRC_SWITCH("AIF1ADC2L DRC Switch", WM8994_AIF1_DRC2_1, 1),
2080WM8994_DRC_SWITCH("AIF1ADC2R DRC Switch", WM8994_AIF1_DRC2_1, 0),
2081
2082WM8994_DRC_SWITCH("AIF2DAC DRC Switch", WM8994_AIF2_DRC_1, 2),
2083WM8994_DRC_SWITCH("AIF2ADCL DRC Switch", WM8994_AIF2_DRC_1, 1),
2084WM8994_DRC_SWITCH("AIF2ADCR DRC Switch", WM8994_AIF2_DRC_1, 0),
2085
2086SOC_SINGLE_TLV("DAC1 Right Sidetone Volume", WM8994_DAC1_MIXER_VOLUMES,
2087 5, 12, 0, st_tlv),
2088SOC_SINGLE_TLV("DAC1 Left Sidetone Volume", WM8994_DAC1_MIXER_VOLUMES,
2089 0, 12, 0, st_tlv),
2090SOC_SINGLE_TLV("DAC2 Right Sidetone Volume", WM8994_DAC2_MIXER_VOLUMES,
2091 5, 12, 0, st_tlv),
2092SOC_SINGLE_TLV("DAC2 Left Sidetone Volume", WM8994_DAC2_MIXER_VOLUMES,
2093 0, 12, 0, st_tlv),
2094SOC_ENUM("Sidetone HPF Mux", sidetone_hpf),
2095SOC_SINGLE("Sidetone HPF Switch", WM8994_SIDETONE, 6, 1, 0),
2096
2097SOC_DOUBLE_R_TLV("DAC1 Volume", WM8994_DAC1_LEFT_VOLUME,
2098 WM8994_DAC1_RIGHT_VOLUME, 1, 96, 0, digital_tlv),
2099SOC_DOUBLE_R("DAC1 Switch", WM8994_DAC1_LEFT_VOLUME,
2100 WM8994_DAC1_RIGHT_VOLUME, 9, 1, 1),
2101
2102SOC_DOUBLE_R_TLV("DAC2 Volume", WM8994_DAC2_LEFT_VOLUME,
2103 WM8994_DAC2_RIGHT_VOLUME, 1, 96, 0, digital_tlv),
2104SOC_DOUBLE_R("DAC2 Switch", WM8994_DAC2_LEFT_VOLUME,
2105 WM8994_DAC2_RIGHT_VOLUME, 9, 1, 1),
2106
2107SOC_SINGLE_TLV("SPKL DAC2 Volume", WM8994_SPKMIXL_ATTENUATION,
2108 6, 1, 1, wm_hubs_spkmix_tlv),
2109SOC_SINGLE_TLV("SPKL DAC1 Volume", WM8994_SPKMIXL_ATTENUATION,
2110 2, 1, 1, wm_hubs_spkmix_tlv),
2111
2112SOC_SINGLE_TLV("SPKR DAC2 Volume", WM8994_SPKMIXR_ATTENUATION,
2113 6, 1, 1, wm_hubs_spkmix_tlv),
2114SOC_SINGLE_TLV("SPKR DAC1 Volume", WM8994_SPKMIXR_ATTENUATION,
2115 2, 1, 1, wm_hubs_spkmix_tlv),
2116
2117SOC_SINGLE_TLV("AIF1DAC1 3D Stereo Volume", WM8994_AIF1_DAC1_FILTERS_2,
2118 10, 15, 0, wm8994_3d_tlv),
2119SOC_SINGLE("AIF1DAC1 3D Stereo Switch", WM8994_AIF1_DAC2_FILTERS_2,
2120 8, 1, 0),
2121SOC_SINGLE_TLV("AIF1DAC2 3D Stereo Volume", WM8994_AIF1_DAC2_FILTERS_2,
2122 10, 15, 0, wm8994_3d_tlv),
2123SOC_SINGLE("AIF1DAC2 3D Stereo Switch", WM8994_AIF1_DAC2_FILTERS_2,
2124 8, 1, 0),
2125SOC_SINGLE_TLV("AIF2DAC 3D Stereo Volume", WM8994_AIF1_DAC1_FILTERS_2,
2126 10, 15, 0, wm8994_3d_tlv),
2127SOC_SINGLE("AIF2DAC 3D Stereo Switch", WM8994_AIF1_DAC2_FILTERS_2,
2128 8, 1, 0),
2129};
2130
2131static const struct snd_kcontrol_new wm8994_eq_controls[] = {
2132SOC_SINGLE_TLV("AIF1DAC1 EQ1 Volume", WM8994_AIF1_DAC1_EQ_GAINS_1, 11, 31, 0,
2133 eq_tlv),
2134SOC_SINGLE_TLV("AIF1DAC1 EQ2 Volume", WM8994_AIF1_DAC1_EQ_GAINS_1, 6, 31, 0,
2135 eq_tlv),
2136SOC_SINGLE_TLV("AIF1DAC1 EQ3 Volume", WM8994_AIF1_DAC1_EQ_GAINS_1, 1, 31, 0,
2137 eq_tlv),
2138SOC_SINGLE_TLV("AIF1DAC1 EQ4 Volume", WM8994_AIF1_DAC1_EQ_GAINS_2, 11, 31, 0,
2139 eq_tlv),
2140SOC_SINGLE_TLV("AIF1DAC1 EQ5 Volume", WM8994_AIF1_DAC1_EQ_GAINS_2, 6, 31, 0,
2141 eq_tlv),
2142
2143SOC_SINGLE_TLV("AIF1DAC2 EQ1 Volume", WM8994_AIF1_DAC2_EQ_GAINS_1, 11, 31, 0,
2144 eq_tlv),
2145SOC_SINGLE_TLV("AIF1DAC2 EQ2 Volume", WM8994_AIF1_DAC2_EQ_GAINS_1, 6, 31, 0,
2146 eq_tlv),
2147SOC_SINGLE_TLV("AIF1DAC2 EQ3 Volume", WM8994_AIF1_DAC2_EQ_GAINS_1, 1, 31, 0,
2148 eq_tlv),
2149SOC_SINGLE_TLV("AIF1DAC2 EQ4 Volume", WM8994_AIF1_DAC2_EQ_GAINS_2, 11, 31, 0,
2150 eq_tlv),
2151SOC_SINGLE_TLV("AIF1DAC2 EQ5 Volume", WM8994_AIF1_DAC2_EQ_GAINS_2, 6, 31, 0,
2152 eq_tlv),
2153
2154SOC_SINGLE_TLV("AIF2 EQ1 Volume", WM8994_AIF2_EQ_GAINS_1, 11, 31, 0,
2155 eq_tlv),
2156SOC_SINGLE_TLV("AIF2 EQ2 Volume", WM8994_AIF2_EQ_GAINS_1, 6, 31, 0,
2157 eq_tlv),
2158SOC_SINGLE_TLV("AIF2 EQ3 Volume", WM8994_AIF2_EQ_GAINS_1, 1, 31, 0,
2159 eq_tlv),
2160SOC_SINGLE_TLV("AIF2 EQ4 Volume", WM8994_AIF2_EQ_GAINS_2, 11, 31, 0,
2161 eq_tlv),
2162SOC_SINGLE_TLV("AIF2 EQ5 Volume", WM8994_AIF2_EQ_GAINS_2, 6, 31, 0,
2163 eq_tlv),
2164};
2165
2166static int clk_sys_event(struct snd_soc_dapm_widget *w,
2167 struct snd_kcontrol *kcontrol, int event)
2168{
2169 struct snd_soc_codec *codec = w->codec;
2170
2171 switch (event) {
2172 case SND_SOC_DAPM_PRE_PMU:
2173 return configure_clock(codec);
2174
2175 case SND_SOC_DAPM_POST_PMD:
2176 configure_clock(codec);
2177 break;
2178 }
2179
2180 return 0;
2181}
2182
2183static void wm8994_update_class_w(struct snd_soc_codec *codec)
2184{
2185 int enable = 1;
2186 int source = 0; /* GCC flow analysis can't track enable */
2187 int reg, reg_r;
2188
2189 /* Only support direct DAC->headphone paths */
2190 reg = snd_soc_read(codec, WM8994_OUTPUT_MIXER_1);
2191 if (!(reg & WM8994_DAC1L_TO_HPOUT1L)) {
2192 dev_dbg(codec->dev, "HPL connected to output mixer\n");
2193 enable = 0;
2194 }
2195
2196 reg = snd_soc_read(codec, WM8994_OUTPUT_MIXER_2);
2197 if (!(reg & WM8994_DAC1R_TO_HPOUT1R)) {
2198 dev_dbg(codec->dev, "HPR connected to output mixer\n");
2199 enable = 0;
2200 }
2201
2202 /* We also need the same setting for L/R and only one path */
2203 reg = snd_soc_read(codec, WM8994_DAC1_LEFT_MIXER_ROUTING);
2204 switch (reg) {
2205 case WM8994_AIF2DACL_TO_DAC1L:
2206 dev_dbg(codec->dev, "Class W source AIF2DAC\n");
2207 source = 2 << WM8994_CP_DYN_SRC_SEL_SHIFT;
2208 break;
2209 case WM8994_AIF1DAC2L_TO_DAC1L:
2210 dev_dbg(codec->dev, "Class W source AIF1DAC2\n");
2211 source = 1 << WM8994_CP_DYN_SRC_SEL_SHIFT;
2212 break;
2213 case WM8994_AIF1DAC1L_TO_DAC1L:
2214 dev_dbg(codec->dev, "Class W source AIF1DAC1\n");
2215 source = 0 << WM8994_CP_DYN_SRC_SEL_SHIFT;
2216 break;
2217 default:
2218 dev_dbg(codec->dev, "DAC mixer setting: %x\n", reg);
2219 enable = 0;
2220 break;
2221 }
2222
2223 reg_r = snd_soc_read(codec, WM8994_DAC1_RIGHT_MIXER_ROUTING);
2224 if (reg_r != reg) {
2225 dev_dbg(codec->dev, "Left and right DAC mixers different\n");
2226 enable = 0;
2227 }
2228
2229 if (enable) {
2230 dev_dbg(codec->dev, "Class W enabled\n");
2231 snd_soc_update_bits(codec, WM8994_CLASS_W_1,
2232 WM8994_CP_DYN_PWR |
2233 WM8994_CP_DYN_SRC_SEL_MASK,
2234 source | WM8994_CP_DYN_PWR);
2235
2236 } else {
2237 dev_dbg(codec->dev, "Class W disabled\n");
2238 snd_soc_update_bits(codec, WM8994_CLASS_W_1,
2239 WM8994_CP_DYN_PWR, 0);
2240 }
2241}
2242
2243static const char *hp_mux_text[] = {
2244 "Mixer",
2245 "DAC",
2246};
2247
2248#define WM8994_HP_ENUM(xname, xenum) \
2249{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
2250 .info = snd_soc_info_enum_double, \
2251 .get = snd_soc_dapm_get_enum_double, \
2252 .put = wm8994_put_hp_enum, \
2253 .private_value = (unsigned long)&xenum }
2254
2255static int wm8994_put_hp_enum(struct snd_kcontrol *kcontrol,
2256 struct snd_ctl_elem_value *ucontrol)
2257{
2258 struct snd_soc_dapm_widget *w = snd_kcontrol_chip(kcontrol);
2259 struct snd_soc_codec *codec = w->codec;
2260 int ret;
2261
2262 ret = snd_soc_dapm_put_enum_double(kcontrol, ucontrol);
2263
2264 wm8994_update_class_w(codec);
2265
2266 return ret;
2267}
2268
2269static const struct soc_enum hpl_enum =
2270 SOC_ENUM_SINGLE(WM8994_OUTPUT_MIXER_1, 8, 2, hp_mux_text);
2271
2272static const struct snd_kcontrol_new hpl_mux =
2273 WM8994_HP_ENUM("Left Headphone Mux", hpl_enum);
2274
2275static const struct soc_enum hpr_enum =
2276 SOC_ENUM_SINGLE(WM8994_OUTPUT_MIXER_2, 8, 2, hp_mux_text);
2277
2278static const struct snd_kcontrol_new hpr_mux =
2279 WM8994_HP_ENUM("Right Headphone Mux", hpr_enum);
2280
2281static const char *adc_mux_text[] = {
2282 "ADC",
2283 "DMIC",
2284};
2285
2286static const struct soc_enum adc_enum =
2287 SOC_ENUM_SINGLE(0, 0, 2, adc_mux_text);
2288
2289static const struct snd_kcontrol_new adcl_mux =
2290 SOC_DAPM_ENUM_VIRT("ADCL Mux", adc_enum);
2291
2292static const struct snd_kcontrol_new adcr_mux =
2293 SOC_DAPM_ENUM_VIRT("ADCR Mux", adc_enum);
2294
2295static const struct snd_kcontrol_new left_speaker_mixer[] = {
2296SOC_DAPM_SINGLE("DAC2 Switch", WM8994_SPEAKER_MIXER, 9, 1, 0),
2297SOC_DAPM_SINGLE("Input Switch", WM8994_SPEAKER_MIXER, 7, 1, 0),
2298SOC_DAPM_SINGLE("IN1LP Switch", WM8994_SPEAKER_MIXER, 5, 1, 0),
2299SOC_DAPM_SINGLE("Output Switch", WM8994_SPEAKER_MIXER, 3, 1, 0),
2300SOC_DAPM_SINGLE("DAC1 Switch", WM8994_SPEAKER_MIXER, 1, 1, 0),
2301};
2302
2303static const struct snd_kcontrol_new right_speaker_mixer[] = {
2304SOC_DAPM_SINGLE("DAC2 Switch", WM8994_SPEAKER_MIXER, 8, 1, 0),
2305SOC_DAPM_SINGLE("Input Switch", WM8994_SPEAKER_MIXER, 6, 1, 0),
2306SOC_DAPM_SINGLE("IN1RP Switch", WM8994_SPEAKER_MIXER, 4, 1, 0),
2307SOC_DAPM_SINGLE("Output Switch", WM8994_SPEAKER_MIXER, 2, 1, 0),
2308SOC_DAPM_SINGLE("DAC1 Switch", WM8994_SPEAKER_MIXER, 0, 1, 0),
2309};
2310
2311/* Debugging; dump chip status after DAPM transitions */
2312static int post_ev(struct snd_soc_dapm_widget *w,
2313 struct snd_kcontrol *kcontrol, int event)
2314{
2315 struct snd_soc_codec *codec = w->codec;
2316 dev_dbg(codec->dev, "SRC status: %x\n",
2317 snd_soc_read(codec,
2318 WM8994_RATE_STATUS));
2319 return 0;
2320}
2321
2322static const struct snd_kcontrol_new aif1adc1l_mix[] = {
2323SOC_DAPM_SINGLE("ADC/DMIC Switch", WM8994_AIF1_ADC1_LEFT_MIXER_ROUTING,
2324 1, 1, 0),
2325SOC_DAPM_SINGLE("AIF2 Switch", WM8994_AIF1_ADC1_LEFT_MIXER_ROUTING,
2326 0, 1, 0),
2327};
2328
2329static const struct snd_kcontrol_new aif1adc1r_mix[] = {
2330SOC_DAPM_SINGLE("ADC/DMIC Switch", WM8994_AIF1_ADC1_RIGHT_MIXER_ROUTING,
2331 1, 1, 0),
2332SOC_DAPM_SINGLE("AIF2 Switch", WM8994_AIF1_ADC1_RIGHT_MIXER_ROUTING,
2333 0, 1, 0),
2334};
2335
2336static const struct snd_kcontrol_new aif2dac2l_mix[] = {
2337SOC_DAPM_SINGLE("Right Sidetone Switch", WM8994_DAC2_LEFT_MIXER_ROUTING,
2338 5, 1, 0),
2339SOC_DAPM_SINGLE("Left Sidetone Switch", WM8994_DAC2_LEFT_MIXER_ROUTING,
2340 4, 1, 0),
2341SOC_DAPM_SINGLE("AIF2 Switch", WM8994_DAC2_LEFT_MIXER_ROUTING,
2342 2, 1, 0),
2343SOC_DAPM_SINGLE("AIF1.2 Switch", WM8994_DAC2_LEFT_MIXER_ROUTING,
2344 1, 1, 0),
2345SOC_DAPM_SINGLE("AIF1.1 Switch", WM8994_DAC2_LEFT_MIXER_ROUTING,
2346 0, 1, 0),
2347};
2348
2349static const struct snd_kcontrol_new aif2dac2r_mix[] = {
2350SOC_DAPM_SINGLE("Right Sidetone Switch", WM8994_DAC2_RIGHT_MIXER_ROUTING,
2351 5, 1, 0),
2352SOC_DAPM_SINGLE("Left Sidetone Switch", WM8994_DAC2_RIGHT_MIXER_ROUTING,
2353 4, 1, 0),
2354SOC_DAPM_SINGLE("AIF2 Switch", WM8994_DAC2_RIGHT_MIXER_ROUTING,
2355 2, 1, 0),
2356SOC_DAPM_SINGLE("AIF1.2 Switch", WM8994_DAC2_RIGHT_MIXER_ROUTING,
2357 1, 1, 0),
2358SOC_DAPM_SINGLE("AIF1.1 Switch", WM8994_DAC2_RIGHT_MIXER_ROUTING,
2359 0, 1, 0),
2360};
2361
2362#define WM8994_CLASS_W_SWITCH(xname, reg, shift, max, invert) \
2363{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
2364 .info = snd_soc_info_volsw, \
2365 .get = snd_soc_dapm_get_volsw, .put = wm8994_put_class_w, \
2366 .private_value = SOC_SINGLE_VALUE(reg, shift, max, invert) }
2367
2368static int wm8994_put_class_w(struct snd_kcontrol *kcontrol,
2369 struct snd_ctl_elem_value *ucontrol)
2370{
2371 struct snd_soc_dapm_widget *w = snd_kcontrol_chip(kcontrol);
2372 struct snd_soc_codec *codec = w->codec;
2373 int ret;
2374
2375 ret = snd_soc_dapm_put_volsw(kcontrol, ucontrol);
2376
2377 wm8994_update_class_w(codec);
2378
2379 return ret;
2380}
2381
2382static const struct snd_kcontrol_new dac1l_mix[] = {
2383WM8994_CLASS_W_SWITCH("Right Sidetone Switch", WM8994_DAC1_LEFT_MIXER_ROUTING,
2384 5, 1, 0),
2385WM8994_CLASS_W_SWITCH("Left Sidetone Switch", WM8994_DAC1_LEFT_MIXER_ROUTING,
2386 4, 1, 0),
2387WM8994_CLASS_W_SWITCH("AIF2 Switch", WM8994_DAC1_LEFT_MIXER_ROUTING,
2388 2, 1, 0),
2389WM8994_CLASS_W_SWITCH("AIF1.2 Switch", WM8994_DAC1_LEFT_MIXER_ROUTING,
2390 1, 1, 0),
2391WM8994_CLASS_W_SWITCH("AIF1.1 Switch", WM8994_DAC1_LEFT_MIXER_ROUTING,
2392 0, 1, 0),
2393};
2394
2395static const struct snd_kcontrol_new dac1r_mix[] = {
2396WM8994_CLASS_W_SWITCH("Right Sidetone Switch", WM8994_DAC1_RIGHT_MIXER_ROUTING,
2397 5, 1, 0),
2398WM8994_CLASS_W_SWITCH("Left Sidetone Switch", WM8994_DAC1_RIGHT_MIXER_ROUTING,
2399 4, 1, 0),
2400WM8994_CLASS_W_SWITCH("AIF2 Switch", WM8994_DAC1_RIGHT_MIXER_ROUTING,
2401 2, 1, 0),
2402WM8994_CLASS_W_SWITCH("AIF1.2 Switch", WM8994_DAC1_RIGHT_MIXER_ROUTING,
2403 1, 1, 0),
2404WM8994_CLASS_W_SWITCH("AIF1.1 Switch", WM8994_DAC1_RIGHT_MIXER_ROUTING,
2405 0, 1, 0),
2406};
2407
2408static const char *sidetone_text[] = {
2409 "ADC/DMIC1", "DMIC2",
2410};
2411
2412static const struct soc_enum sidetone1_enum =
2413 SOC_ENUM_SINGLE(WM8994_SIDETONE, 0, 2, sidetone_text);
2414
2415static const struct snd_kcontrol_new sidetone1_mux =
2416 SOC_DAPM_ENUM("Left Sidetone Mux", sidetone1_enum);
2417
2418static const struct soc_enum sidetone2_enum =
2419 SOC_ENUM_SINGLE(WM8994_SIDETONE, 1, 2, sidetone_text);
2420
2421static const struct snd_kcontrol_new sidetone2_mux =
2422 SOC_DAPM_ENUM("Right Sidetone Mux", sidetone2_enum);
2423
2424static const char *aif1dac_text[] = {
2425 "AIF1DACDAT", "AIF3DACDAT",
2426};
2427
2428static const struct soc_enum aif1dac_enum =
2429 SOC_ENUM_SINGLE(WM8994_POWER_MANAGEMENT_6, 0, 2, aif1dac_text);
2430
2431static const struct snd_kcontrol_new aif1dac_mux =
2432 SOC_DAPM_ENUM("AIF1DAC Mux", aif1dac_enum);
2433
2434static const char *aif2dac_text[] = {
2435 "AIF2DACDAT", "AIF3DACDAT",
2436};
2437
2438static const struct soc_enum aif2dac_enum =
2439 SOC_ENUM_SINGLE(WM8994_POWER_MANAGEMENT_6, 1, 2, aif2dac_text);
2440
2441static const struct snd_kcontrol_new aif2dac_mux =
2442 SOC_DAPM_ENUM("AIF2DAC Mux", aif2dac_enum);
2443
2444static const char *aif2adc_text[] = {
2445 "AIF2ADCDAT", "AIF3DACDAT",
2446};
2447
2448static const struct soc_enum aif2adc_enum =
2449 SOC_ENUM_SINGLE(WM8994_POWER_MANAGEMENT_6, 2, 2, aif2adc_text);
2450
2451static const struct snd_kcontrol_new aif2adc_mux =
2452 SOC_DAPM_ENUM("AIF2ADC Mux", aif2adc_enum);
2453
2454static const char *aif3adc_text[] = {
2455 "AIF1ADCDAT", "AIF2ADCDAT", "AIF2DACDAT",
2456};
2457
2458static const struct soc_enum aif3adc_enum =
2459 SOC_ENUM_SINGLE(WM8994_POWER_MANAGEMENT_6, 3, 3, aif3adc_text);
2460
2461static const struct snd_kcontrol_new aif3adc_mux =
2462 SOC_DAPM_ENUM("AIF3ADC Mux", aif3adc_enum);
2463
2464static const struct snd_soc_dapm_widget wm8994_dapm_widgets[] = {
2465SND_SOC_DAPM_INPUT("DMIC1DAT"),
2466SND_SOC_DAPM_INPUT("DMIC2DAT"),
2467
2468SND_SOC_DAPM_SUPPLY("CLK_SYS", SND_SOC_NOPM, 0, 0, clk_sys_event,
2469 SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
2470
2471SND_SOC_DAPM_SUPPLY("DSP1CLK", WM8994_CLOCKING_1, 3, 0, NULL, 0),
2472SND_SOC_DAPM_SUPPLY("DSP2CLK", WM8994_CLOCKING_1, 2, 0, NULL, 0),
2473SND_SOC_DAPM_SUPPLY("DSPINTCLK", WM8994_CLOCKING_1, 1, 0, NULL, 0),
2474
2475SND_SOC_DAPM_SUPPLY("AIF1CLK", WM8994_AIF1_CLOCKING_1, 0, 0, NULL, 0),
2476SND_SOC_DAPM_SUPPLY("AIF2CLK", WM8994_AIF2_CLOCKING_1, 0, 0, NULL, 0),
2477
2478SND_SOC_DAPM_AIF_OUT("AIF1ADC1L", "AIF1 Capture",
2479 0, WM8994_POWER_MANAGEMENT_4, 9, 0),
2480SND_SOC_DAPM_AIF_OUT("AIF1ADC1R", "AIF1 Capture",
2481 0, WM8994_POWER_MANAGEMENT_4, 8, 0),
2482SND_SOC_DAPM_AIF_IN("AIF1DAC1L", NULL, 0,
2483 WM8994_POWER_MANAGEMENT_5, 9, 0),
2484SND_SOC_DAPM_AIF_IN("AIF1DAC1R", NULL, 0,
2485 WM8994_POWER_MANAGEMENT_5, 8, 0),
2486
2487SND_SOC_DAPM_AIF_OUT("AIF1ADC2L", "AIF1 Capture",
2488 0, WM8994_POWER_MANAGEMENT_4, 11, 0),
2489SND_SOC_DAPM_AIF_OUT("AIF1ADC2R", "AIF1 Capture",
2490 0, WM8994_POWER_MANAGEMENT_4, 10, 0),
2491SND_SOC_DAPM_AIF_IN("AIF1DAC2L", NULL, 0,
2492 WM8994_POWER_MANAGEMENT_5, 11, 0),
2493SND_SOC_DAPM_AIF_IN("AIF1DAC2R", NULL, 0,
2494 WM8994_POWER_MANAGEMENT_5, 10, 0),
2495
2496SND_SOC_DAPM_MIXER("AIF1ADC1L Mixer", SND_SOC_NOPM, 0, 0,
2497 aif1adc1l_mix, ARRAY_SIZE(aif1adc1l_mix)),
2498SND_SOC_DAPM_MIXER("AIF1ADC1R Mixer", SND_SOC_NOPM, 0, 0,
2499 aif1adc1r_mix, ARRAY_SIZE(aif1adc1r_mix)),
2500
2501SND_SOC_DAPM_MIXER("AIF2DAC2L Mixer", SND_SOC_NOPM, 0, 0,
2502 aif2dac2l_mix, ARRAY_SIZE(aif2dac2l_mix)),
2503SND_SOC_DAPM_MIXER("AIF2DAC2R Mixer", SND_SOC_NOPM, 0, 0,
2504 aif2dac2r_mix, ARRAY_SIZE(aif2dac2r_mix)),
2505
2506SND_SOC_DAPM_MUX("Left Sidetone", SND_SOC_NOPM, 0, 0, &sidetone1_mux),
2507SND_SOC_DAPM_MUX("Right Sidetone", SND_SOC_NOPM, 0, 0, &sidetone2_mux),
2508
2509SND_SOC_DAPM_MIXER("DAC1L Mixer", SND_SOC_NOPM, 0, 0,
2510 dac1l_mix, ARRAY_SIZE(dac1l_mix)),
2511SND_SOC_DAPM_MIXER("DAC1R Mixer", SND_SOC_NOPM, 0, 0,
2512 dac1r_mix, ARRAY_SIZE(dac1r_mix)),
2513
2514SND_SOC_DAPM_AIF_OUT("AIF2ADCL", NULL, 0,
2515 WM8994_POWER_MANAGEMENT_4, 13, 0),
2516SND_SOC_DAPM_AIF_OUT("AIF2ADCR", NULL, 0,
2517 WM8994_POWER_MANAGEMENT_4, 12, 0),
2518SND_SOC_DAPM_AIF_IN("AIF2DACL", NULL, 0,
2519 WM8994_POWER_MANAGEMENT_5, 13, 0),
2520SND_SOC_DAPM_AIF_IN("AIF2DACR", NULL, 0,
2521 WM8994_POWER_MANAGEMENT_5, 12, 0),
2522
2523SND_SOC_DAPM_AIF_IN("AIF1DACDAT", "AIF1 Playback", 0, SND_SOC_NOPM, 0, 0),
2524SND_SOC_DAPM_AIF_IN("AIF2DACDAT", "AIF2 Playback", 0, SND_SOC_NOPM, 0, 0),
2525SND_SOC_DAPM_AIF_OUT("AIF2ADCDAT", "AIF2 Capture", 0, SND_SOC_NOPM, 0, 0),
2526
2527SND_SOC_DAPM_MUX("AIF1DAC Mux", SND_SOC_NOPM, 0, 0, &aif1dac_mux),
2528SND_SOC_DAPM_MUX("AIF2DAC Mux", SND_SOC_NOPM, 0, 0, &aif2dac_mux),
2529SND_SOC_DAPM_MUX("AIF2ADC Mux", SND_SOC_NOPM, 0, 0, &aif2adc_mux),
2530SND_SOC_DAPM_MUX("AIF3ADC Mux", SND_SOC_NOPM, 0, 0, &aif3adc_mux),
2531
2532SND_SOC_DAPM_AIF_IN("AIF3DACDAT", "AIF3 Playback", 0, SND_SOC_NOPM, 0, 0),
2533SND_SOC_DAPM_AIF_IN("AIF3ADCDAT", "AIF3 Capture", 0, SND_SOC_NOPM, 0, 0),
2534
2535SND_SOC_DAPM_SUPPLY("TOCLK", WM8994_CLOCKING_1, 4, 0, NULL, 0),
2536
2537SND_SOC_DAPM_ADC("DMIC2L", NULL, WM8994_POWER_MANAGEMENT_4, 5, 0),
2538SND_SOC_DAPM_ADC("DMIC2R", NULL, WM8994_POWER_MANAGEMENT_4, 4, 0),
2539SND_SOC_DAPM_ADC("DMIC1L", NULL, WM8994_POWER_MANAGEMENT_4, 3, 0),
2540SND_SOC_DAPM_ADC("DMIC1R", NULL, WM8994_POWER_MANAGEMENT_4, 2, 0),
2541
2542/* Power is done with the muxes since the ADC power also controls the
2543 * downsampling chain, the chip will automatically manage the analogue
2544 * specific portions.
2545 */
2546SND_SOC_DAPM_ADC("ADCL", NULL, SND_SOC_NOPM, 1, 0),
2547SND_SOC_DAPM_ADC("ADCR", NULL, SND_SOC_NOPM, 0, 0),
2548
2549SND_SOC_DAPM_MUX("ADCL Mux", WM8994_POWER_MANAGEMENT_4, 1, 0, &adcl_mux),
2550SND_SOC_DAPM_MUX("ADCR Mux", WM8994_POWER_MANAGEMENT_4, 0, 0, &adcr_mux),
2551
2552SND_SOC_DAPM_DAC("DAC2L", NULL, WM8994_POWER_MANAGEMENT_5, 3, 0),
2553SND_SOC_DAPM_DAC("DAC2R", NULL, WM8994_POWER_MANAGEMENT_5, 2, 0),
2554SND_SOC_DAPM_DAC("DAC1L", NULL, WM8994_POWER_MANAGEMENT_5, 1, 0),
2555SND_SOC_DAPM_DAC("DAC1R", NULL, WM8994_POWER_MANAGEMENT_5, 0, 0),
2556
2557SND_SOC_DAPM_MUX("Left Headphone Mux", SND_SOC_NOPM, 0, 0, &hpl_mux),
2558SND_SOC_DAPM_MUX("Right Headphone Mux", SND_SOC_NOPM, 0, 0, &hpr_mux),
2559
2560SND_SOC_DAPM_MIXER("SPKL", WM8994_POWER_MANAGEMENT_3, 8, 0,
2561 left_speaker_mixer, ARRAY_SIZE(left_speaker_mixer)),
2562SND_SOC_DAPM_MIXER("SPKR", WM8994_POWER_MANAGEMENT_3, 9, 0,
2563 right_speaker_mixer, ARRAY_SIZE(right_speaker_mixer)),
2564
2565SND_SOC_DAPM_POST("Debug log", post_ev),
2566};
2567
2568static const struct snd_soc_dapm_route intercon[] = {
2569
2570 { "CLK_SYS", NULL, "AIF1CLK", check_clk_sys },
2571 { "CLK_SYS", NULL, "AIF2CLK", check_clk_sys },
2572
2573 { "DSP1CLK", NULL, "CLK_SYS" },
2574 { "DSP2CLK", NULL, "CLK_SYS" },
2575 { "DSPINTCLK", NULL, "CLK_SYS" },
2576
2577 { "AIF1ADC1L", NULL, "AIF1CLK" },
2578 { "AIF1ADC1L", NULL, "DSP1CLK" },
2579 { "AIF1ADC1R", NULL, "AIF1CLK" },
2580 { "AIF1ADC1R", NULL, "DSP1CLK" },
2581 { "AIF1ADC1R", NULL, "DSPINTCLK" },
2582
2583 { "AIF1DAC1L", NULL, "AIF1CLK" },
2584 { "AIF1DAC1L", NULL, "DSP1CLK" },
2585 { "AIF1DAC1R", NULL, "AIF1CLK" },
2586 { "AIF1DAC1R", NULL, "DSP1CLK" },
2587 { "AIF1DAC1R", NULL, "DSPINTCLK" },
2588
2589 { "AIF1ADC2L", NULL, "AIF1CLK" },
2590 { "AIF1ADC2L", NULL, "DSP1CLK" },
2591 { "AIF1ADC2R", NULL, "AIF1CLK" },
2592 { "AIF1ADC2R", NULL, "DSP1CLK" },
2593 { "AIF1ADC2R", NULL, "DSPINTCLK" },
2594
2595 { "AIF1DAC2L", NULL, "AIF1CLK" },
2596 { "AIF1DAC2L", NULL, "DSP1CLK" },
2597 { "AIF1DAC2R", NULL, "AIF1CLK" },
2598 { "AIF1DAC2R", NULL, "DSP1CLK" },
2599 { "AIF1DAC2R", NULL, "DSPINTCLK" },
2600
2601 { "AIF2ADCL", NULL, "AIF2CLK" },
2602 { "AIF2ADCL", NULL, "DSP2CLK" },
2603 { "AIF2ADCR", NULL, "AIF2CLK" },
2604 { "AIF2ADCR", NULL, "DSP2CLK" },
2605 { "AIF2ADCR", NULL, "DSPINTCLK" },
2606
2607 { "AIF2DACL", NULL, "AIF2CLK" },
2608 { "AIF2DACL", NULL, "DSP2CLK" },
2609 { "AIF2DACR", NULL, "AIF2CLK" },
2610 { "AIF2DACR", NULL, "DSP2CLK" },
2611 { "AIF2DACR", NULL, "DSPINTCLK" },
2612
2613 { "DMIC1L", NULL, "DMIC1DAT" },
2614 { "DMIC1L", NULL, "CLK_SYS" },
2615 { "DMIC1R", NULL, "DMIC1DAT" },
2616 { "DMIC1R", NULL, "CLK_SYS" },
2617 { "DMIC2L", NULL, "DMIC2DAT" },
2618 { "DMIC2L", NULL, "CLK_SYS" },
2619 { "DMIC2R", NULL, "DMIC2DAT" },
2620 { "DMIC2R", NULL, "CLK_SYS" },
2621
2622 { "ADCL", NULL, "AIF1CLK" },
2623 { "ADCL", NULL, "DSP1CLK" },
2624 { "ADCL", NULL, "DSPINTCLK" },
2625
2626 { "ADCR", NULL, "AIF1CLK" },
2627 { "ADCR", NULL, "DSP1CLK" },
2628 { "ADCR", NULL, "DSPINTCLK" },
2629
2630 { "ADCL Mux", "ADC", "ADCL" },
2631 { "ADCL Mux", "DMIC", "DMIC1L" },
2632 { "ADCR Mux", "ADC", "ADCR" },
2633 { "ADCR Mux", "DMIC", "DMIC1R" },
2634
2635 { "DAC1L", NULL, "AIF1CLK" },
2636 { "DAC1L", NULL, "DSP1CLK" },
2637 { "DAC1L", NULL, "DSPINTCLK" },
2638
2639 { "DAC1R", NULL, "AIF1CLK" },
2640 { "DAC1R", NULL, "DSP1CLK" },
2641 { "DAC1R", NULL, "DSPINTCLK" },
2642
2643 { "DAC2L", NULL, "AIF2CLK" },
2644 { "DAC2L", NULL, "DSP2CLK" },
2645 { "DAC2L", NULL, "DSPINTCLK" },
2646
2647 { "DAC2R", NULL, "AIF2DACR" },
2648 { "DAC2R", NULL, "AIF2CLK" },
2649 { "DAC2R", NULL, "DSP2CLK" },
2650 { "DAC2R", NULL, "DSPINTCLK" },
2651
2652 { "TOCLK", NULL, "CLK_SYS" },
2653
2654 /* AIF1 outputs */
2655 { "AIF1ADC1L", NULL, "AIF1ADC1L Mixer" },
2656 { "AIF1ADC1L Mixer", "ADC/DMIC Switch", "ADCL Mux" },
2657 { "AIF1ADC1L Mixer", "AIF2 Switch", "AIF2DACL" },
2658
2659 { "AIF1ADC1R", NULL, "AIF1ADC1R Mixer" },
2660 { "AIF1ADC1R Mixer", "ADC/DMIC Switch", "ADCR Mux" },
2661 { "AIF1ADC1R Mixer", "AIF2 Switch", "AIF2DACR" },
2662
2663 /* Pin level routing for AIF3 */
2664 { "AIF1DAC1L", NULL, "AIF1DAC Mux" },
2665 { "AIF1DAC1R", NULL, "AIF1DAC Mux" },
2666 { "AIF1DAC2L", NULL, "AIF1DAC Mux" },
2667 { "AIF1DAC2R", NULL, "AIF1DAC Mux" },
2668
2669 { "AIF2DACL", NULL, "AIF2DAC Mux" },
2670 { "AIF2DACR", NULL, "AIF2DAC Mux" },
2671
2672 { "AIF1DAC Mux", "AIF1DACDAT", "AIF1DACDAT" },
2673 { "AIF1DAC Mux", "AIF3DACDAT", "AIF3DACDAT" },
2674 { "AIF2DAC Mux", "AIF2DACDAT", "AIF2DACDAT" },
2675 { "AIF2DAC Mux", "AIF3DACDAT", "AIF3DACDAT" },
2676 { "AIF2ADC Mux", "AIF2ADCDAT", "AIF2ADCL" },
2677 { "AIF2ADC Mux", "AIF2ADCDAT", "AIF2ADCR" },
2678 { "AIF2ADC Mux", "AIF3DACDAT", "AIF3ADCDAT" },
2679
2680 /* DAC1 inputs */
2681 { "DAC1L", NULL, "DAC1L Mixer" },
2682 { "DAC1L Mixer", "AIF2 Switch", "AIF2DACL" },
2683 { "DAC1L Mixer", "AIF1.2 Switch", "AIF1DAC2L" },
2684 { "DAC1L Mixer", "AIF1.1 Switch", "AIF1DAC1L" },
2685 { "DAC1L Mixer", "Left Sidetone Switch", "Left Sidetone" },
2686 { "DAC1L Mixer", "Right Sidetone Switch", "Right Sidetone" },
2687
2688 { "DAC1R", NULL, "DAC1R Mixer" },
2689 { "DAC1R Mixer", "AIF2 Switch", "AIF2DACR" },
2690 { "DAC1R Mixer", "AIF1.2 Switch", "AIF1DAC2R" },
2691 { "DAC1R Mixer", "AIF1.1 Switch", "AIF1DAC1R" },
2692 { "DAC1R Mixer", "Left Sidetone Switch", "Left Sidetone" },
2693 { "DAC1R Mixer", "Right Sidetone Switch", "Right Sidetone" },
2694
2695 /* DAC2/AIF2 outputs */
2696 { "AIF2ADCL", NULL, "AIF2DAC2L Mixer" },
2697 { "DAC2L", NULL, "AIF2DAC2L Mixer" },
2698 { "AIF2DAC2L Mixer", "AIF2 Switch", "AIF2DACL" },
2699 { "AIF2DAC2L Mixer", "AIF1.2 Switch", "AIF1DAC2L" },
2700 { "AIF2DAC2L Mixer", "AIF1.1 Switch", "AIF1DAC1L" },
2701 { "AIF2DAC2L Mixer", "Left Sidetone Switch", "Left Sidetone" },
2702 { "AIF2DAC2L Mixer", "Right Sidetone Switch", "Right Sidetone" },
2703
2704 { "AIF2ADCR", NULL, "AIF2DAC2R Mixer" },
2705 { "DAC2R", NULL, "AIF2DAC2R Mixer" },
2706 { "AIF2DAC2R Mixer", "AIF2 Switch", "AIF2DACR" },
2707 { "AIF2DAC2R Mixer", "AIF1.2 Switch", "AIF1DAC2R" },
2708 { "AIF2DAC2R Mixer", "AIF1.1 Switch", "AIF1DAC1R" },
2709 { "AIF2DAC2R Mixer", "Left Sidetone Switch", "Left Sidetone" },
2710 { "AIF2DAC2R Mixer", "Right Sidetone Switch", "Right Sidetone" },
2711
2712 { "AIF2ADCDAT", NULL, "AIF2ADC Mux" },
2713
2714 /* AIF3 output */
2715 { "AIF3ADCDAT", "AIF1ADCDAT", "AIF1ADC1L" },
2716 { "AIF3ADCDAT", "AIF1ADCDAT", "AIF1ADC1R" },
2717 { "AIF3ADCDAT", "AIF1ADCDAT", "AIF1ADC2L" },
2718 { "AIF3ADCDAT", "AIF1ADCDAT", "AIF1ADC2R" },
2719 { "AIF3ADCDAT", "AIF2ADCDAT", "AIF2ADCL" },
2720 { "AIF3ADCDAT", "AIF2ADCDAT", "AIF2ADCR" },
2721 { "AIF3ADCDAT", "AIF2DACDAT", "AIF2DACL" },
2722 { "AIF3ADCDAT", "AIF2DACDAT", "AIF2DACR" },
2723
2724 /* Sidetone */
2725 { "Left Sidetone", "ADC/DMIC1", "ADCL Mux" },
2726 { "Left Sidetone", "DMIC2", "DMIC2L" },
2727 { "Right Sidetone", "ADC/DMIC1", "ADCR Mux" },
2728 { "Right Sidetone", "DMIC2", "DMIC2R" },
2729
2730 /* Output stages */
2731 { "Left Output Mixer", "DAC Switch", "DAC1L" },
2732 { "Right Output Mixer", "DAC Switch", "DAC1R" },
2733
2734 { "SPKL", "DAC1 Switch", "DAC1L" },
2735 { "SPKL", "DAC2 Switch", "DAC2L" },
2736
2737 { "SPKR", "DAC1 Switch", "DAC1R" },
2738 { "SPKR", "DAC2 Switch", "DAC2R" },
2739
2740 { "Left Headphone Mux", "DAC", "DAC1L" },
2741 { "Right Headphone Mux", "DAC", "DAC1R" },
2742};
2743
2744/* The size in bits of the FLL divide multiplied by 10
2745 * to allow rounding later */
2746#define FIXED_FLL_SIZE ((1 << 16) * 10)
2747
2748struct fll_div {
2749 u16 outdiv;
2750 u16 n;
2751 u16 k;
2752 u16 clk_ref_div;
2753 u16 fll_fratio;
2754};
2755
2756static int wm8994_get_fll_config(struct fll_div *fll,
2757 int freq_in, int freq_out)
2758{
2759 u64 Kpart;
2760 unsigned int K, Ndiv, Nmod;
2761
2762 pr_debug("FLL input=%dHz, output=%dHz\n", freq_in, freq_out);
2763
2764 /* Scale the input frequency down to <= 13.5MHz */
2765 fll->clk_ref_div = 0;
2766 while (freq_in > 13500000) {
2767 fll->clk_ref_div++;
2768 freq_in /= 2;
2769
2770 if (fll->clk_ref_div > 3)
2771 return -EINVAL;
2772 }
2773 pr_debug("CLK_REF_DIV=%d, Fref=%dHz\n", fll->clk_ref_div, freq_in);
2774
2775 /* Scale the output to give 90MHz<=Fvco<=100MHz */
2776 fll->outdiv = 3;
2777 while (freq_out * (fll->outdiv + 1) < 90000000) {
2778 fll->outdiv++;
2779 if (fll->outdiv > 63)
2780 return -EINVAL;
2781 }
2782 freq_out *= fll->outdiv + 1;
2783 pr_debug("OUTDIV=%d, Fvco=%dHz\n", fll->outdiv, freq_out);
2784
2785 if (freq_in > 1000000) {
2786 fll->fll_fratio = 0;
2787 } else {
2788 fll->fll_fratio = 3;
2789 freq_in *= 8;
2790 }
2791 pr_debug("FLL_FRATIO=%d, Fref=%dHz\n", fll->fll_fratio, freq_in);
2792
2793 /* Now, calculate N.K */
2794 Ndiv = freq_out / freq_in;
2795
2796 fll->n = Ndiv;
2797 Nmod = freq_out % freq_in;
2798 pr_debug("Nmod=%d\n", Nmod);
2799
2800 /* Calculate fractional part - scale up so we can round. */
2801 Kpart = FIXED_FLL_SIZE * (long long)Nmod;
2802
2803 do_div(Kpart, freq_in);
2804
2805 K = Kpart & 0xFFFFFFFF;
2806
2807 if ((K % 10) >= 5)
2808 K += 5;
2809
2810 /* Move down to proper range now rounding is done */
2811 fll->k = K / 10;
2812
2813 pr_debug("N=%x K=%x\n", fll->n, fll->k);
2814
2815 return 0;
2816}
2817
2818static int wm8994_set_fll(struct snd_soc_dai *dai, int id, int src,
2819 unsigned int freq_in, unsigned int freq_out)
2820{
2821 struct snd_soc_codec *codec = dai->codec;
Mark Brownb2c812e2010-04-14 15:35:19 +09002822 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
Mark Brown9e6e96a2010-01-29 17:47:12 +00002823 int reg_offset, ret;
2824 struct fll_div fll;
2825 u16 reg, aif1, aif2;
2826
2827 aif1 = snd_soc_read(codec, WM8994_AIF1_CLOCKING_1)
2828 & WM8994_AIF1CLK_ENA;
2829
2830 aif2 = snd_soc_read(codec, WM8994_AIF2_CLOCKING_1)
2831 & WM8994_AIF2CLK_ENA;
2832
2833 switch (id) {
2834 case WM8994_FLL1:
2835 reg_offset = 0;
2836 id = 0;
2837 break;
2838 case WM8994_FLL2:
2839 reg_offset = 0x20;
2840 id = 1;
2841 break;
2842 default:
2843 return -EINVAL;
2844 }
2845
2846 /* Are we changing anything? */
2847 if (wm8994->fll[id].src == src &&
2848 wm8994->fll[id].in == freq_in && wm8994->fll[id].out == freq_out)
2849 return 0;
2850
2851 /* If we're stopping the FLL redo the old config - no
2852 * registers will actually be written but we avoid GCC flow
2853 * analysis bugs spewing warnings.
2854 */
2855 if (freq_out)
2856 ret = wm8994_get_fll_config(&fll, freq_in, freq_out);
2857 else
2858 ret = wm8994_get_fll_config(&fll, wm8994->fll[id].in,
2859 wm8994->fll[id].out);
2860 if (ret < 0)
2861 return ret;
2862
2863 /* Gate the AIF clocks while we reclock */
2864 snd_soc_update_bits(codec, WM8994_AIF1_CLOCKING_1,
2865 WM8994_AIF1CLK_ENA, 0);
2866 snd_soc_update_bits(codec, WM8994_AIF2_CLOCKING_1,
2867 WM8994_AIF2CLK_ENA, 0);
2868
2869 /* We always need to disable the FLL while reconfiguring */
2870 snd_soc_update_bits(codec, WM8994_FLL1_CONTROL_1 + reg_offset,
2871 WM8994_FLL1_ENA, 0);
2872
2873 reg = (fll.outdiv << WM8994_FLL1_OUTDIV_SHIFT) |
2874 (fll.fll_fratio << WM8994_FLL1_FRATIO_SHIFT);
2875 snd_soc_update_bits(codec, WM8994_FLL1_CONTROL_2 + reg_offset,
2876 WM8994_FLL1_OUTDIV_MASK |
2877 WM8994_FLL1_FRATIO_MASK, reg);
2878
2879 snd_soc_write(codec, WM8994_FLL1_CONTROL_3 + reg_offset, fll.k);
2880
2881 snd_soc_update_bits(codec, WM8994_FLL1_CONTROL_4 + reg_offset,
2882 WM8994_FLL1_N_MASK,
2883 fll.n << WM8994_FLL1_N_SHIFT);
2884
2885 snd_soc_update_bits(codec, WM8994_FLL1_CONTROL_5 + reg_offset,
2886 WM8994_FLL1_REFCLK_DIV_MASK,
2887 fll.clk_ref_div << WM8994_FLL1_REFCLK_DIV_SHIFT);
2888
2889 /* Enable (with fractional mode if required) */
2890 if (freq_out) {
2891 if (fll.k)
2892 reg = WM8994_FLL1_ENA | WM8994_FLL1_FRAC;
2893 else
2894 reg = WM8994_FLL1_ENA;
2895 snd_soc_update_bits(codec, WM8994_FLL1_CONTROL_1 + reg_offset,
2896 WM8994_FLL1_ENA | WM8994_FLL1_FRAC,
2897 reg);
2898 }
2899
2900 wm8994->fll[id].in = freq_in;
2901 wm8994->fll[id].out = freq_out;
2902
2903 /* Enable any gated AIF clocks */
2904 snd_soc_update_bits(codec, WM8994_AIF1_CLOCKING_1,
2905 WM8994_AIF1CLK_ENA, aif1);
2906 snd_soc_update_bits(codec, WM8994_AIF2_CLOCKING_1,
2907 WM8994_AIF2CLK_ENA, aif2);
2908
2909 configure_clock(codec);
2910
2911 return 0;
2912}
2913
2914static int wm8994_set_dai_sysclk(struct snd_soc_dai *dai,
2915 int clk_id, unsigned int freq, int dir)
2916{
2917 struct snd_soc_codec *codec = dai->codec;
Mark Brownb2c812e2010-04-14 15:35:19 +09002918 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
Mark Brown9e6e96a2010-01-29 17:47:12 +00002919
2920 switch (dai->id) {
2921 case 1:
2922 case 2:
2923 break;
2924
2925 default:
2926 /* AIF3 shares clocking with AIF1/2 */
2927 return -EINVAL;
2928 }
2929
2930 switch (clk_id) {
2931 case WM8994_SYSCLK_MCLK1:
2932 wm8994->sysclk[dai->id - 1] = WM8994_SYSCLK_MCLK1;
2933 wm8994->mclk[0] = freq;
2934 dev_dbg(dai->dev, "AIF%d using MCLK1 at %uHz\n",
2935 dai->id, freq);
2936 break;
2937
2938 case WM8994_SYSCLK_MCLK2:
2939 /* TODO: Set GPIO AF */
2940 wm8994->sysclk[dai->id - 1] = WM8994_SYSCLK_MCLK2;
2941 wm8994->mclk[1] = freq;
2942 dev_dbg(dai->dev, "AIF%d using MCLK2 at %uHz\n",
2943 dai->id, freq);
2944 break;
2945
2946 case WM8994_SYSCLK_FLL1:
2947 wm8994->sysclk[dai->id - 1] = WM8994_SYSCLK_FLL1;
2948 dev_dbg(dai->dev, "AIF%d using FLL1\n", dai->id);
2949 break;
2950
2951 case WM8994_SYSCLK_FLL2:
2952 wm8994->sysclk[dai->id - 1] = WM8994_SYSCLK_FLL2;
2953 dev_dbg(dai->dev, "AIF%d using FLL2\n", dai->id);
2954 break;
2955
2956 default:
2957 return -EINVAL;
2958 }
2959
2960 configure_clock(codec);
2961
2962 return 0;
2963}
2964
2965static int wm8994_set_bias_level(struct snd_soc_codec *codec,
2966 enum snd_soc_bias_level level)
2967{
2968 switch (level) {
2969 case SND_SOC_BIAS_ON:
2970 break;
2971
2972 case SND_SOC_BIAS_PREPARE:
2973 /* VMID=2x40k */
2974 snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_1,
2975 WM8994_VMID_SEL_MASK, 0x2);
2976 break;
2977
2978 case SND_SOC_BIAS_STANDBY:
2979 if (codec->bias_level == SND_SOC_BIAS_OFF) {
2980 /* Tweak DC servo configuration for improved
2981 * performance. */
2982 snd_soc_write(codec, 0x102, 0x3);
2983 snd_soc_write(codec, 0x56, 0x3);
2984 snd_soc_write(codec, 0x102, 0);
2985
2986 /* Discharge LINEOUT1 & 2 */
2987 snd_soc_update_bits(codec, WM8994_ANTIPOP_1,
2988 WM8994_LINEOUT1_DISCH |
2989 WM8994_LINEOUT2_DISCH,
2990 WM8994_LINEOUT1_DISCH |
2991 WM8994_LINEOUT2_DISCH);
2992
2993 /* Startup bias, VMID ramp & buffer */
2994 snd_soc_update_bits(codec, WM8994_ANTIPOP_2,
2995 WM8994_STARTUP_BIAS_ENA |
2996 WM8994_VMID_BUF_ENA |
2997 WM8994_VMID_RAMP_MASK,
2998 WM8994_STARTUP_BIAS_ENA |
2999 WM8994_VMID_BUF_ENA |
3000 (0x11 << WM8994_VMID_RAMP_SHIFT));
3001
3002 /* Main bias enable, VMID=2x40k */
3003 snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_1,
3004 WM8994_BIAS_ENA |
3005 WM8994_VMID_SEL_MASK,
3006 WM8994_BIAS_ENA | 0x2);
3007
3008 msleep(20);
3009 }
3010
3011 /* VMID=2x500k */
3012 snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_1,
3013 WM8994_VMID_SEL_MASK, 0x4);
3014
3015 break;
3016
3017 case SND_SOC_BIAS_OFF:
Mark Brownd522ffb2010-03-30 14:29:14 +01003018 if (codec->bias_level == SND_SOC_BIAS_STANDBY) {
3019 /* Switch over to startup biases */
3020 snd_soc_update_bits(codec, WM8994_ANTIPOP_2,
3021 WM8994_BIAS_SRC |
3022 WM8994_STARTUP_BIAS_ENA |
3023 WM8994_VMID_BUF_ENA |
3024 WM8994_VMID_RAMP_MASK,
3025 WM8994_BIAS_SRC |
3026 WM8994_STARTUP_BIAS_ENA |
3027 WM8994_VMID_BUF_ENA |
3028 (1 << WM8994_VMID_RAMP_SHIFT));
Mark Brown9e6e96a2010-01-29 17:47:12 +00003029
Mark Brownd522ffb2010-03-30 14:29:14 +01003030 /* Disable main biases */
3031 snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_1,
3032 WM8994_BIAS_ENA |
3033 WM8994_VMID_SEL_MASK, 0);
Mark Brown9e6e96a2010-01-29 17:47:12 +00003034
Mark Brownd522ffb2010-03-30 14:29:14 +01003035 /* Discharge line */
3036 snd_soc_update_bits(codec, WM8994_ANTIPOP_1,
3037 WM8994_LINEOUT1_DISCH |
3038 WM8994_LINEOUT2_DISCH,
3039 WM8994_LINEOUT1_DISCH |
3040 WM8994_LINEOUT2_DISCH);
Mark Brown9e6e96a2010-01-29 17:47:12 +00003041
Mark Brownd522ffb2010-03-30 14:29:14 +01003042 msleep(5);
Mark Brown9e6e96a2010-01-29 17:47:12 +00003043
Mark Brownd522ffb2010-03-30 14:29:14 +01003044 /* Switch off startup biases */
3045 snd_soc_update_bits(codec, WM8994_ANTIPOP_2,
3046 WM8994_BIAS_SRC |
3047 WM8994_STARTUP_BIAS_ENA |
3048 WM8994_VMID_BUF_ENA |
3049 WM8994_VMID_RAMP_MASK, 0);
3050 }
Mark Brown9e6e96a2010-01-29 17:47:12 +00003051 break;
3052 }
3053 codec->bias_level = level;
3054 return 0;
3055}
3056
3057static int wm8994_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
3058{
3059 struct snd_soc_codec *codec = dai->codec;
3060 int ms_reg;
3061 int aif1_reg;
3062 int ms = 0;
3063 int aif1 = 0;
3064
3065 switch (dai->id) {
3066 case 1:
3067 ms_reg = WM8994_AIF1_MASTER_SLAVE;
3068 aif1_reg = WM8994_AIF1_CONTROL_1;
3069 break;
3070 case 2:
3071 ms_reg = WM8994_AIF2_MASTER_SLAVE;
3072 aif1_reg = WM8994_AIF2_CONTROL_1;
3073 break;
3074 default:
3075 return -EINVAL;
3076 }
3077
3078 switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
3079 case SND_SOC_DAIFMT_CBS_CFS:
3080 break;
3081 case SND_SOC_DAIFMT_CBM_CFM:
3082 ms = WM8994_AIF1_MSTR;
3083 break;
3084 default:
3085 return -EINVAL;
3086 }
3087
3088 switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
3089 case SND_SOC_DAIFMT_DSP_B:
3090 aif1 |= WM8994_AIF1_LRCLK_INV;
3091 case SND_SOC_DAIFMT_DSP_A:
3092 aif1 |= 0x18;
3093 break;
3094 case SND_SOC_DAIFMT_I2S:
3095 aif1 |= 0x10;
3096 break;
3097 case SND_SOC_DAIFMT_RIGHT_J:
3098 break;
3099 case SND_SOC_DAIFMT_LEFT_J:
3100 aif1 |= 0x8;
3101 break;
3102 default:
3103 return -EINVAL;
3104 }
3105
3106 switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
3107 case SND_SOC_DAIFMT_DSP_A:
3108 case SND_SOC_DAIFMT_DSP_B:
3109 /* frame inversion not valid for DSP modes */
3110 switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
3111 case SND_SOC_DAIFMT_NB_NF:
3112 break;
3113 case SND_SOC_DAIFMT_IB_NF:
3114 aif1 |= WM8994_AIF1_BCLK_INV;
3115 break;
3116 default:
3117 return -EINVAL;
3118 }
3119 break;
3120
3121 case SND_SOC_DAIFMT_I2S:
3122 case SND_SOC_DAIFMT_RIGHT_J:
3123 case SND_SOC_DAIFMT_LEFT_J:
3124 switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
3125 case SND_SOC_DAIFMT_NB_NF:
3126 break;
3127 case SND_SOC_DAIFMT_IB_IF:
3128 aif1 |= WM8994_AIF1_BCLK_INV | WM8994_AIF1_LRCLK_INV;
3129 break;
3130 case SND_SOC_DAIFMT_IB_NF:
3131 aif1 |= WM8994_AIF1_BCLK_INV;
3132 break;
3133 case SND_SOC_DAIFMT_NB_IF:
3134 aif1 |= WM8994_AIF1_LRCLK_INV;
3135 break;
3136 default:
3137 return -EINVAL;
3138 }
3139 break;
3140 default:
3141 return -EINVAL;
3142 }
3143
3144 snd_soc_update_bits(codec, aif1_reg,
3145 WM8994_AIF1_BCLK_INV | WM8994_AIF1_LRCLK_INV |
3146 WM8994_AIF1_FMT_MASK,
3147 aif1);
3148 snd_soc_update_bits(codec, ms_reg, WM8994_AIF1_MSTR,
3149 ms);
3150
3151 return 0;
3152}
3153
3154static struct {
3155 int val, rate;
3156} srs[] = {
3157 { 0, 8000 },
3158 { 1, 11025 },
3159 { 2, 12000 },
3160 { 3, 16000 },
3161 { 4, 22050 },
3162 { 5, 24000 },
3163 { 6, 32000 },
3164 { 7, 44100 },
3165 { 8, 48000 },
3166 { 9, 88200 },
3167 { 10, 96000 },
3168};
3169
3170static int fs_ratios[] = {
3171 64, 128, 192, 256, 348, 512, 768, 1024, 1408, 1536
3172};
3173
3174static int bclk_divs[] = {
3175 10, 15, 20, 30, 40, 50, 60, 80, 110, 120, 160, 220, 240, 320, 440, 480,
3176 640, 880, 960, 1280, 1760, 1920
3177};
3178
3179static int wm8994_hw_params(struct snd_pcm_substream *substream,
3180 struct snd_pcm_hw_params *params,
3181 struct snd_soc_dai *dai)
3182{
3183 struct snd_soc_codec *codec = dai->codec;
Mark Brownb2c812e2010-04-14 15:35:19 +09003184 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
Mark Brown9e6e96a2010-01-29 17:47:12 +00003185 int aif1_reg;
3186 int bclk_reg;
3187 int lrclk_reg;
3188 int rate_reg;
3189 int aif1 = 0;
3190 int bclk = 0;
3191 int lrclk = 0;
3192 int rate_val = 0;
3193 int id = dai->id - 1;
3194
3195 int i, cur_val, best_val, bclk_rate, best;
3196
3197 switch (dai->id) {
3198 case 1:
3199 aif1_reg = WM8994_AIF1_CONTROL_1;
3200 bclk_reg = WM8994_AIF1_BCLK;
3201 rate_reg = WM8994_AIF1_RATE;
3202 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK ||
3203 wm8994->lrclk_shared[0])
3204 lrclk_reg = WM8994_AIF1DAC_LRCLK;
3205 else
3206 lrclk_reg = WM8994_AIF1ADC_LRCLK;
3207 break;
3208 case 2:
3209 aif1_reg = WM8994_AIF2_CONTROL_1;
3210 bclk_reg = WM8994_AIF2_BCLK;
3211 rate_reg = WM8994_AIF2_RATE;
3212 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK ||
3213 wm8994->lrclk_shared[1])
3214 lrclk_reg = WM8994_AIF2DAC_LRCLK;
3215 else
3216 lrclk_reg = WM8994_AIF2ADC_LRCLK;
3217 break;
3218 default:
3219 return -EINVAL;
3220 }
3221
3222 bclk_rate = params_rate(params) * 2;
3223 switch (params_format(params)) {
3224 case SNDRV_PCM_FORMAT_S16_LE:
3225 bclk_rate *= 16;
3226 break;
3227 case SNDRV_PCM_FORMAT_S20_3LE:
3228 bclk_rate *= 20;
3229 aif1 |= 0x20;
3230 break;
3231 case SNDRV_PCM_FORMAT_S24_LE:
3232 bclk_rate *= 24;
3233 aif1 |= 0x40;
3234 break;
3235 case SNDRV_PCM_FORMAT_S32_LE:
3236 bclk_rate *= 32;
3237 aif1 |= 0x60;
3238 break;
3239 default:
3240 return -EINVAL;
3241 }
3242
3243 /* Try to find an appropriate sample rate; look for an exact match. */
3244 for (i = 0; i < ARRAY_SIZE(srs); i++)
3245 if (srs[i].rate == params_rate(params))
3246 break;
3247 if (i == ARRAY_SIZE(srs))
3248 return -EINVAL;
3249 rate_val |= srs[i].val << WM8994_AIF1_SR_SHIFT;
3250
3251 dev_dbg(dai->dev, "Sample rate is %dHz\n", srs[i].rate);
3252 dev_dbg(dai->dev, "AIF%dCLK is %dHz, target BCLK %dHz\n",
3253 dai->id, wm8994->aifclk[id], bclk_rate);
3254
3255 if (wm8994->aifclk[id] == 0) {
3256 dev_err(dai->dev, "AIF%dCLK not configured\n", dai->id);
3257 return -EINVAL;
3258 }
3259
3260 /* AIFCLK/fs ratio; look for a close match in either direction */
3261 best = 0;
3262 best_val = abs((fs_ratios[0] * params_rate(params))
3263 - wm8994->aifclk[id]);
3264 for (i = 1; i < ARRAY_SIZE(fs_ratios); i++) {
3265 cur_val = abs((fs_ratios[i] * params_rate(params))
3266 - wm8994->aifclk[id]);
3267 if (cur_val >= best_val)
3268 continue;
3269 best = i;
3270 best_val = cur_val;
3271 }
3272 dev_dbg(dai->dev, "Selected AIF%dCLK/fs = %d\n",
3273 dai->id, fs_ratios[best]);
3274 rate_val |= best;
3275
3276 /* We may not get quite the right frequency if using
3277 * approximate clocks so look for the closest match that is
3278 * higher than the target (we need to ensure that there enough
3279 * BCLKs to clock out the samples).
3280 */
3281 best = 0;
3282 for (i = 0; i < ARRAY_SIZE(bclk_divs); i++) {
Joonyoung Shim07cd8ad2010-02-02 18:53:19 +09003283 cur_val = (wm8994->aifclk[id] * 10 / bclk_divs[i]) - bclk_rate;
Mark Brown9e6e96a2010-01-29 17:47:12 +00003284 if (cur_val < 0) /* BCLK table is sorted */
3285 break;
3286 best = i;
3287 }
Joonyoung Shim07cd8ad2010-02-02 18:53:19 +09003288 bclk_rate = wm8994->aifclk[id] * 10 / bclk_divs[best];
Mark Brown9e6e96a2010-01-29 17:47:12 +00003289 dev_dbg(dai->dev, "Using BCLK_DIV %d for actual BCLK %dHz\n",
3290 bclk_divs[best], bclk_rate);
3291 bclk |= best << WM8994_AIF1_BCLK_DIV_SHIFT;
3292
3293 lrclk = bclk_rate / params_rate(params);
3294 dev_dbg(dai->dev, "Using LRCLK rate %d for actual LRCLK %dHz\n",
3295 lrclk, bclk_rate / lrclk);
3296
3297 snd_soc_update_bits(codec, aif1_reg, WM8994_AIF1_WL_MASK, aif1);
3298 snd_soc_update_bits(codec, bclk_reg, WM8994_AIF1_BCLK_DIV_MASK, bclk);
3299 snd_soc_update_bits(codec, lrclk_reg, WM8994_AIF1DAC_RATE_MASK,
3300 lrclk);
3301 snd_soc_update_bits(codec, rate_reg, WM8994_AIF1_SR_MASK |
3302 WM8994_AIF1CLK_RATE_MASK, rate_val);
3303
3304 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
3305 switch (dai->id) {
3306 case 1:
3307 wm8994->dac_rates[0] = params_rate(params);
3308 wm8994_set_retune_mobile(codec, 0);
3309 wm8994_set_retune_mobile(codec, 1);
3310 break;
3311 case 2:
3312 wm8994->dac_rates[1] = params_rate(params);
3313 wm8994_set_retune_mobile(codec, 2);
3314 break;
3315 }
3316 }
3317
3318 return 0;
3319}
3320
3321static int wm8994_aif_mute(struct snd_soc_dai *codec_dai, int mute)
3322{
3323 struct snd_soc_codec *codec = codec_dai->codec;
3324 int mute_reg;
3325 int reg;
3326
3327 switch (codec_dai->id) {
3328 case 1:
3329 mute_reg = WM8994_AIF1_DAC1_FILTERS_1;
3330 break;
3331 case 2:
3332 mute_reg = WM8994_AIF2_DAC_FILTERS_1;
3333 break;
3334 default:
3335 return -EINVAL;
3336 }
3337
3338 if (mute)
3339 reg = WM8994_AIF1DAC1_MUTE;
3340 else
3341 reg = 0;
3342
3343 snd_soc_update_bits(codec, mute_reg, WM8994_AIF1DAC1_MUTE, reg);
3344
3345 return 0;
3346}
3347
Mark Brown778a76e2010-03-22 22:05:10 +00003348static int wm8994_set_tristate(struct snd_soc_dai *codec_dai, int tristate)
3349{
3350 struct snd_soc_codec *codec = codec_dai->codec;
3351 int reg, val, mask;
3352
3353 switch (codec_dai->id) {
3354 case 1:
3355 reg = WM8994_AIF1_MASTER_SLAVE;
3356 mask = WM8994_AIF1_TRI;
3357 break;
3358 case 2:
3359 reg = WM8994_AIF2_MASTER_SLAVE;
3360 mask = WM8994_AIF2_TRI;
3361 break;
3362 case 3:
3363 reg = WM8994_POWER_MANAGEMENT_6;
3364 mask = WM8994_AIF3_TRI;
3365 break;
3366 default:
3367 return -EINVAL;
3368 }
3369
3370 if (tristate)
3371 val = mask;
3372 else
3373 val = 0;
3374
3375 return snd_soc_update_bits(codec, reg, mask, reg);
3376}
3377
Mark Brown9e6e96a2010-01-29 17:47:12 +00003378#define WM8994_RATES SNDRV_PCM_RATE_8000_96000
3379
3380#define WM8994_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\
3381 SNDRV_PCM_FMTBIT_S24_LE)
3382
3383static struct snd_soc_dai_ops wm8994_aif1_dai_ops = {
3384 .set_sysclk = wm8994_set_dai_sysclk,
3385 .set_fmt = wm8994_set_dai_fmt,
3386 .hw_params = wm8994_hw_params,
3387 .digital_mute = wm8994_aif_mute,
3388 .set_pll = wm8994_set_fll,
Mark Brown778a76e2010-03-22 22:05:10 +00003389 .set_tristate = wm8994_set_tristate,
Mark Brown9e6e96a2010-01-29 17:47:12 +00003390};
3391
3392static struct snd_soc_dai_ops wm8994_aif2_dai_ops = {
3393 .set_sysclk = wm8994_set_dai_sysclk,
3394 .set_fmt = wm8994_set_dai_fmt,
3395 .hw_params = wm8994_hw_params,
3396 .digital_mute = wm8994_aif_mute,
3397 .set_pll = wm8994_set_fll,
Mark Brown778a76e2010-03-22 22:05:10 +00003398 .set_tristate = wm8994_set_tristate,
3399};
3400
3401static struct snd_soc_dai_ops wm8994_aif3_dai_ops = {
3402 .set_tristate = wm8994_set_tristate,
Mark Brown9e6e96a2010-01-29 17:47:12 +00003403};
3404
3405struct snd_soc_dai wm8994_dai[] = {
3406 {
3407 .name = "WM8994 AIF1",
3408 .id = 1,
3409 .playback = {
3410 .stream_name = "AIF1 Playback",
3411 .channels_min = 2,
3412 .channels_max = 2,
3413 .rates = WM8994_RATES,
3414 .formats = WM8994_FORMATS,
3415 },
3416 .capture = {
3417 .stream_name = "AIF1 Capture",
3418 .channels_min = 2,
3419 .channels_max = 2,
3420 .rates = WM8994_RATES,
3421 .formats = WM8994_FORMATS,
3422 },
3423 .ops = &wm8994_aif1_dai_ops,
3424 },
3425 {
3426 .name = "WM8994 AIF2",
3427 .id = 2,
3428 .playback = {
3429 .stream_name = "AIF2 Playback",
3430 .channels_min = 2,
3431 .channels_max = 2,
3432 .rates = WM8994_RATES,
3433 .formats = WM8994_FORMATS,
3434 },
3435 .capture = {
3436 .stream_name = "AIF2 Capture",
3437 .channels_min = 2,
3438 .channels_max = 2,
3439 .rates = WM8994_RATES,
3440 .formats = WM8994_FORMATS,
3441 },
3442 .ops = &wm8994_aif2_dai_ops,
3443 },
3444 {
3445 .name = "WM8994 AIF3",
Mark Brown778a76e2010-03-22 22:05:10 +00003446 .id = 3,
Mark Brown9e6e96a2010-01-29 17:47:12 +00003447 .playback = {
3448 .stream_name = "AIF3 Playback",
3449 .channels_min = 2,
3450 .channels_max = 2,
3451 .rates = WM8994_RATES,
3452 .formats = WM8994_FORMATS,
3453 },
Dan Carpentera8462bd2010-03-24 14:58:34 +03003454 .capture = {
Mark Brown9e6e96a2010-01-29 17:47:12 +00003455 .stream_name = "AIF3 Capture",
3456 .channels_min = 2,
3457 .channels_max = 2,
3458 .rates = WM8994_RATES,
3459 .formats = WM8994_FORMATS,
3460 },
Mark Brown778a76e2010-03-22 22:05:10 +00003461 .ops = &wm8994_aif3_dai_ops,
Mark Brown9e6e96a2010-01-29 17:47:12 +00003462 }
3463};
3464EXPORT_SYMBOL_GPL(wm8994_dai);
3465
3466#ifdef CONFIG_PM
3467static int wm8994_suspend(struct platform_device *pdev, pm_message_t state)
3468{
3469 struct snd_soc_device *socdev = platform_get_drvdata(pdev);
3470 struct snd_soc_codec *codec = socdev->card->codec;
Mark Brownb2c812e2010-04-14 15:35:19 +09003471 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
Mark Brown9e6e96a2010-01-29 17:47:12 +00003472 int i, ret;
3473
3474 for (i = 0; i < ARRAY_SIZE(wm8994->fll); i++) {
3475 memcpy(&wm8994->fll_suspend[i], &wm8994->fll[i],
3476 sizeof(struct fll_config));
3477 ret = wm8994_set_fll(&codec->dai[0], i + 1, 0, 0, 0);
3478 if (ret < 0)
3479 dev_warn(codec->dev, "Failed to stop FLL%d: %d\n",
3480 i + 1, ret);
3481 }
3482
3483 wm8994_set_bias_level(codec, SND_SOC_BIAS_OFF);
3484
3485 return 0;
3486}
3487
3488static int wm8994_resume(struct platform_device *pdev)
3489{
3490 struct snd_soc_device *socdev = platform_get_drvdata(pdev);
3491 struct snd_soc_codec *codec = socdev->card->codec;
Mark Brownb2c812e2010-04-14 15:35:19 +09003492 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
Mark Brown9e6e96a2010-01-29 17:47:12 +00003493 u16 *reg_cache = codec->reg_cache;
3494 int i, ret;
3495
3496 /* Restore the registers */
3497 for (i = 1; i < ARRAY_SIZE(wm8994->reg_cache); i++) {
3498 switch (i) {
3499 case WM8994_LDO_1:
3500 case WM8994_LDO_2:
3501 case WM8994_SOFTWARE_RESET:
3502 /* Handled by other MFD drivers */
3503 continue;
3504 default:
3505 break;
3506 }
3507
3508 if (!access_masks[i].writable)
3509 continue;
3510
3511 wm8994_reg_write(codec->control_data, i, reg_cache[i]);
3512 }
3513
3514 wm8994_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
3515
3516 for (i = 0; i < ARRAY_SIZE(wm8994->fll); i++) {
3517 ret = wm8994_set_fll(&codec->dai[0], i + 1,
3518 wm8994->fll_suspend[i].src,
3519 wm8994->fll_suspend[i].in,
3520 wm8994->fll_suspend[i].out);
3521 if (ret < 0)
3522 dev_warn(codec->dev, "Failed to restore FLL%d: %d\n",
3523 i + 1, ret);
3524 }
3525
3526 return 0;
3527}
3528#else
3529#define wm8994_suspend NULL
3530#define wm8994_resume NULL
3531#endif
3532
3533static void wm8994_handle_retune_mobile_pdata(struct wm8994_priv *wm8994)
3534{
3535 struct snd_soc_codec *codec = &wm8994->codec;
3536 struct wm8994_pdata *pdata = wm8994->pdata;
3537 struct snd_kcontrol_new controls[] = {
3538 SOC_ENUM_EXT("AIF1.1 EQ Mode",
3539 wm8994->retune_mobile_enum,
3540 wm8994_get_retune_mobile_enum,
3541 wm8994_put_retune_mobile_enum),
3542 SOC_ENUM_EXT("AIF1.2 EQ Mode",
3543 wm8994->retune_mobile_enum,
3544 wm8994_get_retune_mobile_enum,
3545 wm8994_put_retune_mobile_enum),
3546 SOC_ENUM_EXT("AIF2 EQ Mode",
3547 wm8994->retune_mobile_enum,
3548 wm8994_get_retune_mobile_enum,
3549 wm8994_put_retune_mobile_enum),
3550 };
3551 int ret, i, j;
3552 const char **t;
3553
3554 /* We need an array of texts for the enum API but the number
3555 * of texts is likely to be less than the number of
3556 * configurations due to the sample rate dependency of the
3557 * configurations. */
3558 wm8994->num_retune_mobile_texts = 0;
3559 wm8994->retune_mobile_texts = NULL;
3560 for (i = 0; i < pdata->num_retune_mobile_cfgs; i++) {
3561 for (j = 0; j < wm8994->num_retune_mobile_texts; j++) {
3562 if (strcmp(pdata->retune_mobile_cfgs[i].name,
3563 wm8994->retune_mobile_texts[j]) == 0)
3564 break;
3565 }
3566
3567 if (j != wm8994->num_retune_mobile_texts)
3568 continue;
3569
3570 /* Expand the array... */
3571 t = krealloc(wm8994->retune_mobile_texts,
3572 sizeof(char *) *
3573 (wm8994->num_retune_mobile_texts + 1),
3574 GFP_KERNEL);
3575 if (t == NULL)
3576 continue;
3577
3578 /* ...store the new entry... */
3579 t[wm8994->num_retune_mobile_texts] =
3580 pdata->retune_mobile_cfgs[i].name;
3581
3582 /* ...and remember the new version. */
3583 wm8994->num_retune_mobile_texts++;
3584 wm8994->retune_mobile_texts = t;
3585 }
3586
3587 dev_dbg(codec->dev, "Allocated %d unique ReTune Mobile names\n",
3588 wm8994->num_retune_mobile_texts);
3589
3590 wm8994->retune_mobile_enum.max = wm8994->num_retune_mobile_texts;
3591 wm8994->retune_mobile_enum.texts = wm8994->retune_mobile_texts;
3592
3593 ret = snd_soc_add_controls(&wm8994->codec, controls,
3594 ARRAY_SIZE(controls));
3595 if (ret != 0)
3596 dev_err(wm8994->codec.dev,
3597 "Failed to add ReTune Mobile controls: %d\n", ret);
3598}
3599
3600static void wm8994_handle_pdata(struct wm8994_priv *wm8994)
3601{
3602 struct snd_soc_codec *codec = &wm8994->codec;
3603 struct wm8994_pdata *pdata = wm8994->pdata;
3604 int ret, i;
3605
3606 if (!pdata)
3607 return;
3608
3609 wm_hubs_handle_analogue_pdata(codec, pdata->lineout1_diff,
3610 pdata->lineout2_diff,
3611 pdata->lineout1fb,
3612 pdata->lineout2fb,
3613 pdata->jd_scthr,
3614 pdata->jd_thr,
3615 pdata->micbias1_lvl,
3616 pdata->micbias2_lvl);
3617
3618 dev_dbg(codec->dev, "%d DRC configurations\n", pdata->num_drc_cfgs);
3619
3620 if (pdata->num_drc_cfgs) {
3621 struct snd_kcontrol_new controls[] = {
3622 SOC_ENUM_EXT("AIF1DRC1 Mode", wm8994->drc_enum,
3623 wm8994_get_drc_enum, wm8994_put_drc_enum),
3624 SOC_ENUM_EXT("AIF1DRC2 Mode", wm8994->drc_enum,
3625 wm8994_get_drc_enum, wm8994_put_drc_enum),
3626 SOC_ENUM_EXT("AIF2DRC Mode", wm8994->drc_enum,
3627 wm8994_get_drc_enum, wm8994_put_drc_enum),
3628 };
3629
3630 /* We need an array of texts for the enum API */
3631 wm8994->drc_texts = kmalloc(sizeof(char *)
3632 * pdata->num_drc_cfgs, GFP_KERNEL);
3633 if (!wm8994->drc_texts) {
3634 dev_err(wm8994->codec.dev,
3635 "Failed to allocate %d DRC config texts\n",
3636 pdata->num_drc_cfgs);
3637 return;
3638 }
3639
3640 for (i = 0; i < pdata->num_drc_cfgs; i++)
3641 wm8994->drc_texts[i] = pdata->drc_cfgs[i].name;
3642
3643 wm8994->drc_enum.max = pdata->num_drc_cfgs;
3644 wm8994->drc_enum.texts = wm8994->drc_texts;
3645
3646 ret = snd_soc_add_controls(&wm8994->codec, controls,
3647 ARRAY_SIZE(controls));
3648 if (ret != 0)
3649 dev_err(wm8994->codec.dev,
3650 "Failed to add DRC mode controls: %d\n", ret);
3651
3652 for (i = 0; i < WM8994_NUM_DRC; i++)
3653 wm8994_set_drc(codec, i);
3654 }
3655
3656 dev_dbg(codec->dev, "%d ReTune Mobile configurations\n",
3657 pdata->num_retune_mobile_cfgs);
3658
3659 if (pdata->num_retune_mobile_cfgs)
3660 wm8994_handle_retune_mobile_pdata(wm8994);
3661 else
3662 snd_soc_add_controls(&wm8994->codec, wm8994_eq_controls,
3663 ARRAY_SIZE(wm8994_eq_controls));
3664}
3665
3666static int wm8994_probe(struct platform_device *pdev)
3667{
3668 struct snd_soc_device *socdev = platform_get_drvdata(pdev);
3669 struct snd_soc_codec *codec;
3670 int ret = 0;
3671
3672 if (wm8994_codec == NULL) {
3673 dev_err(&pdev->dev, "Codec device not registered\n");
3674 return -ENODEV;
3675 }
3676
3677 socdev->card->codec = wm8994_codec;
3678 codec = wm8994_codec;
3679
3680 /* register pcms */
3681 ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1);
3682 if (ret < 0) {
3683 dev_err(codec->dev, "failed to create pcms: %d\n", ret);
3684 return ret;
3685 }
3686
Mark Brownb2c812e2010-04-14 15:35:19 +09003687 wm8994_handle_pdata(snd_soc_codec_get_drvdata(codec));
Mark Brown9e6e96a2010-01-29 17:47:12 +00003688
3689 wm_hubs_add_analogue_controls(codec);
3690 snd_soc_add_controls(codec, wm8994_snd_controls,
3691 ARRAY_SIZE(wm8994_snd_controls));
3692 snd_soc_dapm_new_controls(codec, wm8994_dapm_widgets,
3693 ARRAY_SIZE(wm8994_dapm_widgets));
3694 wm_hubs_add_analogue_routes(codec, 0, 0);
3695 snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon));
3696
3697 return 0;
3698}
3699
3700static int wm8994_remove(struct platform_device *pdev)
3701{
3702 struct snd_soc_device *socdev = platform_get_drvdata(pdev);
3703
3704 snd_soc_free_pcms(socdev);
3705 snd_soc_dapm_free(socdev);
3706
3707 return 0;
3708}
3709
3710struct snd_soc_codec_device soc_codec_dev_wm8994 = {
3711 .probe = wm8994_probe,
3712 .remove = wm8994_remove,
3713 .suspend = wm8994_suspend,
3714 .resume = wm8994_resume,
3715};
3716EXPORT_SYMBOL_GPL(soc_codec_dev_wm8994);
3717
Mark Brown88766982010-03-29 20:57:12 +01003718/**
3719 * wm8994_mic_detect - Enable microphone detection via the WM8994 IRQ
3720 *
3721 * @codec: WM8994 codec
3722 * @jack: jack to report detection events on
3723 * @micbias: microphone bias to detect on
3724 * @det: value to report for presence detection
3725 * @shrt: value to report for short detection
3726 *
3727 * Enable microphone detection via IRQ on the WM8994. If GPIOs are
3728 * being used to bring out signals to the processor then only platform
3729 * data configuration is needed for WM8903 and processor GPIOs should
3730 * be configured using snd_soc_jack_add_gpios() instead.
3731 *
3732 * Configuration of detection levels is available via the micbias1_lvl
3733 * and micbias2_lvl platform data members.
3734 */
3735int wm8994_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack,
3736 int micbias, int det, int shrt)
3737{
Mark Brownb2c812e2010-04-14 15:35:19 +09003738 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
Mark Brown88766982010-03-29 20:57:12 +01003739 struct wm8994_micdet *micdet;
3740 int reg;
3741
3742 switch (micbias) {
3743 case 1:
3744 micdet = &wm8994->micdet[0];
3745 break;
3746 case 2:
3747 micdet = &wm8994->micdet[1];
3748 break;
3749 default:
3750 return -EINVAL;
3751 }
3752
3753 dev_dbg(codec->dev, "Configuring microphone detection on %d: %x %x\n",
3754 micbias, det, shrt);
3755
3756 /* Store the configuration */
3757 micdet->jack = jack;
3758 micdet->det = det;
3759 micdet->shrt = shrt;
3760
3761 /* If either of the jacks is set up then enable detection */
3762 if (wm8994->micdet[0].jack || wm8994->micdet[1].jack)
3763 reg = WM8994_MICD_ENA;
3764 else
3765 reg = 0;
3766
3767 snd_soc_update_bits(codec, WM8994_MICBIAS, WM8994_MICD_ENA, reg);
3768
3769 return 0;
3770}
3771EXPORT_SYMBOL_GPL(wm8994_mic_detect);
3772
3773static irqreturn_t wm8994_mic_irq(int irq, void *data)
3774{
3775 struct wm8994_priv *priv = data;
3776 struct snd_soc_codec *codec = &priv->codec;
3777 int reg;
3778 int report;
3779
3780 reg = snd_soc_read(codec, WM8994_INTERRUPT_RAW_STATUS_2);
3781 if (reg < 0) {
3782 dev_err(codec->dev, "Failed to read microphone status: %d\n",
3783 reg);
3784 return IRQ_HANDLED;
3785 }
3786
3787 dev_dbg(codec->dev, "Microphone status: %x\n", reg);
3788
3789 report = 0;
3790 if (reg & WM8994_MIC1_DET_STS)
3791 report |= priv->micdet[0].det;
3792 if (reg & WM8994_MIC1_SHRT_STS)
3793 report |= priv->micdet[0].shrt;
3794 snd_soc_jack_report(priv->micdet[0].jack, report,
3795 priv->micdet[0].det | priv->micdet[0].shrt);
3796
3797 report = 0;
3798 if (reg & WM8994_MIC2_DET_STS)
3799 report |= priv->micdet[1].det;
3800 if (reg & WM8994_MIC2_SHRT_STS)
3801 report |= priv->micdet[1].shrt;
3802 snd_soc_jack_report(priv->micdet[1].jack, report,
3803 priv->micdet[1].det | priv->micdet[1].shrt);
3804
3805 return IRQ_HANDLED;
3806}
3807
Mark Brown9e6e96a2010-01-29 17:47:12 +00003808static int wm8994_codec_probe(struct platform_device *pdev)
3809{
3810 int ret;
3811 struct wm8994_priv *wm8994;
3812 struct snd_soc_codec *codec;
3813 int i;
3814 u16 rev;
3815
3816 if (wm8994_codec) {
3817 dev_err(&pdev->dev, "Another WM8994 is registered\n");
3818 return -EINVAL;
3819 }
3820
3821 wm8994 = kzalloc(sizeof(struct wm8994_priv), GFP_KERNEL);
3822 if (!wm8994) {
3823 dev_err(&pdev->dev, "Failed to allocate private data\n");
3824 return -ENOMEM;
3825 }
3826
3827 codec = &wm8994->codec;
3828
3829 mutex_init(&codec->mutex);
3830 INIT_LIST_HEAD(&codec->dapm_widgets);
3831 INIT_LIST_HEAD(&codec->dapm_paths);
3832
Mark Brownb2c812e2010-04-14 15:35:19 +09003833 snd_soc_codec_set_drvdata(codec, wm8994);
Mark Brown9e6e96a2010-01-29 17:47:12 +00003834 codec->control_data = dev_get_drvdata(pdev->dev.parent);
3835 codec->name = "WM8994";
3836 codec->owner = THIS_MODULE;
3837 codec->read = wm8994_read;
3838 codec->write = wm8994_write;
3839 codec->readable_register = wm8994_readable;
3840 codec->bias_level = SND_SOC_BIAS_OFF;
3841 codec->set_bias_level = wm8994_set_bias_level;
3842 codec->dai = &wm8994_dai[0];
3843 codec->num_dai = 3;
3844 codec->reg_cache_size = WM8994_MAX_REGISTER;
3845 codec->reg_cache = &wm8994->reg_cache;
3846 codec->dev = &pdev->dev;
3847
3848 wm8994->pdata = pdev->dev.parent->platform_data;
3849
3850 /* Fill the cache with physical values we inherited; don't reset */
3851 ret = wm8994_bulk_read(codec->control_data, 0,
3852 ARRAY_SIZE(wm8994->reg_cache) - 1,
3853 codec->reg_cache);
3854 if (ret < 0) {
3855 dev_err(codec->dev, "Failed to fill register cache: %d\n",
3856 ret);
3857 goto err;
3858 }
3859
3860 /* Clear the cached values for unreadable/volatile registers to
3861 * avoid potential confusion.
3862 */
3863 for (i = 0; i < ARRAY_SIZE(wm8994->reg_cache); i++)
3864 if (wm8994_volatile(i) || !wm8994_readable(i))
3865 wm8994->reg_cache[i] = 0;
3866
3867 /* Set revision-specific configuration */
3868 rev = snd_soc_read(codec, WM8994_CHIP_REVISION);
3869 switch (rev) {
3870 case 2:
3871 case 3:
3872 wm8994->hubs.dcs_codes = -5;
3873 wm8994->hubs.hp_startup_mode = 1;
Mark Brown8437f702010-03-29 17:09:45 +01003874 wm8994->hubs.dcs_readback_mode = 1;
Mark Brown9e6e96a2010-01-29 17:47:12 +00003875 break;
3876 default:
Mark Brown8437f702010-03-29 17:09:45 +01003877 wm8994->hubs.dcs_readback_mode = 1;
Mark Brown9e6e96a2010-01-29 17:47:12 +00003878 break;
3879 }
Mark Brown9e6e96a2010-01-29 17:47:12 +00003880
Mark Brown88766982010-03-29 20:57:12 +01003881 ret = wm8994_request_irq(codec->control_data, WM8994_IRQ_MIC1_DET,
3882 wm8994_mic_irq, "Mic 1 detect", wm8994);
3883 if (ret != 0)
3884 dev_warn(&pdev->dev,
3885 "Failed to request Mic1 detect IRQ: %d\n", ret);
3886
3887 ret = wm8994_request_irq(codec->control_data, WM8994_IRQ_MIC1_SHRT,
3888 wm8994_mic_irq, "Mic 1 short", wm8994);
3889 if (ret != 0)
3890 dev_warn(&pdev->dev,
3891 "Failed to request Mic1 short IRQ: %d\n", ret);
3892
3893 ret = wm8994_request_irq(codec->control_data, WM8994_IRQ_MIC2_DET,
3894 wm8994_mic_irq, "Mic 2 detect", wm8994);
3895 if (ret != 0)
3896 dev_warn(&pdev->dev,
3897 "Failed to request Mic2 detect IRQ: %d\n", ret);
3898
3899 ret = wm8994_request_irq(codec->control_data, WM8994_IRQ_MIC2_SHRT,
3900 wm8994_mic_irq, "Mic 2 short", wm8994);
3901 if (ret != 0)
3902 dev_warn(&pdev->dev,
3903 "Failed to request Mic2 short IRQ: %d\n", ret);
3904
Mark Brown9e6e96a2010-01-29 17:47:12 +00003905 /* Remember if AIFnLRCLK is configured as a GPIO. This should be
3906 * configured on init - if a system wants to do this dynamically
3907 * at runtime we can deal with that then.
3908 */
3909 ret = wm8994_reg_read(codec->control_data, WM8994_GPIO_1);
3910 if (ret < 0) {
3911 dev_err(codec->dev, "Failed to read GPIO1 state: %d\n", ret);
Mark Brown88766982010-03-29 20:57:12 +01003912 goto err_irq;
Mark Brown9e6e96a2010-01-29 17:47:12 +00003913 }
3914 if ((ret & WM8994_GPN_FN_MASK) != WM8994_GP_FN_PIN_SPECIFIC) {
3915 wm8994->lrclk_shared[0] = 1;
3916 wm8994_dai[0].symmetric_rates = 1;
3917 } else {
3918 wm8994->lrclk_shared[0] = 0;
3919 }
3920
3921 ret = wm8994_reg_read(codec->control_data, WM8994_GPIO_6);
3922 if (ret < 0) {
3923 dev_err(codec->dev, "Failed to read GPIO6 state: %d\n", ret);
Mark Brown88766982010-03-29 20:57:12 +01003924 goto err_irq;
Mark Brown9e6e96a2010-01-29 17:47:12 +00003925 }
3926 if ((ret & WM8994_GPN_FN_MASK) != WM8994_GP_FN_PIN_SPECIFIC) {
3927 wm8994->lrclk_shared[1] = 1;
3928 wm8994_dai[1].symmetric_rates = 1;
3929 } else {
3930 wm8994->lrclk_shared[1] = 0;
3931 }
3932
3933 for (i = 0; i < ARRAY_SIZE(wm8994_dai); i++)
3934 wm8994_dai[i].dev = codec->dev;
3935
3936 wm8994_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
3937
3938 wm8994_codec = codec;
3939
3940 /* Latch volume updates (right only; we always do left then right). */
3941 snd_soc_update_bits(codec, WM8994_AIF1_DAC1_RIGHT_VOLUME,
3942 WM8994_AIF1DAC1_VU, WM8994_AIF1DAC1_VU);
3943 snd_soc_update_bits(codec, WM8994_AIF1_DAC2_RIGHT_VOLUME,
3944 WM8994_AIF1DAC2_VU, WM8994_AIF1DAC2_VU);
3945 snd_soc_update_bits(codec, WM8994_AIF2_DAC_RIGHT_VOLUME,
3946 WM8994_AIF2DAC_VU, WM8994_AIF2DAC_VU);
3947 snd_soc_update_bits(codec, WM8994_AIF1_ADC1_RIGHT_VOLUME,
3948 WM8994_AIF1ADC1_VU, WM8994_AIF1ADC1_VU);
3949 snd_soc_update_bits(codec, WM8994_AIF1_ADC2_RIGHT_VOLUME,
3950 WM8994_AIF1ADC2_VU, WM8994_AIF1ADC2_VU);
3951 snd_soc_update_bits(codec, WM8994_AIF2_ADC_RIGHT_VOLUME,
3952 WM8994_AIF2ADC_VU, WM8994_AIF1ADC2_VU);
3953 snd_soc_update_bits(codec, WM8994_DAC1_RIGHT_VOLUME,
3954 WM8994_DAC1_VU, WM8994_DAC1_VU);
3955 snd_soc_update_bits(codec, WM8994_DAC2_RIGHT_VOLUME,
3956 WM8994_DAC2_VU, WM8994_DAC2_VU);
3957
3958 /* Set the low bit of the 3D stereo depth so TLV matches */
3959 snd_soc_update_bits(codec, WM8994_AIF1_DAC1_FILTERS_2,
3960 1 << WM8994_AIF1DAC1_3D_GAIN_SHIFT,
3961 1 << WM8994_AIF1DAC1_3D_GAIN_SHIFT);
3962 snd_soc_update_bits(codec, WM8994_AIF1_DAC2_FILTERS_2,
3963 1 << WM8994_AIF1DAC2_3D_GAIN_SHIFT,
3964 1 << WM8994_AIF1DAC2_3D_GAIN_SHIFT);
3965 snd_soc_update_bits(codec, WM8994_AIF2_DAC_FILTERS_2,
3966 1 << WM8994_AIF2DAC_3D_GAIN_SHIFT,
3967 1 << WM8994_AIF2DAC_3D_GAIN_SHIFT);
3968
3969 wm8994_update_class_w(codec);
3970
3971 ret = snd_soc_register_codec(codec);
3972 if (ret != 0) {
3973 dev_err(codec->dev, "Failed to register codec: %d\n", ret);
Mark Brown88766982010-03-29 20:57:12 +01003974 goto err_irq;
Mark Brown9e6e96a2010-01-29 17:47:12 +00003975 }
3976
3977 ret = snd_soc_register_dais(wm8994_dai, ARRAY_SIZE(wm8994_dai));
3978 if (ret != 0) {
3979 dev_err(codec->dev, "Failed to register DAIs: %d\n", ret);
3980 goto err_codec;
3981 }
3982
3983 platform_set_drvdata(pdev, wm8994);
3984
3985 return 0;
3986
3987err_codec:
3988 snd_soc_unregister_codec(codec);
Mark Brown88766982010-03-29 20:57:12 +01003989err_irq:
3990 wm8994_free_irq(codec->control_data, WM8994_IRQ_MIC2_SHRT, wm8994);
3991 wm8994_free_irq(codec->control_data, WM8994_IRQ_MIC2_DET, wm8994);
3992 wm8994_free_irq(codec->control_data, WM8994_IRQ_MIC1_SHRT, wm8994);
3993 wm8994_free_irq(codec->control_data, WM8994_IRQ_MIC1_DET, wm8994);
Mark Brown9e6e96a2010-01-29 17:47:12 +00003994err:
3995 kfree(wm8994);
3996 return ret;
3997}
3998
3999static int __devexit wm8994_codec_remove(struct platform_device *pdev)
4000{
4001 struct wm8994_priv *wm8994 = platform_get_drvdata(pdev);
4002 struct snd_soc_codec *codec = &wm8994->codec;
4003
4004 wm8994_set_bias_level(codec, SND_SOC_BIAS_OFF);
4005 snd_soc_unregister_dais(wm8994_dai, ARRAY_SIZE(wm8994_dai));
4006 snd_soc_unregister_codec(&wm8994->codec);
Mark Brown88766982010-03-29 20:57:12 +01004007 wm8994_free_irq(codec->control_data, WM8994_IRQ_MIC2_SHRT, wm8994);
4008 wm8994_free_irq(codec->control_data, WM8994_IRQ_MIC2_DET, wm8994);
4009 wm8994_free_irq(codec->control_data, WM8994_IRQ_MIC1_SHRT, wm8994);
4010 wm8994_free_irq(codec->control_data, WM8994_IRQ_MIC1_DET, wm8994);
Mark Brown9e6e96a2010-01-29 17:47:12 +00004011 kfree(wm8994);
4012 wm8994_codec = NULL;
4013
4014 return 0;
4015}
4016
4017static struct platform_driver wm8994_codec_driver = {
4018 .driver = {
4019 .name = "wm8994-codec",
4020 .owner = THIS_MODULE,
4021 },
4022 .probe = wm8994_codec_probe,
4023 .remove = __devexit_p(wm8994_codec_remove),
4024};
4025
4026static __init int wm8994_init(void)
4027{
4028 return platform_driver_register(&wm8994_codec_driver);
4029}
4030module_init(wm8994_init);
4031
4032static __exit void wm8994_exit(void)
4033{
4034 platform_driver_unregister(&wm8994_codec_driver);
4035}
4036module_exit(wm8994_exit);
4037
4038
4039MODULE_DESCRIPTION("ASoC WM8994 driver");
4040MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>");
4041MODULE_LICENSE("GPL");
4042MODULE_ALIAS("platform:wm8994-codec");