blob: 27222c92b603cf140419f7ba1448a62e2cfa3c11 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07002 *
3 * device driver for Conexant 2388x based TV cards
4 * card-specific stuff.
5 *
6 * (c) 2003 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */
22
23#include <linux/init.h>
24#include <linux/module.h>
25#include <linux/pci.h>
26#include <linux/delay.h>
Tejun Heo5a0e3ad2010-03-24 17:04:11 +090027#include <linux/slab.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070028
29#include "cx88.h"
Mauro Carvalho Chehab55c88612007-10-19 06:59:33 -030030#include "tea5767.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -070031
Trent Piephobbc83592007-08-15 14:41:58 -030032static unsigned int tuner[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
33static unsigned int radio[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
34static unsigned int card[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
35
36module_param_array(tuner, int, NULL, 0444);
37module_param_array(radio, int, NULL, 0444);
38module_param_array(card, int, NULL, 0444);
39
40MODULE_PARM_DESC(tuner,"tuner type");
41MODULE_PARM_DESC(radio,"radio tuner type");
42MODULE_PARM_DESC(card,"card type");
43
44static unsigned int latency = UNSET;
45module_param(latency,int,0444);
46MODULE_PARM_DESC(latency,"pci latency timer");
47
Jean Delvare89c3bc72010-06-28 12:59:49 -030048static int disable_ir;
49module_param(disable_ir, int, 0444);
Mauro Carvalho Chehab97108cf2010-11-22 15:50:51 -030050MODULE_PARM_DESC(disable_ir, "Disable IR support");
Jean Delvare89c3bc72010-06-28 12:59:49 -030051
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -030052#define info_printk(core, fmt, arg...) \
53 printk(KERN_INFO "%s: " fmt, core->name , ## arg)
54
55#define warn_printk(core, fmt, arg...) \
56 printk(KERN_WARNING "%s: " fmt, core->name , ## arg)
57
58#define err_printk(core, fmt, arg...) \
59 printk(KERN_ERR "%s: " fmt, core->name , ## arg)
60
61
Linus Torvalds1da177e2005-04-16 15:20:36 -070062/* ------------------------------------------------------------------ */
63/* board config info */
64
Mauro Carvalho Chehab4bf12262008-04-26 11:55:09 -030065/* If radio_type !=UNSET, radio_addr should be specified
66 */
67
Trent Piephobbc83592007-08-15 14:41:58 -030068static const struct cx88_board cx88_boards[] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -070069 [CX88_BOARD_UNKNOWN] = {
70 .name = "UNKNOWN/GENERIC",
71 .tuner_type = UNSET,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -070072 .radio_type = UNSET,
73 .tuner_addr = ADDR_UNSET,
74 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -070075 .input = {{
76 .type = CX88_VMUX_COMPOSITE1,
77 .vmux = 0,
78 },{
79 .type = CX88_VMUX_COMPOSITE2,
80 .vmux = 1,
81 },{
82 .type = CX88_VMUX_COMPOSITE3,
83 .vmux = 2,
84 },{
85 .type = CX88_VMUX_COMPOSITE4,
86 .vmux = 3,
87 }},
88 },
89 [CX88_BOARD_HAUPPAUGE] = {
90 .name = "Hauppauge WinTV 34xxx models",
91 .tuner_type = UNSET,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -070092 .radio_type = UNSET,
93 .tuner_addr = ADDR_UNSET,
94 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -070095 .tda9887_conf = TDA9887_PRESENT,
96 .input = {{
97 .type = CX88_VMUX_TELEVISION,
98 .vmux = 0,
99 .gpio0 = 0xff00, // internal decoder
100 },{
101 .type = CX88_VMUX_DEBUG,
102 .vmux = 0,
103 .gpio0 = 0xff01, // mono from tuner chip
104 },{
105 .type = CX88_VMUX_COMPOSITE1,
106 .vmux = 1,
107 .gpio0 = 0xff02,
108 },{
109 .type = CX88_VMUX_SVIDEO,
110 .vmux = 2,
111 .gpio0 = 0xff02,
112 }},
113 .radio = {
114 .type = CX88_RADIO,
115 .gpio0 = 0xff01,
116 },
117 },
118 [CX88_BOARD_GDI] = {
119 .name = "GDI Black Gold",
120 .tuner_type = UNSET,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700121 .radio_type = UNSET,
122 .tuner_addr = ADDR_UNSET,
123 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700124 .input = {{
125 .type = CX88_VMUX_TELEVISION,
126 .vmux = 0,
Mauro Carvalho Chehabfd3113e2005-07-31 22:34:43 -0700127 },{
128 .type = CX88_VMUX_SVIDEO,
129 .vmux = 2,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700130 }},
131 },
132 [CX88_BOARD_PIXELVIEW] = {
133 .name = "PixelView",
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700134 .tuner_type = TUNER_PHILIPS_PAL,
135 .radio_type = UNSET,
136 .tuner_addr = ADDR_UNSET,
137 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700138 .input = {{
139 .type = CX88_VMUX_TELEVISION,
140 .vmux = 0,
141 .gpio0 = 0xff00, // internal decoder
142 },{
143 .type = CX88_VMUX_COMPOSITE1,
144 .vmux = 1,
145 },{
146 .type = CX88_VMUX_SVIDEO,
147 .vmux = 2,
148 }},
149 .radio = {
150 .type = CX88_RADIO,
151 .gpio0 = 0xff10,
Michael Krufky47ee2f32006-06-06 15:51:38 -0300152 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700153 },
154 [CX88_BOARD_ATI_WONDER_PRO] = {
155 .name = "ATI TV Wonder Pro",
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700156 .tuner_type = TUNER_PHILIPS_4IN1,
157 .radio_type = UNSET,
158 .tuner_addr = ADDR_UNSET,
159 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700160 .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER,
161 .input = {{
162 .type = CX88_VMUX_TELEVISION,
163 .vmux = 0,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800164 .gpio0 = 0x03ff,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700165 },{
166 .type = CX88_VMUX_COMPOSITE1,
167 .vmux = 1,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800168 .gpio0 = 0x03fe,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700169 },{
170 .type = CX88_VMUX_SVIDEO,
171 .vmux = 2,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800172 .gpio0 = 0x03fe,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700173 }},
174 },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800175 [CX88_BOARD_WINFAST2000XP_EXPERT] = {
176 .name = "Leadtek Winfast 2000XP Expert",
177 .tuner_type = TUNER_PHILIPS_4IN1,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700178 .radio_type = UNSET,
179 .tuner_addr = ADDR_UNSET,
180 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700181 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800182 .input = {{
183 .type = CX88_VMUX_TELEVISION,
184 .vmux = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700185 .gpio0 = 0x00F5e700,
186 .gpio1 = 0x00003004,
187 .gpio2 = 0x00F5e700,
188 .gpio3 = 0x02000000,
189 },{
190 .type = CX88_VMUX_COMPOSITE1,
191 .vmux = 1,
192 .gpio0 = 0x00F5c700,
193 .gpio1 = 0x00003004,
194 .gpio2 = 0x00F5c700,
195 .gpio3 = 0x02000000,
196 },{
197 .type = CX88_VMUX_SVIDEO,
198 .vmux = 2,
199 .gpio0 = 0x00F5c700,
200 .gpio1 = 0x00003004,
201 .gpio2 = 0x00F5c700,
202 .gpio3 = 0x02000000,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800203 }},
204 .radio = {
205 .type = CX88_RADIO,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700206 .gpio0 = 0x00F5d700,
207 .gpio1 = 0x00003004,
208 .gpio2 = 0x00F5d700,
209 .gpio3 = 0x02000000,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800210 },
211 },
Lubomir Bulej7418f342005-11-08 21:38:34 -0800212 [CX88_BOARD_AVERTV_STUDIO_303] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700213 .name = "AverTV Studio 303 (M126)",
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700214 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
215 .radio_type = UNSET,
216 .tuner_addr = ADDR_UNSET,
217 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700218 .tda9887_conf = TDA9887_PRESENT,
219 .input = {{
220 .type = CX88_VMUX_TELEVISION,
221 .vmux = 0,
Marcin Rudowski4aca4832006-03-09 16:09:51 -0300222 .gpio1 = 0xe09f,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700223 },{
224 .type = CX88_VMUX_COMPOSITE1,
225 .vmux = 1,
Marcin Rudowski4aca4832006-03-09 16:09:51 -0300226 .gpio1 = 0xe05f,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700227 },{
228 .type = CX88_VMUX_SVIDEO,
229 .vmux = 2,
Marcin Rudowski4aca4832006-03-09 16:09:51 -0300230 .gpio1 = 0xe05f,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700231 }},
232 .radio = {
Marcin Rudowski4aca4832006-03-09 16:09:51 -0300233 .gpio1 = 0xe0df,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700234 .type = CX88_RADIO,
235 },
236 },
237 [CX88_BOARD_MSI_TVANYWHERE_MASTER] = {
238 // added gpio values thanks to Michal
239 // values for PAL from DScaler
240 .name = "MSI TV-@nywhere Master",
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700241 .tuner_type = TUNER_MT2032,
242 .radio_type = UNSET,
243 .tuner_addr = ADDR_UNSET,
244 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev3ae1adc2005-11-08 21:37:39 -0800245 .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER_NTSC,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700246 .input = {{
247 .type = CX88_VMUX_TELEVISION,
248 .vmux = 0,
249 .gpio0 = 0x000040bf,
250 .gpio1 = 0x000080c0,
251 .gpio2 = 0x0000ff40,
252 },{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800253 .type = CX88_VMUX_COMPOSITE1,
254 .vmux = 1,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700255 .gpio0 = 0x000040bf,
256 .gpio1 = 0x000080c0,
257 .gpio2 = 0x0000ff40,
258 },{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800259 .type = CX88_VMUX_SVIDEO,
260 .vmux = 2,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700261 .gpio0 = 0x000040bf,
262 .gpio1 = 0x000080c0,
263 .gpio2 = 0x0000ff40,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800264 }},
265 .radio = {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700266 .type = CX88_RADIO,
Mauro Carvalho Chehab55c88612007-10-19 06:59:33 -0300267 .vmux = 3,
268 .gpio0 = 0x000040bf,
269 .gpio1 = 0x000080c0,
270 .gpio2 = 0x0000ff20,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800271 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700272 },
273 [CX88_BOARD_WINFAST_DV2000] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800274 .name = "Leadtek Winfast DV2000",
275 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700276 .radio_type = UNSET,
277 .tuner_addr = ADDR_UNSET,
278 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700279 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800280 .input = {{
281 .type = CX88_VMUX_TELEVISION,
282 .vmux = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700283 .gpio0 = 0x0035e700,
284 .gpio1 = 0x00003004,
285 .gpio2 = 0x0035e700,
286 .gpio3 = 0x02000000,
287 },{
288
289 .type = CX88_VMUX_COMPOSITE1,
290 .vmux = 1,
291 .gpio0 = 0x0035c700,
292 .gpio1 = 0x00003004,
293 .gpio2 = 0x0035c700,
294 .gpio3 = 0x02000000,
295 },{
296 .type = CX88_VMUX_SVIDEO,
297 .vmux = 2,
298 .gpio0 = 0x0035c700,
299 .gpio1 = 0x0035c700,
300 .gpio2 = 0x02000000,
301 .gpio3 = 0x02000000,
302 }},
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800303 .radio = {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700304 .type = CX88_RADIO,
305 .gpio0 = 0x0035d700,
306 .gpio1 = 0x00007004,
307 .gpio2 = 0x0035d700,
308 .gpio3 = 0x02000000,
Michael Krufky47ee2f32006-06-06 15:51:38 -0300309 },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800310 },
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700311 [CX88_BOARD_LEADTEK_PVR2000] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700312 // gpio values for PAL version from regspy by DScaler
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700313 .name = "Leadtek PVR 2000",
314 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
315 .radio_type = UNSET,
316 .tuner_addr = ADDR_UNSET,
317 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700318 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700319 .input = {{
320 .type = CX88_VMUX_TELEVISION,
321 .vmux = 0,
322 .gpio0 = 0x0000bde2,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300323 .audioroute = 1,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700324 },{
325 .type = CX88_VMUX_COMPOSITE1,
326 .vmux = 1,
327 .gpio0 = 0x0000bde6,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300328 .audioroute = 1,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700329 },{
330 .type = CX88_VMUX_SVIDEO,
331 .vmux = 2,
332 .gpio0 = 0x0000bde6,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300333 .audioroute = 1,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700334 }},
335 .radio = {
336 .type = CX88_RADIO,
337 .gpio0 = 0x0000bd62,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300338 .audioroute = 1,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700339 },
Michael Krufky48d5e802006-09-25 14:09:10 -0300340 .mpeg = CX88_MPEG_BLACKBIRD,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700341 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700342 [CX88_BOARD_IODATA_GVVCP3PCI] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800343 .name = "IODATA GV-VCP3/PCI",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700344 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800345 .radio_type = UNSET,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700346 .tuner_addr = ADDR_UNSET,
347 .radio_addr = ADDR_UNSET,
348 .input = {{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800349 .type = CX88_VMUX_COMPOSITE1,
350 .vmux = 0,
351 },{
352 .type = CX88_VMUX_COMPOSITE2,
353 .vmux = 1,
354 },{
355 .type = CX88_VMUX_SVIDEO,
356 .vmux = 2,
357 }},
358 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700359 [CX88_BOARD_PROLINK_PLAYTVPVR] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800360 .name = "Prolink PlayTV PVR",
361 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700362 .radio_type = UNSET,
363 .tuner_addr = ADDR_UNSET,
364 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700365 .tda9887_conf = TDA9887_PRESENT,
366 .input = {{
367 .type = CX88_VMUX_TELEVISION,
368 .vmux = 0,
Michael Krufkyfc34f162006-03-13 03:41:44 -0300369 .gpio0 = 0xbff0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700370 },{
371 .type = CX88_VMUX_COMPOSITE1,
372 .vmux = 1,
Michael Krufkyfc34f162006-03-13 03:41:44 -0300373 .gpio0 = 0xbff3,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700374 },{
375 .type = CX88_VMUX_SVIDEO,
376 .vmux = 2,
Michael Krufkyfc34f162006-03-13 03:41:44 -0300377 .gpio0 = 0xbff3,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700378 }},
379 .radio = {
380 .type = CX88_RADIO,
Michael Krufkyfc34f162006-03-13 03:41:44 -0300381 .gpio0 = 0xbff0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700382 },
383 },
384 [CX88_BOARD_ASUS_PVR_416] = {
385 .name = "ASUS PVR-416",
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700386 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
387 .radio_type = UNSET,
388 .tuner_addr = ADDR_UNSET,
389 .radio_addr = ADDR_UNSET,
390 .tda9887_conf = TDA9887_PRESENT,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700391 .input = {{
392 .type = CX88_VMUX_TELEVISION,
393 .vmux = 0,
394 .gpio0 = 0x0000fde6,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800395 },{
Linus Torvalds1da177e2005-04-16 15:20:36 -0700396 .type = CX88_VMUX_SVIDEO,
397 .vmux = 2,
398 .gpio0 = 0x0000fde6, // 0x0000fda6 L,R RCA audio in?
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300399 .audioroute = 1,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700400 }},
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800401 .radio = {
402 .type = CX88_RADIO,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700403 .gpio0 = 0x0000fde2,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800404 },
Michael Krufky48d5e802006-09-25 14:09:10 -0300405 .mpeg = CX88_MPEG_BLACKBIRD,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700406 },
407 [CX88_BOARD_MSI_TVANYWHERE] = {
408 .name = "MSI TV-@nywhere",
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700409 .tuner_type = TUNER_MT2032,
410 .radio_type = UNSET,
411 .tuner_addr = ADDR_UNSET,
412 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700413 .tda9887_conf = TDA9887_PRESENT,
414 .input = {{
415 .type = CX88_VMUX_TELEVISION,
416 .vmux = 0,
417 .gpio0 = 0x00000fbf,
418 .gpio2 = 0x0000fc08,
419 },{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800420 .type = CX88_VMUX_COMPOSITE1,
421 .vmux = 1,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700422 .gpio0 = 0x00000fbf,
423 .gpio2 = 0x0000fc68,
424 },{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800425 .type = CX88_VMUX_SVIDEO,
426 .vmux = 2,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700427 .gpio0 = 0x00000fbf,
428 .gpio2 = 0x0000fc68,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800429 }},
Linus Torvalds1da177e2005-04-16 15:20:36 -0700430 },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800431 [CX88_BOARD_KWORLD_DVB_T] = {
432 .name = "KWorld/VStream XPert DVB-T",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700433 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700434 .radio_type = UNSET,
435 .tuner_addr = ADDR_UNSET,
436 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800437 .input = {{
438 .type = CX88_VMUX_COMPOSITE1,
439 .vmux = 1,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700440 .gpio0 = 0x0700,
441 .gpio2 = 0x0101,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800442 },{
443 .type = CX88_VMUX_SVIDEO,
444 .vmux = 2,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700445 .gpio0 = 0x0700,
446 .gpio2 = 0x0101,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800447 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300448 .mpeg = CX88_MPEG_DVB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700449 },
450 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1] = {
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -0700451 .name = "DViCO FusionHDTV DVB-T1",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700452 .tuner_type = TUNER_ABSENT, /* No analog tuner */
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700453 .radio_type = UNSET,
454 .tuner_addr = ADDR_UNSET,
455 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700456 .input = {{
457 .type = CX88_VMUX_COMPOSITE1,
458 .vmux = 1,
459 .gpio0 = 0x000027df,
Michael Krufky47ee2f32006-06-06 15:51:38 -0300460 },{
Linus Torvalds1da177e2005-04-16 15:20:36 -0700461 .type = CX88_VMUX_SVIDEO,
462 .vmux = 2,
463 .gpio0 = 0x000027df,
464 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300465 .mpeg = CX88_MPEG_DVB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700466 },
467 [CX88_BOARD_KWORLD_LTV883] = {
468 .name = "KWorld LTV883RF",
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700469 .tuner_type = TUNER_TNF_8831BGFF,
470 .radio_type = UNSET,
471 .tuner_addr = ADDR_UNSET,
472 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800473 .input = {{
474 .type = CX88_VMUX_TELEVISION,
475 .vmux = 0,
476 .gpio0 = 0x07f8,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700477 },{
478 .type = CX88_VMUX_DEBUG,
479 .vmux = 0,
480 .gpio0 = 0x07f9, // mono from tuner chip
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800481 },{
482 .type = CX88_VMUX_COMPOSITE1,
483 .vmux = 1,
484 .gpio0 = 0x000007fa,
485 },{
486 .type = CX88_VMUX_SVIDEO,
487 .vmux = 2,
488 .gpio0 = 0x000007fa,
489 }},
490 .radio = {
491 .type = CX88_RADIO,
492 .gpio0 = 0x000007f8,
493 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700494 },
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -0700495 [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q] = {
496 .name = "DViCO FusionHDTV 3 Gold-Q",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700497 .tuner_type = TUNER_MICROTUNE_4042FI5,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700498 .radio_type = UNSET,
499 .tuner_addr = ADDR_UNSET,
500 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700501 /*
502 GPIO[0] resets DT3302 DTV receiver
503 0 - reset asserted
504 1 - normal operation
505 GPIO[1] mutes analog audio output connector
506 0 - enable selected source
507 1 - mute
508 GPIO[2] selects source for analog audio output connector
509 0 - analog audio input connector on tab
510 1 - analog DAC output from CX23881 chip
511 GPIO[3] selects RF input connector on tuner module
512 0 - RF connector labeled CABLE
513 1 - RF connector labeled ANT
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -0700514 GPIO[4] selects high RF for QAM256 mode
515 0 - normal RF
516 1 - high RF
Linus Torvalds1da177e2005-04-16 15:20:36 -0700517 */
518 .input = {{
519 .type = CX88_VMUX_TELEVISION,
520 .vmux = 0,
521 .gpio0 = 0x0f0d,
522 },{
523 .type = CX88_VMUX_CABLE,
524 .vmux = 0,
525 .gpio0 = 0x0f05,
526 },{
527 .type = CX88_VMUX_COMPOSITE1,
528 .vmux = 1,
529 .gpio0 = 0x0f00,
530 },{
531 .type = CX88_VMUX_SVIDEO,
532 .vmux = 2,
533 .gpio0 = 0x0f00,
534 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300535 .mpeg = CX88_MPEG_DVB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700536 },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800537 [CX88_BOARD_HAUPPAUGE_DVB_T1] = {
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700538 .name = "Hauppauge Nova-T DVB-T",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700539 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700540 .radio_type = UNSET,
541 .tuner_addr = ADDR_UNSET,
542 .radio_addr = ADDR_UNSET,
543 .input = {{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800544 .type = CX88_VMUX_DVB,
545 .vmux = 0,
546 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300547 .mpeg = CX88_MPEG_DVB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700548 },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800549 [CX88_BOARD_CONEXANT_DVB_T1] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700550 .name = "Conexant DVB-T reference design",
551 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700552 .radio_type = UNSET,
553 .tuner_addr = ADDR_UNSET,
554 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800555 .input = {{
556 .type = CX88_VMUX_DVB,
557 .vmux = 0,
558 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300559 .mpeg = CX88_MPEG_DVB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700560 },
561 [CX88_BOARD_PROVIDEO_PV259] = {
562 .name = "Provideo PV259",
563 .tuner_type = TUNER_PHILIPS_FQ1216ME,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700564 .radio_type = UNSET,
565 .tuner_addr = ADDR_UNSET,
566 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700567 .input = {{
568 .type = CX88_VMUX_TELEVISION,
569 .vmux = 0,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300570 .audioroute = 1,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700571 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300572 .mpeg = CX88_MPEG_BLACKBIRD,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700573 },
574 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS] = {
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -0700575 .name = "DViCO FusionHDTV DVB-T Plus",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700576 .tuner_type = TUNER_ABSENT, /* No analog tuner */
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700577 .radio_type = UNSET,
578 .tuner_addr = ADDR_UNSET,
579 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700580 .input = {{
581 .type = CX88_VMUX_COMPOSITE1,
582 .vmux = 1,
583 .gpio0 = 0x000027df,
Michael Krufky47ee2f32006-06-06 15:51:38 -0300584 },{
Linus Torvalds1da177e2005-04-16 15:20:36 -0700585 .type = CX88_VMUX_SVIDEO,
586 .vmux = 2,
587 .gpio0 = 0x000027df,
588 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300589 .mpeg = CX88_MPEG_DVB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700590 },
591 [CX88_BOARD_DNTV_LIVE_DVB_T] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800592 .name = "digitalnow DNTV Live! DVB-T",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700593 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700594 .radio_type = UNSET,
595 .tuner_addr = ADDR_UNSET,
596 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800597 .input = {{
Linus Torvalds1da177e2005-04-16 15:20:36 -0700598 .type = CX88_VMUX_COMPOSITE1,
599 .vmux = 1,
600 .gpio0 = 0x00000700,
601 .gpio2 = 0x00000101,
602 },{
603 .type = CX88_VMUX_SVIDEO,
604 .vmux = 2,
605 .gpio0 = 0x00000700,
606 .gpio2 = 0x00000101,
607 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300608 .mpeg = CX88_MPEG_DVB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700609 },
610 [CX88_BOARD_PCHDTV_HD3000] = {
611 .name = "pcHDTV HD3000 HDTV",
Trent Piepho9175b852006-04-10 09:40:37 -0300612 .tuner_type = TUNER_THOMSON_DTT761X,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700613 .radio_type = UNSET,
614 .tuner_addr = ADDR_UNSET,
615 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehabe4f5c822005-12-04 12:41:54 -0200616 .tda9887_conf = TDA9887_PRESENT,
Trent Piepho19dc74b2007-07-31 23:06:50 -0300617 /* GPIO[2] = audio source for analog audio out connector
618 * 0 = analog audio input connector
619 * 1 = CX88 audio DACs
620 *
621 * GPIO[7] = input to CX88's audio/chroma ADC
622 * 0 = FM 10.7 MHz IF
623 * 1 = Sound 4.5 MHz IF
624 *
625 * GPIO[1,5,6] = Oren 51132 pins 27,35,28 respectively
626 *
627 * GPIO[16] = Remote control input
628 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700629 .input = {{
630 .type = CX88_VMUX_TELEVISION,
631 .vmux = 0,
632 .gpio0 = 0x00008484,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700633 },{
634 .type = CX88_VMUX_COMPOSITE1,
635 .vmux = 1,
636 .gpio0 = 0x00008400,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700637 },{
638 .type = CX88_VMUX_SVIDEO,
639 .vmux = 2,
640 .gpio0 = 0x00008400,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700641 }},
642 .radio = {
643 .type = CX88_RADIO,
Trent Piepho19dc74b2007-07-31 23:06:50 -0300644 .gpio0 = 0x00008404,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700645 },
Michael Krufky48d5e802006-09-25 14:09:10 -0300646 .mpeg = CX88_MPEG_DVB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700647 },
648 [CX88_BOARD_HAUPPAUGE_ROSLYN] = {
649 // entry added by Kaustubh D. Bhalerao <bhalerao.1@osu.edu>
650 // GPIO values obtained from regspy, courtesy Sean Covel
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700651 .name = "Hauppauge WinTV 28xxx (Roslyn) models",
652 .tuner_type = UNSET,
653 .radio_type = UNSET,
654 .tuner_addr = ADDR_UNSET,
655 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700656 .input = {{
657 .type = CX88_VMUX_TELEVISION,
658 .vmux = 0,
Steven Toth0345c382006-01-09 15:25:17 -0200659 .gpio0 = 0xed1a,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700660 .gpio2 = 0x00ff,
661 },{
662 .type = CX88_VMUX_DEBUG,
663 .vmux = 0,
Steven Toth0345c382006-01-09 15:25:17 -0200664 .gpio0 = 0xff01,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700665 },{
666 .type = CX88_VMUX_COMPOSITE1,
667 .vmux = 1,
668 .gpio0 = 0xff02,
669 },{
670 .type = CX88_VMUX_SVIDEO,
671 .vmux = 2,
672 .gpio0 = 0xed92,
673 .gpio2 = 0x00ff,
674 }},
675 .radio = {
676 .type = CX88_RADIO,
677 .gpio0 = 0xed96,
678 .gpio2 = 0x00ff,
679 },
Michael Krufky48d5e802006-09-25 14:09:10 -0300680 .mpeg = CX88_MPEG_BLACKBIRD,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700681 },
682 [CX88_BOARD_DIGITALLOGIC_MEC] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700683 .name = "Digital-Logic MICROSPACE Entertainment Center (MEC)",
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700684 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
685 .radio_type = UNSET,
686 .tuner_addr = ADDR_UNSET,
687 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700688 .tda9887_conf = TDA9887_PRESENT,
689 .input = {{
690 .type = CX88_VMUX_TELEVISION,
691 .vmux = 0,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700692 .gpio0 = 0x00009d80,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300693 .audioroute = 1,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700694 },{
695 .type = CX88_VMUX_COMPOSITE1,
696 .vmux = 1,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700697 .gpio0 = 0x00009d76,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300698 .audioroute = 1,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700699 },{
700 .type = CX88_VMUX_SVIDEO,
701 .vmux = 2,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700702 .gpio0 = 0x00009d76,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300703 .audioroute = 1,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700704 }},
705 .radio = {
706 .type = CX88_RADIO,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700707 .gpio0 = 0x00009d00,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300708 .audioroute = 1,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700709 },
Michael Krufky48d5e802006-09-25 14:09:10 -0300710 .mpeg = CX88_MPEG_BLACKBIRD,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700711 },
712 [CX88_BOARD_IODATA_GVBCTV7E] = {
713 .name = "IODATA GV/BCTV7E",
714 .tuner_type = TUNER_PHILIPS_FQ1286,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700715 .radio_type = UNSET,
716 .tuner_addr = ADDR_UNSET,
717 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700718 .tda9887_conf = TDA9887_PRESENT,
719 .input = {{
720 .type = CX88_VMUX_TELEVISION,
721 .vmux = 1,
722 .gpio1 = 0x0000e03f,
723 },{
724 .type = CX88_VMUX_COMPOSITE1,
725 .vmux = 2,
726 .gpio1 = 0x0000e07f,
727 },{
728 .type = CX88_VMUX_SVIDEO,
729 .vmux = 3,
730 .gpio1 = 0x0000e07f,
731 }}
732 },
Manuel Capinha239df2e2005-06-23 22:04:53 -0700733 [CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO] = {
734 .name = "PixelView PlayTV Ultra Pro (Stereo)",
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700735 /* May be also TUNER_YMEC_TVF_5533MF for NTSC/M or PAL/M */
736 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
Mauro Carvalho Chehabc5287ba2005-07-15 03:56:28 -0700737 .radio_type = UNSET,
738 .tuner_addr = ADDR_UNSET,
739 .radio_addr = ADDR_UNSET,
Hans Verkuilb8341e12009-03-29 08:26:01 -0300740 /* Some variants use a tda9874 and so need the tvaudio module. */
741 .audio_chip = V4L2_IDENT_TVAUDIO,
Manuel Capinha239df2e2005-06-23 22:04:53 -0700742 .input = {{
743 .type = CX88_VMUX_TELEVISION,
744 .vmux = 0,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700745 .gpio0 = 0xbf61, /* internal decoder */
Manuel Capinha239df2e2005-06-23 22:04:53 -0700746 },{
747 .type = CX88_VMUX_COMPOSITE1,
748 .vmux = 1,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700749 .gpio0 = 0xbf63,
Manuel Capinha239df2e2005-06-23 22:04:53 -0700750 },{
751 .type = CX88_VMUX_SVIDEO,
752 .vmux = 2,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700753 .gpio0 = 0xbf63,
Manuel Capinha239df2e2005-06-23 22:04:53 -0700754 }},
755 .radio = {
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700756 .type = CX88_RADIO,
757 .gpio0 = 0xbf60,
758 },
Manuel Capinha239df2e2005-06-23 22:04:53 -0700759 },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800760 [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T] = {
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -0700761 .name = "DViCO FusionHDTV 3 Gold-T",
Michael Krufky83ac87222006-01-09 15:25:29 -0200762 .tuner_type = TUNER_THOMSON_DTT761X,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700763 .radio_type = UNSET,
764 .tuner_addr = ADDR_UNSET,
765 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehabe4f5c822005-12-04 12:41:54 -0200766 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -0700767 .input = {{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800768 .type = CX88_VMUX_TELEVISION,
769 .vmux = 0,
770 .gpio0 = 0x97ed,
771 },{
772 .type = CX88_VMUX_COMPOSITE1,
773 .vmux = 1,
774 .gpio0 = 0x97e9,
775 },{
776 .type = CX88_VMUX_SVIDEO,
777 .vmux = 2,
778 .gpio0 = 0x97e9,
779 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300780 .mpeg = CX88_MPEG_DVB,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800781 },
782 [CX88_BOARD_ADSTECH_DVB_T_PCI] = {
783 .name = "ADS Tech Instant TV DVB-T PCI",
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -0700784 .tuner_type = TUNER_ABSENT,
785 .radio_type = UNSET,
786 .tuner_addr = ADDR_UNSET,
787 .radio_addr = ADDR_UNSET,
788 .input = {{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800789 .type = CX88_VMUX_COMPOSITE1,
790 .vmux = 1,
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -0700791 .gpio0 = 0x0700,
792 .gpio2 = 0x0101,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800793 },{
794 .type = CX88_VMUX_SVIDEO,
795 .vmux = 2,
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -0700796 .gpio0 = 0x0700,
797 .gpio2 = 0x0101,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800798 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300799 .mpeg = CX88_MPEG_DVB,
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -0700800 },
Michael Krufkye057ee12005-07-07 17:58:40 -0700801 [CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1] = {
802 .name = "TerraTec Cinergy 1400 DVB-T",
803 .tuner_type = TUNER_ABSENT,
804 .input = {{
805 .type = CX88_VMUX_DVB,
806 .vmux = 0,
Heiko Baums05eda242007-01-21 05:58:19 -0300807 },{
808 .type = CX88_VMUX_COMPOSITE1,
809 .vmux = 2,
810 },{
811 .type = CX88_VMUX_SVIDEO,
812 .vmux = 2,
Michael Krufkye057ee12005-07-07 17:58:40 -0700813 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300814 .mpeg = CX88_MPEG_DVB,
Michael Krufkye057ee12005-07-07 17:58:40 -0700815 },
Michael Krufky9fef07c2005-07-31 22:34:46 -0700816 [CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD] = {
817 .name = "DViCO FusionHDTV 5 Gold",
Michael Krufky9c26c8b2006-04-27 01:29:17 -0300818 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H062F */
Michael Krufky9fef07c2005-07-31 22:34:46 -0700819 .radio_type = UNSET,
820 .tuner_addr = ADDR_UNSET,
821 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehabe52e98a2005-09-09 13:03:41 -0700822 .tda9887_conf = TDA9887_PRESENT,
Michael Krufky9fef07c2005-07-31 22:34:46 -0700823 .input = {{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800824 .type = CX88_VMUX_TELEVISION,
825 .vmux = 0,
826 .gpio0 = 0x87fd,
827 },{
828 .type = CX88_VMUX_COMPOSITE1,
829 .vmux = 1,
830 .gpio0 = 0x87f9,
831 },{
832 .type = CX88_VMUX_SVIDEO,
833 .vmux = 2,
834 .gpio0 = 0x87f9,
835 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300836 .mpeg = CX88_MPEG_DVB,
Michael Krufky9fef07c2005-07-31 22:34:46 -0700837 },
Nickolay V. Shmyrevd45170e2005-11-08 21:36:15 -0800838 [CX88_BOARD_AVERMEDIA_ULTRATV_MC_550] = {
839 .name = "AverMedia UltraTV Media Center PCI 550",
840 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
841 .radio_type = UNSET,
842 .tuner_addr = ADDR_UNSET,
843 .radio_addr = ADDR_UNSET,
844 .tda9887_conf = TDA9887_PRESENT,
Nickolay V. Shmyrevd45170e2005-11-08 21:36:15 -0800845 .input = {{
846 .type = CX88_VMUX_COMPOSITE1,
847 .vmux = 0,
848 .gpio0 = 0x0000cd73,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300849 .audioroute = 1,
Nickolay V. Shmyrevd45170e2005-11-08 21:36:15 -0800850 },{
851 .type = CX88_VMUX_SVIDEO,
852 .vmux = 1,
853 .gpio0 = 0x0000cd73,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300854 .audioroute = 1,
Nickolay V. Shmyrevd45170e2005-11-08 21:36:15 -0800855 },{
856 .type = CX88_VMUX_TELEVISION,
857 .vmux = 3,
858 .gpio0 = 0x0000cdb3,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300859 .audioroute = 1,
Nickolay V. Shmyrevd45170e2005-11-08 21:36:15 -0800860 }},
861 .radio = {
862 .type = CX88_RADIO,
863 .vmux = 2,
864 .gpio0 = 0x0000cdf3,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300865 .audioroute = 1,
Nickolay V. Shmyrevd45170e2005-11-08 21:36:15 -0800866 },
Michael Krufky5b26c822006-10-16 16:07:51 -0300867 .mpeg = CX88_MPEG_BLACKBIRD,
Nickolay V. Shmyrevd45170e2005-11-08 21:36:15 -0800868 },
Alexander Wold0bcc37c2005-11-08 21:36:58 -0800869 [CX88_BOARD_KWORLD_VSTREAM_EXPERT_DVD] = {
870 /* Alexander Wold <awold@bigfoot.com> */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800871 .name = "Kworld V-Stream Xpert DVD",
872 .tuner_type = UNSET,
873 .input = {{
874 .type = CX88_VMUX_COMPOSITE1,
875 .vmux = 1,
876 .gpio0 = 0x03000000,
Alexander Wold0bcc37c2005-11-08 21:36:58 -0800877 .gpio1 = 0x01000000,
878 .gpio2 = 0x02000000,
879 .gpio3 = 0x00100000,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800880 },{
881 .type = CX88_VMUX_SVIDEO,
882 .vmux = 2,
883 .gpio0 = 0x03000000,
884 .gpio1 = 0x01000000,
885 .gpio2 = 0x02000000,
886 .gpio3 = 0x00100000,
887 }},
Alexander Wold0bcc37c2005-11-08 21:36:58 -0800888 },
Kirk Lapraye976f9372005-11-08 21:37:04 -0800889 [CX88_BOARD_ATI_HDTVWONDER] = {
890 .name = "ATI HDTV Wonder",
891 .tuner_type = TUNER_PHILIPS_TUV1236D,
892 .radio_type = UNSET,
893 .tuner_addr = ADDR_UNSET,
894 .radio_addr = ADDR_UNSET,
895 .input = {{
896 .type = CX88_VMUX_TELEVISION,
897 .vmux = 0,
898 .gpio0 = 0x00000ff7,
899 .gpio1 = 0x000000ff,
900 .gpio2 = 0x00000001,
901 .gpio3 = 0x00000000,
902 },{
903 .type = CX88_VMUX_COMPOSITE1,
904 .vmux = 1,
905 .gpio0 = 0x00000ffe,
906 .gpio1 = 0x000000ff,
907 .gpio2 = 0x00000001,
908 .gpio3 = 0x00000000,
909 },{
910 .type = CX88_VMUX_SVIDEO,
911 .vmux = 2,
912 .gpio0 = 0x00000ffe,
913 .gpio1 = 0x000000ff,
914 .gpio2 = 0x00000001,
915 .gpio3 = 0x00000000,
916 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300917 .mpeg = CX88_MPEG_DVB,
Kirk Lapraye976f9372005-11-08 21:37:04 -0800918 },
David Shirley2b5200a2005-11-08 21:37:22 -0800919 [CX88_BOARD_WINFAST_DTV1000] = {
920 .name = "WinFast DTV1000-T",
921 .tuner_type = TUNER_ABSENT,
922 .radio_type = UNSET,
923 .tuner_addr = ADDR_UNSET,
924 .radio_addr = ADDR_UNSET,
925 .input = {{
926 .type = CX88_VMUX_DVB,
927 .vmux = 0,
Jean Delvaree8f4e752007-03-31 10:34:59 -0300928 },{
929 .type = CX88_VMUX_COMPOSITE1,
930 .vmux = 1,
931 },{
932 .type = CX88_VMUX_SVIDEO,
933 .vmux = 2,
David Shirley2b5200a2005-11-08 21:37:22 -0800934 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300935 .mpeg = CX88_MPEG_DVB,
David Shirley2b5200a2005-11-08 21:37:22 -0800936 },
Lubomir Bulej7418f342005-11-08 21:38:34 -0800937 [CX88_BOARD_AVERTV_303] = {
938 .name = "AVerTV 303 (M126)",
939 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
940 .radio_type = UNSET,
941 .tuner_addr = ADDR_UNSET,
942 .radio_addr = ADDR_UNSET,
943 .tda9887_conf = TDA9887_PRESENT,
944 .input = {{
945 .type = CX88_VMUX_TELEVISION,
946 .vmux = 0,
947 .gpio0 = 0x00ff,
948 .gpio1 = 0xe09f,
949 .gpio2 = 0x0010,
950 .gpio3 = 0x0000,
951 },{
952 .type = CX88_VMUX_COMPOSITE1,
953 .vmux = 1,
954 .gpio0 = 0x00ff,
955 .gpio1 = 0xe05f,
956 .gpio2 = 0x0010,
957 .gpio3 = 0x0000,
958 },{
959 .type = CX88_VMUX_SVIDEO,
960 .vmux = 2,
961 .gpio0 = 0x00ff,
962 .gpio1 = 0xe05f,
963 .gpio2 = 0x0010,
964 .gpio3 = 0x0000,
965 }},
966 },
Steven Toth0fa14aa2006-01-09 15:25:02 -0200967 [CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1] = {
968 .name = "Hauppauge Nova-S-Plus DVB-S",
969 .tuner_type = TUNER_ABSENT,
970 .radio_type = UNSET,
971 .tuner_addr = ADDR_UNSET,
972 .radio_addr = ADDR_UNSET,
Lawrence Rust69518032011-02-06 17:46:12 -0300973 .audio_chip = V4L2_IDENT_WM8775,
974 .i2sinputcntl = 2,
Steven Toth0fa14aa2006-01-09 15:25:02 -0200975 .input = {{
976 .type = CX88_VMUX_DVB,
977 .vmux = 0,
lawrence rustfcb97572010-10-18 07:06:02 -0300978 /* 2: Line-In */
979 .audioroute = 2,
Steven Toth0fa14aa2006-01-09 15:25:02 -0200980 },{
981 .type = CX88_VMUX_COMPOSITE1,
982 .vmux = 1,
lawrence rustfcb97572010-10-18 07:06:02 -0300983 /* 2: Line-In */
984 .audioroute = 2,
Steven Toth0fa14aa2006-01-09 15:25:02 -0200985 },{
986 .type = CX88_VMUX_SVIDEO,
987 .vmux = 2,
lawrence rustfcb97572010-10-18 07:06:02 -0300988 /* 2: Line-In */
989 .audioroute = 2,
Steven Toth0fa14aa2006-01-09 15:25:02 -0200990 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300991 .mpeg = CX88_MPEG_DVB,
Steven Toth0fa14aa2006-01-09 15:25:02 -0200992 },
993 [CX88_BOARD_HAUPPAUGE_NOVASE2_S1] = {
994 .name = "Hauppauge Nova-SE2 DVB-S",
995 .tuner_type = TUNER_ABSENT,
996 .radio_type = UNSET,
997 .tuner_addr = ADDR_UNSET,
998 .radio_addr = ADDR_UNSET,
999 .input = {{
1000 .type = CX88_VMUX_DVB,
1001 .vmux = 0,
1002 }},
Michael Krufky48d5e802006-09-25 14:09:10 -03001003 .mpeg = CX88_MPEG_DVB,
Steven Toth0fa14aa2006-01-09 15:25:02 -02001004 },
Vadim Catana0e0351e2006-01-09 15:25:02 -02001005 [CX88_BOARD_KWORLD_DVBS_100] = {
1006 .name = "KWorld DVB-S 100",
1007 .tuner_type = TUNER_ABSENT,
1008 .radio_type = UNSET,
1009 .tuner_addr = ADDR_UNSET,
1010 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab46e67ac2011-01-03 09:09:56 -02001011 .audio_chip = V4L2_IDENT_WM8775,
Vadim Catana0e0351e2006-01-09 15:25:02 -02001012 .input = {{
1013 .type = CX88_VMUX_DVB,
1014 .vmux = 0,
Mauro Carvalho Chehab46e67ac2011-01-03 09:09:56 -02001015 /* 2: Line-In */
1016 .audioroute = 2,
Vadim Catana0e0351e2006-01-09 15:25:02 -02001017 },{
1018 .type = CX88_VMUX_COMPOSITE1,
1019 .vmux = 1,
Mauro Carvalho Chehab46e67ac2011-01-03 09:09:56 -02001020 /* 2: Line-In */
1021 .audioroute = 2,
Vadim Catana0e0351e2006-01-09 15:25:02 -02001022 },{
1023 .type = CX88_VMUX_SVIDEO,
1024 .vmux = 2,
Mauro Carvalho Chehab46e67ac2011-01-03 09:09:56 -02001025 /* 2: Line-In */
1026 .audioroute = 2,
Vadim Catana0e0351e2006-01-09 15:25:02 -02001027 }},
Michael Krufky48d5e802006-09-25 14:09:10 -03001028 .mpeg = CX88_MPEG_DVB,
Vadim Catana0e0351e2006-01-09 15:25:02 -02001029 },
Steven Toth611900c2006-01-09 15:25:12 -02001030 [CX88_BOARD_HAUPPAUGE_HVR1100] = {
1031 .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid",
1032 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1033 .radio_type = UNSET,
1034 .tuner_addr = ADDR_UNSET,
1035 .radio_addr = ADDR_UNSET,
1036 .tda9887_conf = TDA9887_PRESENT,
1037 .input = {{
1038 .type = CX88_VMUX_TELEVISION,
1039 .vmux = 0,
1040 },{
1041 .type = CX88_VMUX_COMPOSITE1,
1042 .vmux = 1,
1043 },{
1044 .type = CX88_VMUX_SVIDEO,
1045 .vmux = 2,
1046 }},
1047 /* fixme: Add radio support */
Michael Krufky48d5e802006-09-25 14:09:10 -03001048 .mpeg = CX88_MPEG_DVB,
Steven Toth611900c2006-01-09 15:25:12 -02001049 },
1050 [CX88_BOARD_HAUPPAUGE_HVR1100LP] = {
1051 .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid (Low Profile)",
1052 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1053 .radio_type = UNSET,
1054 .tuner_addr = ADDR_UNSET,
1055 .radio_addr = ADDR_UNSET,
1056 .tda9887_conf = TDA9887_PRESENT,
1057 .input = {{
1058 .type = CX88_VMUX_TELEVISION,
1059 .vmux = 0,
1060 },{
1061 .type = CX88_VMUX_COMPOSITE1,
1062 .vmux = 1,
1063 }},
1064 /* fixme: Add radio support */
Michael Krufky48d5e802006-09-25 14:09:10 -03001065 .mpeg = CX88_MPEG_DVB,
Steven Toth611900c2006-01-09 15:25:12 -02001066 },
Chris Pascoefc40b262006-01-09 15:25:35 -02001067 [CX88_BOARD_DNTV_LIVE_DVB_T_PRO] = {
1068 .name = "digitalnow DNTV Live! DVB-T Pro",
1069 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1070 .radio_type = UNSET,
1071 .tuner_addr = ADDR_UNSET,
1072 .radio_addr = ADDR_UNSET,
1073 .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |
1074 TDA9887_PORT2_ACTIVE,
1075 .input = {{
1076 .type = CX88_VMUX_TELEVISION,
1077 .vmux = 0,
1078 .gpio0 = 0xf80808,
1079 },{
1080 .type = CX88_VMUX_COMPOSITE1,
1081 .vmux = 1,
1082 .gpio0 = 0xf80808,
1083 },{
1084 .type = CX88_VMUX_SVIDEO,
1085 .vmux = 2,
1086 .gpio0 = 0xf80808,
1087 }},
1088 .radio = {
1089 .type = CX88_RADIO,
1090 .gpio0 = 0xf80808,
1091 },
Michael Krufky48d5e802006-09-25 14:09:10 -03001092 .mpeg = CX88_MPEG_DVB,
Chris Pascoefc40b262006-01-09 15:25:35 -02001093 },
Manenti Marcof39624f2006-01-09 15:32:45 -02001094 [CX88_BOARD_KWORLD_DVB_T_CX22702] = {
1095 /* Kworld V-stream Xpert DVB-T with Thomson tuner */
1096 /* DTT 7579 Conexant CX22702-19 Conexant CX2388x */
1097 /* Manenti Marco <marco_manenti@colman.it> */
1098 .name = "KWorld/VStream XPert DVB-T with cx22702",
1099 .tuner_type = TUNER_ABSENT,
1100 .radio_type = UNSET,
1101 .tuner_addr = ADDR_UNSET,
1102 .radio_addr = ADDR_UNSET,
1103 .input = {{
1104 .type = CX88_VMUX_COMPOSITE1,
1105 .vmux = 1,
1106 .gpio0 = 0x0700,
1107 .gpio2 = 0x0101,
1108 },{
1109 .type = CX88_VMUX_SVIDEO,
1110 .vmux = 2,
1111 .gpio0 = 0x0700,
1112 .gpio2 = 0x0101,
1113 }},
Michael Krufky48d5e802006-09-25 14:09:10 -03001114 .mpeg = CX88_MPEG_DVB,
Manenti Marcof39624f2006-01-09 15:32:45 -02001115 },
Chris Pascoe43eabb42006-01-09 18:21:28 -02001116 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL] = {
1117 .name = "DViCO FusionHDTV DVB-T Dual Digital",
1118 .tuner_type = TUNER_ABSENT, /* No analog tuner */
1119 .radio_type = UNSET,
1120 .tuner_addr = ADDR_UNSET,
1121 .radio_addr = ADDR_UNSET,
1122 .input = {{
1123 .type = CX88_VMUX_COMPOSITE1,
1124 .vmux = 1,
Chris Pascoed536e9c2006-08-10 03:22:21 -03001125 .gpio0 = 0x000067df,
Chris Pascoe43eabb42006-01-09 18:21:28 -02001126 },{
1127 .type = CX88_VMUX_SVIDEO,
1128 .vmux = 2,
Chris Pascoed536e9c2006-08-10 03:22:21 -03001129 .gpio0 = 0x000067df,
Chris Pascoe43eabb42006-01-09 18:21:28 -02001130 }},
Michael Krufky48d5e802006-09-25 14:09:10 -03001131 .mpeg = CX88_MPEG_DVB,
Chris Pascoe43eabb42006-01-09 18:21:28 -02001132 },
Michael Krufky44256de2006-02-07 06:49:14 -02001133 [CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT] = {
Michael Krufky44256de2006-02-07 06:49:14 -02001134 .name = "KWorld HardwareMpegTV XPert",
1135 .tuner_type = TUNER_PHILIPS_TDA8290,
1136 .radio_type = UNSET,
1137 .tuner_addr = ADDR_UNSET,
1138 .radio_addr = ADDR_UNSET,
1139 .input = {{
1140 .type = CX88_VMUX_TELEVISION,
1141 .vmux = 0,
Michael Krufkye2798212006-02-27 00:07:58 -03001142 .gpio0 = 0x3de2,
Michael Krufky24da4e42006-02-27 00:08:01 -03001143 .gpio2 = 0x00ff,
Michael Krufkybc53f782006-05-28 01:43:35 -03001144 },{
1145 .type = CX88_VMUX_COMPOSITE1,
1146 .vmux = 1,
1147 .gpio0 = 0x3de6,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -03001148 .audioroute = 1,
Michael Krufkybc53f782006-05-28 01:43:35 -03001149 },{
1150 .type = CX88_VMUX_SVIDEO,
1151 .vmux = 2,
1152 .gpio0 = 0x3de6,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -03001153 .audioroute = 1,
Michael Krufky44256de2006-02-07 06:49:14 -02001154 }},
Michael Krufkye2798212006-02-27 00:07:58 -03001155 .radio = {
1156 .type = CX88_RADIO,
1157 .gpio0 = 0x3de6,
Michael Krufky24da4e42006-02-27 00:08:01 -03001158 .gpio2 = 0x00ff,
Michael Krufkye2798212006-02-27 00:07:58 -03001159 },
Michael Krufky48d5e802006-09-25 14:09:10 -03001160 .mpeg = CX88_MPEG_BLACKBIRD,
Michael Krufky44256de2006-02-07 06:49:14 -02001161 },
Chris Pascoe780dfef2006-02-28 08:34:59 -03001162 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID] = {
1163 .name = "DViCO FusionHDTV DVB-T Hybrid",
Michael Krufky91ae3292006-03-01 00:04:42 -03001164 .tuner_type = TUNER_THOMSON_FE6600,
Chris Pascoe780dfef2006-02-28 08:34:59 -03001165 .radio_type = UNSET,
1166 .tuner_addr = ADDR_UNSET,
1167 .radio_addr = ADDR_UNSET,
1168 .input = {{
1169 .type = CX88_VMUX_TELEVISION,
1170 .vmux = 0,
1171 .gpio0 = 0x0000a75f,
1172 },{
1173 .type = CX88_VMUX_COMPOSITE1,
1174 .vmux = 1,
1175 .gpio0 = 0x0000a75b,
1176 },{
1177 .type = CX88_VMUX_SVIDEO,
1178 .vmux = 2,
1179 .gpio0 = 0x0000a75b,
1180 }},
Michael Krufky48d5e802006-09-25 14:09:10 -03001181 .mpeg = CX88_MPEG_DVB,
Chris Pascoe780dfef2006-02-28 08:34:59 -03001182 },
Michael Krufkye142e7c2006-04-07 03:24:54 -03001183 [CX88_BOARD_PCHDTV_HD5500] = {
1184 .name = "pcHDTV HD5500 HDTV",
Michael Krufky9c26c8b2006-04-27 01:29:17 -03001185 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
Michael Krufkye142e7c2006-04-07 03:24:54 -03001186 .radio_type = UNSET,
1187 .tuner_addr = ADDR_UNSET,
1188 .radio_addr = ADDR_UNSET,
1189 .tda9887_conf = TDA9887_PRESENT,
1190 .input = {{
1191 .type = CX88_VMUX_TELEVISION,
1192 .vmux = 0,
1193 .gpio0 = 0x87fd,
1194 },{
1195 .type = CX88_VMUX_COMPOSITE1,
1196 .vmux = 1,
1197 .gpio0 = 0x87f9,
1198 },{
1199 .type = CX88_VMUX_SVIDEO,
1200 .vmux = 2,
1201 .gpio0 = 0x87f9,
1202 }},
Michael Krufky48d5e802006-09-25 14:09:10 -03001203 .mpeg = CX88_MPEG_DVB,
Michael Krufkye142e7c2006-04-07 03:24:54 -03001204 },
Valentin Zagurab3038302006-04-13 12:41:43 -03001205 [CX88_BOARD_KWORLD_MCE200_DELUXE] = {
1206 /* FIXME: tested TV input only, disabled composite,
1207 svideo and radio until they can be tested also. */
1208 .name = "Kworld MCE 200 Deluxe",
1209 .tuner_type = TUNER_TENA_9533_DI,
1210 .radio_type = UNSET,
1211 .tda9887_conf = TDA9887_PRESENT,
1212 .tuner_addr = ADDR_UNSET,
1213 .radio_addr = ADDR_UNSET,
1214 .input = {{
1215 .type = CX88_VMUX_TELEVISION,
1216 .vmux = 0,
1217 .gpio0 = 0x0000BDE6
1218 }},
Michael Krufky48d5e802006-09-25 14:09:10 -03001219 .mpeg = CX88_MPEG_BLACKBIRD,
Valentin Zagurab3038302006-04-13 12:41:43 -03001220 },
Angelo Marconia31246222006-05-09 18:27:48 -03001221 [CX88_BOARD_PIXELVIEW_PLAYTV_P7000] = {
1222 /* FIXME: SVideo, Composite and FM inputs are untested */
1223 .name = "PixelView PlayTV P7000",
1224 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
1225 .radio_type = UNSET,
1226 .tuner_addr = ADDR_UNSET,
1227 .radio_addr = ADDR_UNSET,
1228 .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |
1229 TDA9887_PORT2_ACTIVE,
1230 .input = {{
1231 .type = CX88_VMUX_TELEVISION,
1232 .vmux = 0,
1233 .gpio0 = 0x5da6,
1234 }},
Michael Krufky48d5e802006-09-25 14:09:10 -03001235 .mpeg = CX88_MPEG_BLACKBIRD,
Angelo Marconia31246222006-05-09 18:27:48 -03001236 },
Ricardo Cerqueirabe4f4512006-06-08 17:36:17 -03001237 [CX88_BOARD_NPGTECH_REALTV_TOP10FM] = {
1238 .name = "NPG Tech Real TV FM Top 10",
1239 .tuner_type = TUNER_TNF_5335MF, /* Actually a TNF9535 */
Ricardo Cerqueira680543c2006-05-22 07:44:02 -03001240 .radio_type = UNSET,
1241 .tuner_addr = ADDR_UNSET,
1242 .radio_addr = ADDR_UNSET,
1243 .input = {{
1244 .type = CX88_VMUX_TELEVISION,
1245 .vmux = 0,
1246 .gpio0 = 0x0788,
1247 },{
1248 .type = CX88_VMUX_COMPOSITE1,
1249 .vmux = 1,
1250 .gpio0 = 0x078b,
1251 },{
1252 .type = CX88_VMUX_SVIDEO,
1253 .vmux = 2,
Ricardo Cerqueirabe4f4512006-06-08 17:36:17 -03001254 .gpio0 = 0x078b,
Ricardo Cerqueira680543c2006-05-22 07:44:02 -03001255 }},
1256 .radio = {
1257 .type = CX88_RADIO,
1258 .gpio0 = 0x074a,
1259 },
1260 },
Malcolm Valentine4bd6e9d2006-05-29 13:51:59 -03001261 [CX88_BOARD_WINFAST_DTV2000H] = {
Malcolm Valentine4bd6e9d2006-05-29 13:51:59 -03001262 .name = "WinFast DTV2000 H",
1263 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1264 .radio_type = UNSET,
1265 .tuner_addr = ADDR_UNSET,
1266 .radio_addr = ADDR_UNSET,
1267 .tda9887_conf = TDA9887_PRESENT,
1268 .input = {{
1269 .type = CX88_VMUX_TELEVISION,
1270 .vmux = 0,
1271 .gpio0 = 0x00017304,
1272 .gpio1 = 0x00008203,
1273 .gpio2 = 0x00017304,
1274 .gpio3 = 0x02000000,
Vincent Pelletier5cff91a2008-11-09 13:50:07 -03001275 }, {
1276 .type = CX88_VMUX_COMPOSITE1,
1277 .vmux = 1,
1278 .gpio0 = 0x0001d701,
1279 .gpio1 = 0x0000b207,
1280 .gpio2 = 0x0001d701,
1281 .gpio3 = 0x02000000,
1282 }, {
1283 .type = CX88_VMUX_COMPOSITE2,
1284 .vmux = 2,
1285 .gpio0 = 0x0001d503,
1286 .gpio1 = 0x0000b207,
1287 .gpio2 = 0x0001d503,
1288 .gpio3 = 0x02000000,
1289 }, {
1290 .type = CX88_VMUX_SVIDEO,
1291 .vmux = 3,
1292 .gpio0 = 0x0001d701,
1293 .gpio1 = 0x0000b207,
1294 .gpio2 = 0x0001d701,
1295 .gpio3 = 0x02000000,
Malcolm Valentine4bd6e9d2006-05-29 13:51:59 -03001296 }},
Vincent Pelletier5cff91a2008-11-09 13:50:07 -03001297 .radio = {
1298 .type = CX88_RADIO,
1299 .gpio0 = 0x00015702,
1300 .gpio1 = 0x0000f207,
1301 .gpio2 = 0x00015702,
1302 .gpio3 = 0x02000000,
1303 },
Michael Krufky48d5e802006-09-25 14:09:10 -03001304 .mpeg = CX88_MPEG_DVB,
Malcolm Valentine4bd6e9d2006-05-29 13:51:59 -03001305 },
Vlastimil Labsky4d14c832009-08-10 22:15:54 -03001306 [CX88_BOARD_WINFAST_DTV2000H_J] = {
1307 .name = "WinFast DTV2000 H rev. J",
1308 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1309 .radio_type = UNSET,
1310 .tuner_addr = ADDR_UNSET,
1311 .radio_addr = ADDR_UNSET,
1312 .tda9887_conf = TDA9887_PRESENT,
1313 .input = {{
1314 .type = CX88_VMUX_TELEVISION,
1315 .vmux = 0,
1316 .gpio0 = 0x00017300,
1317 .gpio1 = 0x00008207,
1318 .gpio2 = 0x00000000,
1319 .gpio3 = 0x02000000,
1320 },{
1321 .type = CX88_VMUX_TELEVISION,
1322 .vmux = 0,
1323 .gpio0 = 0x00018300,
1324 .gpio1 = 0x0000f207,
1325 .gpio2 = 0x00017304,
1326 .gpio3 = 0x02000000,
1327 },{
1328 .type = CX88_VMUX_COMPOSITE1,
1329 .vmux = 1,
1330 .gpio0 = 0x00018301,
1331 .gpio1 = 0x0000f207,
1332 .gpio2 = 0x00017304,
1333 .gpio3 = 0x02000000,
1334 },{
1335 .type = CX88_VMUX_SVIDEO,
1336 .vmux = 2,
1337 .gpio0 = 0x00018301,
1338 .gpio1 = 0x0000f207,
1339 .gpio2 = 0x00017304,
1340 .gpio3 = 0x02000000,
1341 }},
1342 .radio = {
1343 .type = CX88_RADIO,
1344 .gpio0 = 0x00015702,
1345 .gpio1 = 0x0000f207,
1346 .gpio2 = 0x00015702,
1347 .gpio3 = 0x02000000,
1348 },
1349 .mpeg = CX88_MPEG_DVB,
1350 },
Saqeb Akhterc02a34f2006-06-29 20:29:33 -03001351 [CX88_BOARD_GENIATECH_DVBS] = {
1352 .name = "Geniatech DVB-S",
1353 .tuner_type = TUNER_ABSENT,
1354 .radio_type = UNSET,
1355 .tuner_addr = ADDR_UNSET,
1356 .radio_addr = ADDR_UNSET,
1357 .input = {{
1358 .type = CX88_VMUX_DVB,
1359 .vmux = 0,
1360 },{
1361 .type = CX88_VMUX_COMPOSITE1,
1362 .vmux = 1,
1363 }},
Michael Krufky48d5e802006-09-25 14:09:10 -03001364 .mpeg = CX88_MPEG_DVB,
Saqeb Akhterc02a34f2006-06-29 20:29:33 -03001365 },
Eric Thomasad10c932006-08-08 09:10:04 -03001366 [CX88_BOARD_HAUPPAUGE_HVR3000] = {
Eric Thomasad10c932006-08-08 09:10:04 -03001367 .name = "Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DVB-T",
1368 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1369 .radio_type = UNSET,
1370 .tuner_addr = ADDR_UNSET,
1371 .radio_addr = ADDR_UNSET,
1372 .tda9887_conf = TDA9887_PRESENT,
Darron Broad923ac7f2008-10-11 11:49:30 -03001373 .audio_chip = V4L2_IDENT_WM8775,
Eric Thomasad10c932006-08-08 09:10:04 -03001374 .input = {{
1375 .type = CX88_VMUX_TELEVISION,
1376 .vmux = 0,
1377 .gpio0 = 0x84bf,
Darron Broad649e13a2008-10-15 14:12:30 -03001378 /* 1: TV Audio / FM Mono */
Darron Broad923ac7f2008-10-11 11:49:30 -03001379 .audioroute = 1,
Eric Thomasad10c932006-08-08 09:10:04 -03001380 },{
1381 .type = CX88_VMUX_COMPOSITE1,
1382 .vmux = 1,
1383 .gpio0 = 0x84bf,
Darron Broad649e13a2008-10-15 14:12:30 -03001384 /* 2: Line-In */
Darron Broad923ac7f2008-10-11 11:49:30 -03001385 .audioroute = 2,
Eric Thomasad10c932006-08-08 09:10:04 -03001386 },{
1387 .type = CX88_VMUX_SVIDEO,
1388 .vmux = 2,
1389 .gpio0 = 0x84bf,
Darron Broad649e13a2008-10-15 14:12:30 -03001390 /* 2: Line-In */
Darron Broad923ac7f2008-10-11 11:49:30 -03001391 .audioroute = 2,
Eric Thomasad10c932006-08-08 09:10:04 -03001392 }},
Darron Broad63248f22008-10-11 11:57:59 -03001393 .radio = {
1394 .type = CX88_RADIO,
1395 .gpio0 = 0x84bf,
Darron Broad649e13a2008-10-15 14:12:30 -03001396 /* 4: FM Stereo (untested) */
1397 .audioroute = 8,
Darron Broad63248f22008-10-11 11:57:59 -03001398 },
Steven Toth76dc82a2006-09-30 00:43:58 -03001399 .mpeg = CX88_MPEG_DVB,
Steven Toth363c35f2008-10-11 11:05:50 -03001400 .num_frontends = 2,
Eric Thomasad10c932006-08-08 09:10:04 -03001401 },
Peter Naullsd1009bd2006-08-08 09:10:05 -03001402 [CX88_BOARD_NORWOOD_MICRO] = {
1403 .name = "Norwood Micro TV Tuner",
1404 .tuner_type = TUNER_TNF_5335MF,
1405 .radio_type = UNSET,
1406 .tuner_addr = ADDR_UNSET,
1407 .radio_addr = ADDR_UNSET,
1408 .input = {{
1409 .type = CX88_VMUX_TELEVISION,
1410 .vmux = 0,
1411 .gpio0 = 0x0709,
1412 },{
1413 .type = CX88_VMUX_COMPOSITE1,
1414 .vmux = 1,
1415 .gpio0 = 0x070b,
1416 },{
1417 .type = CX88_VMUX_SVIDEO,
1418 .vmux = 2,
1419 .gpio0 = 0x070b,
1420 }},
1421 },
Michael Krufky5b26c822006-10-16 16:07:51 -03001422 [CX88_BOARD_TE_DTV_250_OEM_SWANN] = {
1423 .name = "Shenzhen Tungsten Ages Tech TE-DTV-250 / Swann OEM",
1424 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
1425 .radio_type = UNSET,
1426 .tuner_addr = ADDR_UNSET,
1427 .radio_addr = ADDR_UNSET,
1428 .input = {{
1429 .type = CX88_VMUX_TELEVISION,
1430 .vmux = 0,
1431 .gpio0 = 0x003fffff,
1432 .gpio1 = 0x00e00000,
1433 .gpio2 = 0x003fffff,
1434 .gpio3 = 0x02000000,
David Bussenschutt2acadef2006-08-08 09:10:05 -03001435 },{
Michael Krufky5b26c822006-10-16 16:07:51 -03001436 .type = CX88_VMUX_COMPOSITE1,
1437 .vmux = 1,
1438 .gpio0 = 0x003fffff,
1439 .gpio1 = 0x00e00000,
1440 .gpio2 = 0x003fffff,
1441 .gpio3 = 0x02000000,
1442 },{
1443 .type = CX88_VMUX_SVIDEO,
1444 .vmux = 2,
1445 .gpio0 = 0x003fffff,
1446 .gpio1 = 0x00e00000,
1447 .gpio2 = 0x003fffff,
1448 .gpio3 = 0x02000000,
1449 }},
1450 },
Steven Tothaa481a62006-09-14 15:41:13 -03001451 [CX88_BOARD_HAUPPAUGE_HVR1300] = {
1452 .name = "Hauppauge WinTV-HVR1300 DVB-T/Hybrid MPEG Encoder",
1453 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1454 .radio_type = UNSET,
1455 .tuner_addr = ADDR_UNSET,
1456 .radio_addr = ADDR_UNSET,
1457 .tda9887_conf = TDA9887_PRESENT,
Hans Verkuil38f9d302008-07-23 05:09:15 -03001458 .audio_chip = V4L2_IDENT_WM8775,
Steven Toth2491fbb2008-09-22 01:48:13 -03001459 /*
1460 * gpio0 as reported by Mike Crash <mike AT mikecrash.com>
1461 */
Steven Tothaa481a62006-09-14 15:41:13 -03001462 .input = {{
1463 .type = CX88_VMUX_TELEVISION,
1464 .vmux = 0,
Steven Toth2491fbb2008-09-22 01:48:13 -03001465 .gpio0 = 0xef88,
Darron Broad649e13a2008-10-15 14:12:30 -03001466 /* 1: TV Audio / FM Mono */
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -03001467 .audioroute = 1,
Steven Tothaa481a62006-09-14 15:41:13 -03001468 },{
1469 .type = CX88_VMUX_COMPOSITE1,
1470 .vmux = 1,
Steven Toth2491fbb2008-09-22 01:48:13 -03001471 .gpio0 = 0xef88,
Darron Broad649e13a2008-10-15 14:12:30 -03001472 /* 2: Line-In */
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -03001473 .audioroute = 2,
Steven Tothaa481a62006-09-14 15:41:13 -03001474 },{
1475 .type = CX88_VMUX_SVIDEO,
1476 .vmux = 2,
Steven Toth2491fbb2008-09-22 01:48:13 -03001477 .gpio0 = 0xef88,
Darron Broad649e13a2008-10-15 14:12:30 -03001478 /* 2: Line-In */
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -03001479 .audioroute = 2,
Steven Tothaa481a62006-09-14 15:41:13 -03001480 }},
Steven Toth6c5be742006-12-02 21:15:51 -02001481 .mpeg = CX88_MPEG_DVB | CX88_MPEG_BLACKBIRD,
Steven Toth6b92b3b2008-04-05 16:45:57 -03001482 .radio = {
1483 .type = CX88_RADIO,
Steven Toth2491fbb2008-09-22 01:48:13 -03001484 .gpio0 = 0xef88,
Darron Broad649e13a2008-10-15 14:12:30 -03001485 /* 4: FM Stereo (untested) */
1486 .audioroute = 8,
Steven Toth6b92b3b2008-04-05 16:45:57 -03001487 },
Steven Tothaa481a62006-09-14 15:41:13 -03001488 },
Dirk Herrendoerfer4f3ca2f12010-02-11 18:06:34 -03001489 [CX88_BOARD_SAMSUNG_SMT_7020] = {
1490 .name = "Samsung SMT 7020 DVB-S",
1491 .tuner_type = TUNER_ABSENT,
1492 .radio_type = UNSET,
1493 .tuner_addr = ADDR_UNSET,
1494 .radio_addr = ADDR_UNSET,
1495 .input = { {
1496 .type = CX88_VMUX_DVB,
1497 .vmux = 0,
1498 } },
1499 .mpeg = CX88_MPEG_DVB,
1500 },
Daniel Gimpelevich7cb47a12007-05-17 18:10:17 -03001501 [CX88_BOARD_ADSTECH_PTV_390] = {
1502 .name = "ADS Tech Instant Video PCI",
1503 .tuner_type = TUNER_ABSENT,
1504 .radio_type = UNSET,
1505 .tuner_addr = ADDR_UNSET,
1506 .radio_addr = ADDR_UNSET,
1507 .input = {{
1508 .type = CX88_VMUX_DEBUG,
1509 .vmux = 3,
1510 .gpio0 = 0x04ff,
1511 },{
1512 .type = CX88_VMUX_COMPOSITE1,
1513 .vmux = 1,
1514 .gpio0 = 0x07fa,
1515 },{
1516 .type = CX88_VMUX_SVIDEO,
1517 .vmux = 2,
1518 .gpio0 = 0x07fa,
1519 }},
1520 },
Steven Toth60464da2008-01-05 16:53:01 -03001521 [CX88_BOARD_PINNACLE_PCTV_HD_800i] = {
1522 .name = "Pinnacle PCTV HD 800i",
1523 .tuner_type = TUNER_XC5000,
1524 .radio_type = UNSET,
1525 .tuner_addr = ADDR_UNSET,
1526 .radio_addr = ADDR_UNSET,
1527 .input = {{
1528 .type = CX88_VMUX_TELEVISION,
1529 .vmux = 0,
1530 .gpio0 = 0x04fb,
1531 .gpio1 = 0x10ff,
1532 },{
1533 .type = CX88_VMUX_COMPOSITE1,
1534 .vmux = 1,
1535 .gpio0 = 0x04fb,
1536 .gpio1 = 0x10ef,
1537 .audioroute = 1,
1538 },{
1539 .type = CX88_VMUX_SVIDEO,
1540 .vmux = 2,
1541 .gpio0 = 0x04fb,
1542 .gpio1 = 0x10ef,
1543 .audioroute = 1,
1544 }},
1545 .mpeg = CX88_MPEG_DVB,
1546 },
Steven Toth5c00fac2008-04-22 14:45:14 -03001547 [CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO] = {
Michael Krufky8efd2e22008-04-22 14:45:14 -03001548 .name = "DViCO FusionHDTV 5 PCI nano",
1549 /* xc3008 tuner, digital only for now */
Steven Toth5c00fac2008-04-22 14:45:14 -03001550 .tuner_type = TUNER_ABSENT,
1551 .radio_type = UNSET,
1552 .tuner_addr = ADDR_UNSET,
1553 .radio_addr = ADDR_UNSET,
1554 .input = {{
1555 .type = CX88_VMUX_TELEVISION,
1556 .vmux = 0,
1557 .gpio0 = 0x000027df, /* Unconfirmed */
1558 }, {
1559 .type = CX88_VMUX_COMPOSITE1,
1560 .vmux = 1,
1561 .gpio0 = 0x000027df, /* Unconfirmed */
1562 .audioroute = 1,
1563 }, {
1564 .type = CX88_VMUX_SVIDEO,
1565 .vmux = 2,
1566 .gpio0 = 0x000027df, /* Unconfirmed */
1567 .audioroute = 1,
1568 } },
1569 .mpeg = CX88_MPEG_DVB,
1570 },
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03001571 [CX88_BOARD_PINNACLE_HYBRID_PCTV] = {
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001572 .name = "Pinnacle Hybrid PCTV",
1573 .tuner_type = TUNER_XC2028,
1574 .tuner_addr = 0x61,
Stéphane Voltz3f6014f2008-09-05 14:33:54 -03001575 .radio_type = TUNER_XC2028,
1576 .radio_addr = 0x61,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001577 .input = { {
1578 .type = CX88_VMUX_TELEVISION,
1579 .vmux = 0,
Stéphane Voltz3f6014f2008-09-05 14:33:54 -03001580 .gpio0 = 0x004ff,
1581 .gpio1 = 0x010ff,
1582 .gpio2 = 0x00001,
Chris Pascoeb3fb91d2008-04-22 14:45:15 -03001583 }, {
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001584 .type = CX88_VMUX_COMPOSITE1,
1585 .vmux = 1,
Stéphane Voltz3f6014f2008-09-05 14:33:54 -03001586 .gpio0 = 0x004fb,
1587 .gpio1 = 0x010ef,
1588 .audioroute = 1,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001589 }, {
1590 .type = CX88_VMUX_SVIDEO,
1591 .vmux = 2,
Stéphane Voltz3f6014f2008-09-05 14:33:54 -03001592 .gpio0 = 0x004fb,
1593 .gpio1 = 0x010ef,
1594 .audioroute = 1,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001595 } },
1596 .radio = {
1597 .type = CX88_RADIO,
1598 .gpio0 = 0x004ff,
1599 .gpio1 = 0x010ff,
1600 .gpio2 = 0x0ff,
1601 },
Stéphane Voltz3f6014f2008-09-05 14:33:54 -03001602 .mpeg = CX88_MPEG_DVB,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001603 },
Mauro Carvalho Chehab14422f92009-06-16 23:55:44 -03001604 /* Terry Wu <terrywu2009@gmail.com> */
1605 /* TV Audio : set GPIO 2, 18, 19 value to 0, 1, 0 */
1606 /* FM Audio : set GPIO 2, 18, 19 value to 0, 0, 0 */
1607 /* Line-in Audio : set GPIO 2, 18, 19 value to 0, 1, 1 */
1608 /* Mute Audio : set GPIO 2 value to 1 */
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001609 [CX88_BOARD_WINFAST_TV2000_XP_GLOBAL] = {
Mauro Carvalho Chehab14422f92009-06-16 23:55:44 -03001610 .name = "Leadtek TV2000 XP Global",
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001611 .tuner_type = TUNER_XC2028,
1612 .tuner_addr = 0x61,
Mauro Carvalho Chehab14422f92009-06-16 23:55:44 -03001613 .radio_type = TUNER_XC2028,
1614 .radio_addr = 0x61,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001615 .input = { {
1616 .type = CX88_VMUX_TELEVISION,
1617 .vmux = 0,
Mauro Carvalho Chehab14422f92009-06-16 23:55:44 -03001618 .gpio0 = 0x0400, /* pin 2 = 0 */
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001619 .gpio1 = 0x0000,
Mauro Carvalho Chehab14422f92009-06-16 23:55:44 -03001620 .gpio2 = 0x0C04, /* pin 18 = 1, pin 19 = 0 */
1621 .gpio3 = 0x0000,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001622 }, {
1623 .type = CX88_VMUX_COMPOSITE1,
1624 .vmux = 1,
Mauro Carvalho Chehab14422f92009-06-16 23:55:44 -03001625 .gpio0 = 0x0400, /* pin 2 = 0 */
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001626 .gpio1 = 0x0000,
Mauro Carvalho Chehab14422f92009-06-16 23:55:44 -03001627 .gpio2 = 0x0C0C, /* pin 18 = 1, pin 19 = 1 */
1628 .gpio3 = 0x0000,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001629 }, {
1630 .type = CX88_VMUX_SVIDEO,
1631 .vmux = 2,
Mauro Carvalho Chehab14422f92009-06-16 23:55:44 -03001632 .gpio0 = 0x0400, /* pin 2 = 0 */
1633 .gpio1 = 0x0000,
1634 .gpio2 = 0x0C0C, /* pin 18 = 1, pin 19 = 1 */
1635 .gpio3 = 0x0000,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001636 } },
1637 .radio = {
1638 .type = CX88_RADIO,
Mauro Carvalho Chehab14422f92009-06-16 23:55:44 -03001639 .gpio0 = 0x0400, /* pin 2 = 0 */
1640 .gpio1 = 0x0000,
1641 .gpio2 = 0x0C00, /* pin 18 = 0, pin 19 = 0 */
1642 .gpio3 = 0x0000,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001643 },
1644 },
1645 [CX88_BOARD_POWERCOLOR_REAL_ANGEL] = {
Daniel Gimpelevicha9606ce2008-06-03 21:29:45 -03001646 .name = "PowerColor RA330", /* Long names may confuse LIRC. */
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001647 .tuner_type = TUNER_XC2028,
1648 .tuner_addr = 0x61,
1649 .input = { {
Daniel Gimpelevicha9606ce2008-06-03 21:29:45 -03001650 .type = CX88_VMUX_DEBUG,
1651 .vmux = 3, /* Due to the way the cx88 driver is written, */
1652 .gpio0 = 0x00ff, /* there is no way to deactivate audio pass- */
1653 .gpio1 = 0xf39d, /* through without this entry. Furthermore, if */
1654 .gpio3 = 0x0000, /* the TV mux entry is first, you get audio */
1655 }, { /* from the tuner on boot for a little while. */
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001656 .type = CX88_VMUX_TELEVISION,
1657 .vmux = 0,
Dâniel Fragaab364982008-04-08 19:54:49 -03001658 .gpio0 = 0x00ff,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001659 .gpio1 = 0xf35d,
Dâniel Fragaab364982008-04-08 19:54:49 -03001660 .gpio3 = 0x0000,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001661 }, {
1662 .type = CX88_VMUX_COMPOSITE1,
1663 .vmux = 1,
Dâniel Fragaab364982008-04-08 19:54:49 -03001664 .gpio0 = 0x00ff,
1665 .gpio1 = 0xf37d,
1666 .gpio3 = 0x0000,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001667 }, {
1668 .type = CX88_VMUX_SVIDEO,
1669 .vmux = 2,
1670 .gpio0 = 0x000ff,
1671 .gpio1 = 0x0f37d,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001672 .gpio3 = 0x00000,
1673 } },
1674 .radio = {
1675 .type = CX88_RADIO,
1676 .gpio0 = 0x000ff,
1677 .gpio1 = 0x0f35d,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001678 .gpio3 = 0x00000,
1679 },
1680 },
1681 [CX88_BOARD_GENIATECH_X8000_MT] = {
1682 /* Also PowerColor Real Angel 330 and Geniatech X800 OEM */
1683 .name = "Geniatech X8000-MT DVBT",
1684 .tuner_type = TUNER_XC2028,
1685 .tuner_addr = 0x61,
1686 .input = { {
1687 .type = CX88_VMUX_TELEVISION,
1688 .vmux = 0,
1689 .gpio0 = 0x00000000,
1690 .gpio1 = 0x00e3e341,
1691 .gpio2 = 0x00000000,
1692 .gpio3 = 0x00000000,
1693 }, {
1694 .type = CX88_VMUX_COMPOSITE1,
1695 .vmux = 1,
1696 .gpio0 = 0x00000000,
1697 .gpio1 = 0x00e3e361,
1698 .gpio2 = 0x00000000,
1699 .gpio3 = 0x00000000,
1700 }, {
1701 .type = CX88_VMUX_SVIDEO,
1702 .vmux = 2,
1703 .gpio0 = 0x00000000,
1704 .gpio1 = 0x00e3e361,
1705 .gpio2 = 0x00000000,
1706 .gpio3 = 0x00000000,
1707 } },
1708 .radio = {
1709 .type = CX88_RADIO,
1710 .gpio0 = 0x00000000,
1711 .gpio1 = 0x00e3e341,
1712 .gpio2 = 0x00000000,
1713 .gpio3 = 0x00000000,
1714 },
1715 .mpeg = CX88_MPEG_DVB,
1716 },
1717 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO] = {
1718 .name = "DViCO FusionHDTV DVB-T PRO",
Tim Farrington19c309e2008-10-11 12:44:38 -03001719 .tuner_type = TUNER_XC2028,
1720 .tuner_addr = 0x61,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001721 .radio_type = UNSET,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001722 .radio_addr = ADDR_UNSET,
1723 .input = { {
1724 .type = CX88_VMUX_COMPOSITE1,
1725 .vmux = 1,
1726 .gpio0 = 0x000067df,
1727 }, {
1728 .type = CX88_VMUX_SVIDEO,
1729 .vmux = 2,
1730 .gpio0 = 0x000067df,
1731 } },
1732 .mpeg = CX88_MPEG_DVB,
1733 },
Steven Toth1117d6b2008-04-22 14:45:34 -03001734 [CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD] = {
Michael Krufky76464d42008-04-22 14:45:35 -03001735 .name = "DViCO FusionHDTV 7 Gold",
Steven Toth1117d6b2008-04-22 14:45:34 -03001736 .tuner_type = TUNER_XC5000,
1737 .radio_type = UNSET,
1738 .tuner_addr = ADDR_UNSET,
1739 .radio_addr = ADDR_UNSET,
1740 .input = {{
1741 .type = CX88_VMUX_TELEVISION,
1742 .vmux = 0,
Michael Krufky76464d42008-04-22 14:45:35 -03001743 .gpio0 = 0x10df,
Steven Toth1117d6b2008-04-22 14:45:34 -03001744 },{
1745 .type = CX88_VMUX_COMPOSITE1,
1746 .vmux = 1,
Michael Krufky76464d42008-04-22 14:45:35 -03001747 .gpio0 = 0x16d9,
Steven Toth1117d6b2008-04-22 14:45:34 -03001748 },{
1749 .type = CX88_VMUX_SVIDEO,
1750 .vmux = 2,
Michael Krufky76464d42008-04-22 14:45:35 -03001751 .gpio0 = 0x16d9,
Steven Toth1117d6b2008-04-22 14:45:34 -03001752 }},
Steven Tothd893d5d2008-04-25 03:46:43 -03001753 .mpeg = CX88_MPEG_DVB,
Steven Toth1117d6b2008-04-22 14:45:34 -03001754 },
Mauro Carvalho Chehab2422a9b2008-04-22 14:46:00 -03001755 [CX88_BOARD_PROLINK_PV_8000GT] = {
1756 .name = "Prolink Pixelview MPEG 8000GT",
1757 .tuner_type = TUNER_XC2028,
1758 .tuner_addr = 0x61,
1759 .input = { {
1760 .type = CX88_VMUX_TELEVISION,
1761 .vmux = 0,
1762 .gpio0 = 0x0ff,
1763 .gpio2 = 0x0cfb,
1764 }, {
1765 .type = CX88_VMUX_COMPOSITE1,
1766 .vmux = 1,
1767 .gpio2 = 0x0cfb,
1768 }, {
1769 .type = CX88_VMUX_SVIDEO,
1770 .vmux = 2,
1771 .gpio2 = 0x0cfb,
1772 } },
1773 .radio = {
1774 .type = CX88_RADIO,
1775 .gpio2 = 0x0cfb,
1776 },
1777 },
Mauro Carvalho Chehaba31d2bb2008-09-29 12:08:29 -03001778 [CX88_BOARD_PROLINK_PV_GLOBAL_XTREME] = {
1779 .name = "Prolink Pixelview Global Extreme",
1780 .tuner_type = TUNER_XC2028,
1781 .tuner_addr = 0x61,
1782 .input = { {
1783 .type = CX88_VMUX_TELEVISION,
1784 .vmux = 0,
1785 .gpio0 = 0x04fb,
1786 .gpio1 = 0x04080,
1787 .gpio2 = 0x0cf7,
1788 }, {
1789 .type = CX88_VMUX_COMPOSITE1,
1790 .vmux = 1,
1791 .gpio0 = 0x04fb,
1792 .gpio1 = 0x04080,
1793 .gpio2 = 0x0cfb,
1794 }, {
1795 .type = CX88_VMUX_SVIDEO,
1796 .vmux = 2,
1797 .gpio0 = 0x04fb,
1798 .gpio1 = 0x04080,
1799 .gpio2 = 0x0cfb,
1800 } },
1801 .radio = {
1802 .type = CX88_RADIO,
1803 .gpio0 = 0x04ff,
1804 .gpio1 = 0x04080,
1805 .gpio2 = 0x0cf7,
1806 },
1807 },
Mauro Carvalho Chehab99e09ea2008-03-27 23:18:30 -03001808 /* Both radio, analog and ATSC work with this board.
1809 However, for analog to work, s5h1409 gate should be open,
1810 otherwise, tuner-xc3028 won't be detected.
1811 A proper fix require using the newer i2c methods to add
1812 tuner-xc3028 without doing an i2c probe.
1813 */
1814 [CX88_BOARD_KWORLD_ATSC_120] = {
1815 .name = "Kworld PlusTV HD PCI 120 (ATSC 120)",
1816 .tuner_type = TUNER_XC2028,
1817 .radio_type = UNSET,
1818 .tuner_addr = ADDR_UNSET,
1819 .radio_addr = ADDR_UNSET,
1820 .input = { {
1821 .type = CX88_VMUX_TELEVISION,
1822 .vmux = 0,
1823 .gpio0 = 0x000000ff,
1824 .gpio1 = 0x0000f35d,
1825 .gpio2 = 0x00000000,
1826 }, {
1827 .type = CX88_VMUX_COMPOSITE1,
1828 .vmux = 1,
1829 .gpio0 = 0x000000ff,
1830 .gpio1 = 0x0000f37e,
1831 .gpio2 = 0x00000000,
1832 }, {
1833 .type = CX88_VMUX_SVIDEO,
1834 .vmux = 2,
1835 .gpio0 = 0x000000ff,
1836 .gpio1 = 0x0000f37e,
1837 .gpio2 = 0x00000000,
1838 } },
1839 .radio = {
1840 .type = CX88_RADIO,
1841 .gpio0 = 0x000000ff,
1842 .gpio1 = 0x0000f35d,
1843 .gpio2 = 0x00000000,
1844 },
1845 .mpeg = CX88_MPEG_DVB,
1846 },
Steven Toth5bd1b662008-09-04 01:17:33 -03001847 [CX88_BOARD_HAUPPAUGE_HVR4000] = {
1848 .name = "Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid",
1849 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1850 .radio_type = UNSET,
1851 .tuner_addr = ADDR_UNSET,
1852 .radio_addr = ADDR_UNSET,
1853 .tda9887_conf = TDA9887_PRESENT,
Darron Broad923ac7f2008-10-11 11:49:30 -03001854 .audio_chip = V4L2_IDENT_WM8775,
Steven Toth5bd1b662008-09-04 01:17:33 -03001855 /*
1856 * GPIO0 (WINTV2000)
1857 *
1858 * Analogue SAT DVB-T
1859 * Antenna 0xc4bf 0xc4bb
1860 * Composite 0xc4bf 0xc4bb
1861 * S-Video 0xc4bf 0xc4bb
1862 * Composite1 0xc4ff 0xc4fb
1863 * S-Video1 0xc4ff 0xc4fb
Steven Toth2491fbb2008-09-22 01:48:13 -03001864 *
1865 * BIT VALUE FUNCTION GP{x}_IO
1866 * 0 1 I:?
1867 * 1 1 I:?
Darron Broad63248f22008-10-11 11:57:59 -03001868 * 2 1 O:MPEG PORT 0=DVB-T 1=DVB-S
Steven Toth2491fbb2008-09-22 01:48:13 -03001869 * 3 1 I:?
1870 * 4 1 I:?
1871 * 5 1 I:?
1872 * 6 0 O:INPUT SELECTOR 0=INTERNAL 1=EXPANSION
1873 * 7 1 O:DVB-T DEMOD RESET LOW
1874 *
1875 * BIT VALUE FUNCTION GP{x}_OE
1876 * 8 0 I
1877 * 9 0 I
1878 * a 1 O
1879 * b 0 I
1880 * c 0 I
1881 * d 0 I
1882 * e 1 O
1883 * f 1 O
Darron Broad649e13a2008-10-15 14:12:30 -03001884 *
1885 * WM8775 ADC
1886 *
1887 * 1: TV Audio / FM Mono
1888 * 2: Line-In
1889 * 3: Line-In Expansion
1890 * 4: FM Stereo
Steven Toth5bd1b662008-09-04 01:17:33 -03001891 */
1892 .input = {{
1893 .type = CX88_VMUX_TELEVISION,
1894 .vmux = 0,
1895 .gpio0 = 0xc4bf,
Darron Broad649e13a2008-10-15 14:12:30 -03001896 /* 1: TV Audio / FM Mono */
Darron Broad923ac7f2008-10-11 11:49:30 -03001897 .audioroute = 1,
Steven Toth5bd1b662008-09-04 01:17:33 -03001898 }, {
1899 .type = CX88_VMUX_COMPOSITE1,
1900 .vmux = 1,
1901 .gpio0 = 0xc4bf,
Darron Broad649e13a2008-10-15 14:12:30 -03001902 /* 2: Line-In */
Darron Broad923ac7f2008-10-11 11:49:30 -03001903 .audioroute = 2,
Steven Toth5bd1b662008-09-04 01:17:33 -03001904 }, {
1905 .type = CX88_VMUX_SVIDEO,
1906 .vmux = 2,
1907 .gpio0 = 0xc4bf,
Darron Broad649e13a2008-10-15 14:12:30 -03001908 /* 2: Line-In */
Darron Broad923ac7f2008-10-11 11:49:30 -03001909 .audioroute = 2,
Steven Toth5bd1b662008-09-04 01:17:33 -03001910 } },
Darron Broad63248f22008-10-11 11:57:59 -03001911 .radio = {
1912 .type = CX88_RADIO,
1913 .gpio0 = 0xc4bf,
Darron Broad649e13a2008-10-15 14:12:30 -03001914 /* 4: FM Stereo */
1915 .audioroute = 8,
Darron Broad63248f22008-10-11 11:57:59 -03001916 },
Steven Toth5bd1b662008-09-04 01:17:33 -03001917 .mpeg = CX88_MPEG_DVB,
Steven Toth363c35f2008-10-11 11:05:50 -03001918 .num_frontends = 2,
Steven Toth5bd1b662008-09-04 01:17:33 -03001919 },
1920 [CX88_BOARD_HAUPPAUGE_HVR4000LITE] = {
1921 .name = "Hauppauge WinTV-HVR4000(Lite) DVB-S/S2",
1922 .tuner_type = UNSET,
1923 .radio_type = UNSET,
1924 .tuner_addr = ADDR_UNSET,
1925 .radio_addr = ADDR_UNSET,
1926 .input = {{
1927 .type = CX88_VMUX_DVB,
1928 .vmux = 0,
1929 } },
1930 .mpeg = CX88_MPEG_DVB,
1931 },
Igor M. Liplianine4aab642008-09-23 15:43:57 -03001932 [CX88_BOARD_TEVII_S420] = {
1933 .name = "TeVii S420 DVB-S",
1934 .tuner_type = UNSET,
1935 .radio_type = UNSET,
1936 .tuner_addr = ADDR_UNSET,
1937 .radio_addr = ADDR_UNSET,
1938 .input = {{
1939 .type = CX88_VMUX_DVB,
1940 .vmux = 0,
1941 } },
1942 .mpeg = CX88_MPEG_DVB,
1943 },
Igor M. Liplianinaf832622008-09-04 17:24:14 -03001944 [CX88_BOARD_TEVII_S460] = {
1945 .name = "TeVii S460 DVB-S/S2",
1946 .tuner_type = UNSET,
1947 .radio_type = UNSET,
1948 .tuner_addr = ADDR_UNSET,
1949 .radio_addr = ADDR_UNSET,
1950 .input = {{
1951 .type = CX88_VMUX_DVB,
1952 .vmux = 0,
1953 } },
1954 .mpeg = CX88_MPEG_DVB,
1955 },
Igor M. Liplianin0cb73632011-02-25 18:41:24 -03001956 [CX88_BOARD_TEVII_S464] = {
1957 .name = "TeVii S464 DVB-S/S2",
1958 .tuner_type = UNSET,
1959 .radio_type = UNSET,
1960 .tuner_addr = ADDR_UNSET,
1961 .radio_addr = ADDR_UNSET,
1962 .input = {{
1963 .type = CX88_VMUX_DVB,
1964 .vmux = 0,
1965 } },
1966 .mpeg = CX88_MPEG_DVB,
1967 },
Oleg Roitburd4cd7fb82008-09-17 11:30:21 -03001968 [CX88_BOARD_OMICOM_SS4_PCI] = {
1969 .name = "Omicom SS4 DVB-S/S2 PCI",
1970 .tuner_type = UNSET,
1971 .radio_type = UNSET,
1972 .tuner_addr = ADDR_UNSET,
1973 .radio_addr = ADDR_UNSET,
1974 .input = {{
1975 .type = CX88_VMUX_DVB,
1976 .vmux = 0,
1977 } },
1978 .mpeg = CX88_MPEG_DVB,
1979 },
Igor M. Liplianin4b296312008-11-09 15:25:31 -03001980 [CX88_BOARD_TBS_8910] = {
1981 .name = "TBS 8910 DVB-S",
1982 .tuner_type = UNSET,
1983 .radio_type = UNSET,
1984 .tuner_addr = ADDR_UNSET,
1985 .radio_addr = ADDR_UNSET,
1986 .input = {{
1987 .type = CX88_VMUX_DVB,
1988 .vmux = 0,
1989 } },
1990 .mpeg = CX88_MPEG_DVB,
1991 },
Oleg Roitburdee730422008-09-17 11:58:33 -03001992 [CX88_BOARD_TBS_8920] = {
1993 .name = "TBS 8920 DVB-S/S2",
1994 .tuner_type = TUNER_ABSENT,
1995 .radio_type = UNSET,
1996 .tuner_addr = ADDR_UNSET,
1997 .radio_addr = ADDR_UNSET,
1998 .input = {{
1999 .type = CX88_VMUX_DVB,
Igor M. Liplianinad5f74c2009-07-29 19:18:28 -03002000 .vmux = 0,
2001 .gpio0 = 0x8080,
Oleg Roitburdee730422008-09-17 11:58:33 -03002002 } },
2003 .mpeg = CX88_MPEG_DVB,
2004 },
Igor M. Liplianincd3cde12008-11-09 15:26:25 -03002005 [CX88_BOARD_PROF_6200] = {
2006 .name = "Prof 6200 DVB-S",
2007 .tuner_type = UNSET,
2008 .radio_type = UNSET,
2009 .tuner_addr = ADDR_UNSET,
2010 .radio_addr = ADDR_UNSET,
2011 .input = {{
2012 .type = CX88_VMUX_DVB,
2013 .vmux = 0,
2014 } },
2015 .mpeg = CX88_MPEG_DVB,
2016 },
Oleg Roitburd57f51db2008-10-08 06:48:08 -03002017 [CX88_BOARD_PROF_7300] = {
2018 .name = "PROF 7300 DVB-S/S2",
2019 .tuner_type = UNSET,
2020 .radio_type = UNSET,
2021 .tuner_addr = ADDR_UNSET,
2022 .radio_addr = ADDR_UNSET,
2023 .input = {{
2024 .type = CX88_VMUX_DVB,
2025 .vmux = 0,
2026 } },
2027 .mpeg = CX88_MPEG_DVB,
2028 },
Igor M. Liplianin4b296312008-11-09 15:25:31 -03002029 [CX88_BOARD_SATTRADE_ST4200] = {
2030 .name = "SATTRADE ST4200 DVB-S/S2",
2031 .tuner_type = UNSET,
2032 .radio_type = UNSET,
2033 .tuner_addr = ADDR_UNSET,
2034 .radio_addr = ADDR_UNSET,
2035 .input = {{
2036 .type = CX88_VMUX_DVB,
2037 .vmux = 0,
2038 } },
2039 .mpeg = CX88_MPEG_DVB,
2040 },
Stephan Wienczny70101a22009-03-10 19:08:06 -03002041 [CX88_BOARD_TERRATEC_CINERGY_HT_PCI_MKII] = {
2042 .name = "Terratec Cinergy HT PCI MKII",
2043 .tuner_type = TUNER_XC2028,
2044 .tuner_addr = 0x61,
2045 .radio_type = TUNER_XC2028,
2046 .radio_addr = 0x61,
2047 .input = { {
2048 .type = CX88_VMUX_TELEVISION,
2049 .vmux = 0,
2050 .gpio0 = 0x004ff,
2051 .gpio1 = 0x010ff,
2052 .gpio2 = 0x00001,
2053 }, {
2054 .type = CX88_VMUX_COMPOSITE1,
2055 .vmux = 1,
2056 .gpio0 = 0x004fb,
2057 .gpio1 = 0x010ef,
2058 .audioroute = 1,
2059 }, {
2060 .type = CX88_VMUX_SVIDEO,
2061 .vmux = 2,
2062 .gpio0 = 0x004fb,
2063 .gpio1 = 0x010ef,
2064 .audioroute = 1,
2065 } },
2066 .radio = {
2067 .type = CX88_RADIO,
2068 .gpio0 = 0x004ff,
2069 .gpio1 = 0x010ff,
2070 .gpio2 = 0x0ff,
2071 },
2072 .mpeg = CX88_MPEG_DVB,
2073 },
Steven Toth501d8cd2009-03-28 14:22:21 -03002074 [CX88_BOARD_HAUPPAUGE_IRONLY] = {
2075 .name = "Hauppauge WinTV-IR Only",
2076 .tuner_type = UNSET,
2077 .radio_type = UNSET,
2078 .tuner_addr = ADDR_UNSET,
2079 .radio_addr = ADDR_UNSET,
2080 },
Miroslav Sustek3047a172009-05-31 16:47:28 -03002081 [CX88_BOARD_WINFAST_DTV1800H] = {
2082 .name = "Leadtek WinFast DTV1800 Hybrid",
2083 .tuner_type = TUNER_XC2028,
2084 .radio_type = TUNER_XC2028,
2085 .tuner_addr = 0x61,
2086 .radio_addr = 0x61,
2087 /*
2088 * GPIO setting
2089 *
2090 * 2: mute (0=off,1=on)
2091 * 12: tuner reset pin
2092 * 13: audio source (0=tuner audio,1=line in)
2093 * 14: FM (0=on,1=off ???)
2094 */
2095 .input = {{
2096 .type = CX88_VMUX_TELEVISION,
2097 .vmux = 0,
2098 .gpio0 = 0x0400, /* pin 2 = 0 */
2099 .gpio1 = 0x6040, /* pin 13 = 0, pin 14 = 1 */
2100 .gpio2 = 0x0000,
2101 }, {
2102 .type = CX88_VMUX_COMPOSITE1,
2103 .vmux = 1,
2104 .gpio0 = 0x0400, /* pin 2 = 0 */
2105 .gpio1 = 0x6060, /* pin 13 = 1, pin 14 = 1 */
2106 .gpio2 = 0x0000,
2107 }, {
2108 .type = CX88_VMUX_SVIDEO,
2109 .vmux = 2,
2110 .gpio0 = 0x0400, /* pin 2 = 0 */
2111 .gpio1 = 0x6060, /* pin 13 = 1, pin 14 = 1 */
2112 .gpio2 = 0x0000,
2113 } },
2114 .radio = {
2115 .type = CX88_RADIO,
2116 .gpio0 = 0x0400, /* pin 2 = 0 */
2117 .gpio1 = 0x6000, /* pin 13 = 0, pin 14 = 0 */
2118 .gpio2 = 0x0000,
2119 },
2120 .mpeg = CX88_MPEG_DVB,
2121 },
Igor M. Liplianinb699c272009-11-16 22:22:32 -03002122 [CX88_BOARD_PROF_7301] = {
2123 .name = "Prof 7301 DVB-S/S2",
2124 .tuner_type = UNSET,
2125 .radio_type = UNSET,
2126 .tuner_addr = ADDR_UNSET,
2127 .radio_addr = ADDR_UNSET,
2128 .input = { {
2129 .type = CX88_VMUX_DVB,
2130 .vmux = 0,
2131 } },
2132 .mpeg = CX88_MPEG_DVB,
2133 },
Sergey Ivanov111ac842010-08-09 10:18:32 -03002134 [CX88_BOARD_TWINHAN_VP1027_DVBS] = {
2135 .name = "Twinhan VP-1027 DVB-S",
2136 .tuner_type = TUNER_ABSENT,
2137 .radio_type = UNSET,
2138 .tuner_addr = ADDR_UNSET,
2139 .radio_addr = ADDR_UNSET,
2140 .input = {{
2141 .type = CX88_VMUX_DVB,
2142 .vmux = 0,
2143 } },
2144 .mpeg = CX88_MPEG_DVB,
2145 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002146};
Linus Torvalds1da177e2005-04-16 15:20:36 -07002147
2148/* ------------------------------------------------------------------ */
2149/* PCI subsystem IDs */
2150
Trent Piephobbc83592007-08-15 14:41:58 -03002151static const struct cx88_subid cx88_subids[] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -07002152 {
2153 .subvendor = 0x0070,
2154 .subdevice = 0x3400,
2155 .card = CX88_BOARD_HAUPPAUGE,
2156 },{
2157 .subvendor = 0x0070,
2158 .subdevice = 0x3401,
2159 .card = CX88_BOARD_HAUPPAUGE,
2160 },{
2161 .subvendor = 0x14c7,
2162 .subdevice = 0x0106,
2163 .card = CX88_BOARD_GDI,
2164 },{
2165 .subvendor = 0x14c7,
2166 .subdevice = 0x0107, /* with mpeg encoder */
2167 .card = CX88_BOARD_GDI,
2168 },{
2169 .subvendor = PCI_VENDOR_ID_ATI,
2170 .subdevice = 0x00f8,
2171 .card = CX88_BOARD_ATI_WONDER_PRO,
Patrice Levesquebc13ae12008-11-02 16:37:35 -03002172 }, {
2173 .subvendor = PCI_VENDOR_ID_ATI,
2174 .subdevice = 0x00f9,
2175 .card = CX88_BOARD_ATI_WONDER_PRO,
2176 }, {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002177 .subvendor = 0x107d,
2178 .subdevice = 0x6611,
2179 .card = CX88_BOARD_WINFAST2000XP_EXPERT,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002180 },{
2181 .subvendor = 0x107d,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002182 .subdevice = 0x6613, /* NTSC */
2183 .card = CX88_BOARD_WINFAST2000XP_EXPERT,
2184 },{
2185 .subvendor = 0x107d,
2186 .subdevice = 0x6620,
2187 .card = CX88_BOARD_WINFAST_DV2000,
2188 },{
2189 .subvendor = 0x107d,
2190 .subdevice = 0x663b,
2191 .card = CX88_BOARD_LEADTEK_PVR2000,
2192 },{
2193 .subvendor = 0x107d,
Michael Krufky8dd86ee2006-09-16 19:09:38 -03002194 .subdevice = 0x663c,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002195 .card = CX88_BOARD_LEADTEK_PVR2000,
2196 },{
Linus Torvalds1da177e2005-04-16 15:20:36 -07002197 .subvendor = 0x1461,
2198 .subdevice = 0x000b,
Lubomir Bulej7418f342005-11-08 21:38:34 -08002199 .card = CX88_BOARD_AVERTV_STUDIO_303,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002200 },{
2201 .subvendor = 0x1462,
2202 .subdevice = 0x8606,
2203 .card = CX88_BOARD_MSI_TVANYWHERE_MASTER,
2204 },{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002205 .subvendor = 0x10fc,
2206 .subdevice = 0xd003,
2207 .card = CX88_BOARD_IODATA_GVVCP3PCI,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002208 },{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002209 .subvendor = 0x1043,
2210 .subdevice = 0x4823, /* with mpeg encoder */
2211 .card = CX88_BOARD_ASUS_PVR_416,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002212 },{
2213 .subvendor = 0x17de,
2214 .subdevice = 0x08a6,
2215 .card = CX88_BOARD_KWORLD_DVB_T,
2216 },{
2217 .subvendor = 0x18ac,
2218 .subdevice = 0xd810,
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -07002219 .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002220 },{
Michael Krufky097b7502005-06-23 22:04:43 -07002221 .subvendor = 0x18ac,
2222 .subdevice = 0xd820,
Michael Krufky80d34362005-06-23 22:04:55 -07002223 .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T,
Michael Krufky097b7502005-06-23 22:04:43 -07002224 },{
Michael Krufky7df64e82005-11-08 21:36:16 -08002225 .subvendor = 0x18ac,
2226 .subdevice = 0xdb00,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002227 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002228 },{
Linus Torvalds1da177e2005-04-16 15:20:36 -07002229 .subvendor = 0x0070,
2230 .subdevice = 0x9002,
2231 .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002232 },{
Linus Torvalds1da177e2005-04-16 15:20:36 -07002233 .subvendor = 0x14f1,
2234 .subdevice = 0x0187,
2235 .card = CX88_BOARD_CONEXANT_DVB_T1,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002236 },{
Linus Torvalds1da177e2005-04-16 15:20:36 -07002237 .subvendor = 0x1540,
2238 .subdevice = 0x2580,
2239 .card = CX88_BOARD_PROVIDEO_PV259,
2240 },{
Michael Krufky7df64e82005-11-08 21:36:16 -08002241 .subvendor = 0x18ac,
2242 .subdevice = 0xdb10,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002243 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
2244 },{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002245 .subvendor = 0x1554,
2246 .subdevice = 0x4811,
2247 .card = CX88_BOARD_PIXELVIEW,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002248 },{
2249 .subvendor = 0x7063,
2250 .subdevice = 0x3000, /* HD-3000 card */
2251 .card = CX88_BOARD_PCHDTV_HD3000,
2252 },{
Michael Krufky7df64e82005-11-08 21:36:16 -08002253 .subvendor = 0x17de,
2254 .subdevice = 0xa8a6,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002255 .card = CX88_BOARD_DNTV_LIVE_DVB_T,
2256 },{
2257 .subvendor = 0x0070,
2258 .subdevice = 0x2801,
2259 .card = CX88_BOARD_HAUPPAUGE_ROSLYN,
2260 },{
Michael Krufky7df64e82005-11-08 21:36:16 -08002261 .subvendor = 0x14f1,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002262 .subdevice = 0x0342,
2263 .card = CX88_BOARD_DIGITALLOGIC_MEC,
2264 },{
2265 .subvendor = 0x10fc,
2266 .subdevice = 0xd035,
2267 .card = CX88_BOARD_IODATA_GVBCTV7E,
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -07002268 },{
2269 .subvendor = 0x1421,
2270 .subdevice = 0x0334,
2271 .card = CX88_BOARD_ADSTECH_DVB_T_PCI,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002272 },{
Michael Krufkye057ee12005-07-07 17:58:40 -07002273 .subvendor = 0x153b,
2274 .subdevice = 0x1166,
2275 .card = CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002276 },{
Michael Krufky9fef07c2005-07-31 22:34:46 -07002277 .subvendor = 0x18ac,
2278 .subdevice = 0xd500,
2279 .card = CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002280 },{
Nickolay V. Shmyrevd45170e2005-11-08 21:36:15 -08002281 .subvendor = 0x1461,
2282 .subdevice = 0x8011,
2283 .card = CX88_BOARD_AVERMEDIA_ULTRATV_MC_550,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002284 },{
Kirk Lapraye976f9372005-11-08 21:37:04 -08002285 .subvendor = PCI_VENDOR_ID_ATI,
2286 .subdevice = 0xa101,
2287 .card = CX88_BOARD_ATI_HDTVWONDER,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002288 },{
David Shirley2b5200a2005-11-08 21:37:22 -08002289 .subvendor = 0x107d,
2290 .subdevice = 0x665f,
2291 .card = CX88_BOARD_WINFAST_DTV1000,
Lubomir Bulej7418f342005-11-08 21:38:34 -08002292 },{
2293 .subvendor = 0x1461,
2294 .subdevice = 0x000a,
2295 .card = CX88_BOARD_AVERTV_303,
Steven Toth0fa14aa2006-01-09 15:25:02 -02002296 },{
2297 .subvendor = 0x0070,
2298 .subdevice = 0x9200,
Steven Tothfb56cb62006-01-09 15:25:02 -02002299 .card = CX88_BOARD_HAUPPAUGE_NOVASE2_S1,
2300 },{
2301 .subvendor = 0x0070,
2302 .subdevice = 0x9201,
Steven Toth0fa14aa2006-01-09 15:25:02 -02002303 .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
2304 },{
2305 .subvendor = 0x0070,
2306 .subdevice = 0x9202,
Steven Tothfb56cb62006-01-09 15:25:02 -02002307 .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
Vadim Catana0e0351e2006-01-09 15:25:02 -02002308 },{
2309 .subvendor = 0x17de,
2310 .subdevice = 0x08b2,
2311 .card = CX88_BOARD_KWORLD_DVBS_100,
Steven Toth611900c2006-01-09 15:25:12 -02002312 },{
2313 .subvendor = 0x0070,
2314 .subdevice = 0x9400,
2315 .card = CX88_BOARD_HAUPPAUGE_HVR1100,
2316 },{
2317 .subvendor = 0x0070,
2318 .subdevice = 0x9402,
2319 .card = CX88_BOARD_HAUPPAUGE_HVR1100,
2320 },{
2321 .subvendor = 0x0070,
2322 .subdevice = 0x9800,
2323 .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
2324 },{
2325 .subvendor = 0x0070,
2326 .subdevice = 0x9802,
2327 .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
Steven Tothc432a072006-01-09 15:25:13 -02002328 },{
2329 .subvendor = 0x0070,
2330 .subdevice = 0x9001,
2331 .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
Chris Pascoefc40b262006-01-09 15:25:35 -02002332 },{
2333 .subvendor = 0x1822,
2334 .subdevice = 0x0025,
2335 .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
Manenti Marcof39624f2006-01-09 15:32:45 -02002336 },{
Chris Pascoeb9f4ad52006-01-09 18:21:39 -02002337 .subvendor = 0x17de,
2338 .subdevice = 0x08a1,
2339 .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
Chris Pascoe43eabb42006-01-09 18:21:28 -02002340 },{
2341 .subvendor = 0x18ac,
2342 .subdevice = 0xdb50,
2343 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
Michael Krufky6bfb2e12006-01-11 22:52:28 -02002344 },{
2345 .subvendor = 0x18ac,
Michael Krufkyf74a6b32006-01-17 03:50:23 -02002346 .subdevice = 0xdb54,
2347 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
2348 /* Re-branded DViCO: DigitalNow DVB-T Dual */
2349 },{
2350 .subvendor = 0x18ac,
Michael Krufky6bfb2e12006-01-11 22:52:28 -02002351 .subdevice = 0xdb11,
2352 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
2353 /* Re-branded DViCO: UltraView DVB-T Plus */
Chris Pascoeb3fb91d2008-04-22 14:45:15 -03002354 }, {
2355 .subvendor = 0x18ac,
2356 .subdevice = 0xdb30,
2357 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO,
2358 }, {
Michael Krufky44256de2006-02-07 06:49:14 -02002359 .subvendor = 0x17de,
2360 .subdevice = 0x0840,
Michael Krufky923da8a2007-03-11 12:52:48 -03002361 .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
2362 },{
2363 .subvendor = 0x1421,
2364 .subdevice = 0x0305,
Michael Krufky44256de2006-02-07 06:49:14 -02002365 .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
Chris Pascoe780dfef2006-02-28 08:34:59 -03002366 },{
2367 .subvendor = 0x18ac,
2368 .subdevice = 0xdb40,
2369 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
2370 },{
2371 .subvendor = 0x18ac,
2372 .subdevice = 0xdb44,
2373 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
Rusty Scottda215d22006-04-07 02:21:31 -03002374 },{
2375 .subvendor = 0x7063,
2376 .subdevice = 0x5500,
2377 .card = CX88_BOARD_PCHDTV_HD5500,
Valentin Zagurab3038302006-04-13 12:41:43 -03002378 },{
2379 .subvendor = 0x17de,
2380 .subdevice = 0x0841,
2381 .card = CX88_BOARD_KWORLD_MCE200_DELUXE,
Michael Krufkyfc066472006-05-22 10:32:05 -03002382 },{
2383 .subvendor = 0x1822,
2384 .subdevice = 0x0019,
2385 .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
Angelo Marconia31246222006-05-09 18:27:48 -03002386 },{
2387 .subvendor = 0x1554,
2388 .subdevice = 0x4813,
2389 .card = CX88_BOARD_PIXELVIEW_PLAYTV_P7000,
Ricardo Cerqueira680543c2006-05-22 07:44:02 -03002390 },{
2391 .subvendor = 0x14f1,
2392 .subdevice = 0x0842,
Ricardo Cerqueirabe4f4512006-06-08 17:36:17 -03002393 .card = CX88_BOARD_NPGTECH_REALTV_TOP10FM,
Malcolm Valentine4bd6e9d2006-05-29 13:51:59 -03002394 },{
2395 .subvendor = 0x107d,
2396 .subdevice = 0x665e,
2397 .card = CX88_BOARD_WINFAST_DTV2000H,
Michael Krufky65271bf2006-06-21 16:04:33 -03002398 },{
Vlastimil Labsky4d14c832009-08-10 22:15:54 -03002399 .subvendor = 0x107d,
2400 .subdevice = 0x6f2b,
2401 .card = CX88_BOARD_WINFAST_DTV2000H_J,
2402 },{
Michael Krufky65271bf2006-06-21 16:04:33 -03002403 .subvendor = 0x18ac,
2404 .subdevice = 0xd800, /* FusionHDTV 3 Gold (original revision) */
2405 .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
Saqeb Akhterc02a34f2006-06-29 20:29:33 -03002406 },{
2407 .subvendor = 0x14f1,
2408 .subdevice = 0x0084,
2409 .card = CX88_BOARD_GENIATECH_DVBS,
Eric Thomasad10c932006-08-08 09:10:04 -03002410 },{
2411 .subvendor = 0x0070,
2412 .subdevice = 0x1404,
2413 .card = CX88_BOARD_HAUPPAUGE_HVR3000,
Dirk Herrendoerfer4f3ca2f12010-02-11 18:06:34 -03002414 }, {
2415 .subvendor = 0x18ac,
2416 .subdevice = 0xdc00,
2417 .card = CX88_BOARD_SAMSUNG_SMT_7020,
2418 }, {
2419 .subvendor = 0x18ac,
2420 .subdevice = 0xdccd,
2421 .card = CX88_BOARD_SAMSUNG_SMT_7020,
Michael Krufky5dbaa2c2006-08-08 09:10:04 -03002422 },{
2423 .subvendor = 0x1461,
2424 .subdevice = 0xc111, /* AverMedia M150-D */
2425 /* This board is known to work with the ASUS PVR416 config */
2426 .card = CX88_BOARD_ASUS_PVR_416,
David Bussenschutt2acadef2006-08-08 09:10:05 -03002427 },{
2428 .subvendor = 0xc180,
2429 .subdevice = 0xc980,
2430 .card = CX88_BOARD_TE_DTV_250_OEM_SWANN,
Steven Tothaa481a62006-09-14 15:41:13 -03002431 },{
2432 .subvendor = 0x0070,
2433 .subdevice = 0x9600,
2434 .card = CX88_BOARD_HAUPPAUGE_HVR1300,
2435 },{
2436 .subvendor = 0x0070,
2437 .subdevice = 0x9601,
2438 .card = CX88_BOARD_HAUPPAUGE_HVR1300,
2439 },{
2440 .subvendor = 0x0070,
2441 .subdevice = 0x9602,
2442 .card = CX88_BOARD_HAUPPAUGE_HVR1300,
Michael Krufkydab489d2006-09-15 15:41:23 -03002443 },{
2444 .subvendor = 0x107d,
2445 .subdevice = 0x6632,
2446 .card = CX88_BOARD_LEADTEK_PVR2000,
Michael Krufky4508f592006-09-25 14:14:24 -03002447 },{
2448 .subvendor = 0x12ab,
2449 .subdevice = 0x2300, /* Club3D Zap TV2100 */
2450 .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
Steven Toth3979ecc2006-09-29 22:37:07 -03002451 },{
2452 .subvendor = 0x0070,
2453 .subdevice = 0x9000,
2454 .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
Steven Toth76dc82a2006-09-30 00:43:58 -03002455 },{
2456 .subvendor = 0x0070,
2457 .subdevice = 0x1400,
2458 .card = CX88_BOARD_HAUPPAUGE_HVR3000,
2459 },{
2460 .subvendor = 0x0070,
2461 .subdevice = 0x1401,
2462 .card = CX88_BOARD_HAUPPAUGE_HVR3000,
2463 },{
2464 .subvendor = 0x0070,
2465 .subdevice = 0x1402,
2466 .card = CX88_BOARD_HAUPPAUGE_HVR3000,
Michael Krufky733aeaf2007-03-11 12:48:04 -03002467 },{
2468 .subvendor = 0x1421,
2469 .subdevice = 0x0341, /* ADS Tech InstantTV DVB-S */
2470 .card = CX88_BOARD_KWORLD_DVBS_100,
Daniel Gimpelevich7cb47a12007-05-17 18:10:17 -03002471 },{
2472 .subvendor = 0x1421,
2473 .subdevice = 0x0390,
2474 .card = CX88_BOARD_ADSTECH_PTV_390,
Steven Toth60464da2008-01-05 16:53:01 -03002475 },{
2476 .subvendor = 0x11bd,
2477 .subdevice = 0x0051,
2478 .card = CX88_BOARD_PINNACLE_PCTV_HD_800i,
Steven Toth5c00fac2008-04-22 14:45:14 -03002479 }, {
2480 .subvendor = 0x18ac,
2481 .subdevice = 0xd530,
2482 .card = CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO,
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03002483 }, {
2484 .subvendor = 0x12ab,
2485 .subdevice = 0x1788,
2486 .card = CX88_BOARD_PINNACLE_HYBRID_PCTV,
2487 }, {
2488 .subvendor = 0x14f1,
2489 .subdevice = 0xea3d,
2490 .card = CX88_BOARD_POWERCOLOR_REAL_ANGEL,
2491 }, {
2492 .subvendor = 0x107d,
2493 .subdevice = 0x6f18,
2494 .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL,
2495 }, {
2496 .subvendor = 0x14f1,
2497 .subdevice = 0x8852,
2498 .card = CX88_BOARD_GENIATECH_X8000_MT,
Mauro Carvalho Chehab2422a9b2008-04-22 14:46:00 -03002499 }, {
Steven Toth1117d6b2008-04-22 14:45:34 -03002500 .subvendor = 0x18ac,
2501 .subdevice = 0xd610,
2502 .card = CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD,
Mauro Carvalho Chehab2422a9b2008-04-22 14:46:00 -03002503 }, {
2504 .subvendor = 0x1554,
2505 .subdevice = 0x4935,
2506 .card = CX88_BOARD_PROLINK_PV_8000GT,
Mauro Carvalho Chehab99e09ea2008-03-27 23:18:30 -03002507 }, {
Mauro Carvalho Chehaba31d2bb2008-09-29 12:08:29 -03002508 .subvendor = 0x1554,
2509 .subdevice = 0x4976,
2510 .card = CX88_BOARD_PROLINK_PV_GLOBAL_XTREME,
2511 }, {
Mauro Carvalho Chehab99e09ea2008-03-27 23:18:30 -03002512 .subvendor = 0x17de,
2513 .subdevice = 0x08c1,
2514 .card = CX88_BOARD_KWORLD_ATSC_120,
Steven Toth5bd1b662008-09-04 01:17:33 -03002515 }, {
2516 .subvendor = 0x0070,
2517 .subdevice = 0x6900,
2518 .card = CX88_BOARD_HAUPPAUGE_HVR4000,
2519 }, {
2520 .subvendor = 0x0070,
2521 .subdevice = 0x6904,
2522 .card = CX88_BOARD_HAUPPAUGE_HVR4000,
2523 }, {
2524 .subvendor = 0x0070,
2525 .subdevice = 0x6902,
2526 .card = CX88_BOARD_HAUPPAUGE_HVR4000,
2527 }, {
2528 .subvendor = 0x0070,
2529 .subdevice = 0x6905,
2530 .card = CX88_BOARD_HAUPPAUGE_HVR4000LITE,
2531 }, {
2532 .subvendor = 0x0070,
2533 .subdevice = 0x6906,
2534 .card = CX88_BOARD_HAUPPAUGE_HVR4000LITE,
Igor M. Liplianinaf832622008-09-04 17:24:14 -03002535 }, {
Igor M. Liplianine4aab642008-09-23 15:43:57 -03002536 .subvendor = 0xd420,
2537 .subdevice = 0x9022,
2538 .card = CX88_BOARD_TEVII_S420,
2539 }, {
2540 .subvendor = 0xd460,
Igor M. Liplianinaf832622008-09-04 17:24:14 -03002541 .subdevice = 0x9022,
2542 .card = CX88_BOARD_TEVII_S460,
Oleg Roitburd4cd7fb82008-09-17 11:30:21 -03002543 }, {
Igor M. Liplianin0cb73632011-02-25 18:41:24 -03002544 .subvendor = 0xd464,
2545 .subdevice = 0x9022,
2546 .card = CX88_BOARD_TEVII_S464,
2547 }, {
Oleg Roitburd4cd7fb82008-09-17 11:30:21 -03002548 .subvendor = 0xA044,
2549 .subdevice = 0x2011,
2550 .card = CX88_BOARD_OMICOM_SS4_PCI,
Oleg Roitburdee730422008-09-17 11:58:33 -03002551 }, {
Igor M. Liplianin4b296312008-11-09 15:25:31 -03002552 .subvendor = 0x8910,
2553 .subdevice = 0x8888,
2554 .card = CX88_BOARD_TBS_8910,
2555 }, {
Oleg Roitburdee730422008-09-17 11:58:33 -03002556 .subvendor = 0x8920,
2557 .subdevice = 0x8888,
2558 .card = CX88_BOARD_TBS_8920,
Oleg Roitburd57f51db2008-10-08 06:48:08 -03002559 }, {
Igor M. Liplianincd3cde12008-11-09 15:26:25 -03002560 .subvendor = 0xb022,
2561 .subdevice = 0x3022,
2562 .card = CX88_BOARD_PROF_6200,
2563 }, {
Oleg Roitburd57f51db2008-10-08 06:48:08 -03002564 .subvendor = 0xB033,
2565 .subdevice = 0x3033,
2566 .card = CX88_BOARD_PROF_7300,
Igor M. Liplianin4b296312008-11-09 15:25:31 -03002567 }, {
2568 .subvendor = 0xb200,
2569 .subdevice = 0x4200,
2570 .card = CX88_BOARD_SATTRADE_ST4200,
Stephan Wienczny70101a22009-03-10 19:08:06 -03002571 }, {
2572 .subvendor = 0x153b,
2573 .subdevice = 0x1177,
2574 .card = CX88_BOARD_TERRATEC_CINERGY_HT_PCI_MKII,
Steven Toth501d8cd2009-03-28 14:22:21 -03002575 }, {
2576 .subvendor = 0x0070,
2577 .subdevice = 0x9290,
2578 .card = CX88_BOARD_HAUPPAUGE_IRONLY,
Miroslav Sustek3047a172009-05-31 16:47:28 -03002579 }, {
2580 .subvendor = 0x107d,
2581 .subdevice = 0x6654,
2582 .card = CX88_BOARD_WINFAST_DTV1800H,
Mauro Carvalho Chehab14422f92009-06-16 23:55:44 -03002583 }, {
2584 /* PVR2000 PAL Model [107d:6630] */
2585 .subvendor = 0x107d,
2586 .subdevice = 0x6630,
2587 .card = CX88_BOARD_LEADTEK_PVR2000,
2588 }, {
2589 /* PVR2000 PAL Model [107d:6638] */
2590 .subvendor = 0x107d,
2591 .subdevice = 0x6638,
2592 .card = CX88_BOARD_LEADTEK_PVR2000,
2593 }, {
2594 /* PVR2000 NTSC Model [107d:6631] */
2595 .subvendor = 0x107d,
2596 .subdevice = 0x6631,
2597 .card = CX88_BOARD_LEADTEK_PVR2000,
2598 }, {
2599 /* PVR2000 NTSC Model [107d:6637] */
2600 .subvendor = 0x107d,
2601 .subdevice = 0x6637,
2602 .card = CX88_BOARD_LEADTEK_PVR2000,
2603 }, {
2604 /* PVR2000 NTSC Model [107d:663d] */
2605 .subvendor = 0x107d,
2606 .subdevice = 0x663d,
2607 .card = CX88_BOARD_LEADTEK_PVR2000,
2608 }, {
2609 /* DV2000 NTSC Model [107d:6621] */
2610 .subvendor = 0x107d,
2611 .subdevice = 0x6621,
2612 .card = CX88_BOARD_WINFAST_DV2000,
2613 }, {
2614 /* TV2000 XP Global [107d:6618] */
2615 .subvendor = 0x107d,
2616 .subdevice = 0x6618,
2617 .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL,
Igor M. Liplianinb699c272009-11-16 22:22:32 -03002618 }, {
2619 .subvendor = 0xb034,
2620 .subdevice = 0x3034,
2621 .card = CX88_BOARD_PROF_7301,
Sergey Ivanov111ac842010-08-09 10:18:32 -03002622 }, {
2623 .subvendor = 0x1822,
2624 .subdevice = 0x0023,
2625 .card = CX88_BOARD_TWINHAN_VP1027_DVBS,
Mauro Carvalho Chehab2422a9b2008-04-22 14:46:00 -03002626 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002627};
Linus Torvalds1da177e2005-04-16 15:20:36 -07002628
2629/* ----------------------------------------------------------------------- */
2630/* some leadtek specific stuff */
2631
Jean Delvare69f7e752006-12-23 14:11:03 -03002632static void leadtek_eeprom(struct cx88_core *core, u8 *eeprom_data)
Linus Torvalds1da177e2005-04-16 15:20:36 -07002633{
Linus Torvalds1da177e2005-04-16 15:20:36 -07002634 if (eeprom_data[4] != 0x7d ||
2635 eeprom_data[5] != 0x10 ||
2636 eeprom_data[7] != 0x66) {
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03002637 warn_printk(core, "Leadtek eeprom invalid.\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07002638 return;
2639 }
2640
Mauro Carvalho Chehab14422f92009-06-16 23:55:44 -03002641 /* Terry Wu <terrywu2009@gmail.com> */
2642 switch (eeprom_data[6]) {
2643 case 0x13: /* SSID 6613 for TV2000 XP Expert NTSC Model */
2644 case 0x21: /* SSID 6621 for DV2000 NTSC Model */
2645 case 0x31: /* SSID 6631 for PVR2000 NTSC Model */
2646 case 0x37: /* SSID 6637 for PVR2000 NTSC Model */
2647 case 0x3d: /* SSID 6637 for PVR2000 NTSC Model */
2648 core->board.tuner_type = TUNER_PHILIPS_FM1236_MK3;
2649 break;
2650 default:
2651 core->board.tuner_type = TUNER_PHILIPS_FM1216ME_MK3;
2652 break;
2653 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07002654
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03002655 info_printk(core, "Leadtek Winfast 2000XP Expert config: "
2656 "tuner=%d, eeprom[0]=0x%02x\n",
2657 core->board.tuner_type, eeprom_data[0]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002658}
2659
Linus Torvalds1da177e2005-04-16 15:20:36 -07002660static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data)
2661{
2662 struct tveeprom tv;
2663
Mauro Carvalho Chehab0f97a932005-09-09 13:04:05 -07002664 tveeprom_hauppauge_analog(&core->i2c_client, &tv, eeprom_data);
Trent Piepho6a59d642007-08-15 14:41:57 -03002665 core->board.tuner_type = tv.tuner_type;
Steven Toth0345c382006-01-09 15:25:17 -02002666 core->tuner_formats = tv.tuner_formats;
Trent Piepho6a59d642007-08-15 14:41:57 -03002667 core->board.radio.type = tv.has_radio ? CX88_RADIO : 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002668
2669 /* Make sure we support the board model */
Steven Toth3ca0ea92005-12-01 00:51:27 -08002670 switch (tv.model)
2671 {
Steven Toth76dc82a2006-09-30 00:43:58 -03002672 case 14009: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in) */
2673 case 14019: /* WinTV-HVR3000 (Retail, IR Blaster, b/panel video, 3.5mm audio in) */
2674 case 14029: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge) */
2675 case 14109: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - low profile) */
2676 case 14129: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge - LP) */
2677 case 14559: /* WinTV-HVR3000 (OEM, no IR, b/panel video, 3.5mm audio in) */
Eric Thomasad10c932006-08-08 09:10:04 -03002678 case 14569: /* WinTV-HVR3000 (OEM, no IR, no back panel video) */
Steven Toth76dc82a2006-09-30 00:43:58 -03002679 case 14659: /* WinTV-HVR3000 (OEM, no IR, b/panel video, RCA audio in - Low profile) */
2680 case 14669: /* WinTV-HVR3000 (OEM, no IR, no b/panel video - Low profile) */
Steven Toth0345c382006-01-09 15:25:17 -02002681 case 28552: /* WinTV-PVR 'Roslyn' (No IR) */
Ian Pickworth42d2b6e2006-01-23 17:11:07 -02002682 case 34519: /* WinTV-PCI-FM */
Steven Toth5bd1b662008-09-04 01:17:33 -03002683 case 69009:
2684 /* WinTV-HVR4000 (DVBS/S2/T, Video and IR, back panel inputs) */
2685 case 69100: /* WinTV-HVR4000LITE (DVBS/S2, IR) */
2686 case 69500: /* WinTV-HVR4000LITE (DVBS/S2, No IR) */
2687 case 69559:
2688 /* WinTV-HVR4000 (DVBS/S2/T, Video no IR, back panel inputs) */
2689 case 69569: /* WinTV-HVR4000 (DVBS/S2/T, Video no IR) */
Steven Toth759324c2005-12-01 00:51:26 -08002690 case 90002: /* Nova-T-PCI (9002) */
Steven Toth0fe22862005-12-01 00:51:41 -08002691 case 92001: /* Nova-S-Plus (Video and IR) */
2692 case 92002: /* Nova-S-Plus (Video and IR) */
2693 case 90003: /* Nova-T-PCI (9002 No RF out) */
Steven Toth759324c2005-12-01 00:51:26 -08002694 case 90500: /* Nova-T-PCI (oem) */
2695 case 90501: /* Nova-T-PCI (oem/IR) */
Steven Toth3ca0ea92005-12-01 00:51:27 -08002696 case 92000: /* Nova-SE2 (OEM, No Video or IR) */
Steven Toth501d8cd2009-03-28 14:22:21 -03002697 case 92900: /* WinTV-IROnly (No analog or digital Video inputs) */
Steven Toth611900c2006-01-09 15:25:12 -02002698 case 94009: /* WinTV-HVR1100 (Video and IR Retail) */
2699 case 94501: /* WinTV-HVR1100 (Video and IR OEM) */
Steven Tothaa481a62006-09-14 15:41:13 -03002700 case 96009: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX) */
2701 case 96019: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX/TX) */
2702 case 96559: /* WinTV-HVR1300 (PAL Video, MPEG Video no IR) */
2703 case 96569: /* WinTV-HVR1300 () */
2704 case 96659: /* WinTV-HVR1300 () */
Steven Toth611900c2006-01-09 15:25:12 -02002705 case 98559: /* WinTV-HVR1100LP (Video no IR, Retail - Low Profile) */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002706 /* known */
2707 break;
Dirk Herrendoerfer4f3ca2f12010-02-11 18:06:34 -03002708 case CX88_BOARD_SAMSUNG_SMT_7020:
2709 cx_set(MO_GP0_IO, 0x008989FF);
2710 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002711 default:
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03002712 warn_printk(core, "warning: unknown hauppauge model #%d\n",
2713 tv.model);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002714 break;
2715 }
2716
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03002717 info_printk(core, "hauppauge eeprom: model=%d\n", tv.model);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002718}
2719
2720/* ----------------------------------------------------------------------- */
2721/* some GDI (was: Modular Technology) specific stuff */
2722
lawrence rust2e4e98e2010-08-25 09:50:20 -03002723static const struct {
Linus Torvalds1da177e2005-04-16 15:20:36 -07002724 int id;
2725 int fm;
lawrence rust2e4e98e2010-08-25 09:50:20 -03002726 const char *name;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002727} gdi_tuner[] = {
2728 [ 0x01 ] = { .id = TUNER_ABSENT,
2729 .name = "NTSC_M" },
2730 [ 0x02 ] = { .id = TUNER_ABSENT,
2731 .name = "PAL_B" },
2732 [ 0x03 ] = { .id = TUNER_ABSENT,
2733 .name = "PAL_I" },
2734 [ 0x04 ] = { .id = TUNER_ABSENT,
2735 .name = "PAL_D" },
2736 [ 0x05 ] = { .id = TUNER_ABSENT,
2737 .name = "SECAM" },
2738
2739 [ 0x10 ] = { .id = TUNER_ABSENT,
2740 .fm = 1,
2741 .name = "TEMIC_4049" },
2742 [ 0x11 ] = { .id = TUNER_TEMIC_4136FY5,
2743 .name = "TEMIC_4136" },
2744 [ 0x12 ] = { .id = TUNER_ABSENT,
2745 .name = "TEMIC_4146" },
2746
2747 [ 0x20 ] = { .id = TUNER_PHILIPS_FQ1216ME,
2748 .fm = 1,
2749 .name = "PHILIPS_FQ1216_MK3" },
2750 [ 0x21 ] = { .id = TUNER_ABSENT, .fm = 1,
2751 .name = "PHILIPS_FQ1236_MK3" },
2752 [ 0x22 ] = { .id = TUNER_ABSENT,
2753 .name = "PHILIPS_FI1236_MK3" },
2754 [ 0x23 ] = { .id = TUNER_ABSENT,
2755 .name = "PHILIPS_FI1216_MK3" },
2756};
2757
2758static void gdi_eeprom(struct cx88_core *core, u8 *eeprom_data)
2759{
lawrence rust2e4e98e2010-08-25 09:50:20 -03002760 const char *name = (eeprom_data[0x0d] < ARRAY_SIZE(gdi_tuner))
Linus Torvalds1da177e2005-04-16 15:20:36 -07002761 ? gdi_tuner[eeprom_data[0x0d]].name : NULL;
2762
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03002763 info_printk(core, "GDI: tuner=%s\n", name ? name : "unknown");
Linus Torvalds1da177e2005-04-16 15:20:36 -07002764 if (NULL == name)
2765 return;
Trent Piepho6a59d642007-08-15 14:41:57 -03002766 core->board.tuner_type = gdi_tuner[eeprom_data[0x0d]].id;
2767 core->board.radio.type = gdi_tuner[eeprom_data[0x0d]].fm ?
2768 CX88_RADIO : 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002769}
2770
Chris Pascoeb3fb91d2008-04-22 14:45:15 -03002771/* ------------------------------------------------------------------- */
2772/* some Divco specific stuff */
Mauro Carvalho Chehab0be51b42008-04-22 14:46:10 -03002773static int cx88_dvico_xc2028_callback(struct cx88_core *core,
2774 int command, int arg)
Chris Pascoeb3fb91d2008-04-22 14:45:15 -03002775{
Chris Pascoeb3fb91d2008-04-22 14:45:15 -03002776 switch (command) {
2777 case XC2028_TUNER_RESET:
Michael Krufkyd7cba042008-09-12 13:31:45 -03002778 switch (core->boardnr) {
2779 case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
2780 /* GPIO-4 xc3028 tuner */
2781
2782 cx_set(MO_GP0_IO, 0x00001000);
2783 cx_clear(MO_GP0_IO, 0x00000010);
2784 msleep(100);
2785 cx_set(MO_GP0_IO, 0x00000010);
2786 msleep(100);
2787 break;
2788 default:
2789 cx_write(MO_GP0_IO, 0x101000);
2790 mdelay(5);
2791 cx_set(MO_GP0_IO, 0x101010);
2792 }
Chris Pascoeb3fb91d2008-04-22 14:45:15 -03002793 break;
2794 default:
2795 return -EINVAL;
2796 }
2797
2798 return 0;
2799}
2800
2801
Linus Torvalds1da177e2005-04-16 15:20:36 -07002802/* ----------------------------------------------------------------------- */
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03002803/* some Geniatech specific stuff */
2804
Mauro Carvalho Chehab0be51b42008-04-22 14:46:10 -03002805static int cx88_xc3028_geniatech_tuner_callback(struct cx88_core *core,
2806 int command, int mode)
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03002807{
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03002808 switch (command) {
2809 case XC2028_TUNER_RESET:
2810 switch (INPUT(core->input).type) {
2811 case CX88_RADIO:
Mauro Carvalho Chehabc450e502008-04-22 14:45:28 -03002812 break;
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03002813 case CX88_VMUX_DVB:
2814 cx_write(MO_GP1_IO, 0x030302);
2815 mdelay(50);
Mauro Carvalho Chehabc450e502008-04-22 14:45:28 -03002816 break;
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03002817 default:
2818 cx_write(MO_GP1_IO, 0x030301);
2819 mdelay(50);
Mauro Carvalho Chehabc450e502008-04-22 14:45:28 -03002820 }
2821 cx_write(MO_GP1_IO, 0x101010);
2822 mdelay(50);
2823 cx_write(MO_GP1_IO, 0x101000);
2824 mdelay(50);
2825 cx_write(MO_GP1_IO, 0x101010);
2826 mdelay(50);
2827 return 0;
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03002828 }
2829 return -EINVAL;
2830}
2831
Miroslav Sustek3047a172009-05-31 16:47:28 -03002832static int cx88_xc3028_winfast1800h_callback(struct cx88_core *core,
2833 int command, int arg)
2834{
2835 switch (command) {
2836 case XC2028_TUNER_RESET:
2837 /* GPIO 12 (xc3028 tuner reset) */
2838 cx_set(MO_GP1_IO, 0x1010);
2839 mdelay(50);
2840 cx_clear(MO_GP1_IO, 0x10);
2841 mdelay(50);
2842 cx_set(MO_GP1_IO, 0x10);
2843 mdelay(50);
2844 return 0;
2845 }
2846 return -EINVAL;
2847}
2848
Mauro Carvalho Chehab2422a9b2008-04-22 14:46:00 -03002849/* ------------------------------------------------------------------- */
2850/* some Divco specific stuff */
Mauro Carvalho Chehab0be51b42008-04-22 14:46:10 -03002851static int cx88_pv_8000gt_callback(struct cx88_core *core,
2852 int command, int arg)
Mauro Carvalho Chehab2422a9b2008-04-22 14:46:00 -03002853{
Mauro Carvalho Chehab2422a9b2008-04-22 14:46:00 -03002854 switch (command) {
2855 case XC2028_TUNER_RESET:
2856 cx_write(MO_GP2_IO, 0xcf7);
2857 mdelay(50);
2858 cx_write(MO_GP2_IO, 0xef5);
2859 mdelay(50);
2860 cx_write(MO_GP2_IO, 0xcf7);
2861 break;
2862 default:
2863 return -EINVAL;
2864 }
2865
2866 return 0;
2867}
2868
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03002869/* ----------------------------------------------------------------------- */
Chris Pascoe780dfef2006-02-28 08:34:59 -03002870/* some DViCO specific stuff */
2871
2872static void dvico_fusionhdtv_hybrid_init(struct cx88_core *core)
2873{
2874 struct i2c_msg msg = { .addr = 0x45, .flags = 0 };
2875 int i, err;
Chris Pascoe69b27e32006-02-28 20:23:11 -03002876 static u8 init_bufs[13][5] = {
Chris Pascoe780dfef2006-02-28 08:34:59 -03002877 { 0x10, 0x00, 0x20, 0x01, 0x03 },
2878 { 0x10, 0x10, 0x01, 0x00, 0x21 },
2879 { 0x10, 0x10, 0x10, 0x00, 0xCA },
2880 { 0x10, 0x10, 0x12, 0x00, 0x08 },
2881 { 0x10, 0x10, 0x13, 0x00, 0x0A },
2882 { 0x10, 0x10, 0x16, 0x01, 0xC0 },
2883 { 0x10, 0x10, 0x22, 0x01, 0x3D },
2884 { 0x10, 0x10, 0x73, 0x01, 0x2E },
2885 { 0x10, 0x10, 0x72, 0x00, 0xC5 },
2886 { 0x10, 0x10, 0x71, 0x01, 0x97 },
2887 { 0x10, 0x10, 0x70, 0x00, 0x0F },
2888 { 0x10, 0x10, 0xB0, 0x00, 0x01 },
2889 { 0x03, 0x0C },
2890 };
2891
Mauro Carvalho Chehab5b9c4e62007-03-28 22:37:26 -03002892 for (i = 0; i < ARRAY_SIZE(init_bufs); i++) {
Chris Pascoe780dfef2006-02-28 08:34:59 -03002893 msg.buf = init_bufs[i];
2894 msg.len = (i != 12 ? 5 : 2);
2895 err = i2c_transfer(&core->i2c_adap, &msg, 1);
2896 if (err != 1) {
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03002897 warn_printk(core, "dvico_fusionhdtv_hybrid_init buf %d "
2898 "failed (err = %d)!\n", i, err);
Chris Pascoe780dfef2006-02-28 08:34:59 -03002899 return;
2900 }
2901 }
2902}
2903
Mauro Carvalho Chehab0be51b42008-04-22 14:46:10 -03002904static int cx88_xc2028_tuner_callback(struct cx88_core *core,
2905 int command, int arg)
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03002906{
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03002907 /* Board-specific callbacks */
2908 switch (core->boardnr) {
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03002909 case CX88_BOARD_POWERCOLOR_REAL_ANGEL:
2910 case CX88_BOARD_GENIATECH_X8000_MT:
Mauro Carvalho Chehab99e09ea2008-03-27 23:18:30 -03002911 case CX88_BOARD_KWORLD_ATSC_120:
Mauro Carvalho Chehab0be51b42008-04-22 14:46:10 -03002912 return cx88_xc3028_geniatech_tuner_callback(core,
2913 command, arg);
Mauro Carvalho Chehab2422a9b2008-04-22 14:46:00 -03002914 case CX88_BOARD_PROLINK_PV_8000GT:
Mauro Carvalho Chehaba31d2bb2008-09-29 12:08:29 -03002915 case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
Mauro Carvalho Chehab0be51b42008-04-22 14:46:10 -03002916 return cx88_pv_8000gt_callback(core, command, arg);
Chris Pascoeb3fb91d2008-04-22 14:45:15 -03002917 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
Michael Krufkyd7cba042008-09-12 13:31:45 -03002918 case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
Mauro Carvalho Chehab0be51b42008-04-22 14:46:10 -03002919 return cx88_dvico_xc2028_callback(core, command, arg);
Mauro Carvalho Chehab14422f92009-06-16 23:55:44 -03002920 case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
Miroslav Sustek3047a172009-05-31 16:47:28 -03002921 case CX88_BOARD_WINFAST_DTV1800H:
2922 return cx88_xc3028_winfast1800h_callback(core, command, arg);
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03002923 }
2924
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03002925 switch (command) {
2926 case XC2028_TUNER_RESET:
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03002927 switch (INPUT(core->input).type) {
2928 case CX88_RADIO:
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03002929 info_printk(core, "setting GPIO to radio!\n");
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03002930 cx_write(MO_GP0_IO, 0x4ff);
2931 mdelay(250);
2932 cx_write(MO_GP2_IO, 0xff);
2933 mdelay(250);
Mauro Carvalho Chehabc450e502008-04-22 14:45:28 -03002934 break;
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03002935 case CX88_VMUX_DVB: /* Digital TV*/
2936 default: /* Analog TV */
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03002937 info_printk(core, "setting GPIO to TV!\n");
Mauro Carvalho Chehabc450e502008-04-22 14:45:28 -03002938 break;
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03002939 }
Mauro Carvalho Chehabc450e502008-04-22 14:45:28 -03002940 cx_write(MO_GP1_IO, 0x101010);
2941 mdelay(250);
2942 cx_write(MO_GP1_IO, 0x101000);
2943 mdelay(250);
2944 cx_write(MO_GP1_IO, 0x101010);
2945 mdelay(250);
2946 return 0;
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03002947 }
2948 return -EINVAL;
2949}
2950
Chris Pascoe780dfef2006-02-28 08:34:59 -03002951/* ----------------------------------------------------------------------- */
Steven Toth60464da2008-01-05 16:53:01 -03002952/* Tuner callback function. Currently only needed for the Pinnacle *
2953 * PCTV HD 800i with an xc5000 sillicon tuner. This is used for both *
2954 * analog tuner attach (tuner-core.c) and dvb tuner attach (cx88-dvb.c) */
2955
Mauro Carvalho Chehab0be51b42008-04-22 14:46:10 -03002956static int cx88_xc5000_tuner_callback(struct cx88_core *core,
2957 int command, int arg)
Steven Toth60464da2008-01-05 16:53:01 -03002958{
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03002959 switch (core->boardnr) {
Steven Toth60464da2008-01-05 16:53:01 -03002960 case CX88_BOARD_PINNACLE_PCTV_HD_800i:
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03002961 if (command == 0) { /* This is the reset command from xc5000 */
Devin Heitmuellerb8d91982009-05-14 21:50:36 -03002962
2963 /* djh - According to the engineer at PCTV Systems,
2964 the xc5000 reset pin is supposed to be on GPIO12.
2965 However, despite three nights of effort, pulling
2966 that GPIO low didn't reset the xc5000. While
2967 pulling MO_SRST_IO low does reset the xc5000, this
2968 also resets in the s5h1409 being reset as well.
2969 This causes tuning to always fail since the internal
2970 state of the s5h1409 does not match the driver's
2971 state. Given that the only two conditions in which
2972 the driver performs a reset is during firmware load
2973 and powering down the chip, I am taking out the
2974 reset. We know that the chip is being reset
2975 when the cx88 comes online, and not being able to
2976 do power management for this board is worse than
2977 not having any tuning at all. */
Steven Toth60464da2008-01-05 16:53:01 -03002978 return 0;
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03002979 } else {
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03002980 err_printk(core, "xc5000: unknown tuner "
2981 "callback command.\n");
Steven Toth60464da2008-01-05 16:53:01 -03002982 return -EINVAL;
2983 }
2984 break;
Steven Toth1117d6b2008-04-22 14:45:34 -03002985 case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD:
2986 if (command == 0) { /* This is the reset command from xc5000 */
2987 cx_clear(MO_GP0_IO, 0x00000010);
2988 msleep(10);
2989 cx_set(MO_GP0_IO, 0x00000010);
2990 return 0;
2991 } else {
2992 printk(KERN_ERR
2993 "xc5000: unknown tuner callback command.\n");
2994 return -EINVAL;
2995 }
2996 break;
Steven Toth60464da2008-01-05 16:53:01 -03002997 }
2998 return 0; /* Should never be here */
2999}
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03003000
Michael Krufkyd7cba042008-09-12 13:31:45 -03003001int cx88_tuner_callback(void *priv, int component, int command, int arg)
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03003002{
3003 struct i2c_algo_bit_data *i2c_algo = priv;
Mauro Carvalho Chehab0be51b42008-04-22 14:46:10 -03003004 struct cx88_core *core;
3005
3006 if (!i2c_algo) {
3007 printk(KERN_ERR "cx88: Error - i2c private data undefined.\n");
3008 return -EINVAL;
3009 }
3010
3011 core = i2c_algo->data;
3012
3013 if (!core) {
3014 printk(KERN_ERR "cx88: Error - device struct undefined.\n");
3015 return -EINVAL;
3016 }
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03003017
Michael Krufkyd7cba042008-09-12 13:31:45 -03003018 if (component != DVB_FRONTEND_COMPONENT_TUNER)
3019 return -EINVAL;
3020
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03003021 switch (core->board.tuner_type) {
3022 case TUNER_XC2028:
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03003023 info_printk(core, "Calling XC2028/3028 callback\n");
Mauro Carvalho Chehab0be51b42008-04-22 14:46:10 -03003024 return cx88_xc2028_tuner_callback(core, command, arg);
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03003025 case TUNER_XC5000:
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03003026 info_printk(core, "Calling XC5000 callback\n");
Mauro Carvalho Chehab0be51b42008-04-22 14:46:10 -03003027 return cx88_xc5000_tuner_callback(core, command, arg);
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03003028 }
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03003029 err_printk(core, "Error: Calling callback for tuner %d\n",
3030 core->board.tuner_type);
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03003031 return -EINVAL;
3032}
Steven Toth60464da2008-01-05 16:53:01 -03003033EXPORT_SYMBOL(cx88_tuner_callback);
3034
3035/* ----------------------------------------------------------------------- */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003036
Trent Piephobbc83592007-08-15 14:41:58 -03003037static void cx88_card_list(struct cx88_core *core, struct pci_dev *pci)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003038{
3039 int i;
3040
3041 if (0 == pci->subsystem_vendor &&
3042 0 == pci->subsystem_device) {
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03003043 printk(KERN_ERR
3044 "%s: Your board has no valid PCI Subsystem ID and thus can't\n"
Linus Torvalds1da177e2005-04-16 15:20:36 -07003045 "%s: be autodetected. Please pass card=<n> insmod option to\n"
3046 "%s: workaround that. Redirect complaints to the vendor of\n"
3047 "%s: the TV card. Best regards,\n"
3048 "%s: -- tux\n",
3049 core->name,core->name,core->name,core->name,core->name);
3050 } else {
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03003051 printk(KERN_ERR
3052 "%s: Your board isn't known (yet) to the driver. You can\n"
Linus Torvalds1da177e2005-04-16 15:20:36 -07003053 "%s: try to pick one of the existing card configs via\n"
3054 "%s: card=<n> insmod option. Updating to the latest\n"
3055 "%s: version might help as well.\n",
3056 core->name,core->name,core->name,core->name);
3057 }
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03003058 err_printk(core, "Here is a list of valid choices for the card=<n> "
3059 "insmod option:\n");
Trent Piephobbc83592007-08-15 14:41:58 -03003060 for (i = 0; i < ARRAY_SIZE(cx88_boards); i++)
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03003061 printk(KERN_ERR "%s: card=%d -> %s\n",
Linus Torvalds1da177e2005-04-16 15:20:36 -07003062 core->name, i, cx88_boards[i].name);
3063}
3064
Trent Piephobbc83592007-08-15 14:41:58 -03003065static void cx88_card_setup_pre_i2c(struct cx88_core *core)
Steven Tothaa481a62006-09-14 15:41:13 -03003066{
Trent Piepho6a59d642007-08-15 14:41:57 -03003067 switch (core->boardnr) {
Steven Tothaa481a62006-09-14 15:41:13 -03003068 case CX88_BOARD_HAUPPAUGE_HVR1300:
Steven Toth2491fbb2008-09-22 01:48:13 -03003069 /*
3070 * Bring the 702 demod up before i2c scanning/attach or devices are hidden
3071 * We leave here with the 702 on the bus
3072 *
3073 * "reset the IR receiver on GPIO[3]"
3074 * Reported by Mike Crash <mike AT mikecrash.com>
3075 */
3076 cx_write(MO_GP0_IO, 0x0000ef88);
Steven Tothaa481a62006-09-14 15:41:13 -03003077 udelay(1000);
Steven Toth2491fbb2008-09-22 01:48:13 -03003078 cx_clear(MO_GP0_IO, 0x00000088);
Steven Tothaa481a62006-09-14 15:41:13 -03003079 udelay(50);
Steven Toth2491fbb2008-09-22 01:48:13 -03003080 cx_set(MO_GP0_IO, 0x00000088); /* 702 out of reset */
Steven Tothaa481a62006-09-14 15:41:13 -03003081 udelay(1000);
3082 break;
Mauro Carvalho Chehab2422a9b2008-04-22 14:46:00 -03003083
Mauro Carvalho Chehaba31d2bb2008-09-29 12:08:29 -03003084 case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
Mauro Carvalho Chehab2422a9b2008-04-22 14:46:00 -03003085 case CX88_BOARD_PROLINK_PV_8000GT:
3086 cx_write(MO_GP2_IO, 0xcf7);
3087 mdelay(50);
3088 cx_write(MO_GP2_IO, 0xef5);
3089 mdelay(50);
3090 cx_write(MO_GP2_IO, 0xcf7);
3091 msleep(10);
3092 break;
3093
Steven Toth2491fbb2008-09-22 01:48:13 -03003094 case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD:
Steven Toth1117d6b2008-04-22 14:45:34 -03003095 /* Enable the xc5000 tuner */
3096 cx_set(MO_GP0_IO, 0x00001010);
3097 break;
Steven Toth2491fbb2008-09-22 01:48:13 -03003098
3099 case CX88_BOARD_HAUPPAUGE_HVR3000:
Steven Toth5bd1b662008-09-04 01:17:33 -03003100 case CX88_BOARD_HAUPPAUGE_HVR4000:
Steven Toth2491fbb2008-09-22 01:48:13 -03003101 /* Init GPIO */
3102 cx_write(MO_GP0_IO, core->board.input[0].gpio0);
Steven Toth5bd1b662008-09-04 01:17:33 -03003103 udelay(1000);
Darron Broad2f3af9e2008-10-11 11:35:56 -03003104 cx_clear(MO_GP0_IO, 0x00000080);
3105 udelay(50);
3106 cx_set(MO_GP0_IO, 0x00000080); /* 702 out of reset */
3107 udelay(1000);
Steven Toth2491fbb2008-09-22 01:48:13 -03003108 break;
Miroslav Sustek3047a172009-05-31 16:47:28 -03003109
Mauro Carvalho Chehab14422f92009-06-16 23:55:44 -03003110 case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
Miroslav Sustek3047a172009-05-31 16:47:28 -03003111 case CX88_BOARD_WINFAST_DTV1800H:
3112 /* GPIO 12 (xc3028 tuner reset) */
3113 cx_set(MO_GP1_IO, 0x1010);
3114 mdelay(50);
3115 cx_clear(MO_GP1_IO, 0x10);
3116 mdelay(50);
3117 cx_set(MO_GP1_IO, 0x10);
3118 mdelay(50);
3119 break;
Sergey Ivanov111ac842010-08-09 10:18:32 -03003120
3121 case CX88_BOARD_TWINHAN_VP1027_DVBS:
3122 cx_write(MO_GP0_IO, 0x00003230);
3123 cx_write(MO_GP0_IO, 0x00003210);
3124 msleep(1);
3125 cx_write(MO_GP0_IO, 0x00001230);
3126 break;
Steven Tothaa481a62006-09-14 15:41:13 -03003127 }
3128}
3129
Mauro Carvalho Chehab99e09ea2008-03-27 23:18:30 -03003130/*
3131 * Sets board-dependent xc3028 configuration
3132 */
3133void cx88_setup_xc3028(struct cx88_core *core, struct xc2028_ctrl *ctl)
3134{
3135 memset(ctl, 0, sizeof(*ctl));
3136
3137 ctl->fname = XC2028_DEFAULT_FIRMWARE;
3138 ctl->max_len = 64;
3139
3140 switch (core->boardnr) {
3141 case CX88_BOARD_POWERCOLOR_REAL_ANGEL:
Daniel Gimpelevicha9606ce2008-06-03 21:29:45 -03003142 /* Now works with firmware version 2.7 */
3143 if (core->i2c_algo.udelay < 16)
3144 core->i2c_algo.udelay = 16;
Mauro Carvalho Chehab99e09ea2008-03-27 23:18:30 -03003145 break;
3146 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
Miroslav Sustek3047a172009-05-31 16:47:28 -03003147 case CX88_BOARD_WINFAST_DTV1800H:
Tim Farrington19c309e2008-10-11 12:44:38 -03003148 ctl->demod = XC3028_FE_ZARLINK456;
Mauro Carvalho Chehab99e09ea2008-03-27 23:18:30 -03003149 break;
3150 case CX88_BOARD_KWORLD_ATSC_120:
3151 case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
3152 ctl->demod = XC3028_FE_OREN538;
3153 break;
Devin Heitmueller93b99922009-08-03 22:52:59 -03003154 case CX88_BOARD_GENIATECH_X8000_MT:
3155 /* FIXME: For this board, the xc3028 never recovers after being
3156 powered down (the reset GPIO probably is not set properly).
3157 We don't have access to the hardware so we cannot determine
3158 which GPIO is used for xc3028, so just disable power xc3028
3159 power management for now */
3160 ctl->disable_power_mgmt = 1;
3161 break;
Mauro Carvalho Chehab14422f92009-06-16 23:55:44 -03003162 case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
Mauro Carvalho Chehaba31d2bb2008-09-29 12:08:29 -03003163 case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
Mauro Carvalho Chehab99e09ea2008-03-27 23:18:30 -03003164 case CX88_BOARD_PROLINK_PV_8000GT:
3165 /*
Mauro Carvalho Chehaba31d2bb2008-09-29 12:08:29 -03003166 * Those boards uses non-MTS firmware
Mauro Carvalho Chehab99e09ea2008-03-27 23:18:30 -03003167 */
3168 break;
Stéphane Voltz3f6014f2008-09-05 14:33:54 -03003169 case CX88_BOARD_PINNACLE_HYBRID_PCTV:
Stephan Wienczny70101a22009-03-10 19:08:06 -03003170 case CX88_BOARD_TERRATEC_CINERGY_HT_PCI_MKII:
Stéphane Voltz3f6014f2008-09-05 14:33:54 -03003171 ctl->demod = XC3028_FE_ZARLINK456;
3172 ctl->mts = 1;
3173 break;
Mauro Carvalho Chehab99e09ea2008-03-27 23:18:30 -03003174 default:
3175 ctl->demod = XC3028_FE_OREN538;
3176 ctl->mts = 1;
3177 }
3178}
3179EXPORT_SYMBOL_GPL(cx88_setup_xc3028);
3180
Trent Piephobbc83592007-08-15 14:41:58 -03003181static void cx88_card_setup(struct cx88_core *core)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003182{
Steven Toth3ca0ea92005-12-01 00:51:27 -08003183 static u8 eeprom[256];
Mauro Carvalho Chehab4bf12262008-04-26 11:55:09 -03003184 struct tuner_setup tun_setup;
Mauro Carvalho Chehabad020dc2011-02-15 09:30:50 -02003185 unsigned int mode_mask = T_RADIO | T_ANALOG_TV;
Mauro Carvalho Chehab4bf12262008-04-26 11:55:09 -03003186
3187 memset(&tun_setup, 0, sizeof(tun_setup));
Linus Torvalds1da177e2005-04-16 15:20:36 -07003188
3189 if (0 == core->i2c_rc) {
3190 core->i2c_client.addr = 0xa0 >> 1;
Mauro Carvalho Chehab4bf12262008-04-26 11:55:09 -03003191 tveeprom_read(&core->i2c_client, eeprom, sizeof(eeprom));
Linus Torvalds1da177e2005-04-16 15:20:36 -07003192 }
3193
Trent Piepho6a59d642007-08-15 14:41:57 -03003194 switch (core->boardnr) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003195 case CX88_BOARD_HAUPPAUGE:
3196 case CX88_BOARD_HAUPPAUGE_ROSLYN:
3197 if (0 == core->i2c_rc)
Mauro Carvalho Chehab4bf12262008-04-26 11:55:09 -03003198 hauppauge_eeprom(core, eeprom+8);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003199 break;
3200 case CX88_BOARD_GDI:
3201 if (0 == core->i2c_rc)
Mauro Carvalho Chehab4bf12262008-04-26 11:55:09 -03003202 gdi_eeprom(core, eeprom);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003203 break;
Mauro Carvalho Chehab14422f92009-06-16 23:55:44 -03003204 case CX88_BOARD_LEADTEK_PVR2000:
3205 case CX88_BOARD_WINFAST_DV2000:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003206 case CX88_BOARD_WINFAST2000XP_EXPERT:
3207 if (0 == core->i2c_rc)
Mauro Carvalho Chehab4bf12262008-04-26 11:55:09 -03003208 leadtek_eeprom(core, eeprom);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003209 break;
Steven Toth0fa14aa2006-01-09 15:25:02 -02003210 case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
3211 case CX88_BOARD_HAUPPAUGE_NOVASE2_S1:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003212 case CX88_BOARD_HAUPPAUGE_DVB_T1:
Steven Toth611900c2006-01-09 15:25:12 -02003213 case CX88_BOARD_HAUPPAUGE_HVR1100:
3214 case CX88_BOARD_HAUPPAUGE_HVR1100LP:
Eric Thomasad10c932006-08-08 09:10:04 -03003215 case CX88_BOARD_HAUPPAUGE_HVR3000:
Steven Tothaa481a62006-09-14 15:41:13 -03003216 case CX88_BOARD_HAUPPAUGE_HVR1300:
Steven Toth5bd1b662008-09-04 01:17:33 -03003217 case CX88_BOARD_HAUPPAUGE_HVR4000:
3218 case CX88_BOARD_HAUPPAUGE_HVR4000LITE:
Steven Toth501d8cd2009-03-28 14:22:21 -03003219 case CX88_BOARD_HAUPPAUGE_IRONLY:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003220 if (0 == core->i2c_rc)
Mauro Carvalho Chehab4bf12262008-04-26 11:55:09 -03003221 hauppauge_eeprom(core, eeprom);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003222 break;
Vadim Catana0e0351e2006-01-09 15:25:02 -02003223 case CX88_BOARD_KWORLD_DVBS_100:
3224 cx_write(MO_GP0_IO, 0x000007f8);
3225 cx_write(MO_GP1_IO, 0x00000001);
3226 break;
Chris Pascoe87655612008-04-22 14:45:15 -03003227 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
3228 /* GPIO0:0 is hooked to demod reset */
3229 /* GPIO0:4 is hooked to xc3028 reset */
3230 cx_write(MO_GP0_IO, 0x00111100);
3231 msleep(1);
3232 cx_write(MO_GP0_IO, 0x00111111);
3233 break;
Chris Pascoed536e9c2006-08-10 03:22:21 -03003234 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL:
3235 /* GPIO0:6 is hooked to FX2 reset pin */
3236 cx_set(MO_GP0_IO, 0x00004040);
3237 cx_clear(MO_GP0_IO, 0x00000040);
3238 msleep(1000);
3239 cx_set(MO_GP0_IO, 0x00004040);
3240 /* FALLTHROUGH */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003241 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
3242 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS:
Chris Pascoe780dfef2006-02-28 08:34:59 -03003243 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003244 /* GPIO0:0 is hooked to mt352 reset pin */
3245 cx_set(MO_GP0_IO, 0x00000101);
3246 cx_clear(MO_GP0_IO, 0x00000001);
3247 msleep(1);
3248 cx_set(MO_GP0_IO, 0x00000101);
Chris Pascoe780dfef2006-02-28 08:34:59 -03003249 if (0 == core->i2c_rc &&
Trent Piepho6a59d642007-08-15 14:41:57 -03003250 core->boardnr == CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID)
Chris Pascoe780dfef2006-02-28 08:34:59 -03003251 dvico_fusionhdtv_hybrid_init(core);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003252 break;
3253 case CX88_BOARD_KWORLD_DVB_T:
3254 case CX88_BOARD_DNTV_LIVE_DVB_T:
3255 cx_set(MO_GP0_IO, 0x00000707);
3256 cx_set(MO_GP2_IO, 0x00000101);
3257 cx_clear(MO_GP2_IO, 0x00000001);
3258 msleep(1);
3259 cx_clear(MO_GP0_IO, 0x00000007);
3260 cx_set(MO_GP2_IO, 0x00000101);
3261 break;
Chris Pascoefc40b262006-01-09 15:25:35 -02003262 case CX88_BOARD_DNTV_LIVE_DVB_T_PRO:
3263 cx_write(MO_GP0_IO, 0x00080808);
3264 break;
Kirk Lapraye976f9372005-11-08 21:37:04 -08003265 case CX88_BOARD_ATI_HDTVWONDER:
3266 if (0 == core->i2c_rc) {
3267 /* enable tuner */
3268 int i;
Mauro Carvalho Chehab5b9c4e62007-03-28 22:37:26 -03003269 static const u8 buffer [][2] = {
3270 {0x10,0x12},
3271 {0x13,0x04},
3272 {0x16,0x00},
3273 {0x14,0x04},
3274 {0x17,0x00}
3275 };
Kirk Lapraye976f9372005-11-08 21:37:04 -08003276 core->i2c_client.addr = 0x0a;
Kirk Lapraye976f9372005-11-08 21:37:04 -08003277
Mauro Carvalho Chehab5b9c4e62007-03-28 22:37:26 -03003278 for (i = 0; i < ARRAY_SIZE(buffer); i++)
3279 if (2 != i2c_master_send(&core->i2c_client,
3280 buffer[i],2))
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03003281 warn_printk(core, "Unable to enable "
3282 "tuner(%i).\n", i);
Kirk Lapraye976f9372005-11-08 21:37:04 -08003283 }
3284 break;
Mauro Carvalho Chehab55c88612007-10-19 06:59:33 -03003285 case CX88_BOARD_MSI_TVANYWHERE_MASTER:
3286 {
3287 struct v4l2_priv_tun_config tea5767_cfg;
3288 struct tea5767_ctrl ctl;
3289
3290 memset(&ctl, 0, sizeof(ctl));
3291
3292 ctl.high_cut = 1;
3293 ctl.st_noise = 1;
3294 ctl.deemph_75 = 1;
3295 ctl.xtal_freq = TEA5767_HIGH_LO_13MHz;
3296
3297 tea5767_cfg.tuner = TUNER_TEA5767;
3298 tea5767_cfg.priv = &ctl;
3299
Hans Verkuilb8341e12009-03-29 08:26:01 -03003300 call_all(core, tuner, s_config, &tea5767_cfg);
Igor M. Liplianinaf832622008-09-04 17:24:14 -03003301 break;
Mauro Carvalho Chehab55c88612007-10-19 06:59:33 -03003302 }
Igor M. Liplianine4aab642008-09-23 15:43:57 -03003303 case CX88_BOARD_TEVII_S420:
Igor M. Liplianinaf832622008-09-04 17:24:14 -03003304 case CX88_BOARD_TEVII_S460:
Igor M. Liplianin0cb73632011-02-25 18:41:24 -03003305 case CX88_BOARD_TEVII_S464:
Oleg Roitburd4cd7fb82008-09-17 11:30:21 -03003306 case CX88_BOARD_OMICOM_SS4_PCI:
Igor M. Liplianin4b296312008-11-09 15:25:31 -03003307 case CX88_BOARD_TBS_8910:
Oleg Roitburdee730422008-09-17 11:58:33 -03003308 case CX88_BOARD_TBS_8920:
Igor M. Liplianincd3cde12008-11-09 15:26:25 -03003309 case CX88_BOARD_PROF_6200:
Oleg Roitburd57f51db2008-10-08 06:48:08 -03003310 case CX88_BOARD_PROF_7300:
Igor M. Liplianinb699c272009-11-16 22:22:32 -03003311 case CX88_BOARD_PROF_7301:
Igor M. Liplianin4b296312008-11-09 15:25:31 -03003312 case CX88_BOARD_SATTRADE_ST4200:
Igor M. Liplianinad5f74c2009-07-29 19:18:28 -03003313 cx_write(MO_GP0_IO, 0x8000);
3314 msleep(100);
Oleg Roitburdee730422008-09-17 11:58:33 -03003315 cx_write(MO_SRST_IO, 0);
Igor M. Liplianinad5f74c2009-07-29 19:18:28 -03003316 msleep(10);
3317 cx_write(MO_GP0_IO, 0x8080);
Oleg Roitburdee730422008-09-17 11:58:33 -03003318 msleep(100);
3319 cx_write(MO_SRST_IO, 1);
3320 msleep(100);
3321 break;
Mauro Carvalho Chehab4bf12262008-04-26 11:55:09 -03003322 } /*end switch() */
3323
3324
3325 /* Setup tuners */
3326 if ((core->board.radio_type != UNSET)) {
3327 tun_setup.mode_mask = T_RADIO;
3328 tun_setup.type = core->board.radio_type;
3329 tun_setup.addr = core->board.radio_addr;
3330 tun_setup.tuner_callback = cx88_tuner_callback;
Hans Verkuilb8341e12009-03-29 08:26:01 -03003331 call_all(core, tuner, s_type_addr, &tun_setup);
Mauro Carvalho Chehab4bf12262008-04-26 11:55:09 -03003332 mode_mask &= ~T_RADIO;
3333 }
3334
3335 if (core->board.tuner_type != TUNER_ABSENT) {
3336 tun_setup.mode_mask = mode_mask;
3337 tun_setup.type = core->board.tuner_type;
3338 tun_setup.addr = core->board.tuner_addr;
3339 tun_setup.tuner_callback = cx88_tuner_callback;
3340
Hans Verkuilb8341e12009-03-29 08:26:01 -03003341 call_all(core, tuner, s_type_addr, &tun_setup);
Mauro Carvalho Chehab4bf12262008-04-26 11:55:09 -03003342 }
3343
3344 if (core->board.tda9887_conf) {
3345 struct v4l2_priv_tun_config tda9887_cfg;
3346
3347 tda9887_cfg.tuner = TUNER_TDA9887;
3348 tda9887_cfg.priv = &core->board.tda9887_conf;
3349
Hans Verkuilb8341e12009-03-29 08:26:01 -03003350 call_all(core, tuner, s_config, &tda9887_cfg);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003351 }
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03003352
3353 if (core->board.tuner_type == TUNER_XC2028) {
3354 struct v4l2_priv_tun_config xc2028_cfg;
3355 struct xc2028_ctrl ctl;
3356
Mauro Carvalho Chehab99e09ea2008-03-27 23:18:30 -03003357 /* Fills device-dependent initialization parameters */
3358 cx88_setup_xc3028(core, &ctl);
3359
3360 /* Sends parameters to xc2028/3028 tuner */
Mauro Carvalho Chehaba9317ab2008-04-22 14:45:46 -03003361 memset(&xc2028_cfg, 0, sizeof(xc2028_cfg));
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03003362 xc2028_cfg.tuner = TUNER_XC2028;
3363 xc2028_cfg.priv = &ctl;
Mauro Carvalho Chehab64016332008-04-22 14:45:30 -03003364 info_printk(core, "Asking xc2028/3028 to load firmware %s\n",
3365 ctl.fname);
Hans Verkuilb8341e12009-03-29 08:26:01 -03003366 call_all(core, tuner, s_config, &xc2028_cfg);
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03003367 }
Laurent Pinchart622b8282009-10-05 10:48:17 -03003368 call_all(core, core, s_power, 0);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003369}
3370
3371/* ------------------------------------------------------------------ */
3372
Trent Piephobbc83592007-08-15 14:41:58 -03003373static int cx88_pci_quirks(const char *name, struct pci_dev *pci)
3374{
3375 unsigned int lat = UNSET;
3376 u8 ctrl = 0;
3377 u8 value;
3378
3379 /* check pci quirks */
3380 if (pci_pci_problems & PCIPCI_TRITON) {
3381 printk(KERN_INFO "%s: quirk: PCIPCI_TRITON -- set TBFX\n",
3382 name);
3383 ctrl |= CX88X_EN_TBFX;
3384 }
3385 if (pci_pci_problems & PCIPCI_NATOMA) {
3386 printk(KERN_INFO "%s: quirk: PCIPCI_NATOMA -- set TBFX\n",
3387 name);
3388 ctrl |= CX88X_EN_TBFX;
3389 }
3390 if (pci_pci_problems & PCIPCI_VIAETBF) {
3391 printk(KERN_INFO "%s: quirk: PCIPCI_VIAETBF -- set TBFX\n",
3392 name);
3393 ctrl |= CX88X_EN_TBFX;
3394 }
3395 if (pci_pci_problems & PCIPCI_VSFX) {
3396 printk(KERN_INFO "%s: quirk: PCIPCI_VSFX -- set VSFX\n",
3397 name);
3398 ctrl |= CX88X_EN_VSFX;
3399 }
3400#ifdef PCIPCI_ALIMAGIK
3401 if (pci_pci_problems & PCIPCI_ALIMAGIK) {
3402 printk(KERN_INFO "%s: quirk: PCIPCI_ALIMAGIK -- latency fixup\n",
3403 name);
3404 lat = 0x0A;
3405 }
3406#endif
3407
3408 /* check insmod options */
3409 if (UNSET != latency)
3410 lat = latency;
3411
3412 /* apply stuff */
3413 if (ctrl) {
3414 pci_read_config_byte(pci, CX88X_DEVCTRL, &value);
3415 value |= ctrl;
3416 pci_write_config_byte(pci, CX88X_DEVCTRL, value);
3417 }
3418 if (UNSET != lat) {
3419 printk(KERN_INFO "%s: setting pci latency timer to %d\n",
3420 name, latency);
3421 pci_write_config_byte(pci, PCI_LATENCY_TIMER, latency);
3422 }
3423 return 0;
3424}
3425
3426int cx88_get_resources(const struct cx88_core *core, struct pci_dev *pci)
3427{
3428 if (request_mem_region(pci_resource_start(pci,0),
3429 pci_resource_len(pci,0),
3430 core->name))
3431 return 0;
3432 printk(KERN_ERR
3433 "%s/%d: Can't get MMIO memory @ 0x%llx, subsystem: %04x:%04x\n",
3434 core->name, PCI_FUNC(pci->devfn),
3435 (unsigned long long)pci_resource_start(pci, 0),
3436 pci->subsystem_vendor, pci->subsystem_device);
3437 return -EBUSY;
3438}
3439
3440/* Allocate and initialize the cx88 core struct. One should hold the
3441 * devlist mutex before calling this. */
3442struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr)
3443{
3444 struct cx88_core *core;
3445 int i;
3446
3447 core = kzalloc(sizeof(*core), GFP_KERNEL);
Alan Coxfbc0ae22009-03-26 17:44:38 -03003448 if (core == NULL)
3449 return NULL;
Trent Piephobbc83592007-08-15 14:41:58 -03003450
3451 atomic_inc(&core->refcount);
3452 core->pci_bus = pci->bus->number;
3453 core->pci_slot = PCI_SLOT(pci->devfn);
Trent Piepho8ddac9e2007-08-18 06:57:55 -03003454 core->pci_irqmask = PCI_INT_RISC_RD_BERRINT | PCI_INT_RISC_WR_BERRINT |
3455 PCI_INT_BRDG_BERRINT | PCI_INT_SRC_DMA_BERRINT |
3456 PCI_INT_DST_DMA_BERRINT | PCI_INT_IPB_DMA_BERRINT;
Trent Piephobbc83592007-08-15 14:41:58 -03003457 mutex_init(&core->lock);
3458
3459 core->nr = nr;
3460 sprintf(core->name, "cx88[%d]", core->nr);
Hans Verkuil9467fe12009-03-14 12:40:51 -03003461
3462 strcpy(core->v4l2_dev.name, core->name);
3463 if (v4l2_device_register(NULL, &core->v4l2_dev)) {
3464 kfree(core);
3465 return NULL;
3466 }
3467
Trent Piephobbc83592007-08-15 14:41:58 -03003468 if (0 != cx88_get_resources(core, pci)) {
Hans Verkuil9467fe12009-03-14 12:40:51 -03003469 v4l2_device_unregister(&core->v4l2_dev);
Trent Piephobbc83592007-08-15 14:41:58 -03003470 kfree(core);
3471 return NULL;
3472 }
3473
3474 /* PCI stuff */
3475 cx88_pci_quirks(core->name, pci);
3476 core->lmmio = ioremap(pci_resource_start(pci, 0),
3477 pci_resource_len(pci, 0));
3478 core->bmmio = (u8 __iomem *)core->lmmio;
3479
Alan Coxfbc0ae22009-03-26 17:44:38 -03003480 if (core->lmmio == NULL) {
3481 kfree(core);
3482 return NULL;
3483 }
3484
Trent Piephobbc83592007-08-15 14:41:58 -03003485 /* board config */
3486 core->boardnr = UNSET;
3487 if (card[core->nr] < ARRAY_SIZE(cx88_boards))
3488 core->boardnr = card[core->nr];
3489 for (i = 0; UNSET == core->boardnr && i < ARRAY_SIZE(cx88_subids); i++)
3490 if (pci->subsystem_vendor == cx88_subids[i].subvendor &&
3491 pci->subsystem_device == cx88_subids[i].subdevice)
3492 core->boardnr = cx88_subids[i].card;
3493 if (UNSET == core->boardnr) {
3494 core->boardnr = CX88_BOARD_UNKNOWN;
3495 cx88_card_list(core, pci);
3496 }
3497
3498 memcpy(&core->board, &cx88_boards[core->boardnr], sizeof(core->board));
3499
Mauro Carvalho Chehab30077032008-10-21 10:43:10 -03003500 if (!core->board.num_frontends && (core->board.mpeg & CX88_MPEG_DVB))
3501 core->board.num_frontends = 1;
Steven Toth363c35f2008-10-11 11:05:50 -03003502
3503 info_printk(core, "subsystem: %04x:%04x, board: %s [card=%d,%s], frontend(s): %d\n",
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03003504 pci->subsystem_vendor, pci->subsystem_device, core->board.name,
Trent Piephobbc83592007-08-15 14:41:58 -03003505 core->boardnr, card[core->nr] == core->boardnr ?
Steven Toth363c35f2008-10-11 11:05:50 -03003506 "insmod option" : "autodetected",
3507 core->board.num_frontends);
Trent Piephobbc83592007-08-15 14:41:58 -03003508
3509 if (tuner[core->nr] != UNSET)
3510 core->board.tuner_type = tuner[core->nr];
3511 if (radio[core->nr] != UNSET)
3512 core->board.radio_type = radio[core->nr];
3513
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03003514 info_printk(core, "TV tuner type %d, Radio tuner type %d\n",
3515 core->board.tuner_type, core->board.radio_type);
Trent Piephobbc83592007-08-15 14:41:58 -03003516
3517 /* init hardware */
3518 cx88_reset(core);
3519 cx88_card_setup_pre_i2c(core);
3520 cx88_i2c_init(core, pci);
Mauro Carvalho Chehab189bf5f2008-02-19 16:22:25 -03003521
3522 /* load tuner module, if needed */
Hans Verkuilb8341e12009-03-29 08:26:01 -03003523 if (TUNER_ABSENT != core->board.tuner_type) {
Hans Verkuil43d5eab2009-03-29 17:47:30 -03003524 /* Ignore 0x6b and 0x6f on cx88 boards.
3525 * FusionHDTV5 RT Gold has an ir receiver at 0x6b
3526 * and an RTC at 0x6f which can get corrupted if probed. */
3527 static const unsigned short tv_addrs[] = {
3528 0x42, 0x43, 0x4a, 0x4b, /* tda8290 */
3529 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
3530 0x68, 0x69, 0x6a, 0x6c, 0x6d, 0x6e,
3531 I2C_CLIENT_END
3532 };
Hans Verkuilb8341e12009-03-29 08:26:01 -03003533 int has_demod = (core->board.tda9887_conf & TDA9887_PRESENT);
3534
3535 /* I don't trust the radio_type as is stored in the card
3536 definitions, so we just probe for it.
3537 The radio_type is sometimes missing, or set to UNSET but
3538 later code configures a tea5767.
3539 */
Hans Verkuil53dacb12009-08-10 02:49:08 -03003540 v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003541 "tuner", 0, v4l2_i2c_tuner_addrs(ADDRS_RADIO));
Hans Verkuilb8341e12009-03-29 08:26:01 -03003542 if (has_demod)
Hans Verkuil53dacb12009-08-10 02:49:08 -03003543 v4l2_i2c_new_subdev(&core->v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003544 &core->i2c_adap, "tuner",
Hans Verkuil53dacb12009-08-10 02:49:08 -03003545 0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
Hans Verkuilb8341e12009-03-29 08:26:01 -03003546 if (core->board.tuner_addr == ADDR_UNSET) {
Hans Verkuil53dacb12009-08-10 02:49:08 -03003547 v4l2_i2c_new_subdev(&core->v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003548 &core->i2c_adap, "tuner",
Hans Verkuil53dacb12009-08-10 02:49:08 -03003549 0, has_demod ? tv_addrs + 4 : tv_addrs);
Hans Verkuilb8341e12009-03-29 08:26:01 -03003550 } else {
Hans Verkuile6574f22009-04-01 03:57:53 -03003551 v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003552 "tuner", core->board.tuner_addr, NULL);
Hans Verkuilb8341e12009-03-29 08:26:01 -03003553 }
3554 }
Mauro Carvalho Chehab189bf5f2008-02-19 16:22:25 -03003555
Trent Piephobbc83592007-08-15 14:41:58 -03003556 cx88_card_setup(core);
Jean Delvare89c3bc72010-06-28 12:59:49 -03003557 if (!disable_ir) {
3558 cx88_i2c_init_ir(core);
3559 cx88_ir_init(core, pci);
3560 }
Trent Piephobbc83592007-08-15 14:41:58 -03003561
3562 return core;
3563}