blob: e2e0b8faf7a4021cb476c0c5e3a54f558bba0ca6 [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"
istvan_v@mailbox.huc21973e2011-06-07 13:12:29 -030031#include "xc4000.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -070032
Trent Piephobbc83592007-08-15 14:41:58 -030033static unsigned int tuner[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
34static unsigned int radio[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
35static unsigned int card[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
36
37module_param_array(tuner, int, NULL, 0444);
38module_param_array(radio, int, NULL, 0444);
39module_param_array(card, int, NULL, 0444);
40
41MODULE_PARM_DESC(tuner,"tuner type");
42MODULE_PARM_DESC(radio,"radio tuner type");
43MODULE_PARM_DESC(card,"card type");
44
45static unsigned int latency = UNSET;
46module_param(latency,int,0444);
47MODULE_PARM_DESC(latency,"pci latency timer");
48
Jean Delvare89c3bc72010-06-28 12:59:49 -030049static int disable_ir;
50module_param(disable_ir, int, 0444);
Mauro Carvalho Chehab97108cf2010-11-22 15:50:51 -030051MODULE_PARM_DESC(disable_ir, "Disable IR support");
Jean Delvare89c3bc72010-06-28 12:59:49 -030052
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -030053#define info_printk(core, fmt, arg...) \
54 printk(KERN_INFO "%s: " fmt, core->name , ## arg)
55
56#define warn_printk(core, fmt, arg...) \
57 printk(KERN_WARNING "%s: " fmt, core->name , ## arg)
58
59#define err_printk(core, fmt, arg...) \
60 printk(KERN_ERR "%s: " fmt, core->name , ## arg)
61
62
Linus Torvalds1da177e2005-04-16 15:20:36 -070063/* ------------------------------------------------------------------ */
64/* board config info */
65
Mauro Carvalho Chehab4bf12262008-04-26 11:55:09 -030066/* If radio_type !=UNSET, radio_addr should be specified
67 */
68
Trent Piephobbc83592007-08-15 14:41:58 -030069static const struct cx88_board cx88_boards[] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -070070 [CX88_BOARD_UNKNOWN] = {
71 .name = "UNKNOWN/GENERIC",
72 .tuner_type = UNSET,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -070073 .radio_type = UNSET,
74 .tuner_addr = ADDR_UNSET,
75 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -070076 .input = {{
77 .type = CX88_VMUX_COMPOSITE1,
78 .vmux = 0,
79 },{
80 .type = CX88_VMUX_COMPOSITE2,
81 .vmux = 1,
82 },{
83 .type = CX88_VMUX_COMPOSITE3,
84 .vmux = 2,
85 },{
86 .type = CX88_VMUX_COMPOSITE4,
87 .vmux = 3,
88 }},
89 },
90 [CX88_BOARD_HAUPPAUGE] = {
91 .name = "Hauppauge WinTV 34xxx models",
92 .tuner_type = UNSET,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -070093 .radio_type = UNSET,
94 .tuner_addr = ADDR_UNSET,
95 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -070096 .tda9887_conf = TDA9887_PRESENT,
97 .input = {{
98 .type = CX88_VMUX_TELEVISION,
99 .vmux = 0,
100 .gpio0 = 0xff00, // internal decoder
101 },{
102 .type = CX88_VMUX_DEBUG,
103 .vmux = 0,
104 .gpio0 = 0xff01, // mono from tuner chip
105 },{
106 .type = CX88_VMUX_COMPOSITE1,
107 .vmux = 1,
108 .gpio0 = 0xff02,
109 },{
110 .type = CX88_VMUX_SVIDEO,
111 .vmux = 2,
112 .gpio0 = 0xff02,
113 }},
114 .radio = {
115 .type = CX88_RADIO,
116 .gpio0 = 0xff01,
117 },
118 },
119 [CX88_BOARD_GDI] = {
120 .name = "GDI Black Gold",
121 .tuner_type = UNSET,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700122 .radio_type = UNSET,
123 .tuner_addr = ADDR_UNSET,
124 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700125 .input = {{
126 .type = CX88_VMUX_TELEVISION,
127 .vmux = 0,
Mauro Carvalho Chehabfd3113e2005-07-31 22:34:43 -0700128 },{
129 .type = CX88_VMUX_SVIDEO,
130 .vmux = 2,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700131 }},
132 },
133 [CX88_BOARD_PIXELVIEW] = {
134 .name = "PixelView",
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700135 .tuner_type = TUNER_PHILIPS_PAL,
136 .radio_type = UNSET,
137 .tuner_addr = ADDR_UNSET,
138 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700139 .input = {{
140 .type = CX88_VMUX_TELEVISION,
141 .vmux = 0,
142 .gpio0 = 0xff00, // internal decoder
143 },{
144 .type = CX88_VMUX_COMPOSITE1,
145 .vmux = 1,
146 },{
147 .type = CX88_VMUX_SVIDEO,
148 .vmux = 2,
149 }},
150 .radio = {
151 .type = CX88_RADIO,
152 .gpio0 = 0xff10,
Michael Krufky47ee2f32006-06-06 15:51:38 -0300153 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700154 },
155 [CX88_BOARD_ATI_WONDER_PRO] = {
156 .name = "ATI TV Wonder Pro",
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700157 .tuner_type = TUNER_PHILIPS_4IN1,
158 .radio_type = UNSET,
159 .tuner_addr = ADDR_UNSET,
160 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700161 .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER,
162 .input = {{
163 .type = CX88_VMUX_TELEVISION,
164 .vmux = 0,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800165 .gpio0 = 0x03ff,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700166 },{
167 .type = CX88_VMUX_COMPOSITE1,
168 .vmux = 1,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800169 .gpio0 = 0x03fe,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700170 },{
171 .type = CX88_VMUX_SVIDEO,
172 .vmux = 2,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800173 .gpio0 = 0x03fe,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700174 }},
175 },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800176 [CX88_BOARD_WINFAST2000XP_EXPERT] = {
177 .name = "Leadtek Winfast 2000XP Expert",
178 .tuner_type = TUNER_PHILIPS_4IN1,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700179 .radio_type = UNSET,
180 .tuner_addr = ADDR_UNSET,
181 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700182 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800183 .input = {{
184 .type = CX88_VMUX_TELEVISION,
185 .vmux = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700186 .gpio0 = 0x00F5e700,
187 .gpio1 = 0x00003004,
188 .gpio2 = 0x00F5e700,
189 .gpio3 = 0x02000000,
190 },{
191 .type = CX88_VMUX_COMPOSITE1,
192 .vmux = 1,
193 .gpio0 = 0x00F5c700,
194 .gpio1 = 0x00003004,
195 .gpio2 = 0x00F5c700,
196 .gpio3 = 0x02000000,
197 },{
198 .type = CX88_VMUX_SVIDEO,
199 .vmux = 2,
200 .gpio0 = 0x00F5c700,
201 .gpio1 = 0x00003004,
202 .gpio2 = 0x00F5c700,
203 .gpio3 = 0x02000000,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800204 }},
205 .radio = {
206 .type = CX88_RADIO,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700207 .gpio0 = 0x00F5d700,
208 .gpio1 = 0x00003004,
209 .gpio2 = 0x00F5d700,
210 .gpio3 = 0x02000000,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800211 },
212 },
Lubomir Bulej7418f342005-11-08 21:38:34 -0800213 [CX88_BOARD_AVERTV_STUDIO_303] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700214 .name = "AverTV Studio 303 (M126)",
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700215 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
216 .radio_type = UNSET,
217 .tuner_addr = ADDR_UNSET,
218 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700219 .tda9887_conf = TDA9887_PRESENT,
220 .input = {{
221 .type = CX88_VMUX_TELEVISION,
222 .vmux = 0,
Marcin Rudowski4aca4832006-03-09 16:09:51 -0300223 .gpio1 = 0xe09f,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700224 },{
225 .type = CX88_VMUX_COMPOSITE1,
226 .vmux = 1,
Marcin Rudowski4aca4832006-03-09 16:09:51 -0300227 .gpio1 = 0xe05f,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700228 },{
229 .type = CX88_VMUX_SVIDEO,
230 .vmux = 2,
Marcin Rudowski4aca4832006-03-09 16:09:51 -0300231 .gpio1 = 0xe05f,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700232 }},
233 .radio = {
Marcin Rudowski4aca4832006-03-09 16:09:51 -0300234 .gpio1 = 0xe0df,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700235 .type = CX88_RADIO,
236 },
237 },
238 [CX88_BOARD_MSI_TVANYWHERE_MASTER] = {
239 // added gpio values thanks to Michal
240 // values for PAL from DScaler
241 .name = "MSI TV-@nywhere Master",
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700242 .tuner_type = TUNER_MT2032,
243 .radio_type = UNSET,
244 .tuner_addr = ADDR_UNSET,
245 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev3ae1adc2005-11-08 21:37:39 -0800246 .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER_NTSC,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700247 .input = {{
248 .type = CX88_VMUX_TELEVISION,
249 .vmux = 0,
250 .gpio0 = 0x000040bf,
251 .gpio1 = 0x000080c0,
252 .gpio2 = 0x0000ff40,
253 },{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800254 .type = CX88_VMUX_COMPOSITE1,
255 .vmux = 1,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700256 .gpio0 = 0x000040bf,
257 .gpio1 = 0x000080c0,
258 .gpio2 = 0x0000ff40,
259 },{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800260 .type = CX88_VMUX_SVIDEO,
261 .vmux = 2,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700262 .gpio0 = 0x000040bf,
263 .gpio1 = 0x000080c0,
264 .gpio2 = 0x0000ff40,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800265 }},
266 .radio = {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700267 .type = CX88_RADIO,
Mauro Carvalho Chehab55c88612007-10-19 06:59:33 -0300268 .vmux = 3,
269 .gpio0 = 0x000040bf,
270 .gpio1 = 0x000080c0,
271 .gpio2 = 0x0000ff20,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800272 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700273 },
274 [CX88_BOARD_WINFAST_DV2000] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800275 .name = "Leadtek Winfast DV2000",
276 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700277 .radio_type = UNSET,
278 .tuner_addr = ADDR_UNSET,
279 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700280 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800281 .input = {{
282 .type = CX88_VMUX_TELEVISION,
283 .vmux = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700284 .gpio0 = 0x0035e700,
285 .gpio1 = 0x00003004,
286 .gpio2 = 0x0035e700,
287 .gpio3 = 0x02000000,
288 },{
289
290 .type = CX88_VMUX_COMPOSITE1,
291 .vmux = 1,
292 .gpio0 = 0x0035c700,
293 .gpio1 = 0x00003004,
294 .gpio2 = 0x0035c700,
295 .gpio3 = 0x02000000,
296 },{
297 .type = CX88_VMUX_SVIDEO,
298 .vmux = 2,
299 .gpio0 = 0x0035c700,
300 .gpio1 = 0x0035c700,
301 .gpio2 = 0x02000000,
302 .gpio3 = 0x02000000,
303 }},
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800304 .radio = {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700305 .type = CX88_RADIO,
306 .gpio0 = 0x0035d700,
307 .gpio1 = 0x00007004,
308 .gpio2 = 0x0035d700,
309 .gpio3 = 0x02000000,
Michael Krufky47ee2f32006-06-06 15:51:38 -0300310 },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800311 },
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700312 [CX88_BOARD_LEADTEK_PVR2000] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700313 // gpio values for PAL version from regspy by DScaler
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700314 .name = "Leadtek PVR 2000",
315 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
316 .radio_type = UNSET,
317 .tuner_addr = ADDR_UNSET,
318 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700319 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700320 .input = {{
321 .type = CX88_VMUX_TELEVISION,
322 .vmux = 0,
323 .gpio0 = 0x0000bde2,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300324 .audioroute = 1,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700325 },{
326 .type = CX88_VMUX_COMPOSITE1,
327 .vmux = 1,
328 .gpio0 = 0x0000bde6,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300329 .audioroute = 1,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700330 },{
331 .type = CX88_VMUX_SVIDEO,
332 .vmux = 2,
333 .gpio0 = 0x0000bde6,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300334 .audioroute = 1,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700335 }},
336 .radio = {
337 .type = CX88_RADIO,
338 .gpio0 = 0x0000bd62,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300339 .audioroute = 1,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700340 },
Michael Krufky48d5e802006-09-25 14:09:10 -0300341 .mpeg = CX88_MPEG_BLACKBIRD,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700342 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700343 [CX88_BOARD_IODATA_GVVCP3PCI] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800344 .name = "IODATA GV-VCP3/PCI",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700345 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800346 .radio_type = UNSET,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700347 .tuner_addr = ADDR_UNSET,
348 .radio_addr = ADDR_UNSET,
349 .input = {{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800350 .type = CX88_VMUX_COMPOSITE1,
351 .vmux = 0,
352 },{
353 .type = CX88_VMUX_COMPOSITE2,
354 .vmux = 1,
355 },{
356 .type = CX88_VMUX_SVIDEO,
357 .vmux = 2,
358 }},
359 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700360 [CX88_BOARD_PROLINK_PLAYTVPVR] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800361 .name = "Prolink PlayTV PVR",
362 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700363 .radio_type = UNSET,
364 .tuner_addr = ADDR_UNSET,
365 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700366 .tda9887_conf = TDA9887_PRESENT,
367 .input = {{
368 .type = CX88_VMUX_TELEVISION,
369 .vmux = 0,
Michael Krufkyfc34f162006-03-13 03:41:44 -0300370 .gpio0 = 0xbff0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700371 },{
372 .type = CX88_VMUX_COMPOSITE1,
373 .vmux = 1,
Michael Krufkyfc34f162006-03-13 03:41:44 -0300374 .gpio0 = 0xbff3,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700375 },{
376 .type = CX88_VMUX_SVIDEO,
377 .vmux = 2,
Michael Krufkyfc34f162006-03-13 03:41:44 -0300378 .gpio0 = 0xbff3,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700379 }},
380 .radio = {
381 .type = CX88_RADIO,
Michael Krufkyfc34f162006-03-13 03:41:44 -0300382 .gpio0 = 0xbff0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700383 },
384 },
385 [CX88_BOARD_ASUS_PVR_416] = {
386 .name = "ASUS PVR-416",
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700387 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
388 .radio_type = UNSET,
389 .tuner_addr = ADDR_UNSET,
390 .radio_addr = ADDR_UNSET,
391 .tda9887_conf = TDA9887_PRESENT,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700392 .input = {{
393 .type = CX88_VMUX_TELEVISION,
394 .vmux = 0,
395 .gpio0 = 0x0000fde6,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800396 },{
Linus Torvalds1da177e2005-04-16 15:20:36 -0700397 .type = CX88_VMUX_SVIDEO,
398 .vmux = 2,
399 .gpio0 = 0x0000fde6, // 0x0000fda6 L,R RCA audio in?
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300400 .audioroute = 1,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700401 }},
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800402 .radio = {
403 .type = CX88_RADIO,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700404 .gpio0 = 0x0000fde2,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800405 },
Michael Krufky48d5e802006-09-25 14:09:10 -0300406 .mpeg = CX88_MPEG_BLACKBIRD,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700407 },
408 [CX88_BOARD_MSI_TVANYWHERE] = {
409 .name = "MSI TV-@nywhere",
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700410 .tuner_type = TUNER_MT2032,
411 .radio_type = UNSET,
412 .tuner_addr = ADDR_UNSET,
413 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700414 .tda9887_conf = TDA9887_PRESENT,
415 .input = {{
416 .type = CX88_VMUX_TELEVISION,
417 .vmux = 0,
418 .gpio0 = 0x00000fbf,
419 .gpio2 = 0x0000fc08,
420 },{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800421 .type = CX88_VMUX_COMPOSITE1,
422 .vmux = 1,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700423 .gpio0 = 0x00000fbf,
424 .gpio2 = 0x0000fc68,
425 },{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800426 .type = CX88_VMUX_SVIDEO,
427 .vmux = 2,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700428 .gpio0 = 0x00000fbf,
429 .gpio2 = 0x0000fc68,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800430 }},
Linus Torvalds1da177e2005-04-16 15:20:36 -0700431 },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800432 [CX88_BOARD_KWORLD_DVB_T] = {
433 .name = "KWorld/VStream XPert DVB-T",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700434 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700435 .radio_type = UNSET,
436 .tuner_addr = ADDR_UNSET,
437 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800438 .input = {{
439 .type = CX88_VMUX_COMPOSITE1,
440 .vmux = 1,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700441 .gpio0 = 0x0700,
442 .gpio2 = 0x0101,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800443 },{
444 .type = CX88_VMUX_SVIDEO,
445 .vmux = 2,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700446 .gpio0 = 0x0700,
447 .gpio2 = 0x0101,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800448 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300449 .mpeg = CX88_MPEG_DVB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700450 },
451 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1] = {
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -0700452 .name = "DViCO FusionHDTV DVB-T1",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700453 .tuner_type = TUNER_ABSENT, /* No analog tuner */
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700454 .radio_type = UNSET,
455 .tuner_addr = ADDR_UNSET,
456 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700457 .input = {{
458 .type = CX88_VMUX_COMPOSITE1,
459 .vmux = 1,
460 .gpio0 = 0x000027df,
Michael Krufky47ee2f32006-06-06 15:51:38 -0300461 },{
Linus Torvalds1da177e2005-04-16 15:20:36 -0700462 .type = CX88_VMUX_SVIDEO,
463 .vmux = 2,
464 .gpio0 = 0x000027df,
465 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300466 .mpeg = CX88_MPEG_DVB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700467 },
468 [CX88_BOARD_KWORLD_LTV883] = {
469 .name = "KWorld LTV883RF",
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700470 .tuner_type = TUNER_TNF_8831BGFF,
471 .radio_type = UNSET,
472 .tuner_addr = ADDR_UNSET,
473 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800474 .input = {{
475 .type = CX88_VMUX_TELEVISION,
476 .vmux = 0,
477 .gpio0 = 0x07f8,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700478 },{
479 .type = CX88_VMUX_DEBUG,
480 .vmux = 0,
481 .gpio0 = 0x07f9, // mono from tuner chip
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800482 },{
483 .type = CX88_VMUX_COMPOSITE1,
484 .vmux = 1,
485 .gpio0 = 0x000007fa,
486 },{
487 .type = CX88_VMUX_SVIDEO,
488 .vmux = 2,
489 .gpio0 = 0x000007fa,
490 }},
491 .radio = {
492 .type = CX88_RADIO,
493 .gpio0 = 0x000007f8,
494 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700495 },
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -0700496 [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q] = {
497 .name = "DViCO FusionHDTV 3 Gold-Q",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700498 .tuner_type = TUNER_MICROTUNE_4042FI5,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700499 .radio_type = UNSET,
500 .tuner_addr = ADDR_UNSET,
501 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700502 /*
503 GPIO[0] resets DT3302 DTV receiver
504 0 - reset asserted
505 1 - normal operation
506 GPIO[1] mutes analog audio output connector
507 0 - enable selected source
508 1 - mute
509 GPIO[2] selects source for analog audio output connector
510 0 - analog audio input connector on tab
511 1 - analog DAC output from CX23881 chip
512 GPIO[3] selects RF input connector on tuner module
513 0 - RF connector labeled CABLE
514 1 - RF connector labeled ANT
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -0700515 GPIO[4] selects high RF for QAM256 mode
516 0 - normal RF
517 1 - high RF
Linus Torvalds1da177e2005-04-16 15:20:36 -0700518 */
519 .input = {{
520 .type = CX88_VMUX_TELEVISION,
521 .vmux = 0,
522 .gpio0 = 0x0f0d,
523 },{
524 .type = CX88_VMUX_CABLE,
525 .vmux = 0,
526 .gpio0 = 0x0f05,
527 },{
528 .type = CX88_VMUX_COMPOSITE1,
529 .vmux = 1,
530 .gpio0 = 0x0f00,
531 },{
532 .type = CX88_VMUX_SVIDEO,
533 .vmux = 2,
534 .gpio0 = 0x0f00,
535 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300536 .mpeg = CX88_MPEG_DVB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700537 },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800538 [CX88_BOARD_HAUPPAUGE_DVB_T1] = {
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700539 .name = "Hauppauge Nova-T DVB-T",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700540 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700541 .radio_type = UNSET,
542 .tuner_addr = ADDR_UNSET,
543 .radio_addr = ADDR_UNSET,
544 .input = {{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800545 .type = CX88_VMUX_DVB,
546 .vmux = 0,
547 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300548 .mpeg = CX88_MPEG_DVB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700549 },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800550 [CX88_BOARD_CONEXANT_DVB_T1] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700551 .name = "Conexant DVB-T reference design",
552 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700553 .radio_type = UNSET,
554 .tuner_addr = ADDR_UNSET,
555 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800556 .input = {{
557 .type = CX88_VMUX_DVB,
558 .vmux = 0,
559 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300560 .mpeg = CX88_MPEG_DVB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700561 },
562 [CX88_BOARD_PROVIDEO_PV259] = {
563 .name = "Provideo PV259",
564 .tuner_type = TUNER_PHILIPS_FQ1216ME,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700565 .radio_type = UNSET,
566 .tuner_addr = ADDR_UNSET,
567 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700568 .input = {{
569 .type = CX88_VMUX_TELEVISION,
570 .vmux = 0,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300571 .audioroute = 1,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700572 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300573 .mpeg = CX88_MPEG_BLACKBIRD,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700574 },
575 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS] = {
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -0700576 .name = "DViCO FusionHDTV DVB-T Plus",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700577 .tuner_type = TUNER_ABSENT, /* No analog tuner */
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700578 .radio_type = UNSET,
579 .tuner_addr = ADDR_UNSET,
580 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700581 .input = {{
582 .type = CX88_VMUX_COMPOSITE1,
583 .vmux = 1,
584 .gpio0 = 0x000027df,
Michael Krufky47ee2f32006-06-06 15:51:38 -0300585 },{
Linus Torvalds1da177e2005-04-16 15:20:36 -0700586 .type = CX88_VMUX_SVIDEO,
587 .vmux = 2,
588 .gpio0 = 0x000027df,
589 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300590 .mpeg = CX88_MPEG_DVB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700591 },
592 [CX88_BOARD_DNTV_LIVE_DVB_T] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800593 .name = "digitalnow DNTV Live! DVB-T",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700594 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700595 .radio_type = UNSET,
596 .tuner_addr = ADDR_UNSET,
597 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800598 .input = {{
Linus Torvalds1da177e2005-04-16 15:20:36 -0700599 .type = CX88_VMUX_COMPOSITE1,
600 .vmux = 1,
601 .gpio0 = 0x00000700,
602 .gpio2 = 0x00000101,
603 },{
604 .type = CX88_VMUX_SVIDEO,
605 .vmux = 2,
606 .gpio0 = 0x00000700,
607 .gpio2 = 0x00000101,
608 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300609 .mpeg = CX88_MPEG_DVB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700610 },
611 [CX88_BOARD_PCHDTV_HD3000] = {
612 .name = "pcHDTV HD3000 HDTV",
Trent Piepho9175b852006-04-10 09:40:37 -0300613 .tuner_type = TUNER_THOMSON_DTT761X,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700614 .radio_type = UNSET,
615 .tuner_addr = ADDR_UNSET,
616 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehabe4f5c822005-12-04 12:41:54 -0200617 .tda9887_conf = TDA9887_PRESENT,
Trent Piepho19dc74b2007-07-31 23:06:50 -0300618 /* GPIO[2] = audio source for analog audio out connector
619 * 0 = analog audio input connector
620 * 1 = CX88 audio DACs
621 *
622 * GPIO[7] = input to CX88's audio/chroma ADC
623 * 0 = FM 10.7 MHz IF
624 * 1 = Sound 4.5 MHz IF
625 *
626 * GPIO[1,5,6] = Oren 51132 pins 27,35,28 respectively
627 *
628 * GPIO[16] = Remote control input
629 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700630 .input = {{
631 .type = CX88_VMUX_TELEVISION,
632 .vmux = 0,
633 .gpio0 = 0x00008484,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700634 },{
635 .type = CX88_VMUX_COMPOSITE1,
636 .vmux = 1,
637 .gpio0 = 0x00008400,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700638 },{
639 .type = CX88_VMUX_SVIDEO,
640 .vmux = 2,
641 .gpio0 = 0x00008400,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700642 }},
643 .radio = {
644 .type = CX88_RADIO,
Trent Piepho19dc74b2007-07-31 23:06:50 -0300645 .gpio0 = 0x00008404,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700646 },
Michael Krufky48d5e802006-09-25 14:09:10 -0300647 .mpeg = CX88_MPEG_DVB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700648 },
649 [CX88_BOARD_HAUPPAUGE_ROSLYN] = {
650 // entry added by Kaustubh D. Bhalerao <bhalerao.1@osu.edu>
651 // GPIO values obtained from regspy, courtesy Sean Covel
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700652 .name = "Hauppauge WinTV 28xxx (Roslyn) models",
653 .tuner_type = UNSET,
654 .radio_type = UNSET,
655 .tuner_addr = ADDR_UNSET,
656 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700657 .input = {{
658 .type = CX88_VMUX_TELEVISION,
659 .vmux = 0,
Steven Toth0345c382006-01-09 15:25:17 -0200660 .gpio0 = 0xed1a,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700661 .gpio2 = 0x00ff,
662 },{
663 .type = CX88_VMUX_DEBUG,
664 .vmux = 0,
Steven Toth0345c382006-01-09 15:25:17 -0200665 .gpio0 = 0xff01,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700666 },{
667 .type = CX88_VMUX_COMPOSITE1,
668 .vmux = 1,
669 .gpio0 = 0xff02,
670 },{
671 .type = CX88_VMUX_SVIDEO,
672 .vmux = 2,
673 .gpio0 = 0xed92,
674 .gpio2 = 0x00ff,
675 }},
676 .radio = {
677 .type = CX88_RADIO,
678 .gpio0 = 0xed96,
679 .gpio2 = 0x00ff,
680 },
Michael Krufky48d5e802006-09-25 14:09:10 -0300681 .mpeg = CX88_MPEG_BLACKBIRD,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700682 },
683 [CX88_BOARD_DIGITALLOGIC_MEC] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700684 .name = "Digital-Logic MICROSPACE Entertainment Center (MEC)",
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700685 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
686 .radio_type = UNSET,
687 .tuner_addr = ADDR_UNSET,
688 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700689 .tda9887_conf = TDA9887_PRESENT,
690 .input = {{
691 .type = CX88_VMUX_TELEVISION,
692 .vmux = 0,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700693 .gpio0 = 0x00009d80,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300694 .audioroute = 1,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700695 },{
696 .type = CX88_VMUX_COMPOSITE1,
697 .vmux = 1,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700698 .gpio0 = 0x00009d76,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300699 .audioroute = 1,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700700 },{
701 .type = CX88_VMUX_SVIDEO,
702 .vmux = 2,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700703 .gpio0 = 0x00009d76,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300704 .audioroute = 1,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700705 }},
706 .radio = {
707 .type = CX88_RADIO,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700708 .gpio0 = 0x00009d00,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300709 .audioroute = 1,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700710 },
Michael Krufky48d5e802006-09-25 14:09:10 -0300711 .mpeg = CX88_MPEG_BLACKBIRD,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700712 },
713 [CX88_BOARD_IODATA_GVBCTV7E] = {
714 .name = "IODATA GV/BCTV7E",
715 .tuner_type = TUNER_PHILIPS_FQ1286,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700716 .radio_type = UNSET,
717 .tuner_addr = ADDR_UNSET,
718 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700719 .tda9887_conf = TDA9887_PRESENT,
720 .input = {{
721 .type = CX88_VMUX_TELEVISION,
722 .vmux = 1,
723 .gpio1 = 0x0000e03f,
724 },{
725 .type = CX88_VMUX_COMPOSITE1,
726 .vmux = 2,
727 .gpio1 = 0x0000e07f,
728 },{
729 .type = CX88_VMUX_SVIDEO,
730 .vmux = 3,
731 .gpio1 = 0x0000e07f,
732 }}
733 },
Manuel Capinha239df2e2005-06-23 22:04:53 -0700734 [CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO] = {
735 .name = "PixelView PlayTV Ultra Pro (Stereo)",
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700736 /* May be also TUNER_YMEC_TVF_5533MF for NTSC/M or PAL/M */
737 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
Mauro Carvalho Chehabc5287ba2005-07-15 03:56:28 -0700738 .radio_type = UNSET,
739 .tuner_addr = ADDR_UNSET,
740 .radio_addr = ADDR_UNSET,
Hans Verkuilb8341e12009-03-29 08:26:01 -0300741 /* Some variants use a tda9874 and so need the tvaudio module. */
742 .audio_chip = V4L2_IDENT_TVAUDIO,
Manuel Capinha239df2e2005-06-23 22:04:53 -0700743 .input = {{
744 .type = CX88_VMUX_TELEVISION,
745 .vmux = 0,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700746 .gpio0 = 0xbf61, /* internal decoder */
Manuel Capinha239df2e2005-06-23 22:04:53 -0700747 },{
748 .type = CX88_VMUX_COMPOSITE1,
749 .vmux = 1,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700750 .gpio0 = 0xbf63,
Manuel Capinha239df2e2005-06-23 22:04:53 -0700751 },{
752 .type = CX88_VMUX_SVIDEO,
753 .vmux = 2,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700754 .gpio0 = 0xbf63,
Manuel Capinha239df2e2005-06-23 22:04:53 -0700755 }},
756 .radio = {
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700757 .type = CX88_RADIO,
758 .gpio0 = 0xbf60,
759 },
Manuel Capinha239df2e2005-06-23 22:04:53 -0700760 },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800761 [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T] = {
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -0700762 .name = "DViCO FusionHDTV 3 Gold-T",
Michael Krufky83ac87222006-01-09 15:25:29 -0200763 .tuner_type = TUNER_THOMSON_DTT761X,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700764 .radio_type = UNSET,
765 .tuner_addr = ADDR_UNSET,
766 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehabe4f5c822005-12-04 12:41:54 -0200767 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -0700768 .input = {{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800769 .type = CX88_VMUX_TELEVISION,
770 .vmux = 0,
771 .gpio0 = 0x97ed,
772 },{
773 .type = CX88_VMUX_COMPOSITE1,
774 .vmux = 1,
775 .gpio0 = 0x97e9,
776 },{
777 .type = CX88_VMUX_SVIDEO,
778 .vmux = 2,
779 .gpio0 = 0x97e9,
780 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300781 .mpeg = CX88_MPEG_DVB,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800782 },
783 [CX88_BOARD_ADSTECH_DVB_T_PCI] = {
784 .name = "ADS Tech Instant TV DVB-T PCI",
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -0700785 .tuner_type = TUNER_ABSENT,
786 .radio_type = UNSET,
787 .tuner_addr = ADDR_UNSET,
788 .radio_addr = ADDR_UNSET,
789 .input = {{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800790 .type = CX88_VMUX_COMPOSITE1,
791 .vmux = 1,
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -0700792 .gpio0 = 0x0700,
793 .gpio2 = 0x0101,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800794 },{
795 .type = CX88_VMUX_SVIDEO,
796 .vmux = 2,
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -0700797 .gpio0 = 0x0700,
798 .gpio2 = 0x0101,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800799 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300800 .mpeg = CX88_MPEG_DVB,
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -0700801 },
Michael Krufkye057ee12005-07-07 17:58:40 -0700802 [CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1] = {
803 .name = "TerraTec Cinergy 1400 DVB-T",
804 .tuner_type = TUNER_ABSENT,
805 .input = {{
806 .type = CX88_VMUX_DVB,
807 .vmux = 0,
Heiko Baums05eda242007-01-21 05:58:19 -0300808 },{
809 .type = CX88_VMUX_COMPOSITE1,
810 .vmux = 2,
811 },{
812 .type = CX88_VMUX_SVIDEO,
813 .vmux = 2,
Michael Krufkye057ee12005-07-07 17:58:40 -0700814 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300815 .mpeg = CX88_MPEG_DVB,
Michael Krufkye057ee12005-07-07 17:58:40 -0700816 },
Michael Krufky9fef07c2005-07-31 22:34:46 -0700817 [CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD] = {
818 .name = "DViCO FusionHDTV 5 Gold",
Michael Krufky9c26c8b2006-04-27 01:29:17 -0300819 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H062F */
Michael Krufky9fef07c2005-07-31 22:34:46 -0700820 .radio_type = UNSET,
821 .tuner_addr = ADDR_UNSET,
822 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehabe52e98a2005-09-09 13:03:41 -0700823 .tda9887_conf = TDA9887_PRESENT,
Michael Krufky9fef07c2005-07-31 22:34:46 -0700824 .input = {{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800825 .type = CX88_VMUX_TELEVISION,
826 .vmux = 0,
827 .gpio0 = 0x87fd,
828 },{
829 .type = CX88_VMUX_COMPOSITE1,
830 .vmux = 1,
831 .gpio0 = 0x87f9,
832 },{
833 .type = CX88_VMUX_SVIDEO,
834 .vmux = 2,
835 .gpio0 = 0x87f9,
836 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300837 .mpeg = CX88_MPEG_DVB,
Michael Krufky9fef07c2005-07-31 22:34:46 -0700838 },
Nickolay V. Shmyrevd45170e2005-11-08 21:36:15 -0800839 [CX88_BOARD_AVERMEDIA_ULTRATV_MC_550] = {
840 .name = "AverMedia UltraTV Media Center PCI 550",
841 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
842 .radio_type = UNSET,
843 .tuner_addr = ADDR_UNSET,
844 .radio_addr = ADDR_UNSET,
845 .tda9887_conf = TDA9887_PRESENT,
Nickolay V. Shmyrevd45170e2005-11-08 21:36:15 -0800846 .input = {{
847 .type = CX88_VMUX_COMPOSITE1,
848 .vmux = 0,
849 .gpio0 = 0x0000cd73,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300850 .audioroute = 1,
Nickolay V. Shmyrevd45170e2005-11-08 21:36:15 -0800851 },{
852 .type = CX88_VMUX_SVIDEO,
853 .vmux = 1,
854 .gpio0 = 0x0000cd73,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300855 .audioroute = 1,
Nickolay V. Shmyrevd45170e2005-11-08 21:36:15 -0800856 },{
857 .type = CX88_VMUX_TELEVISION,
858 .vmux = 3,
859 .gpio0 = 0x0000cdb3,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300860 .audioroute = 1,
Nickolay V. Shmyrevd45170e2005-11-08 21:36:15 -0800861 }},
862 .radio = {
863 .type = CX88_RADIO,
864 .vmux = 2,
865 .gpio0 = 0x0000cdf3,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300866 .audioroute = 1,
Nickolay V. Shmyrevd45170e2005-11-08 21:36:15 -0800867 },
Michael Krufky5b26c822006-10-16 16:07:51 -0300868 .mpeg = CX88_MPEG_BLACKBIRD,
Nickolay V. Shmyrevd45170e2005-11-08 21:36:15 -0800869 },
Alexander Wold0bcc37c2005-11-08 21:36:58 -0800870 [CX88_BOARD_KWORLD_VSTREAM_EXPERT_DVD] = {
871 /* Alexander Wold <awold@bigfoot.com> */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800872 .name = "Kworld V-Stream Xpert DVD",
873 .tuner_type = UNSET,
874 .input = {{
875 .type = CX88_VMUX_COMPOSITE1,
876 .vmux = 1,
877 .gpio0 = 0x03000000,
Alexander Wold0bcc37c2005-11-08 21:36:58 -0800878 .gpio1 = 0x01000000,
879 .gpio2 = 0x02000000,
880 .gpio3 = 0x00100000,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800881 },{
882 .type = CX88_VMUX_SVIDEO,
883 .vmux = 2,
884 .gpio0 = 0x03000000,
885 .gpio1 = 0x01000000,
886 .gpio2 = 0x02000000,
887 .gpio3 = 0x00100000,
888 }},
Alexander Wold0bcc37c2005-11-08 21:36:58 -0800889 },
Kirk Lapraye976f9372005-11-08 21:37:04 -0800890 [CX88_BOARD_ATI_HDTVWONDER] = {
891 .name = "ATI HDTV Wonder",
892 .tuner_type = TUNER_PHILIPS_TUV1236D,
893 .radio_type = UNSET,
894 .tuner_addr = ADDR_UNSET,
895 .radio_addr = ADDR_UNSET,
896 .input = {{
897 .type = CX88_VMUX_TELEVISION,
898 .vmux = 0,
899 .gpio0 = 0x00000ff7,
900 .gpio1 = 0x000000ff,
901 .gpio2 = 0x00000001,
902 .gpio3 = 0x00000000,
903 },{
904 .type = CX88_VMUX_COMPOSITE1,
905 .vmux = 1,
906 .gpio0 = 0x00000ffe,
907 .gpio1 = 0x000000ff,
908 .gpio2 = 0x00000001,
909 .gpio3 = 0x00000000,
910 },{
911 .type = CX88_VMUX_SVIDEO,
912 .vmux = 2,
913 .gpio0 = 0x00000ffe,
914 .gpio1 = 0x000000ff,
915 .gpio2 = 0x00000001,
916 .gpio3 = 0x00000000,
917 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300918 .mpeg = CX88_MPEG_DVB,
Kirk Lapraye976f9372005-11-08 21:37:04 -0800919 },
David Shirley2b5200a2005-11-08 21:37:22 -0800920 [CX88_BOARD_WINFAST_DTV1000] = {
921 .name = "WinFast DTV1000-T",
922 .tuner_type = TUNER_ABSENT,
923 .radio_type = UNSET,
924 .tuner_addr = ADDR_UNSET,
925 .radio_addr = ADDR_UNSET,
926 .input = {{
927 .type = CX88_VMUX_DVB,
928 .vmux = 0,
Jean Delvaree8f4e752007-03-31 10:34:59 -0300929 },{
930 .type = CX88_VMUX_COMPOSITE1,
931 .vmux = 1,
932 },{
933 .type = CX88_VMUX_SVIDEO,
934 .vmux = 2,
David Shirley2b5200a2005-11-08 21:37:22 -0800935 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300936 .mpeg = CX88_MPEG_DVB,
David Shirley2b5200a2005-11-08 21:37:22 -0800937 },
Lubomir Bulej7418f342005-11-08 21:38:34 -0800938 [CX88_BOARD_AVERTV_303] = {
939 .name = "AVerTV 303 (M126)",
940 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
941 .radio_type = UNSET,
942 .tuner_addr = ADDR_UNSET,
943 .radio_addr = ADDR_UNSET,
944 .tda9887_conf = TDA9887_PRESENT,
945 .input = {{
946 .type = CX88_VMUX_TELEVISION,
947 .vmux = 0,
948 .gpio0 = 0x00ff,
949 .gpio1 = 0xe09f,
950 .gpio2 = 0x0010,
951 .gpio3 = 0x0000,
952 },{
953 .type = CX88_VMUX_COMPOSITE1,
954 .vmux = 1,
955 .gpio0 = 0x00ff,
956 .gpio1 = 0xe05f,
957 .gpio2 = 0x0010,
958 .gpio3 = 0x0000,
959 },{
960 .type = CX88_VMUX_SVIDEO,
961 .vmux = 2,
962 .gpio0 = 0x00ff,
963 .gpio1 = 0xe05f,
964 .gpio2 = 0x0010,
965 .gpio3 = 0x0000,
966 }},
967 },
Steven Toth0fa14aa2006-01-09 15:25:02 -0200968 [CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1] = {
969 .name = "Hauppauge Nova-S-Plus DVB-S",
970 .tuner_type = TUNER_ABSENT,
971 .radio_type = UNSET,
972 .tuner_addr = ADDR_UNSET,
973 .radio_addr = ADDR_UNSET,
Lawrence Rust69518032011-02-06 17:46:12 -0300974 .audio_chip = V4L2_IDENT_WM8775,
975 .i2sinputcntl = 2,
Steven Toth0fa14aa2006-01-09 15:25:02 -0200976 .input = {{
977 .type = CX88_VMUX_DVB,
978 .vmux = 0,
lawrence rustfcb97572010-10-18 07:06:02 -0300979 /* 2: Line-In */
980 .audioroute = 2,
Steven Toth0fa14aa2006-01-09 15:25:02 -0200981 },{
982 .type = CX88_VMUX_COMPOSITE1,
983 .vmux = 1,
lawrence rustfcb97572010-10-18 07:06:02 -0300984 /* 2: Line-In */
985 .audioroute = 2,
Steven Toth0fa14aa2006-01-09 15:25:02 -0200986 },{
987 .type = CX88_VMUX_SVIDEO,
988 .vmux = 2,
lawrence rustfcb97572010-10-18 07:06:02 -0300989 /* 2: Line-In */
990 .audioroute = 2,
Steven Toth0fa14aa2006-01-09 15:25:02 -0200991 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300992 .mpeg = CX88_MPEG_DVB,
Steven Toth0fa14aa2006-01-09 15:25:02 -0200993 },
994 [CX88_BOARD_HAUPPAUGE_NOVASE2_S1] = {
995 .name = "Hauppauge Nova-SE2 DVB-S",
996 .tuner_type = TUNER_ABSENT,
997 .radio_type = UNSET,
998 .tuner_addr = ADDR_UNSET,
999 .radio_addr = ADDR_UNSET,
1000 .input = {{
1001 .type = CX88_VMUX_DVB,
1002 .vmux = 0,
1003 }},
Michael Krufky48d5e802006-09-25 14:09:10 -03001004 .mpeg = CX88_MPEG_DVB,
Steven Toth0fa14aa2006-01-09 15:25:02 -02001005 },
Vadim Catana0e0351e2006-01-09 15:25:02 -02001006 [CX88_BOARD_KWORLD_DVBS_100] = {
1007 .name = "KWorld DVB-S 100",
1008 .tuner_type = TUNER_ABSENT,
1009 .radio_type = UNSET,
1010 .tuner_addr = ADDR_UNSET,
1011 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab46e67ac2011-01-03 09:09:56 -02001012 .audio_chip = V4L2_IDENT_WM8775,
Vadim Catana0e0351e2006-01-09 15:25:02 -02001013 .input = {{
1014 .type = CX88_VMUX_DVB,
1015 .vmux = 0,
Mauro Carvalho Chehab46e67ac2011-01-03 09:09:56 -02001016 /* 2: Line-In */
1017 .audioroute = 2,
Vadim Catana0e0351e2006-01-09 15:25:02 -02001018 },{
1019 .type = CX88_VMUX_COMPOSITE1,
1020 .vmux = 1,
Mauro Carvalho Chehab46e67ac2011-01-03 09:09:56 -02001021 /* 2: Line-In */
1022 .audioroute = 2,
Vadim Catana0e0351e2006-01-09 15:25:02 -02001023 },{
1024 .type = CX88_VMUX_SVIDEO,
1025 .vmux = 2,
Mauro Carvalho Chehab46e67ac2011-01-03 09:09:56 -02001026 /* 2: Line-In */
1027 .audioroute = 2,
Vadim Catana0e0351e2006-01-09 15:25:02 -02001028 }},
Michael Krufky48d5e802006-09-25 14:09:10 -03001029 .mpeg = CX88_MPEG_DVB,
Vadim Catana0e0351e2006-01-09 15:25:02 -02001030 },
Steven Toth611900c2006-01-09 15:25:12 -02001031 [CX88_BOARD_HAUPPAUGE_HVR1100] = {
1032 .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid",
1033 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1034 .radio_type = UNSET,
1035 .tuner_addr = ADDR_UNSET,
1036 .radio_addr = ADDR_UNSET,
1037 .tda9887_conf = TDA9887_PRESENT,
1038 .input = {{
1039 .type = CX88_VMUX_TELEVISION,
1040 .vmux = 0,
1041 },{
1042 .type = CX88_VMUX_COMPOSITE1,
1043 .vmux = 1,
1044 },{
1045 .type = CX88_VMUX_SVIDEO,
1046 .vmux = 2,
1047 }},
1048 /* fixme: Add radio support */
Michael Krufky48d5e802006-09-25 14:09:10 -03001049 .mpeg = CX88_MPEG_DVB,
Steven Toth611900c2006-01-09 15:25:12 -02001050 },
1051 [CX88_BOARD_HAUPPAUGE_HVR1100LP] = {
1052 .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid (Low Profile)",
1053 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1054 .radio_type = UNSET,
1055 .tuner_addr = ADDR_UNSET,
1056 .radio_addr = ADDR_UNSET,
1057 .tda9887_conf = TDA9887_PRESENT,
1058 .input = {{
1059 .type = CX88_VMUX_TELEVISION,
1060 .vmux = 0,
1061 },{
1062 .type = CX88_VMUX_COMPOSITE1,
1063 .vmux = 1,
1064 }},
1065 /* fixme: Add radio support */
Michael Krufky48d5e802006-09-25 14:09:10 -03001066 .mpeg = CX88_MPEG_DVB,
Steven Toth611900c2006-01-09 15:25:12 -02001067 },
Chris Pascoefc40b262006-01-09 15:25:35 -02001068 [CX88_BOARD_DNTV_LIVE_DVB_T_PRO] = {
1069 .name = "digitalnow DNTV Live! DVB-T Pro",
1070 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1071 .radio_type = UNSET,
1072 .tuner_addr = ADDR_UNSET,
1073 .radio_addr = ADDR_UNSET,
1074 .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |
1075 TDA9887_PORT2_ACTIVE,
1076 .input = {{
1077 .type = CX88_VMUX_TELEVISION,
1078 .vmux = 0,
1079 .gpio0 = 0xf80808,
1080 },{
1081 .type = CX88_VMUX_COMPOSITE1,
1082 .vmux = 1,
1083 .gpio0 = 0xf80808,
1084 },{
1085 .type = CX88_VMUX_SVIDEO,
1086 .vmux = 2,
1087 .gpio0 = 0xf80808,
1088 }},
1089 .radio = {
1090 .type = CX88_RADIO,
1091 .gpio0 = 0xf80808,
1092 },
Michael Krufky48d5e802006-09-25 14:09:10 -03001093 .mpeg = CX88_MPEG_DVB,
Chris Pascoefc40b262006-01-09 15:25:35 -02001094 },
Manenti Marcof39624f2006-01-09 15:32:45 -02001095 [CX88_BOARD_KWORLD_DVB_T_CX22702] = {
1096 /* Kworld V-stream Xpert DVB-T with Thomson tuner */
1097 /* DTT 7579 Conexant CX22702-19 Conexant CX2388x */
1098 /* Manenti Marco <marco_manenti@colman.it> */
1099 .name = "KWorld/VStream XPert DVB-T with cx22702",
1100 .tuner_type = TUNER_ABSENT,
1101 .radio_type = UNSET,
1102 .tuner_addr = ADDR_UNSET,
1103 .radio_addr = ADDR_UNSET,
1104 .input = {{
1105 .type = CX88_VMUX_COMPOSITE1,
1106 .vmux = 1,
1107 .gpio0 = 0x0700,
1108 .gpio2 = 0x0101,
1109 },{
1110 .type = CX88_VMUX_SVIDEO,
1111 .vmux = 2,
1112 .gpio0 = 0x0700,
1113 .gpio2 = 0x0101,
1114 }},
Michael Krufky48d5e802006-09-25 14:09:10 -03001115 .mpeg = CX88_MPEG_DVB,
Manenti Marcof39624f2006-01-09 15:32:45 -02001116 },
Chris Pascoe43eabb42006-01-09 18:21:28 -02001117 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL] = {
1118 .name = "DViCO FusionHDTV DVB-T Dual Digital",
1119 .tuner_type = TUNER_ABSENT, /* No analog tuner */
1120 .radio_type = UNSET,
1121 .tuner_addr = ADDR_UNSET,
1122 .radio_addr = ADDR_UNSET,
1123 .input = {{
1124 .type = CX88_VMUX_COMPOSITE1,
1125 .vmux = 1,
Chris Pascoed536e9c2006-08-10 03:22:21 -03001126 .gpio0 = 0x000067df,
Chris Pascoe43eabb42006-01-09 18:21:28 -02001127 },{
1128 .type = CX88_VMUX_SVIDEO,
1129 .vmux = 2,
Chris Pascoed536e9c2006-08-10 03:22:21 -03001130 .gpio0 = 0x000067df,
Chris Pascoe43eabb42006-01-09 18:21:28 -02001131 }},
Michael Krufky48d5e802006-09-25 14:09:10 -03001132 .mpeg = CX88_MPEG_DVB,
Chris Pascoe43eabb42006-01-09 18:21:28 -02001133 },
Michael Krufky44256de2006-02-07 06:49:14 -02001134 [CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT] = {
Michael Krufky44256de2006-02-07 06:49:14 -02001135 .name = "KWorld HardwareMpegTV XPert",
1136 .tuner_type = TUNER_PHILIPS_TDA8290,
1137 .radio_type = UNSET,
1138 .tuner_addr = ADDR_UNSET,
1139 .radio_addr = ADDR_UNSET,
1140 .input = {{
1141 .type = CX88_VMUX_TELEVISION,
1142 .vmux = 0,
Michael Krufkye2798212006-02-27 00:07:58 -03001143 .gpio0 = 0x3de2,
Michael Krufky24da4e42006-02-27 00:08:01 -03001144 .gpio2 = 0x00ff,
Michael Krufkybc53f782006-05-28 01:43:35 -03001145 },{
1146 .type = CX88_VMUX_COMPOSITE1,
1147 .vmux = 1,
1148 .gpio0 = 0x3de6,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -03001149 .audioroute = 1,
Michael Krufkybc53f782006-05-28 01:43:35 -03001150 },{
1151 .type = CX88_VMUX_SVIDEO,
1152 .vmux = 2,
1153 .gpio0 = 0x3de6,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -03001154 .audioroute = 1,
Michael Krufky44256de2006-02-07 06:49:14 -02001155 }},
Michael Krufkye2798212006-02-27 00:07:58 -03001156 .radio = {
1157 .type = CX88_RADIO,
1158 .gpio0 = 0x3de6,
Michael Krufky24da4e42006-02-27 00:08:01 -03001159 .gpio2 = 0x00ff,
Michael Krufkye2798212006-02-27 00:07:58 -03001160 },
Michael Krufky48d5e802006-09-25 14:09:10 -03001161 .mpeg = CX88_MPEG_BLACKBIRD,
Michael Krufky44256de2006-02-07 06:49:14 -02001162 },
Chris Pascoe780dfef2006-02-28 08:34:59 -03001163 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID] = {
1164 .name = "DViCO FusionHDTV DVB-T Hybrid",
Michael Krufky91ae3292006-03-01 00:04:42 -03001165 .tuner_type = TUNER_THOMSON_FE6600,
Chris Pascoe780dfef2006-02-28 08:34:59 -03001166 .radio_type = UNSET,
1167 .tuner_addr = ADDR_UNSET,
1168 .radio_addr = ADDR_UNSET,
1169 .input = {{
1170 .type = CX88_VMUX_TELEVISION,
1171 .vmux = 0,
1172 .gpio0 = 0x0000a75f,
1173 },{
1174 .type = CX88_VMUX_COMPOSITE1,
1175 .vmux = 1,
1176 .gpio0 = 0x0000a75b,
1177 },{
1178 .type = CX88_VMUX_SVIDEO,
1179 .vmux = 2,
1180 .gpio0 = 0x0000a75b,
1181 }},
Michael Krufky48d5e802006-09-25 14:09:10 -03001182 .mpeg = CX88_MPEG_DVB,
Chris Pascoe780dfef2006-02-28 08:34:59 -03001183 },
Michael Krufkye142e7c2006-04-07 03:24:54 -03001184 [CX88_BOARD_PCHDTV_HD5500] = {
1185 .name = "pcHDTV HD5500 HDTV",
Michael Krufky9c26c8b2006-04-27 01:29:17 -03001186 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
Michael Krufkye142e7c2006-04-07 03:24:54 -03001187 .radio_type = UNSET,
1188 .tuner_addr = ADDR_UNSET,
1189 .radio_addr = ADDR_UNSET,
1190 .tda9887_conf = TDA9887_PRESENT,
1191 .input = {{
1192 .type = CX88_VMUX_TELEVISION,
1193 .vmux = 0,
1194 .gpio0 = 0x87fd,
1195 },{
1196 .type = CX88_VMUX_COMPOSITE1,
1197 .vmux = 1,
1198 .gpio0 = 0x87f9,
1199 },{
1200 .type = CX88_VMUX_SVIDEO,
1201 .vmux = 2,
1202 .gpio0 = 0x87f9,
1203 }},
Michael Krufky48d5e802006-09-25 14:09:10 -03001204 .mpeg = CX88_MPEG_DVB,
Michael Krufkye142e7c2006-04-07 03:24:54 -03001205 },
Valentin Zagurab3038302006-04-13 12:41:43 -03001206 [CX88_BOARD_KWORLD_MCE200_DELUXE] = {
1207 /* FIXME: tested TV input only, disabled composite,
1208 svideo and radio until they can be tested also. */
1209 .name = "Kworld MCE 200 Deluxe",
1210 .tuner_type = TUNER_TENA_9533_DI,
1211 .radio_type = UNSET,
1212 .tda9887_conf = TDA9887_PRESENT,
1213 .tuner_addr = ADDR_UNSET,
1214 .radio_addr = ADDR_UNSET,
1215 .input = {{
1216 .type = CX88_VMUX_TELEVISION,
1217 .vmux = 0,
1218 .gpio0 = 0x0000BDE6
1219 }},
Michael Krufky48d5e802006-09-25 14:09:10 -03001220 .mpeg = CX88_MPEG_BLACKBIRD,
Valentin Zagurab3038302006-04-13 12:41:43 -03001221 },
Angelo Marconia31246222006-05-09 18:27:48 -03001222 [CX88_BOARD_PIXELVIEW_PLAYTV_P7000] = {
1223 /* FIXME: SVideo, Composite and FM inputs are untested */
1224 .name = "PixelView PlayTV P7000",
1225 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
1226 .radio_type = UNSET,
1227 .tuner_addr = ADDR_UNSET,
1228 .radio_addr = ADDR_UNSET,
1229 .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |
1230 TDA9887_PORT2_ACTIVE,
1231 .input = {{
1232 .type = CX88_VMUX_TELEVISION,
1233 .vmux = 0,
1234 .gpio0 = 0x5da6,
1235 }},
Michael Krufky48d5e802006-09-25 14:09:10 -03001236 .mpeg = CX88_MPEG_BLACKBIRD,
Angelo Marconia31246222006-05-09 18:27:48 -03001237 },
Ricardo Cerqueirabe4f4512006-06-08 17:36:17 -03001238 [CX88_BOARD_NPGTECH_REALTV_TOP10FM] = {
1239 .name = "NPG Tech Real TV FM Top 10",
1240 .tuner_type = TUNER_TNF_5335MF, /* Actually a TNF9535 */
Ricardo Cerqueira680543c2006-05-22 07:44:02 -03001241 .radio_type = UNSET,
1242 .tuner_addr = ADDR_UNSET,
1243 .radio_addr = ADDR_UNSET,
1244 .input = {{
1245 .type = CX88_VMUX_TELEVISION,
1246 .vmux = 0,
1247 .gpio0 = 0x0788,
1248 },{
1249 .type = CX88_VMUX_COMPOSITE1,
1250 .vmux = 1,
1251 .gpio0 = 0x078b,
1252 },{
1253 .type = CX88_VMUX_SVIDEO,
1254 .vmux = 2,
Ricardo Cerqueirabe4f4512006-06-08 17:36:17 -03001255 .gpio0 = 0x078b,
Ricardo Cerqueira680543c2006-05-22 07:44:02 -03001256 }},
1257 .radio = {
1258 .type = CX88_RADIO,
1259 .gpio0 = 0x074a,
1260 },
1261 },
Malcolm Valentine4bd6e9d2006-05-29 13:51:59 -03001262 [CX88_BOARD_WINFAST_DTV2000H] = {
Malcolm Valentine4bd6e9d2006-05-29 13:51:59 -03001263 .name = "WinFast DTV2000 H",
1264 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1265 .radio_type = UNSET,
1266 .tuner_addr = ADDR_UNSET,
1267 .radio_addr = ADDR_UNSET,
1268 .tda9887_conf = TDA9887_PRESENT,
1269 .input = {{
1270 .type = CX88_VMUX_TELEVISION,
1271 .vmux = 0,
1272 .gpio0 = 0x00017304,
1273 .gpio1 = 0x00008203,
1274 .gpio2 = 0x00017304,
1275 .gpio3 = 0x02000000,
Vincent Pelletier5cff91a2008-11-09 13:50:07 -03001276 }, {
1277 .type = CX88_VMUX_COMPOSITE1,
1278 .vmux = 1,
1279 .gpio0 = 0x0001d701,
1280 .gpio1 = 0x0000b207,
1281 .gpio2 = 0x0001d701,
1282 .gpio3 = 0x02000000,
1283 }, {
1284 .type = CX88_VMUX_COMPOSITE2,
1285 .vmux = 2,
1286 .gpio0 = 0x0001d503,
1287 .gpio1 = 0x0000b207,
1288 .gpio2 = 0x0001d503,
1289 .gpio3 = 0x02000000,
1290 }, {
1291 .type = CX88_VMUX_SVIDEO,
1292 .vmux = 3,
1293 .gpio0 = 0x0001d701,
1294 .gpio1 = 0x0000b207,
1295 .gpio2 = 0x0001d701,
1296 .gpio3 = 0x02000000,
Malcolm Valentine4bd6e9d2006-05-29 13:51:59 -03001297 }},
Vincent Pelletier5cff91a2008-11-09 13:50:07 -03001298 .radio = {
1299 .type = CX88_RADIO,
1300 .gpio0 = 0x00015702,
1301 .gpio1 = 0x0000f207,
1302 .gpio2 = 0x00015702,
1303 .gpio3 = 0x02000000,
1304 },
Michael Krufky48d5e802006-09-25 14:09:10 -03001305 .mpeg = CX88_MPEG_DVB,
Malcolm Valentine4bd6e9d2006-05-29 13:51:59 -03001306 },
Vlastimil Labsky4d14c832009-08-10 22:15:54 -03001307 [CX88_BOARD_WINFAST_DTV2000H_J] = {
1308 .name = "WinFast DTV2000 H rev. J",
Miroslav Slugen27b93d82011-12-13 15:36:15 -03001309 .tuner_type = TUNER_PHILIPS_FMD1216MEX_MK3,
Vlastimil Labsky4d14c832009-08-10 22:15:54 -03001310 .radio_type = UNSET,
1311 .tuner_addr = ADDR_UNSET,
1312 .radio_addr = ADDR_UNSET,
1313 .tda9887_conf = TDA9887_PRESENT,
1314 .input = {{
1315 .type = CX88_VMUX_TELEVISION,
1316 .vmux = 0,
1317 .gpio0 = 0x00017300,
1318 .gpio1 = 0x00008207,
1319 .gpio2 = 0x00000000,
1320 .gpio3 = 0x02000000,
1321 },{
1322 .type = CX88_VMUX_TELEVISION,
1323 .vmux = 0,
1324 .gpio0 = 0x00018300,
1325 .gpio1 = 0x0000f207,
1326 .gpio2 = 0x00017304,
1327 .gpio3 = 0x02000000,
1328 },{
1329 .type = CX88_VMUX_COMPOSITE1,
1330 .vmux = 1,
1331 .gpio0 = 0x00018301,
1332 .gpio1 = 0x0000f207,
1333 .gpio2 = 0x00017304,
1334 .gpio3 = 0x02000000,
1335 },{
1336 .type = CX88_VMUX_SVIDEO,
1337 .vmux = 2,
1338 .gpio0 = 0x00018301,
1339 .gpio1 = 0x0000f207,
1340 .gpio2 = 0x00017304,
1341 .gpio3 = 0x02000000,
1342 }},
1343 .radio = {
1344 .type = CX88_RADIO,
1345 .gpio0 = 0x00015702,
1346 .gpio1 = 0x0000f207,
1347 .gpio2 = 0x00015702,
1348 .gpio3 = 0x02000000,
1349 },
1350 .mpeg = CX88_MPEG_DVB,
1351 },
Saqeb Akhterc02a34f2006-06-29 20:29:33 -03001352 [CX88_BOARD_GENIATECH_DVBS] = {
1353 .name = "Geniatech DVB-S",
1354 .tuner_type = TUNER_ABSENT,
1355 .radio_type = UNSET,
1356 .tuner_addr = ADDR_UNSET,
1357 .radio_addr = ADDR_UNSET,
1358 .input = {{
1359 .type = CX88_VMUX_DVB,
1360 .vmux = 0,
1361 },{
1362 .type = CX88_VMUX_COMPOSITE1,
1363 .vmux = 1,
1364 }},
Michael Krufky48d5e802006-09-25 14:09:10 -03001365 .mpeg = CX88_MPEG_DVB,
Saqeb Akhterc02a34f2006-06-29 20:29:33 -03001366 },
Eric Thomasad10c932006-08-08 09:10:04 -03001367 [CX88_BOARD_HAUPPAUGE_HVR3000] = {
Eric Thomasad10c932006-08-08 09:10:04 -03001368 .name = "Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DVB-T",
1369 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1370 .radio_type = UNSET,
1371 .tuner_addr = ADDR_UNSET,
1372 .radio_addr = ADDR_UNSET,
1373 .tda9887_conf = TDA9887_PRESENT,
Darron Broad923ac7f2008-10-11 11:49:30 -03001374 .audio_chip = V4L2_IDENT_WM8775,
Eric Thomasad10c932006-08-08 09:10:04 -03001375 .input = {{
1376 .type = CX88_VMUX_TELEVISION,
1377 .vmux = 0,
1378 .gpio0 = 0x84bf,
Darron Broad649e13a2008-10-15 14:12:30 -03001379 /* 1: TV Audio / FM Mono */
Darron Broad923ac7f2008-10-11 11:49:30 -03001380 .audioroute = 1,
Eric Thomasad10c932006-08-08 09:10:04 -03001381 },{
1382 .type = CX88_VMUX_COMPOSITE1,
1383 .vmux = 1,
1384 .gpio0 = 0x84bf,
Darron Broad649e13a2008-10-15 14:12:30 -03001385 /* 2: Line-In */
Darron Broad923ac7f2008-10-11 11:49:30 -03001386 .audioroute = 2,
Eric Thomasad10c932006-08-08 09:10:04 -03001387 },{
1388 .type = CX88_VMUX_SVIDEO,
1389 .vmux = 2,
1390 .gpio0 = 0x84bf,
Darron Broad649e13a2008-10-15 14:12:30 -03001391 /* 2: Line-In */
Darron Broad923ac7f2008-10-11 11:49:30 -03001392 .audioroute = 2,
Eric Thomasad10c932006-08-08 09:10:04 -03001393 }},
Darron Broad63248f22008-10-11 11:57:59 -03001394 .radio = {
1395 .type = CX88_RADIO,
1396 .gpio0 = 0x84bf,
Darron Broad649e13a2008-10-15 14:12:30 -03001397 /* 4: FM Stereo (untested) */
1398 .audioroute = 8,
Darron Broad63248f22008-10-11 11:57:59 -03001399 },
Steven Toth76dc82a2006-09-30 00:43:58 -03001400 .mpeg = CX88_MPEG_DVB,
Steven Toth363c35f2008-10-11 11:05:50 -03001401 .num_frontends = 2,
Eric Thomasad10c932006-08-08 09:10:04 -03001402 },
Peter Naullsd1009bd2006-08-08 09:10:05 -03001403 [CX88_BOARD_NORWOOD_MICRO] = {
1404 .name = "Norwood Micro TV Tuner",
1405 .tuner_type = TUNER_TNF_5335MF,
1406 .radio_type = UNSET,
1407 .tuner_addr = ADDR_UNSET,
1408 .radio_addr = ADDR_UNSET,
1409 .input = {{
1410 .type = CX88_VMUX_TELEVISION,
1411 .vmux = 0,
1412 .gpio0 = 0x0709,
1413 },{
1414 .type = CX88_VMUX_COMPOSITE1,
1415 .vmux = 1,
1416 .gpio0 = 0x070b,
1417 },{
1418 .type = CX88_VMUX_SVIDEO,
1419 .vmux = 2,
1420 .gpio0 = 0x070b,
1421 }},
1422 },
Michael Krufky5b26c822006-10-16 16:07:51 -03001423 [CX88_BOARD_TE_DTV_250_OEM_SWANN] = {
1424 .name = "Shenzhen Tungsten Ages Tech TE-DTV-250 / Swann OEM",
1425 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
1426 .radio_type = UNSET,
1427 .tuner_addr = ADDR_UNSET,
1428 .radio_addr = ADDR_UNSET,
1429 .input = {{
1430 .type = CX88_VMUX_TELEVISION,
1431 .vmux = 0,
1432 .gpio0 = 0x003fffff,
1433 .gpio1 = 0x00e00000,
1434 .gpio2 = 0x003fffff,
1435 .gpio3 = 0x02000000,
David Bussenschutt2acadef2006-08-08 09:10:05 -03001436 },{
Michael Krufky5b26c822006-10-16 16:07:51 -03001437 .type = CX88_VMUX_COMPOSITE1,
1438 .vmux = 1,
1439 .gpio0 = 0x003fffff,
1440 .gpio1 = 0x00e00000,
1441 .gpio2 = 0x003fffff,
1442 .gpio3 = 0x02000000,
1443 },{
1444 .type = CX88_VMUX_SVIDEO,
1445 .vmux = 2,
1446 .gpio0 = 0x003fffff,
1447 .gpio1 = 0x00e00000,
1448 .gpio2 = 0x003fffff,
1449 .gpio3 = 0x02000000,
1450 }},
1451 },
Steven Tothaa481a62006-09-14 15:41:13 -03001452 [CX88_BOARD_HAUPPAUGE_HVR1300] = {
1453 .name = "Hauppauge WinTV-HVR1300 DVB-T/Hybrid MPEG Encoder",
1454 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1455 .radio_type = UNSET,
1456 .tuner_addr = ADDR_UNSET,
1457 .radio_addr = ADDR_UNSET,
1458 .tda9887_conf = TDA9887_PRESENT,
Hans Verkuil38f9d302008-07-23 05:09:15 -03001459 .audio_chip = V4L2_IDENT_WM8775,
Steven Toth2491fbb2008-09-22 01:48:13 -03001460 /*
1461 * gpio0 as reported by Mike Crash <mike AT mikecrash.com>
1462 */
Steven Tothaa481a62006-09-14 15:41:13 -03001463 .input = {{
1464 .type = CX88_VMUX_TELEVISION,
1465 .vmux = 0,
Steven Toth2491fbb2008-09-22 01:48:13 -03001466 .gpio0 = 0xef88,
Darron Broad649e13a2008-10-15 14:12:30 -03001467 /* 1: TV Audio / FM Mono */
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -03001468 .audioroute = 1,
Steven Tothaa481a62006-09-14 15:41:13 -03001469 },{
1470 .type = CX88_VMUX_COMPOSITE1,
1471 .vmux = 1,
Steven Toth2491fbb2008-09-22 01:48:13 -03001472 .gpio0 = 0xef88,
Darron Broad649e13a2008-10-15 14:12:30 -03001473 /* 2: Line-In */
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -03001474 .audioroute = 2,
Steven Tothaa481a62006-09-14 15:41:13 -03001475 },{
1476 .type = CX88_VMUX_SVIDEO,
1477 .vmux = 2,
Steven Toth2491fbb2008-09-22 01:48:13 -03001478 .gpio0 = 0xef88,
Darron Broad649e13a2008-10-15 14:12:30 -03001479 /* 2: Line-In */
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -03001480 .audioroute = 2,
Steven Tothaa481a62006-09-14 15:41:13 -03001481 }},
Steven Toth6c5be742006-12-02 21:15:51 -02001482 .mpeg = CX88_MPEG_DVB | CX88_MPEG_BLACKBIRD,
Steven Toth6b92b3b2008-04-05 16:45:57 -03001483 .radio = {
1484 .type = CX88_RADIO,
Steven Toth2491fbb2008-09-22 01:48:13 -03001485 .gpio0 = 0xef88,
Darron Broad649e13a2008-10-15 14:12:30 -03001486 /* 4: FM Stereo (untested) */
1487 .audioroute = 8,
Steven Toth6b92b3b2008-04-05 16:45:57 -03001488 },
Steven Tothaa481a62006-09-14 15:41:13 -03001489 },
Dirk Herrendoerfer4f3ca2f12010-02-11 18:06:34 -03001490 [CX88_BOARD_SAMSUNG_SMT_7020] = {
1491 .name = "Samsung SMT 7020 DVB-S",
1492 .tuner_type = TUNER_ABSENT,
1493 .radio_type = UNSET,
1494 .tuner_addr = ADDR_UNSET,
1495 .radio_addr = ADDR_UNSET,
1496 .input = { {
1497 .type = CX88_VMUX_DVB,
1498 .vmux = 0,
1499 } },
1500 .mpeg = CX88_MPEG_DVB,
1501 },
Daniel Gimpelevich7cb47a12007-05-17 18:10:17 -03001502 [CX88_BOARD_ADSTECH_PTV_390] = {
1503 .name = "ADS Tech Instant Video PCI",
1504 .tuner_type = TUNER_ABSENT,
1505 .radio_type = UNSET,
1506 .tuner_addr = ADDR_UNSET,
1507 .radio_addr = ADDR_UNSET,
1508 .input = {{
1509 .type = CX88_VMUX_DEBUG,
1510 .vmux = 3,
1511 .gpio0 = 0x04ff,
1512 },{
1513 .type = CX88_VMUX_COMPOSITE1,
1514 .vmux = 1,
1515 .gpio0 = 0x07fa,
1516 },{
1517 .type = CX88_VMUX_SVIDEO,
1518 .vmux = 2,
1519 .gpio0 = 0x07fa,
1520 }},
1521 },
Steven Toth60464da2008-01-05 16:53:01 -03001522 [CX88_BOARD_PINNACLE_PCTV_HD_800i] = {
1523 .name = "Pinnacle PCTV HD 800i",
1524 .tuner_type = TUNER_XC5000,
1525 .radio_type = UNSET,
1526 .tuner_addr = ADDR_UNSET,
1527 .radio_addr = ADDR_UNSET,
1528 .input = {{
1529 .type = CX88_VMUX_TELEVISION,
1530 .vmux = 0,
1531 .gpio0 = 0x04fb,
1532 .gpio1 = 0x10ff,
1533 },{
1534 .type = CX88_VMUX_COMPOSITE1,
1535 .vmux = 1,
1536 .gpio0 = 0x04fb,
1537 .gpio1 = 0x10ef,
1538 .audioroute = 1,
1539 },{
1540 .type = CX88_VMUX_SVIDEO,
1541 .vmux = 2,
1542 .gpio0 = 0x04fb,
1543 .gpio1 = 0x10ef,
1544 .audioroute = 1,
1545 }},
1546 .mpeg = CX88_MPEG_DVB,
1547 },
Steven Toth5c00fac2008-04-22 14:45:14 -03001548 [CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO] = {
Michael Krufky8efd2e22008-04-22 14:45:14 -03001549 .name = "DViCO FusionHDTV 5 PCI nano",
1550 /* xc3008 tuner, digital only for now */
Steven Toth5c00fac2008-04-22 14:45:14 -03001551 .tuner_type = TUNER_ABSENT,
1552 .radio_type = UNSET,
1553 .tuner_addr = ADDR_UNSET,
1554 .radio_addr = ADDR_UNSET,
1555 .input = {{
1556 .type = CX88_VMUX_TELEVISION,
1557 .vmux = 0,
1558 .gpio0 = 0x000027df, /* Unconfirmed */
1559 }, {
1560 .type = CX88_VMUX_COMPOSITE1,
1561 .vmux = 1,
1562 .gpio0 = 0x000027df, /* Unconfirmed */
1563 .audioroute = 1,
1564 }, {
1565 .type = CX88_VMUX_SVIDEO,
1566 .vmux = 2,
1567 .gpio0 = 0x000027df, /* Unconfirmed */
1568 .audioroute = 1,
1569 } },
1570 .mpeg = CX88_MPEG_DVB,
1571 },
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03001572 [CX88_BOARD_PINNACLE_HYBRID_PCTV] = {
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001573 .name = "Pinnacle Hybrid PCTV",
1574 .tuner_type = TUNER_XC2028,
1575 .tuner_addr = 0x61,
Miroslav Slugenb6854e32011-12-11 19:00:06 -03001576 .radio_type = UNSET,
1577 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001578 .input = { {
1579 .type = CX88_VMUX_TELEVISION,
1580 .vmux = 0,
Stéphane Voltz3f6014f2008-09-05 14:33:54 -03001581 .gpio0 = 0x004ff,
1582 .gpio1 = 0x010ff,
1583 .gpio2 = 0x00001,
Chris Pascoeb3fb91d2008-04-22 14:45:15 -03001584 }, {
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001585 .type = CX88_VMUX_COMPOSITE1,
1586 .vmux = 1,
Stéphane Voltz3f6014f2008-09-05 14:33:54 -03001587 .gpio0 = 0x004fb,
1588 .gpio1 = 0x010ef,
1589 .audioroute = 1,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001590 }, {
1591 .type = CX88_VMUX_SVIDEO,
1592 .vmux = 2,
Stéphane Voltz3f6014f2008-09-05 14:33:54 -03001593 .gpio0 = 0x004fb,
1594 .gpio1 = 0x010ef,
1595 .audioroute = 1,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001596 } },
1597 .radio = {
1598 .type = CX88_RADIO,
1599 .gpio0 = 0x004ff,
1600 .gpio1 = 0x010ff,
1601 .gpio2 = 0x0ff,
1602 },
Stéphane Voltz3f6014f2008-09-05 14:33:54 -03001603 .mpeg = CX88_MPEG_DVB,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001604 },
Mauro Carvalho Chehab14422f92009-06-16 23:55:44 -03001605 /* Terry Wu <terrywu2009@gmail.com> */
1606 /* TV Audio : set GPIO 2, 18, 19 value to 0, 1, 0 */
1607 /* FM Audio : set GPIO 2, 18, 19 value to 0, 0, 0 */
1608 /* Line-in Audio : set GPIO 2, 18, 19 value to 0, 1, 1 */
1609 /* Mute Audio : set GPIO 2 value to 1 */
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001610 [CX88_BOARD_WINFAST_TV2000_XP_GLOBAL] = {
Mauro Carvalho Chehab14422f92009-06-16 23:55:44 -03001611 .name = "Leadtek TV2000 XP Global",
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001612 .tuner_type = TUNER_XC2028,
1613 .tuner_addr = 0x61,
Miroslav Slugenb6854e32011-12-11 19:00:06 -03001614 .radio_type = UNSET,
1615 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001616 .input = { {
1617 .type = CX88_VMUX_TELEVISION,
1618 .vmux = 0,
Mauro Carvalho Chehab14422f92009-06-16 23:55:44 -03001619 .gpio0 = 0x0400, /* pin 2 = 0 */
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001620 .gpio1 = 0x0000,
Mauro Carvalho Chehab14422f92009-06-16 23:55:44 -03001621 .gpio2 = 0x0C04, /* pin 18 = 1, pin 19 = 0 */
1622 .gpio3 = 0x0000,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001623 }, {
1624 .type = CX88_VMUX_COMPOSITE1,
1625 .vmux = 1,
Mauro Carvalho Chehab14422f92009-06-16 23:55:44 -03001626 .gpio0 = 0x0400, /* pin 2 = 0 */
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001627 .gpio1 = 0x0000,
Mauro Carvalho Chehab14422f92009-06-16 23:55:44 -03001628 .gpio2 = 0x0C0C, /* pin 18 = 1, pin 19 = 1 */
1629 .gpio3 = 0x0000,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001630 }, {
1631 .type = CX88_VMUX_SVIDEO,
1632 .vmux = 2,
Mauro Carvalho Chehab14422f92009-06-16 23:55:44 -03001633 .gpio0 = 0x0400, /* pin 2 = 0 */
1634 .gpio1 = 0x0000,
1635 .gpio2 = 0x0C0C, /* pin 18 = 1, pin 19 = 1 */
1636 .gpio3 = 0x0000,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001637 } },
1638 .radio = {
1639 .type = CX88_RADIO,
Mauro Carvalho Chehab14422f92009-06-16 23:55:44 -03001640 .gpio0 = 0x0400, /* pin 2 = 0 */
1641 .gpio1 = 0x0000,
1642 .gpio2 = 0x0C00, /* pin 18 = 0, pin 19 = 0 */
1643 .gpio3 = 0x0000,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001644 },
1645 },
Istvan Varga84463d52011-12-11 20:20:24 -03001646 [CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F36] = {
1647 .name = "Leadtek TV2000 XP Global (SC4100)",
1648 .tuner_type = TUNER_XC4000,
1649 .tuner_addr = 0x61,
1650 .radio_type = UNSET,
1651 .radio_addr = ADDR_UNSET,
1652 .input = { {
1653 .type = CX88_VMUX_TELEVISION,
1654 .vmux = 0,
1655 .gpio0 = 0x0400, /* pin 2 = 0 */
1656 .gpio1 = 0x0000,
1657 .gpio2 = 0x0C04, /* pin 18 = 1, pin 19 = 0 */
1658 .gpio3 = 0x0000,
1659 }, {
1660 .type = CX88_VMUX_COMPOSITE1,
1661 .vmux = 1,
1662 .gpio0 = 0x0400, /* pin 2 = 0 */
1663 .gpio1 = 0x0000,
1664 .gpio2 = 0x0C0C, /* pin 18 = 1, pin 19 = 1 */
1665 .gpio3 = 0x0000,
1666 }, {
1667 .type = CX88_VMUX_SVIDEO,
1668 .vmux = 2,
1669 .gpio0 = 0x0400, /* pin 2 = 0 */
1670 .gpio1 = 0x0000,
1671 .gpio2 = 0x0C0C, /* pin 18 = 1, pin 19 = 1 */
1672 .gpio3 = 0x0000,
1673 } },
1674 .radio = {
1675 .type = CX88_RADIO,
1676 .gpio0 = 0x0400, /* pin 2 = 0 */
1677 .gpio1 = 0x0000,
1678 .gpio2 = 0x0C00, /* pin 18 = 0, pin 19 = 0 */
1679 .gpio3 = 0x0000,
1680 },
1681 },
1682 [CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F43] = {
1683 .name = "Leadtek TV2000 XP Global (XC4100)",
1684 .tuner_type = TUNER_XC4000,
1685 .tuner_addr = 0x61,
1686 .radio_type = UNSET,
1687 .radio_addr = ADDR_UNSET,
1688 .input = { {
1689 .type = CX88_VMUX_TELEVISION,
1690 .vmux = 0,
1691 .gpio0 = 0x0400, /* pin 2 = 0 */
1692 .gpio1 = 0x6040, /* pin 14 = 1, pin 13 = 0 */
1693 .gpio2 = 0x0000,
1694 .gpio3 = 0x0000,
1695 }, {
1696 .type = CX88_VMUX_COMPOSITE1,
1697 .vmux = 1,
1698 .gpio0 = 0x0400, /* pin 2 = 0 */
1699 .gpio1 = 0x6060, /* pin 14 = 1, pin 13 = 1 */
1700 .gpio2 = 0x0000,
1701 .gpio3 = 0x0000,
1702 }, {
1703 .type = CX88_VMUX_SVIDEO,
1704 .vmux = 2,
1705 .gpio0 = 0x0400, /* pin 2 = 0 */
1706 .gpio1 = 0x6060, /* pin 14 = 1, pin 13 = 1 */
1707 .gpio2 = 0x0000,
1708 .gpio3 = 0x0000,
1709 } },
1710 .radio = {
1711 .type = CX88_RADIO,
1712 .gpio0 = 0x0400, /* pin 2 = 0 */
1713 .gpio1 = 0x6000, /* pin 14 = 1, pin 13 = 0 */
1714 .gpio2 = 0x0000,
1715 .gpio3 = 0x0000,
1716 },
1717 },
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001718 [CX88_BOARD_POWERCOLOR_REAL_ANGEL] = {
Daniel Gimpelevicha9606ce2008-06-03 21:29:45 -03001719 .name = "PowerColor RA330", /* Long names may confuse LIRC. */
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001720 .tuner_type = TUNER_XC2028,
1721 .tuner_addr = 0x61,
1722 .input = { {
Daniel Gimpelevicha9606ce2008-06-03 21:29:45 -03001723 .type = CX88_VMUX_DEBUG,
1724 .vmux = 3, /* Due to the way the cx88 driver is written, */
1725 .gpio0 = 0x00ff, /* there is no way to deactivate audio pass- */
1726 .gpio1 = 0xf39d, /* through without this entry. Furthermore, if */
1727 .gpio3 = 0x0000, /* the TV mux entry is first, you get audio */
1728 }, { /* from the tuner on boot for a little while. */
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001729 .type = CX88_VMUX_TELEVISION,
1730 .vmux = 0,
Dâniel Fragaab364982008-04-08 19:54:49 -03001731 .gpio0 = 0x00ff,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001732 .gpio1 = 0xf35d,
Dâniel Fragaab364982008-04-08 19:54:49 -03001733 .gpio3 = 0x0000,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001734 }, {
1735 .type = CX88_VMUX_COMPOSITE1,
1736 .vmux = 1,
Dâniel Fragaab364982008-04-08 19:54:49 -03001737 .gpio0 = 0x00ff,
1738 .gpio1 = 0xf37d,
1739 .gpio3 = 0x0000,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001740 }, {
1741 .type = CX88_VMUX_SVIDEO,
1742 .vmux = 2,
1743 .gpio0 = 0x000ff,
1744 .gpio1 = 0x0f37d,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001745 .gpio3 = 0x00000,
1746 } },
1747 .radio = {
1748 .type = CX88_RADIO,
1749 .gpio0 = 0x000ff,
1750 .gpio1 = 0x0f35d,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001751 .gpio3 = 0x00000,
1752 },
1753 },
1754 [CX88_BOARD_GENIATECH_X8000_MT] = {
1755 /* Also PowerColor Real Angel 330 and Geniatech X800 OEM */
1756 .name = "Geniatech X8000-MT DVBT",
1757 .tuner_type = TUNER_XC2028,
1758 .tuner_addr = 0x61,
1759 .input = { {
1760 .type = CX88_VMUX_TELEVISION,
1761 .vmux = 0,
1762 .gpio0 = 0x00000000,
1763 .gpio1 = 0x00e3e341,
1764 .gpio2 = 0x00000000,
1765 .gpio3 = 0x00000000,
1766 }, {
1767 .type = CX88_VMUX_COMPOSITE1,
1768 .vmux = 1,
1769 .gpio0 = 0x00000000,
1770 .gpio1 = 0x00e3e361,
1771 .gpio2 = 0x00000000,
1772 .gpio3 = 0x00000000,
1773 }, {
1774 .type = CX88_VMUX_SVIDEO,
1775 .vmux = 2,
1776 .gpio0 = 0x00000000,
1777 .gpio1 = 0x00e3e361,
1778 .gpio2 = 0x00000000,
1779 .gpio3 = 0x00000000,
1780 } },
1781 .radio = {
1782 .type = CX88_RADIO,
1783 .gpio0 = 0x00000000,
1784 .gpio1 = 0x00e3e341,
1785 .gpio2 = 0x00000000,
1786 .gpio3 = 0x00000000,
1787 },
1788 .mpeg = CX88_MPEG_DVB,
1789 },
1790 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO] = {
1791 .name = "DViCO FusionHDTV DVB-T PRO",
Tim Farrington19c309e2008-10-11 12:44:38 -03001792 .tuner_type = TUNER_XC2028,
1793 .tuner_addr = 0x61,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001794 .radio_type = UNSET,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001795 .radio_addr = ADDR_UNSET,
1796 .input = { {
1797 .type = CX88_VMUX_COMPOSITE1,
1798 .vmux = 1,
1799 .gpio0 = 0x000067df,
1800 }, {
1801 .type = CX88_VMUX_SVIDEO,
1802 .vmux = 2,
1803 .gpio0 = 0x000067df,
1804 } },
1805 .mpeg = CX88_MPEG_DVB,
1806 },
Steven Toth1117d6b2008-04-22 14:45:34 -03001807 [CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD] = {
Michael Krufky76464d42008-04-22 14:45:35 -03001808 .name = "DViCO FusionHDTV 7 Gold",
Steven Toth1117d6b2008-04-22 14:45:34 -03001809 .tuner_type = TUNER_XC5000,
1810 .radio_type = UNSET,
1811 .tuner_addr = ADDR_UNSET,
1812 .radio_addr = ADDR_UNSET,
1813 .input = {{
1814 .type = CX88_VMUX_TELEVISION,
1815 .vmux = 0,
Michael Krufky76464d42008-04-22 14:45:35 -03001816 .gpio0 = 0x10df,
Steven Toth1117d6b2008-04-22 14:45:34 -03001817 },{
1818 .type = CX88_VMUX_COMPOSITE1,
1819 .vmux = 1,
Michael Krufky76464d42008-04-22 14:45:35 -03001820 .gpio0 = 0x16d9,
Steven Toth1117d6b2008-04-22 14:45:34 -03001821 },{
1822 .type = CX88_VMUX_SVIDEO,
1823 .vmux = 2,
Michael Krufky76464d42008-04-22 14:45:35 -03001824 .gpio0 = 0x16d9,
Steven Toth1117d6b2008-04-22 14:45:34 -03001825 }},
Steven Tothd893d5d2008-04-25 03:46:43 -03001826 .mpeg = CX88_MPEG_DVB,
Steven Toth1117d6b2008-04-22 14:45:34 -03001827 },
Mauro Carvalho Chehab2422a9b2008-04-22 14:46:00 -03001828 [CX88_BOARD_PROLINK_PV_8000GT] = {
1829 .name = "Prolink Pixelview MPEG 8000GT",
1830 .tuner_type = TUNER_XC2028,
1831 .tuner_addr = 0x61,
1832 .input = { {
1833 .type = CX88_VMUX_TELEVISION,
1834 .vmux = 0,
1835 .gpio0 = 0x0ff,
1836 .gpio2 = 0x0cfb,
1837 }, {
1838 .type = CX88_VMUX_COMPOSITE1,
1839 .vmux = 1,
1840 .gpio2 = 0x0cfb,
1841 }, {
1842 .type = CX88_VMUX_SVIDEO,
1843 .vmux = 2,
1844 .gpio2 = 0x0cfb,
1845 } },
1846 .radio = {
1847 .type = CX88_RADIO,
1848 .gpio2 = 0x0cfb,
1849 },
1850 },
Mauro Carvalho Chehaba31d2bb2008-09-29 12:08:29 -03001851 [CX88_BOARD_PROLINK_PV_GLOBAL_XTREME] = {
1852 .name = "Prolink Pixelview Global Extreme",
1853 .tuner_type = TUNER_XC2028,
1854 .tuner_addr = 0x61,
1855 .input = { {
1856 .type = CX88_VMUX_TELEVISION,
1857 .vmux = 0,
1858 .gpio0 = 0x04fb,
1859 .gpio1 = 0x04080,
1860 .gpio2 = 0x0cf7,
1861 }, {
1862 .type = CX88_VMUX_COMPOSITE1,
1863 .vmux = 1,
1864 .gpio0 = 0x04fb,
1865 .gpio1 = 0x04080,
1866 .gpio2 = 0x0cfb,
1867 }, {
1868 .type = CX88_VMUX_SVIDEO,
1869 .vmux = 2,
1870 .gpio0 = 0x04fb,
1871 .gpio1 = 0x04080,
1872 .gpio2 = 0x0cfb,
1873 } },
1874 .radio = {
1875 .type = CX88_RADIO,
1876 .gpio0 = 0x04ff,
1877 .gpio1 = 0x04080,
1878 .gpio2 = 0x0cf7,
1879 },
1880 },
Mauro Carvalho Chehab99e09ea2008-03-27 23:18:30 -03001881 /* Both radio, analog and ATSC work with this board.
1882 However, for analog to work, s5h1409 gate should be open,
1883 otherwise, tuner-xc3028 won't be detected.
1884 A proper fix require using the newer i2c methods to add
1885 tuner-xc3028 without doing an i2c probe.
1886 */
1887 [CX88_BOARD_KWORLD_ATSC_120] = {
1888 .name = "Kworld PlusTV HD PCI 120 (ATSC 120)",
1889 .tuner_type = TUNER_XC2028,
1890 .radio_type = UNSET,
1891 .tuner_addr = ADDR_UNSET,
1892 .radio_addr = ADDR_UNSET,
1893 .input = { {
1894 .type = CX88_VMUX_TELEVISION,
1895 .vmux = 0,
1896 .gpio0 = 0x000000ff,
1897 .gpio1 = 0x0000f35d,
1898 .gpio2 = 0x00000000,
1899 }, {
1900 .type = CX88_VMUX_COMPOSITE1,
1901 .vmux = 1,
1902 .gpio0 = 0x000000ff,
1903 .gpio1 = 0x0000f37e,
1904 .gpio2 = 0x00000000,
1905 }, {
1906 .type = CX88_VMUX_SVIDEO,
1907 .vmux = 2,
1908 .gpio0 = 0x000000ff,
1909 .gpio1 = 0x0000f37e,
1910 .gpio2 = 0x00000000,
1911 } },
1912 .radio = {
1913 .type = CX88_RADIO,
1914 .gpio0 = 0x000000ff,
1915 .gpio1 = 0x0000f35d,
1916 .gpio2 = 0x00000000,
1917 },
1918 .mpeg = CX88_MPEG_DVB,
1919 },
Steven Toth5bd1b662008-09-04 01:17:33 -03001920 [CX88_BOARD_HAUPPAUGE_HVR4000] = {
1921 .name = "Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid",
1922 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1923 .radio_type = UNSET,
1924 .tuner_addr = ADDR_UNSET,
1925 .radio_addr = ADDR_UNSET,
1926 .tda9887_conf = TDA9887_PRESENT,
Darron Broad923ac7f2008-10-11 11:49:30 -03001927 .audio_chip = V4L2_IDENT_WM8775,
Steven Toth5bd1b662008-09-04 01:17:33 -03001928 /*
1929 * GPIO0 (WINTV2000)
1930 *
1931 * Analogue SAT DVB-T
1932 * Antenna 0xc4bf 0xc4bb
1933 * Composite 0xc4bf 0xc4bb
1934 * S-Video 0xc4bf 0xc4bb
1935 * Composite1 0xc4ff 0xc4fb
1936 * S-Video1 0xc4ff 0xc4fb
Steven Toth2491fbb2008-09-22 01:48:13 -03001937 *
1938 * BIT VALUE FUNCTION GP{x}_IO
1939 * 0 1 I:?
1940 * 1 1 I:?
Darron Broad63248f22008-10-11 11:57:59 -03001941 * 2 1 O:MPEG PORT 0=DVB-T 1=DVB-S
Steven Toth2491fbb2008-09-22 01:48:13 -03001942 * 3 1 I:?
1943 * 4 1 I:?
1944 * 5 1 I:?
1945 * 6 0 O:INPUT SELECTOR 0=INTERNAL 1=EXPANSION
1946 * 7 1 O:DVB-T DEMOD RESET LOW
1947 *
1948 * BIT VALUE FUNCTION GP{x}_OE
1949 * 8 0 I
1950 * 9 0 I
1951 * a 1 O
1952 * b 0 I
1953 * c 0 I
1954 * d 0 I
1955 * e 1 O
1956 * f 1 O
Darron Broad649e13a2008-10-15 14:12:30 -03001957 *
1958 * WM8775 ADC
1959 *
1960 * 1: TV Audio / FM Mono
1961 * 2: Line-In
1962 * 3: Line-In Expansion
1963 * 4: FM Stereo
Steven Toth5bd1b662008-09-04 01:17:33 -03001964 */
1965 .input = {{
1966 .type = CX88_VMUX_TELEVISION,
1967 .vmux = 0,
1968 .gpio0 = 0xc4bf,
Darron Broad649e13a2008-10-15 14:12:30 -03001969 /* 1: TV Audio / FM Mono */
Darron Broad923ac7f2008-10-11 11:49:30 -03001970 .audioroute = 1,
Steven Toth5bd1b662008-09-04 01:17:33 -03001971 }, {
1972 .type = CX88_VMUX_COMPOSITE1,
1973 .vmux = 1,
1974 .gpio0 = 0xc4bf,
Darron Broad649e13a2008-10-15 14:12:30 -03001975 /* 2: Line-In */
Darron Broad923ac7f2008-10-11 11:49:30 -03001976 .audioroute = 2,
Steven Toth5bd1b662008-09-04 01:17:33 -03001977 }, {
1978 .type = CX88_VMUX_SVIDEO,
1979 .vmux = 2,
1980 .gpio0 = 0xc4bf,
Darron Broad649e13a2008-10-15 14:12:30 -03001981 /* 2: Line-In */
Darron Broad923ac7f2008-10-11 11:49:30 -03001982 .audioroute = 2,
Steven Toth5bd1b662008-09-04 01:17:33 -03001983 } },
Darron Broad63248f22008-10-11 11:57:59 -03001984 .radio = {
1985 .type = CX88_RADIO,
1986 .gpio0 = 0xc4bf,
Darron Broad649e13a2008-10-15 14:12:30 -03001987 /* 4: FM Stereo */
1988 .audioroute = 8,
Darron Broad63248f22008-10-11 11:57:59 -03001989 },
Steven Toth5bd1b662008-09-04 01:17:33 -03001990 .mpeg = CX88_MPEG_DVB,
Steven Toth363c35f2008-10-11 11:05:50 -03001991 .num_frontends = 2,
Steven Toth5bd1b662008-09-04 01:17:33 -03001992 },
1993 [CX88_BOARD_HAUPPAUGE_HVR4000LITE] = {
1994 .name = "Hauppauge WinTV-HVR4000(Lite) DVB-S/S2",
1995 .tuner_type = UNSET,
1996 .radio_type = UNSET,
1997 .tuner_addr = ADDR_UNSET,
1998 .radio_addr = ADDR_UNSET,
1999 .input = {{
2000 .type = CX88_VMUX_DVB,
2001 .vmux = 0,
2002 } },
2003 .mpeg = CX88_MPEG_DVB,
2004 },
Igor M. Liplianine4aab642008-09-23 15:43:57 -03002005 [CX88_BOARD_TEVII_S420] = {
2006 .name = "TeVii S420 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 },
Igor M. Liplianinaf832622008-09-04 17:24:14 -03002017 [CX88_BOARD_TEVII_S460] = {
2018 .name = "TeVii S460 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. Liplianin0cb73632011-02-25 18:41:24 -03002029 [CX88_BOARD_TEVII_S464] = {
2030 .name = "TeVii S464 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 },
Oleg Roitburd4cd7fb82008-09-17 11:30:21 -03002041 [CX88_BOARD_OMICOM_SS4_PCI] = {
2042 .name = "Omicom SS4 DVB-S/S2 PCI",
2043 .tuner_type = UNSET,
2044 .radio_type = UNSET,
2045 .tuner_addr = ADDR_UNSET,
2046 .radio_addr = ADDR_UNSET,
2047 .input = {{
2048 .type = CX88_VMUX_DVB,
2049 .vmux = 0,
2050 } },
2051 .mpeg = CX88_MPEG_DVB,
2052 },
Igor M. Liplianin4b296312008-11-09 15:25:31 -03002053 [CX88_BOARD_TBS_8910] = {
2054 .name = "TBS 8910 DVB-S",
2055 .tuner_type = UNSET,
2056 .radio_type = UNSET,
2057 .tuner_addr = ADDR_UNSET,
2058 .radio_addr = ADDR_UNSET,
2059 .input = {{
2060 .type = CX88_VMUX_DVB,
2061 .vmux = 0,
2062 } },
2063 .mpeg = CX88_MPEG_DVB,
2064 },
Oleg Roitburdee730422008-09-17 11:58:33 -03002065 [CX88_BOARD_TBS_8920] = {
2066 .name = "TBS 8920 DVB-S/S2",
2067 .tuner_type = TUNER_ABSENT,
2068 .radio_type = UNSET,
2069 .tuner_addr = ADDR_UNSET,
2070 .radio_addr = ADDR_UNSET,
2071 .input = {{
2072 .type = CX88_VMUX_DVB,
Igor M. Liplianinad5f74c2009-07-29 19:18:28 -03002073 .vmux = 0,
2074 .gpio0 = 0x8080,
Oleg Roitburdee730422008-09-17 11:58:33 -03002075 } },
2076 .mpeg = CX88_MPEG_DVB,
2077 },
Igor M. Liplianincd3cde12008-11-09 15:26:25 -03002078 [CX88_BOARD_PROF_6200] = {
2079 .name = "Prof 6200 DVB-S",
2080 .tuner_type = UNSET,
2081 .radio_type = UNSET,
2082 .tuner_addr = ADDR_UNSET,
2083 .radio_addr = ADDR_UNSET,
2084 .input = {{
2085 .type = CX88_VMUX_DVB,
2086 .vmux = 0,
2087 } },
2088 .mpeg = CX88_MPEG_DVB,
2089 },
Oleg Roitburd57f51db2008-10-08 06:48:08 -03002090 [CX88_BOARD_PROF_7300] = {
2091 .name = "PROF 7300 DVB-S/S2",
2092 .tuner_type = UNSET,
2093 .radio_type = UNSET,
2094 .tuner_addr = ADDR_UNSET,
2095 .radio_addr = ADDR_UNSET,
2096 .input = {{
2097 .type = CX88_VMUX_DVB,
2098 .vmux = 0,
2099 } },
2100 .mpeg = CX88_MPEG_DVB,
2101 },
Igor M. Liplianin4b296312008-11-09 15:25:31 -03002102 [CX88_BOARD_SATTRADE_ST4200] = {
2103 .name = "SATTRADE ST4200 DVB-S/S2",
2104 .tuner_type = UNSET,
2105 .radio_type = UNSET,
2106 .tuner_addr = ADDR_UNSET,
2107 .radio_addr = ADDR_UNSET,
2108 .input = {{
2109 .type = CX88_VMUX_DVB,
2110 .vmux = 0,
2111 } },
2112 .mpeg = CX88_MPEG_DVB,
2113 },
Stephan Wienczny70101a22009-03-10 19:08:06 -03002114 [CX88_BOARD_TERRATEC_CINERGY_HT_PCI_MKII] = {
2115 .name = "Terratec Cinergy HT PCI MKII",
2116 .tuner_type = TUNER_XC2028,
2117 .tuner_addr = 0x61,
Miroslav Slugenb6854e32011-12-11 19:00:06 -03002118 .radio_type = UNSET,
2119 .radio_addr = ADDR_UNSET,
Stephan Wienczny70101a22009-03-10 19:08:06 -03002120 .input = { {
2121 .type = CX88_VMUX_TELEVISION,
2122 .vmux = 0,
2123 .gpio0 = 0x004ff,
2124 .gpio1 = 0x010ff,
2125 .gpio2 = 0x00001,
2126 }, {
2127 .type = CX88_VMUX_COMPOSITE1,
2128 .vmux = 1,
2129 .gpio0 = 0x004fb,
2130 .gpio1 = 0x010ef,
2131 .audioroute = 1,
2132 }, {
2133 .type = CX88_VMUX_SVIDEO,
2134 .vmux = 2,
2135 .gpio0 = 0x004fb,
2136 .gpio1 = 0x010ef,
2137 .audioroute = 1,
2138 } },
2139 .radio = {
2140 .type = CX88_RADIO,
2141 .gpio0 = 0x004ff,
2142 .gpio1 = 0x010ff,
2143 .gpio2 = 0x0ff,
2144 },
2145 .mpeg = CX88_MPEG_DVB,
2146 },
Steven Toth501d8cd2009-03-28 14:22:21 -03002147 [CX88_BOARD_HAUPPAUGE_IRONLY] = {
2148 .name = "Hauppauge WinTV-IR Only",
2149 .tuner_type = UNSET,
2150 .radio_type = UNSET,
2151 .tuner_addr = ADDR_UNSET,
2152 .radio_addr = ADDR_UNSET,
2153 },
Miroslav Sustek3047a172009-05-31 16:47:28 -03002154 [CX88_BOARD_WINFAST_DTV1800H] = {
2155 .name = "Leadtek WinFast DTV1800 Hybrid",
2156 .tuner_type = TUNER_XC2028,
Miroslav Slugenb6854e32011-12-11 19:00:06 -03002157 .radio_type = UNSET,
Miroslav Sustek3047a172009-05-31 16:47:28 -03002158 .tuner_addr = 0x61,
Miroslav Slugenb6854e32011-12-11 19:00:06 -03002159 .radio_addr = ADDR_UNSET,
Miroslav Sustek3047a172009-05-31 16:47:28 -03002160 /*
2161 * GPIO setting
2162 *
2163 * 2: mute (0=off,1=on)
2164 * 12: tuner reset pin
2165 * 13: audio source (0=tuner audio,1=line in)
2166 * 14: FM (0=on,1=off ???)
2167 */
2168 .input = {{
2169 .type = CX88_VMUX_TELEVISION,
2170 .vmux = 0,
2171 .gpio0 = 0x0400, /* pin 2 = 0 */
2172 .gpio1 = 0x6040, /* pin 13 = 0, pin 14 = 1 */
2173 .gpio2 = 0x0000,
2174 }, {
2175 .type = CX88_VMUX_COMPOSITE1,
2176 .vmux = 1,
2177 .gpio0 = 0x0400, /* pin 2 = 0 */
2178 .gpio1 = 0x6060, /* pin 13 = 1, pin 14 = 1 */
2179 .gpio2 = 0x0000,
2180 }, {
2181 .type = CX88_VMUX_SVIDEO,
2182 .vmux = 2,
2183 .gpio0 = 0x0400, /* pin 2 = 0 */
2184 .gpio1 = 0x6060, /* pin 13 = 1, pin 14 = 1 */
2185 .gpio2 = 0x0000,
2186 } },
2187 .radio = {
2188 .type = CX88_RADIO,
2189 .gpio0 = 0x0400, /* pin 2 = 0 */
2190 .gpio1 = 0x6000, /* pin 13 = 0, pin 14 = 0 */
2191 .gpio2 = 0x0000,
2192 },
2193 .mpeg = CX88_MPEG_DVB,
2194 },
istvan_v@mailbox.hu8eb79c02011-06-07 13:16:56 -03002195 [CX88_BOARD_WINFAST_DTV1800H_XC4000] = {
2196 .name = "Leadtek WinFast DTV1800 H (XC4000)",
2197 .tuner_type = TUNER_XC4000,
Miroslav Slugenb6854e32011-12-11 19:00:06 -03002198 .radio_type = UNSET,
istvan_v@mailbox.hu8eb79c02011-06-07 13:16:56 -03002199 .tuner_addr = 0x61,
Miroslav Slugenb6854e32011-12-11 19:00:06 -03002200 .radio_addr = ADDR_UNSET,
istvan_v@mailbox.hu8eb79c02011-06-07 13:16:56 -03002201 /*
2202 * GPIO setting
2203 *
2204 * 2: mute (0=off,1=on)
2205 * 12: tuner reset pin
2206 * 13: audio source (0=tuner audio,1=line in)
2207 * 14: FM (0=on,1=off ???)
2208 */
2209 .input = {{
2210 .type = CX88_VMUX_TELEVISION,
2211 .vmux = 0,
2212 .gpio0 = 0x0400, /* pin 2 = 0 */
2213 .gpio1 = 0x6040, /* pin 13 = 0, pin 14 = 1 */
2214 .gpio2 = 0x0000,
2215 }, {
2216 .type = CX88_VMUX_COMPOSITE1,
2217 .vmux = 1,
2218 .gpio0 = 0x0400, /* pin 2 = 0 */
2219 .gpio1 = 0x6060, /* pin 13 = 1, pin 14 = 1 */
2220 .gpio2 = 0x0000,
2221 }, {
2222 .type = CX88_VMUX_SVIDEO,
2223 .vmux = 2,
2224 .gpio0 = 0x0400, /* pin 2 = 0 */
2225 .gpio1 = 0x6060, /* pin 13 = 1, pin 14 = 1 */
2226 .gpio2 = 0x0000,
2227 }},
2228 .radio = {
2229 .type = CX88_RADIO,
2230 .gpio0 = 0x0400, /* pin 2 = 0 */
2231 .gpio1 = 0x6000, /* pin 13 = 0, pin 14 = 0 */
2232 .gpio2 = 0x0000,
2233 },
2234 .mpeg = CX88_MPEG_DVB,
2235 },
istvan_v@mailbox.huf271a3a2011-06-07 13:14:53 -03002236 [CX88_BOARD_WINFAST_DTV2000H_PLUS] = {
2237 .name = "Leadtek WinFast DTV2000 H PLUS",
2238 .tuner_type = TUNER_XC4000,
Miroslav Slugenb6854e32011-12-11 19:00:06 -03002239 .radio_type = UNSET,
istvan_v@mailbox.huf271a3a2011-06-07 13:14:53 -03002240 .tuner_addr = 0x61,
Miroslav Slugenb6854e32011-12-11 19:00:06 -03002241 .radio_addr = ADDR_UNSET,
istvan_v@mailbox.huf271a3a2011-06-07 13:14:53 -03002242 /*
2243 * GPIO
2244 * 2: 1: mute audio
2245 * 12: 0: reset XC4000
2246 * 13: 1: audio input is line in (0: tuner)
2247 * 14: 0: FM radio
2248 * 16: 0: RF input is cable
2249 */
2250 .input = {{
2251 .type = CX88_VMUX_TELEVISION,
2252 .vmux = 0,
2253 .gpio0 = 0x0403,
2254 .gpio1 = 0xF0D7,
2255 .gpio2 = 0x0101,
2256 .gpio3 = 0x0000,
2257 }, {
2258 .type = CX88_VMUX_CABLE,
2259 .vmux = 0,
2260 .gpio0 = 0x0403,
2261 .gpio1 = 0xF0D7,
2262 .gpio2 = 0x0100,
2263 .gpio3 = 0x0000,
2264 }, {
2265 .type = CX88_VMUX_COMPOSITE1,
2266 .vmux = 1,
2267 .gpio0 = 0x0403, /* was 0x0407 */
2268 .gpio1 = 0xF0F7,
2269 .gpio2 = 0x0101,
2270 .gpio3 = 0x0000,
2271 }, {
2272 .type = CX88_VMUX_SVIDEO,
2273 .vmux = 2,
2274 .gpio0 = 0x0403, /* was 0x0407 */
2275 .gpio1 = 0xF0F7,
2276 .gpio2 = 0x0101,
2277 .gpio3 = 0x0000,
2278 }},
2279 .radio = {
2280 .type = CX88_RADIO,
2281 .gpio0 = 0x0403,
2282 .gpio1 = 0xF097,
2283 .gpio2 = 0x0100,
2284 .gpio3 = 0x0000,
2285 },
2286 .mpeg = CX88_MPEG_DVB,
2287 },
Igor M. Liplianinb699c272009-11-16 22:22:32 -03002288 [CX88_BOARD_PROF_7301] = {
2289 .name = "Prof 7301 DVB-S/S2",
2290 .tuner_type = UNSET,
2291 .radio_type = UNSET,
2292 .tuner_addr = ADDR_UNSET,
2293 .radio_addr = ADDR_UNSET,
2294 .input = { {
2295 .type = CX88_VMUX_DVB,
2296 .vmux = 0,
2297 } },
2298 .mpeg = CX88_MPEG_DVB,
2299 },
Sergey Ivanov111ac842010-08-09 10:18:32 -03002300 [CX88_BOARD_TWINHAN_VP1027_DVBS] = {
2301 .name = "Twinhan VP-1027 DVB-S",
2302 .tuner_type = TUNER_ABSENT,
2303 .radio_type = UNSET,
2304 .tuner_addr = ADDR_UNSET,
2305 .radio_addr = ADDR_UNSET,
2306 .input = {{
2307 .type = CX88_VMUX_DVB,
2308 .vmux = 0,
2309 } },
2310 .mpeg = CX88_MPEG_DVB,
2311 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002312};
Linus Torvalds1da177e2005-04-16 15:20:36 -07002313
2314/* ------------------------------------------------------------------ */
2315/* PCI subsystem IDs */
2316
Trent Piephobbc83592007-08-15 14:41:58 -03002317static const struct cx88_subid cx88_subids[] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -07002318 {
2319 .subvendor = 0x0070,
2320 .subdevice = 0x3400,
2321 .card = CX88_BOARD_HAUPPAUGE,
2322 },{
2323 .subvendor = 0x0070,
2324 .subdevice = 0x3401,
2325 .card = CX88_BOARD_HAUPPAUGE,
2326 },{
2327 .subvendor = 0x14c7,
2328 .subdevice = 0x0106,
2329 .card = CX88_BOARD_GDI,
2330 },{
2331 .subvendor = 0x14c7,
2332 .subdevice = 0x0107, /* with mpeg encoder */
2333 .card = CX88_BOARD_GDI,
2334 },{
2335 .subvendor = PCI_VENDOR_ID_ATI,
2336 .subdevice = 0x00f8,
2337 .card = CX88_BOARD_ATI_WONDER_PRO,
Patrice Levesquebc13ae12008-11-02 16:37:35 -03002338 }, {
2339 .subvendor = PCI_VENDOR_ID_ATI,
2340 .subdevice = 0x00f9,
2341 .card = CX88_BOARD_ATI_WONDER_PRO,
2342 }, {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002343 .subvendor = 0x107d,
2344 .subdevice = 0x6611,
2345 .card = CX88_BOARD_WINFAST2000XP_EXPERT,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002346 },{
2347 .subvendor = 0x107d,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002348 .subdevice = 0x6613, /* NTSC */
2349 .card = CX88_BOARD_WINFAST2000XP_EXPERT,
2350 },{
2351 .subvendor = 0x107d,
2352 .subdevice = 0x6620,
2353 .card = CX88_BOARD_WINFAST_DV2000,
2354 },{
2355 .subvendor = 0x107d,
2356 .subdevice = 0x663b,
2357 .card = CX88_BOARD_LEADTEK_PVR2000,
2358 },{
2359 .subvendor = 0x107d,
Michael Krufky8dd86ee2006-09-16 19:09:38 -03002360 .subdevice = 0x663c,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002361 .card = CX88_BOARD_LEADTEK_PVR2000,
2362 },{
Linus Torvalds1da177e2005-04-16 15:20:36 -07002363 .subvendor = 0x1461,
2364 .subdevice = 0x000b,
Lubomir Bulej7418f342005-11-08 21:38:34 -08002365 .card = CX88_BOARD_AVERTV_STUDIO_303,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002366 },{
2367 .subvendor = 0x1462,
2368 .subdevice = 0x8606,
2369 .card = CX88_BOARD_MSI_TVANYWHERE_MASTER,
2370 },{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002371 .subvendor = 0x10fc,
2372 .subdevice = 0xd003,
2373 .card = CX88_BOARD_IODATA_GVVCP3PCI,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002374 },{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002375 .subvendor = 0x1043,
2376 .subdevice = 0x4823, /* with mpeg encoder */
2377 .card = CX88_BOARD_ASUS_PVR_416,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002378 },{
2379 .subvendor = 0x17de,
2380 .subdevice = 0x08a6,
2381 .card = CX88_BOARD_KWORLD_DVB_T,
2382 },{
2383 .subvendor = 0x18ac,
2384 .subdevice = 0xd810,
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -07002385 .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002386 },{
Michael Krufky097b7502005-06-23 22:04:43 -07002387 .subvendor = 0x18ac,
2388 .subdevice = 0xd820,
Michael Krufky80d34362005-06-23 22:04:55 -07002389 .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T,
Michael Krufky097b7502005-06-23 22:04:43 -07002390 },{
Michael Krufky7df64e82005-11-08 21:36:16 -08002391 .subvendor = 0x18ac,
2392 .subdevice = 0xdb00,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002393 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002394 },{
Linus Torvalds1da177e2005-04-16 15:20:36 -07002395 .subvendor = 0x0070,
2396 .subdevice = 0x9002,
2397 .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002398 },{
Linus Torvalds1da177e2005-04-16 15:20:36 -07002399 .subvendor = 0x14f1,
2400 .subdevice = 0x0187,
2401 .card = CX88_BOARD_CONEXANT_DVB_T1,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002402 },{
Linus Torvalds1da177e2005-04-16 15:20:36 -07002403 .subvendor = 0x1540,
2404 .subdevice = 0x2580,
2405 .card = CX88_BOARD_PROVIDEO_PV259,
2406 },{
Michael Krufky7df64e82005-11-08 21:36:16 -08002407 .subvendor = 0x18ac,
2408 .subdevice = 0xdb10,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002409 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
2410 },{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002411 .subvendor = 0x1554,
2412 .subdevice = 0x4811,
2413 .card = CX88_BOARD_PIXELVIEW,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002414 },{
2415 .subvendor = 0x7063,
2416 .subdevice = 0x3000, /* HD-3000 card */
2417 .card = CX88_BOARD_PCHDTV_HD3000,
2418 },{
Michael Krufky7df64e82005-11-08 21:36:16 -08002419 .subvendor = 0x17de,
2420 .subdevice = 0xa8a6,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002421 .card = CX88_BOARD_DNTV_LIVE_DVB_T,
2422 },{
2423 .subvendor = 0x0070,
2424 .subdevice = 0x2801,
2425 .card = CX88_BOARD_HAUPPAUGE_ROSLYN,
2426 },{
Michael Krufky7df64e82005-11-08 21:36:16 -08002427 .subvendor = 0x14f1,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002428 .subdevice = 0x0342,
2429 .card = CX88_BOARD_DIGITALLOGIC_MEC,
2430 },{
2431 .subvendor = 0x10fc,
2432 .subdevice = 0xd035,
2433 .card = CX88_BOARD_IODATA_GVBCTV7E,
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -07002434 },{
2435 .subvendor = 0x1421,
2436 .subdevice = 0x0334,
2437 .card = CX88_BOARD_ADSTECH_DVB_T_PCI,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002438 },{
Michael Krufkye057ee12005-07-07 17:58:40 -07002439 .subvendor = 0x153b,
2440 .subdevice = 0x1166,
2441 .card = CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002442 },{
Michael Krufky9fef07c2005-07-31 22:34:46 -07002443 .subvendor = 0x18ac,
2444 .subdevice = 0xd500,
2445 .card = CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002446 },{
Nickolay V. Shmyrevd45170e2005-11-08 21:36:15 -08002447 .subvendor = 0x1461,
2448 .subdevice = 0x8011,
2449 .card = CX88_BOARD_AVERMEDIA_ULTRATV_MC_550,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002450 },{
Kirk Lapraye976f9372005-11-08 21:37:04 -08002451 .subvendor = PCI_VENDOR_ID_ATI,
2452 .subdevice = 0xa101,
2453 .card = CX88_BOARD_ATI_HDTVWONDER,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002454 },{
David Shirley2b5200a2005-11-08 21:37:22 -08002455 .subvendor = 0x107d,
2456 .subdevice = 0x665f,
2457 .card = CX88_BOARD_WINFAST_DTV1000,
Lubomir Bulej7418f342005-11-08 21:38:34 -08002458 },{
2459 .subvendor = 0x1461,
2460 .subdevice = 0x000a,
2461 .card = CX88_BOARD_AVERTV_303,
Steven Toth0fa14aa2006-01-09 15:25:02 -02002462 },{
2463 .subvendor = 0x0070,
2464 .subdevice = 0x9200,
Steven Tothfb56cb62006-01-09 15:25:02 -02002465 .card = CX88_BOARD_HAUPPAUGE_NOVASE2_S1,
2466 },{
2467 .subvendor = 0x0070,
2468 .subdevice = 0x9201,
Steven Toth0fa14aa2006-01-09 15:25:02 -02002469 .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
2470 },{
2471 .subvendor = 0x0070,
2472 .subdevice = 0x9202,
Steven Tothfb56cb62006-01-09 15:25:02 -02002473 .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
Vadim Catana0e0351e2006-01-09 15:25:02 -02002474 },{
2475 .subvendor = 0x17de,
2476 .subdevice = 0x08b2,
2477 .card = CX88_BOARD_KWORLD_DVBS_100,
Steven Toth611900c2006-01-09 15:25:12 -02002478 },{
2479 .subvendor = 0x0070,
2480 .subdevice = 0x9400,
2481 .card = CX88_BOARD_HAUPPAUGE_HVR1100,
2482 },{
2483 .subvendor = 0x0070,
2484 .subdevice = 0x9402,
2485 .card = CX88_BOARD_HAUPPAUGE_HVR1100,
2486 },{
2487 .subvendor = 0x0070,
2488 .subdevice = 0x9800,
2489 .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
2490 },{
2491 .subvendor = 0x0070,
2492 .subdevice = 0x9802,
2493 .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
Steven Tothc432a072006-01-09 15:25:13 -02002494 },{
2495 .subvendor = 0x0070,
2496 .subdevice = 0x9001,
2497 .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
Chris Pascoefc40b262006-01-09 15:25:35 -02002498 },{
2499 .subvendor = 0x1822,
2500 .subdevice = 0x0025,
2501 .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
Manenti Marcof39624f2006-01-09 15:32:45 -02002502 },{
Chris Pascoeb9f4ad52006-01-09 18:21:39 -02002503 .subvendor = 0x17de,
2504 .subdevice = 0x08a1,
2505 .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
Chris Pascoe43eabb42006-01-09 18:21:28 -02002506 },{
2507 .subvendor = 0x18ac,
2508 .subdevice = 0xdb50,
2509 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
Michael Krufky6bfb2e12006-01-11 22:52:28 -02002510 },{
2511 .subvendor = 0x18ac,
Michael Krufkyf74a6b32006-01-17 03:50:23 -02002512 .subdevice = 0xdb54,
2513 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
2514 /* Re-branded DViCO: DigitalNow DVB-T Dual */
2515 },{
2516 .subvendor = 0x18ac,
Michael Krufky6bfb2e12006-01-11 22:52:28 -02002517 .subdevice = 0xdb11,
2518 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
2519 /* Re-branded DViCO: UltraView DVB-T Plus */
Chris Pascoeb3fb91d2008-04-22 14:45:15 -03002520 }, {
2521 .subvendor = 0x18ac,
2522 .subdevice = 0xdb30,
2523 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO,
2524 }, {
Michael Krufky44256de2006-02-07 06:49:14 -02002525 .subvendor = 0x17de,
2526 .subdevice = 0x0840,
Michael Krufky923da8a2007-03-11 12:52:48 -03002527 .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
2528 },{
2529 .subvendor = 0x1421,
2530 .subdevice = 0x0305,
Michael Krufky44256de2006-02-07 06:49:14 -02002531 .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
Chris Pascoe780dfef2006-02-28 08:34:59 -03002532 },{
2533 .subvendor = 0x18ac,
2534 .subdevice = 0xdb40,
2535 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
2536 },{
2537 .subvendor = 0x18ac,
2538 .subdevice = 0xdb44,
2539 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
Rusty Scottda215d22006-04-07 02:21:31 -03002540 },{
2541 .subvendor = 0x7063,
2542 .subdevice = 0x5500,
2543 .card = CX88_BOARD_PCHDTV_HD5500,
Valentin Zagurab3038302006-04-13 12:41:43 -03002544 },{
2545 .subvendor = 0x17de,
2546 .subdevice = 0x0841,
2547 .card = CX88_BOARD_KWORLD_MCE200_DELUXE,
Michael Krufkyfc066472006-05-22 10:32:05 -03002548 },{
2549 .subvendor = 0x1822,
2550 .subdevice = 0x0019,
2551 .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
Angelo Marconia31246222006-05-09 18:27:48 -03002552 },{
2553 .subvendor = 0x1554,
2554 .subdevice = 0x4813,
2555 .card = CX88_BOARD_PIXELVIEW_PLAYTV_P7000,
Ricardo Cerqueira680543c2006-05-22 07:44:02 -03002556 },{
2557 .subvendor = 0x14f1,
2558 .subdevice = 0x0842,
Ricardo Cerqueirabe4f4512006-06-08 17:36:17 -03002559 .card = CX88_BOARD_NPGTECH_REALTV_TOP10FM,
Malcolm Valentine4bd6e9d2006-05-29 13:51:59 -03002560 },{
2561 .subvendor = 0x107d,
2562 .subdevice = 0x665e,
2563 .card = CX88_BOARD_WINFAST_DTV2000H,
Michael Krufky65271bf2006-06-21 16:04:33 -03002564 },{
Vlastimil Labsky4d14c832009-08-10 22:15:54 -03002565 .subvendor = 0x107d,
2566 .subdevice = 0x6f2b,
2567 .card = CX88_BOARD_WINFAST_DTV2000H_J,
2568 },{
Michael Krufky65271bf2006-06-21 16:04:33 -03002569 .subvendor = 0x18ac,
2570 .subdevice = 0xd800, /* FusionHDTV 3 Gold (original revision) */
2571 .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
Saqeb Akhterc02a34f2006-06-29 20:29:33 -03002572 },{
2573 .subvendor = 0x14f1,
2574 .subdevice = 0x0084,
2575 .card = CX88_BOARD_GENIATECH_DVBS,
Eric Thomasad10c932006-08-08 09:10:04 -03002576 },{
2577 .subvendor = 0x0070,
2578 .subdevice = 0x1404,
2579 .card = CX88_BOARD_HAUPPAUGE_HVR3000,
Dirk Herrendoerfer4f3ca2f12010-02-11 18:06:34 -03002580 }, {
2581 .subvendor = 0x18ac,
2582 .subdevice = 0xdc00,
2583 .card = CX88_BOARD_SAMSUNG_SMT_7020,
2584 }, {
2585 .subvendor = 0x18ac,
2586 .subdevice = 0xdccd,
2587 .card = CX88_BOARD_SAMSUNG_SMT_7020,
Michael Krufky5dbaa2c2006-08-08 09:10:04 -03002588 },{
2589 .subvendor = 0x1461,
2590 .subdevice = 0xc111, /* AverMedia M150-D */
2591 /* This board is known to work with the ASUS PVR416 config */
2592 .card = CX88_BOARD_ASUS_PVR_416,
David Bussenschutt2acadef2006-08-08 09:10:05 -03002593 },{
2594 .subvendor = 0xc180,
2595 .subdevice = 0xc980,
2596 .card = CX88_BOARD_TE_DTV_250_OEM_SWANN,
Steven Tothaa481a62006-09-14 15:41:13 -03002597 },{
2598 .subvendor = 0x0070,
2599 .subdevice = 0x9600,
2600 .card = CX88_BOARD_HAUPPAUGE_HVR1300,
2601 },{
2602 .subvendor = 0x0070,
2603 .subdevice = 0x9601,
2604 .card = CX88_BOARD_HAUPPAUGE_HVR1300,
2605 },{
2606 .subvendor = 0x0070,
2607 .subdevice = 0x9602,
2608 .card = CX88_BOARD_HAUPPAUGE_HVR1300,
Michael Krufkydab489d2006-09-15 15:41:23 -03002609 },{
2610 .subvendor = 0x107d,
2611 .subdevice = 0x6632,
2612 .card = CX88_BOARD_LEADTEK_PVR2000,
Michael Krufky4508f592006-09-25 14:14:24 -03002613 },{
2614 .subvendor = 0x12ab,
2615 .subdevice = 0x2300, /* Club3D Zap TV2100 */
2616 .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
Steven Toth3979ecc2006-09-29 22:37:07 -03002617 },{
2618 .subvendor = 0x0070,
2619 .subdevice = 0x9000,
2620 .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
Steven Toth76dc82a2006-09-30 00:43:58 -03002621 },{
2622 .subvendor = 0x0070,
2623 .subdevice = 0x1400,
2624 .card = CX88_BOARD_HAUPPAUGE_HVR3000,
2625 },{
2626 .subvendor = 0x0070,
2627 .subdevice = 0x1401,
2628 .card = CX88_BOARD_HAUPPAUGE_HVR3000,
2629 },{
2630 .subvendor = 0x0070,
2631 .subdevice = 0x1402,
2632 .card = CX88_BOARD_HAUPPAUGE_HVR3000,
Michael Krufky733aeaf2007-03-11 12:48:04 -03002633 },{
2634 .subvendor = 0x1421,
2635 .subdevice = 0x0341, /* ADS Tech InstantTV DVB-S */
2636 .card = CX88_BOARD_KWORLD_DVBS_100,
Daniel Gimpelevich7cb47a12007-05-17 18:10:17 -03002637 },{
2638 .subvendor = 0x1421,
2639 .subdevice = 0x0390,
2640 .card = CX88_BOARD_ADSTECH_PTV_390,
Steven Toth60464da2008-01-05 16:53:01 -03002641 },{
2642 .subvendor = 0x11bd,
2643 .subdevice = 0x0051,
2644 .card = CX88_BOARD_PINNACLE_PCTV_HD_800i,
Steven Toth5c00fac2008-04-22 14:45:14 -03002645 }, {
2646 .subvendor = 0x18ac,
2647 .subdevice = 0xd530,
2648 .card = CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO,
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03002649 }, {
2650 .subvendor = 0x12ab,
2651 .subdevice = 0x1788,
2652 .card = CX88_BOARD_PINNACLE_HYBRID_PCTV,
2653 }, {
2654 .subvendor = 0x14f1,
2655 .subdevice = 0xea3d,
2656 .card = CX88_BOARD_POWERCOLOR_REAL_ANGEL,
2657 }, {
2658 .subvendor = 0x107d,
2659 .subdevice = 0x6f18,
2660 .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL,
2661 }, {
2662 .subvendor = 0x14f1,
2663 .subdevice = 0x8852,
2664 .card = CX88_BOARD_GENIATECH_X8000_MT,
Mauro Carvalho Chehab2422a9b2008-04-22 14:46:00 -03002665 }, {
Steven Toth1117d6b2008-04-22 14:45:34 -03002666 .subvendor = 0x18ac,
2667 .subdevice = 0xd610,
2668 .card = CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD,
Mauro Carvalho Chehab2422a9b2008-04-22 14:46:00 -03002669 }, {
2670 .subvendor = 0x1554,
2671 .subdevice = 0x4935,
2672 .card = CX88_BOARD_PROLINK_PV_8000GT,
Mauro Carvalho Chehab99e09ea2008-03-27 23:18:30 -03002673 }, {
Mauro Carvalho Chehaba31d2bb2008-09-29 12:08:29 -03002674 .subvendor = 0x1554,
2675 .subdevice = 0x4976,
2676 .card = CX88_BOARD_PROLINK_PV_GLOBAL_XTREME,
2677 }, {
Mauro Carvalho Chehab99e09ea2008-03-27 23:18:30 -03002678 .subvendor = 0x17de,
2679 .subdevice = 0x08c1,
2680 .card = CX88_BOARD_KWORLD_ATSC_120,
Steven Toth5bd1b662008-09-04 01:17:33 -03002681 }, {
2682 .subvendor = 0x0070,
2683 .subdevice = 0x6900,
2684 .card = CX88_BOARD_HAUPPAUGE_HVR4000,
2685 }, {
2686 .subvendor = 0x0070,
2687 .subdevice = 0x6904,
2688 .card = CX88_BOARD_HAUPPAUGE_HVR4000,
2689 }, {
2690 .subvendor = 0x0070,
2691 .subdevice = 0x6902,
2692 .card = CX88_BOARD_HAUPPAUGE_HVR4000,
2693 }, {
2694 .subvendor = 0x0070,
2695 .subdevice = 0x6905,
2696 .card = CX88_BOARD_HAUPPAUGE_HVR4000LITE,
2697 }, {
2698 .subvendor = 0x0070,
2699 .subdevice = 0x6906,
2700 .card = CX88_BOARD_HAUPPAUGE_HVR4000LITE,
Igor M. Liplianinaf832622008-09-04 17:24:14 -03002701 }, {
Igor M. Liplianine4aab642008-09-23 15:43:57 -03002702 .subvendor = 0xd420,
2703 .subdevice = 0x9022,
2704 .card = CX88_BOARD_TEVII_S420,
2705 }, {
2706 .subvendor = 0xd460,
Igor M. Liplianinaf832622008-09-04 17:24:14 -03002707 .subdevice = 0x9022,
2708 .card = CX88_BOARD_TEVII_S460,
Oleg Roitburd4cd7fb82008-09-17 11:30:21 -03002709 }, {
Igor M. Liplianin0cb73632011-02-25 18:41:24 -03002710 .subvendor = 0xd464,
2711 .subdevice = 0x9022,
2712 .card = CX88_BOARD_TEVII_S464,
2713 }, {
Oleg Roitburd4cd7fb82008-09-17 11:30:21 -03002714 .subvendor = 0xA044,
2715 .subdevice = 0x2011,
2716 .card = CX88_BOARD_OMICOM_SS4_PCI,
Oleg Roitburdee730422008-09-17 11:58:33 -03002717 }, {
Igor M. Liplianin4b296312008-11-09 15:25:31 -03002718 .subvendor = 0x8910,
2719 .subdevice = 0x8888,
2720 .card = CX88_BOARD_TBS_8910,
2721 }, {
Oleg Roitburdee730422008-09-17 11:58:33 -03002722 .subvendor = 0x8920,
2723 .subdevice = 0x8888,
2724 .card = CX88_BOARD_TBS_8920,
Oleg Roitburd57f51db2008-10-08 06:48:08 -03002725 }, {
Igor M. Liplianincd3cde12008-11-09 15:26:25 -03002726 .subvendor = 0xb022,
2727 .subdevice = 0x3022,
2728 .card = CX88_BOARD_PROF_6200,
2729 }, {
Oleg Roitburd57f51db2008-10-08 06:48:08 -03002730 .subvendor = 0xB033,
2731 .subdevice = 0x3033,
2732 .card = CX88_BOARD_PROF_7300,
Igor M. Liplianin4b296312008-11-09 15:25:31 -03002733 }, {
2734 .subvendor = 0xb200,
2735 .subdevice = 0x4200,
2736 .card = CX88_BOARD_SATTRADE_ST4200,
Stephan Wienczny70101a22009-03-10 19:08:06 -03002737 }, {
2738 .subvendor = 0x153b,
2739 .subdevice = 0x1177,
2740 .card = CX88_BOARD_TERRATEC_CINERGY_HT_PCI_MKII,
Steven Toth501d8cd2009-03-28 14:22:21 -03002741 }, {
2742 .subvendor = 0x0070,
2743 .subdevice = 0x9290,
2744 .card = CX88_BOARD_HAUPPAUGE_IRONLY,
Miroslav Sustek3047a172009-05-31 16:47:28 -03002745 }, {
2746 .subvendor = 0x107d,
2747 .subdevice = 0x6654,
2748 .card = CX88_BOARD_WINFAST_DTV1800H,
Mauro Carvalho Chehab14422f92009-06-16 23:55:44 -03002749 }, {
istvan_v@mailbox.hu8eb79c02011-06-07 13:16:56 -03002750 /* WinFast DTV1800 H with XC4000 tuner */
2751 .subvendor = 0x107d,
2752 .subdevice = 0x6f38,
2753 .card = CX88_BOARD_WINFAST_DTV1800H_XC4000,
2754 }, {
istvan_v@mailbox.huf271a3a2011-06-07 13:14:53 -03002755 .subvendor = 0x107d,
2756 .subdevice = 0x6f42,
2757 .card = CX88_BOARD_WINFAST_DTV2000H_PLUS,
2758 }, {
Mauro Carvalho Chehab14422f92009-06-16 23:55:44 -03002759 /* PVR2000 PAL Model [107d:6630] */
2760 .subvendor = 0x107d,
2761 .subdevice = 0x6630,
2762 .card = CX88_BOARD_LEADTEK_PVR2000,
2763 }, {
2764 /* PVR2000 PAL Model [107d:6638] */
2765 .subvendor = 0x107d,
2766 .subdevice = 0x6638,
2767 .card = CX88_BOARD_LEADTEK_PVR2000,
2768 }, {
2769 /* PVR2000 NTSC Model [107d:6631] */
2770 .subvendor = 0x107d,
2771 .subdevice = 0x6631,
2772 .card = CX88_BOARD_LEADTEK_PVR2000,
2773 }, {
2774 /* PVR2000 NTSC Model [107d:6637] */
2775 .subvendor = 0x107d,
2776 .subdevice = 0x6637,
2777 .card = CX88_BOARD_LEADTEK_PVR2000,
2778 }, {
2779 /* PVR2000 NTSC Model [107d:663d] */
2780 .subvendor = 0x107d,
2781 .subdevice = 0x663d,
2782 .card = CX88_BOARD_LEADTEK_PVR2000,
2783 }, {
2784 /* DV2000 NTSC Model [107d:6621] */
2785 .subvendor = 0x107d,
2786 .subdevice = 0x6621,
2787 .card = CX88_BOARD_WINFAST_DV2000,
2788 }, {
2789 /* TV2000 XP Global [107d:6618] */
2790 .subvendor = 0x107d,
2791 .subdevice = 0x6618,
2792 .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL,
Igor M. Liplianinb699c272009-11-16 22:22:32 -03002793 }, {
Istvan Varga84463d52011-12-11 20:20:24 -03002794 /* TV2000 XP Global [107d:6618] */
2795 .subvendor = 0x107d,
2796 .subdevice = 0x6619,
2797 .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL,
2798 }, {
2799 /* WinFast TV2000 XP Global with XC4000 tuner */
2800 .subvendor = 0x107d,
2801 .subdevice = 0x6f36,
2802 .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F36,
2803 }, {
2804 /* WinFast TV2000 XP Global with XC4000 tuner and different GPIOs */
2805 .subvendor = 0x107d,
2806 .subdevice = 0x6f43,
2807 .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F43,
2808 }, {
Igor M. Liplianinb699c272009-11-16 22:22:32 -03002809 .subvendor = 0xb034,
2810 .subdevice = 0x3034,
2811 .card = CX88_BOARD_PROF_7301,
Sergey Ivanov111ac842010-08-09 10:18:32 -03002812 }, {
2813 .subvendor = 0x1822,
2814 .subdevice = 0x0023,
2815 .card = CX88_BOARD_TWINHAN_VP1027_DVBS,
Mauro Carvalho Chehab2422a9b2008-04-22 14:46:00 -03002816 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002817};
Linus Torvalds1da177e2005-04-16 15:20:36 -07002818
2819/* ----------------------------------------------------------------------- */
2820/* some leadtek specific stuff */
2821
Jean Delvare69f7e752006-12-23 14:11:03 -03002822static void leadtek_eeprom(struct cx88_core *core, u8 *eeprom_data)
Linus Torvalds1da177e2005-04-16 15:20:36 -07002823{
Linus Torvalds1da177e2005-04-16 15:20:36 -07002824 if (eeprom_data[4] != 0x7d ||
2825 eeprom_data[5] != 0x10 ||
2826 eeprom_data[7] != 0x66) {
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03002827 warn_printk(core, "Leadtek eeprom invalid.\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07002828 return;
2829 }
2830
Mauro Carvalho Chehab14422f92009-06-16 23:55:44 -03002831 /* Terry Wu <terrywu2009@gmail.com> */
2832 switch (eeprom_data[6]) {
2833 case 0x13: /* SSID 6613 for TV2000 XP Expert NTSC Model */
2834 case 0x21: /* SSID 6621 for DV2000 NTSC Model */
2835 case 0x31: /* SSID 6631 for PVR2000 NTSC Model */
2836 case 0x37: /* SSID 6637 for PVR2000 NTSC Model */
2837 case 0x3d: /* SSID 6637 for PVR2000 NTSC Model */
2838 core->board.tuner_type = TUNER_PHILIPS_FM1236_MK3;
2839 break;
2840 default:
2841 core->board.tuner_type = TUNER_PHILIPS_FM1216ME_MK3;
2842 break;
2843 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07002844
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03002845 info_printk(core, "Leadtek Winfast 2000XP Expert config: "
2846 "tuner=%d, eeprom[0]=0x%02x\n",
2847 core->board.tuner_type, eeprom_data[0]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002848}
2849
Linus Torvalds1da177e2005-04-16 15:20:36 -07002850static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data)
2851{
2852 struct tveeprom tv;
2853
Mauro Carvalho Chehab0f97a932005-09-09 13:04:05 -07002854 tveeprom_hauppauge_analog(&core->i2c_client, &tv, eeprom_data);
Trent Piepho6a59d642007-08-15 14:41:57 -03002855 core->board.tuner_type = tv.tuner_type;
Steven Toth0345c382006-01-09 15:25:17 -02002856 core->tuner_formats = tv.tuner_formats;
Trent Piepho6a59d642007-08-15 14:41:57 -03002857 core->board.radio.type = tv.has_radio ? CX88_RADIO : 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002858
2859 /* Make sure we support the board model */
Steven Toth3ca0ea92005-12-01 00:51:27 -08002860 switch (tv.model)
2861 {
Steven Toth76dc82a2006-09-30 00:43:58 -03002862 case 14009: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in) */
2863 case 14019: /* WinTV-HVR3000 (Retail, IR Blaster, b/panel video, 3.5mm audio in) */
2864 case 14029: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge) */
2865 case 14109: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - low profile) */
2866 case 14129: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge - LP) */
2867 case 14559: /* WinTV-HVR3000 (OEM, no IR, b/panel video, 3.5mm audio in) */
Eric Thomasad10c932006-08-08 09:10:04 -03002868 case 14569: /* WinTV-HVR3000 (OEM, no IR, no back panel video) */
Steven Toth76dc82a2006-09-30 00:43:58 -03002869 case 14659: /* WinTV-HVR3000 (OEM, no IR, b/panel video, RCA audio in - Low profile) */
2870 case 14669: /* WinTV-HVR3000 (OEM, no IR, no b/panel video - Low profile) */
Steven Toth0345c382006-01-09 15:25:17 -02002871 case 28552: /* WinTV-PVR 'Roslyn' (No IR) */
Ian Pickworth42d2b6e2006-01-23 17:11:07 -02002872 case 34519: /* WinTV-PCI-FM */
Steven Toth5bd1b662008-09-04 01:17:33 -03002873 case 69009:
2874 /* WinTV-HVR4000 (DVBS/S2/T, Video and IR, back panel inputs) */
2875 case 69100: /* WinTV-HVR4000LITE (DVBS/S2, IR) */
2876 case 69500: /* WinTV-HVR4000LITE (DVBS/S2, No IR) */
2877 case 69559:
2878 /* WinTV-HVR4000 (DVBS/S2/T, Video no IR, back panel inputs) */
2879 case 69569: /* WinTV-HVR4000 (DVBS/S2/T, Video no IR) */
Steven Toth759324c2005-12-01 00:51:26 -08002880 case 90002: /* Nova-T-PCI (9002) */
Steven Toth0fe22862005-12-01 00:51:41 -08002881 case 92001: /* Nova-S-Plus (Video and IR) */
2882 case 92002: /* Nova-S-Plus (Video and IR) */
2883 case 90003: /* Nova-T-PCI (9002 No RF out) */
Steven Toth759324c2005-12-01 00:51:26 -08002884 case 90500: /* Nova-T-PCI (oem) */
2885 case 90501: /* Nova-T-PCI (oem/IR) */
Steven Toth3ca0ea92005-12-01 00:51:27 -08002886 case 92000: /* Nova-SE2 (OEM, No Video or IR) */
Steven Toth501d8cd2009-03-28 14:22:21 -03002887 case 92900: /* WinTV-IROnly (No analog or digital Video inputs) */
Steven Toth611900c2006-01-09 15:25:12 -02002888 case 94009: /* WinTV-HVR1100 (Video and IR Retail) */
2889 case 94501: /* WinTV-HVR1100 (Video and IR OEM) */
Steven Tothaa481a62006-09-14 15:41:13 -03002890 case 96009: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX) */
2891 case 96019: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX/TX) */
2892 case 96559: /* WinTV-HVR1300 (PAL Video, MPEG Video no IR) */
2893 case 96569: /* WinTV-HVR1300 () */
2894 case 96659: /* WinTV-HVR1300 () */
Steven Toth611900c2006-01-09 15:25:12 -02002895 case 98559: /* WinTV-HVR1100LP (Video no IR, Retail - Low Profile) */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002896 /* known */
2897 break;
Dirk Herrendoerfer4f3ca2f12010-02-11 18:06:34 -03002898 case CX88_BOARD_SAMSUNG_SMT_7020:
2899 cx_set(MO_GP0_IO, 0x008989FF);
2900 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002901 default:
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03002902 warn_printk(core, "warning: unknown hauppauge model #%d\n",
2903 tv.model);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002904 break;
2905 }
2906
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03002907 info_printk(core, "hauppauge eeprom: model=%d\n", tv.model);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002908}
2909
2910/* ----------------------------------------------------------------------- */
2911/* some GDI (was: Modular Technology) specific stuff */
2912
lawrence rust2e4e98e2010-08-25 09:50:20 -03002913static const struct {
Linus Torvalds1da177e2005-04-16 15:20:36 -07002914 int id;
2915 int fm;
lawrence rust2e4e98e2010-08-25 09:50:20 -03002916 const char *name;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002917} gdi_tuner[] = {
2918 [ 0x01 ] = { .id = TUNER_ABSENT,
2919 .name = "NTSC_M" },
2920 [ 0x02 ] = { .id = TUNER_ABSENT,
2921 .name = "PAL_B" },
2922 [ 0x03 ] = { .id = TUNER_ABSENT,
2923 .name = "PAL_I" },
2924 [ 0x04 ] = { .id = TUNER_ABSENT,
2925 .name = "PAL_D" },
2926 [ 0x05 ] = { .id = TUNER_ABSENT,
2927 .name = "SECAM" },
2928
2929 [ 0x10 ] = { .id = TUNER_ABSENT,
2930 .fm = 1,
2931 .name = "TEMIC_4049" },
2932 [ 0x11 ] = { .id = TUNER_TEMIC_4136FY5,
2933 .name = "TEMIC_4136" },
2934 [ 0x12 ] = { .id = TUNER_ABSENT,
2935 .name = "TEMIC_4146" },
2936
2937 [ 0x20 ] = { .id = TUNER_PHILIPS_FQ1216ME,
2938 .fm = 1,
2939 .name = "PHILIPS_FQ1216_MK3" },
2940 [ 0x21 ] = { .id = TUNER_ABSENT, .fm = 1,
2941 .name = "PHILIPS_FQ1236_MK3" },
2942 [ 0x22 ] = { .id = TUNER_ABSENT,
2943 .name = "PHILIPS_FI1236_MK3" },
2944 [ 0x23 ] = { .id = TUNER_ABSENT,
2945 .name = "PHILIPS_FI1216_MK3" },
2946};
2947
2948static void gdi_eeprom(struct cx88_core *core, u8 *eeprom_data)
2949{
lawrence rust2e4e98e2010-08-25 09:50:20 -03002950 const char *name = (eeprom_data[0x0d] < ARRAY_SIZE(gdi_tuner))
Linus Torvalds1da177e2005-04-16 15:20:36 -07002951 ? gdi_tuner[eeprom_data[0x0d]].name : NULL;
2952
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03002953 info_printk(core, "GDI: tuner=%s\n", name ? name : "unknown");
Linus Torvalds1da177e2005-04-16 15:20:36 -07002954 if (NULL == name)
2955 return;
Trent Piepho6a59d642007-08-15 14:41:57 -03002956 core->board.tuner_type = gdi_tuner[eeprom_data[0x0d]].id;
2957 core->board.radio.type = gdi_tuner[eeprom_data[0x0d]].fm ?
2958 CX88_RADIO : 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002959}
2960
Chris Pascoeb3fb91d2008-04-22 14:45:15 -03002961/* ------------------------------------------------------------------- */
2962/* some Divco specific stuff */
Mauro Carvalho Chehab0be51b42008-04-22 14:46:10 -03002963static int cx88_dvico_xc2028_callback(struct cx88_core *core,
2964 int command, int arg)
Chris Pascoeb3fb91d2008-04-22 14:45:15 -03002965{
Chris Pascoeb3fb91d2008-04-22 14:45:15 -03002966 switch (command) {
2967 case XC2028_TUNER_RESET:
Michael Krufkyd7cba042008-09-12 13:31:45 -03002968 switch (core->boardnr) {
2969 case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
2970 /* GPIO-4 xc3028 tuner */
2971
2972 cx_set(MO_GP0_IO, 0x00001000);
2973 cx_clear(MO_GP0_IO, 0x00000010);
2974 msleep(100);
2975 cx_set(MO_GP0_IO, 0x00000010);
2976 msleep(100);
2977 break;
2978 default:
2979 cx_write(MO_GP0_IO, 0x101000);
2980 mdelay(5);
2981 cx_set(MO_GP0_IO, 0x101010);
2982 }
Chris Pascoeb3fb91d2008-04-22 14:45:15 -03002983 break;
2984 default:
2985 return -EINVAL;
2986 }
2987
2988 return 0;
2989}
2990
2991
Linus Torvalds1da177e2005-04-16 15:20:36 -07002992/* ----------------------------------------------------------------------- */
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03002993/* some Geniatech specific stuff */
2994
Mauro Carvalho Chehab0be51b42008-04-22 14:46:10 -03002995static int cx88_xc3028_geniatech_tuner_callback(struct cx88_core *core,
2996 int command, int mode)
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03002997{
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03002998 switch (command) {
2999 case XC2028_TUNER_RESET:
3000 switch (INPUT(core->input).type) {
3001 case CX88_RADIO:
Mauro Carvalho Chehabc450e502008-04-22 14:45:28 -03003002 break;
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03003003 case CX88_VMUX_DVB:
3004 cx_write(MO_GP1_IO, 0x030302);
3005 mdelay(50);
Mauro Carvalho Chehabc450e502008-04-22 14:45:28 -03003006 break;
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03003007 default:
3008 cx_write(MO_GP1_IO, 0x030301);
3009 mdelay(50);
Mauro Carvalho Chehabc450e502008-04-22 14:45:28 -03003010 }
3011 cx_write(MO_GP1_IO, 0x101010);
3012 mdelay(50);
3013 cx_write(MO_GP1_IO, 0x101000);
3014 mdelay(50);
3015 cx_write(MO_GP1_IO, 0x101010);
3016 mdelay(50);
3017 return 0;
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03003018 }
3019 return -EINVAL;
3020}
3021
Miroslav Sustek3047a172009-05-31 16:47:28 -03003022static int cx88_xc3028_winfast1800h_callback(struct cx88_core *core,
3023 int command, int arg)
3024{
3025 switch (command) {
3026 case XC2028_TUNER_RESET:
3027 /* GPIO 12 (xc3028 tuner reset) */
3028 cx_set(MO_GP1_IO, 0x1010);
3029 mdelay(50);
3030 cx_clear(MO_GP1_IO, 0x10);
Alan Cox46999032012-09-04 10:30:49 -03003031 mdelay(75);
Miroslav Sustek3047a172009-05-31 16:47:28 -03003032 cx_set(MO_GP1_IO, 0x10);
Alan Cox46999032012-09-04 10:30:49 -03003033 mdelay(75);
Miroslav Sustek3047a172009-05-31 16:47:28 -03003034 return 0;
3035 }
3036 return -EINVAL;
3037}
3038
istvan_v@mailbox.huf271a3a2011-06-07 13:14:53 -03003039static int cx88_xc4000_winfast2000h_plus_callback(struct cx88_core *core,
3040 int command, int arg)
3041{
3042 switch (command) {
3043 case XC4000_TUNER_RESET:
3044 /* GPIO 12 (xc4000 tuner reset) */
3045 cx_set(MO_GP1_IO, 0x1010);
3046 mdelay(50);
3047 cx_clear(MO_GP1_IO, 0x10);
3048 mdelay(75);
3049 cx_set(MO_GP1_IO, 0x10);
3050 mdelay(75);
3051 return 0;
3052 }
3053 return -EINVAL;
3054}
3055
Mauro Carvalho Chehab2422a9b2008-04-22 14:46:00 -03003056/* ------------------------------------------------------------------- */
3057/* some Divco specific stuff */
Mauro Carvalho Chehab0be51b42008-04-22 14:46:10 -03003058static int cx88_pv_8000gt_callback(struct cx88_core *core,
3059 int command, int arg)
Mauro Carvalho Chehab2422a9b2008-04-22 14:46:00 -03003060{
Mauro Carvalho Chehab2422a9b2008-04-22 14:46:00 -03003061 switch (command) {
3062 case XC2028_TUNER_RESET:
3063 cx_write(MO_GP2_IO, 0xcf7);
3064 mdelay(50);
3065 cx_write(MO_GP2_IO, 0xef5);
3066 mdelay(50);
3067 cx_write(MO_GP2_IO, 0xcf7);
3068 break;
3069 default:
3070 return -EINVAL;
3071 }
3072
3073 return 0;
3074}
3075
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03003076/* ----------------------------------------------------------------------- */
Chris Pascoe780dfef2006-02-28 08:34:59 -03003077/* some DViCO specific stuff */
3078
3079static void dvico_fusionhdtv_hybrid_init(struct cx88_core *core)
3080{
3081 struct i2c_msg msg = { .addr = 0x45, .flags = 0 };
3082 int i, err;
Chris Pascoe69b27e32006-02-28 20:23:11 -03003083 static u8 init_bufs[13][5] = {
Chris Pascoe780dfef2006-02-28 08:34:59 -03003084 { 0x10, 0x00, 0x20, 0x01, 0x03 },
3085 { 0x10, 0x10, 0x01, 0x00, 0x21 },
3086 { 0x10, 0x10, 0x10, 0x00, 0xCA },
3087 { 0x10, 0x10, 0x12, 0x00, 0x08 },
3088 { 0x10, 0x10, 0x13, 0x00, 0x0A },
3089 { 0x10, 0x10, 0x16, 0x01, 0xC0 },
3090 { 0x10, 0x10, 0x22, 0x01, 0x3D },
3091 { 0x10, 0x10, 0x73, 0x01, 0x2E },
3092 { 0x10, 0x10, 0x72, 0x00, 0xC5 },
3093 { 0x10, 0x10, 0x71, 0x01, 0x97 },
3094 { 0x10, 0x10, 0x70, 0x00, 0x0F },
3095 { 0x10, 0x10, 0xB0, 0x00, 0x01 },
3096 { 0x03, 0x0C },
3097 };
3098
Mauro Carvalho Chehab5b9c4e62007-03-28 22:37:26 -03003099 for (i = 0; i < ARRAY_SIZE(init_bufs); i++) {
Chris Pascoe780dfef2006-02-28 08:34:59 -03003100 msg.buf = init_bufs[i];
3101 msg.len = (i != 12 ? 5 : 2);
3102 err = i2c_transfer(&core->i2c_adap, &msg, 1);
3103 if (err != 1) {
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03003104 warn_printk(core, "dvico_fusionhdtv_hybrid_init buf %d "
3105 "failed (err = %d)!\n", i, err);
Chris Pascoe780dfef2006-02-28 08:34:59 -03003106 return;
3107 }
3108 }
3109}
3110
Mauro Carvalho Chehab0be51b42008-04-22 14:46:10 -03003111static int cx88_xc2028_tuner_callback(struct cx88_core *core,
3112 int command, int arg)
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03003113{
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03003114 /* Board-specific callbacks */
3115 switch (core->boardnr) {
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03003116 case CX88_BOARD_POWERCOLOR_REAL_ANGEL:
3117 case CX88_BOARD_GENIATECH_X8000_MT:
Mauro Carvalho Chehab99e09ea2008-03-27 23:18:30 -03003118 case CX88_BOARD_KWORLD_ATSC_120:
Mauro Carvalho Chehab0be51b42008-04-22 14:46:10 -03003119 return cx88_xc3028_geniatech_tuner_callback(core,
3120 command, arg);
Mauro Carvalho Chehab2422a9b2008-04-22 14:46:00 -03003121 case CX88_BOARD_PROLINK_PV_8000GT:
Mauro Carvalho Chehaba31d2bb2008-09-29 12:08:29 -03003122 case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
Mauro Carvalho Chehab0be51b42008-04-22 14:46:10 -03003123 return cx88_pv_8000gt_callback(core, command, arg);
Chris Pascoeb3fb91d2008-04-22 14:45:15 -03003124 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
Michael Krufkyd7cba042008-09-12 13:31:45 -03003125 case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
Mauro Carvalho Chehab0be51b42008-04-22 14:46:10 -03003126 return cx88_dvico_xc2028_callback(core, command, arg);
Mauro Carvalho Chehab14422f92009-06-16 23:55:44 -03003127 case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
Miroslav Sustek3047a172009-05-31 16:47:28 -03003128 case CX88_BOARD_WINFAST_DTV1800H:
3129 return cx88_xc3028_winfast1800h_callback(core, command, arg);
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03003130 }
3131
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03003132 switch (command) {
3133 case XC2028_TUNER_RESET:
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03003134 switch (INPUT(core->input).type) {
3135 case CX88_RADIO:
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03003136 info_printk(core, "setting GPIO to radio!\n");
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03003137 cx_write(MO_GP0_IO, 0x4ff);
3138 mdelay(250);
3139 cx_write(MO_GP2_IO, 0xff);
3140 mdelay(250);
Mauro Carvalho Chehabc450e502008-04-22 14:45:28 -03003141 break;
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03003142 case CX88_VMUX_DVB: /* Digital TV*/
3143 default: /* Analog TV */
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03003144 info_printk(core, "setting GPIO to TV!\n");
Mauro Carvalho Chehabc450e502008-04-22 14:45:28 -03003145 break;
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03003146 }
Mauro Carvalho Chehabc450e502008-04-22 14:45:28 -03003147 cx_write(MO_GP1_IO, 0x101010);
3148 mdelay(250);
3149 cx_write(MO_GP1_IO, 0x101000);
3150 mdelay(250);
3151 cx_write(MO_GP1_IO, 0x101010);
3152 mdelay(250);
3153 return 0;
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03003154 }
3155 return -EINVAL;
3156}
3157
istvan_v@mailbox.huc21973e2011-06-07 13:12:29 -03003158static int cx88_xc4000_tuner_callback(struct cx88_core *core,
3159 int command, int arg)
3160{
3161 /* Board-specific callbacks */
3162 switch (core->boardnr) {
istvan_v@mailbox.hu8eb79c02011-06-07 13:16:56 -03003163 case CX88_BOARD_WINFAST_DTV1800H_XC4000:
istvan_v@mailbox.huf271a3a2011-06-07 13:14:53 -03003164 case CX88_BOARD_WINFAST_DTV2000H_PLUS:
Istvan Varga84463d52011-12-11 20:20:24 -03003165 case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F36:
3166 case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F43:
istvan_v@mailbox.huf271a3a2011-06-07 13:14:53 -03003167 return cx88_xc4000_winfast2000h_plus_callback(core,
3168 command, arg);
istvan_v@mailbox.huc21973e2011-06-07 13:12:29 -03003169 }
3170 return -EINVAL;
3171}
3172
Chris Pascoe780dfef2006-02-28 08:34:59 -03003173/* ----------------------------------------------------------------------- */
Steven Toth60464da2008-01-05 16:53:01 -03003174/* Tuner callback function. Currently only needed for the Pinnacle *
3175 * PCTV HD 800i with an xc5000 sillicon tuner. This is used for both *
3176 * analog tuner attach (tuner-core.c) and dvb tuner attach (cx88-dvb.c) */
3177
Mauro Carvalho Chehab0be51b42008-04-22 14:46:10 -03003178static int cx88_xc5000_tuner_callback(struct cx88_core *core,
3179 int command, int arg)
Steven Toth60464da2008-01-05 16:53:01 -03003180{
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03003181 switch (core->boardnr) {
Steven Toth60464da2008-01-05 16:53:01 -03003182 case CX88_BOARD_PINNACLE_PCTV_HD_800i:
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03003183 if (command == 0) { /* This is the reset command from xc5000 */
Devin Heitmuellerb8d91982009-05-14 21:50:36 -03003184
3185 /* djh - According to the engineer at PCTV Systems,
3186 the xc5000 reset pin is supposed to be on GPIO12.
3187 However, despite three nights of effort, pulling
3188 that GPIO low didn't reset the xc5000. While
3189 pulling MO_SRST_IO low does reset the xc5000, this
3190 also resets in the s5h1409 being reset as well.
3191 This causes tuning to always fail since the internal
3192 state of the s5h1409 does not match the driver's
3193 state. Given that the only two conditions in which
3194 the driver performs a reset is during firmware load
3195 and powering down the chip, I am taking out the
3196 reset. We know that the chip is being reset
3197 when the cx88 comes online, and not being able to
3198 do power management for this board is worse than
3199 not having any tuning at all. */
Steven Toth60464da2008-01-05 16:53:01 -03003200 return 0;
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03003201 } else {
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03003202 err_printk(core, "xc5000: unknown tuner "
3203 "callback command.\n");
Steven Toth60464da2008-01-05 16:53:01 -03003204 return -EINVAL;
3205 }
3206 break;
Steven Toth1117d6b2008-04-22 14:45:34 -03003207 case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD:
3208 if (command == 0) { /* This is the reset command from xc5000 */
3209 cx_clear(MO_GP0_IO, 0x00000010);
3210 msleep(10);
3211 cx_set(MO_GP0_IO, 0x00000010);
3212 return 0;
3213 } else {
3214 printk(KERN_ERR
3215 "xc5000: unknown tuner callback command.\n");
3216 return -EINVAL;
3217 }
3218 break;
Steven Toth60464da2008-01-05 16:53:01 -03003219 }
3220 return 0; /* Should never be here */
3221}
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03003222
Michael Krufkyd7cba042008-09-12 13:31:45 -03003223int cx88_tuner_callback(void *priv, int component, int command, int arg)
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03003224{
3225 struct i2c_algo_bit_data *i2c_algo = priv;
Mauro Carvalho Chehab0be51b42008-04-22 14:46:10 -03003226 struct cx88_core *core;
3227
3228 if (!i2c_algo) {
3229 printk(KERN_ERR "cx88: Error - i2c private data undefined.\n");
3230 return -EINVAL;
3231 }
3232
3233 core = i2c_algo->data;
3234
3235 if (!core) {
3236 printk(KERN_ERR "cx88: Error - device struct undefined.\n");
3237 return -EINVAL;
3238 }
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03003239
Michael Krufkyd7cba042008-09-12 13:31:45 -03003240 if (component != DVB_FRONTEND_COMPONENT_TUNER)
3241 return -EINVAL;
3242
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03003243 switch (core->board.tuner_type) {
3244 case TUNER_XC2028:
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03003245 info_printk(core, "Calling XC2028/3028 callback\n");
Mauro Carvalho Chehab0be51b42008-04-22 14:46:10 -03003246 return cx88_xc2028_tuner_callback(core, command, arg);
istvan_v@mailbox.huc21973e2011-06-07 13:12:29 -03003247 case TUNER_XC4000:
3248 info_printk(core, "Calling XC4000 callback\n");
3249 return cx88_xc4000_tuner_callback(core, command, arg);
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03003250 case TUNER_XC5000:
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03003251 info_printk(core, "Calling XC5000 callback\n");
Mauro Carvalho Chehab0be51b42008-04-22 14:46:10 -03003252 return cx88_xc5000_tuner_callback(core, command, arg);
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03003253 }
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03003254 err_printk(core, "Error: Calling callback for tuner %d\n",
3255 core->board.tuner_type);
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03003256 return -EINVAL;
3257}
Steven Toth60464da2008-01-05 16:53:01 -03003258EXPORT_SYMBOL(cx88_tuner_callback);
3259
3260/* ----------------------------------------------------------------------- */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003261
Trent Piephobbc83592007-08-15 14:41:58 -03003262static void cx88_card_list(struct cx88_core *core, struct pci_dev *pci)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003263{
3264 int i;
3265
3266 if (0 == pci->subsystem_vendor &&
3267 0 == pci->subsystem_device) {
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03003268 printk(KERN_ERR
3269 "%s: Your board has no valid PCI Subsystem ID and thus can't\n"
Linus Torvalds1da177e2005-04-16 15:20:36 -07003270 "%s: be autodetected. Please pass card=<n> insmod option to\n"
3271 "%s: workaround that. Redirect complaints to the vendor of\n"
3272 "%s: the TV card. Best regards,\n"
3273 "%s: -- tux\n",
3274 core->name,core->name,core->name,core->name,core->name);
3275 } else {
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03003276 printk(KERN_ERR
3277 "%s: Your board isn't known (yet) to the driver. You can\n"
Linus Torvalds1da177e2005-04-16 15:20:36 -07003278 "%s: try to pick one of the existing card configs via\n"
3279 "%s: card=<n> insmod option. Updating to the latest\n"
3280 "%s: version might help as well.\n",
3281 core->name,core->name,core->name,core->name);
3282 }
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03003283 err_printk(core, "Here is a list of valid choices for the card=<n> "
3284 "insmod option:\n");
Trent Piephobbc83592007-08-15 14:41:58 -03003285 for (i = 0; i < ARRAY_SIZE(cx88_boards); i++)
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03003286 printk(KERN_ERR "%s: card=%d -> %s\n",
Linus Torvalds1da177e2005-04-16 15:20:36 -07003287 core->name, i, cx88_boards[i].name);
3288}
3289
Trent Piephobbc83592007-08-15 14:41:58 -03003290static void cx88_card_setup_pre_i2c(struct cx88_core *core)
Steven Tothaa481a62006-09-14 15:41:13 -03003291{
Trent Piepho6a59d642007-08-15 14:41:57 -03003292 switch (core->boardnr) {
Steven Tothaa481a62006-09-14 15:41:13 -03003293 case CX88_BOARD_HAUPPAUGE_HVR1300:
Steven Toth2491fbb2008-09-22 01:48:13 -03003294 /*
3295 * Bring the 702 demod up before i2c scanning/attach or devices are hidden
3296 * We leave here with the 702 on the bus
3297 *
3298 * "reset the IR receiver on GPIO[3]"
3299 * Reported by Mike Crash <mike AT mikecrash.com>
3300 */
3301 cx_write(MO_GP0_IO, 0x0000ef88);
Steven Tothaa481a62006-09-14 15:41:13 -03003302 udelay(1000);
Steven Toth2491fbb2008-09-22 01:48:13 -03003303 cx_clear(MO_GP0_IO, 0x00000088);
Steven Tothaa481a62006-09-14 15:41:13 -03003304 udelay(50);
Steven Toth2491fbb2008-09-22 01:48:13 -03003305 cx_set(MO_GP0_IO, 0x00000088); /* 702 out of reset */
Steven Tothaa481a62006-09-14 15:41:13 -03003306 udelay(1000);
3307 break;
Mauro Carvalho Chehab2422a9b2008-04-22 14:46:00 -03003308
Mauro Carvalho Chehaba31d2bb2008-09-29 12:08:29 -03003309 case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
Mauro Carvalho Chehab2422a9b2008-04-22 14:46:00 -03003310 case CX88_BOARD_PROLINK_PV_8000GT:
3311 cx_write(MO_GP2_IO, 0xcf7);
3312 mdelay(50);
3313 cx_write(MO_GP2_IO, 0xef5);
3314 mdelay(50);
3315 cx_write(MO_GP2_IO, 0xcf7);
3316 msleep(10);
3317 break;
3318
Steven Toth2491fbb2008-09-22 01:48:13 -03003319 case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD:
Steven Toth1117d6b2008-04-22 14:45:34 -03003320 /* Enable the xc5000 tuner */
3321 cx_set(MO_GP0_IO, 0x00001010);
3322 break;
Steven Toth2491fbb2008-09-22 01:48:13 -03003323
Miroslav Slugen27b93d82011-12-13 15:36:15 -03003324 case CX88_BOARD_WINFAST_DTV2000H_J:
Steven Toth2491fbb2008-09-22 01:48:13 -03003325 case CX88_BOARD_HAUPPAUGE_HVR3000:
Steven Toth5bd1b662008-09-04 01:17:33 -03003326 case CX88_BOARD_HAUPPAUGE_HVR4000:
Steven Toth2491fbb2008-09-22 01:48:13 -03003327 /* Init GPIO */
3328 cx_write(MO_GP0_IO, core->board.input[0].gpio0);
Steven Toth5bd1b662008-09-04 01:17:33 -03003329 udelay(1000);
Darron Broad2f3af9e2008-10-11 11:35:56 -03003330 cx_clear(MO_GP0_IO, 0x00000080);
3331 udelay(50);
3332 cx_set(MO_GP0_IO, 0x00000080); /* 702 out of reset */
3333 udelay(1000);
Steven Toth2491fbb2008-09-22 01:48:13 -03003334 break;
Miroslav Sustek3047a172009-05-31 16:47:28 -03003335
Mauro Carvalho Chehab14422f92009-06-16 23:55:44 -03003336 case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
Miroslav Sustek3047a172009-05-31 16:47:28 -03003337 case CX88_BOARD_WINFAST_DTV1800H:
istvan_v@mailbox.hu79a5b9a2011-06-07 13:21:02 -03003338 cx88_xc3028_winfast1800h_callback(core, XC2028_TUNER_RESET, 0);
Miroslav Sustek3047a172009-05-31 16:47:28 -03003339 break;
Sergey Ivanov111ac842010-08-09 10:18:32 -03003340
istvan_v@mailbox.hu8eb79c02011-06-07 13:16:56 -03003341 case CX88_BOARD_WINFAST_DTV1800H_XC4000:
istvan_v@mailbox.huf271a3a2011-06-07 13:14:53 -03003342 case CX88_BOARD_WINFAST_DTV2000H_PLUS:
Istvan Varga84463d52011-12-11 20:20:24 -03003343 case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F36:
3344 case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F43:
istvan_v@mailbox.huf271a3a2011-06-07 13:14:53 -03003345 cx88_xc4000_winfast2000h_plus_callback(core,
3346 XC4000_TUNER_RESET, 0);
3347 break;
3348
Sergey Ivanov111ac842010-08-09 10:18:32 -03003349 case CX88_BOARD_TWINHAN_VP1027_DVBS:
3350 cx_write(MO_GP0_IO, 0x00003230);
3351 cx_write(MO_GP0_IO, 0x00003210);
3352 msleep(1);
3353 cx_write(MO_GP0_IO, 0x00001230);
3354 break;
Steven Tothaa481a62006-09-14 15:41:13 -03003355 }
3356}
3357
Mauro Carvalho Chehab99e09ea2008-03-27 23:18:30 -03003358/*
3359 * Sets board-dependent xc3028 configuration
3360 */
3361void cx88_setup_xc3028(struct cx88_core *core, struct xc2028_ctrl *ctl)
3362{
3363 memset(ctl, 0, sizeof(*ctl));
3364
3365 ctl->fname = XC2028_DEFAULT_FIRMWARE;
3366 ctl->max_len = 64;
3367
3368 switch (core->boardnr) {
3369 case CX88_BOARD_POWERCOLOR_REAL_ANGEL:
Daniel Gimpelevicha9606ce2008-06-03 21:29:45 -03003370 /* Now works with firmware version 2.7 */
3371 if (core->i2c_algo.udelay < 16)
3372 core->i2c_algo.udelay = 16;
Mauro Carvalho Chehab99e09ea2008-03-27 23:18:30 -03003373 break;
3374 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
Miroslav Sustek3047a172009-05-31 16:47:28 -03003375 case CX88_BOARD_WINFAST_DTV1800H:
Tim Farrington19c309e2008-10-11 12:44:38 -03003376 ctl->demod = XC3028_FE_ZARLINK456;
Mauro Carvalho Chehab99e09ea2008-03-27 23:18:30 -03003377 break;
3378 case CX88_BOARD_KWORLD_ATSC_120:
3379 case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
3380 ctl->demod = XC3028_FE_OREN538;
3381 break;
Devin Heitmueller93b99922009-08-03 22:52:59 -03003382 case CX88_BOARD_GENIATECH_X8000_MT:
3383 /* FIXME: For this board, the xc3028 never recovers after being
3384 powered down (the reset GPIO probably is not set properly).
3385 We don't have access to the hardware so we cannot determine
3386 which GPIO is used for xc3028, so just disable power xc3028
3387 power management for now */
3388 ctl->disable_power_mgmt = 1;
3389 break;
Mauro Carvalho Chehab14422f92009-06-16 23:55:44 -03003390 case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
Mauro Carvalho Chehaba31d2bb2008-09-29 12:08:29 -03003391 case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
Mauro Carvalho Chehab99e09ea2008-03-27 23:18:30 -03003392 case CX88_BOARD_PROLINK_PV_8000GT:
3393 /*
Mauro Carvalho Chehaba31d2bb2008-09-29 12:08:29 -03003394 * Those boards uses non-MTS firmware
Mauro Carvalho Chehab99e09ea2008-03-27 23:18:30 -03003395 */
3396 break;
Stéphane Voltz3f6014f2008-09-05 14:33:54 -03003397 case CX88_BOARD_PINNACLE_HYBRID_PCTV:
Stephan Wienczny70101a22009-03-10 19:08:06 -03003398 case CX88_BOARD_TERRATEC_CINERGY_HT_PCI_MKII:
Stéphane Voltz3f6014f2008-09-05 14:33:54 -03003399 ctl->demod = XC3028_FE_ZARLINK456;
3400 ctl->mts = 1;
3401 break;
Mauro Carvalho Chehab99e09ea2008-03-27 23:18:30 -03003402 default:
3403 ctl->demod = XC3028_FE_OREN538;
3404 ctl->mts = 1;
3405 }
3406}
3407EXPORT_SYMBOL_GPL(cx88_setup_xc3028);
3408
Trent Piephobbc83592007-08-15 14:41:58 -03003409static void cx88_card_setup(struct cx88_core *core)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003410{
Steven Toth3ca0ea92005-12-01 00:51:27 -08003411 static u8 eeprom[256];
Mauro Carvalho Chehab4bf12262008-04-26 11:55:09 -03003412 struct tuner_setup tun_setup;
Mauro Carvalho Chehabad020dc2011-02-15 09:30:50 -02003413 unsigned int mode_mask = T_RADIO | T_ANALOG_TV;
Mauro Carvalho Chehab4bf12262008-04-26 11:55:09 -03003414
3415 memset(&tun_setup, 0, sizeof(tun_setup));
Linus Torvalds1da177e2005-04-16 15:20:36 -07003416
3417 if (0 == core->i2c_rc) {
3418 core->i2c_client.addr = 0xa0 >> 1;
Mauro Carvalho Chehab4bf12262008-04-26 11:55:09 -03003419 tveeprom_read(&core->i2c_client, eeprom, sizeof(eeprom));
Linus Torvalds1da177e2005-04-16 15:20:36 -07003420 }
3421
Trent Piepho6a59d642007-08-15 14:41:57 -03003422 switch (core->boardnr) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003423 case CX88_BOARD_HAUPPAUGE:
3424 case CX88_BOARD_HAUPPAUGE_ROSLYN:
3425 if (0 == core->i2c_rc)
Mauro Carvalho Chehab4bf12262008-04-26 11:55:09 -03003426 hauppauge_eeprom(core, eeprom+8);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003427 break;
3428 case CX88_BOARD_GDI:
3429 if (0 == core->i2c_rc)
Mauro Carvalho Chehab4bf12262008-04-26 11:55:09 -03003430 gdi_eeprom(core, eeprom);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003431 break;
Mauro Carvalho Chehab14422f92009-06-16 23:55:44 -03003432 case CX88_BOARD_LEADTEK_PVR2000:
3433 case CX88_BOARD_WINFAST_DV2000:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003434 case CX88_BOARD_WINFAST2000XP_EXPERT:
3435 if (0 == core->i2c_rc)
Mauro Carvalho Chehab4bf12262008-04-26 11:55:09 -03003436 leadtek_eeprom(core, eeprom);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003437 break;
Steven Toth0fa14aa2006-01-09 15:25:02 -02003438 case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
3439 case CX88_BOARD_HAUPPAUGE_NOVASE2_S1:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003440 case CX88_BOARD_HAUPPAUGE_DVB_T1:
Steven Toth611900c2006-01-09 15:25:12 -02003441 case CX88_BOARD_HAUPPAUGE_HVR1100:
3442 case CX88_BOARD_HAUPPAUGE_HVR1100LP:
Eric Thomasad10c932006-08-08 09:10:04 -03003443 case CX88_BOARD_HAUPPAUGE_HVR3000:
Steven Tothaa481a62006-09-14 15:41:13 -03003444 case CX88_BOARD_HAUPPAUGE_HVR1300:
Steven Toth5bd1b662008-09-04 01:17:33 -03003445 case CX88_BOARD_HAUPPAUGE_HVR4000:
3446 case CX88_BOARD_HAUPPAUGE_HVR4000LITE:
Steven Toth501d8cd2009-03-28 14:22:21 -03003447 case CX88_BOARD_HAUPPAUGE_IRONLY:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003448 if (0 == core->i2c_rc)
Mauro Carvalho Chehab4bf12262008-04-26 11:55:09 -03003449 hauppauge_eeprom(core, eeprom);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003450 break;
Vadim Catana0e0351e2006-01-09 15:25:02 -02003451 case CX88_BOARD_KWORLD_DVBS_100:
3452 cx_write(MO_GP0_IO, 0x000007f8);
3453 cx_write(MO_GP1_IO, 0x00000001);
3454 break;
Chris Pascoe87655612008-04-22 14:45:15 -03003455 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
3456 /* GPIO0:0 is hooked to demod reset */
3457 /* GPIO0:4 is hooked to xc3028 reset */
3458 cx_write(MO_GP0_IO, 0x00111100);
3459 msleep(1);
3460 cx_write(MO_GP0_IO, 0x00111111);
3461 break;
Chris Pascoed536e9c2006-08-10 03:22:21 -03003462 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL:
3463 /* GPIO0:6 is hooked to FX2 reset pin */
3464 cx_set(MO_GP0_IO, 0x00004040);
3465 cx_clear(MO_GP0_IO, 0x00000040);
3466 msleep(1000);
3467 cx_set(MO_GP0_IO, 0x00004040);
3468 /* FALLTHROUGH */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003469 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
3470 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS:
Chris Pascoe780dfef2006-02-28 08:34:59 -03003471 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003472 /* GPIO0:0 is hooked to mt352 reset pin */
3473 cx_set(MO_GP0_IO, 0x00000101);
3474 cx_clear(MO_GP0_IO, 0x00000001);
3475 msleep(1);
3476 cx_set(MO_GP0_IO, 0x00000101);
Chris Pascoe780dfef2006-02-28 08:34:59 -03003477 if (0 == core->i2c_rc &&
Trent Piepho6a59d642007-08-15 14:41:57 -03003478 core->boardnr == CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID)
Chris Pascoe780dfef2006-02-28 08:34:59 -03003479 dvico_fusionhdtv_hybrid_init(core);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003480 break;
3481 case CX88_BOARD_KWORLD_DVB_T:
3482 case CX88_BOARD_DNTV_LIVE_DVB_T:
3483 cx_set(MO_GP0_IO, 0x00000707);
3484 cx_set(MO_GP2_IO, 0x00000101);
3485 cx_clear(MO_GP2_IO, 0x00000001);
3486 msleep(1);
3487 cx_clear(MO_GP0_IO, 0x00000007);
3488 cx_set(MO_GP2_IO, 0x00000101);
3489 break;
Chris Pascoefc40b262006-01-09 15:25:35 -02003490 case CX88_BOARD_DNTV_LIVE_DVB_T_PRO:
3491 cx_write(MO_GP0_IO, 0x00080808);
3492 break;
Kirk Lapraye976f9372005-11-08 21:37:04 -08003493 case CX88_BOARD_ATI_HDTVWONDER:
3494 if (0 == core->i2c_rc) {
3495 /* enable tuner */
3496 int i;
Mauro Carvalho Chehab5b9c4e62007-03-28 22:37:26 -03003497 static const u8 buffer [][2] = {
3498 {0x10,0x12},
3499 {0x13,0x04},
3500 {0x16,0x00},
3501 {0x14,0x04},
3502 {0x17,0x00}
3503 };
Kirk Lapraye976f9372005-11-08 21:37:04 -08003504 core->i2c_client.addr = 0x0a;
Kirk Lapraye976f9372005-11-08 21:37:04 -08003505
Mauro Carvalho Chehab5b9c4e62007-03-28 22:37:26 -03003506 for (i = 0; i < ARRAY_SIZE(buffer); i++)
3507 if (2 != i2c_master_send(&core->i2c_client,
3508 buffer[i],2))
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03003509 warn_printk(core, "Unable to enable "
3510 "tuner(%i).\n", i);
Kirk Lapraye976f9372005-11-08 21:37:04 -08003511 }
3512 break;
Mauro Carvalho Chehab55c88612007-10-19 06:59:33 -03003513 case CX88_BOARD_MSI_TVANYWHERE_MASTER:
3514 {
3515 struct v4l2_priv_tun_config tea5767_cfg;
3516 struct tea5767_ctrl ctl;
3517
3518 memset(&ctl, 0, sizeof(ctl));
3519
3520 ctl.high_cut = 1;
3521 ctl.st_noise = 1;
3522 ctl.deemph_75 = 1;
3523 ctl.xtal_freq = TEA5767_HIGH_LO_13MHz;
3524
3525 tea5767_cfg.tuner = TUNER_TEA5767;
3526 tea5767_cfg.priv = &ctl;
3527
Hans Verkuilb8341e12009-03-29 08:26:01 -03003528 call_all(core, tuner, s_config, &tea5767_cfg);
Igor M. Liplianinaf832622008-09-04 17:24:14 -03003529 break;
Mauro Carvalho Chehab55c88612007-10-19 06:59:33 -03003530 }
Igor M. Liplianine4aab642008-09-23 15:43:57 -03003531 case CX88_BOARD_TEVII_S420:
Igor M. Liplianinaf832622008-09-04 17:24:14 -03003532 case CX88_BOARD_TEVII_S460:
Igor M. Liplianin0cb73632011-02-25 18:41:24 -03003533 case CX88_BOARD_TEVII_S464:
Oleg Roitburd4cd7fb82008-09-17 11:30:21 -03003534 case CX88_BOARD_OMICOM_SS4_PCI:
Igor M. Liplianin4b296312008-11-09 15:25:31 -03003535 case CX88_BOARD_TBS_8910:
Oleg Roitburdee730422008-09-17 11:58:33 -03003536 case CX88_BOARD_TBS_8920:
Igor M. Liplianincd3cde12008-11-09 15:26:25 -03003537 case CX88_BOARD_PROF_6200:
Oleg Roitburd57f51db2008-10-08 06:48:08 -03003538 case CX88_BOARD_PROF_7300:
Igor M. Liplianinb699c272009-11-16 22:22:32 -03003539 case CX88_BOARD_PROF_7301:
Igor M. Liplianin4b296312008-11-09 15:25:31 -03003540 case CX88_BOARD_SATTRADE_ST4200:
Igor M. Liplianinad5f74c2009-07-29 19:18:28 -03003541 cx_write(MO_GP0_IO, 0x8000);
3542 msleep(100);
Oleg Roitburdee730422008-09-17 11:58:33 -03003543 cx_write(MO_SRST_IO, 0);
Igor M. Liplianinad5f74c2009-07-29 19:18:28 -03003544 msleep(10);
3545 cx_write(MO_GP0_IO, 0x8080);
Oleg Roitburdee730422008-09-17 11:58:33 -03003546 msleep(100);
3547 cx_write(MO_SRST_IO, 1);
3548 msleep(100);
3549 break;
Mauro Carvalho Chehab4bf12262008-04-26 11:55:09 -03003550 } /*end switch() */
3551
3552
3553 /* Setup tuners */
3554 if ((core->board.radio_type != UNSET)) {
3555 tun_setup.mode_mask = T_RADIO;
3556 tun_setup.type = core->board.radio_type;
3557 tun_setup.addr = core->board.radio_addr;
3558 tun_setup.tuner_callback = cx88_tuner_callback;
Hans Verkuilb8341e12009-03-29 08:26:01 -03003559 call_all(core, tuner, s_type_addr, &tun_setup);
Mauro Carvalho Chehab4bf12262008-04-26 11:55:09 -03003560 mode_mask &= ~T_RADIO;
3561 }
3562
3563 if (core->board.tuner_type != TUNER_ABSENT) {
3564 tun_setup.mode_mask = mode_mask;
3565 tun_setup.type = core->board.tuner_type;
3566 tun_setup.addr = core->board.tuner_addr;
3567 tun_setup.tuner_callback = cx88_tuner_callback;
3568
Hans Verkuilb8341e12009-03-29 08:26:01 -03003569 call_all(core, tuner, s_type_addr, &tun_setup);
Mauro Carvalho Chehab4bf12262008-04-26 11:55:09 -03003570 }
3571
3572 if (core->board.tda9887_conf) {
3573 struct v4l2_priv_tun_config tda9887_cfg;
3574
3575 tda9887_cfg.tuner = TUNER_TDA9887;
3576 tda9887_cfg.priv = &core->board.tda9887_conf;
3577
Hans Verkuilb8341e12009-03-29 08:26:01 -03003578 call_all(core, tuner, s_config, &tda9887_cfg);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003579 }
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03003580
3581 if (core->board.tuner_type == TUNER_XC2028) {
3582 struct v4l2_priv_tun_config xc2028_cfg;
3583 struct xc2028_ctrl ctl;
3584
Mauro Carvalho Chehab99e09ea2008-03-27 23:18:30 -03003585 /* Fills device-dependent initialization parameters */
3586 cx88_setup_xc3028(core, &ctl);
3587
3588 /* Sends parameters to xc2028/3028 tuner */
Mauro Carvalho Chehaba9317ab2008-04-22 14:45:46 -03003589 memset(&xc2028_cfg, 0, sizeof(xc2028_cfg));
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03003590 xc2028_cfg.tuner = TUNER_XC2028;
3591 xc2028_cfg.priv = &ctl;
Mauro Carvalho Chehab64016332008-04-22 14:45:30 -03003592 info_printk(core, "Asking xc2028/3028 to load firmware %s\n",
3593 ctl.fname);
Hans Verkuilb8341e12009-03-29 08:26:01 -03003594 call_all(core, tuner, s_config, &xc2028_cfg);
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03003595 }
Laurent Pinchart622b8282009-10-05 10:48:17 -03003596 call_all(core, core, s_power, 0);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003597}
3598
3599/* ------------------------------------------------------------------ */
3600
Trent Piephobbc83592007-08-15 14:41:58 -03003601static int cx88_pci_quirks(const char *name, struct pci_dev *pci)
3602{
3603 unsigned int lat = UNSET;
3604 u8 ctrl = 0;
3605 u8 value;
3606
3607 /* check pci quirks */
3608 if (pci_pci_problems & PCIPCI_TRITON) {
3609 printk(KERN_INFO "%s: quirk: PCIPCI_TRITON -- set TBFX\n",
3610 name);
3611 ctrl |= CX88X_EN_TBFX;
3612 }
3613 if (pci_pci_problems & PCIPCI_NATOMA) {
3614 printk(KERN_INFO "%s: quirk: PCIPCI_NATOMA -- set TBFX\n",
3615 name);
3616 ctrl |= CX88X_EN_TBFX;
3617 }
3618 if (pci_pci_problems & PCIPCI_VIAETBF) {
3619 printk(KERN_INFO "%s: quirk: PCIPCI_VIAETBF -- set TBFX\n",
3620 name);
3621 ctrl |= CX88X_EN_TBFX;
3622 }
3623 if (pci_pci_problems & PCIPCI_VSFX) {
3624 printk(KERN_INFO "%s: quirk: PCIPCI_VSFX -- set VSFX\n",
3625 name);
3626 ctrl |= CX88X_EN_VSFX;
3627 }
3628#ifdef PCIPCI_ALIMAGIK
3629 if (pci_pci_problems & PCIPCI_ALIMAGIK) {
3630 printk(KERN_INFO "%s: quirk: PCIPCI_ALIMAGIK -- latency fixup\n",
3631 name);
3632 lat = 0x0A;
3633 }
3634#endif
3635
3636 /* check insmod options */
3637 if (UNSET != latency)
3638 lat = latency;
3639
3640 /* apply stuff */
3641 if (ctrl) {
3642 pci_read_config_byte(pci, CX88X_DEVCTRL, &value);
3643 value |= ctrl;
3644 pci_write_config_byte(pci, CX88X_DEVCTRL, value);
3645 }
3646 if (UNSET != lat) {
3647 printk(KERN_INFO "%s: setting pci latency timer to %d\n",
3648 name, latency);
3649 pci_write_config_byte(pci, PCI_LATENCY_TIMER, latency);
3650 }
3651 return 0;
3652}
3653
3654int cx88_get_resources(const struct cx88_core *core, struct pci_dev *pci)
3655{
3656 if (request_mem_region(pci_resource_start(pci,0),
3657 pci_resource_len(pci,0),
3658 core->name))
3659 return 0;
3660 printk(KERN_ERR
3661 "%s/%d: Can't get MMIO memory @ 0x%llx, subsystem: %04x:%04x\n",
3662 core->name, PCI_FUNC(pci->devfn),
3663 (unsigned long long)pci_resource_start(pci, 0),
3664 pci->subsystem_vendor, pci->subsystem_device);
3665 return -EBUSY;
3666}
3667
3668/* Allocate and initialize the cx88 core struct. One should hold the
3669 * devlist mutex before calling this. */
3670struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr)
3671{
3672 struct cx88_core *core;
3673 int i;
3674
3675 core = kzalloc(sizeof(*core), GFP_KERNEL);
Alan Coxfbc0ae22009-03-26 17:44:38 -03003676 if (core == NULL)
3677 return NULL;
Trent Piephobbc83592007-08-15 14:41:58 -03003678
3679 atomic_inc(&core->refcount);
3680 core->pci_bus = pci->bus->number;
3681 core->pci_slot = PCI_SLOT(pci->devfn);
Trent Piepho8ddac9e2007-08-18 06:57:55 -03003682 core->pci_irqmask = PCI_INT_RISC_RD_BERRINT | PCI_INT_RISC_WR_BERRINT |
3683 PCI_INT_BRDG_BERRINT | PCI_INT_SRC_DMA_BERRINT |
3684 PCI_INT_DST_DMA_BERRINT | PCI_INT_IPB_DMA_BERRINT;
Trent Piephobbc83592007-08-15 14:41:58 -03003685 mutex_init(&core->lock);
3686
3687 core->nr = nr;
3688 sprintf(core->name, "cx88[%d]", core->nr);
Hans Verkuil9467fe12009-03-14 12:40:51 -03003689
3690 strcpy(core->v4l2_dev.name, core->name);
3691 if (v4l2_device_register(NULL, &core->v4l2_dev)) {
3692 kfree(core);
3693 return NULL;
3694 }
3695
Hans Verkuil8c7cb122012-05-11 09:07:45 -03003696 if (v4l2_ctrl_handler_init(&core->video_hdl, 13)) {
3697 v4l2_device_unregister(&core->v4l2_dev);
3698 kfree(core);
3699 return NULL;
3700 }
3701
3702 if (v4l2_ctrl_handler_init(&core->audio_hdl, 13)) {
3703 v4l2_ctrl_handler_free(&core->video_hdl);
Hans Verkuilbac63982012-06-10 07:39:52 -03003704 v4l2_device_unregister(&core->v4l2_dev);
3705 kfree(core);
3706 return NULL;
3707 }
3708
Trent Piephobbc83592007-08-15 14:41:58 -03003709 if (0 != cx88_get_resources(core, pci)) {
Hans Verkuil8c7cb122012-05-11 09:07:45 -03003710 v4l2_ctrl_handler_free(&core->video_hdl);
3711 v4l2_ctrl_handler_free(&core->audio_hdl);
Hans Verkuil9467fe12009-03-14 12:40:51 -03003712 v4l2_device_unregister(&core->v4l2_dev);
Trent Piephobbc83592007-08-15 14:41:58 -03003713 kfree(core);
3714 return NULL;
3715 }
3716
3717 /* PCI stuff */
3718 cx88_pci_quirks(core->name, pci);
3719 core->lmmio = ioremap(pci_resource_start(pci, 0),
3720 pci_resource_len(pci, 0));
3721 core->bmmio = (u8 __iomem *)core->lmmio;
3722
Alan Coxfbc0ae22009-03-26 17:44:38 -03003723 if (core->lmmio == NULL) {
Hans Verkuilbac63982012-06-10 07:39:52 -03003724 release_mem_region(pci_resource_start(pci, 0),
3725 pci_resource_len(pci, 0));
Hans Verkuil8c7cb122012-05-11 09:07:45 -03003726 v4l2_ctrl_handler_free(&core->video_hdl);
3727 v4l2_ctrl_handler_free(&core->audio_hdl);
Hans Verkuilbac63982012-06-10 07:39:52 -03003728 v4l2_device_unregister(&core->v4l2_dev);
Alan Coxfbc0ae22009-03-26 17:44:38 -03003729 kfree(core);
3730 return NULL;
3731 }
3732
Trent Piephobbc83592007-08-15 14:41:58 -03003733 /* board config */
3734 core->boardnr = UNSET;
3735 if (card[core->nr] < ARRAY_SIZE(cx88_boards))
3736 core->boardnr = card[core->nr];
3737 for (i = 0; UNSET == core->boardnr && i < ARRAY_SIZE(cx88_subids); i++)
3738 if (pci->subsystem_vendor == cx88_subids[i].subvendor &&
3739 pci->subsystem_device == cx88_subids[i].subdevice)
3740 core->boardnr = cx88_subids[i].card;
3741 if (UNSET == core->boardnr) {
3742 core->boardnr = CX88_BOARD_UNKNOWN;
3743 cx88_card_list(core, pci);
3744 }
3745
Ezequiel Garciab5237742012-10-23 15:57:19 -03003746 core->board = cx88_boards[core->boardnr];
Trent Piephobbc83592007-08-15 14:41:58 -03003747
Mauro Carvalho Chehab30077032008-10-21 10:43:10 -03003748 if (!core->board.num_frontends && (core->board.mpeg & CX88_MPEG_DVB))
3749 core->board.num_frontends = 1;
Steven Toth363c35f2008-10-11 11:05:50 -03003750
3751 info_printk(core, "subsystem: %04x:%04x, board: %s [card=%d,%s], frontend(s): %d\n",
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03003752 pci->subsystem_vendor, pci->subsystem_device, core->board.name,
Trent Piephobbc83592007-08-15 14:41:58 -03003753 core->boardnr, card[core->nr] == core->boardnr ?
Steven Toth363c35f2008-10-11 11:05:50 -03003754 "insmod option" : "autodetected",
3755 core->board.num_frontends);
Trent Piephobbc83592007-08-15 14:41:58 -03003756
3757 if (tuner[core->nr] != UNSET)
3758 core->board.tuner_type = tuner[core->nr];
3759 if (radio[core->nr] != UNSET)
3760 core->board.radio_type = radio[core->nr];
3761
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03003762 info_printk(core, "TV tuner type %d, Radio tuner type %d\n",
3763 core->board.tuner_type, core->board.radio_type);
Trent Piephobbc83592007-08-15 14:41:58 -03003764
3765 /* init hardware */
3766 cx88_reset(core);
3767 cx88_card_setup_pre_i2c(core);
3768 cx88_i2c_init(core, pci);
Mauro Carvalho Chehab189bf5f2008-02-19 16:22:25 -03003769
3770 /* load tuner module, if needed */
Hans Verkuilb8341e12009-03-29 08:26:01 -03003771 if (TUNER_ABSENT != core->board.tuner_type) {
Hans Verkuil43d5eab2009-03-29 17:47:30 -03003772 /* Ignore 0x6b and 0x6f on cx88 boards.
3773 * FusionHDTV5 RT Gold has an ir receiver at 0x6b
3774 * and an RTC at 0x6f which can get corrupted if probed. */
3775 static const unsigned short tv_addrs[] = {
3776 0x42, 0x43, 0x4a, 0x4b, /* tda8290 */
3777 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
3778 0x68, 0x69, 0x6a, 0x6c, 0x6d, 0x6e,
3779 I2C_CLIENT_END
3780 };
Hans Verkuilb8341e12009-03-29 08:26:01 -03003781 int has_demod = (core->board.tda9887_conf & TDA9887_PRESENT);
3782
3783 /* I don't trust the radio_type as is stored in the card
3784 definitions, so we just probe for it.
3785 The radio_type is sometimes missing, or set to UNSET but
3786 later code configures a tea5767.
3787 */
Hans Verkuil53dacb12009-08-10 02:49:08 -03003788 v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003789 "tuner", 0, v4l2_i2c_tuner_addrs(ADDRS_RADIO));
Hans Verkuilb8341e12009-03-29 08:26:01 -03003790 if (has_demod)
Hans Verkuil53dacb12009-08-10 02:49:08 -03003791 v4l2_i2c_new_subdev(&core->v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003792 &core->i2c_adap, "tuner",
Hans Verkuil53dacb12009-08-10 02:49:08 -03003793 0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
Hans Verkuilb8341e12009-03-29 08:26:01 -03003794 if (core->board.tuner_addr == ADDR_UNSET) {
Hans Verkuil53dacb12009-08-10 02:49:08 -03003795 v4l2_i2c_new_subdev(&core->v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003796 &core->i2c_adap, "tuner",
Hans Verkuil53dacb12009-08-10 02:49:08 -03003797 0, has_demod ? tv_addrs + 4 : tv_addrs);
Hans Verkuilb8341e12009-03-29 08:26:01 -03003798 } else {
Hans Verkuile6574f22009-04-01 03:57:53 -03003799 v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003800 "tuner", core->board.tuner_addr, NULL);
Hans Verkuilb8341e12009-03-29 08:26:01 -03003801 }
3802 }
Mauro Carvalho Chehab189bf5f2008-02-19 16:22:25 -03003803
Trent Piephobbc83592007-08-15 14:41:58 -03003804 cx88_card_setup(core);
Jean Delvare89c3bc72010-06-28 12:59:49 -03003805 if (!disable_ir) {
3806 cx88_i2c_init_ir(core);
3807 cx88_ir_init(core, pci);
3808 }
Trent Piephobbc83592007-08-15 14:41:58 -03003809
3810 return core;
3811}