1 // SPDX-License-Identifier: GPL-2.0-only
2 // SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES.
3 // All rights reserved.
5 // tegra210_sfc.c - Tegra210 SFC driver
8 #include <linux/device.h>
10 #include <linux/module.h>
12 #include <linux/platform_device.h>
13 #include <linux/pm_runtime.h>
14 #include <linux/regmap.h>
15 #include <sound/core.h>
16 #include <sound/pcm.h>
17 #include <sound/pcm_params.h>
18 #include <sound/soc.h>
20 #include "tegra210_sfc.h"
21 #include "tegra_cif.h"
23 #define UNSUPP_CONV ((void *)(-EOPNOTSUPP))
24 #define BYPASS_CONV NULL
26 static const struct reg_default tegra210_sfc_reg_defaults
[] = {
27 { TEGRA210_SFC_RX_INT_MASK
, 0x00000001},
28 { TEGRA210_SFC_RX_CIF_CTRL
, 0x00007700},
29 { TEGRA210_SFC_TX_INT_MASK
, 0x00000001},
30 { TEGRA210_SFC_TX_CIF_CTRL
, 0x00007700},
31 { TEGRA210_SFC_CG
, 0x1},
32 { TEGRA210_SFC_CFG_RAM_CTRL
, 0x00004000},
35 static const int tegra210_sfc_rates
[TEGRA210_SFC_NUM_RATES
] = {
51 /* coeff RAM tables required for SFC */
52 static u32 coef_8to11
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
54 0x0001d727,//input gain
55 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
56 0x00e55557, 0xffcadd5b, 0x003d80ba,
57 0x00d13397, 0xfff232f8, 0x00683337,
58 0x00000002,//output gain
60 0x000005d6,//input gain
61 0x00c6543e, 0xff342935, 0x0052f116,
62 0x000a1d78, 0xff3330c0, 0x005f88a3,
63 0xffbee7c0, 0xff2b5ba5, 0x0073eb26,
64 0x00000003,//output gain
77 0x0000015f,//input gain
78 0x00a7909c, 0xff241c71, 0x005f5e00,
79 0xffca77f4, 0xff20dd50, 0x006855eb,
80 0xff86c552, 0xff18137a, 0x00773648,
81 0x00000001//output gain
84 static u32 coef_8to16
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
86 0x0001d727,//input gain
87 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
88 0x00e55557, 0xffcadd5b, 0x003d80ba,
89 0x00d13397, 0xfff232f8, 0x00683337,
90 0x00000002//output gain
93 static u32 coef_8to22
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
95 0x0001d727,//input gain
96 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
97 0x00e55557, 0xffcadd5b, 0x003d80ba,
98 0x00d13397, 0xfff232f8, 0x00683337,
99 0x00000002,//output gain
101 0x000005d6,//input gain
102 0x00c6543e, 0xff342935, 0x0052f116,
103 0x000a1d78, 0xff3330c0, 0x005f88a3,
104 0xffbee7c0, 0xff2b5ba5, 0x0073eb26,
105 0x00000003,//output gain
118 0x000005f3,//input gain
119 0x00d816d6, 0xff385383, 0x004fe566,
120 0x003c548d, 0xff38c23d, 0x005d0b1c,
121 0xfff02f7d, 0xff31e983, 0x0072d65d,
122 0x00000001//output gain
125 static u32 coef_8to24
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
127 0x000005e1,//input gain
128 0x00dca92f, 0xff45647a, 0x0046b59c,
129 0x00429d1e, 0xff4fec62, 0x00516d30,
130 0xffdea779, 0xff5e08ba, 0x0060185e,
131 0xffafbab2, 0xff698d5a, 0x006ce3ae,
132 0xff9a82d2, 0xff704674, 0x007633c5,
133 0xff923433, 0xff721128, 0x007cff42,
134 0x00000003//output gain
137 static u32 coef_8to32
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
139 0x0001d727,//input gain
140 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
141 0x00e55557, 0xffcadd5b, 0x003d80ba,
142 0x00d13397, 0xfff232f8, 0x00683337,
143 0x00000002,//output gain
145 0x000013d9,//input gain
146 0x00ebd477, 0xff4ce383, 0x0042049d,
147 0x0089c278, 0xff54414d, 0x00531ded,
148 0x004a5e07, 0xff53cf41, 0x006efbdc,
149 0x00000002//output gain
152 static u32 coef_8to44
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
153 0x0156105,//interpolation + IIR filter
154 0x0000d649,//input gain
155 0x00e87afb, 0xff5f69d0, 0x003df3cf,
156 0x007ce488, 0xff99a5c8, 0x0056a6a0,
157 0x00344928, 0xffcba3e5, 0x006be470,
158 0x00137aa7, 0xffe60276, 0x00773410,
159 0x0005fa2a, 0xfff1ac11, 0x007c795b,
160 0x00012d36, 0xfff5eca2, 0x007f10ef,
161 0x00000002,//ouptut gain
162 0x0021a102,//interpolation + IIR filter
163 0x00000e00,//input gain
164 0x00e2e000, 0xff6e1a00, 0x002aaa00,
165 0x00610a00, 0xff5dda00, 0x003ccc00,
166 0x00163a00, 0xff3c0400, 0x00633200,
167 0x00000003,//Output gain
168 0x00000204,//Farrow filter
181 static u32 coef_8to48
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
182 0x00156105,//interpolation + IIR Filter
183 0x0000d649,//input gain
184 0x00e87afb, 0xff5f69d0, 0x003df3cf,
185 0x007ce488, 0xff99a5c8, 0x0056a6a0,
186 0x00344928, 0xffcba3e5, 0x006be470,
187 0x00137aa7, 0xffe60276, 0x00773410,
188 0x0005fa2a, 0xfff1ac11, 0x007c795b,
189 0x00012d36, 0xfff5eca2, 0x007f10ef,
190 0x00000002,//ouptut gain
191 0x0000a102,//interpolation + IIR filter
192 0x00000e00,//input gain
193 0x00e2e000, 0xff6e1a00, 0x002aaa00,
194 0x00610a00, 0xff5dda00, 0x003ccc00,
195 0x00163a00, 0xff3c0400, 0x00633200,
196 0x00000003//output gain
199 static u32 coef_8to88
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
201 0x0001d727,//input gain
202 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
203 0x00e55557, 0xffcadd5b, 0x003d80ba,
204 0x00d13397, 0xfff232f8, 0x00683337,
205 0x00000002,//output gain
207 0x000013d9,//input gain
208 0x00ebd477, 0xff4ce383, 0x0042049d,
209 0x0089c278, 0xff54414d, 0x00531ded,
210 0x004a5e07, 0xff53cf41, 0x006efbdc,
211 0x00000002,//output gain
213 0x0000007d,//input gain
214 0x007d1f20, 0xff1a540e, 0x00678bf9,
215 0xff916625, 0xff16b0ff, 0x006e433a,
216 0xff5af660, 0xff0eb91f, 0x00797356,
217 0x00000003,//output gain
231 static u32 coef_8to96
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
233 0x0001d727,//input gain
234 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
235 0x00e55557, 0xffcadd5b, 0x003d80ba,
236 0x00d13397, 0xfff232f8, 0x00683337,
237 0x00000002,//output gain
239 0x000013d9,//input gain
240 0x00ebd477, 0xff4ce383, 0x0042049d,
241 0x0089c278, 0xff54414d, 0x00531ded,
242 0x004a5e07, 0xff53cf41, 0x006efbdc,
243 0x00000002,//output gain
245 0x0000007d,//input gain
246 0x007d1f20, 0xff1a540e, 0x00678bf9,
247 0xff916625, 0xff16b0ff, 0x006e433a,
248 0xff5af660, 0xff0eb91f, 0x00797356,
249 0x00000003//output gain
252 static u32 coef_11to8
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
254 0x0000015f,//input gain
255 0x00a7909c, 0xff241c71, 0x005f5e00,
256 0xffca77f4, 0xff20dd50, 0x006855eb,
257 0xff86c552, 0xff18137a, 0x00773648,
258 0x00000002,//output gain
260 0x000005f3,//input gain
261 0x00d816d6, 0xff385383, 0x004fe566,
262 0x003c548d, 0xff38c23d, 0x005d0b1c,
263 0xfff02f7d, 0xff31e983, 0x0072d65d,
264 0x00000002,//output gain
277 0x0001d727,//input gain
278 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
279 0x00e55557, 0xffcadd5b, 0x003d80ba,
280 0x00d13397, 0xfff232f8, 0x00683337,
281 0x00000001//output gain
284 static u32 coef_11to16
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
286 0x0001d727,//input gain
287 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
288 0x00e55557, 0xffcadd5b, 0x003d80ba,
289 0x00d13397, 0xfff232f8, 0x00683337,
290 0x00000002,//output gain
292 0x000013d9,//input gain
293 0x00ebd477, 0xff4ce383, 0x0042049d,
294 0x0089c278, 0xff54414d, 0x00531ded,
295 0x004a5e07, 0xff53cf41, 0x006efbdc,
296 0x00000002,//output gain
310 static u32 coef_11to22
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
312 0x0001d727,//input gain
313 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
314 0x00e55557, 0xffcadd5b, 0x003d80ba,
315 0x00d13397, 0xfff232f8, 0x00683337,
316 0x00000002//output gain
319 static u32 coef_11to24
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
321 0x0001d727,//input gain
322 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
323 0x00e55557, 0xffcadd5b, 0x003d80ba,
324 0x00d13397, 0xfff232f8, 0x00683337,
325 0x00000002,//output gain
327 0x000013d9,//input gain
328 0x00ebd477, 0xff4ce383, 0x0042049d,
329 0x0089c278, 0xff54414d, 0x00531ded,
330 0x004a5e07, 0xff53cf41, 0x006efbdc,
331 0x00000002,//output gain
345 static u32 coef_11to32
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
347 0x0001d727,//input gain
348 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
349 0x00e55557, 0xffcadd5b, 0x003d80ba,
350 0x00d13397, 0xfff232f8, 0x00683337,
351 0x00000002,//output gain
353 0x000013d9,//input gain
354 0x00ebd477, 0xff4ce383, 0x0042049d,
355 0x0089c278, 0xff54414d, 0x00531ded,
356 0x004a5e07, 0xff53cf41, 0x006efbdc,
357 0x00000002,//output gain
359 0x0000010a,//input gain
360 0x00c93dc4, 0xff26f5f6, 0x005d1041,
361 0x001002c4, 0xff245b76, 0x00666002,
362 0xffc30a45, 0xff1baecd, 0x00765921,
363 0x00000002,//output gain
377 static u32 coef_11to44
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
379 0x0001d727,//input gain
380 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
381 0x00e55557, 0xffcadd5b, 0x003d80ba,
382 0x00d13397, 0xfff232f8, 0x00683337,
383 0x00000002,//output gain
385 0x000013d9,//input gain
386 0x00ebd477, 0xff4ce383, 0x0042049d,
387 0x0089c278, 0xff54414d, 0x00531ded,
388 0x004a5e07, 0xff53cf41, 0x006efbdc,
389 0x00000002//output gain
392 static u32 coef_11to48
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
394 0x0001d727,//input gain
395 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
396 0x00e55557, 0xffcadd5b, 0x003d80ba,
397 0x00d13397, 0xfff232f8, 0x00683337,
398 0x00000002,//output gain
400 0x000013d9,//input gain
401 0x00ebd477, 0xff4ce383, 0x0042049d,
402 0x0089c278, 0xff54414d, 0x00531ded,
403 0x004a5e07, 0xff53cf41, 0x006efbdc,
404 0x00000002,//output gain
406 0x0000010a,//input gain
407 0x00c93dc4, 0xff26f5f6, 0x005d1041,
408 0x001002c4, 0xff245b76, 0x00666002,
409 0xffc30a45, 0xff1baecd, 0x00765921,
410 0x00000002,//output gain
424 static u32 coef_11to88
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
426 0x0001d727,//input gain
427 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
428 0x00e55557, 0xffcadd5b, 0x003d80ba,
429 0x00d13397, 0xfff232f8, 0x00683337,
430 0x00000002,//output gain
432 0x000013d9,//input gain
433 0x00ebd477, 0xff4ce383, 0x0042049d,
434 0x0089c278, 0xff54414d, 0x00531ded,
435 0x004a5e07, 0xff53cf41, 0x006efbdc,
436 0x00000002,//output gain
438 0x0000010a,//input gain
439 0x00c93dc4, 0xff26f5f6, 0x005d1041,
440 0x001002c4, 0xff245b76, 0x00666002,
441 0xffc30a45, 0xff1baecd, 0x00765921,
442 0x00000002//output gain
445 static u32 coef_11to96
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
447 0x0001d727,//input gain
448 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
449 0x00e55557, 0xffcadd5b, 0x003d80ba,
450 0x00d13397, 0xfff232f8, 0x00683337,
451 0x00000002,//output gain
453 0x000013d9,//input gain
454 0x00ebd477, 0xff4ce383, 0x0042049d,
455 0x0089c278, 0xff54414d, 0x00531ded,
456 0x004a5e07, 0xff53cf41, 0x006efbdc,
457 0x00000002,//output gain
459 0x0000010a,//input gain
460 0x00c93dc4, 0xff26f5f6, 0x005d1041,
461 0x001002c4, 0xff245b76, 0x00666002,
462 0xffc30a45, 0xff1baecd, 0x00765921,
463 0x00000002,//output gain
477 static u32 coef_16to8
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
479 0x0001d727,//input gain
480 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
481 0x00e55557, 0xffcadd5b, 0x003d80ba,
482 0x00d13397, 0xfff232f8, 0x00683337,
483 0x00000001//output gain
486 static u32 coef_16to11
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
488 0x000001e0,//input gain
489 0x00de44c0, 0xff380b7f, 0x004ffc73,
490 0x00494b44, 0xff3d493a, 0x005908bf,
491 0xffe9a3c8, 0xff425647, 0x006745f7,
492 0xffc42d61, 0xff40a6c7, 0x00776709,
493 0x00000003,//output gain
506 0x0001d727,//input gain
507 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
508 0x00e55557, 0xffcadd5b, 0x003d80ba,
509 0x00d13397, 0xfff232f8, 0x00683337,
510 0x00000001//output gain
513 static u32 coef_16to22
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
515 0x0001d727,//input gain
516 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
517 0x00e55557, 0xffcadd5b, 0x003d80ba,
518 0x00d13397, 0xfff232f8, 0x00683337,
519 0x00000002,//output gain
521 0x000005d6,//input gain
522 0x00c6543e, 0xff342935, 0x0052f116,
523 0x000a1d78, 0xff3330c0, 0x005f88a3,
524 0xffbee7c0, 0xff2b5ba5, 0x0073eb26,
525 0x00000003,//output gain
538 0x0000015f,//input gain
539 0x00a7909c, 0xff241c71, 0x005f5e00,
540 0xffca77f4, 0xff20dd50, 0x006855eb,
541 0xff86c552, 0xff18137a, 0x00773648,
542 0x00000001//output gain
545 static u32 coef_16to24
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
547 0x00000292,//input gain
548 0x00e4320a, 0xff41d2d9, 0x004911ac,
549 0x005dd9e3, 0xff4c7d80, 0x0052103e,
550 0xfff8ebef, 0xff5b6fab, 0x005f0a0d,
551 0xffc4b414, 0xff68582c, 0x006b38e5,
552 0xffabb861, 0xff704bec, 0x0074de52,
553 0xffa19f4c, 0xff729059, 0x007c7e90,
554 0x00000003,//output gain
556 0x00000292,//input gain
557 0x00e4320a, 0xff41d2d9, 0x004911ac,
558 0x005dd9e3, 0xff4c7d80, 0x0052103e,
559 0xfff8ebef, 0xff5b6fab, 0x005f0a0d,
560 0xffc4b414, 0xff68582c, 0x006b38e5,
561 0xffabb861, 0xff704bec, 0x0074de52,
562 0xffa19f4c, 0xff729059, 0x007c7e90,
563 0x00000001//output gain
566 static u32 coef_16to32
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
568 0x0001d727,//input gain
569 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
570 0x00e55557, 0xffcadd5b, 0x003d80ba,
571 0x00d13397, 0xfff232f8, 0x00683337,
572 0x00000002//output gain
575 static u32 coef_16to44
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
576 0x00156105,//interpolation + IIR filter
577 0x0000d649,//input gain
578 0x00e87afb, 0xff5f69d0, 0x003df3cf,
579 0x007ce488, 0xff99a5c8, 0x0056a6a0,
580 0x00344928, 0xffcba3e5, 0x006be470,
581 0x00137aa7, 0xffe60276, 0x00773410,
582 0x0005fa2a, 0xfff1ac11, 0x007c795b,
583 0x00012d36, 0xfff5eca2, 0x007f10ef,
584 0x00000002,//output gain
585 0x0021a102,//interpolation + IIR filter
586 0x00000e00,//input gain
587 0x00e2e000, 0xff6e1a00, 0x002aaa00,
588 0x00610a00, 0xff5dda00, 0x003ccc00,
589 0x00163a00, 0xff3c0400, 0x00633200,
590 0x00000003,//output gain
591 0x002c0204,//Farrow Filter
602 0x00005101,//IIR Filter + Decimator
603 0x0000203c,//input gain
604 0x00f52d35, 0xff2e2162, 0x005a21e0,
605 0x00c6f0f0, 0xff2ecd69, 0x006fa78d,
606 0x00000001//output gain
609 static u32 coef_16to48
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
610 0x0000a105,//interpolation + IIR Filter
611 0x00000784,//input gain
612 0x00cc516e, 0xff2c9639, 0x005ad5b3,
613 0x0013ad0d, 0xff3d4799, 0x0063ce75,
614 0xffb6f398, 0xff5138d1, 0x006e9e1f,
615 0xff9186e5, 0xff5f96a4, 0x0076a86e,
616 0xff82089c, 0xff676b81, 0x007b9f8a,
617 0xff7c48a5, 0xff6a31e7, 0x007ebb7b,
618 0x00000003//output gain
621 static u32 coef_16to88
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
623 0x0001d727,//input gain
624 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
625 0x00e55557, 0xffcadd5b, 0x003d80ba,
626 0x00d13397, 0xfff232f8, 0x00683337,
627 0x00000002,//output gain
629 0x000005d6,//input gain
630 0x00c6543e, 0xff342935, 0x0052f116,
631 0x000a1d78, 0xff3330c0, 0x005f88a3,
632 0xffbee7c0, 0xff2b5ba5, 0x0073eb26,
633 0x00000003,//output gain
647 static u32 coef_16to96
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
649 0x0001d727,//input gain
650 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
651 0x00e55557, 0xffcadd5b, 0x003d80ba,
652 0x00d13397, 0xfff232f8, 0x00683337,
653 0x00000002,//output gain
655 0x000005d6,//input gain
656 0x00c6543e, 0xff342935, 0x0052f116,
657 0x000a1d78, 0xff3330c0, 0x005f88a3,
658 0xffbee7c0, 0xff2b5ba5, 0x0073eb26,
659 0x00000003//output gain
662 static u32 coef_16to176
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
664 0x0001d727,//input gain
665 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
666 0x00e55557, 0xffcadd5b, 0x003d80ba,
667 0x00d13397, 0xfff232f8, 0x00683337,
668 0x00000002,//output gain
670 0x000013d9,//input gain
671 0x00ebd477, 0xff4ce383, 0x0042049d,
672 0x0089c278, 0xff54414d, 0x00531ded,
673 0x004a5e07, 0xff53cf41, 0x006efbdc,
674 0x00000002,//output gain
676 0x0000007d,//input gain
677 0x007d1f20, 0xff1a540e, 0x00678bf9,
678 0xff916625, 0xff16b0ff, 0x006e433a,
679 0xff5af660, 0xff0eb91f, 0x00797356,
680 0x00000003,//output gain
694 static u32 coef_16to192
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
696 0x0001d727,//input gain
697 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
698 0x00e55557, 0xffcadd5b, 0x003d80ba,
699 0x00d13397, 0xfff232f8, 0x00683337,
700 0x00000002,//output gain
702 0x000013d9,//input gain
703 0x00ebd477, 0xff4ce383, 0x0042049d,
704 0x0089c278, 0xff54414d, 0x00531ded,
705 0x004a5e07, 0xff53cf41, 0x006efbdc,
706 0x00000002,//output gain
708 0x0000007d,//input gain
709 0x007d1f20, 0xff1a540e, 0x00678bf9,
710 0xff916625, 0xff16b0ff, 0x006e433a,
711 0xff5af660, 0xff0eb91f, 0x00797356,
712 0x00000003//output gain
715 static u32 coef_22to8
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
717 0x000005f3,//input gain
718 0x00d816d6, 0xff385383, 0x004fe566,
719 0x003c548d, 0xff38c23d, 0x005d0b1c,
720 0xfff02f7d, 0xff31e983, 0x0072d65d,
721 0x00000002,//output gain
734 0x0001d727,//input gain
735 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
736 0x00e55557, 0xffcadd5b, 0x003d80ba,
737 0x00d13397, 0xfff232f8, 0x00683337,
738 0x00000001//output gain
741 static u32 coef_22to11
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
743 0x0001d727,//input gain
744 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
745 0x00e55557, 0xffcadd5b, 0x003d80ba,
746 0x00d13397, 0xfff232f8, 0x00683337,
747 0x00000001//output gain
750 static u32 coef_22to16
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
752 0x0000015f,//input gain
753 0x00a7909c, 0xff241c71, 0x005f5e00,
754 0xffca77f4, 0xff20dd50, 0x006855eb,
755 0xff86c552, 0xff18137a, 0x00773648,
756 0x00000002,//output gain
758 0x000005f3,//input gain
759 0x00d816d6, 0xff385383, 0x004fe566,
760 0x003c548d, 0xff38c23d, 0x005d0b1c,
761 0xfff02f7d, 0xff31e983, 0x0072d65d,
762 0x00000002,//output gain
775 0x0001d727,//input gain
776 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
777 0x00e55557, 0xffcadd5b, 0x003d80ba,
778 0x00d13397, 0xfff232f8, 0x00683337,
779 0x00000001//output gain
782 static u32 coef_22to24
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
784 0x0001d727,//input gain
785 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
786 0x00e55557, 0xffcadd5b, 0x003d80ba,
787 0x00d13397, 0xfff232f8, 0x00683337,
788 0x00000002,//output gain
790 0x000013d9,//input gain
791 0x00ebd477, 0xff4ce383, 0x0042049d,
792 0x0089c278, 0xff54414d, 0x00531ded,
793 0x004a5e07, 0xff53cf41, 0x006efbdc,
794 0x00000002,//output gain
807 0x0001d029,//input gain
808 0x00f2a98b, 0xff92aa71, 0x001fcd16,
809 0x00ae9004, 0xffb85140, 0x0041813a,
810 0x007f8ed1, 0xffd585fc, 0x006a69e6,
811 0x00000001//output gain
814 static u32 coef_22to32
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
816 0x0001d727,//input gain
817 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
818 0x00e55557, 0xffcadd5b, 0x003d80ba,
819 0x00d13397, 0xfff232f8, 0x00683337,
820 0x00000002,//output gain
822 0x000013d9,//input gain
823 0x00ebd477, 0xff4ce383, 0x0042049d,
824 0x0089c278, 0xff54414d, 0x00531ded,
825 0x004a5e07, 0xff53cf41, 0x006efbdc,
826 0x00000002,//output gain
840 static u32 coef_22to44
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
842 0x0001d727,//input gain
843 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
844 0x00e55557, 0xffcadd5b, 0x003d80ba,
845 0x00d13397, 0xfff232f8, 0x00683337,
846 0x00000002//output gain
849 static u32 coef_22to48
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
851 0x0001d727,//input gain
852 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
853 0x00e55557, 0xffcadd5b, 0x003d80ba,
854 0x00d13397, 0xfff232f8, 0x00683337,
855 0x00000002,//output gain
857 0x000013d9,//input gain
858 0x00ebd477, 0xff4ce383, 0x0042049d,
859 0x0089c278, 0xff54414d, 0x00531ded,
860 0x004a5e07, 0xff53cf41, 0x006efbdc,
861 0x00000002,//output gain
875 static u32 coef_22to88
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
877 0x0001d727,//input gain
878 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
879 0x00e55557, 0xffcadd5b, 0x003d80ba,
880 0x00d13397, 0xfff232f8, 0x00683337,
881 0x00000002,//output gain
883 0x000013d9,//input gain
884 0x00ebd477, 0xff4ce383, 0x0042049d,
885 0x0089c278, 0xff54414d, 0x00531ded,
886 0x004a5e07, 0xff53cf41, 0x006efbdc,
887 0x00000002//output gain
890 static u32 coef_22to96
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
892 0x0001d727,//input gain
893 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
894 0x00e55557, 0xffcadd5b, 0x003d80ba,
895 0x00d13397, 0xfff232f8, 0x00683337,
896 0x00000002,//output gain
898 0x000013d9,//input gain
899 0x00ebd477, 0xff4ce383, 0x0042049d,
900 0x0089c278, 0xff54414d, 0x00531ded,
901 0x004a5e07, 0xff53cf41, 0x006efbdc,
902 0x00000002,//output gain
904 0x0000010a,//input gain
905 0x00c93dc4, 0xff26f5f6, 0x005d1041,
906 0x001002c4, 0xff245b76, 0x00666002,
907 0xffc30a45, 0xff1baecd, 0x00765921,
908 0x00000002,//output gain
922 static u32 coef_22to176
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
924 0x0001d727,//input gain
925 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
926 0x00e55557, 0xffcadd5b, 0x003d80ba,
927 0x00d13397, 0xfff232f8, 0x00683337,
928 0x00000002,//output gain
930 0x000013d9,//input gain
931 0x00ebd477, 0xff4ce383, 0x0042049d,
932 0x0089c278, 0xff54414d, 0x00531ded,
933 0x004a5e07, 0xff53cf41, 0x006efbdc,
934 0x00000002,//output gain
936 0x0000010a,//input gain
937 0x00c93dc4, 0xff26f5f6, 0x005d1041,
938 0x001002c4, 0xff245b76, 0x00666002,
939 0xffc30a45, 0xff1baecd, 0x00765921,
940 0x00000002//output gain
943 static u32 coef_22to192
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
945 0x0001d727,//input gain
946 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
947 0x00e55557, 0xffcadd5b, 0x003d80ba,
948 0x00d13397, 0xfff232f8, 0x00683337,
949 0x00000002,//output gain
951 0x000013d9,//input gain
952 0x00ebd477, 0xff4ce383, 0x0042049d,
953 0x0089c278, 0xff54414d, 0x00531ded,
954 0x004a5e07, 0xff53cf41, 0x006efbdc,
955 0x00000002,//output gain
957 0x0000010a,//input gain
958 0x00c93dc4, 0xff26f5f6, 0x005d1041,
959 0x001002c4, 0xff245b76, 0x00666002,
960 0xffc30a45, 0xff1baecd, 0x00765921,
961 0x00000002,//output gain
975 static u32 coef_24to8
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
977 0x000005e1,//input gain
978 0x00dca92f, 0xff45647a, 0x0046b59c,
979 0x00429d1e, 0xff4fec62, 0x00516d30,
980 0xffdea779, 0xff5e08ba, 0x0060185e,
981 0xffafbab2, 0xff698d5a, 0x006ce3ae,
982 0xff9a82d2, 0xff704674, 0x007633c5,
983 0xff923433, 0xff721128, 0x007cff42,
984 0x00000001//output gain
987 static u32 coef_24to11
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
989 0x000001e0,//input gain
990 0x00de44c0, 0xff380b7f, 0x004ffc73,
991 0x00494b44, 0xff3d493a, 0x005908bf,
992 0xffe9a3c8, 0xff425647, 0x006745f7,
993 0xffc42d61, 0xff40a6c7, 0x00776709,
994 0x00000002,//output gain
1007 0x0001d727,//input gain
1008 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1009 0x00e55557, 0xffcadd5b, 0x003d80ba,
1010 0x00d13397, 0xfff232f8, 0x00683337,
1011 0x00000001//output gain
1014 static u32 coef_24to16
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1016 0x00000292,//input gain
1017 0x00e4320a, 0xff41d2d9, 0x004911ac,
1018 0x005dd9e3, 0xff4c7d80, 0x0052103e,
1019 0xfff8ebef, 0xff5b6fab, 0x005f0a0d,
1020 0xffc4b414, 0xff68582c, 0x006b38e5,
1021 0xffabb861, 0xff704bec, 0x0074de52,
1022 0xffa19f4c, 0xff729059, 0x007c7e90,
1023 0x00000002,//output gain
1025 0x00000292,//input gain
1026 0x00e4320a, 0xff41d2d9, 0x004911ac,
1027 0x005dd9e3, 0xff4c7d80, 0x0052103e,
1028 0xfff8ebef, 0xff5b6fab, 0x005f0a0d,
1029 0xffc4b414, 0xff68582c, 0x006b38e5,
1030 0xffabb861, 0xff704bec, 0x0074de52,
1031 0xffa19f4c, 0xff729059, 0x007c7e90,
1032 0x00000001//output gain
1035 static u32 coef_24to22
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1037 0x0001d029,//input gain
1038 0x00f2a98b, 0xff92aa71, 0x001fcd16,
1039 0x00ae9004, 0xffb85140, 0x0041813a,
1040 0x007f8ed1, 0xffd585fc, 0x006a69e6,
1041 0x00000002,//output gain
1043 0x000001e0,//input gain
1044 0x00de44c0, 0xff380b7f, 0x004ffc73,
1045 0x00494b44, 0xff3d493a, 0x005908bf,
1046 0xffe9a3c8, 0xff425647, 0x006745f7,
1047 0xffc42d61, 0xff40a6c7, 0x00776709,
1048 0x00000002,//output gain
1061 0x0001d727,//input gain
1062 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1063 0x00e55557, 0xffcadd5b, 0x003d80ba,
1064 0x00d13397, 0xfff232f8, 0x00683337,
1065 0x00000001//output gain
1068 static u32 coef_24to32
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1070 0x0001d727,//input gain
1071 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1072 0x00e55557, 0xffcadd5b, 0x003d80ba,
1073 0x00d13397, 0xfff232f8, 0x00683337,
1074 0x00000002,//output gain
1076 0x000013d9,//input gain
1077 0x00ebd477, 0xff4ce383, 0x0042049d,
1078 0x0089c278, 0xff54414d, 0x00531ded,
1079 0x004a5e07, 0xff53cf41, 0x006efbdc,
1080 0x00000002,//output gain
1082 0x000013d9,//input gain
1083 0x00ebd477, 0xff4ce383, 0x0042049d,
1084 0x0089c278, 0xff54414d, 0x00531ded,
1085 0x004a5e07, 0xff53cf41, 0x006efbdc,
1086 0x00000001//output gain
1089 static u32 coef_24to44
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1091 0x0001d727,//input gain
1092 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1093 0x00e55557, 0xffcadd5b, 0x003d80ba,
1094 0x00d13397, 0xfff232f8, 0x00683337,
1095 0x00000002,//output gain
1097 0x000013d9,//input gain
1098 0x00ebd477, 0xff4ce383, 0x0042049d,
1099 0x0089c278, 0xff54414d, 0x00531ded,
1100 0x004a5e07, 0xff53cf41, 0x006efbdc,
1101 0x00000002,//output gain
1114 0x00001685,//input gain
1115 0x00f53ae9, 0xff52f196, 0x003e3e08,
1116 0x00b9f857, 0xff5d8985, 0x0050070a,
1117 0x008c3e86, 0xff6053f0, 0x006d98ef,
1118 0x00000001//output gain
1121 static u32 coef_24to48
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1123 0x0001d727,//input gain
1124 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1125 0x00e55557, 0xffcadd5b, 0x003d80ba,
1126 0x00d13397, 0xfff232f8, 0x00683337,
1127 0x00000002//output gain
1130 static u32 coef_24to88
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1132 0x0001d727,//input gain
1133 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1134 0x00e55557, 0xffcadd5b, 0x003d80ba,
1135 0x00d13397, 0xfff232f8, 0x00683337,
1136 0x00000002,//output gain
1138 0x000013d9,//input gain
1139 0x00ebd477, 0xff4ce383, 0x0042049d,
1140 0x0089c278, 0xff54414d, 0x00531ded,
1141 0x004a5e07, 0xff53cf41, 0x006efbdc,
1142 0x00000002,//output gain
1144 0x0000010a,//input gain
1145 0x00c93dc4, 0xff26f5f6, 0x005d1041,
1146 0x001002c4, 0xff245b76, 0x00666002,
1147 0xffc30a45, 0xff1baecd, 0x00765921,
1148 0x00000002,//output gain
1161 0x00000138,//input gain
1162 0x00d5d232, 0xff2a3bf8, 0x005a785c,
1163 0x0034001b, 0xff283109, 0x006462a6,
1164 0xffe6746a, 0xff1fb09c, 0x00758a91,
1165 0x00000001//output gain
1168 static u32 coef_24to96
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1170 0x0001d727,//input gain
1171 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1172 0x00e55557, 0xffcadd5b, 0x003d80ba,
1173 0x00d13397, 0xfff232f8, 0x00683337,
1174 0x00000002,//output gain
1176 0x000013d9,//input gain
1177 0x00ebd477, 0xff4ce383, 0x0042049d,
1178 0x0089c278, 0xff54414d, 0x00531ded,
1179 0x004a5e07, 0xff53cf41, 0x006efbdc,
1180 0x00000002//output gain
1183 static u32 coef_24to176
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1185 0x0001d727,//input gain
1186 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1187 0x00e55557, 0xffcadd5b, 0x003d80ba,
1188 0x00d13397, 0xfff232f8, 0x00683337,
1189 0x00000002,//output gain
1191 0x000013d9,//input gain
1192 0x00ebd477, 0xff4ce383, 0x0042049d,
1193 0x0089c278, 0xff54414d, 0x00531ded,
1194 0x004a5e07, 0xff53cf41, 0x006efbdc,
1195 0x00000002,//output gain
1197 0x0000010a,//input gain
1198 0x00c93dc4, 0xff26f5f6, 0x005d1041,
1199 0x001002c4, 0xff245b76, 0x00666002,
1200 0xffc30a45, 0xff1baecd, 0x00765921,
1201 0x00000002,//output gain
1215 static u32 coef_24to192
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1217 0x0001d727,//input gain
1218 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1219 0x00e55557, 0xffcadd5b, 0x003d80ba,
1220 0x00d13397, 0xfff232f8, 0x00683337,
1221 0x00000002,//output gain
1223 0x000013d9,//input gain
1224 0x00ebd477, 0xff4ce383, 0x0042049d,
1225 0x0089c278, 0xff54414d, 0x00531ded,
1226 0x004a5e07, 0xff53cf41, 0x006efbdc,
1227 0x00000002,//output gain
1229 0x0000010a,//input gain
1230 0x00c93dc4, 0xff26f5f6, 0x005d1041,
1231 0x001002c4, 0xff245b76, 0x00666002,
1232 0xffc30a45, 0xff1baecd, 0x00765921,
1233 0x00000002//output gain
1236 static u32 coef_32to8
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1238 0x000013d9,//input gain
1239 0x00ebd477, 0xff4ce383, 0x0042049d,
1240 0x0089c278, 0xff54414d, 0x00531ded,
1241 0x004a5e07, 0xff53cf41, 0x006efbdc,
1242 0x00000001,//output gain
1244 0x0001d727,//input gain
1245 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1246 0x00e55557, 0xffcadd5b, 0x003d80ba,
1247 0x00d13397, 0xfff232f8, 0x00683337,
1248 0x00000001//output gain
1251 static u32 coef_32to11
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1253 0x000000af,//input gain
1254 0x00c65663, 0xff23d2ce, 0x005f97d6,
1255 0x00086ad6, 0xff20ec4f, 0x00683201,
1256 0xffbbbef6, 0xff184447, 0x00770963,
1257 0x00000003,//output gain
1270 0x000013d9,//input gain
1271 0x00ebd477, 0xff4ce383, 0x0042049d,
1272 0x0089c278, 0xff54414d, 0x00531ded,
1273 0x004a5e07, 0xff53cf41, 0x006efbdc,
1274 0x00000001//output gain
1277 static u32 coef_32to16
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1279 0x0001d727,//input gain
1280 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1281 0x00e55557, 0xffcadd5b, 0x003d80ba,
1282 0x00d13397, 0xfff232f8, 0x00683337,
1283 0x00000001//output gain
1286 static u32 coef_32to22
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1288 0x000001e0,//input gain
1289 0x00de44c0, 0xff380b7f, 0x004ffc73,
1290 0x00494b44, 0xff3d493a, 0x005908bf,
1291 0xffe9a3c8, 0xff425647, 0x006745f7,
1292 0xffc42d61, 0xff40a6c7, 0x00776709,
1293 0x00000003,//output gain
1306 0x0001d727,//input gain
1307 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1308 0x00e55557, 0xffcadd5b, 0x003d80ba,
1309 0x00d13397, 0xfff232f8, 0x00683337,
1310 0x00000001//output gain
1313 static u32 coef_32to24
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1315 0x000013d9,//input gain
1316 0x00ebd477, 0xff4ce383, 0x0042049d,
1317 0x0089c278, 0xff54414d, 0x00531ded,
1318 0x004a5e07, 0xff53cf41, 0x006efbdc,
1319 0x00000003,//output gain
1321 0x000013d9,//input gain
1322 0x00ebd477, 0xff4ce383, 0x0042049d,
1323 0x0089c278, 0xff54414d, 0x00531ded,
1324 0x004a5e07, 0xff53cf41, 0x006efbdc,
1325 0x00000001//output gain
1328 static u32 coef_32to44
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1330 0x0001d727,//input gain
1331 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1332 0x00e55557, 0xffcadd5b, 0x003d80ba,
1333 0x00d13397, 0xfff232f8, 0x00683337,
1334 0x00000002,//output gain
1336 0x000005d6,//input gain
1337 0x00c6543e, 0xff342935, 0x0052f116,
1338 0x000a1d78, 0xff3330c0, 0x005f88a3,
1339 0xffbee7c0, 0xff2b5ba5, 0x0073eb26,
1340 0x00000003,//output gain
1353 0x0000015f,//input gain
1354 0x00a7909c, 0xff241c71, 0x005f5e00,
1355 0xffca77f4, 0xff20dd50, 0x006855eb,
1356 0xff86c552, 0xff18137a, 0x00773648,
1357 0x00000001//output gain
1360 static u32 coef_32to48
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1362 0x00000292,//input gain
1363 0x00e4320a, 0xff41d2d9, 0x004911ac,
1364 0x005dd9e3, 0xff4c7d80, 0x0052103e,
1365 0xfff8ebef, 0xff5b6fab, 0x005f0a0d,
1366 0xffc4b414, 0xff68582c, 0x006b38e5,
1367 0xffabb861, 0xff704bec, 0x0074de52,
1368 0xffa19f4c, 0xff729059, 0x007c7e90,
1369 0x00000003,//output gain
1371 0x00000292,//input gain
1372 0x00e4320a, 0xff41d2d9, 0x004911ac,
1373 0x005dd9e3, 0xff4c7d80, 0x0052103e,
1374 0xfff8ebef, 0xff5b6fab, 0x005f0a0d,
1375 0xffc4b414, 0xff68582c, 0x006b38e5,
1376 0xffabb861, 0xff704bec, 0x0074de52,
1377 0xffa19f4c, 0xff729059, 0x007c7e90,
1378 0x00000001//output gain
1381 static u32 coef_32to88
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1383 0x0001d727,//input gain
1384 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1385 0x00e55557, 0xffcadd5b, 0x003d80ba,
1386 0x00d13397, 0xfff232f8, 0x00683337,
1387 0x00000002,//output gain
1389 0x000005d6,//input gain
1390 0x00c6543e, 0xff342935, 0x0052f116,
1391 0x000a1d78, 0xff3330c0, 0x005f88a3,
1392 0xffbee7c0, 0xff2b5ba5, 0x0073eb26,
1393 0x00000003,//output gain
1406 0x000005f3,//input gain
1407 0x00d816d6, 0xff385383, 0x004fe566,
1408 0x003c548d, 0xff38c23d, 0x005d0b1c,
1409 0xfff02f7d, 0xff31e983, 0x0072d65d,
1410 0x00000001//output gain
1413 static u32 coef_32to96
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1415 0x00000292,//input gain
1416 0x00e4320a, 0xff41d2d9, 0x004911ac,
1417 0x005dd9e3, 0xff4c7d80, 0x0052103e,
1418 0xfff8ebef, 0xff5b6fab, 0x005f0a0d,
1419 0xffc4b414, 0xff68582c, 0x006b38e5,
1420 0xffabb861, 0xff704bec, 0x0074de52,
1421 0xffa19f4c, 0xff729059, 0x007c7e90,
1422 0x00000003//output gain
1425 static u32 coef_32to176
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1427 0x0001d727,//input gain
1428 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1429 0x00e55557, 0xffcadd5b, 0x003d80ba,
1430 0x00d13397, 0xfff232f8, 0x00683337,
1431 0x00000002,//output gain
1433 0x000005d6,//input gain
1434 0x00c6543e, 0xff342935, 0x0052f116,
1435 0x000a1d78, 0xff3330c0, 0x005f88a3,
1436 0xffbee7c0, 0xff2b5ba5, 0x0073eb26,
1437 0x00000003,//output gain
1451 static u32 coef_32to192
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1453 0x0001d727,//input gain
1454 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1455 0x00e55557, 0xffcadd5b, 0x003d80ba,
1456 0x00d13397, 0xfff232f8, 0x00683337,
1457 0x00000002,//output gain
1459 0x000005d6,//input gain
1460 0x00c6543e, 0xff342935, 0x0052f116,
1461 0x000a1d78, 0xff3330c0, 0x005f88a3,
1462 0xffbee7c0, 0xff2b5ba5, 0x0073eb26,
1463 0x00000003//output gain
1466 static u32 coef_44to8
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1467 0x00120104,//IIR Filter
1468 0x00000af2,//input gain
1469 0x0057eebe, 0xff1e9863, 0x00652604,
1470 0xff7206ea, 0xff22ad7e, 0x006d47e1,
1471 0xff42a4d7, 0xff26e722, 0x0075fd83,
1472 0xff352f66, 0xff29312b, 0x007b986b,
1473 0xff310a07, 0xff296f51, 0x007eca7c,
1474 0x00000001,//output gain
1475 0x001d9204,//Farrow Filter + decimation
1486 0x00005105,//IIR Filter + Decimator
1487 0x0000d649,//input gain
1488 0x00e87afb, 0xff5f69d0, 0x003df3cf,
1489 0x007ce488, 0xff99a5c8, 0x0056a6a0,
1490 0x00344928, 0xffcba3e5, 0x006be470,
1491 0x00137aa7, 0xffe60276, 0x00773410,
1492 0x0005fa2a, 0xfff1ac11, 0x007c795b,
1493 0x00012d36, 0xfff5eca2, 0x007f10ef,
1494 0x00000001//output gain
1497 static u32 coef_44to11
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1499 0x000013d9,//input gain
1500 0x00ebd477, 0xff4ce383, 0x0042049d,
1501 0x0089c278, 0xff54414d, 0x00531ded,
1502 0x004a5e07, 0xff53cf41, 0x006efbdc,
1503 0x00000001,//output gain
1505 0x0001d727,//input gain
1506 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1507 0x00e55557, 0xffcadd5b, 0x003d80ba,
1508 0x00d13397, 0xfff232f8, 0x00683337,
1509 0x00000001//output gain
1512 static u32 coef_44to16
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1513 0x00126104,//IIR Filter + interpolation
1514 0x00000af2,//input gain
1515 0x0057eebe, 0xff1e9863, 0x00652604,
1516 0xff7206ea, 0xff22ad7e, 0x006d47e1,
1517 0xff42a4d7, 0xff26e722, 0x0075fd83,
1518 0xff352f66, 0xff29312b, 0x007b986b,
1519 0xff310a07, 0xff296f51, 0x007eca7c,
1520 0x00000002,//output gain
1521 0x001d9204,//Farrow Filter + decimation
1532 0x00005105,//IIR Filter + Decimator
1533 0x0000d649,//input gain
1534 0x00e87afb, 0xff5f69d0, 0x003df3cf,
1535 0x007ce488, 0xff99a5c8, 0x0056a6a0,
1536 0x00344928, 0xffcba3e5, 0x006be470,
1537 0x00137aa7, 0xffe60276, 0x00773410,
1538 0x0005fa2a, 0xfff1ac11, 0x007c795b,
1539 0x00012d36, 0xfff5eca2, 0x007f10ef,
1540 0x00000001//output gain
1543 static u32 coef_44to22
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1545 0x0001d727,//input gain
1546 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1547 0x00e55557, 0xffcadd5b, 0x003d80ba,
1548 0x00d13397, 0xfff232f8, 0x00683337,
1549 0x00000001//output gain
1552 static u32 coef_44to24
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1554 0x00001685,//input gain
1555 0x00f53ae9, 0xff52f196, 0x003e3e08,
1556 0x00b9f857, 0xff5d8985, 0x0050070a,
1557 0x008c3e86, 0xff6053f0, 0x006d98ef,
1558 0x00000002,//output gain
1571 0x0001d727,//input gain
1572 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1573 0x00e55557, 0xffcadd5b, 0x003d80ba,
1574 0x00d13397, 0xfff232f8, 0x00683337,
1575 0x00000001//output gain
1578 static u32 coef_44to32
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1580 0x0000015f,//input gain
1581 0x00a7909c, 0xff241c71, 0x005f5e00,
1582 0xffca77f4, 0xff20dd50, 0x006855eb,
1583 0xff86c552, 0xff18137a, 0x00773648,
1584 0x00000002,//output gain
1586 0x000005f3,//input gain
1587 0x00d816d6, 0xff385383, 0x004fe566,
1588 0x003c548d, 0xff38c23d, 0x005d0b1c,
1589 0xfff02f7d, 0xff31e983, 0x0072d65d,
1590 0x00000002,//output gain
1603 0x0001d727,//input gain
1604 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1605 0x00e55557, 0xffcadd5b, 0x003d80ba,
1606 0x00d13397, 0xfff232f8, 0x00683337,
1607 0x00000001//output gain
1610 static u32 coef_44to48
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1612 0x0001d727,//input gain
1613 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1614 0x00e55557, 0xffcadd5b, 0x003d80ba,
1615 0x00d13397, 0xfff232f8, 0x00683337,
1616 0x00000002,//output gain
1618 0x000013d9,//input gain
1619 0x00ebd477, 0xff4ce383, 0x0042049d,
1620 0x0089c278, 0xff54414d, 0x00531ded,
1621 0x004a5e07, 0xff53cf41, 0x006efbdc,
1622 0x00000002,//output gain
1635 0x0001d029,//input gain
1636 0x00f2a98b, 0xff92aa71, 0x001fcd16,
1637 0x00ae9004, 0xffb85140, 0x0041813a,
1638 0x007f8ed1, 0xffd585fc, 0x006a69e6,
1639 0x00000001//output gain
1642 static u32 coef_44to88
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1644 0x0001d727,//input gain
1645 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1646 0x00e55557, 0xffcadd5b, 0x003d80ba,
1647 0x00d13397, 0xfff232f8, 0x00683337,
1648 0x00000002//output gain
1651 static u32 coef_44to96
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1653 0x0001d727,//input gain
1654 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1655 0x00e55557, 0xffcadd5b, 0x003d80ba,
1656 0x00d13397, 0xfff232f8, 0x00683337,
1657 0x00000002,//output gain
1659 0x000013d9,//input gain
1660 0x00ebd477, 0xff4ce383, 0x0042049d,
1661 0x0089c278, 0xff54414d, 0x00531ded,
1662 0x004a5e07, 0xff53cf41, 0x006efbdc,
1663 0x00000002,//output gain
1677 static u32 coef_44to176
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1679 0x0001d727,//input gain
1680 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1681 0x00e55557, 0xffcadd5b, 0x003d80ba,
1682 0x00d13397, 0xfff232f8, 0x00683337,
1683 0x00000002,//output gain
1685 0x000013d9,//input gain
1686 0x00ebd477, 0xff4ce383, 0x0042049d,
1687 0x0089c278, 0xff54414d, 0x00531ded,
1688 0x004a5e07, 0xff53cf41, 0x006efbdc,
1689 0x00000002//output gain
1692 static u32 coef_44to192
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1694 0x0001d727,//input gain
1695 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1696 0x00e55557, 0xffcadd5b, 0x003d80ba,
1697 0x00d13397, 0xfff232f8, 0x00683337,
1698 0x00000002,//output gain
1700 0x000013d9,//input gain
1701 0x00ebd477, 0xff4ce383, 0x0042049d,
1702 0x0089c278, 0xff54414d, 0x00531ded,
1703 0x004a5e07, 0xff53cf41, 0x006efbdc,
1704 0x00000002,//output gain
1706 0x0000010a,//input gain
1707 0x00c93dc4, 0xff26f5f6, 0x005d1041,
1708 0x001002c4, 0xff245b76, 0x00666002,
1709 0xffc30a45, 0xff1baecd, 0x00765921,
1710 0x00000002,//output gain
1724 static u32 coef_48to8
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1725 0x000c9102,//IIR Filter + Decimator
1726 0x00000e00,//input gain
1727 0x00e2e000, 0xff6e1a00, 0x002aaa00,
1728 0x00610a00, 0xff5dda00, 0x003ccc00,
1729 0x00163a00, 0xff3c0400, 0x00633200,
1730 0x00000001,//output gain
1731 0x00005105,//IIR Filter + Decimator
1732 0x0000d649,//input gain
1733 0x00e87afb, 0xff5f69d0, 0x003df3cf,
1734 0x007ce488, 0xff99a5c8, 0x0056a6a0,
1735 0x00344928, 0xffcba3e5, 0x006be470,
1736 0x00137aa7, 0xffe60276, 0x00773410,
1737 0x0005fa2a, 0xfff1ac11, 0x007c795b,
1738 0x00012d36, 0xfff5eca2, 0x007f10ef,
1739 0x00000001//output gain
1742 static u32 coef_48to11
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1744 0x000000af,//input gain
1745 0x00c65663, 0xff23d2ce, 0x005f97d6,
1746 0x00086ad6, 0xff20ec4f, 0x00683201,
1747 0xffbbbef6, 0xff184447, 0x00770963,
1748 0x00000002,//output gain
1761 0x000013d9,//input gain
1762 0x00ebd477, 0xff4ce383, 0x0042049d,
1763 0x0089c278, 0xff54414d, 0x00531ded,
1764 0x004a5e07, 0xff53cf41, 0x006efbdc,
1765 0x00000001,//output gain
1767 0x0001d727,//input gain
1768 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1769 0x00e55557, 0xffcadd5b, 0x003d80ba,
1770 0x00d13397, 0xfff232f8, 0x00683337,
1771 0x00000001//output gain
1774 static u32 coef_48to16
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1775 0x00009105,//IIR Filter + Decimator
1776 0x00000784,//input gain
1777 0x00cc516e, 0xff2c9639, 0x005ad5b3,
1778 0x0013ad0d, 0xff3d4799, 0x0063ce75,
1779 0xffb6f398, 0xff5138d1, 0x006e9e1f,
1780 0xff9186e5, 0xff5f96a4, 0x0076a86e,
1781 0xff82089c, 0xff676b81, 0x007b9f8a,
1782 0xff7c48a5, 0xff6a31e7, 0x007ebb7b,
1783 0x00000001//output gain
1786 static u32 coef_48to22
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1788 0x000001e0,//input gain
1789 0x00de44c0, 0xff380b7f, 0x004ffc73,
1790 0x00494b44, 0xff3d493a, 0x005908bf,
1791 0xffe9a3c8, 0xff425647, 0x006745f7,
1792 0xffc42d61, 0xff40a6c7, 0x00776709,
1793 0x00000002,//output gain
1806 0x0001d727,//input gain
1807 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1808 0x00e55557, 0xffcadd5b, 0x003d80ba,
1809 0x00d13397, 0xfff232f8, 0x00683337,
1810 0x00000001//output gain
1813 static u32 coef_48to24
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1815 0x0001d727,//input gain
1816 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1817 0x00e55557, 0xffcadd5b, 0x003d80ba,
1818 0x00d13397, 0xfff232f8, 0x00683337,
1819 0x00000001//output gain
1822 static u32 coef_48to32
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1824 0x00000292,//input gain
1825 0x00e4320a, 0xff41d2d9, 0x004911ac,
1826 0x005dd9e3, 0xff4c7d80, 0x0052103e,
1827 0xfff8ebef, 0xff5b6fab, 0x005f0a0d,
1828 0xffc4b414, 0xff68582c, 0x006b38e5,
1829 0xffabb861, 0xff704bec, 0x0074de52,
1830 0xffa19f4c, 0xff729059, 0x007c7e90,
1831 0x00000002,//output gain
1833 0x00000292,//input gain
1834 0x00e4320a, 0xff41d2d9, 0x004911ac,
1835 0x005dd9e3, 0xff4c7d80, 0x0052103e,
1836 0xfff8ebef, 0xff5b6fab, 0x005f0a0d,
1837 0xffc4b414, 0xff68582c, 0x006b38e5,
1838 0xffabb861, 0xff704bec, 0x0074de52,
1839 0xffa19f4c, 0xff729059, 0x007c7e90,
1840 0x00000001//output gain
1843 static u32 coef_48to44
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1845 0x0001d029,//input gain
1846 0x00f2a98b, 0xff92aa71, 0x001fcd16,
1847 0x00ae9004, 0xffb85140, 0x0041813a,
1848 0x007f8ed1, 0xffd585fc, 0x006a69e6,
1849 0x00000002,//output gain
1851 0x000001e0,//input gain
1852 0x00de44c0, 0xff380b7f, 0x004ffc73,
1853 0x00494b44, 0xff3d493a, 0x005908bf,
1854 0xffe9a3c8, 0xff425647, 0x006745f7,
1855 0xffc42d61, 0xff40a6c7, 0x00776709,
1856 0x00000002,//output gain
1869 0x0001d727,//input gain
1870 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1871 0x00e55557, 0xffcadd5b, 0x003d80ba,
1872 0x00d13397, 0xfff232f8, 0x00683337,
1873 0x00000001//output gain
1876 static u32 coef_48to88
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1878 0x0001d727,//input gain
1879 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1880 0x00e55557, 0xffcadd5b, 0x003d80ba,
1881 0x00d13397, 0xfff232f8, 0x00683337,
1882 0x00000002,//output gain
1884 0x000013d9,//input gain
1885 0x00ebd477, 0xff4ce383, 0x0042049d,
1886 0x0089c278, 0xff54414d, 0x00531ded,
1887 0x004a5e07, 0xff53cf41, 0x006efbdc,
1888 0x00000002,//output gain
1901 0x00001685,//input gain
1902 0x00f53ae9, 0xff52f196, 0x003e3e08,
1903 0x00b9f857, 0xff5d8985, 0x0050070a,
1904 0x008c3e86, 0xff6053f0, 0x006d98ef,
1905 0x00000001//output gain
1908 static u32 coef_48to96
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1910 0x0001d727,//input gain
1911 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1912 0x00e55557, 0xffcadd5b, 0x003d80ba,
1913 0x00d13397, 0xfff232f8, 0x00683337,
1914 0x00000002//output gain
1917 static u32 coef_48to176
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1919 0x0001d727,//input gain
1920 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1921 0x00e55557, 0xffcadd5b, 0x003d80ba,
1922 0x00d13397, 0xfff232f8, 0x00683337,
1923 0x00000002,//output gain
1925 0x000013d9,//input gain
1926 0x00ebd477, 0xff4ce383, 0x0042049d,
1927 0x0089c278, 0xff54414d, 0x00531ded,
1928 0x004a5e07, 0xff53cf41, 0x006efbdc,
1929 0x00000002,//output gain
1931 0x0000010a,//input gain
1932 0x00c93dc4, 0xff26f5f6, 0x005d1041,
1933 0x001002c4, 0xff245b76, 0x00666002,
1934 0xffc30a45, 0xff1baecd, 0x00765921,
1935 0x00000002,//output gain
1948 0x00000138,//input gain
1949 0x00d5d232, 0xff2a3bf8, 0x005a785c,
1950 0x0034001b, 0xff283109, 0x006462a6,
1951 0xffe6746a, 0xff1fb09c, 0x00758a91,
1952 0x00000001//output gain
1955 static u32 coef_48to192
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1957 0x0001d727,//input gain
1958 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1959 0x00e55557, 0xffcadd5b, 0x003d80ba,
1960 0x00d13397, 0xfff232f8, 0x00683337,
1961 0x00000002,//output gain
1963 0x000013d9,//input gain
1964 0x00ebd477, 0xff4ce383, 0x0042049d,
1965 0x0089c278, 0xff54414d, 0x00531ded,
1966 0x004a5e07, 0xff53cf41, 0x006efbdc,
1967 0x00000002//output gain
1970 static u32 coef_88to8
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
1972 0x00000057,//input gain
1973 0x00a8e717, 0xff1c748d, 0x0065b976,
1974 0xffcbccab, 0xff190aff, 0x006cc1cf,
1975 0xff871ce1, 0xff10d878, 0x0078cfc5,
1976 0x00000001,//output gain
1989 0x000013d9,//input gain
1990 0x00ebd477, 0xff4ce383, 0x0042049d,
1991 0x0089c278, 0xff54414d, 0x00531ded,
1992 0x004a5e07, 0xff53cf41, 0x006efbdc,
1993 0x00000001,//output gain
1995 0x0001d727,//input gain
1996 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
1997 0x00e55557, 0xffcadd5b, 0x003d80ba,
1998 0x00d13397, 0xfff232f8, 0x00683337,
1999 0x00000001//output gain
2002 static u32 coef_88to11
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2004 0x0000010a,//input gain
2005 0x00c93dc4, 0xff26f5f6, 0x005d1041,
2006 0x001002c4, 0xff245b76, 0x00666002,
2007 0xffc30a45, 0xff1baecd, 0x00765921,
2008 0x00000001,//output gain
2010 0x000013d9,//input gain
2011 0x00ebd477, 0xff4ce383, 0x0042049d,
2012 0x0089c278, 0xff54414d, 0x00531ded,
2013 0x004a5e07, 0xff53cf41, 0x006efbdc,
2014 0x00000001,//output gain
2016 0x0001d727,//input gain
2017 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
2018 0x00e55557, 0xffcadd5b, 0x003d80ba,
2019 0x00d13397, 0xfff232f8, 0x00683337,
2020 0x00000001//output gain
2023 static u32 coef_88to16
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2025 0x000005f3,//input gain
2026 0x00d816d6, 0xff385383, 0x004fe566,
2027 0x003c548d, 0xff38c23d, 0x005d0b1c,
2028 0xfff02f7d, 0xff31e983, 0x0072d65d,
2029 0x00000001,//output gain
2042 0x0001d727,//input gain
2043 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
2044 0x00e55557, 0xffcadd5b, 0x003d80ba,
2045 0x00d13397, 0xfff232f8, 0x00683337,
2046 0x00000001//output gain
2049 static u32 coef_88to22
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2051 0x000013d9,//input gain
2052 0x00ebd477, 0xff4ce383, 0x0042049d,
2053 0x0089c278, 0xff54414d, 0x00531ded,
2054 0x004a5e07, 0xff53cf41, 0x006efbdc,
2055 0x00000001,//output gain
2057 0x0001d727,//input gain
2058 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
2059 0x00e55557, 0xffcadd5b, 0x003d80ba,
2060 0x00d13397, 0xfff232f8, 0x00683337,
2061 0x00000001//output gain
2064 static u32 coef_88to24
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2066 0x00001685,//input gain
2067 0x00f53ae9, 0xff52f196, 0x003e3e08,
2068 0x00b9f857, 0xff5d8985, 0x0050070a,
2069 0x008c3e86, 0xff6053f0, 0x006d98ef,
2070 0x00000001,//output gain
2083 0x0001d727,//input gain
2084 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
2085 0x00e55557, 0xffcadd5b, 0x003d80ba,
2086 0x00d13397, 0xfff232f8, 0x00683337,
2087 0x00000001//output gain
2090 static u32 coef_88to32
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2092 0x000005f3,//input gain
2093 0x00d816d6, 0xff385383, 0x004fe566,
2094 0x003c548d, 0xff38c23d, 0x005d0b1c,
2095 0xfff02f7d, 0xff31e983, 0x0072d65d,
2096 0x00000002,//output gain
2109 0x0001d727,//input gain
2110 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
2111 0x00e55557, 0xffcadd5b, 0x003d80ba,
2112 0x00d13397, 0xfff232f8, 0x00683337,
2113 0x00000001//output gain
2116 static u32 coef_88to44
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2118 0x0001d727,//input gain
2119 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
2120 0x00e55557, 0xffcadd5b, 0x003d80ba,
2121 0x00d13397, 0xfff232f8, 0x00683337,
2122 0x00000001//output gain
2125 static u32 coef_88to48
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2127 0x00001685,//input gain
2128 0x00f53ae9, 0xff52f196, 0x003e3e08,
2129 0x00b9f857, 0xff5d8985, 0x0050070a,
2130 0x008c3e86, 0xff6053f0, 0x006d98ef,
2131 0x00000002,//output gain
2144 0x0001d727,//input gain
2145 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
2146 0x00e55557, 0xffcadd5b, 0x003d80ba,
2147 0x00d13397, 0xfff232f8, 0x00683337,
2148 0x00000001//output gain
2151 static u32 coef_88to96
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2153 0x000013d9,//input gain
2154 0x00ebd477, 0xff4ce383, 0x0042049d,
2155 0x0089c278, 0xff54414d, 0x00531ded,
2156 0x004a5e07, 0xff53cf41, 0x006efbdc,
2157 0x00000002,//output gain
2171 static u32 coef_88to176
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2173 0x000013d9,//input gain
2174 0x00ebd477, 0xff4ce383, 0x0042049d,
2175 0x0089c278, 0xff54414d, 0x00531ded,
2176 0x004a5e07, 0xff53cf41, 0x006efbdc,
2177 0x00000002//output gain
2180 static u32 coef_88to192
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2182 0x000013d9,//input gain
2183 0x00ebd477, 0xff4ce383, 0x0042049d,
2184 0x0089c278, 0xff54414d, 0x00531ded,
2185 0x004a5e07, 0xff53cf41, 0x006efbdc,
2186 0x00000002,//output gain
2188 0x0000010a,//input gain
2189 0x00c93dc4, 0xff26f5f6, 0x005d1041,
2190 0x001002c4, 0xff245b76, 0x00666002,
2191 0xffc30a45, 0xff1baecd, 0x00765921,
2192 0x00000002,//output gain
2206 static u32 coef_96to8
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2208 0x0000007d,//input gain
2209 0x007d1f20, 0xff1a540e, 0x00678bf9,
2210 0xff916625, 0xff16b0ff, 0x006e433a,
2211 0xff5af660, 0xff0eb91f, 0x00797356,
2212 0x00000001,//output gain
2214 0x000013d9,//input gain
2215 0x00ebd477, 0xff4ce383, 0x0042049d,
2216 0x0089c278, 0xff54414d, 0x00531ded,
2217 0x004a5e07, 0xff53cf41, 0x006efbdc,
2218 0x00000001,//output gain
2220 0x0001d727,//input gain
2221 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
2222 0x00e55557, 0xffcadd5b, 0x003d80ba,
2223 0x00d13397, 0xfff232f8, 0x00683337,
2224 0x00000001//output gain
2227 static u32 coef_96to11
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2229 0x000000af,//input gain
2230 0x00c65663, 0xff23d2ce, 0x005f97d6,
2231 0x00086ad6, 0xff20ec4f, 0x00683201,
2232 0xffbbbef6, 0xff184447, 0x00770963,
2233 0x00000001,//output gain
2246 0x000013d9,//input gain
2247 0x00ebd477, 0xff4ce383, 0x0042049d,
2248 0x0089c278, 0xff54414d, 0x00531ded,
2249 0x004a5e07, 0xff53cf41, 0x006efbdc,
2250 0x00000001,//output gain
2252 0x0001d727,//input gain
2253 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
2254 0x00e55557, 0xffcadd5b, 0x003d80ba,
2255 0x00d13397, 0xfff232f8, 0x00683337,
2256 0x00000001//output gain
2259 static u32 coef_96to16
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2261 0x000005d6,//input gain
2262 0x00c6543e, 0xff342935, 0x0052f116,
2263 0x000a1d78, 0xff3330c0, 0x005f88a3,
2264 0xffbee7c0, 0xff2b5ba5, 0x0073eb26,
2265 0x00000001,//output gain
2267 0x0001d727,//input gain
2268 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
2269 0x00e55557, 0xffcadd5b, 0x003d80ba,
2270 0x00d13397, 0xfff232f8, 0x00683337,
2271 0x00000001//output gain
2274 static u32 coef_96to22
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2276 0x000000af,//input gain
2277 0x00c65663, 0xff23d2ce, 0x005f97d6,
2278 0x00086ad6, 0xff20ec4f, 0x00683201,
2279 0xffbbbef6, 0xff184447, 0x00770963,
2280 0x00000002,//output gain
2293 0x000013d9,//input gain
2294 0x00ebd477, 0xff4ce383, 0x0042049d,
2295 0x0089c278, 0xff54414d, 0x00531ded,
2296 0x004a5e07, 0xff53cf41, 0x006efbdc,
2297 0x00000001,//output gain
2299 0x0001d727,//input gain
2300 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
2301 0x00e55557, 0xffcadd5b, 0x003d80ba,
2302 0x00d13397, 0xfff232f8, 0x00683337,
2303 0x00000001//output gain
2306 static u32 coef_96to24
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2308 0x000013d9,//input gain
2309 0x00ebd477, 0xff4ce383, 0x0042049d,
2310 0x0089c278, 0xff54414d, 0x00531ded,
2311 0x004a5e07, 0xff53cf41, 0x006efbdc,
2312 0x00000001,//output gain
2314 0x0001d727,//input gain
2315 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
2316 0x00e55557, 0xffcadd5b, 0x003d80ba,
2317 0x00d13397, 0xfff232f8, 0x00683337,
2318 0x00000001//output gain
2321 static u32 coef_96to32
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2323 0x00000292,//input gain
2324 0x00e4320a, 0xff41d2d9, 0x004911ac,
2325 0x005dd9e3, 0xff4c7d80, 0x0052103e,
2326 0xfff8ebef, 0xff5b6fab, 0x005f0a0d,
2327 0xffc4b414, 0xff68582c, 0x006b38e5,
2328 0xffabb861, 0xff704bec, 0x0074de52,
2329 0xffa19f4c, 0xff729059, 0x007c7e90,
2330 0x00000001//output gain
2333 static u32 coef_96to44
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2335 0x000001e0,//input gain
2336 0x00de44c0, 0xff380b7f, 0x004ffc73,
2337 0x00494b44, 0xff3d493a, 0x005908bf,
2338 0xffe9a3c8, 0xff425647, 0x006745f7,
2339 0xffc42d61, 0xff40a6c7, 0x00776709,
2340 0x00000002,//output gain
2353 0x0001d727,//input gain
2354 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
2355 0x00e55557, 0xffcadd5b, 0x003d80ba,
2356 0x00d13397, 0xfff232f8, 0x00683337,
2357 0x00000001//output gain
2360 static u32 coef_96to48
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2362 0x0001d727,//input gain
2363 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
2364 0x00e55557, 0xffcadd5b, 0x003d80ba,
2365 0x00d13397, 0xfff232f8, 0x00683337,
2366 0x00000001//output gain
2369 static u32 coef_96to88
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2371 0x000001e0,//input gain
2372 0x00de44c0, 0xff380b7f, 0x004ffc73,
2373 0x00494b44, 0xff3d493a, 0x005908bf,
2374 0xffe9a3c8, 0xff425647, 0x006745f7,
2375 0xffc42d61, 0xff40a6c7, 0x00776709,
2376 0x00000002,//output gain
2389 0x000013d9,//input gain
2390 0x00ebd477, 0xff4ce383, 0x0042049d,
2391 0x0089c278, 0xff54414d, 0x00531ded,
2392 0x004a5e07, 0xff53cf41, 0x006efbdc,
2393 0x00000001//output gain
2396 static u32 coef_96to176
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2398 0x000001e0,//input gain
2399 0x00de44c0, 0xff380b7f, 0x004ffc73,
2400 0x00494b44, 0xff3d493a, 0x005908bf,
2401 0xffe9a3c8, 0xff425647, 0x006745f7,
2402 0xffc42d61, 0xff40a6c7, 0x00776709,
2403 0x00000002,//output gain
2405 0x000000af,//input gain
2406 0x00c65663, 0xff23d2ce, 0x005f97d6,
2407 0x00086ad6, 0xff20ec4f, 0x00683201,
2408 0xffbbbef6, 0xff184447, 0x00770963,
2409 0x00000002,//output gain
2422 0x0000010a,//input gain
2423 0x00c93dc4, 0xff26f5f6, 0x005d1041,
2424 0x001002c4, 0xff245b76, 0x00666002,
2425 0xffc30a45, 0xff1baecd, 0x00765921,
2426 0x00000001//output gain
2429 static u32 coef_96to192
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2431 0x000001e0,//input gain
2432 0x00de44c0, 0xff380b7f, 0x004ffc73,
2433 0x00494b44, 0xff3d493a, 0x005908bf,
2434 0xffe9a3c8, 0xff425647, 0x006745f7,
2435 0xffc42d61, 0xff40a6c7, 0x00776709,
2436 0x00000002//output gain
2439 static u32 coef_176to16
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2441 0x00000057,//input gain
2442 0x00a8e717, 0xff1c748d, 0x0065b976,
2443 0xffcbccab, 0xff190aff, 0x006cc1cf,
2444 0xff871ce1, 0xff10d878, 0x0078cfc5,
2445 0x00000001,//output gain
2458 0x000013d9,//input gain
2459 0x00ebd477, 0xff4ce383, 0x0042049d,
2460 0x0089c278, 0xff54414d, 0x00531ded,
2461 0x004a5e07, 0xff53cf41, 0x006efbdc,
2462 0x00000001,//output gain
2464 0x0001d727,//input gain
2465 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
2466 0x00e55557, 0xffcadd5b, 0x003d80ba,
2467 0x00d13397, 0xfff232f8, 0x00683337,
2468 0x00000001//output gain
2471 static u32 coef_176to22
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2473 0x0000010a,//input gain
2474 0x00c93dc4, 0xff26f5f6, 0x005d1041,
2475 0x001002c4, 0xff245b76, 0x00666002,
2476 0xffc30a45, 0xff1baecd, 0x00765921,
2477 0x00000001,//output gain
2479 0x000013d9,//input gain
2480 0x00ebd477, 0xff4ce383, 0x0042049d,
2481 0x0089c278, 0xff54414d, 0x00531ded,
2482 0x004a5e07, 0xff53cf41, 0x006efbdc,
2483 0x00000001,//output gain
2485 0x0001d727,//input gain
2486 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
2487 0x00e55557, 0xffcadd5b, 0x003d80ba,
2488 0x00d13397, 0xfff232f8, 0x00683337,
2489 0x00000001//output gain
2492 static u32 coef_176to24
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2494 0x00000138,//input gain
2495 0x00d5d232, 0xff2a3bf8, 0x005a785c,
2496 0x0034001b, 0xff283109, 0x006462a6,
2497 0xffe6746a, 0xff1fb09c, 0x00758a91,
2498 0x00000001,//output gain
2511 0x000013d9,//input gain
2512 0x00ebd477, 0xff4ce383, 0x0042049d,
2513 0x0089c278, 0xff54414d, 0x00531ded,
2514 0x004a5e07, 0xff53cf41, 0x006efbdc,
2515 0x00000001,//output gain
2517 0x0001d727,//input gain
2518 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
2519 0x00e55557, 0xffcadd5b, 0x003d80ba,
2520 0x00d13397, 0xfff232f8, 0x00683337,
2521 0x00000001//output gain
2524 static u32 coef_176to32
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2526 0x000005f3,//input gain
2527 0x00d816d6, 0xff385383, 0x004fe566,
2528 0x003c548d, 0xff38c23d, 0x005d0b1c,
2529 0xfff02f7d, 0xff31e983, 0x0072d65d,
2530 0x00000001,//output gain
2543 0x0001d727,//input gain
2544 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
2545 0x00e55557, 0xffcadd5b, 0x003d80ba,
2546 0x00d13397, 0xfff232f8, 0x00683337,
2547 0x00000001//output gain
2550 static u32 coef_176to44
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2552 0x000013d9,//input gain
2553 0x00ebd477, 0xff4ce383, 0x0042049d,
2554 0x0089c278, 0xff54414d, 0x00531ded,
2555 0x004a5e07, 0xff53cf41, 0x006efbdc,
2556 0x00000001,//output gain
2558 0x0001d727,//input gain
2559 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
2560 0x00e55557, 0xffcadd5b, 0x003d80ba,
2561 0x00d13397, 0xfff232f8, 0x00683337,
2562 0x00000001//output gain
2565 static u32 coef_176to48
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2567 0x00001685,//input gain
2568 0x00f53ae9, 0xff52f196, 0x003e3e08,
2569 0x00b9f857, 0xff5d8985, 0x0050070a,
2570 0x008c3e86, 0xff6053f0, 0x006d98ef,
2571 0x00000001,//output gain
2584 0x0001d727,//input gain
2585 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
2586 0x00e55557, 0xffcadd5b, 0x003d80ba,
2587 0x00d13397, 0xfff232f8, 0x00683337,
2588 0x00000001//output gain
2591 static u32 coef_176to88
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2593 0x000013d9,//input gain
2594 0x00ebd477, 0xff4ce383, 0x0042049d,
2595 0x0089c278, 0xff54414d, 0x00531ded,
2596 0x004a5e07, 0xff53cf41, 0x006efbdc,
2597 0x00000001//output gain
2600 static u32 coef_176to96
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2602 0x0000010a,//input gain
2603 0x00c93dc4, 0xff26f5f6, 0x005d1041,
2604 0x001002c4, 0xff245b76, 0x00666002,
2605 0xffc30a45, 0xff1baecd, 0x00765921,
2606 0x00000002,//output gain
2619 0x000001e0,//input gain
2620 0x00de44c0, 0xff380b7f, 0x004ffc73,
2621 0x00494b44, 0xff3d493a, 0x005908bf,
2622 0xffe9a3c8, 0xff425647, 0x006745f7,
2623 0xffc42d61, 0xff40a6c7, 0x00776709,
2624 0x00000001//output gain
2627 static u32 coef_176to192
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2629 0x0000010a,//input gain
2630 0x00c93dc4, 0xff26f5f6, 0x005d1041,
2631 0x001002c4, 0xff245b76, 0x00666002,
2632 0xffc30a45, 0xff1baecd, 0x00765921,
2633 0x00000002,//output gain
2647 static u32 coef_192to16
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2649 0x0000007d,//input gain
2650 0x007d1f20, 0xff1a540e, 0x00678bf9,
2651 0xff916625, 0xff16b0ff, 0x006e433a,
2652 0xff5af660, 0xff0eb91f, 0x00797356,
2653 0x00000001,//output gain
2655 0x000013d9,//input gain
2656 0x00ebd477, 0xff4ce383, 0x0042049d,
2657 0x0089c278, 0xff54414d, 0x00531ded,
2658 0x004a5e07, 0xff53cf41, 0x006efbdc,
2659 0x00000001,//output gain
2661 0x0001d727,//input gain
2662 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
2663 0x00e55557, 0xffcadd5b, 0x003d80ba,
2664 0x00d13397, 0xfff232f8, 0x00683337,
2665 0x00000001//output gain
2668 static u32 coef_192to22
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2670 0x000000af,//input gain
2671 0x00c65663, 0xff23d2ce, 0x005f97d6,
2672 0x00086ad6, 0xff20ec4f, 0x00683201,
2673 0xffbbbef6, 0xff184447, 0x00770963,
2674 0x00000001,//output gain
2687 0x000013d9,//input gain
2688 0x00ebd477, 0xff4ce383, 0x0042049d,
2689 0x0089c278, 0xff54414d, 0x00531ded,
2690 0x004a5e07, 0xff53cf41, 0x006efbdc,
2691 0x00000001,//output gain
2693 0x0001d727,//input gain
2694 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
2695 0x00e55557, 0xffcadd5b, 0x003d80ba,
2696 0x00d13397, 0xfff232f8, 0x00683337,
2697 0x00000001//output gain
2700 static u32 coef_192to24
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2702 0x0000010a,//input gain
2703 0x00c93dc4, 0xff26f5f6, 0x005d1041,
2704 0x001002c4, 0xff245b76, 0x00666002,
2705 0xffc30a45, 0xff1baecd, 0x00765921,
2706 0x00000001,//output gain
2708 0x000013d9,//input gain
2709 0x00ebd477, 0xff4ce383, 0x0042049d,
2710 0x0089c278, 0xff54414d, 0x00531ded,
2711 0x004a5e07, 0xff53cf41, 0x006efbdc,
2712 0x00000001,//output gain
2714 0x0001d727,//input gain
2715 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
2716 0x00e55557, 0xffcadd5b, 0x003d80ba,
2717 0x00d13397, 0xfff232f8, 0x00683337,
2718 0x00000001//output gain
2721 static u32 coef_192to32
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2723 0x000005d6,//input gain
2724 0x00c6543e, 0xff342935, 0x0052f116,
2725 0x000a1d78, 0xff3330c0, 0x005f88a3,
2726 0xffbee7c0, 0xff2b5ba5, 0x0073eb26,
2727 0x00000001,//output gain
2729 0x0001d727,//input gain
2730 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
2731 0x00e55557, 0xffcadd5b, 0x003d80ba,
2732 0x00d13397, 0xfff232f8, 0x00683337,
2733 0x00000001//output gain
2736 static u32 coef_192to44
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2738 0x000000af,//input gain
2739 0x00c65663, 0xff23d2ce, 0x005f97d6,
2740 0x00086ad6, 0xff20ec4f, 0x00683201,
2741 0xffbbbef6, 0xff184447, 0x00770963,
2742 0x00000002,//output gain
2755 0x000013d9,//input gain
2756 0x00ebd477, 0xff4ce383, 0x0042049d,
2757 0x0089c278, 0xff54414d, 0x00531ded,
2758 0x004a5e07, 0xff53cf41, 0x006efbdc,
2759 0x00000001,//output gain
2761 0x0001d727,//input gain
2762 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
2763 0x00e55557, 0xffcadd5b, 0x003d80ba,
2764 0x00d13397, 0xfff232f8, 0x00683337,
2765 0x00000001//output gain
2768 static u32 coef_192to48
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2770 0x000013d9,//input gain
2771 0x00ebd477, 0xff4ce383, 0x0042049d,
2772 0x0089c278, 0xff54414d, 0x00531ded,
2773 0x004a5e07, 0xff53cf41, 0x006efbdc,
2774 0x00000001,//output gain
2776 0x0001d727,//input gain
2777 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
2778 0x00e55557, 0xffcadd5b, 0x003d80ba,
2779 0x00d13397, 0xfff232f8, 0x00683337,
2780 0x00000001//output gain
2783 static u32 coef_192to88
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2785 0x000000af,//input gain
2786 0x00c65663, 0xff23d2ce, 0x005f97d6,
2787 0x00086ad6, 0xff20ec4f, 0x00683201,
2788 0xffbbbef6, 0xff184447, 0x00770963,
2789 0x00000002,//output gain
2802 0x000013d9,//input gain
2803 0x00ebd477, 0xff4ce383, 0x0042049d,
2804 0x0089c278, 0xff54414d, 0x00531ded,
2805 0x004a5e07, 0xff53cf41, 0x006efbdc,
2806 0x00000001//output gain
2809 static u32 coef_192to96
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2811 0x000001e0,//input gain
2812 0x00de44c0, 0xff380b7f, 0x004ffc73,
2813 0x00494b44, 0xff3d493a, 0x005908bf,
2814 0xffe9a3c8, 0xff425647, 0x006745f7,
2815 0xffc42d61, 0xff40a6c7, 0x00776709,
2816 0x00000001//output gain
2819 static u32 coef_192to176
[TEGRA210_SFC_COEF_RAM_DEPTH
] = {
2821 0x000000af,//input gain
2822 0x00c65663, 0xff23d2ce, 0x005f97d6,
2823 0x00086ad6, 0xff20ec4f, 0x00683201,
2824 0xffbbbef6, 0xff184447, 0x00770963,
2825 0x00000002,//output gain
2838 0x0000010a,//input gain
2839 0x00c93dc4, 0xff26f5f6, 0x005d1041,
2840 0x001002c4, 0xff245b76, 0x00666002,
2841 0xffc30a45, 0xff1baecd, 0x00765921,
2842 0x00000001//output gain
2846 * Coefficient table for various sample rate conversions. The sample
2847 * rates available are as per tegra210_sfc_rates[].
2849 static s32
*coef_addr_table
[TEGRA210_SFC_NUM_RATES
][TEGRA210_SFC_NUM_RATES
] = {
2850 /* Convertions from 8 kHz */
2866 /* Convertions from 11.025 kHz */
2882 /* Convertions from 16 kHz */
2898 /* Convertions from 22.05 kHz */
2914 /* Convertions from 24 kHz */
2930 /* Convertions from 32 kHz */
2946 /* Convertions from 44.1 kHz */
2962 /* Convertions from 48 kHz */
2978 /* Convertions from 64 kHz */
2994 /* Convertions from 88.2 kHz */
3010 /* Convertions from 96 kHz */
3025 /* Convertions from 176.4 kHz */
3041 /* Convertions from 192 kHz */
3059 static int __maybe_unused
tegra210_sfc_runtime_suspend(struct device
*dev
)
3061 struct tegra210_sfc
*sfc
= dev_get_drvdata(dev
);
3063 regcache_cache_only(sfc
->regmap
, true);
3064 regcache_mark_dirty(sfc
->regmap
);
3069 static int __maybe_unused
tegra210_sfc_runtime_resume(struct device
*dev
)
3071 struct tegra210_sfc
*sfc
= dev_get_drvdata(dev
);
3073 regcache_cache_only(sfc
->regmap
, false);
3074 regcache_sync(sfc
->regmap
);
3079 static inline void tegra210_sfc_write_ram(struct regmap
*regmap
,
3084 regmap_write(regmap
, TEGRA210_SFC_CFG_RAM_CTRL
,
3085 TEGRA210_SFC_RAM_CTRL_SEQ_ACCESS_EN
|
3086 TEGRA210_SFC_RAM_CTRL_ADDR_INIT_EN
|
3087 TEGRA210_SFC_RAM_CTRL_RW_WRITE
);
3089 for (i
= 0; i
< TEGRA210_SFC_COEF_RAM_DEPTH
; i
++)
3090 regmap_write(regmap
, TEGRA210_SFC_CFG_RAM_DATA
, data
[i
]);
3093 static int tegra210_sfc_write_coeff_ram(struct snd_soc_component
*cmpnt
)
3095 struct tegra210_sfc
*sfc
= dev_get_drvdata(cmpnt
->dev
);
3099 if (sfc
->srate_in
== sfc
->srate_out
)
3102 coeff_ram
= coef_addr_table
[sfc
->srate_in
][sfc
->srate_out
];
3103 if (IS_ERR_OR_NULL(coeff_ram
)) {
3105 "Conversion from %d to %d Hz is not supported\n",
3106 sfc
->srate_in
, sfc
->srate_out
);
3108 return PTR_ERR_OR_ZERO(coeff_ram
);
3111 tegra210_sfc_write_ram(sfc
->regmap
, coeff_ram
);
3113 regmap_update_bits(sfc
->regmap
,
3114 TEGRA210_SFC_COEF_RAM
,
3115 TEGRA210_SFC_COEF_RAM_EN
,
3116 TEGRA210_SFC_COEF_RAM_EN
);
3121 static int tegra210_sfc_set_audio_cif(struct tegra210_sfc
*sfc
,
3122 struct snd_pcm_hw_params
*params
,
3125 unsigned int channels
, audio_bits
, path
;
3126 struct tegra_cif_conf cif_conf
;
3128 memset(&cif_conf
, 0, sizeof(struct tegra_cif_conf
));
3130 channels
= params_channels(params
);
3132 switch (params_format(params
)) {
3133 case SNDRV_PCM_FORMAT_S16_LE
:
3134 audio_bits
= TEGRA_ACIF_BITS_16
;
3136 case SNDRV_PCM_FORMAT_S24_LE
:
3137 case SNDRV_PCM_FORMAT_S32_LE
:
3138 audio_bits
= TEGRA_ACIF_BITS_32
;
3144 cif_conf
.audio_ch
= channels
;
3145 cif_conf
.client_ch
= channels
;
3146 cif_conf
.audio_bits
= audio_bits
;
3147 cif_conf
.client_bits
= TEGRA_ACIF_BITS_32
;
3149 if (reg
== TEGRA210_SFC_RX_CIF_CTRL
)
3154 cif_conf
.stereo_conv
= sfc
->stereo_to_mono
[path
];
3155 cif_conf
.mono_conv
= sfc
->mono_to_stereo
[path
];
3157 tegra_set_cif(sfc
->regmap
, reg
, &cif_conf
);
3162 static int tegra210_sfc_soft_reset(struct tegra210_sfc
*sfc
)
3167 * Soft Reset: Below performs module soft reset which clears
3168 * all FSM logic, flushes flow control of FIFO and resets the
3169 * state register. It also brings module back to disabled
3170 * state (without flushing the data in the pipe).
3172 regmap_update_bits(sfc
->regmap
, TEGRA210_SFC_SOFT_RESET
,
3173 TEGRA210_SFC_SOFT_RESET_EN
, 1);
3175 return regmap_read_poll_timeout(sfc
->regmap
,
3176 TEGRA210_SFC_SOFT_RESET
,
3178 !(val
& TEGRA210_SFC_SOFT_RESET_EN
),
3182 static int tegra210_sfc_rate_to_idx(struct device
*dev
, int rate
,
3187 for (i
= 0; i
< ARRAY_SIZE(tegra210_sfc_rates
); i
++) {
3188 if (rate
== tegra210_sfc_rates
[i
]) {
3195 dev_err(dev
, "Sample rate %d Hz is not supported\n", rate
);
3200 static int tegra210_sfc_startup(struct snd_pcm_substream
*substream
,
3201 struct snd_soc_dai
*dai
)
3203 struct tegra210_sfc
*sfc
= snd_soc_dai_get_drvdata(dai
);
3206 regmap_update_bits(sfc
->regmap
, TEGRA210_SFC_COEF_RAM
,
3207 TEGRA210_SFC_COEF_RAM_EN
, 0);
3209 err
= tegra210_sfc_soft_reset(sfc
);
3211 dev_err(dai
->dev
, "Failed to reset SFC in %s, err = %d\n",
3220 static int tegra210_sfc_in_hw_params(struct snd_pcm_substream
*substream
,
3221 struct snd_pcm_hw_params
*params
,
3222 struct snd_soc_dai
*dai
)
3224 struct tegra210_sfc
*sfc
= snd_soc_dai_get_drvdata(dai
);
3225 struct device
*dev
= dai
->dev
;
3228 err
= tegra210_sfc_rate_to_idx(dev
, params_rate(params
),
3233 err
= tegra210_sfc_set_audio_cif(sfc
, params
, TEGRA210_SFC_RX_CIF_CTRL
);
3235 dev_err(dev
, "Can't set SFC RX CIF: %d\n", err
);
3239 regmap_write(sfc
->regmap
, TEGRA210_SFC_RX_FREQ
, sfc
->srate_in
);
3244 static int tegra210_sfc_out_hw_params(struct snd_pcm_substream
*substream
,
3245 struct snd_pcm_hw_params
*params
,
3246 struct snd_soc_dai
*dai
)
3248 struct tegra210_sfc
*sfc
= snd_soc_dai_get_drvdata(dai
);
3249 struct device
*dev
= dai
->dev
;
3252 err
= tegra210_sfc_rate_to_idx(dev
, params_rate(params
),
3257 err
= tegra210_sfc_set_audio_cif(sfc
, params
, TEGRA210_SFC_TX_CIF_CTRL
);
3259 dev_err(dev
, "Can't set SFC TX CIF: %d\n", err
);
3263 regmap_write(sfc
->regmap
, TEGRA210_SFC_TX_FREQ
, sfc
->srate_out
);
3268 static int tegra210_sfc_init(struct snd_soc_dapm_widget
*w
,
3269 struct snd_kcontrol
*kcontrol
, int event
)
3271 struct snd_soc_component
*cmpnt
= snd_soc_dapm_to_component(w
->dapm
);
3273 return tegra210_sfc_write_coeff_ram(cmpnt
);
3276 static int tegra210_sfc_iget_stereo_to_mono(struct snd_kcontrol
*kcontrol
,
3277 struct snd_ctl_elem_value
*ucontrol
)
3279 struct snd_soc_component
*cmpnt
= snd_soc_kcontrol_component(kcontrol
);
3280 struct tegra210_sfc
*sfc
= snd_soc_component_get_drvdata(cmpnt
);
3282 ucontrol
->value
.enumerated
.item
[0] = sfc
->stereo_to_mono
[SFC_RX_PATH
];
3287 static int tegra210_sfc_iput_stereo_to_mono(struct snd_kcontrol
*kcontrol
,
3288 struct snd_ctl_elem_value
*ucontrol
)
3290 struct snd_soc_component
*cmpnt
= snd_soc_kcontrol_component(kcontrol
);
3291 struct tegra210_sfc
*sfc
= snd_soc_component_get_drvdata(cmpnt
);
3292 unsigned int value
= ucontrol
->value
.enumerated
.item
[0];
3294 if (value
== sfc
->stereo_to_mono
[SFC_RX_PATH
])
3297 sfc
->stereo_to_mono
[SFC_RX_PATH
] = value
;
3302 static int tegra210_sfc_iget_mono_to_stereo(struct snd_kcontrol
*kcontrol
,
3303 struct snd_ctl_elem_value
*ucontrol
)
3305 struct snd_soc_component
*cmpnt
= snd_soc_kcontrol_component(kcontrol
);
3306 struct tegra210_sfc
*sfc
= snd_soc_component_get_drvdata(cmpnt
);
3308 ucontrol
->value
.enumerated
.item
[0] = sfc
->mono_to_stereo
[SFC_RX_PATH
];
3313 static int tegra210_sfc_iput_mono_to_stereo(struct snd_kcontrol
*kcontrol
,
3314 struct snd_ctl_elem_value
*ucontrol
)
3316 struct snd_soc_component
*cmpnt
= snd_soc_kcontrol_component(kcontrol
);
3317 struct tegra210_sfc
*sfc
= snd_soc_component_get_drvdata(cmpnt
);
3318 unsigned int value
= ucontrol
->value
.enumerated
.item
[0];
3320 if (value
== sfc
->mono_to_stereo
[SFC_RX_PATH
])
3323 sfc
->mono_to_stereo
[SFC_RX_PATH
] = value
;
3328 static int tegra210_sfc_oget_stereo_to_mono(struct snd_kcontrol
*kcontrol
,
3329 struct snd_ctl_elem_value
*ucontrol
)
3331 struct snd_soc_component
*cmpnt
= snd_soc_kcontrol_component(kcontrol
);
3332 struct tegra210_sfc
*sfc
= snd_soc_component_get_drvdata(cmpnt
);
3334 ucontrol
->value
.enumerated
.item
[0] = sfc
->stereo_to_mono
[SFC_TX_PATH
];
3339 static int tegra210_sfc_oput_stereo_to_mono(struct snd_kcontrol
*kcontrol
,
3340 struct snd_ctl_elem_value
*ucontrol
)
3342 struct snd_soc_component
*cmpnt
= snd_soc_kcontrol_component(kcontrol
);
3343 struct tegra210_sfc
*sfc
= snd_soc_component_get_drvdata(cmpnt
);
3344 unsigned int value
= ucontrol
->value
.enumerated
.item
[0];
3346 if (value
== sfc
->stereo_to_mono
[SFC_TX_PATH
])
3349 sfc
->stereo_to_mono
[SFC_TX_PATH
] = value
;
3354 static int tegra210_sfc_oget_mono_to_stereo(struct snd_kcontrol
*kcontrol
,
3355 struct snd_ctl_elem_value
*ucontrol
)
3357 struct snd_soc_component
*cmpnt
= snd_soc_kcontrol_component(kcontrol
);
3358 struct tegra210_sfc
*sfc
= snd_soc_component_get_drvdata(cmpnt
);
3360 ucontrol
->value
.enumerated
.item
[0] = sfc
->mono_to_stereo
[SFC_TX_PATH
];
3365 static int tegra210_sfc_oput_mono_to_stereo(struct snd_kcontrol
*kcontrol
,
3366 struct snd_ctl_elem_value
*ucontrol
)
3368 struct snd_soc_component
*cmpnt
= snd_soc_kcontrol_component(kcontrol
);
3369 struct tegra210_sfc
*sfc
= snd_soc_component_get_drvdata(cmpnt
);
3370 unsigned int value
= ucontrol
->value
.enumerated
.item
[0];
3372 if (value
== sfc
->mono_to_stereo
[SFC_TX_PATH
])
3375 sfc
->mono_to_stereo
[SFC_TX_PATH
] = value
;
3380 static const struct snd_soc_dai_ops tegra210_sfc_in_dai_ops
= {
3381 .hw_params
= tegra210_sfc_in_hw_params
,
3382 .startup
= tegra210_sfc_startup
,
3385 static const struct snd_soc_dai_ops tegra210_sfc_out_dai_ops
= {
3386 .hw_params
= tegra210_sfc_out_hw_params
,
3389 static struct snd_soc_dai_driver tegra210_sfc_dais
[] = {
3391 .name
= "SFC-RX-CIF",
3393 .stream_name
= "RX-CIF-Playback",
3396 .rates
= SNDRV_PCM_RATE_8000_192000
,
3397 .formats
= SNDRV_PCM_FMTBIT_S8
|
3398 SNDRV_PCM_FMTBIT_S16_LE
|
3399 SNDRV_PCM_FMTBIT_S24_LE
|
3400 SNDRV_PCM_FMTBIT_S32_LE
,
3403 .stream_name
= "RX-CIF-Capture",
3406 .rates
= SNDRV_PCM_RATE_8000_192000
,
3407 .formats
= SNDRV_PCM_FMTBIT_S8
|
3408 SNDRV_PCM_FMTBIT_S16_LE
|
3409 SNDRV_PCM_FMTBIT_S24_LE
|
3410 SNDRV_PCM_FMTBIT_S32_LE
,
3412 .ops
= &tegra210_sfc_in_dai_ops
,
3415 .name
= "SFC-TX-CIF",
3417 .stream_name
= "TX-CIF-Playback",
3420 .rates
= SNDRV_PCM_RATE_8000_192000
,
3421 .formats
= SNDRV_PCM_FMTBIT_S8
|
3422 SNDRV_PCM_FMTBIT_S16_LE
|
3423 SNDRV_PCM_FMTBIT_S24_LE
|
3424 SNDRV_PCM_FMTBIT_S32_LE
,
3427 .stream_name
= "TX-CIF-Capture",
3430 .rates
= SNDRV_PCM_RATE_8000_192000
,
3431 .formats
= SNDRV_PCM_FMTBIT_S8
|
3432 SNDRV_PCM_FMTBIT_S16_LE
|
3433 SNDRV_PCM_FMTBIT_S24_LE
|
3434 SNDRV_PCM_FMTBIT_S32_LE
,
3436 .ops
= &tegra210_sfc_out_dai_ops
,
3440 static const struct snd_soc_dapm_widget tegra210_sfc_widgets
[] = {
3441 SND_SOC_DAPM_AIF_IN("RX", NULL
, 0, SND_SOC_NOPM
, 0, 0),
3442 SND_SOC_DAPM_AIF_OUT_E("TX", NULL
, 0, TEGRA210_SFC_ENABLE
,
3443 TEGRA210_SFC_EN_SHIFT
, 0,
3444 tegra210_sfc_init
, SND_SOC_DAPM_PRE_PMU
),
3447 #define RESAMPLE_ROUTE(sname) \
3448 { "RX XBAR-" sname, NULL, "XBAR-TX" }, \
3449 { "RX-CIF-" sname, NULL, "RX XBAR-" sname }, \
3450 { "RX", NULL, "RX-CIF-" sname }, \
3451 { "TX-CIF-" sname, NULL, "TX" }, \
3452 { "TX XBAR-" sname, NULL, "TX-CIF-" sname }, \
3453 { "XBAR-RX", NULL, "TX XBAR-" sname }
3455 static const struct snd_soc_dapm_route tegra210_sfc_routes
[] = {
3456 { "TX", NULL
, "RX" },
3457 RESAMPLE_ROUTE("Playback"),
3458 RESAMPLE_ROUTE("Capture"),
3461 static const char * const tegra210_sfc_stereo_conv_text
[] = {
3462 "CH0", "CH1", "AVG",
3465 static const char * const tegra210_sfc_mono_conv_text
[] = {
3469 static const struct soc_enum tegra210_sfc_stereo_conv_enum
=
3470 SOC_ENUM_SINGLE(SND_SOC_NOPM
, 0,
3471 ARRAY_SIZE(tegra210_sfc_stereo_conv_text
),
3472 tegra210_sfc_stereo_conv_text
);
3474 static const struct soc_enum tegra210_sfc_mono_conv_enum
=
3475 SOC_ENUM_SINGLE(SND_SOC_NOPM
, 0,
3476 ARRAY_SIZE(tegra210_sfc_mono_conv_text
),
3477 tegra210_sfc_mono_conv_text
);
3479 static const struct snd_kcontrol_new tegra210_sfc_controls
[] = {
3480 SOC_ENUM_EXT("Input Stereo To Mono", tegra210_sfc_stereo_conv_enum
,
3481 tegra210_sfc_iget_stereo_to_mono
,
3482 tegra210_sfc_iput_stereo_to_mono
),
3483 SOC_ENUM_EXT("Input Mono To Stereo", tegra210_sfc_mono_conv_enum
,
3484 tegra210_sfc_iget_mono_to_stereo
,
3485 tegra210_sfc_iput_mono_to_stereo
),
3486 SOC_ENUM_EXT("Output Stereo To Mono", tegra210_sfc_stereo_conv_enum
,
3487 tegra210_sfc_oget_stereo_to_mono
,
3488 tegra210_sfc_oput_stereo_to_mono
),
3489 SOC_ENUM_EXT("Output Mono To Stereo", tegra210_sfc_mono_conv_enum
,
3490 tegra210_sfc_oget_mono_to_stereo
,
3491 tegra210_sfc_oput_mono_to_stereo
),
3494 static const struct snd_soc_component_driver tegra210_sfc_cmpnt
= {
3495 .dapm_widgets
= tegra210_sfc_widgets
,
3496 .num_dapm_widgets
= ARRAY_SIZE(tegra210_sfc_widgets
),
3497 .dapm_routes
= tegra210_sfc_routes
,
3498 .num_dapm_routes
= ARRAY_SIZE(tegra210_sfc_routes
),
3499 .controls
= tegra210_sfc_controls
,
3500 .num_controls
= ARRAY_SIZE(tegra210_sfc_controls
),
3503 static bool tegra210_sfc_wr_reg(struct device
*dev
, unsigned int reg
)
3506 case TEGRA210_SFC_RX_INT_MASK
... TEGRA210_SFC_RX_FREQ
:
3507 case TEGRA210_SFC_TX_INT_MASK
... TEGRA210_SFC_TX_FREQ
:
3508 case TEGRA210_SFC_ENABLE
... TEGRA210_SFC_CG
:
3509 case TEGRA210_SFC_COEF_RAM
... TEGRA210_SFC_CFG_RAM_DATA
:
3516 static bool tegra210_sfc_rd_reg(struct device
*dev
, unsigned int reg
)
3519 case TEGRA210_SFC_RX_STATUS
... TEGRA210_SFC_RX_FREQ
:
3520 case TEGRA210_SFC_TX_STATUS
... TEGRA210_SFC_TX_FREQ
:
3521 case TEGRA210_SFC_ENABLE
... TEGRA210_SFC_INT_STATUS
:
3522 case TEGRA210_SFC_COEF_RAM
... TEGRA210_SFC_CFG_RAM_DATA
:
3529 static bool tegra210_sfc_volatile_reg(struct device
*dev
, unsigned int reg
)
3532 case TEGRA210_SFC_RX_STATUS
:
3533 case TEGRA210_SFC_RX_INT_STATUS
:
3534 case TEGRA210_SFC_RX_INT_SET
:
3536 case TEGRA210_SFC_TX_STATUS
:
3537 case TEGRA210_SFC_TX_INT_STATUS
:
3538 case TEGRA210_SFC_TX_INT_SET
:
3540 case TEGRA210_SFC_SOFT_RESET
:
3541 case TEGRA210_SFC_STATUS
:
3542 case TEGRA210_SFC_INT_STATUS
:
3543 case TEGRA210_SFC_CFG_RAM_CTRL
:
3544 case TEGRA210_SFC_CFG_RAM_DATA
:
3551 static bool tegra210_sfc_precious_reg(struct device
*dev
, unsigned int reg
)
3554 case TEGRA210_SFC_CFG_RAM_DATA
:
3561 static const struct regmap_config tegra210_sfc_regmap_config
= {
3565 .max_register
= TEGRA210_SFC_CFG_RAM_DATA
,
3566 .writeable_reg
= tegra210_sfc_wr_reg
,
3567 .readable_reg
= tegra210_sfc_rd_reg
,
3568 .volatile_reg
= tegra210_sfc_volatile_reg
,
3569 .precious_reg
= tegra210_sfc_precious_reg
,
3570 .reg_defaults
= tegra210_sfc_reg_defaults
,
3571 .num_reg_defaults
= ARRAY_SIZE(tegra210_sfc_reg_defaults
),
3572 .cache_type
= REGCACHE_FLAT
,
3575 static const struct of_device_id tegra210_sfc_of_match
[] = {
3576 { .compatible
= "nvidia,tegra210-sfc" },
3579 MODULE_DEVICE_TABLE(of
, tegra210_sfc_of_match
);
3581 static int tegra210_sfc_platform_probe(struct platform_device
*pdev
)
3583 struct device
*dev
= &pdev
->dev
;
3584 struct tegra210_sfc
*sfc
;
3588 sfc
= devm_kzalloc(dev
, sizeof(*sfc
), GFP_KERNEL
);
3592 dev_set_drvdata(dev
, sfc
);
3594 regs
= devm_platform_ioremap_resource(pdev
, 0);
3596 return PTR_ERR(regs
);
3598 sfc
->regmap
= devm_regmap_init_mmio(dev
, regs
,
3599 &tegra210_sfc_regmap_config
);
3600 if (IS_ERR(sfc
->regmap
)) {
3601 dev_err(dev
, "regmap init failed\n");
3602 return PTR_ERR(sfc
->regmap
);
3605 regcache_cache_only(sfc
->regmap
, true);
3607 err
= devm_snd_soc_register_component(dev
, &tegra210_sfc_cmpnt
,
3609 ARRAY_SIZE(tegra210_sfc_dais
));
3611 dev_err(dev
, "can't register SFC component, err: %d\n", err
);
3615 pm_runtime_enable(&pdev
->dev
);
3620 static void tegra210_sfc_platform_remove(struct platform_device
*pdev
)
3622 pm_runtime_disable(&pdev
->dev
);
3625 static const struct dev_pm_ops tegra210_sfc_pm_ops
= {
3626 SET_RUNTIME_PM_OPS(tegra210_sfc_runtime_suspend
,
3627 tegra210_sfc_runtime_resume
, NULL
)
3628 SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend
,
3629 pm_runtime_force_resume
)
3632 static struct platform_driver tegra210_sfc_driver
= {
3634 .name
= "tegra210-sfc",
3635 .of_match_table
= tegra210_sfc_of_match
,
3636 .pm
= &tegra210_sfc_pm_ops
,
3638 .probe
= tegra210_sfc_platform_probe
,
3639 .remove
= tegra210_sfc_platform_remove
,
3641 module_platform_driver(tegra210_sfc_driver
)
3643 MODULE_AUTHOR("Arun Shamanna Lakshmi <aruns@nvidia.com>");
3644 MODULE_DESCRIPTION("Tegra210 SFC ASoC driver");
3645 MODULE_LICENSE("GPL v2");