blob: 369ba69cd0b49124340e3ca94ec68605b7b0a446 [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>
27
28#include "cx88.h"
Mauro Carvalho Chehab55c88612007-10-19 06:59:33 -030029#include "tea5767.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -070030
Trent Piephobbc83592007-08-15 14:41:58 -030031static unsigned int tuner[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
32static unsigned int radio[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
33static unsigned int card[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
34
35module_param_array(tuner, int, NULL, 0444);
36module_param_array(radio, int, NULL, 0444);
37module_param_array(card, int, NULL, 0444);
38
39MODULE_PARM_DESC(tuner,"tuner type");
40MODULE_PARM_DESC(radio,"radio tuner type");
41MODULE_PARM_DESC(card,"card type");
42
43static unsigned int latency = UNSET;
44module_param(latency,int,0444);
45MODULE_PARM_DESC(latency,"pci latency timer");
46
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -030047#define info_printk(core, fmt, arg...) \
48 printk(KERN_INFO "%s: " fmt, core->name , ## arg)
49
50#define warn_printk(core, fmt, arg...) \
51 printk(KERN_WARNING "%s: " fmt, core->name , ## arg)
52
53#define err_printk(core, fmt, arg...) \
54 printk(KERN_ERR "%s: " fmt, core->name , ## arg)
55
56
Linus Torvalds1da177e2005-04-16 15:20:36 -070057/* ------------------------------------------------------------------ */
58/* board config info */
59
Mauro Carvalho Chehab4bf12262008-04-26 11:55:09 -030060/* If radio_type !=UNSET, radio_addr should be specified
61 */
62
Trent Piephobbc83592007-08-15 14:41:58 -030063static const struct cx88_board cx88_boards[] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -070064 [CX88_BOARD_UNKNOWN] = {
65 .name = "UNKNOWN/GENERIC",
66 .tuner_type = UNSET,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -070067 .radio_type = UNSET,
68 .tuner_addr = ADDR_UNSET,
69 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -070070 .input = {{
71 .type = CX88_VMUX_COMPOSITE1,
72 .vmux = 0,
73 },{
74 .type = CX88_VMUX_COMPOSITE2,
75 .vmux = 1,
76 },{
77 .type = CX88_VMUX_COMPOSITE3,
78 .vmux = 2,
79 },{
80 .type = CX88_VMUX_COMPOSITE4,
81 .vmux = 3,
82 }},
83 },
84 [CX88_BOARD_HAUPPAUGE] = {
85 .name = "Hauppauge WinTV 34xxx models",
86 .tuner_type = UNSET,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -070087 .radio_type = UNSET,
88 .tuner_addr = ADDR_UNSET,
89 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -070090 .tda9887_conf = TDA9887_PRESENT,
91 .input = {{
92 .type = CX88_VMUX_TELEVISION,
93 .vmux = 0,
94 .gpio0 = 0xff00, // internal decoder
95 },{
96 .type = CX88_VMUX_DEBUG,
97 .vmux = 0,
98 .gpio0 = 0xff01, // mono from tuner chip
99 },{
100 .type = CX88_VMUX_COMPOSITE1,
101 .vmux = 1,
102 .gpio0 = 0xff02,
103 },{
104 .type = CX88_VMUX_SVIDEO,
105 .vmux = 2,
106 .gpio0 = 0xff02,
107 }},
108 .radio = {
109 .type = CX88_RADIO,
110 .gpio0 = 0xff01,
111 },
112 },
113 [CX88_BOARD_GDI] = {
114 .name = "GDI Black Gold",
115 .tuner_type = UNSET,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700116 .radio_type = UNSET,
117 .tuner_addr = ADDR_UNSET,
118 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700119 .input = {{
120 .type = CX88_VMUX_TELEVISION,
121 .vmux = 0,
Mauro Carvalho Chehabfd3113e2005-07-31 22:34:43 -0700122 },{
123 .type = CX88_VMUX_SVIDEO,
124 .vmux = 2,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700125 }},
126 },
127 [CX88_BOARD_PIXELVIEW] = {
128 .name = "PixelView",
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700129 .tuner_type = TUNER_PHILIPS_PAL,
130 .radio_type = UNSET,
131 .tuner_addr = ADDR_UNSET,
132 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700133 .input = {{
134 .type = CX88_VMUX_TELEVISION,
135 .vmux = 0,
136 .gpio0 = 0xff00, // internal decoder
137 },{
138 .type = CX88_VMUX_COMPOSITE1,
139 .vmux = 1,
140 },{
141 .type = CX88_VMUX_SVIDEO,
142 .vmux = 2,
143 }},
144 .radio = {
145 .type = CX88_RADIO,
146 .gpio0 = 0xff10,
Michael Krufky47ee2f32006-06-06 15:51:38 -0300147 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700148 },
149 [CX88_BOARD_ATI_WONDER_PRO] = {
150 .name = "ATI TV Wonder Pro",
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700151 .tuner_type = TUNER_PHILIPS_4IN1,
152 .radio_type = UNSET,
153 .tuner_addr = ADDR_UNSET,
154 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700155 .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER,
156 .input = {{
157 .type = CX88_VMUX_TELEVISION,
158 .vmux = 0,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800159 .gpio0 = 0x03ff,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700160 },{
161 .type = CX88_VMUX_COMPOSITE1,
162 .vmux = 1,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800163 .gpio0 = 0x03fe,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700164 },{
165 .type = CX88_VMUX_SVIDEO,
166 .vmux = 2,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800167 .gpio0 = 0x03fe,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700168 }},
169 },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800170 [CX88_BOARD_WINFAST2000XP_EXPERT] = {
171 .name = "Leadtek Winfast 2000XP Expert",
172 .tuner_type = TUNER_PHILIPS_4IN1,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700173 .radio_type = UNSET,
174 .tuner_addr = ADDR_UNSET,
175 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700176 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800177 .input = {{
178 .type = CX88_VMUX_TELEVISION,
179 .vmux = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700180 .gpio0 = 0x00F5e700,
181 .gpio1 = 0x00003004,
182 .gpio2 = 0x00F5e700,
183 .gpio3 = 0x02000000,
184 },{
185 .type = CX88_VMUX_COMPOSITE1,
186 .vmux = 1,
187 .gpio0 = 0x00F5c700,
188 .gpio1 = 0x00003004,
189 .gpio2 = 0x00F5c700,
190 .gpio3 = 0x02000000,
191 },{
192 .type = CX88_VMUX_SVIDEO,
193 .vmux = 2,
194 .gpio0 = 0x00F5c700,
195 .gpio1 = 0x00003004,
196 .gpio2 = 0x00F5c700,
197 .gpio3 = 0x02000000,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800198 }},
199 .radio = {
200 .type = CX88_RADIO,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700201 .gpio0 = 0x00F5d700,
202 .gpio1 = 0x00003004,
203 .gpio2 = 0x00F5d700,
204 .gpio3 = 0x02000000,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800205 },
206 },
Lubomir Bulej7418f342005-11-08 21:38:34 -0800207 [CX88_BOARD_AVERTV_STUDIO_303] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700208 .name = "AverTV Studio 303 (M126)",
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700209 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
210 .radio_type = UNSET,
211 .tuner_addr = ADDR_UNSET,
212 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700213 .tda9887_conf = TDA9887_PRESENT,
214 .input = {{
215 .type = CX88_VMUX_TELEVISION,
216 .vmux = 0,
Marcin Rudowski4aca4832006-03-09 16:09:51 -0300217 .gpio1 = 0xe09f,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700218 },{
219 .type = CX88_VMUX_COMPOSITE1,
220 .vmux = 1,
Marcin Rudowski4aca4832006-03-09 16:09:51 -0300221 .gpio1 = 0xe05f,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700222 },{
223 .type = CX88_VMUX_SVIDEO,
224 .vmux = 2,
Marcin Rudowski4aca4832006-03-09 16:09:51 -0300225 .gpio1 = 0xe05f,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700226 }},
227 .radio = {
Marcin Rudowski4aca4832006-03-09 16:09:51 -0300228 .gpio1 = 0xe0df,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700229 .type = CX88_RADIO,
230 },
231 },
232 [CX88_BOARD_MSI_TVANYWHERE_MASTER] = {
233 // added gpio values thanks to Michal
234 // values for PAL from DScaler
235 .name = "MSI TV-@nywhere Master",
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700236 .tuner_type = TUNER_MT2032,
237 .radio_type = UNSET,
238 .tuner_addr = ADDR_UNSET,
239 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev3ae1adc2005-11-08 21:37:39 -0800240 .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER_NTSC,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700241 .input = {{
242 .type = CX88_VMUX_TELEVISION,
243 .vmux = 0,
244 .gpio0 = 0x000040bf,
245 .gpio1 = 0x000080c0,
246 .gpio2 = 0x0000ff40,
247 },{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800248 .type = CX88_VMUX_COMPOSITE1,
249 .vmux = 1,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700250 .gpio0 = 0x000040bf,
251 .gpio1 = 0x000080c0,
252 .gpio2 = 0x0000ff40,
253 },{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800254 .type = CX88_VMUX_SVIDEO,
255 .vmux = 2,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700256 .gpio0 = 0x000040bf,
257 .gpio1 = 0x000080c0,
258 .gpio2 = 0x0000ff40,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800259 }},
260 .radio = {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700261 .type = CX88_RADIO,
Mauro Carvalho Chehab55c88612007-10-19 06:59:33 -0300262 .vmux = 3,
263 .gpio0 = 0x000040bf,
264 .gpio1 = 0x000080c0,
265 .gpio2 = 0x0000ff20,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800266 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700267 },
268 [CX88_BOARD_WINFAST_DV2000] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800269 .name = "Leadtek Winfast DV2000",
270 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700271 .radio_type = UNSET,
272 .tuner_addr = ADDR_UNSET,
273 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700274 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800275 .input = {{
276 .type = CX88_VMUX_TELEVISION,
277 .vmux = 0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700278 .gpio0 = 0x0035e700,
279 .gpio1 = 0x00003004,
280 .gpio2 = 0x0035e700,
281 .gpio3 = 0x02000000,
282 },{
283
284 .type = CX88_VMUX_COMPOSITE1,
285 .vmux = 1,
286 .gpio0 = 0x0035c700,
287 .gpio1 = 0x00003004,
288 .gpio2 = 0x0035c700,
289 .gpio3 = 0x02000000,
290 },{
291 .type = CX88_VMUX_SVIDEO,
292 .vmux = 2,
293 .gpio0 = 0x0035c700,
294 .gpio1 = 0x0035c700,
295 .gpio2 = 0x02000000,
296 .gpio3 = 0x02000000,
297 }},
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800298 .radio = {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700299 .type = CX88_RADIO,
300 .gpio0 = 0x0035d700,
301 .gpio1 = 0x00007004,
302 .gpio2 = 0x0035d700,
303 .gpio3 = 0x02000000,
Michael Krufky47ee2f32006-06-06 15:51:38 -0300304 },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800305 },
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700306 [CX88_BOARD_LEADTEK_PVR2000] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700307 // gpio values for PAL version from regspy by DScaler
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700308 .name = "Leadtek PVR 2000",
309 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
310 .radio_type = UNSET,
311 .tuner_addr = ADDR_UNSET,
312 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700313 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700314 .input = {{
315 .type = CX88_VMUX_TELEVISION,
316 .vmux = 0,
317 .gpio0 = 0x0000bde2,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300318 .audioroute = 1,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700319 },{
320 .type = CX88_VMUX_COMPOSITE1,
321 .vmux = 1,
322 .gpio0 = 0x0000bde6,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300323 .audioroute = 1,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700324 },{
325 .type = CX88_VMUX_SVIDEO,
326 .vmux = 2,
327 .gpio0 = 0x0000bde6,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300328 .audioroute = 1,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700329 }},
330 .radio = {
331 .type = CX88_RADIO,
332 .gpio0 = 0x0000bd62,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300333 .audioroute = 1,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700334 },
Michael Krufky48d5e802006-09-25 14:09:10 -0300335 .mpeg = CX88_MPEG_BLACKBIRD,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700336 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700337 [CX88_BOARD_IODATA_GVVCP3PCI] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800338 .name = "IODATA GV-VCP3/PCI",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700339 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800340 .radio_type = UNSET,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700341 .tuner_addr = ADDR_UNSET,
342 .radio_addr = ADDR_UNSET,
343 .input = {{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800344 .type = CX88_VMUX_COMPOSITE1,
345 .vmux = 0,
346 },{
347 .type = CX88_VMUX_COMPOSITE2,
348 .vmux = 1,
349 },{
350 .type = CX88_VMUX_SVIDEO,
351 .vmux = 2,
352 }},
353 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700354 [CX88_BOARD_PROLINK_PLAYTVPVR] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800355 .name = "Prolink PlayTV PVR",
356 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700357 .radio_type = UNSET,
358 .tuner_addr = ADDR_UNSET,
359 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700360 .tda9887_conf = TDA9887_PRESENT,
361 .input = {{
362 .type = CX88_VMUX_TELEVISION,
363 .vmux = 0,
Michael Krufkyfc34f162006-03-13 03:41:44 -0300364 .gpio0 = 0xbff0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700365 },{
366 .type = CX88_VMUX_COMPOSITE1,
367 .vmux = 1,
Michael Krufkyfc34f162006-03-13 03:41:44 -0300368 .gpio0 = 0xbff3,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700369 },{
370 .type = CX88_VMUX_SVIDEO,
371 .vmux = 2,
Michael Krufkyfc34f162006-03-13 03:41:44 -0300372 .gpio0 = 0xbff3,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700373 }},
374 .radio = {
375 .type = CX88_RADIO,
Michael Krufkyfc34f162006-03-13 03:41:44 -0300376 .gpio0 = 0xbff0,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700377 },
378 },
379 [CX88_BOARD_ASUS_PVR_416] = {
380 .name = "ASUS PVR-416",
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700381 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
382 .radio_type = UNSET,
383 .tuner_addr = ADDR_UNSET,
384 .radio_addr = ADDR_UNSET,
385 .tda9887_conf = TDA9887_PRESENT,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700386 .input = {{
387 .type = CX88_VMUX_TELEVISION,
388 .vmux = 0,
389 .gpio0 = 0x0000fde6,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800390 },{
Linus Torvalds1da177e2005-04-16 15:20:36 -0700391 .type = CX88_VMUX_SVIDEO,
392 .vmux = 2,
393 .gpio0 = 0x0000fde6, // 0x0000fda6 L,R RCA audio in?
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300394 .audioroute = 1,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700395 }},
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800396 .radio = {
397 .type = CX88_RADIO,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700398 .gpio0 = 0x0000fde2,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800399 },
Michael Krufky48d5e802006-09-25 14:09:10 -0300400 .mpeg = CX88_MPEG_BLACKBIRD,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700401 },
402 [CX88_BOARD_MSI_TVANYWHERE] = {
403 .name = "MSI TV-@nywhere",
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700404 .tuner_type = TUNER_MT2032,
405 .radio_type = UNSET,
406 .tuner_addr = ADDR_UNSET,
407 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700408 .tda9887_conf = TDA9887_PRESENT,
409 .input = {{
410 .type = CX88_VMUX_TELEVISION,
411 .vmux = 0,
412 .gpio0 = 0x00000fbf,
413 .gpio2 = 0x0000fc08,
414 },{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800415 .type = CX88_VMUX_COMPOSITE1,
416 .vmux = 1,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700417 .gpio0 = 0x00000fbf,
418 .gpio2 = 0x0000fc68,
419 },{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800420 .type = CX88_VMUX_SVIDEO,
421 .vmux = 2,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700422 .gpio0 = 0x00000fbf,
423 .gpio2 = 0x0000fc68,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800424 }},
Linus Torvalds1da177e2005-04-16 15:20:36 -0700425 },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800426 [CX88_BOARD_KWORLD_DVB_T] = {
427 .name = "KWorld/VStream XPert DVB-T",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700428 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700429 .radio_type = UNSET,
430 .tuner_addr = ADDR_UNSET,
431 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800432 .input = {{
433 .type = CX88_VMUX_COMPOSITE1,
434 .vmux = 1,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700435 .gpio0 = 0x0700,
436 .gpio2 = 0x0101,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800437 },{
438 .type = CX88_VMUX_SVIDEO,
439 .vmux = 2,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700440 .gpio0 = 0x0700,
441 .gpio2 = 0x0101,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800442 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300443 .mpeg = CX88_MPEG_DVB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700444 },
445 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1] = {
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -0700446 .name = "DViCO FusionHDTV DVB-T1",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700447 .tuner_type = TUNER_ABSENT, /* No analog tuner */
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700448 .radio_type = UNSET,
449 .tuner_addr = ADDR_UNSET,
450 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700451 .input = {{
452 .type = CX88_VMUX_COMPOSITE1,
453 .vmux = 1,
454 .gpio0 = 0x000027df,
Michael Krufky47ee2f32006-06-06 15:51:38 -0300455 },{
Linus Torvalds1da177e2005-04-16 15:20:36 -0700456 .type = CX88_VMUX_SVIDEO,
457 .vmux = 2,
458 .gpio0 = 0x000027df,
459 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300460 .mpeg = CX88_MPEG_DVB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700461 },
462 [CX88_BOARD_KWORLD_LTV883] = {
463 .name = "KWorld LTV883RF",
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700464 .tuner_type = TUNER_TNF_8831BGFF,
465 .radio_type = UNSET,
466 .tuner_addr = ADDR_UNSET,
467 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800468 .input = {{
469 .type = CX88_VMUX_TELEVISION,
470 .vmux = 0,
471 .gpio0 = 0x07f8,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700472 },{
473 .type = CX88_VMUX_DEBUG,
474 .vmux = 0,
475 .gpio0 = 0x07f9, // mono from tuner chip
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800476 },{
477 .type = CX88_VMUX_COMPOSITE1,
478 .vmux = 1,
479 .gpio0 = 0x000007fa,
480 },{
481 .type = CX88_VMUX_SVIDEO,
482 .vmux = 2,
483 .gpio0 = 0x000007fa,
484 }},
485 .radio = {
486 .type = CX88_RADIO,
487 .gpio0 = 0x000007f8,
488 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700489 },
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -0700490 [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q] = {
491 .name = "DViCO FusionHDTV 3 Gold-Q",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700492 .tuner_type = TUNER_MICROTUNE_4042FI5,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700493 .radio_type = UNSET,
494 .tuner_addr = ADDR_UNSET,
495 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700496 /*
497 GPIO[0] resets DT3302 DTV receiver
498 0 - reset asserted
499 1 - normal operation
500 GPIO[1] mutes analog audio output connector
501 0 - enable selected source
502 1 - mute
503 GPIO[2] selects source for analog audio output connector
504 0 - analog audio input connector on tab
505 1 - analog DAC output from CX23881 chip
506 GPIO[3] selects RF input connector on tuner module
507 0 - RF connector labeled CABLE
508 1 - RF connector labeled ANT
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -0700509 GPIO[4] selects high RF for QAM256 mode
510 0 - normal RF
511 1 - high RF
Linus Torvalds1da177e2005-04-16 15:20:36 -0700512 */
513 .input = {{
514 .type = CX88_VMUX_TELEVISION,
515 .vmux = 0,
516 .gpio0 = 0x0f0d,
517 },{
518 .type = CX88_VMUX_CABLE,
519 .vmux = 0,
520 .gpio0 = 0x0f05,
521 },{
522 .type = CX88_VMUX_COMPOSITE1,
523 .vmux = 1,
524 .gpio0 = 0x0f00,
525 },{
526 .type = CX88_VMUX_SVIDEO,
527 .vmux = 2,
528 .gpio0 = 0x0f00,
529 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300530 .mpeg = CX88_MPEG_DVB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700531 },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800532 [CX88_BOARD_HAUPPAUGE_DVB_T1] = {
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700533 .name = "Hauppauge Nova-T DVB-T",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700534 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700535 .radio_type = UNSET,
536 .tuner_addr = ADDR_UNSET,
537 .radio_addr = ADDR_UNSET,
538 .input = {{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800539 .type = CX88_VMUX_DVB,
540 .vmux = 0,
541 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300542 .mpeg = CX88_MPEG_DVB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700543 },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800544 [CX88_BOARD_CONEXANT_DVB_T1] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700545 .name = "Conexant DVB-T reference design",
546 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700547 .radio_type = UNSET,
548 .tuner_addr = ADDR_UNSET,
549 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800550 .input = {{
551 .type = CX88_VMUX_DVB,
552 .vmux = 0,
553 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300554 .mpeg = CX88_MPEG_DVB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700555 },
556 [CX88_BOARD_PROVIDEO_PV259] = {
557 .name = "Provideo PV259",
558 .tuner_type = TUNER_PHILIPS_FQ1216ME,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700559 .radio_type = UNSET,
560 .tuner_addr = ADDR_UNSET,
561 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700562 .input = {{
563 .type = CX88_VMUX_TELEVISION,
564 .vmux = 0,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300565 .audioroute = 1,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700566 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300567 .mpeg = CX88_MPEG_BLACKBIRD,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700568 },
569 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS] = {
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -0700570 .name = "DViCO FusionHDTV DVB-T Plus",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700571 .tuner_type = TUNER_ABSENT, /* No analog tuner */
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700572 .radio_type = UNSET,
573 .tuner_addr = ADDR_UNSET,
574 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700575 .input = {{
576 .type = CX88_VMUX_COMPOSITE1,
577 .vmux = 1,
578 .gpio0 = 0x000027df,
Michael Krufky47ee2f32006-06-06 15:51:38 -0300579 },{
Linus Torvalds1da177e2005-04-16 15:20:36 -0700580 .type = CX88_VMUX_SVIDEO,
581 .vmux = 2,
582 .gpio0 = 0x000027df,
583 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300584 .mpeg = CX88_MPEG_DVB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700585 },
586 [CX88_BOARD_DNTV_LIVE_DVB_T] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800587 .name = "digitalnow DNTV Live! DVB-T",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700588 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700589 .radio_type = UNSET,
590 .tuner_addr = ADDR_UNSET,
591 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800592 .input = {{
Linus Torvalds1da177e2005-04-16 15:20:36 -0700593 .type = CX88_VMUX_COMPOSITE1,
594 .vmux = 1,
595 .gpio0 = 0x00000700,
596 .gpio2 = 0x00000101,
597 },{
598 .type = CX88_VMUX_SVIDEO,
599 .vmux = 2,
600 .gpio0 = 0x00000700,
601 .gpio2 = 0x00000101,
602 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300603 .mpeg = CX88_MPEG_DVB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700604 },
605 [CX88_BOARD_PCHDTV_HD3000] = {
606 .name = "pcHDTV HD3000 HDTV",
Trent Piepho9175b852006-04-10 09:40:37 -0300607 .tuner_type = TUNER_THOMSON_DTT761X,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700608 .radio_type = UNSET,
609 .tuner_addr = ADDR_UNSET,
610 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehabe4f5c82a2005-12-04 12:41:54 -0200611 .tda9887_conf = TDA9887_PRESENT,
Trent Piepho19dc74b2007-07-31 23:06:50 -0300612 /* GPIO[2] = audio source for analog audio out connector
613 * 0 = analog audio input connector
614 * 1 = CX88 audio DACs
615 *
616 * GPIO[7] = input to CX88's audio/chroma ADC
617 * 0 = FM 10.7 MHz IF
618 * 1 = Sound 4.5 MHz IF
619 *
620 * GPIO[1,5,6] = Oren 51132 pins 27,35,28 respectively
621 *
622 * GPIO[16] = Remote control input
623 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700624 .input = {{
625 .type = CX88_VMUX_TELEVISION,
626 .vmux = 0,
627 .gpio0 = 0x00008484,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700628 },{
629 .type = CX88_VMUX_COMPOSITE1,
630 .vmux = 1,
631 .gpio0 = 0x00008400,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700632 },{
633 .type = CX88_VMUX_SVIDEO,
634 .vmux = 2,
635 .gpio0 = 0x00008400,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700636 }},
637 .radio = {
638 .type = CX88_RADIO,
Trent Piepho19dc74b2007-07-31 23:06:50 -0300639 .gpio0 = 0x00008404,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700640 },
Michael Krufky48d5e802006-09-25 14:09:10 -0300641 .mpeg = CX88_MPEG_DVB,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700642 },
643 [CX88_BOARD_HAUPPAUGE_ROSLYN] = {
644 // entry added by Kaustubh D. Bhalerao <bhalerao.1@osu.edu>
645 // GPIO values obtained from regspy, courtesy Sean Covel
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700646 .name = "Hauppauge WinTV 28xxx (Roslyn) models",
647 .tuner_type = UNSET,
648 .radio_type = UNSET,
649 .tuner_addr = ADDR_UNSET,
650 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700651 .input = {{
652 .type = CX88_VMUX_TELEVISION,
653 .vmux = 0,
Steven Toth0345c382006-01-09 15:25:17 -0200654 .gpio0 = 0xed1a,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700655 .gpio2 = 0x00ff,
656 },{
657 .type = CX88_VMUX_DEBUG,
658 .vmux = 0,
Steven Toth0345c382006-01-09 15:25:17 -0200659 .gpio0 = 0xff01,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700660 },{
661 .type = CX88_VMUX_COMPOSITE1,
662 .vmux = 1,
663 .gpio0 = 0xff02,
664 },{
665 .type = CX88_VMUX_SVIDEO,
666 .vmux = 2,
667 .gpio0 = 0xed92,
668 .gpio2 = 0x00ff,
669 }},
670 .radio = {
671 .type = CX88_RADIO,
672 .gpio0 = 0xed96,
673 .gpio2 = 0x00ff,
674 },
Michael Krufky48d5e802006-09-25 14:09:10 -0300675 .mpeg = CX88_MPEG_BLACKBIRD,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700676 },
677 [CX88_BOARD_DIGITALLOGIC_MEC] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700678 .name = "Digital-Logic MICROSPACE Entertainment Center (MEC)",
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700679 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
680 .radio_type = UNSET,
681 .tuner_addr = ADDR_UNSET,
682 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700683 .tda9887_conf = TDA9887_PRESENT,
684 .input = {{
685 .type = CX88_VMUX_TELEVISION,
686 .vmux = 0,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700687 .gpio0 = 0x00009d80,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300688 .audioroute = 1,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700689 },{
690 .type = CX88_VMUX_COMPOSITE1,
691 .vmux = 1,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700692 .gpio0 = 0x00009d76,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300693 .audioroute = 1,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700694 },{
695 .type = CX88_VMUX_SVIDEO,
696 .vmux = 2,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700697 .gpio0 = 0x00009d76,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300698 .audioroute = 1,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700699 }},
700 .radio = {
701 .type = CX88_RADIO,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700702 .gpio0 = 0x00009d00,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300703 .audioroute = 1,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700704 },
Michael Krufky48d5e802006-09-25 14:09:10 -0300705 .mpeg = CX88_MPEG_BLACKBIRD,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700706 },
707 [CX88_BOARD_IODATA_GVBCTV7E] = {
708 .name = "IODATA GV/BCTV7E",
709 .tuner_type = TUNER_PHILIPS_FQ1286,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700710 .radio_type = UNSET,
711 .tuner_addr = ADDR_UNSET,
712 .radio_addr = ADDR_UNSET,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700713 .tda9887_conf = TDA9887_PRESENT,
714 .input = {{
715 .type = CX88_VMUX_TELEVISION,
716 .vmux = 1,
717 .gpio1 = 0x0000e03f,
718 },{
719 .type = CX88_VMUX_COMPOSITE1,
720 .vmux = 2,
721 .gpio1 = 0x0000e07f,
722 },{
723 .type = CX88_VMUX_SVIDEO,
724 .vmux = 3,
725 .gpio1 = 0x0000e07f,
726 }}
727 },
Manuel Capinha239df2e2005-06-23 22:04:53 -0700728 [CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO] = {
729 .name = "PixelView PlayTV Ultra Pro (Stereo)",
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700730 /* May be also TUNER_YMEC_TVF_5533MF for NTSC/M or PAL/M */
731 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
Mauro Carvalho Chehabc5287ba2005-07-15 03:56:28 -0700732 .radio_type = UNSET,
733 .tuner_addr = ADDR_UNSET,
734 .radio_addr = ADDR_UNSET,
Manuel Capinha239df2e2005-06-23 22:04:53 -0700735 .input = {{
736 .type = CX88_VMUX_TELEVISION,
737 .vmux = 0,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700738 .gpio0 = 0xbf61, /* internal decoder */
Manuel Capinha239df2e2005-06-23 22:04:53 -0700739 },{
740 .type = CX88_VMUX_COMPOSITE1,
741 .vmux = 1,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700742 .gpio0 = 0xbf63,
Manuel Capinha239df2e2005-06-23 22:04:53 -0700743 },{
744 .type = CX88_VMUX_SVIDEO,
745 .vmux = 2,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700746 .gpio0 = 0xbf63,
Manuel Capinha239df2e2005-06-23 22:04:53 -0700747 }},
748 .radio = {
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700749 .type = CX88_RADIO,
750 .gpio0 = 0xbf60,
751 },
Manuel Capinha239df2e2005-06-23 22:04:53 -0700752 },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800753 [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T] = {
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -0700754 .name = "DViCO FusionHDTV 3 Gold-T",
Michael Krufky83ac87222006-01-09 15:25:29 -0200755 .tuner_type = TUNER_THOMSON_DTT761X,
Mauro Carvalho Chehabb45009b2005-06-23 22:05:03 -0700756 .radio_type = UNSET,
757 .tuner_addr = ADDR_UNSET,
758 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehabe4f5c82a2005-12-04 12:41:54 -0200759 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -0700760 .input = {{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800761 .type = CX88_VMUX_TELEVISION,
762 .vmux = 0,
763 .gpio0 = 0x97ed,
764 },{
765 .type = CX88_VMUX_COMPOSITE1,
766 .vmux = 1,
767 .gpio0 = 0x97e9,
768 },{
769 .type = CX88_VMUX_SVIDEO,
770 .vmux = 2,
771 .gpio0 = 0x97e9,
772 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300773 .mpeg = CX88_MPEG_DVB,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800774 },
775 [CX88_BOARD_ADSTECH_DVB_T_PCI] = {
776 .name = "ADS Tech Instant TV DVB-T PCI",
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -0700777 .tuner_type = TUNER_ABSENT,
778 .radio_type = UNSET,
779 .tuner_addr = ADDR_UNSET,
780 .radio_addr = ADDR_UNSET,
781 .input = {{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800782 .type = CX88_VMUX_COMPOSITE1,
783 .vmux = 1,
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -0700784 .gpio0 = 0x0700,
785 .gpio2 = 0x0101,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800786 },{
787 .type = CX88_VMUX_SVIDEO,
788 .vmux = 2,
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -0700789 .gpio0 = 0x0700,
790 .gpio2 = 0x0101,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800791 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300792 .mpeg = CX88_MPEG_DVB,
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -0700793 },
Michael Krufkye057ee12005-07-07 17:58:40 -0700794 [CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1] = {
795 .name = "TerraTec Cinergy 1400 DVB-T",
796 .tuner_type = TUNER_ABSENT,
797 .input = {{
798 .type = CX88_VMUX_DVB,
799 .vmux = 0,
Heiko Baums05eda242007-01-21 05:58:19 -0300800 },{
801 .type = CX88_VMUX_COMPOSITE1,
802 .vmux = 2,
803 },{
804 .type = CX88_VMUX_SVIDEO,
805 .vmux = 2,
Michael Krufkye057ee12005-07-07 17:58:40 -0700806 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300807 .mpeg = CX88_MPEG_DVB,
Michael Krufkye057ee12005-07-07 17:58:40 -0700808 },
Michael Krufky9fef07c2005-07-31 22:34:46 -0700809 [CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD] = {
810 .name = "DViCO FusionHDTV 5 Gold",
Michael Krufky9c26c8b2006-04-27 01:29:17 -0300811 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H062F */
Michael Krufky9fef07c2005-07-31 22:34:46 -0700812 .radio_type = UNSET,
813 .tuner_addr = ADDR_UNSET,
814 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehabe52e98a2005-09-09 13:03:41 -0700815 .tda9887_conf = TDA9887_PRESENT,
Michael Krufky9fef07c2005-07-31 22:34:46 -0700816 .input = {{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800817 .type = CX88_VMUX_TELEVISION,
818 .vmux = 0,
819 .gpio0 = 0x87fd,
820 },{
821 .type = CX88_VMUX_COMPOSITE1,
822 .vmux = 1,
823 .gpio0 = 0x87f9,
824 },{
825 .type = CX88_VMUX_SVIDEO,
826 .vmux = 2,
827 .gpio0 = 0x87f9,
828 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300829 .mpeg = CX88_MPEG_DVB,
Michael Krufky9fef07c2005-07-31 22:34:46 -0700830 },
Nickolay V. Shmyrevd45170e2005-11-08 21:36:15 -0800831 [CX88_BOARD_AVERMEDIA_ULTRATV_MC_550] = {
832 .name = "AverMedia UltraTV Media Center PCI 550",
833 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
834 .radio_type = UNSET,
835 .tuner_addr = ADDR_UNSET,
836 .radio_addr = ADDR_UNSET,
837 .tda9887_conf = TDA9887_PRESENT,
Nickolay V. Shmyrevd45170e2005-11-08 21:36:15 -0800838 .input = {{
839 .type = CX88_VMUX_COMPOSITE1,
840 .vmux = 0,
841 .gpio0 = 0x0000cd73,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300842 .audioroute = 1,
Nickolay V. Shmyrevd45170e2005-11-08 21:36:15 -0800843 },{
844 .type = CX88_VMUX_SVIDEO,
845 .vmux = 1,
846 .gpio0 = 0x0000cd73,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300847 .audioroute = 1,
Nickolay V. Shmyrevd45170e2005-11-08 21:36:15 -0800848 },{
849 .type = CX88_VMUX_TELEVISION,
850 .vmux = 3,
851 .gpio0 = 0x0000cdb3,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300852 .audioroute = 1,
Nickolay V. Shmyrevd45170e2005-11-08 21:36:15 -0800853 }},
854 .radio = {
855 .type = CX88_RADIO,
856 .vmux = 2,
857 .gpio0 = 0x0000cdf3,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -0300858 .audioroute = 1,
Nickolay V. Shmyrevd45170e2005-11-08 21:36:15 -0800859 },
Michael Krufky5b26c822006-10-16 16:07:51 -0300860 .mpeg = CX88_MPEG_BLACKBIRD,
Nickolay V. Shmyrevd45170e2005-11-08 21:36:15 -0800861 },
Alexander Wold0bcc37c2005-11-08 21:36:58 -0800862 [CX88_BOARD_KWORLD_VSTREAM_EXPERT_DVD] = {
863 /* Alexander Wold <awold@bigfoot.com> */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800864 .name = "Kworld V-Stream Xpert DVD",
865 .tuner_type = UNSET,
866 .input = {{
867 .type = CX88_VMUX_COMPOSITE1,
868 .vmux = 1,
869 .gpio0 = 0x03000000,
Alexander Wold0bcc37c2005-11-08 21:36:58 -0800870 .gpio1 = 0x01000000,
871 .gpio2 = 0x02000000,
872 .gpio3 = 0x00100000,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800873 },{
874 .type = CX88_VMUX_SVIDEO,
875 .vmux = 2,
876 .gpio0 = 0x03000000,
877 .gpio1 = 0x01000000,
878 .gpio2 = 0x02000000,
879 .gpio3 = 0x00100000,
880 }},
Alexander Wold0bcc37c2005-11-08 21:36:58 -0800881 },
Kirk Lapraye976f9372005-11-08 21:37:04 -0800882 [CX88_BOARD_ATI_HDTVWONDER] = {
883 .name = "ATI HDTV Wonder",
884 .tuner_type = TUNER_PHILIPS_TUV1236D,
885 .radio_type = UNSET,
886 .tuner_addr = ADDR_UNSET,
887 .radio_addr = ADDR_UNSET,
888 .input = {{
889 .type = CX88_VMUX_TELEVISION,
890 .vmux = 0,
891 .gpio0 = 0x00000ff7,
892 .gpio1 = 0x000000ff,
893 .gpio2 = 0x00000001,
894 .gpio3 = 0x00000000,
895 },{
896 .type = CX88_VMUX_COMPOSITE1,
897 .vmux = 1,
898 .gpio0 = 0x00000ffe,
899 .gpio1 = 0x000000ff,
900 .gpio2 = 0x00000001,
901 .gpio3 = 0x00000000,
902 },{
903 .type = CX88_VMUX_SVIDEO,
904 .vmux = 2,
905 .gpio0 = 0x00000ffe,
906 .gpio1 = 0x000000ff,
907 .gpio2 = 0x00000001,
908 .gpio3 = 0x00000000,
909 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300910 .mpeg = CX88_MPEG_DVB,
Kirk Lapraye976f9372005-11-08 21:37:04 -0800911 },
David Shirley2b5200a72005-11-08 21:37:22 -0800912 [CX88_BOARD_WINFAST_DTV1000] = {
913 .name = "WinFast DTV1000-T",
914 .tuner_type = TUNER_ABSENT,
915 .radio_type = UNSET,
916 .tuner_addr = ADDR_UNSET,
917 .radio_addr = ADDR_UNSET,
918 .input = {{
919 .type = CX88_VMUX_DVB,
920 .vmux = 0,
Jean Delvaree8f4e752007-03-31 10:34:59 -0300921 },{
922 .type = CX88_VMUX_COMPOSITE1,
923 .vmux = 1,
924 },{
925 .type = CX88_VMUX_SVIDEO,
926 .vmux = 2,
David Shirley2b5200a72005-11-08 21:37:22 -0800927 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300928 .mpeg = CX88_MPEG_DVB,
David Shirley2b5200a72005-11-08 21:37:22 -0800929 },
Lubomir Bulej7418f342005-11-08 21:38:34 -0800930 [CX88_BOARD_AVERTV_303] = {
931 .name = "AVerTV 303 (M126)",
932 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
933 .radio_type = UNSET,
934 .tuner_addr = ADDR_UNSET,
935 .radio_addr = ADDR_UNSET,
936 .tda9887_conf = TDA9887_PRESENT,
937 .input = {{
938 .type = CX88_VMUX_TELEVISION,
939 .vmux = 0,
940 .gpio0 = 0x00ff,
941 .gpio1 = 0xe09f,
942 .gpio2 = 0x0010,
943 .gpio3 = 0x0000,
944 },{
945 .type = CX88_VMUX_COMPOSITE1,
946 .vmux = 1,
947 .gpio0 = 0x00ff,
948 .gpio1 = 0xe05f,
949 .gpio2 = 0x0010,
950 .gpio3 = 0x0000,
951 },{
952 .type = CX88_VMUX_SVIDEO,
953 .vmux = 2,
954 .gpio0 = 0x00ff,
955 .gpio1 = 0xe05f,
956 .gpio2 = 0x0010,
957 .gpio3 = 0x0000,
958 }},
959 },
Steven Toth0fa14aa2006-01-09 15:25:02 -0200960 [CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1] = {
961 .name = "Hauppauge Nova-S-Plus DVB-S",
962 .tuner_type = TUNER_ABSENT,
963 .radio_type = UNSET,
964 .tuner_addr = ADDR_UNSET,
965 .radio_addr = ADDR_UNSET,
Steven Toth0fa14aa2006-01-09 15:25:02 -0200966 .input = {{
967 .type = CX88_VMUX_DVB,
968 .vmux = 0,
969 },{
970 .type = CX88_VMUX_COMPOSITE1,
971 .vmux = 1,
972 },{
973 .type = CX88_VMUX_SVIDEO,
974 .vmux = 2,
975 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300976 .mpeg = CX88_MPEG_DVB,
Steven Toth0fa14aa2006-01-09 15:25:02 -0200977 },
978 [CX88_BOARD_HAUPPAUGE_NOVASE2_S1] = {
979 .name = "Hauppauge Nova-SE2 DVB-S",
980 .tuner_type = TUNER_ABSENT,
981 .radio_type = UNSET,
982 .tuner_addr = ADDR_UNSET,
983 .radio_addr = ADDR_UNSET,
984 .input = {{
985 .type = CX88_VMUX_DVB,
986 .vmux = 0,
987 }},
Michael Krufky48d5e802006-09-25 14:09:10 -0300988 .mpeg = CX88_MPEG_DVB,
Steven Toth0fa14aa2006-01-09 15:25:02 -0200989 },
Vadim Catana0e0351e2006-01-09 15:25:02 -0200990 [CX88_BOARD_KWORLD_DVBS_100] = {
991 .name = "KWorld DVB-S 100",
992 .tuner_type = TUNER_ABSENT,
993 .radio_type = UNSET,
994 .tuner_addr = ADDR_UNSET,
995 .radio_addr = ADDR_UNSET,
996 .input = {{
997 .type = CX88_VMUX_DVB,
998 .vmux = 0,
999 },{
1000 .type = CX88_VMUX_COMPOSITE1,
1001 .vmux = 1,
1002 },{
1003 .type = CX88_VMUX_SVIDEO,
1004 .vmux = 2,
1005 }},
Michael Krufky48d5e802006-09-25 14:09:10 -03001006 .mpeg = CX88_MPEG_DVB,
Vadim Catana0e0351e2006-01-09 15:25:02 -02001007 },
Steven Toth611900c2006-01-09 15:25:12 -02001008 [CX88_BOARD_HAUPPAUGE_HVR1100] = {
1009 .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid",
1010 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1011 .radio_type = UNSET,
1012 .tuner_addr = ADDR_UNSET,
1013 .radio_addr = ADDR_UNSET,
1014 .tda9887_conf = TDA9887_PRESENT,
1015 .input = {{
1016 .type = CX88_VMUX_TELEVISION,
1017 .vmux = 0,
1018 },{
1019 .type = CX88_VMUX_COMPOSITE1,
1020 .vmux = 1,
1021 },{
1022 .type = CX88_VMUX_SVIDEO,
1023 .vmux = 2,
1024 }},
1025 /* fixme: Add radio support */
Michael Krufky48d5e802006-09-25 14:09:10 -03001026 .mpeg = CX88_MPEG_DVB,
Steven Toth611900c2006-01-09 15:25:12 -02001027 },
1028 [CX88_BOARD_HAUPPAUGE_HVR1100LP] = {
1029 .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid (Low Profile)",
1030 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1031 .radio_type = UNSET,
1032 .tuner_addr = ADDR_UNSET,
1033 .radio_addr = ADDR_UNSET,
1034 .tda9887_conf = TDA9887_PRESENT,
1035 .input = {{
1036 .type = CX88_VMUX_TELEVISION,
1037 .vmux = 0,
1038 },{
1039 .type = CX88_VMUX_COMPOSITE1,
1040 .vmux = 1,
1041 }},
1042 /* fixme: Add radio support */
Michael Krufky48d5e802006-09-25 14:09:10 -03001043 .mpeg = CX88_MPEG_DVB,
Steven Toth611900c2006-01-09 15:25:12 -02001044 },
Chris Pascoefc40b262006-01-09 15:25:35 -02001045 [CX88_BOARD_DNTV_LIVE_DVB_T_PRO] = {
1046 .name = "digitalnow DNTV Live! DVB-T Pro",
1047 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1048 .radio_type = UNSET,
1049 .tuner_addr = ADDR_UNSET,
1050 .radio_addr = ADDR_UNSET,
1051 .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |
1052 TDA9887_PORT2_ACTIVE,
1053 .input = {{
1054 .type = CX88_VMUX_TELEVISION,
1055 .vmux = 0,
1056 .gpio0 = 0xf80808,
1057 },{
1058 .type = CX88_VMUX_COMPOSITE1,
1059 .vmux = 1,
1060 .gpio0 = 0xf80808,
1061 },{
1062 .type = CX88_VMUX_SVIDEO,
1063 .vmux = 2,
1064 .gpio0 = 0xf80808,
1065 }},
1066 .radio = {
1067 .type = CX88_RADIO,
1068 .gpio0 = 0xf80808,
1069 },
Michael Krufky48d5e802006-09-25 14:09:10 -03001070 .mpeg = CX88_MPEG_DVB,
Chris Pascoefc40b262006-01-09 15:25:35 -02001071 },
Manenti Marcof39624f2006-01-09 15:32:45 -02001072 [CX88_BOARD_KWORLD_DVB_T_CX22702] = {
1073 /* Kworld V-stream Xpert DVB-T with Thomson tuner */
1074 /* DTT 7579 Conexant CX22702-19 Conexant CX2388x */
1075 /* Manenti Marco <marco_manenti@colman.it> */
1076 .name = "KWorld/VStream XPert DVB-T with cx22702",
1077 .tuner_type = TUNER_ABSENT,
1078 .radio_type = UNSET,
1079 .tuner_addr = ADDR_UNSET,
1080 .radio_addr = ADDR_UNSET,
1081 .input = {{
1082 .type = CX88_VMUX_COMPOSITE1,
1083 .vmux = 1,
1084 .gpio0 = 0x0700,
1085 .gpio2 = 0x0101,
1086 },{
1087 .type = CX88_VMUX_SVIDEO,
1088 .vmux = 2,
1089 .gpio0 = 0x0700,
1090 .gpio2 = 0x0101,
1091 }},
Michael Krufky48d5e802006-09-25 14:09:10 -03001092 .mpeg = CX88_MPEG_DVB,
Manenti Marcof39624f2006-01-09 15:32:45 -02001093 },
Chris Pascoe43eabb42006-01-09 18:21:28 -02001094 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL] = {
1095 .name = "DViCO FusionHDTV DVB-T Dual Digital",
1096 .tuner_type = TUNER_ABSENT, /* No analog tuner */
1097 .radio_type = UNSET,
1098 .tuner_addr = ADDR_UNSET,
1099 .radio_addr = ADDR_UNSET,
1100 .input = {{
1101 .type = CX88_VMUX_COMPOSITE1,
1102 .vmux = 1,
Chris Pascoed536e9c2006-08-10 03:22:21 -03001103 .gpio0 = 0x000067df,
Chris Pascoe43eabb42006-01-09 18:21:28 -02001104 },{
1105 .type = CX88_VMUX_SVIDEO,
1106 .vmux = 2,
Chris Pascoed536e9c2006-08-10 03:22:21 -03001107 .gpio0 = 0x000067df,
Chris Pascoe43eabb42006-01-09 18:21:28 -02001108 }},
Michael Krufky48d5e802006-09-25 14:09:10 -03001109 .mpeg = CX88_MPEG_DVB,
Chris Pascoe43eabb42006-01-09 18:21:28 -02001110 },
Michael Krufky44256de2006-02-07 06:49:14 -02001111 [CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT] = {
Michael Krufky44256de2006-02-07 06:49:14 -02001112 .name = "KWorld HardwareMpegTV XPert",
1113 .tuner_type = TUNER_PHILIPS_TDA8290,
1114 .radio_type = UNSET,
1115 .tuner_addr = ADDR_UNSET,
1116 .radio_addr = ADDR_UNSET,
1117 .input = {{
1118 .type = CX88_VMUX_TELEVISION,
1119 .vmux = 0,
Michael Krufkye2798212006-02-27 00:07:58 -03001120 .gpio0 = 0x3de2,
Michael Krufky24da4e42006-02-27 00:08:01 -03001121 .gpio2 = 0x00ff,
Michael Krufkybc53f782006-05-28 01:43:35 -03001122 },{
1123 .type = CX88_VMUX_COMPOSITE1,
1124 .vmux = 1,
1125 .gpio0 = 0x3de6,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -03001126 .audioroute = 1,
Michael Krufkybc53f782006-05-28 01:43:35 -03001127 },{
1128 .type = CX88_VMUX_SVIDEO,
1129 .vmux = 2,
1130 .gpio0 = 0x3de6,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -03001131 .audioroute = 1,
Michael Krufky44256de2006-02-07 06:49:14 -02001132 }},
Michael Krufkye2798212006-02-27 00:07:58 -03001133 .radio = {
1134 .type = CX88_RADIO,
1135 .gpio0 = 0x3de6,
Michael Krufky24da4e42006-02-27 00:08:01 -03001136 .gpio2 = 0x00ff,
Michael Krufkye2798212006-02-27 00:07:58 -03001137 },
Michael Krufky48d5e802006-09-25 14:09:10 -03001138 .mpeg = CX88_MPEG_BLACKBIRD,
Michael Krufky44256de2006-02-07 06:49:14 -02001139 },
Chris Pascoe780dfef2006-02-28 08:34:59 -03001140 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID] = {
1141 .name = "DViCO FusionHDTV DVB-T Hybrid",
Michael Krufky91ae3292006-03-01 00:04:42 -03001142 .tuner_type = TUNER_THOMSON_FE6600,
Chris Pascoe780dfef2006-02-28 08:34:59 -03001143 .radio_type = UNSET,
1144 .tuner_addr = ADDR_UNSET,
1145 .radio_addr = ADDR_UNSET,
1146 .input = {{
1147 .type = CX88_VMUX_TELEVISION,
1148 .vmux = 0,
1149 .gpio0 = 0x0000a75f,
1150 },{
1151 .type = CX88_VMUX_COMPOSITE1,
1152 .vmux = 1,
1153 .gpio0 = 0x0000a75b,
1154 },{
1155 .type = CX88_VMUX_SVIDEO,
1156 .vmux = 2,
1157 .gpio0 = 0x0000a75b,
1158 }},
Michael Krufky48d5e802006-09-25 14:09:10 -03001159 .mpeg = CX88_MPEG_DVB,
Chris Pascoe780dfef2006-02-28 08:34:59 -03001160 },
Michael Krufkye142e7c2006-04-07 03:24:54 -03001161 [CX88_BOARD_PCHDTV_HD5500] = {
1162 .name = "pcHDTV HD5500 HDTV",
Michael Krufky9c26c8b2006-04-27 01:29:17 -03001163 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
Michael Krufkye142e7c2006-04-07 03:24:54 -03001164 .radio_type = UNSET,
1165 .tuner_addr = ADDR_UNSET,
1166 .radio_addr = ADDR_UNSET,
1167 .tda9887_conf = TDA9887_PRESENT,
1168 .input = {{
1169 .type = CX88_VMUX_TELEVISION,
1170 .vmux = 0,
1171 .gpio0 = 0x87fd,
1172 },{
1173 .type = CX88_VMUX_COMPOSITE1,
1174 .vmux = 1,
1175 .gpio0 = 0x87f9,
1176 },{
1177 .type = CX88_VMUX_SVIDEO,
1178 .vmux = 2,
1179 .gpio0 = 0x87f9,
1180 }},
Michael Krufky48d5e802006-09-25 14:09:10 -03001181 .mpeg = CX88_MPEG_DVB,
Michael Krufkye142e7c2006-04-07 03:24:54 -03001182 },
Valentin Zagurab3038302006-04-13 12:41:43 -03001183 [CX88_BOARD_KWORLD_MCE200_DELUXE] = {
1184 /* FIXME: tested TV input only, disabled composite,
1185 svideo and radio until they can be tested also. */
1186 .name = "Kworld MCE 200 Deluxe",
1187 .tuner_type = TUNER_TENA_9533_DI,
1188 .radio_type = UNSET,
1189 .tda9887_conf = TDA9887_PRESENT,
1190 .tuner_addr = ADDR_UNSET,
1191 .radio_addr = ADDR_UNSET,
1192 .input = {{
1193 .type = CX88_VMUX_TELEVISION,
1194 .vmux = 0,
1195 .gpio0 = 0x0000BDE6
1196 }},
Michael Krufky48d5e802006-09-25 14:09:10 -03001197 .mpeg = CX88_MPEG_BLACKBIRD,
Valentin Zagurab3038302006-04-13 12:41:43 -03001198 },
Angelo Marconia3124622006-05-09 18:27:48 -03001199 [CX88_BOARD_PIXELVIEW_PLAYTV_P7000] = {
1200 /* FIXME: SVideo, Composite and FM inputs are untested */
1201 .name = "PixelView PlayTV P7000",
1202 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
1203 .radio_type = UNSET,
1204 .tuner_addr = ADDR_UNSET,
1205 .radio_addr = ADDR_UNSET,
1206 .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |
1207 TDA9887_PORT2_ACTIVE,
1208 .input = {{
1209 .type = CX88_VMUX_TELEVISION,
1210 .vmux = 0,
1211 .gpio0 = 0x5da6,
1212 }},
Michael Krufky48d5e802006-09-25 14:09:10 -03001213 .mpeg = CX88_MPEG_BLACKBIRD,
Angelo Marconia3124622006-05-09 18:27:48 -03001214 },
Ricardo Cerqueirabe4f4512006-06-08 17:36:17 -03001215 [CX88_BOARD_NPGTECH_REALTV_TOP10FM] = {
1216 .name = "NPG Tech Real TV FM Top 10",
1217 .tuner_type = TUNER_TNF_5335MF, /* Actually a TNF9535 */
Ricardo Cerqueira680543c2006-05-22 07:44:02 -03001218 .radio_type = UNSET,
1219 .tuner_addr = ADDR_UNSET,
1220 .radio_addr = ADDR_UNSET,
1221 .input = {{
1222 .type = CX88_VMUX_TELEVISION,
1223 .vmux = 0,
1224 .gpio0 = 0x0788,
1225 },{
1226 .type = CX88_VMUX_COMPOSITE1,
1227 .vmux = 1,
1228 .gpio0 = 0x078b,
1229 },{
1230 .type = CX88_VMUX_SVIDEO,
1231 .vmux = 2,
Ricardo Cerqueirabe4f4512006-06-08 17:36:17 -03001232 .gpio0 = 0x078b,
Ricardo Cerqueira680543c2006-05-22 07:44:02 -03001233 }},
1234 .radio = {
1235 .type = CX88_RADIO,
1236 .gpio0 = 0x074a,
1237 },
1238 },
Malcolm Valentine4bd6e9d2006-05-29 13:51:59 -03001239 [CX88_BOARD_WINFAST_DTV2000H] = {
1240 /* video inputs and radio still in testing */
1241 .name = "WinFast DTV2000 H",
1242 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1243 .radio_type = UNSET,
1244 .tuner_addr = ADDR_UNSET,
1245 .radio_addr = ADDR_UNSET,
1246 .tda9887_conf = TDA9887_PRESENT,
1247 .input = {{
1248 .type = CX88_VMUX_TELEVISION,
1249 .vmux = 0,
1250 .gpio0 = 0x00017304,
1251 .gpio1 = 0x00008203,
1252 .gpio2 = 0x00017304,
1253 .gpio3 = 0x02000000,
1254 }},
Michael Krufky48d5e802006-09-25 14:09:10 -03001255 .mpeg = CX88_MPEG_DVB,
Malcolm Valentine4bd6e9d2006-05-29 13:51:59 -03001256 },
Saqeb Akhterc02a34f2006-06-29 20:29:33 -03001257 [CX88_BOARD_GENIATECH_DVBS] = {
1258 .name = "Geniatech DVB-S",
1259 .tuner_type = TUNER_ABSENT,
1260 .radio_type = UNSET,
1261 .tuner_addr = ADDR_UNSET,
1262 .radio_addr = ADDR_UNSET,
1263 .input = {{
1264 .type = CX88_VMUX_DVB,
1265 .vmux = 0,
1266 },{
1267 .type = CX88_VMUX_COMPOSITE1,
1268 .vmux = 1,
1269 }},
Michael Krufky48d5e802006-09-25 14:09:10 -03001270 .mpeg = CX88_MPEG_DVB,
Saqeb Akhterc02a34f2006-06-29 20:29:33 -03001271 },
Eric Thomasad10c932006-08-08 09:10:04 -03001272 [CX88_BOARD_HAUPPAUGE_HVR3000] = {
1273 /* FIXME: Add dvb & radio support */
1274 .name = "Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DVB-T",
1275 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1276 .radio_type = UNSET,
1277 .tuner_addr = ADDR_UNSET,
1278 .radio_addr = ADDR_UNSET,
1279 .tda9887_conf = TDA9887_PRESENT,
1280 .input = {{
1281 .type = CX88_VMUX_TELEVISION,
1282 .vmux = 0,
1283 .gpio0 = 0x84bf,
1284 },{
1285 .type = CX88_VMUX_COMPOSITE1,
1286 .vmux = 1,
1287 .gpio0 = 0x84bf,
1288 },{
1289 .type = CX88_VMUX_SVIDEO,
1290 .vmux = 2,
1291 .gpio0 = 0x84bf,
1292 }},
Steven Toth76dc82a2006-09-30 00:43:58 -03001293 .mpeg = CX88_MPEG_DVB,
Eric Thomasad10c932006-08-08 09:10:04 -03001294 },
Peter Naullsd1009bd2006-08-08 09:10:05 -03001295 [CX88_BOARD_NORWOOD_MICRO] = {
1296 .name = "Norwood Micro TV Tuner",
1297 .tuner_type = TUNER_TNF_5335MF,
1298 .radio_type = UNSET,
1299 .tuner_addr = ADDR_UNSET,
1300 .radio_addr = ADDR_UNSET,
1301 .input = {{
1302 .type = CX88_VMUX_TELEVISION,
1303 .vmux = 0,
1304 .gpio0 = 0x0709,
1305 },{
1306 .type = CX88_VMUX_COMPOSITE1,
1307 .vmux = 1,
1308 .gpio0 = 0x070b,
1309 },{
1310 .type = CX88_VMUX_SVIDEO,
1311 .vmux = 2,
1312 .gpio0 = 0x070b,
1313 }},
1314 },
Michael Krufky5b26c822006-10-16 16:07:51 -03001315 [CX88_BOARD_TE_DTV_250_OEM_SWANN] = {
1316 .name = "Shenzhen Tungsten Ages Tech TE-DTV-250 / Swann OEM",
1317 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
1318 .radio_type = UNSET,
1319 .tuner_addr = ADDR_UNSET,
1320 .radio_addr = ADDR_UNSET,
1321 .input = {{
1322 .type = CX88_VMUX_TELEVISION,
1323 .vmux = 0,
1324 .gpio0 = 0x003fffff,
1325 .gpio1 = 0x00e00000,
1326 .gpio2 = 0x003fffff,
1327 .gpio3 = 0x02000000,
David Bussenschutt2acadef2006-08-08 09:10:05 -03001328 },{
Michael Krufky5b26c822006-10-16 16:07:51 -03001329 .type = CX88_VMUX_COMPOSITE1,
1330 .vmux = 1,
1331 .gpio0 = 0x003fffff,
1332 .gpio1 = 0x00e00000,
1333 .gpio2 = 0x003fffff,
1334 .gpio3 = 0x02000000,
1335 },{
1336 .type = CX88_VMUX_SVIDEO,
1337 .vmux = 2,
1338 .gpio0 = 0x003fffff,
1339 .gpio1 = 0x00e00000,
1340 .gpio2 = 0x003fffff,
1341 .gpio3 = 0x02000000,
1342 }},
1343 },
Steven Tothaa481a62006-09-14 15:41:13 -03001344 [CX88_BOARD_HAUPPAUGE_HVR1300] = {
1345 .name = "Hauppauge WinTV-HVR1300 DVB-T/Hybrid MPEG Encoder",
1346 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1347 .radio_type = UNSET,
1348 .tuner_addr = ADDR_UNSET,
1349 .radio_addr = ADDR_UNSET,
1350 .tda9887_conf = TDA9887_PRESENT,
Hans Verkuil38f9d302008-07-23 05:09:15 -03001351 .audio_chip = V4L2_IDENT_WM8775,
Steven Toth2491fbb2008-09-22 01:48:13 -03001352 /*
1353 * gpio0 as reported by Mike Crash <mike AT mikecrash.com>
1354 */
Steven Tothaa481a62006-09-14 15:41:13 -03001355 .input = {{
1356 .type = CX88_VMUX_TELEVISION,
1357 .vmux = 0,
Steven Toth2491fbb2008-09-22 01:48:13 -03001358 .gpio0 = 0xef88,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -03001359 .audioroute = 1,
Steven Tothaa481a62006-09-14 15:41:13 -03001360 },{
1361 .type = CX88_VMUX_COMPOSITE1,
1362 .vmux = 1,
Steven Toth2491fbb2008-09-22 01:48:13 -03001363 .gpio0 = 0xef88,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -03001364 .audioroute = 2,
Steven Tothaa481a62006-09-14 15:41:13 -03001365 },{
1366 .type = CX88_VMUX_SVIDEO,
1367 .vmux = 2,
Steven Toth2491fbb2008-09-22 01:48:13 -03001368 .gpio0 = 0xef88,
Ricardo Cerqueira7b27d452007-09-30 13:02:49 -03001369 .audioroute = 2,
Steven Tothaa481a62006-09-14 15:41:13 -03001370 }},
1371 /* fixme: Add radio support */
Steven Toth6c5be742006-12-02 21:15:51 -02001372 .mpeg = CX88_MPEG_DVB | CX88_MPEG_BLACKBIRD,
Steven Toth6b92b3b2008-04-05 16:45:57 -03001373 .radio = {
1374 .type = CX88_RADIO,
Steven Toth2491fbb2008-09-22 01:48:13 -03001375 .gpio0 = 0xef88,
Steven Toth6b92b3b2008-04-05 16:45:57 -03001376 },
Steven Tothaa481a62006-09-14 15:41:13 -03001377 },
Daniel Gimpelevich7cb47a142007-05-17 18:10:17 -03001378 [CX88_BOARD_ADSTECH_PTV_390] = {
1379 .name = "ADS Tech Instant Video PCI",
1380 .tuner_type = TUNER_ABSENT,
1381 .radio_type = UNSET,
1382 .tuner_addr = ADDR_UNSET,
1383 .radio_addr = ADDR_UNSET,
1384 .input = {{
1385 .type = CX88_VMUX_DEBUG,
1386 .vmux = 3,
1387 .gpio0 = 0x04ff,
1388 },{
1389 .type = CX88_VMUX_COMPOSITE1,
1390 .vmux = 1,
1391 .gpio0 = 0x07fa,
1392 },{
1393 .type = CX88_VMUX_SVIDEO,
1394 .vmux = 2,
1395 .gpio0 = 0x07fa,
1396 }},
1397 },
Steven Toth60464da2008-01-05 16:53:01 -03001398 [CX88_BOARD_PINNACLE_PCTV_HD_800i] = {
1399 .name = "Pinnacle PCTV HD 800i",
1400 .tuner_type = TUNER_XC5000,
1401 .radio_type = UNSET,
1402 .tuner_addr = ADDR_UNSET,
1403 .radio_addr = ADDR_UNSET,
1404 .input = {{
1405 .type = CX88_VMUX_TELEVISION,
1406 .vmux = 0,
1407 .gpio0 = 0x04fb,
1408 .gpio1 = 0x10ff,
1409 },{
1410 .type = CX88_VMUX_COMPOSITE1,
1411 .vmux = 1,
1412 .gpio0 = 0x04fb,
1413 .gpio1 = 0x10ef,
1414 .audioroute = 1,
1415 },{
1416 .type = CX88_VMUX_SVIDEO,
1417 .vmux = 2,
1418 .gpio0 = 0x04fb,
1419 .gpio1 = 0x10ef,
1420 .audioroute = 1,
1421 }},
1422 .mpeg = CX88_MPEG_DVB,
1423 },
Steven Toth5c00fac2008-04-22 14:45:14 -03001424 [CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO] = {
Michael Krufky8efd2e22008-04-22 14:45:14 -03001425 .name = "DViCO FusionHDTV 5 PCI nano",
1426 /* xc3008 tuner, digital only for now */
Steven Toth5c00fac2008-04-22 14:45:14 -03001427 .tuner_type = TUNER_ABSENT,
1428 .radio_type = UNSET,
1429 .tuner_addr = ADDR_UNSET,
1430 .radio_addr = ADDR_UNSET,
1431 .input = {{
1432 .type = CX88_VMUX_TELEVISION,
1433 .vmux = 0,
1434 .gpio0 = 0x000027df, /* Unconfirmed */
1435 }, {
1436 .type = CX88_VMUX_COMPOSITE1,
1437 .vmux = 1,
1438 .gpio0 = 0x000027df, /* Unconfirmed */
1439 .audioroute = 1,
1440 }, {
1441 .type = CX88_VMUX_SVIDEO,
1442 .vmux = 2,
1443 .gpio0 = 0x000027df, /* Unconfirmed */
1444 .audioroute = 1,
1445 } },
1446 .mpeg = CX88_MPEG_DVB,
1447 },
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03001448 [CX88_BOARD_PINNACLE_HYBRID_PCTV] = {
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001449 .name = "Pinnacle Hybrid PCTV",
1450 .tuner_type = TUNER_XC2028,
1451 .tuner_addr = 0x61,
Stéphane Voltz3f6014f2008-09-05 14:33:54 -03001452 .radio_type = TUNER_XC2028,
1453 .radio_addr = 0x61,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001454 .input = { {
1455 .type = CX88_VMUX_TELEVISION,
1456 .vmux = 0,
Stéphane Voltz3f6014f2008-09-05 14:33:54 -03001457 .gpio0 = 0x004ff,
1458 .gpio1 = 0x010ff,
1459 .gpio2 = 0x00001,
Chris Pascoeb3fb91d2008-04-22 14:45:15 -03001460 }, {
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001461 .type = CX88_VMUX_COMPOSITE1,
1462 .vmux = 1,
Stéphane Voltz3f6014f2008-09-05 14:33:54 -03001463 .gpio0 = 0x004fb,
1464 .gpio1 = 0x010ef,
1465 .audioroute = 1,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001466 }, {
1467 .type = CX88_VMUX_SVIDEO,
1468 .vmux = 2,
Stéphane Voltz3f6014f2008-09-05 14:33:54 -03001469 .gpio0 = 0x004fb,
1470 .gpio1 = 0x010ef,
1471 .audioroute = 1,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001472 } },
1473 .radio = {
1474 .type = CX88_RADIO,
1475 .gpio0 = 0x004ff,
1476 .gpio1 = 0x010ff,
1477 .gpio2 = 0x0ff,
1478 },
Stéphane Voltz3f6014f2008-09-05 14:33:54 -03001479 .mpeg = CX88_MPEG_DVB,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001480 },
1481 [CX88_BOARD_WINFAST_TV2000_XP_GLOBAL] = {
1482 .name = "Winfast TV2000 XP Global",
1483 .tuner_type = TUNER_XC2028,
1484 .tuner_addr = 0x61,
1485 .input = { {
1486 .type = CX88_VMUX_TELEVISION,
1487 .vmux = 0,
1488 .gpio0 = 0x0400, /* pin 2:mute = 0 (off?) */
1489 .gpio1 = 0x0000,
1490 .gpio2 = 0x0800, /* pin 19:audio = 0 (tv) */
1491
1492 }, {
1493 .type = CX88_VMUX_COMPOSITE1,
1494 .vmux = 1,
1495 .gpio0 = 0x0400, /* probably? or 0x0404 to turn mute on */
1496 .gpio1 = 0x0000,
1497 .gpio2 = 0x0808, /* pin 19:audio = 1 (line) */
1498
1499 }, {
1500 .type = CX88_VMUX_SVIDEO,
1501 .vmux = 2,
1502 } },
1503 .radio = {
1504 .type = CX88_RADIO,
1505 .gpio0 = 0x004ff,
1506 .gpio1 = 0x010ff,
1507 .gpio2 = 0x0ff,
1508 },
1509 },
1510 [CX88_BOARD_POWERCOLOR_REAL_ANGEL] = {
Daniel Gimpelevicha9606ce2008-06-03 21:29:45 -03001511 .name = "PowerColor RA330", /* Long names may confuse LIRC. */
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001512 .tuner_type = TUNER_XC2028,
1513 .tuner_addr = 0x61,
1514 .input = { {
Daniel Gimpelevicha9606ce2008-06-03 21:29:45 -03001515 .type = CX88_VMUX_DEBUG,
1516 .vmux = 3, /* Due to the way the cx88 driver is written, */
1517 .gpio0 = 0x00ff, /* there is no way to deactivate audio pass- */
1518 .gpio1 = 0xf39d, /* through without this entry. Furthermore, if */
1519 .gpio3 = 0x0000, /* the TV mux entry is first, you get audio */
1520 }, { /* from the tuner on boot for a little while. */
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001521 .type = CX88_VMUX_TELEVISION,
1522 .vmux = 0,
Dâniel Fragaab364982008-04-08 19:54:49 -03001523 .gpio0 = 0x00ff,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001524 .gpio1 = 0xf35d,
Dâniel Fragaab364982008-04-08 19:54:49 -03001525 .gpio3 = 0x0000,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001526 }, {
1527 .type = CX88_VMUX_COMPOSITE1,
1528 .vmux = 1,
Dâniel Fragaab364982008-04-08 19:54:49 -03001529 .gpio0 = 0x00ff,
1530 .gpio1 = 0xf37d,
1531 .gpio3 = 0x0000,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001532 }, {
1533 .type = CX88_VMUX_SVIDEO,
1534 .vmux = 2,
1535 .gpio0 = 0x000ff,
1536 .gpio1 = 0x0f37d,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001537 .gpio3 = 0x00000,
1538 } },
1539 .radio = {
1540 .type = CX88_RADIO,
1541 .gpio0 = 0x000ff,
1542 .gpio1 = 0x0f35d,
Mauro Carvalho Chehab000e27a2008-04-22 14:45:46 -03001543 .gpio3 = 0x00000,
1544 },
1545 },
1546 [CX88_BOARD_GENIATECH_X8000_MT] = {
1547 /* Also PowerColor Real Angel 330 and Geniatech X800 OEM */
1548 .name = "Geniatech X8000-MT DVBT",
1549 .tuner_type = TUNER_XC2028,
1550 .tuner_addr = 0x61,
1551 .input = { {
1552 .type = CX88_VMUX_TELEVISION,
1553 .vmux = 0,
1554 .gpio0 = 0x00000000,
1555 .gpio1 = 0x00e3e341,
1556 .gpio2 = 0x00000000,
1557 .gpio3 = 0x00000000,
1558 }, {
1559 .type = CX88_VMUX_COMPOSITE1,
1560 .vmux = 1,
1561 .gpio0 = 0x00000000,
1562 .gpio1 = 0x00e3e361,
1563 .gpio2 = 0x00000000,
1564 .gpio3 = 0x00000000,
1565 }, {
1566 .type = CX88_VMUX_SVIDEO,
1567 .vmux = 2,
1568 .gpio0 = 0x00000000,
1569 .gpio1 = 0x00e3e361,
1570 .gpio2 = 0x00000000,
1571 .gpio3 = 0x00000000,
1572 } },
1573 .radio = {
1574 .type = CX88_RADIO,
1575 .gpio0 = 0x00000000,
1576 .gpio1 = 0x00e3e341,
1577 .gpio2 = 0x00000000,
1578 .gpio3 = 0x00000000,
1579 },
1580 .mpeg = CX88_MPEG_DVB,
1581 },
1582 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO] = {
1583 .name = "DViCO FusionHDTV DVB-T PRO",
1584 .tuner_type = TUNER_ABSENT, /* XXX: Has XC3028 */
1585 .radio_type = UNSET,
1586 .tuner_addr = ADDR_UNSET,
1587 .radio_addr = ADDR_UNSET,
1588 .input = { {
1589 .type = CX88_VMUX_COMPOSITE1,
1590 .vmux = 1,
1591 .gpio0 = 0x000067df,
1592 }, {
1593 .type = CX88_VMUX_SVIDEO,
1594 .vmux = 2,
1595 .gpio0 = 0x000067df,
1596 } },
1597 .mpeg = CX88_MPEG_DVB,
1598 },
Steven Toth1117d6b2008-04-22 14:45:34 -03001599 [CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD] = {
Michael Krufky76464d42008-04-22 14:45:35 -03001600 .name = "DViCO FusionHDTV 7 Gold",
Steven Toth1117d6b2008-04-22 14:45:34 -03001601 .tuner_type = TUNER_XC5000,
1602 .radio_type = UNSET,
1603 .tuner_addr = ADDR_UNSET,
1604 .radio_addr = ADDR_UNSET,
1605 .input = {{
1606 .type = CX88_VMUX_TELEVISION,
1607 .vmux = 0,
Michael Krufky76464d42008-04-22 14:45:35 -03001608 .gpio0 = 0x10df,
Steven Toth1117d6b2008-04-22 14:45:34 -03001609 },{
1610 .type = CX88_VMUX_COMPOSITE1,
1611 .vmux = 1,
Michael Krufky76464d42008-04-22 14:45:35 -03001612 .gpio0 = 0x16d9,
Steven Toth1117d6b2008-04-22 14:45:34 -03001613 },{
1614 .type = CX88_VMUX_SVIDEO,
1615 .vmux = 2,
Michael Krufky76464d42008-04-22 14:45:35 -03001616 .gpio0 = 0x16d9,
Steven Toth1117d6b2008-04-22 14:45:34 -03001617 }},
Steven Tothd893d5d2008-04-25 03:46:43 -03001618 .mpeg = CX88_MPEG_DVB,
Steven Toth1117d6b2008-04-22 14:45:34 -03001619 },
Mauro Carvalho Chehab2422a9b2008-04-22 14:46:00 -03001620 [CX88_BOARD_PROLINK_PV_8000GT] = {
1621 .name = "Prolink Pixelview MPEG 8000GT",
1622 .tuner_type = TUNER_XC2028,
1623 .tuner_addr = 0x61,
1624 .input = { {
1625 .type = CX88_VMUX_TELEVISION,
1626 .vmux = 0,
1627 .gpio0 = 0x0ff,
1628 .gpio2 = 0x0cfb,
1629 }, {
1630 .type = CX88_VMUX_COMPOSITE1,
1631 .vmux = 1,
1632 .gpio2 = 0x0cfb,
1633 }, {
1634 .type = CX88_VMUX_SVIDEO,
1635 .vmux = 2,
1636 .gpio2 = 0x0cfb,
1637 } },
1638 .radio = {
1639 .type = CX88_RADIO,
1640 .gpio2 = 0x0cfb,
1641 },
1642 },
Mauro Carvalho Chehaba31d2bb2008-09-29 12:08:29 -03001643 [CX88_BOARD_PROLINK_PV_GLOBAL_XTREME] = {
1644 .name = "Prolink Pixelview Global Extreme",
1645 .tuner_type = TUNER_XC2028,
1646 .tuner_addr = 0x61,
1647 .input = { {
1648 .type = CX88_VMUX_TELEVISION,
1649 .vmux = 0,
1650 .gpio0 = 0x04fb,
1651 .gpio1 = 0x04080,
1652 .gpio2 = 0x0cf7,
1653 }, {
1654 .type = CX88_VMUX_COMPOSITE1,
1655 .vmux = 1,
1656 .gpio0 = 0x04fb,
1657 .gpio1 = 0x04080,
1658 .gpio2 = 0x0cfb,
1659 }, {
1660 .type = CX88_VMUX_SVIDEO,
1661 .vmux = 2,
1662 .gpio0 = 0x04fb,
1663 .gpio1 = 0x04080,
1664 .gpio2 = 0x0cfb,
1665 } },
1666 .radio = {
1667 .type = CX88_RADIO,
1668 .gpio0 = 0x04ff,
1669 .gpio1 = 0x04080,
1670 .gpio2 = 0x0cf7,
1671 },
1672 },
Mauro Carvalho Chehab99e09ea2008-03-27 23:18:30 -03001673 /* Both radio, analog and ATSC work with this board.
1674 However, for analog to work, s5h1409 gate should be open,
1675 otherwise, tuner-xc3028 won't be detected.
1676 A proper fix require using the newer i2c methods to add
1677 tuner-xc3028 without doing an i2c probe.
1678 */
1679 [CX88_BOARD_KWORLD_ATSC_120] = {
1680 .name = "Kworld PlusTV HD PCI 120 (ATSC 120)",
1681 .tuner_type = TUNER_XC2028,
1682 .radio_type = UNSET,
1683 .tuner_addr = ADDR_UNSET,
1684 .radio_addr = ADDR_UNSET,
1685 .input = { {
1686 .type = CX88_VMUX_TELEVISION,
1687 .vmux = 0,
1688 .gpio0 = 0x000000ff,
1689 .gpio1 = 0x0000f35d,
1690 .gpio2 = 0x00000000,
1691 }, {
1692 .type = CX88_VMUX_COMPOSITE1,
1693 .vmux = 1,
1694 .gpio0 = 0x000000ff,
1695 .gpio1 = 0x0000f37e,
1696 .gpio2 = 0x00000000,
1697 }, {
1698 .type = CX88_VMUX_SVIDEO,
1699 .vmux = 2,
1700 .gpio0 = 0x000000ff,
1701 .gpio1 = 0x0000f37e,
1702 .gpio2 = 0x00000000,
1703 } },
1704 .radio = {
1705 .type = CX88_RADIO,
1706 .gpio0 = 0x000000ff,
1707 .gpio1 = 0x0000f35d,
1708 .gpio2 = 0x00000000,
1709 },
1710 .mpeg = CX88_MPEG_DVB,
1711 },
Steven Toth5bd1b662008-09-04 01:17:33 -03001712 [CX88_BOARD_HAUPPAUGE_HVR4000] = {
1713 .name = "Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid",
1714 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1715 .radio_type = UNSET,
1716 .tuner_addr = ADDR_UNSET,
1717 .radio_addr = ADDR_UNSET,
1718 .tda9887_conf = TDA9887_PRESENT,
1719 /*
1720 * GPIO0 (WINTV2000)
1721 *
1722 * Analogue SAT DVB-T
1723 * Antenna 0xc4bf 0xc4bb
1724 * Composite 0xc4bf 0xc4bb
1725 * S-Video 0xc4bf 0xc4bb
1726 * Composite1 0xc4ff 0xc4fb
1727 * S-Video1 0xc4ff 0xc4fb
Steven Toth2491fbb2008-09-22 01:48:13 -03001728 *
1729 * BIT VALUE FUNCTION GP{x}_IO
1730 * 0 1 I:?
1731 * 1 1 I:?
1732 * 2 1 O:DVB-T DEMOD ENABLE LOW/ANALOG DEMOD ENABLE HIGH
1733 * 3 1 I:?
1734 * 4 1 I:?
1735 * 5 1 I:?
1736 * 6 0 O:INPUT SELECTOR 0=INTERNAL 1=EXPANSION
1737 * 7 1 O:DVB-T DEMOD RESET LOW
1738 *
1739 * BIT VALUE FUNCTION GP{x}_OE
1740 * 8 0 I
1741 * 9 0 I
1742 * a 1 O
1743 * b 0 I
1744 * c 0 I
1745 * d 0 I
1746 * e 1 O
1747 * f 1 O
Steven Toth5bd1b662008-09-04 01:17:33 -03001748 */
1749 .input = {{
1750 .type = CX88_VMUX_TELEVISION,
1751 .vmux = 0,
1752 .gpio0 = 0xc4bf,
1753 }, {
1754 .type = CX88_VMUX_COMPOSITE1,
1755 .vmux = 1,
1756 .gpio0 = 0xc4bf,
1757 }, {
1758 .type = CX88_VMUX_SVIDEO,
1759 .vmux = 2,
1760 .gpio0 = 0xc4bf,
1761 } },
1762 /* fixme: Add radio support */
1763 .mpeg = CX88_MPEG_DVB,
1764 },
1765 [CX88_BOARD_HAUPPAUGE_HVR4000LITE] = {
1766 .name = "Hauppauge WinTV-HVR4000(Lite) DVB-S/S2",
1767 .tuner_type = UNSET,
1768 .radio_type = UNSET,
1769 .tuner_addr = ADDR_UNSET,
1770 .radio_addr = ADDR_UNSET,
1771 .input = {{
1772 .type = CX88_VMUX_DVB,
1773 .vmux = 0,
1774 } },
1775 .mpeg = CX88_MPEG_DVB,
1776 },
Igor M. Liplianine4aab642008-09-23 15:43:57 -03001777 [CX88_BOARD_TEVII_S420] = {
1778 .name = "TeVii S420 DVB-S",
1779 .tuner_type = UNSET,
1780 .radio_type = UNSET,
1781 .tuner_addr = ADDR_UNSET,
1782 .radio_addr = ADDR_UNSET,
1783 .input = {{
1784 .type = CX88_VMUX_DVB,
1785 .vmux = 0,
1786 } },
1787 .mpeg = CX88_MPEG_DVB,
1788 },
Igor M. Liplianinaf832622008-09-04 17:24:14 -03001789 [CX88_BOARD_TEVII_S460] = {
1790 .name = "TeVii S460 DVB-S/S2",
1791 .tuner_type = UNSET,
1792 .radio_type = UNSET,
1793 .tuner_addr = ADDR_UNSET,
1794 .radio_addr = ADDR_UNSET,
1795 .input = {{
1796 .type = CX88_VMUX_DVB,
1797 .vmux = 0,
1798 } },
1799 .mpeg = CX88_MPEG_DVB,
1800 },
Oleg Roitburd4cd7fb82008-09-17 11:30:21 -03001801 [CX88_BOARD_OMICOM_SS4_PCI] = {
1802 .name = "Omicom SS4 DVB-S/S2 PCI",
1803 .tuner_type = UNSET,
1804 .radio_type = UNSET,
1805 .tuner_addr = ADDR_UNSET,
1806 .radio_addr = ADDR_UNSET,
1807 .input = {{
1808 .type = CX88_VMUX_DVB,
1809 .vmux = 0,
1810 } },
1811 .mpeg = CX88_MPEG_DVB,
1812 },
Oleg Roitburdee730422008-09-17 11:58:33 -03001813 [CX88_BOARD_TBS_8920] = {
1814 .name = "TBS 8920 DVB-S/S2",
1815 .tuner_type = TUNER_ABSENT,
1816 .radio_type = UNSET,
1817 .tuner_addr = ADDR_UNSET,
1818 .radio_addr = ADDR_UNSET,
1819 .input = {{
1820 .type = CX88_VMUX_DVB,
1821 .vmux = 1,
1822 } },
1823 .mpeg = CX88_MPEG_DVB,
1824 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001825};
Linus Torvalds1da177e2005-04-16 15:20:36 -07001826
1827/* ------------------------------------------------------------------ */
1828/* PCI subsystem IDs */
1829
Trent Piephobbc83592007-08-15 14:41:58 -03001830static const struct cx88_subid cx88_subids[] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -07001831 {
1832 .subvendor = 0x0070,
1833 .subdevice = 0x3400,
1834 .card = CX88_BOARD_HAUPPAUGE,
1835 },{
1836 .subvendor = 0x0070,
1837 .subdevice = 0x3401,
1838 .card = CX88_BOARD_HAUPPAUGE,
1839 },{
1840 .subvendor = 0x14c7,
1841 .subdevice = 0x0106,
1842 .card = CX88_BOARD_GDI,
1843 },{
1844 .subvendor = 0x14c7,
1845 .subdevice = 0x0107, /* with mpeg encoder */
1846 .card = CX88_BOARD_GDI,
1847 },{
1848 .subvendor = PCI_VENDOR_ID_ATI,
1849 .subdevice = 0x00f8,
1850 .card = CX88_BOARD_ATI_WONDER_PRO,
1851 },{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001852 .subvendor = 0x107d,
1853 .subdevice = 0x6611,
1854 .card = CX88_BOARD_WINFAST2000XP_EXPERT,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001855 },{
1856 .subvendor = 0x107d,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001857 .subdevice = 0x6613, /* NTSC */
1858 .card = CX88_BOARD_WINFAST2000XP_EXPERT,
1859 },{
1860 .subvendor = 0x107d,
1861 .subdevice = 0x6620,
1862 .card = CX88_BOARD_WINFAST_DV2000,
1863 },{
1864 .subvendor = 0x107d,
1865 .subdevice = 0x663b,
1866 .card = CX88_BOARD_LEADTEK_PVR2000,
1867 },{
1868 .subvendor = 0x107d,
Michael Krufky8dd86ee2006-09-16 19:09:38 -03001869 .subdevice = 0x663c,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001870 .card = CX88_BOARD_LEADTEK_PVR2000,
1871 },{
Linus Torvalds1da177e2005-04-16 15:20:36 -07001872 .subvendor = 0x1461,
1873 .subdevice = 0x000b,
Lubomir Bulej7418f342005-11-08 21:38:34 -08001874 .card = CX88_BOARD_AVERTV_STUDIO_303,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001875 },{
1876 .subvendor = 0x1462,
1877 .subdevice = 0x8606,
1878 .card = CX88_BOARD_MSI_TVANYWHERE_MASTER,
1879 },{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001880 .subvendor = 0x10fc,
1881 .subdevice = 0xd003,
1882 .card = CX88_BOARD_IODATA_GVVCP3PCI,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001883 },{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001884 .subvendor = 0x1043,
1885 .subdevice = 0x4823, /* with mpeg encoder */
1886 .card = CX88_BOARD_ASUS_PVR_416,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001887 },{
1888 .subvendor = 0x17de,
1889 .subdevice = 0x08a6,
1890 .card = CX88_BOARD_KWORLD_DVB_T,
1891 },{
1892 .subvendor = 0x18ac,
1893 .subdevice = 0xd810,
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -07001894 .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001895 },{
Michael Krufky097b7502005-06-23 22:04:43 -07001896 .subvendor = 0x18ac,
1897 .subdevice = 0xd820,
Michael Krufky80d34362005-06-23 22:04:55 -07001898 .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T,
Michael Krufky097b7502005-06-23 22:04:43 -07001899 },{
Michael Krufky7df64e82005-11-08 21:36:16 -08001900 .subvendor = 0x18ac,
1901 .subdevice = 0xdb00,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001902 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001903 },{
Linus Torvalds1da177e2005-04-16 15:20:36 -07001904 .subvendor = 0x0070,
1905 .subdevice = 0x9002,
1906 .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001907 },{
Linus Torvalds1da177e2005-04-16 15:20:36 -07001908 .subvendor = 0x14f1,
1909 .subdevice = 0x0187,
1910 .card = CX88_BOARD_CONEXANT_DVB_T1,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001911 },{
Linus Torvalds1da177e2005-04-16 15:20:36 -07001912 .subvendor = 0x1540,
1913 .subdevice = 0x2580,
1914 .card = CX88_BOARD_PROVIDEO_PV259,
1915 },{
Michael Krufky7df64e82005-11-08 21:36:16 -08001916 .subvendor = 0x18ac,
1917 .subdevice = 0xdb10,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001918 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
1919 },{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001920 .subvendor = 0x1554,
1921 .subdevice = 0x4811,
1922 .card = CX88_BOARD_PIXELVIEW,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001923 },{
1924 .subvendor = 0x7063,
1925 .subdevice = 0x3000, /* HD-3000 card */
1926 .card = CX88_BOARD_PCHDTV_HD3000,
1927 },{
Michael Krufky7df64e82005-11-08 21:36:16 -08001928 .subvendor = 0x17de,
1929 .subdevice = 0xa8a6,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001930 .card = CX88_BOARD_DNTV_LIVE_DVB_T,
1931 },{
1932 .subvendor = 0x0070,
1933 .subdevice = 0x2801,
1934 .card = CX88_BOARD_HAUPPAUGE_ROSLYN,
1935 },{
Michael Krufky7df64e82005-11-08 21:36:16 -08001936 .subvendor = 0x14f1,
Linus Torvalds1da177e2005-04-16 15:20:36 -07001937 .subdevice = 0x0342,
1938 .card = CX88_BOARD_DIGITALLOGIC_MEC,
1939 },{
1940 .subvendor = 0x10fc,
1941 .subdevice = 0xd035,
1942 .card = CX88_BOARD_IODATA_GVBCTV7E,
Mauro Carvalho Chehaba82decf2005-07-07 17:58:36 -07001943 },{
1944 .subvendor = 0x1421,
1945 .subdevice = 0x0334,
1946 .card = CX88_BOARD_ADSTECH_DVB_T_PCI,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001947 },{
Michael Krufkye057ee12005-07-07 17:58:40 -07001948 .subvendor = 0x153b,
1949 .subdevice = 0x1166,
1950 .card = CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001951 },{
Michael Krufky9fef07c2005-07-31 22:34:46 -07001952 .subvendor = 0x18ac,
1953 .subdevice = 0xd500,
1954 .card = CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001955 },{
Nickolay V. Shmyrevd45170e2005-11-08 21:36:15 -08001956 .subvendor = 0x1461,
1957 .subdevice = 0x8011,
1958 .card = CX88_BOARD_AVERMEDIA_ULTRATV_MC_550,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001959 },{
Kirk Lapraye976f9372005-11-08 21:37:04 -08001960 .subvendor = PCI_VENDOR_ID_ATI,
1961 .subdevice = 0xa101,
1962 .card = CX88_BOARD_ATI_HDTVWONDER,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001963 },{
David Shirley2b5200a72005-11-08 21:37:22 -08001964 .subvendor = 0x107d,
1965 .subdevice = 0x665f,
1966 .card = CX88_BOARD_WINFAST_DTV1000,
Lubomir Bulej7418f342005-11-08 21:38:34 -08001967 },{
1968 .subvendor = 0x1461,
1969 .subdevice = 0x000a,
1970 .card = CX88_BOARD_AVERTV_303,
Steven Toth0fa14aa2006-01-09 15:25:02 -02001971 },{
1972 .subvendor = 0x0070,
1973 .subdevice = 0x9200,
Steven Tothfb56cb62006-01-09 15:25:02 -02001974 .card = CX88_BOARD_HAUPPAUGE_NOVASE2_S1,
1975 },{
1976 .subvendor = 0x0070,
1977 .subdevice = 0x9201,
Steven Toth0fa14aa2006-01-09 15:25:02 -02001978 .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
1979 },{
1980 .subvendor = 0x0070,
1981 .subdevice = 0x9202,
Steven Tothfb56cb62006-01-09 15:25:02 -02001982 .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
Vadim Catana0e0351e2006-01-09 15:25:02 -02001983 },{
1984 .subvendor = 0x17de,
1985 .subdevice = 0x08b2,
1986 .card = CX88_BOARD_KWORLD_DVBS_100,
Steven Toth611900c2006-01-09 15:25:12 -02001987 },{
1988 .subvendor = 0x0070,
1989 .subdevice = 0x9400,
1990 .card = CX88_BOARD_HAUPPAUGE_HVR1100,
1991 },{
1992 .subvendor = 0x0070,
1993 .subdevice = 0x9402,
1994 .card = CX88_BOARD_HAUPPAUGE_HVR1100,
1995 },{
1996 .subvendor = 0x0070,
1997 .subdevice = 0x9800,
1998 .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
1999 },{
2000 .subvendor = 0x0070,
2001 .subdevice = 0x9802,
2002 .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
Steven Tothc432a072006-01-09 15:25:13 -02002003 },{
2004 .subvendor = 0x0070,
2005 .subdevice = 0x9001,
2006 .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
Chris Pascoefc40b262006-01-09 15:25:35 -02002007 },{
2008 .subvendor = 0x1822,
2009 .subdevice = 0x0025,
2010 .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
Manenti Marcof39624f2006-01-09 15:32:45 -02002011 },{
Chris Pascoeb9f4ad52006-01-09 18:21:39 -02002012 .subvendor = 0x17de,
2013 .subdevice = 0x08a1,
2014 .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
Chris Pascoe43eabb42006-01-09 18:21:28 -02002015 },{
2016 .subvendor = 0x18ac,
2017 .subdevice = 0xdb50,
2018 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
Michael Krufky6bfb2e12006-01-11 22:52:28 -02002019 },{
2020 .subvendor = 0x18ac,
Michael Krufkyf74a6b32006-01-17 03:50:23 -02002021 .subdevice = 0xdb54,
2022 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
2023 /* Re-branded DViCO: DigitalNow DVB-T Dual */
2024 },{
2025 .subvendor = 0x18ac,
Michael Krufky6bfb2e12006-01-11 22:52:28 -02002026 .subdevice = 0xdb11,
2027 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
2028 /* Re-branded DViCO: UltraView DVB-T Plus */
Chris Pascoeb3fb91d2008-04-22 14:45:15 -03002029 }, {
2030 .subvendor = 0x18ac,
2031 .subdevice = 0xdb30,
2032 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO,
2033 }, {
Michael Krufky44256de2006-02-07 06:49:14 -02002034 .subvendor = 0x17de,
2035 .subdevice = 0x0840,
Michael Krufky923da8a2007-03-11 12:52:48 -03002036 .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
2037 },{
2038 .subvendor = 0x1421,
2039 .subdevice = 0x0305,
Michael Krufky44256de2006-02-07 06:49:14 -02002040 .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
Chris Pascoe780dfef2006-02-28 08:34:59 -03002041 },{
2042 .subvendor = 0x18ac,
2043 .subdevice = 0xdb40,
2044 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
2045 },{
2046 .subvendor = 0x18ac,
2047 .subdevice = 0xdb44,
2048 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
Rusty Scottda215d22006-04-07 02:21:31 -03002049 },{
2050 .subvendor = 0x7063,
2051 .subdevice = 0x5500,
2052 .card = CX88_BOARD_PCHDTV_HD5500,
Valentin Zagurab3038302006-04-13 12:41:43 -03002053 },{
2054 .subvendor = 0x17de,
2055 .subdevice = 0x0841,
2056 .card = CX88_BOARD_KWORLD_MCE200_DELUXE,
Michael Krufkyfc066472006-05-22 10:32:05 -03002057 },{
2058 .subvendor = 0x1822,
2059 .subdevice = 0x0019,
2060 .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
Angelo Marconia3124622006-05-09 18:27:48 -03002061 },{
2062 .subvendor = 0x1554,
2063 .subdevice = 0x4813,
2064 .card = CX88_BOARD_PIXELVIEW_PLAYTV_P7000,
Ricardo Cerqueira680543c2006-05-22 07:44:02 -03002065 },{
2066 .subvendor = 0x14f1,
2067 .subdevice = 0x0842,
Ricardo Cerqueirabe4f4512006-06-08 17:36:17 -03002068 .card = CX88_BOARD_NPGTECH_REALTV_TOP10FM,
Malcolm Valentine4bd6e9d2006-05-29 13:51:59 -03002069 },{
2070 .subvendor = 0x107d,
2071 .subdevice = 0x665e,
2072 .card = CX88_BOARD_WINFAST_DTV2000H,
Michael Krufky65271bf2006-06-21 16:04:33 -03002073 },{
2074 .subvendor = 0x18ac,
2075 .subdevice = 0xd800, /* FusionHDTV 3 Gold (original revision) */
2076 .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
Saqeb Akhterc02a34f2006-06-29 20:29:33 -03002077 },{
2078 .subvendor = 0x14f1,
2079 .subdevice = 0x0084,
2080 .card = CX88_BOARD_GENIATECH_DVBS,
Eric Thomasad10c932006-08-08 09:10:04 -03002081 },{
2082 .subvendor = 0x0070,
2083 .subdevice = 0x1404,
2084 .card = CX88_BOARD_HAUPPAUGE_HVR3000,
Michael Krufky5dbaa2c2006-08-08 09:10:04 -03002085 },{
2086 .subvendor = 0x1461,
2087 .subdevice = 0xc111, /* AverMedia M150-D */
2088 /* This board is known to work with the ASUS PVR416 config */
2089 .card = CX88_BOARD_ASUS_PVR_416,
David Bussenschutt2acadef2006-08-08 09:10:05 -03002090 },{
2091 .subvendor = 0xc180,
2092 .subdevice = 0xc980,
2093 .card = CX88_BOARD_TE_DTV_250_OEM_SWANN,
Steven Tothaa481a62006-09-14 15:41:13 -03002094 },{
2095 .subvendor = 0x0070,
2096 .subdevice = 0x9600,
2097 .card = CX88_BOARD_HAUPPAUGE_HVR1300,
2098 },{
2099 .subvendor = 0x0070,
2100 .subdevice = 0x9601,
2101 .card = CX88_BOARD_HAUPPAUGE_HVR1300,
2102 },{
2103 .subvendor = 0x0070,
2104 .subdevice = 0x9602,
2105 .card = CX88_BOARD_HAUPPAUGE_HVR1300,
Michael Krufkydab489d2006-09-15 15:41:23 -03002106 },{
2107 .subvendor = 0x107d,
2108 .subdevice = 0x6632,
2109 .card = CX88_BOARD_LEADTEK_PVR2000,
Michael Krufky4508f592006-09-25 14:14:24 -03002110 },{
2111 .subvendor = 0x12ab,
2112 .subdevice = 0x2300, /* Club3D Zap TV2100 */
2113 .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
Steven Toth3979ecc2006-09-29 22:37:07 -03002114 },{
2115 .subvendor = 0x0070,
2116 .subdevice = 0x9000,
2117 .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
Steven Toth76dc82a2006-09-30 00:43:58 -03002118 },{
2119 .subvendor = 0x0070,
2120 .subdevice = 0x1400,
2121 .card = CX88_BOARD_HAUPPAUGE_HVR3000,
2122 },{
2123 .subvendor = 0x0070,
2124 .subdevice = 0x1401,
2125 .card = CX88_BOARD_HAUPPAUGE_HVR3000,
2126 },{
2127 .subvendor = 0x0070,
2128 .subdevice = 0x1402,
2129 .card = CX88_BOARD_HAUPPAUGE_HVR3000,
Michael Krufky733aeaf2007-03-11 12:48:04 -03002130 },{
2131 .subvendor = 0x1421,
2132 .subdevice = 0x0341, /* ADS Tech InstantTV DVB-S */
2133 .card = CX88_BOARD_KWORLD_DVBS_100,
Daniel Gimpelevich7cb47a142007-05-17 18:10:17 -03002134 },{
2135 .subvendor = 0x1421,
2136 .subdevice = 0x0390,
2137 .card = CX88_BOARD_ADSTECH_PTV_390,
Steven Toth60464da2008-01-05 16:53:01 -03002138 },{
2139 .subvendor = 0x11bd,
2140 .subdevice = 0x0051,
2141 .card = CX88_BOARD_PINNACLE_PCTV_HD_800i,
Steven Toth5c00fac2008-04-22 14:45:14 -03002142 }, {
2143 .subvendor = 0x18ac,
2144 .subdevice = 0xd530,
2145 .card = CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO,
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03002146 }, {
2147 .subvendor = 0x12ab,
2148 .subdevice = 0x1788,
2149 .card = CX88_BOARD_PINNACLE_HYBRID_PCTV,
2150 }, {
2151 .subvendor = 0x14f1,
2152 .subdevice = 0xea3d,
2153 .card = CX88_BOARD_POWERCOLOR_REAL_ANGEL,
2154 }, {
2155 .subvendor = 0x107d,
2156 .subdevice = 0x6f18,
2157 .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL,
2158 }, {
2159 .subvendor = 0x14f1,
2160 .subdevice = 0x8852,
2161 .card = CX88_BOARD_GENIATECH_X8000_MT,
Mauro Carvalho Chehab2422a9b2008-04-22 14:46:00 -03002162 }, {
Steven Toth1117d6b2008-04-22 14:45:34 -03002163 .subvendor = 0x18ac,
2164 .subdevice = 0xd610,
2165 .card = CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD,
Mauro Carvalho Chehab2422a9b2008-04-22 14:46:00 -03002166 }, {
2167 .subvendor = 0x1554,
2168 .subdevice = 0x4935,
2169 .card = CX88_BOARD_PROLINK_PV_8000GT,
Mauro Carvalho Chehab99e09ea2008-03-27 23:18:30 -03002170 }, {
Mauro Carvalho Chehaba31d2bb2008-09-29 12:08:29 -03002171 .subvendor = 0x1554,
2172 .subdevice = 0x4976,
2173 .card = CX88_BOARD_PROLINK_PV_GLOBAL_XTREME,
2174 }, {
Mauro Carvalho Chehab99e09ea2008-03-27 23:18:30 -03002175 .subvendor = 0x17de,
2176 .subdevice = 0x08c1,
2177 .card = CX88_BOARD_KWORLD_ATSC_120,
Steven Toth5bd1b662008-09-04 01:17:33 -03002178 }, {
2179 .subvendor = 0x0070,
2180 .subdevice = 0x6900,
2181 .card = CX88_BOARD_HAUPPAUGE_HVR4000,
2182 }, {
2183 .subvendor = 0x0070,
2184 .subdevice = 0x6904,
2185 .card = CX88_BOARD_HAUPPAUGE_HVR4000,
2186 }, {
2187 .subvendor = 0x0070,
2188 .subdevice = 0x6902,
2189 .card = CX88_BOARD_HAUPPAUGE_HVR4000,
2190 }, {
2191 .subvendor = 0x0070,
2192 .subdevice = 0x6905,
2193 .card = CX88_BOARD_HAUPPAUGE_HVR4000LITE,
2194 }, {
2195 .subvendor = 0x0070,
2196 .subdevice = 0x6906,
2197 .card = CX88_BOARD_HAUPPAUGE_HVR4000LITE,
Igor M. Liplianinaf832622008-09-04 17:24:14 -03002198 }, {
Igor M. Liplianine4aab642008-09-23 15:43:57 -03002199 .subvendor = 0xd420,
2200 .subdevice = 0x9022,
2201 .card = CX88_BOARD_TEVII_S420,
2202 }, {
2203 .subvendor = 0xd460,
Igor M. Liplianinaf832622008-09-04 17:24:14 -03002204 .subdevice = 0x9022,
2205 .card = CX88_BOARD_TEVII_S460,
Oleg Roitburd4cd7fb82008-09-17 11:30:21 -03002206 }, {
2207 .subvendor = 0xA044,
2208 .subdevice = 0x2011,
2209 .card = CX88_BOARD_OMICOM_SS4_PCI,
Oleg Roitburdee730422008-09-17 11:58:33 -03002210 }, {
2211 .subvendor = 0x8920,
2212 .subdevice = 0x8888,
2213 .card = CX88_BOARD_TBS_8920,
Mauro Carvalho Chehab2422a9b2008-04-22 14:46:00 -03002214 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002215};
Linus Torvalds1da177e2005-04-16 15:20:36 -07002216
2217/* ----------------------------------------------------------------------- */
2218/* some leadtek specific stuff */
2219
Jean Delvare69f7e75a92006-12-23 14:11:03 -03002220static void leadtek_eeprom(struct cx88_core *core, u8 *eeprom_data)
Linus Torvalds1da177e2005-04-16 15:20:36 -07002221{
2222 /* This is just for the "Winfast 2000XP Expert" board ATM; I don't have data on
2223 * any others.
2224 *
2225 * Byte 0 is 1 on the NTSC board.
2226 */
2227
2228 if (eeprom_data[4] != 0x7d ||
2229 eeprom_data[5] != 0x10 ||
2230 eeprom_data[7] != 0x66) {
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03002231 warn_printk(core, "Leadtek eeprom invalid.\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07002232 return;
2233 }
2234
Trent Piepho6a59d642007-08-15 14:41:57 -03002235 core->board.tuner_type = (eeprom_data[6] == 0x13) ?
2236 TUNER_PHILIPS_FM1236_MK3 : TUNER_PHILIPS_FM1216ME_MK3;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002237
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03002238 info_printk(core, "Leadtek Winfast 2000XP Expert config: "
2239 "tuner=%d, eeprom[0]=0x%02x\n",
2240 core->board.tuner_type, eeprom_data[0]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002241}
2242
Linus Torvalds1da177e2005-04-16 15:20:36 -07002243static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data)
2244{
2245 struct tveeprom tv;
2246
Mauro Carvalho Chehab0f97a932005-09-09 13:04:05 -07002247 tveeprom_hauppauge_analog(&core->i2c_client, &tv, eeprom_data);
Trent Piepho6a59d642007-08-15 14:41:57 -03002248 core->board.tuner_type = tv.tuner_type;
Steven Toth0345c382006-01-09 15:25:17 -02002249 core->tuner_formats = tv.tuner_formats;
Trent Piepho6a59d642007-08-15 14:41:57 -03002250 core->board.radio.type = tv.has_radio ? CX88_RADIO : 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002251
2252 /* Make sure we support the board model */
Steven Toth3ca0ea92005-12-01 00:51:27 -08002253 switch (tv.model)
2254 {
Steven Toth76dc82a2006-09-30 00:43:58 -03002255 case 14009: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in) */
2256 case 14019: /* WinTV-HVR3000 (Retail, IR Blaster, b/panel video, 3.5mm audio in) */
2257 case 14029: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge) */
2258 case 14109: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - low profile) */
2259 case 14129: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge - LP) */
2260 case 14559: /* WinTV-HVR3000 (OEM, no IR, b/panel video, 3.5mm audio in) */
Eric Thomasad10c932006-08-08 09:10:04 -03002261 case 14569: /* WinTV-HVR3000 (OEM, no IR, no back panel video) */
Steven Toth76dc82a2006-09-30 00:43:58 -03002262 case 14659: /* WinTV-HVR3000 (OEM, no IR, b/panel video, RCA audio in - Low profile) */
2263 case 14669: /* WinTV-HVR3000 (OEM, no IR, no b/panel video - Low profile) */
Steven Toth0345c382006-01-09 15:25:17 -02002264 case 28552: /* WinTV-PVR 'Roslyn' (No IR) */
Ian Pickworth42d2b6e2006-01-23 17:11:07 -02002265 case 34519: /* WinTV-PCI-FM */
Steven Toth5bd1b662008-09-04 01:17:33 -03002266 case 69009:
2267 /* WinTV-HVR4000 (DVBS/S2/T, Video and IR, back panel inputs) */
2268 case 69100: /* WinTV-HVR4000LITE (DVBS/S2, IR) */
2269 case 69500: /* WinTV-HVR4000LITE (DVBS/S2, No IR) */
2270 case 69559:
2271 /* WinTV-HVR4000 (DVBS/S2/T, Video no IR, back panel inputs) */
2272 case 69569: /* WinTV-HVR4000 (DVBS/S2/T, Video no IR) */
Steven Toth759324c2005-12-01 00:51:26 -08002273 case 90002: /* Nova-T-PCI (9002) */
Steven Toth0fe22862005-12-01 00:51:41 -08002274 case 92001: /* Nova-S-Plus (Video and IR) */
2275 case 92002: /* Nova-S-Plus (Video and IR) */
2276 case 90003: /* Nova-T-PCI (9002 No RF out) */
Steven Toth759324c2005-12-01 00:51:26 -08002277 case 90500: /* Nova-T-PCI (oem) */
2278 case 90501: /* Nova-T-PCI (oem/IR) */
Steven Toth3ca0ea92005-12-01 00:51:27 -08002279 case 92000: /* Nova-SE2 (OEM, No Video or IR) */
Steven Toth611900c2006-01-09 15:25:12 -02002280 case 94009: /* WinTV-HVR1100 (Video and IR Retail) */
2281 case 94501: /* WinTV-HVR1100 (Video and IR OEM) */
Steven Tothaa481a62006-09-14 15:41:13 -03002282 case 96009: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX) */
2283 case 96019: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX/TX) */
2284 case 96559: /* WinTV-HVR1300 (PAL Video, MPEG Video no IR) */
2285 case 96569: /* WinTV-HVR1300 () */
2286 case 96659: /* WinTV-HVR1300 () */
Steven Toth611900c2006-01-09 15:25:12 -02002287 case 98559: /* WinTV-HVR1100LP (Video no IR, Retail - Low Profile) */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002288 /* known */
2289 break;
2290 default:
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03002291 warn_printk(core, "warning: unknown hauppauge model #%d\n",
2292 tv.model);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002293 break;
2294 }
2295
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03002296 info_printk(core, "hauppauge eeprom: model=%d\n", tv.model);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002297}
2298
2299/* ----------------------------------------------------------------------- */
2300/* some GDI (was: Modular Technology) specific stuff */
2301
2302static struct {
2303 int id;
2304 int fm;
2305 char *name;
2306} gdi_tuner[] = {
2307 [ 0x01 ] = { .id = TUNER_ABSENT,
2308 .name = "NTSC_M" },
2309 [ 0x02 ] = { .id = TUNER_ABSENT,
2310 .name = "PAL_B" },
2311 [ 0x03 ] = { .id = TUNER_ABSENT,
2312 .name = "PAL_I" },
2313 [ 0x04 ] = { .id = TUNER_ABSENT,
2314 .name = "PAL_D" },
2315 [ 0x05 ] = { .id = TUNER_ABSENT,
2316 .name = "SECAM" },
2317
2318 [ 0x10 ] = { .id = TUNER_ABSENT,
2319 .fm = 1,
2320 .name = "TEMIC_4049" },
2321 [ 0x11 ] = { .id = TUNER_TEMIC_4136FY5,
2322 .name = "TEMIC_4136" },
2323 [ 0x12 ] = { .id = TUNER_ABSENT,
2324 .name = "TEMIC_4146" },
2325
2326 [ 0x20 ] = { .id = TUNER_PHILIPS_FQ1216ME,
2327 .fm = 1,
2328 .name = "PHILIPS_FQ1216_MK3" },
2329 [ 0x21 ] = { .id = TUNER_ABSENT, .fm = 1,
2330 .name = "PHILIPS_FQ1236_MK3" },
2331 [ 0x22 ] = { .id = TUNER_ABSENT,
2332 .name = "PHILIPS_FI1236_MK3" },
2333 [ 0x23 ] = { .id = TUNER_ABSENT,
2334 .name = "PHILIPS_FI1216_MK3" },
2335};
2336
2337static void gdi_eeprom(struct cx88_core *core, u8 *eeprom_data)
2338{
2339 char *name = (eeprom_data[0x0d] < ARRAY_SIZE(gdi_tuner))
2340 ? gdi_tuner[eeprom_data[0x0d]].name : NULL;
2341
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03002342 info_printk(core, "GDI: tuner=%s\n", name ? name : "unknown");
Linus Torvalds1da177e2005-04-16 15:20:36 -07002343 if (NULL == name)
2344 return;
Trent Piepho6a59d642007-08-15 14:41:57 -03002345 core->board.tuner_type = gdi_tuner[eeprom_data[0x0d]].id;
2346 core->board.radio.type = gdi_tuner[eeprom_data[0x0d]].fm ?
2347 CX88_RADIO : 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002348}
2349
Chris Pascoeb3fb91d2008-04-22 14:45:15 -03002350/* ------------------------------------------------------------------- */
2351/* some Divco specific stuff */
Mauro Carvalho Chehab0be51b42008-04-22 14:46:10 -03002352static int cx88_dvico_xc2028_callback(struct cx88_core *core,
2353 int command, int arg)
Chris Pascoeb3fb91d2008-04-22 14:45:15 -03002354{
Chris Pascoeb3fb91d2008-04-22 14:45:15 -03002355 switch (command) {
2356 case XC2028_TUNER_RESET:
Michael Krufkyd7cba042008-09-12 13:31:45 -03002357 switch (core->boardnr) {
2358 case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
2359 /* GPIO-4 xc3028 tuner */
2360
2361 cx_set(MO_GP0_IO, 0x00001000);
2362 cx_clear(MO_GP0_IO, 0x00000010);
2363 msleep(100);
2364 cx_set(MO_GP0_IO, 0x00000010);
2365 msleep(100);
2366 break;
2367 default:
2368 cx_write(MO_GP0_IO, 0x101000);
2369 mdelay(5);
2370 cx_set(MO_GP0_IO, 0x101010);
2371 }
Chris Pascoeb3fb91d2008-04-22 14:45:15 -03002372 break;
2373 default:
2374 return -EINVAL;
2375 }
2376
2377 return 0;
2378}
2379
2380
Linus Torvalds1da177e2005-04-16 15:20:36 -07002381/* ----------------------------------------------------------------------- */
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03002382/* some Geniatech specific stuff */
2383
Mauro Carvalho Chehab0be51b42008-04-22 14:46:10 -03002384static int cx88_xc3028_geniatech_tuner_callback(struct cx88_core *core,
2385 int command, int mode)
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03002386{
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03002387 switch (command) {
2388 case XC2028_TUNER_RESET:
2389 switch (INPUT(core->input).type) {
2390 case CX88_RADIO:
Mauro Carvalho Chehabc450e502008-04-22 14:45:28 -03002391 break;
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03002392 case CX88_VMUX_DVB:
2393 cx_write(MO_GP1_IO, 0x030302);
2394 mdelay(50);
Mauro Carvalho Chehabc450e502008-04-22 14:45:28 -03002395 break;
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03002396 default:
2397 cx_write(MO_GP1_IO, 0x030301);
2398 mdelay(50);
Mauro Carvalho Chehabc450e502008-04-22 14:45:28 -03002399 }
2400 cx_write(MO_GP1_IO, 0x101010);
2401 mdelay(50);
2402 cx_write(MO_GP1_IO, 0x101000);
2403 mdelay(50);
2404 cx_write(MO_GP1_IO, 0x101010);
2405 mdelay(50);
2406 return 0;
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03002407 }
2408 return -EINVAL;
2409}
2410
Mauro Carvalho Chehab2422a9b2008-04-22 14:46:00 -03002411/* ------------------------------------------------------------------- */
2412/* some Divco specific stuff */
Mauro Carvalho Chehab0be51b42008-04-22 14:46:10 -03002413static int cx88_pv_8000gt_callback(struct cx88_core *core,
2414 int command, int arg)
Mauro Carvalho Chehab2422a9b2008-04-22 14:46:00 -03002415{
Mauro Carvalho Chehab2422a9b2008-04-22 14:46:00 -03002416 switch (command) {
2417 case XC2028_TUNER_RESET:
2418 cx_write(MO_GP2_IO, 0xcf7);
2419 mdelay(50);
2420 cx_write(MO_GP2_IO, 0xef5);
2421 mdelay(50);
2422 cx_write(MO_GP2_IO, 0xcf7);
2423 break;
2424 default:
2425 return -EINVAL;
2426 }
2427
2428 return 0;
2429}
2430
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03002431/* ----------------------------------------------------------------------- */
Chris Pascoe780dfef2006-02-28 08:34:59 -03002432/* some DViCO specific stuff */
2433
2434static void dvico_fusionhdtv_hybrid_init(struct cx88_core *core)
2435{
2436 struct i2c_msg msg = { .addr = 0x45, .flags = 0 };
2437 int i, err;
Chris Pascoe69b27e32006-02-28 20:23:11 -03002438 static u8 init_bufs[13][5] = {
Chris Pascoe780dfef2006-02-28 08:34:59 -03002439 { 0x10, 0x00, 0x20, 0x01, 0x03 },
2440 { 0x10, 0x10, 0x01, 0x00, 0x21 },
2441 { 0x10, 0x10, 0x10, 0x00, 0xCA },
2442 { 0x10, 0x10, 0x12, 0x00, 0x08 },
2443 { 0x10, 0x10, 0x13, 0x00, 0x0A },
2444 { 0x10, 0x10, 0x16, 0x01, 0xC0 },
2445 { 0x10, 0x10, 0x22, 0x01, 0x3D },
2446 { 0x10, 0x10, 0x73, 0x01, 0x2E },
2447 { 0x10, 0x10, 0x72, 0x00, 0xC5 },
2448 { 0x10, 0x10, 0x71, 0x01, 0x97 },
2449 { 0x10, 0x10, 0x70, 0x00, 0x0F },
2450 { 0x10, 0x10, 0xB0, 0x00, 0x01 },
2451 { 0x03, 0x0C },
2452 };
2453
Mauro Carvalho Chehab5b9c4e62007-03-28 22:37:26 -03002454 for (i = 0; i < ARRAY_SIZE(init_bufs); i++) {
Chris Pascoe780dfef2006-02-28 08:34:59 -03002455 msg.buf = init_bufs[i];
2456 msg.len = (i != 12 ? 5 : 2);
2457 err = i2c_transfer(&core->i2c_adap, &msg, 1);
2458 if (err != 1) {
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03002459 warn_printk(core, "dvico_fusionhdtv_hybrid_init buf %d "
2460 "failed (err = %d)!\n", i, err);
Chris Pascoe780dfef2006-02-28 08:34:59 -03002461 return;
2462 }
2463 }
2464}
2465
Mauro Carvalho Chehab0be51b42008-04-22 14:46:10 -03002466static int cx88_xc2028_tuner_callback(struct cx88_core *core,
2467 int command, int arg)
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03002468{
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03002469 /* Board-specific callbacks */
2470 switch (core->boardnr) {
2471 case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
2472 case CX88_BOARD_POWERCOLOR_REAL_ANGEL:
2473 case CX88_BOARD_GENIATECH_X8000_MT:
Mauro Carvalho Chehab99e09ea2008-03-27 23:18:30 -03002474 case CX88_BOARD_KWORLD_ATSC_120:
Mauro Carvalho Chehab0be51b42008-04-22 14:46:10 -03002475 return cx88_xc3028_geniatech_tuner_callback(core,
2476 command, arg);
Mauro Carvalho Chehab2422a9b2008-04-22 14:46:00 -03002477 case CX88_BOARD_PROLINK_PV_8000GT:
Mauro Carvalho Chehaba31d2bb2008-09-29 12:08:29 -03002478 case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
Mauro Carvalho Chehab0be51b42008-04-22 14:46:10 -03002479 return cx88_pv_8000gt_callback(core, command, arg);
Chris Pascoeb3fb91d2008-04-22 14:45:15 -03002480 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
Michael Krufkyd7cba042008-09-12 13:31:45 -03002481 case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
Mauro Carvalho Chehab0be51b42008-04-22 14:46:10 -03002482 return cx88_dvico_xc2028_callback(core, command, arg);
Mauro Carvalho Chehab95079012008-04-22 14:45:15 -03002483 }
2484
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03002485 switch (command) {
2486 case XC2028_TUNER_RESET:
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03002487 switch (INPUT(core->input).type) {
2488 case CX88_RADIO:
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03002489 info_printk(core, "setting GPIO to radio!\n");
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03002490 cx_write(MO_GP0_IO, 0x4ff);
2491 mdelay(250);
2492 cx_write(MO_GP2_IO, 0xff);
2493 mdelay(250);
Mauro Carvalho Chehabc450e502008-04-22 14:45:28 -03002494 break;
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03002495 case CX88_VMUX_DVB: /* Digital TV*/
2496 default: /* Analog TV */
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03002497 info_printk(core, "setting GPIO to TV!\n");
Mauro Carvalho Chehabc450e502008-04-22 14:45:28 -03002498 break;
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03002499 }
Mauro Carvalho Chehabc450e502008-04-22 14:45:28 -03002500 cx_write(MO_GP1_IO, 0x101010);
2501 mdelay(250);
2502 cx_write(MO_GP1_IO, 0x101000);
2503 mdelay(250);
2504 cx_write(MO_GP1_IO, 0x101010);
2505 mdelay(250);
2506 return 0;
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03002507 }
2508 return -EINVAL;
2509}
2510
Chris Pascoe780dfef2006-02-28 08:34:59 -03002511/* ----------------------------------------------------------------------- */
Steven Toth60464da2008-01-05 16:53:01 -03002512/* Tuner callback function. Currently only needed for the Pinnacle *
2513 * PCTV HD 800i with an xc5000 sillicon tuner. This is used for both *
2514 * analog tuner attach (tuner-core.c) and dvb tuner attach (cx88-dvb.c) */
2515
Mauro Carvalho Chehab0be51b42008-04-22 14:46:10 -03002516static int cx88_xc5000_tuner_callback(struct cx88_core *core,
2517 int command, int arg)
Steven Toth60464da2008-01-05 16:53:01 -03002518{
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03002519 switch (core->boardnr) {
Steven Toth60464da2008-01-05 16:53:01 -03002520 case CX88_BOARD_PINNACLE_PCTV_HD_800i:
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03002521 if (command == 0) { /* This is the reset command from xc5000 */
Steven Toth72e04f72008-01-22 01:03:10 -03002522 /* Reset XC5000 tuner via SYS_RSTO_pin */
2523 cx_write(MO_SRST_IO, 0);
2524 msleep(10);
2525 cx_write(MO_SRST_IO, 1);
Steven Toth60464da2008-01-05 16:53:01 -03002526 return 0;
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03002527 } else {
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03002528 err_printk(core, "xc5000: unknown tuner "
2529 "callback command.\n");
Steven Toth60464da2008-01-05 16:53:01 -03002530 return -EINVAL;
2531 }
2532 break;
Steven Toth1117d6b2008-04-22 14:45:34 -03002533 case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD:
2534 if (command == 0) { /* This is the reset command from xc5000 */
2535 cx_clear(MO_GP0_IO, 0x00000010);
2536 msleep(10);
2537 cx_set(MO_GP0_IO, 0x00000010);
2538 return 0;
2539 } else {
2540 printk(KERN_ERR
2541 "xc5000: unknown tuner callback command.\n");
2542 return -EINVAL;
2543 }
2544 break;
Steven Toth60464da2008-01-05 16:53:01 -03002545 }
2546 return 0; /* Should never be here */
2547}
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03002548
Michael Krufkyd7cba042008-09-12 13:31:45 -03002549int cx88_tuner_callback(void *priv, int component, int command, int arg)
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03002550{
2551 struct i2c_algo_bit_data *i2c_algo = priv;
Mauro Carvalho Chehab0be51b42008-04-22 14:46:10 -03002552 struct cx88_core *core;
2553
2554 if (!i2c_algo) {
2555 printk(KERN_ERR "cx88: Error - i2c private data undefined.\n");
2556 return -EINVAL;
2557 }
2558
2559 core = i2c_algo->data;
2560
2561 if (!core) {
2562 printk(KERN_ERR "cx88: Error - device struct undefined.\n");
2563 return -EINVAL;
2564 }
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03002565
Michael Krufkyd7cba042008-09-12 13:31:45 -03002566 if (component != DVB_FRONTEND_COMPONENT_TUNER)
2567 return -EINVAL;
2568
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03002569 switch (core->board.tuner_type) {
2570 case TUNER_XC2028:
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03002571 info_printk(core, "Calling XC2028/3028 callback\n");
Mauro Carvalho Chehab0be51b42008-04-22 14:46:10 -03002572 return cx88_xc2028_tuner_callback(core, command, arg);
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03002573 case TUNER_XC5000:
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03002574 info_printk(core, "Calling XC5000 callback\n");
Mauro Carvalho Chehab0be51b42008-04-22 14:46:10 -03002575 return cx88_xc5000_tuner_callback(core, command, arg);
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03002576 }
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03002577 err_printk(core, "Error: Calling callback for tuner %d\n",
2578 core->board.tuner_type);
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03002579 return -EINVAL;
2580}
Steven Toth60464da2008-01-05 16:53:01 -03002581EXPORT_SYMBOL(cx88_tuner_callback);
2582
2583/* ----------------------------------------------------------------------- */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002584
Trent Piephobbc83592007-08-15 14:41:58 -03002585static void cx88_card_list(struct cx88_core *core, struct pci_dev *pci)
Linus Torvalds1da177e2005-04-16 15:20:36 -07002586{
2587 int i;
2588
2589 if (0 == pci->subsystem_vendor &&
2590 0 == pci->subsystem_device) {
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03002591 printk(KERN_ERR
2592 "%s: Your board has no valid PCI Subsystem ID and thus can't\n"
Linus Torvalds1da177e2005-04-16 15:20:36 -07002593 "%s: be autodetected. Please pass card=<n> insmod option to\n"
2594 "%s: workaround that. Redirect complaints to the vendor of\n"
2595 "%s: the TV card. Best regards,\n"
2596 "%s: -- tux\n",
2597 core->name,core->name,core->name,core->name,core->name);
2598 } else {
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03002599 printk(KERN_ERR
2600 "%s: Your board isn't known (yet) to the driver. You can\n"
Linus Torvalds1da177e2005-04-16 15:20:36 -07002601 "%s: try to pick one of the existing card configs via\n"
2602 "%s: card=<n> insmod option. Updating to the latest\n"
2603 "%s: version might help as well.\n",
2604 core->name,core->name,core->name,core->name);
2605 }
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03002606 err_printk(core, "Here is a list of valid choices for the card=<n> "
2607 "insmod option:\n");
Trent Piephobbc83592007-08-15 14:41:58 -03002608 for (i = 0; i < ARRAY_SIZE(cx88_boards); i++)
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03002609 printk(KERN_ERR "%s: card=%d -> %s\n",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002610 core->name, i, cx88_boards[i].name);
2611}
2612
Trent Piephobbc83592007-08-15 14:41:58 -03002613static void cx88_card_setup_pre_i2c(struct cx88_core *core)
Steven Tothaa481a62006-09-14 15:41:13 -03002614{
Trent Piepho6a59d642007-08-15 14:41:57 -03002615 switch (core->boardnr) {
Steven Tothaa481a62006-09-14 15:41:13 -03002616 case CX88_BOARD_HAUPPAUGE_HVR1300:
Steven Toth2491fbb2008-09-22 01:48:13 -03002617 /*
2618 * Bring the 702 demod up before i2c scanning/attach or devices are hidden
2619 * We leave here with the 702 on the bus
2620 *
2621 * "reset the IR receiver on GPIO[3]"
2622 * Reported by Mike Crash <mike AT mikecrash.com>
2623 */
2624 cx_write(MO_GP0_IO, 0x0000ef88);
Steven Tothaa481a62006-09-14 15:41:13 -03002625 udelay(1000);
Steven Toth2491fbb2008-09-22 01:48:13 -03002626 cx_clear(MO_GP0_IO, 0x00000088);
Steven Tothaa481a62006-09-14 15:41:13 -03002627 udelay(50);
Steven Toth2491fbb2008-09-22 01:48:13 -03002628 cx_set(MO_GP0_IO, 0x00000088); /* 702 out of reset */
Steven Tothaa481a62006-09-14 15:41:13 -03002629 udelay(1000);
2630 break;
Mauro Carvalho Chehab2422a9b2008-04-22 14:46:00 -03002631
Mauro Carvalho Chehaba31d2bb2008-09-29 12:08:29 -03002632 case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
Mauro Carvalho Chehab2422a9b2008-04-22 14:46:00 -03002633 case CX88_BOARD_PROLINK_PV_8000GT:
2634 cx_write(MO_GP2_IO, 0xcf7);
2635 mdelay(50);
2636 cx_write(MO_GP2_IO, 0xef5);
2637 mdelay(50);
2638 cx_write(MO_GP2_IO, 0xcf7);
2639 msleep(10);
2640 break;
2641
Steven Toth2491fbb2008-09-22 01:48:13 -03002642 case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD:
Steven Toth1117d6b2008-04-22 14:45:34 -03002643 /* Enable the xc5000 tuner */
2644 cx_set(MO_GP0_IO, 0x00001010);
2645 break;
Steven Toth2491fbb2008-09-22 01:48:13 -03002646
2647 case CX88_BOARD_HAUPPAUGE_HVR3000:
Steven Toth5bd1b662008-09-04 01:17:33 -03002648 case CX88_BOARD_HAUPPAUGE_HVR4000:
2649 case CX88_BOARD_HAUPPAUGE_HVR4000LITE:
Steven Toth2491fbb2008-09-22 01:48:13 -03002650 /* Init GPIO */
2651 cx_write(MO_GP0_IO, core->board.input[0].gpio0);
Steven Toth5bd1b662008-09-04 01:17:33 -03002652 udelay(1000);
Steven Toth2491fbb2008-09-22 01:48:13 -03002653 break;
Steven Tothaa481a62006-09-14 15:41:13 -03002654 }
2655}
2656
Mauro Carvalho Chehab99e09ea2008-03-27 23:18:30 -03002657/*
2658 * Sets board-dependent xc3028 configuration
2659 */
2660void cx88_setup_xc3028(struct cx88_core *core, struct xc2028_ctrl *ctl)
2661{
2662 memset(ctl, 0, sizeof(*ctl));
2663
2664 ctl->fname = XC2028_DEFAULT_FIRMWARE;
2665 ctl->max_len = 64;
2666
2667 switch (core->boardnr) {
2668 case CX88_BOARD_POWERCOLOR_REAL_ANGEL:
Daniel Gimpelevicha9606ce2008-06-03 21:29:45 -03002669 /* Now works with firmware version 2.7 */
2670 if (core->i2c_algo.udelay < 16)
2671 core->i2c_algo.udelay = 16;
Mauro Carvalho Chehab99e09ea2008-03-27 23:18:30 -03002672 break;
2673 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
2674 ctl->scode_table = XC3028_FE_ZARLINK456;
2675 break;
2676 case CX88_BOARD_KWORLD_ATSC_120:
2677 case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
2678 ctl->demod = XC3028_FE_OREN538;
2679 break;
Mauro Carvalho Chehaba31d2bb2008-09-29 12:08:29 -03002680 case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
Mauro Carvalho Chehab99e09ea2008-03-27 23:18:30 -03002681 case CX88_BOARD_PROLINK_PV_8000GT:
2682 /*
Mauro Carvalho Chehaba31d2bb2008-09-29 12:08:29 -03002683 * Those boards uses non-MTS firmware
Mauro Carvalho Chehab99e09ea2008-03-27 23:18:30 -03002684 */
2685 break;
Stéphane Voltz3f6014f2008-09-05 14:33:54 -03002686 case CX88_BOARD_PINNACLE_HYBRID_PCTV:
2687 ctl->demod = XC3028_FE_ZARLINK456;
2688 ctl->mts = 1;
2689 break;
Mauro Carvalho Chehab99e09ea2008-03-27 23:18:30 -03002690 default:
2691 ctl->demod = XC3028_FE_OREN538;
2692 ctl->mts = 1;
2693 }
2694}
2695EXPORT_SYMBOL_GPL(cx88_setup_xc3028);
2696
Trent Piephobbc83592007-08-15 14:41:58 -03002697static void cx88_card_setup(struct cx88_core *core)
Linus Torvalds1da177e2005-04-16 15:20:36 -07002698{
Steven Toth3ca0ea92005-12-01 00:51:27 -08002699 static u8 eeprom[256];
Mauro Carvalho Chehab4bf12262008-04-26 11:55:09 -03002700 struct tuner_setup tun_setup;
2701 unsigned int mode_mask = T_RADIO |
2702 T_ANALOG_TV |
2703 T_DIGITAL_TV;
2704
2705 memset(&tun_setup, 0, sizeof(tun_setup));
Linus Torvalds1da177e2005-04-16 15:20:36 -07002706
2707 if (0 == core->i2c_rc) {
2708 core->i2c_client.addr = 0xa0 >> 1;
Mauro Carvalho Chehab4bf12262008-04-26 11:55:09 -03002709 tveeprom_read(&core->i2c_client, eeprom, sizeof(eeprom));
Linus Torvalds1da177e2005-04-16 15:20:36 -07002710 }
2711
Trent Piepho6a59d642007-08-15 14:41:57 -03002712 switch (core->boardnr) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07002713 case CX88_BOARD_HAUPPAUGE:
2714 case CX88_BOARD_HAUPPAUGE_ROSLYN:
2715 if (0 == core->i2c_rc)
Mauro Carvalho Chehab4bf12262008-04-26 11:55:09 -03002716 hauppauge_eeprom(core, eeprom+8);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002717 break;
2718 case CX88_BOARD_GDI:
2719 if (0 == core->i2c_rc)
Mauro Carvalho Chehab4bf12262008-04-26 11:55:09 -03002720 gdi_eeprom(core, eeprom);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002721 break;
2722 case CX88_BOARD_WINFAST2000XP_EXPERT:
2723 if (0 == core->i2c_rc)
Mauro Carvalho Chehab4bf12262008-04-26 11:55:09 -03002724 leadtek_eeprom(core, eeprom);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002725 break;
Steven Toth0fa14aa2006-01-09 15:25:02 -02002726 case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
2727 case CX88_BOARD_HAUPPAUGE_NOVASE2_S1:
Linus Torvalds1da177e2005-04-16 15:20:36 -07002728 case CX88_BOARD_HAUPPAUGE_DVB_T1:
Steven Toth611900c2006-01-09 15:25:12 -02002729 case CX88_BOARD_HAUPPAUGE_HVR1100:
2730 case CX88_BOARD_HAUPPAUGE_HVR1100LP:
Eric Thomasad10c932006-08-08 09:10:04 -03002731 case CX88_BOARD_HAUPPAUGE_HVR3000:
Steven Tothaa481a62006-09-14 15:41:13 -03002732 case CX88_BOARD_HAUPPAUGE_HVR1300:
Steven Toth5bd1b662008-09-04 01:17:33 -03002733 case CX88_BOARD_HAUPPAUGE_HVR4000:
2734 case CX88_BOARD_HAUPPAUGE_HVR4000LITE:
Linus Torvalds1da177e2005-04-16 15:20:36 -07002735 if (0 == core->i2c_rc)
Mauro Carvalho Chehab4bf12262008-04-26 11:55:09 -03002736 hauppauge_eeprom(core, eeprom);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002737 break;
Vadim Catana0e0351e2006-01-09 15:25:02 -02002738 case CX88_BOARD_KWORLD_DVBS_100:
2739 cx_write(MO_GP0_IO, 0x000007f8);
2740 cx_write(MO_GP1_IO, 0x00000001);
2741 break;
Chris Pascoe87655612008-04-22 14:45:15 -03002742 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
2743 /* GPIO0:0 is hooked to demod reset */
2744 /* GPIO0:4 is hooked to xc3028 reset */
2745 cx_write(MO_GP0_IO, 0x00111100);
2746 msleep(1);
2747 cx_write(MO_GP0_IO, 0x00111111);
2748 break;
Chris Pascoed536e9c2006-08-10 03:22:21 -03002749 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL:
2750 /* GPIO0:6 is hooked to FX2 reset pin */
2751 cx_set(MO_GP0_IO, 0x00004040);
2752 cx_clear(MO_GP0_IO, 0x00000040);
2753 msleep(1000);
2754 cx_set(MO_GP0_IO, 0x00004040);
2755 /* FALLTHROUGH */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002756 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
2757 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS:
Chris Pascoe780dfef2006-02-28 08:34:59 -03002758 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID:
Linus Torvalds1da177e2005-04-16 15:20:36 -07002759 /* GPIO0:0 is hooked to mt352 reset pin */
2760 cx_set(MO_GP0_IO, 0x00000101);
2761 cx_clear(MO_GP0_IO, 0x00000001);
2762 msleep(1);
2763 cx_set(MO_GP0_IO, 0x00000101);
Chris Pascoe780dfef2006-02-28 08:34:59 -03002764 if (0 == core->i2c_rc &&
Trent Piepho6a59d642007-08-15 14:41:57 -03002765 core->boardnr == CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID)
Chris Pascoe780dfef2006-02-28 08:34:59 -03002766 dvico_fusionhdtv_hybrid_init(core);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002767 break;
2768 case CX88_BOARD_KWORLD_DVB_T:
2769 case CX88_BOARD_DNTV_LIVE_DVB_T:
2770 cx_set(MO_GP0_IO, 0x00000707);
2771 cx_set(MO_GP2_IO, 0x00000101);
2772 cx_clear(MO_GP2_IO, 0x00000001);
2773 msleep(1);
2774 cx_clear(MO_GP0_IO, 0x00000007);
2775 cx_set(MO_GP2_IO, 0x00000101);
2776 break;
Chris Pascoefc40b262006-01-09 15:25:35 -02002777 case CX88_BOARD_DNTV_LIVE_DVB_T_PRO:
2778 cx_write(MO_GP0_IO, 0x00080808);
2779 break;
Kirk Lapraye976f9372005-11-08 21:37:04 -08002780 case CX88_BOARD_ATI_HDTVWONDER:
2781 if (0 == core->i2c_rc) {
2782 /* enable tuner */
2783 int i;
Mauro Carvalho Chehab5b9c4e62007-03-28 22:37:26 -03002784 static const u8 buffer [][2] = {
2785 {0x10,0x12},
2786 {0x13,0x04},
2787 {0x16,0x00},
2788 {0x14,0x04},
2789 {0x17,0x00}
2790 };
Kirk Lapraye976f9372005-11-08 21:37:04 -08002791 core->i2c_client.addr = 0x0a;
Kirk Lapraye976f9372005-11-08 21:37:04 -08002792
Mauro Carvalho Chehab5b9c4e62007-03-28 22:37:26 -03002793 for (i = 0; i < ARRAY_SIZE(buffer); i++)
2794 if (2 != i2c_master_send(&core->i2c_client,
2795 buffer[i],2))
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03002796 warn_printk(core, "Unable to enable "
2797 "tuner(%i).\n", i);
Kirk Lapraye976f9372005-11-08 21:37:04 -08002798 }
2799 break;
Mauro Carvalho Chehab55c88612007-10-19 06:59:33 -03002800 case CX88_BOARD_MSI_TVANYWHERE_MASTER:
2801 {
2802 struct v4l2_priv_tun_config tea5767_cfg;
2803 struct tea5767_ctrl ctl;
2804
2805 memset(&ctl, 0, sizeof(ctl));
2806
2807 ctl.high_cut = 1;
2808 ctl.st_noise = 1;
2809 ctl.deemph_75 = 1;
2810 ctl.xtal_freq = TEA5767_HIGH_LO_13MHz;
2811
2812 tea5767_cfg.tuner = TUNER_TEA5767;
2813 tea5767_cfg.priv = &ctl;
2814
2815 cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &tea5767_cfg);
Igor M. Liplianinaf832622008-09-04 17:24:14 -03002816 break;
Mauro Carvalho Chehab55c88612007-10-19 06:59:33 -03002817 }
Igor M. Liplianine4aab642008-09-23 15:43:57 -03002818 case CX88_BOARD_TEVII_S420:
Igor M. Liplianinaf832622008-09-04 17:24:14 -03002819 case CX88_BOARD_TEVII_S460:
2820 cx_write(MO_SRST_IO, 0);
2821 msleep(100);
2822 cx_write(MO_SRST_IO, 1);
2823 msleep(100);
2824 break;
Oleg Roitburd4cd7fb82008-09-17 11:30:21 -03002825 case CX88_BOARD_OMICOM_SS4_PCI:
2826 cx_write(MO_SRST_IO, 0);
2827 msleep(100);
2828 cx_write(MO_SRST_IO, 1);
2829 msleep(100);
2830 break;
Oleg Roitburdee730422008-09-17 11:58:33 -03002831 case CX88_BOARD_TBS_8920:
2832 cx_write(MO_SRST_IO, 0);
2833 msleep(100);
2834 cx_write(MO_SRST_IO, 1);
2835 msleep(100);
2836 break;
Mauro Carvalho Chehab4bf12262008-04-26 11:55:09 -03002837 } /*end switch() */
2838
2839
2840 /* Setup tuners */
2841 if ((core->board.radio_type != UNSET)) {
2842 tun_setup.mode_mask = T_RADIO;
2843 tun_setup.type = core->board.radio_type;
2844 tun_setup.addr = core->board.radio_addr;
2845 tun_setup.tuner_callback = cx88_tuner_callback;
2846 cx88_call_i2c_clients(core, TUNER_SET_TYPE_ADDR, &tun_setup);
2847 mode_mask &= ~T_RADIO;
2848 }
2849
2850 if (core->board.tuner_type != TUNER_ABSENT) {
2851 tun_setup.mode_mask = mode_mask;
2852 tun_setup.type = core->board.tuner_type;
2853 tun_setup.addr = core->board.tuner_addr;
2854 tun_setup.tuner_callback = cx88_tuner_callback;
2855
2856 cx88_call_i2c_clients(core, TUNER_SET_TYPE_ADDR, &tun_setup);
2857 }
2858
2859 if (core->board.tda9887_conf) {
2860 struct v4l2_priv_tun_config tda9887_cfg;
2861
2862 tda9887_cfg.tuner = TUNER_TDA9887;
2863 tda9887_cfg.priv = &core->board.tda9887_conf;
2864
2865 cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &tda9887_cfg);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002866 }
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03002867
2868 if (core->board.tuner_type == TUNER_XC2028) {
2869 struct v4l2_priv_tun_config xc2028_cfg;
2870 struct xc2028_ctrl ctl;
2871
Mauro Carvalho Chehab99e09ea2008-03-27 23:18:30 -03002872 /* Fills device-dependent initialization parameters */
2873 cx88_setup_xc3028(core, &ctl);
2874
2875 /* Sends parameters to xc2028/3028 tuner */
Mauro Carvalho Chehaba9317ab2008-04-22 14:45:46 -03002876 memset(&xc2028_cfg, 0, sizeof(xc2028_cfg));
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03002877 xc2028_cfg.tuner = TUNER_XC2028;
2878 xc2028_cfg.priv = &ctl;
Mauro Carvalho Chehab64016332008-04-22 14:45:30 -03002879 info_printk(core, "Asking xc2028/3028 to load firmware %s\n",
2880 ctl.fname);
Mauro Carvalho Chehabc2cb8fc2008-04-22 14:45:14 -03002881 cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &xc2028_cfg);
2882 }
Mauro Carvalho Chehab4bf12262008-04-26 11:55:09 -03002883 cx88_call_i2c_clients (core, TUNER_SET_STANDBY, NULL);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002884}
2885
2886/* ------------------------------------------------------------------ */
2887
Trent Piephobbc83592007-08-15 14:41:58 -03002888static int cx88_pci_quirks(const char *name, struct pci_dev *pci)
2889{
2890 unsigned int lat = UNSET;
2891 u8 ctrl = 0;
2892 u8 value;
2893
2894 /* check pci quirks */
2895 if (pci_pci_problems & PCIPCI_TRITON) {
2896 printk(KERN_INFO "%s: quirk: PCIPCI_TRITON -- set TBFX\n",
2897 name);
2898 ctrl |= CX88X_EN_TBFX;
2899 }
2900 if (pci_pci_problems & PCIPCI_NATOMA) {
2901 printk(KERN_INFO "%s: quirk: PCIPCI_NATOMA -- set TBFX\n",
2902 name);
2903 ctrl |= CX88X_EN_TBFX;
2904 }
2905 if (pci_pci_problems & PCIPCI_VIAETBF) {
2906 printk(KERN_INFO "%s: quirk: PCIPCI_VIAETBF -- set TBFX\n",
2907 name);
2908 ctrl |= CX88X_EN_TBFX;
2909 }
2910 if (pci_pci_problems & PCIPCI_VSFX) {
2911 printk(KERN_INFO "%s: quirk: PCIPCI_VSFX -- set VSFX\n",
2912 name);
2913 ctrl |= CX88X_EN_VSFX;
2914 }
2915#ifdef PCIPCI_ALIMAGIK
2916 if (pci_pci_problems & PCIPCI_ALIMAGIK) {
2917 printk(KERN_INFO "%s: quirk: PCIPCI_ALIMAGIK -- latency fixup\n",
2918 name);
2919 lat = 0x0A;
2920 }
2921#endif
2922
2923 /* check insmod options */
2924 if (UNSET != latency)
2925 lat = latency;
2926
2927 /* apply stuff */
2928 if (ctrl) {
2929 pci_read_config_byte(pci, CX88X_DEVCTRL, &value);
2930 value |= ctrl;
2931 pci_write_config_byte(pci, CX88X_DEVCTRL, value);
2932 }
2933 if (UNSET != lat) {
2934 printk(KERN_INFO "%s: setting pci latency timer to %d\n",
2935 name, latency);
2936 pci_write_config_byte(pci, PCI_LATENCY_TIMER, latency);
2937 }
2938 return 0;
2939}
2940
2941int cx88_get_resources(const struct cx88_core *core, struct pci_dev *pci)
2942{
2943 if (request_mem_region(pci_resource_start(pci,0),
2944 pci_resource_len(pci,0),
2945 core->name))
2946 return 0;
2947 printk(KERN_ERR
2948 "%s/%d: Can't get MMIO memory @ 0x%llx, subsystem: %04x:%04x\n",
2949 core->name, PCI_FUNC(pci->devfn),
2950 (unsigned long long)pci_resource_start(pci, 0),
2951 pci->subsystem_vendor, pci->subsystem_device);
2952 return -EBUSY;
2953}
2954
2955/* Allocate and initialize the cx88 core struct. One should hold the
2956 * devlist mutex before calling this. */
2957struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr)
2958{
2959 struct cx88_core *core;
2960 int i;
2961
2962 core = kzalloc(sizeof(*core), GFP_KERNEL);
2963
2964 atomic_inc(&core->refcount);
2965 core->pci_bus = pci->bus->number;
2966 core->pci_slot = PCI_SLOT(pci->devfn);
Trent Piepho8ddac9e2007-08-18 06:57:55 -03002967 core->pci_irqmask = PCI_INT_RISC_RD_BERRINT | PCI_INT_RISC_WR_BERRINT |
2968 PCI_INT_BRDG_BERRINT | PCI_INT_SRC_DMA_BERRINT |
2969 PCI_INT_DST_DMA_BERRINT | PCI_INT_IPB_DMA_BERRINT;
Trent Piephobbc83592007-08-15 14:41:58 -03002970 mutex_init(&core->lock);
2971
2972 core->nr = nr;
2973 sprintf(core->name, "cx88[%d]", core->nr);
2974 if (0 != cx88_get_resources(core, pci)) {
2975 kfree(core);
2976 return NULL;
2977 }
2978
2979 /* PCI stuff */
2980 cx88_pci_quirks(core->name, pci);
2981 core->lmmio = ioremap(pci_resource_start(pci, 0),
2982 pci_resource_len(pci, 0));
2983 core->bmmio = (u8 __iomem *)core->lmmio;
2984
2985 /* board config */
2986 core->boardnr = UNSET;
2987 if (card[core->nr] < ARRAY_SIZE(cx88_boards))
2988 core->boardnr = card[core->nr];
2989 for (i = 0; UNSET == core->boardnr && i < ARRAY_SIZE(cx88_subids); i++)
2990 if (pci->subsystem_vendor == cx88_subids[i].subvendor &&
2991 pci->subsystem_device == cx88_subids[i].subdevice)
2992 core->boardnr = cx88_subids[i].card;
2993 if (UNSET == core->boardnr) {
2994 core->boardnr = CX88_BOARD_UNKNOWN;
2995 cx88_card_list(core, pci);
2996 }
2997
2998 memcpy(&core->board, &cx88_boards[core->boardnr], sizeof(core->board));
2999
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03003000 info_printk(core, "subsystem: %04x:%04x, board: %s [card=%d,%s]\n",
3001 pci->subsystem_vendor, pci->subsystem_device, core->board.name,
Trent Piephobbc83592007-08-15 14:41:58 -03003002 core->boardnr, card[core->nr] == core->boardnr ?
3003 "insmod option" : "autodetected");
3004
3005 if (tuner[core->nr] != UNSET)
3006 core->board.tuner_type = tuner[core->nr];
3007 if (radio[core->nr] != UNSET)
3008 core->board.radio_type = radio[core->nr];
3009
Mauro Carvalho Chehab0f19e652008-04-22 14:45:29 -03003010 info_printk(core, "TV tuner type %d, Radio tuner type %d\n",
3011 core->board.tuner_type, core->board.radio_type);
Trent Piephobbc83592007-08-15 14:41:58 -03003012
3013 /* init hardware */
3014 cx88_reset(core);
3015 cx88_card_setup_pre_i2c(core);
3016 cx88_i2c_init(core, pci);
Mauro Carvalho Chehab189bf5f2008-02-19 16:22:25 -03003017
3018 /* load tuner module, if needed */
3019 if (TUNER_ABSENT != core->board.tuner_type)
3020 request_module("tuner");
3021
Trent Piephobbc83592007-08-15 14:41:58 -03003022 cx88_card_setup(core);
3023 cx88_ir_init(core, pci);
3024
3025 return core;
3026}