1 /*  sane - Scanner Access Now Easy.
2 
3     Copyright (C) 2019 Povilas Kanapickas <povilas@radix.lt>
4 
5     This file is part of the SANE package.
6 
7     This program is free software; you can redistribute it and/or
8     modify it under the terms of the GNU General Public License as
9     published by the Free Software Foundation; either version 2 of the
10     License, or (at your option) any later version.
11 
12     This program is distributed in the hope that it will be useful, but
13     WITHOUT ANY WARRANTY; without even the implied warranty of
14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15     General Public License for more details.
16 
17     You should have received a copy of the GNU General Public License
18     along with this program.  If not, see <https://www.gnu.org/licenses/>.
19 */
20 
21 #define DEBUG_DECLARE_ONLY
22 
23 #include "low.h"
24 
25 namespace genesys {
26 
27 StaticInit<std::vector<Genesys_Frontend>> s_frontends;
28 
genesys_init_frontend_tables()29 void genesys_init_frontend_tables()
30 {
31     s_frontends.init();
32 
33     GenesysFrontendLayout wolfson_layout;
34     wolfson_layout.type = FrontendType::WOLFSON;
35     wolfson_layout.offset_addr = { 0x20, 0x21, 0x22 };
36     wolfson_layout.gain_addr = { 0x28, 0x29, 0x2a };
37 
38     GenesysFrontendLayout analog_devices;
39     analog_devices.type = FrontendType::ANALOG_DEVICES;
40     analog_devices.offset_addr = { 0x05, 0x06, 0x07 };
41     analog_devices.gain_addr = { 0x02, 0x03, 0x04 };
42 
43     Genesys_Frontend fe;
44     fe.id = AdcId::WOLFSON_UMAX;
45     fe.layout = wolfson_layout;
46     fe.regs = {
47         { 0x00, 0x00 },
48         { 0x01, 0x03 },
49         { 0x02, 0x05 },
50         { 0x03, 0x11 },
51         { 0x20, 0x80 },
52         { 0x21, 0x80 },
53         { 0x22, 0x80 },
54         { 0x24, 0x00 },
55         { 0x25, 0x00 },
56         { 0x26, 0x00 },
57         { 0x28, 0x02 },
58         { 0x29, 0x02 },
59         { 0x2a, 0x02 },
60     };
61     fe.reg2 = {0x00, 0x00, 0x00};
62     s_frontends->push_back(fe);
63 
64 
65     fe = Genesys_Frontend();
66     fe.id = AdcId::WOLFSON_ST12;
67     fe.layout = wolfson_layout;
68     fe.regs = {
69         { 0x00, 0x00 },
70         { 0x01, 0x03 },
71         { 0x02, 0x05 },
72         { 0x03, 0x03 },
73         { 0x20, 0xc8 },
74         { 0x21, 0xc8 },
75         { 0x22, 0xc8 },
76         { 0x24, 0x00 },
77         { 0x25, 0x00 },
78         { 0x26, 0x00 },
79         { 0x28, 0x04 },
80         { 0x29, 0x04 },
81         { 0x2a, 0x04 },
82     };
83     fe.reg2 = {0x00, 0x00, 0x00};
84     s_frontends->push_back(fe);
85 
86 
87     fe = Genesys_Frontend();
88     fe.id = AdcId::WOLFSON_ST24;
89     fe.layout = wolfson_layout;
90     fe.regs = {
91         { 0x00, 0x00 },
92         { 0x01, 0x03 },
93         { 0x02, 0x05 },
94         { 0x03, 0x21 },
95         { 0x20, 0xc8 },
96         { 0x21, 0xc8 },
97         { 0x22, 0xc8 },
98         { 0x24, 0x00 },
99         { 0x25, 0x00 },
100         { 0x26, 0x00 },
101         { 0x28, 0x06 },
102         { 0x29, 0x06 },
103         { 0x2a, 0x06 },
104     };
105     fe.reg2 = {0x00, 0x00, 0x00};
106     s_frontends->push_back(fe);
107 
108 
109     fe = Genesys_Frontend();
110     fe.id = AdcId::WOLFSON_5345;
111     fe.layout = wolfson_layout;
112     fe.regs = {
113         { 0x00, 0x00 },
114         { 0x01, 0x03 },
115         { 0x02, 0x05 },
116         { 0x03, 0x12 },
117         { 0x20, 0xb8 },
118         { 0x21, 0xb8 },
119         { 0x22, 0xb8 },
120         { 0x24, 0x00 },
121         { 0x25, 0x00 },
122         { 0x26, 0x00 },
123         { 0x28, 0x04 },
124         { 0x29, 0x04 },
125         { 0x2a, 0x04 },
126     };
127     fe.reg2 = {0x00, 0x00, 0x00};
128     s_frontends->push_back(fe);
129 
130 
131     // reg3=0x02 for 50-600 dpi, 0x32 (0x12 also works well) at 1200
132     fe = Genesys_Frontend();
133     fe.id = AdcId::WOLFSON_HP2400;
134     fe.layout = wolfson_layout;
135     fe.regs = {
136         { 0x00, 0x00 },
137         { 0x01, 0x03 },
138         { 0x02, 0x05 },
139         { 0x03, 0x02 },
140         { 0x20, 0xb4 },
141         { 0x21, 0xb6 },
142         { 0x22, 0xbc },
143         { 0x24, 0x00 },
144         { 0x25, 0x00 },
145         { 0x26, 0x00 },
146         { 0x28, 0x06 },
147         { 0x29, 0x09 },
148         { 0x2a, 0x08 },
149     };
150     fe.reg2 = {0x00, 0x00, 0x00};
151     s_frontends->push_back(fe);
152 
153 
154     fe = Genesys_Frontend();
155     fe.id = AdcId::WOLFSON_HP2300;
156     fe.layout = wolfson_layout;
157     fe.regs = {
158         { 0x00, 0x00 },
159         { 0x01, 0x03 },
160         { 0x02, 0x04 },
161         { 0x03, 0x02 },
162         { 0x20, 0xbe },
163         { 0x21, 0xbe },
164         { 0x22, 0xbe },
165         { 0x24, 0x00 },
166         { 0x25, 0x00 },
167         { 0x26, 0x00 },
168         { 0x28, 0x04 },
169         { 0x29, 0x04 },
170         { 0x2a, 0x04 },
171     };
172     fe.reg2 = {0x00, 0x00, 0x00};
173     s_frontends->push_back(fe);
174 
175 
176     fe = Genesys_Frontend();
177     fe.id = AdcId::CANON_LIDE_35;
178     fe.layout = wolfson_layout;
179     fe.layout.type = FrontendType::WOLFSON_GL841;
180     fe.regs = {
181         { 0x00, 0x00 },
182         { 0x01, 0x3d },
183         { 0x02, 0x08 },
184         { 0x03, 0x00 },
185         { 0x20, 0xe1 },
186         { 0x21, 0xe1 },
187         { 0x22, 0xe1 },
188         { 0x24, 0x00 },
189         { 0x25, 0x00 },
190         { 0x26, 0x00 },
191         { 0x28, 0x93 },
192         { 0x29, 0x93 },
193         { 0x2a, 0x93 },
194     };
195     fe.reg2 = {0x00, 0x19, 0x06};
196     s_frontends->push_back(fe);
197 
198 
199     fe = Genesys_Frontend();
200     fe.id = AdcId::CANON_LIDE_90;
201     fe.layout = wolfson_layout;
202     fe.layout.type = FrontendType::WOLFSON;
203     fe.regs = {
204         { 0x01, 0x23 },
205         { 0x02, 0x07 },
206         { 0x03, 0x29 },
207         { 0x06, 0x0d },
208         { 0x08, 0x00 },
209         { 0x09, 0x16 },
210         { 0x20, 0x4d },
211         { 0x21, 0x4d },
212         { 0x22, 0x4d },
213         { 0x23, 0x4d },
214         { 0x28, 0x14 },
215         { 0x29, 0x14 },
216         { 0x2a, 0x14 },
217         { 0x2b, 0x14 },
218     };
219     fe.reg2 = {0x00, 0x00, 0x00};
220     s_frontends->push_back(fe);
221 
222 
223     fe = Genesys_Frontend();
224     fe.id = AdcId::AD_XP200;
225     fe.layout = wolfson_layout;
226     fe.regs = {
227         { 0x00, 0x58 },
228         { 0x01, 0x80 },
229         { 0x02, 0x00 },
230         { 0x03, 0x00 },
231         { 0x20, 0x09 },
232         { 0x21, 0x09 },
233         { 0x22, 0x09 },
234         { 0x24, 0x00 },
235         { 0x25, 0x00 },
236         { 0x26, 0x00 },
237         { 0x28, 0x09 },
238         { 0x29, 0x09 },
239         { 0x2a, 0x09 },
240     };
241     fe.reg2 = {0x00, 0x00, 0x00};
242     s_frontends->push_back(fe);
243 
244 
245     fe = Genesys_Frontend();
246     fe.id = AdcId::WOLFSON_XP300;
247     fe.layout = wolfson_layout;
248     fe.layout.type = FrontendType::WOLFSON_GL841;
249     fe.regs = {
250         { 0x00, 0x00 },
251         { 0x01, 0x35 },
252         { 0x02, 0x20 },
253         { 0x03, 0x14 },
254         { 0x20, 0xe1 },
255         { 0x21, 0xe1 },
256         { 0x22, 0xe1 },
257         { 0x24, 0x00 },
258         { 0x25, 0x00 },
259         { 0x26, 0x00 },
260         { 0x28, 0x93 },
261         { 0x29, 0x93 },
262         { 0x2a, 0x93 },
263     };
264     fe.reg2 = {0x07, 0x00, 0x00};
265     s_frontends->push_back(fe);
266 
267 
268     fe = Genesys_Frontend();
269     fe.id = AdcId::WOLFSON_HP3670;
270     fe.layout = wolfson_layout;
271     fe.regs = {
272         { 0x00, 0x00 },
273         { 0x01, 0x03 },
274         { 0x02, 0x05 },
275         { 0x03, 0x32 },
276         { 0x20, 0xba },
277         { 0x21, 0xb8 },
278         { 0x22, 0xb8 },
279         { 0x24, 0x00 },
280         { 0x25, 0x00 },
281         { 0x26, 0x00 },
282         { 0x28, 0x06 },
283         { 0x29, 0x05 },
284         { 0x2a, 0x04 },
285     };
286     fe.reg2 = {0x00, 0x00, 0x00};
287     s_frontends->push_back(fe);
288 
289 
290     fe = Genesys_Frontend();
291     fe.id = AdcId::WOLFSON_DSM600;
292     fe.layout = wolfson_layout;
293     fe.layout.type = FrontendType::WOLFSON_GL841;
294     fe.regs = {
295         { 0x00, 0x00 },
296         { 0x01, 0x35 },
297         { 0x02, 0x20 },
298         { 0x03, 0x14 },
299         { 0x20, 0x85 },
300         { 0x21, 0x85 },
301         { 0x22, 0x85 },
302         { 0x24, 0x00 },
303         { 0x25, 0x00 },
304         { 0x26, 0x00 },
305         { 0x28, 0xa0 },
306         { 0x29, 0xa0 },
307         { 0x2a, 0xa0 },
308     };
309     fe.reg2 = {0x07, 0x00, 0x00};
310     s_frontends->push_back(fe);
311 
312 
313     fe = Genesys_Frontend();
314     fe.id = AdcId::CANON_LIDE_200;
315     fe.layout = analog_devices;
316     fe.layout.type = FrontendType::ANALOG_DEVICES_GL847;
317     fe.regs = {
318         { 0x00, 0x9d },
319         { 0x01, 0x91 },
320         { 0x02, 0x32 },
321         { 0x03, 0x04 },
322         { 0x04, 0x00 },
323         { 0x05, 0x00 },
324         { 0x06, 0x3f },
325         { 0x07, 0x00 },
326     };
327     s_frontends->push_back(fe);
328 
329 
330     fe = Genesys_Frontend();
331     fe.id = AdcId::CANON_LIDE_700F;
332     fe.layout = analog_devices;
333     fe.layout.type = FrontendType::ANALOG_DEVICES_GL847;
334     fe.regs = {
335         { 0x00, 0x9d },
336         { 0x01, 0x9e },
337         { 0x02, 0x2f },
338         { 0x03, 0x04 },
339         { 0x04, 0x00 },
340         { 0x05, 0x00 },
341         { 0x06, 0x3f },
342         { 0x07, 0x00 },
343     };
344     s_frontends->push_back(fe);
345 
346 
347     fe = Genesys_Frontend();
348     fe.id = AdcId::KVSS080;
349     fe.layout = wolfson_layout;
350     fe.regs = {
351         { 0x00, 0x00 },
352         { 0x01, 0x23 },
353         { 0x02, 0x24 },
354         { 0x03, 0x0f },
355         { 0x20, 0x80 },
356         { 0x21, 0x80 },
357         { 0x22, 0x80 },
358         { 0x24, 0x00 },
359         { 0x25, 0x00 },
360         { 0x26, 0x00 },
361         { 0x28, 0x4b },
362         { 0x29, 0x4b },
363         { 0x2a, 0x4b },
364     };
365     fe.reg2 = {0x00,0x00,0x00};
366     s_frontends->push_back(fe);
367 
368 
369     fe = Genesys_Frontend();
370     fe.id = AdcId::G4050;
371     fe.layout = wolfson_layout;
372     fe.regs = {
373         { 0x00, 0x00 },
374         { 0x01, 0x23 },
375         { 0x02, 0x24 },
376         { 0x03, 0x1f },
377         { 0x20, 0x45 },
378         { 0x21, 0x45 },
379         { 0x22, 0x45 },
380         { 0x24, 0x00 },
381         { 0x25, 0x00 },
382         { 0x26, 0x00 },
383         { 0x28, 0x4b },
384         { 0x29, 0x4b },
385         { 0x2a, 0x4b },
386     };
387     fe.reg2 = {0x00,0x00,0x00};
388     s_frontends->push_back(fe);
389 
390 
391     fe = Genesys_Frontend();
392     fe.id = AdcId::CANON_LIDE_110;
393     fe.layout = wolfson_layout;
394     fe.layout.type = FrontendType::WOLFSON_GL124;
395     fe.regs = {
396         { 0x00, 0x80 },
397         { 0x01, 0x8a },
398         { 0x02, 0x23 },
399         { 0x03, 0x4c },
400         { 0x20, 0x00 },
401         { 0x21, 0x00 },
402         { 0x22, 0x00 },
403         { 0x24, 0x00 },
404         { 0x25, 0xca },
405         { 0x26, 0x94 },
406         { 0x28, 0x00 },
407         { 0x29, 0x00 },
408         { 0x2a, 0x00 },
409     };
410     fe.reg2 = {0x00, 0x00, 0x00};
411     s_frontends->push_back(fe);
412 
413     /** @brief GL124 special case
414     * for GL124 based scanners, this struct is "abused"
415     * in fact the fields are map like below to AFE registers
416     * (from Texas Instrument or alike ?)
417     */
418     fe = Genesys_Frontend();
419     fe.id = AdcId::CANON_LIDE_120;
420     fe.layout = wolfson_layout;
421     fe.layout.type = FrontendType::WOLFSON_GL124;
422     fe.regs = {
423         { 0x00, 0x80 },
424         { 0x01, 0xa3 },
425         { 0x02, 0x2b },
426         { 0x03, 0x4c },
427         { 0x20, 0x00 },
428         { 0x21, 0x00 },
429         { 0x22, 0x00 },
430         { 0x24, 0x00 }, // actual address 0x05
431         { 0x25, 0xca }, // actual address 0x06
432         { 0x26, 0x95 }, // actual address 0x07
433         { 0x28, 0x00 },
434         { 0x29, 0x00 },
435         { 0x2a, 0x00 },
436     };
437     fe.reg2 = {0x00, 0x00, 0x00};
438     s_frontends->push_back(fe);
439 
440 
441     fe = Genesys_Frontend();
442     fe.id = AdcId::PLUSTEK_OPTICPRO_3600;
443     fe.layout = wolfson_layout;
444     fe.regs = {
445         { 0x00, 0x70 },
446         { 0x01, 0x80 },
447         { 0x02, 0x00 },
448         { 0x03, 0x00 },
449         { 0x20, 0x00 },
450         { 0x21, 0x00 },
451         { 0x22, 0x00 },
452         { 0x24, 0x00 },
453         { 0x25, 0x00 },
454         { 0x26, 0x00 },
455         { 0x28, 0x3f },
456         { 0x29, 0x3d },
457         { 0x2a, 0x3d },
458     };
459     fe.reg2 = {0x00, 0x00, 0x00};
460     s_frontends->push_back(fe);
461 
462 
463     fe = Genesys_Frontend();
464     fe.id = AdcId::PLUSTEK_OPTICFILM_7200;
465     fe.layout = analog_devices;
466     fe.regs = {
467         { 0x00, 0xf8 },
468         { 0x01, 0x80 },
469         { 0x02, 0x2e },
470         { 0x03, 0x17 },
471         { 0x04, 0x20 },
472         { 0x05, 0x0109 },
473         { 0x06, 0x01 },
474         { 0x07, 0x0104 },
475     };
476     fe.reg2 = {0x00, 0x00, 0x00};
477     s_frontends->push_back(fe);
478 
479 
480     fe = Genesys_Frontend();
481     fe.id = AdcId::PLUSTEK_OPTICFILM_7200I;
482     fe.layout = analog_devices;
483     fe.regs = {
484         { 0x00, 0xf8 },
485         { 0x01, 0x80 },
486         { 0x02, 0x0a },
487         { 0x03, 0x06 },
488         { 0x04, 0x0f },
489         { 0x05, 0x56 },
490         { 0x06, 0x64 },
491         { 0x07, 0x56 },
492     };
493     fe.reg2 = {0x00, 0x00, 0x00};
494     s_frontends->push_back(fe);
495 
496 
497     fe = Genesys_Frontend();
498     fe.id = AdcId::PLUSTEK_OPTICFILM_7300;
499     fe.layout = analog_devices;
500     fe.regs = {
501         { 0x00, 0xf8 },
502         { 0x01, 0x80 },
503         { 0x02, 0x10 },
504         { 0x03, 0x06 },
505         { 0x04, 0x06 },
506         { 0x05, 0x09 },
507         { 0x06, 0x0a },
508         { 0x07, 0x0102 },
509     };
510     fe.reg2 = {0x00, 0x00, 0x00};
511     s_frontends->push_back(fe);
512 
513 
514     fe = Genesys_Frontend();
515     fe.id = AdcId::PLUSTEK_OPTICFILM_7400;
516     fe.layout = analog_devices;
517     fe.regs = {
518         { 0x00, 0xf8 },
519         { 0x01, 0x80 },
520         { 0x02, 0x1f },
521         { 0x03, 0x14 },
522         { 0x04, 0x19 },
523         { 0x05, 0x1b },
524         { 0x06, 0x1e },
525         { 0x07, 0x0e },
526     };
527     fe.reg2 = {0x00, 0x00, 0x00};
528     s_frontends->push_back(fe);
529 
530 
531     fe = Genesys_Frontend();
532     fe.id = AdcId::PLUSTEK_OPTICFILM_7500I;
533     fe.layout = analog_devices;
534     fe.regs = {
535         { 0x00, 0xf8 },
536         { 0x01, 0x80 },
537         { 0x02, 0x1d },
538         { 0x03, 0x17 },
539         { 0x04, 0x13 },
540         { 0x05, 0x00 },
541         { 0x06, 0x00 },
542         { 0x07, 0x0111 },
543     };
544     fe.reg2 = {0x00, 0x00, 0x00};
545     s_frontends->push_back(fe);
546 
547 
548     fe = Genesys_Frontend();
549     fe.id = AdcId::PLUSTEK_OPTICFILM_8200I;
550     fe.layout = analog_devices;
551     fe.regs = {
552         { 0x00, 0xf8 },
553         { 0x01, 0x80 },
554         { 0x02, 0x28 },
555         { 0x03, 0x20 },
556         { 0x04, 0x28 },
557         { 0x05, 0x2f },
558         { 0x06, 0x2d },
559         { 0x07, 0x23 },
560     };
561     fe.reg2 = {0x00, 0x00, 0x00};
562     s_frontends->push_back(fe);
563 
564 
565     fe = Genesys_Frontend();
566     fe.id = AdcId::CANON_4400F;
567     fe.layout = wolfson_layout;
568     fe.regs = {
569         { 0x00, 0x00 },
570         { 0x01, 0x23 },
571         { 0x02, 0x24 },
572         { 0x03, 0x2f },
573         { 0x20, 0x6d },
574         { 0x21, 0x67 },
575         { 0x22, 0x5b },
576         { 0x24, 0x00 },
577         { 0x25, 0x00 },
578         { 0x26, 0x00 },
579         { 0x28, 0xd8 },
580         { 0x29, 0xd1 },
581         { 0x2a, 0xb9 },
582     };
583     fe.reg2 = {0x00, 0x00, 0x00};
584     s_frontends->push_back(fe);
585 
586 
587     fe = Genesys_Frontend();
588     fe.id = AdcId::CANON_5600F;
589     fe.layout = wolfson_layout;
590     fe.regs = {
591         { 0x01, 0x23 },
592         { 0x02, 0x24 },
593         { 0x03, 0x2f },
594         { 0x06, 0x00 },
595         { 0x08, 0x00 },
596         { 0x09, 0x00 },
597         { 0x20, 0x60 },
598         { 0x21, 0x60 },
599         { 0x22, 0x60 },
600         { 0x28, 0x77 },
601         { 0x29, 0x77 },
602         { 0x2a, 0x77 },
603     };
604     s_frontends->push_back(fe);
605 
606 
607     fe = Genesys_Frontend();
608     fe.id = AdcId::CANON_8400F;
609     fe.layout = wolfson_layout;
610     fe.regs = {
611         { 0x00, 0x00 },
612         { 0x01, 0x23 },
613         { 0x02, 0x24 },
614         { 0x03, 0x0f },
615         { 0x20, 0x60 },
616         { 0x21, 0x5c },
617         { 0x22, 0x6c },
618         { 0x24, 0x00 },
619         { 0x25, 0x00 },
620         { 0x26, 0x00 },
621         { 0x28, 0x8a },
622         { 0x29, 0x9f },
623         { 0x2a, 0xc2 },
624     };
625     fe.reg2 = {0x00, 0x00, 0x00};
626     s_frontends->push_back(fe);
627 
628 
629     fe = Genesys_Frontend();
630     fe.id = AdcId::CANON_8600F;
631     fe.layout = wolfson_layout;
632     fe.regs = {
633         { 0x00, 0x00 },
634         { 0x01, 0x23 },
635         { 0x02, 0x24 },
636         { 0x03, 0x2f },
637         { 0x20, 0x67 },
638         { 0x21, 0x69 },
639         { 0x22, 0x68 },
640         { 0x24, 0x00 },
641         { 0x25, 0x00 },
642         { 0x26, 0x00 },
643         { 0x28, 0xdb },
644         { 0x29, 0xda },
645         { 0x2a, 0xd7 },
646     };
647     fe.reg2 = { 0x00, 0x00, 0x00 };
648     s_frontends->push_back(fe);
649 
650 
651     fe = Genesys_Frontend();
652     fe.id = AdcId::IMG101;
653     fe.layout = wolfson_layout;
654     fe.layout.type = FrontendType::WOLFSON_GL846;
655     fe.regs = {
656         { 0x00, 0x78 },
657         { 0x01, 0xf0 },
658         { 0x02, 0x00 },
659         { 0x03, 0x00 },
660         { 0x20, 0x00 },
661         { 0x21, 0x00 },
662         { 0x22, 0x00 },
663         { 0x24, 0x00 },
664         { 0x25, 0x00 },
665         { 0x26, 0x00 },
666         { 0x28, 0x00 },
667         { 0x29, 0x00 },
668         { 0x2a, 0x00 },
669     };
670     fe.reg2 = {0x00, 0x00, 0x00};
671     s_frontends->push_back(fe);
672 
673 
674     fe = Genesys_Frontend();
675     fe.id = AdcId::PLUSTEK_OPTICBOOK_3800;
676     fe.layout = wolfson_layout;
677     fe.layout.type = FrontendType::WOLFSON_GL846;
678     fe.regs = {
679         { 0x00, 0x78 },
680         { 0x01, 0xf0 },
681         { 0x02, 0x00 },
682         { 0x03, 0x00 },
683         { 0x20, 0x00 },
684         { 0x21, 0x00 },
685         { 0x22, 0x00 },
686         { 0x24, 0x00 },
687         { 0x25, 0x00 },
688         { 0x26, 0x00 },
689         { 0x28, 0x00 },
690         { 0x29, 0x00 },
691         { 0x2a, 0x00 },
692     };
693     fe.reg2 = {0x00, 0x00, 0x00};
694     s_frontends->push_back(fe);
695 
696 
697     /* reg0: control 74 data, 70 no data
698     * reg3: offset
699     * reg6: gain
700     * reg0 , reg3, reg6 */
701     fe = Genesys_Frontend();
702     fe.id = AdcId::CANON_LIDE_80;
703     fe.layout = wolfson_layout;
704     fe.layout.type = FrontendType::CANON_LIDE_80;
705     fe.regs = {
706         { 0x00, 0x70 },
707         { 0x01, 0x16 },
708         { 0x02, 0x60 },
709         { 0x03, 0x00 },
710         { 0x20, 0x00 },
711         { 0x21, 0x00 },
712         { 0x22, 0x00 },
713         { 0x24, 0x00 },
714         { 0x25, 0x00 },
715         { 0x26, 0x00 },
716         { 0x28, 0x00 },
717         { 0x29, 0x00 },
718         { 0x2a, 0x00 },
719     };
720     fe.reg2 = {0x00, 0x00, 0x00};
721     s_frontends->push_back(fe);
722 }
723 
724 } // namespace genesys
725