4 * Copyright (C) 2007 Mike Isely <isely@pobox.com>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 This source file should encompass ALL per-device type information for the
24 driver. To define a new device, add elements to the pvr2_device_table and
25 pvr2_device_desc structures.
29 #include "pvrusb2-devattr.h"
30 #include <linux/usb.h>
31 /* This is needed in order to pull in tuner type ids... */
32 #include <linux/i2c.h>
33 #include <media/tuner.h>
34 #ifdef CONFIG_VIDEO_PVRUSB2_DVB
35 #include "pvrusb2-hdw-internal.h"
42 #include "tuner-simple.h"
46 /*------------------------------------------------------------------------*/
47 /* Hauppauge PVR-USB2 Model 29xxx */
49 static const char *pvr2_client_29xxx[] = {
55 static const char *pvr2_fw1_names_29xxx[] = {
56 "v4l-pvrusb2-29xxx-01.fw",
59 static const struct pvr2_device_desc pvr2_device_29xxx = {
60 .description = "WinTV PVR USB2 Model Category 29xxx",
62 .client_modules.lst = pvr2_client_29xxx,
63 .client_modules.cnt = ARRAY_SIZE(pvr2_client_29xxx),
64 .fx2_firmware.lst = pvr2_fw1_names_29xxx,
65 .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_29xxx),
66 .flag_has_hauppauge_rom = !0,
67 .flag_has_analogtuner = !0,
68 .flag_has_fmradio = !0,
69 .flag_has_composite = !0,
70 .flag_has_svideo = !0,
71 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
72 .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
77 /*------------------------------------------------------------------------*/
78 /* Hauppauge PVR-USB2 Model 24xxx */
80 static const char *pvr2_client_24xxx[] = {
86 static const char *pvr2_fw1_names_24xxx[] = {
87 "v4l-pvrusb2-24xxx-01.fw",
90 static const struct pvr2_device_desc pvr2_device_24xxx = {
91 .description = "WinTV PVR USB2 Model Category 24xxx",
93 .client_modules.lst = pvr2_client_24xxx,
94 .client_modules.cnt = ARRAY_SIZE(pvr2_client_24xxx),
95 .fx2_firmware.lst = pvr2_fw1_names_24xxx,
96 .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_24xxx),
97 .flag_has_cx25840 = !0,
98 .flag_has_wm8775 = !0,
99 .flag_has_hauppauge_rom = !0,
100 .flag_has_hauppauge_custom_ir = !0,
101 .flag_has_analogtuner = !0,
102 .flag_has_fmradio = !0,
103 .flag_has_composite = !0,
104 .flag_has_svideo = !0,
105 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
106 .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
111 /*------------------------------------------------------------------------*/
112 /* GOTVIEW USB2.0 DVD2 */
114 static const char *pvr2_client_gotview_2[] = {
119 static const struct pvr2_device_desc pvr2_device_gotview_2 = {
120 .description = "Gotview USB 2.0 DVD 2",
122 .client_modules.lst = pvr2_client_gotview_2,
123 .client_modules.cnt = ARRAY_SIZE(pvr2_client_gotview_2),
124 .flag_has_cx25840 = !0,
125 .default_tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
126 .flag_has_analogtuner = !0,
127 .flag_has_fmradio = !0,
128 .flag_has_composite = !0,
129 .flag_has_svideo = !0,
130 .signal_routing_scheme = PVR2_ROUTING_SCHEME_GOTVIEW,
135 /*------------------------------------------------------------------------*/
136 /* GOTVIEW USB2.0 DVD Deluxe */
138 /* (same module list as gotview_2) */
140 static const struct pvr2_device_desc pvr2_device_gotview_2d = {
141 .description = "Gotview USB 2.0 DVD Deluxe",
143 .client_modules.lst = pvr2_client_gotview_2,
144 .client_modules.cnt = ARRAY_SIZE(pvr2_client_gotview_2),
145 .flag_has_cx25840 = !0,
146 .default_tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
147 .flag_has_analogtuner = !0,
148 .flag_has_composite = !0,
149 .flag_has_svideo = !0,
150 .signal_routing_scheme = PVR2_ROUTING_SCHEME_GOTVIEW,
155 /*------------------------------------------------------------------------*/
158 #ifdef CONFIG_VIDEO_PVRUSB2_DVB
159 static struct lgdt330x_config pvr2_lgdt3303_config = {
160 .demod_address = 0x0e,
161 .demod_chip = LGDT3303,
162 .clock_polarity_flip = 1,
165 static int pvr2_lgdt3303_attach(struct pvr2_dvb_adapter *adap)
167 adap->fe = dvb_attach(lgdt330x_attach, &pvr2_lgdt3303_config,
168 &adap->channel.hdw->i2c_adap);
175 static int pvr2_lgh06xf_attach(struct pvr2_dvb_adapter *adap)
177 dvb_attach(simple_tuner_attach, adap->fe,
178 &adap->channel.hdw->i2c_adap, 0x61,
179 TUNER_LG_TDVS_H06XF);
184 static struct pvr2_dvb_props pvr2_onair_creator_fe_props = {
185 .frontend_attach = pvr2_lgdt3303_attach,
186 .tuner_attach = pvr2_lgh06xf_attach,
190 static const char *pvr2_client_onair_creator[] = {
196 static const struct pvr2_device_desc pvr2_device_onair_creator = {
197 .description = "OnAir Creator Hybrid USB tuner",
199 .client_modules.lst = pvr2_client_onair_creator,
200 .client_modules.cnt = ARRAY_SIZE(pvr2_client_onair_creator),
201 .default_tuner_type = TUNER_LG_TDVS_H06XF,
202 .flag_has_analogtuner = !0,
203 .flag_has_composite = !0,
204 .flag_has_svideo = !0,
205 .flag_digital_requires_cx23416 = !0,
206 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
207 .digital_control_scheme = PVR2_DIGITAL_SCHEME_ONAIR,
208 .default_std_mask = V4L2_STD_NTSC_M,
209 #ifdef CONFIG_VIDEO_PVRUSB2_DVB
210 .dvb_props = &pvr2_onair_creator_fe_props,
216 /*------------------------------------------------------------------------*/
219 #ifdef CONFIG_VIDEO_PVRUSB2_DVB
220 static struct lgdt330x_config pvr2_lgdt3302_config = {
221 .demod_address = 0x0e,
222 .demod_chip = LGDT3302,
225 static int pvr2_lgdt3302_attach(struct pvr2_dvb_adapter *adap)
227 adap->fe = dvb_attach(lgdt330x_attach, &pvr2_lgdt3302_config,
228 &adap->channel.hdw->i2c_adap);
235 static int pvr2_fcv1236d_attach(struct pvr2_dvb_adapter *adap)
237 dvb_attach(simple_tuner_attach, adap->fe,
238 &adap->channel.hdw->i2c_adap, 0x61,
239 TUNER_PHILIPS_FCV1236D);
244 static struct pvr2_dvb_props pvr2_onair_usb2_fe_props = {
245 .frontend_attach = pvr2_lgdt3302_attach,
246 .tuner_attach = pvr2_fcv1236d_attach,
250 static const char *pvr2_client_onair_usb2[] = {
256 static const struct pvr2_device_desc pvr2_device_onair_usb2 = {
257 .description = "OnAir USB2 Hybrid USB tuner",
259 .client_modules.lst = pvr2_client_onair_usb2,
260 .client_modules.cnt = ARRAY_SIZE(pvr2_client_onair_usb2),
261 .default_tuner_type = TUNER_PHILIPS_FCV1236D,
262 .flag_has_analogtuner = !0,
263 .flag_has_composite = !0,
264 .flag_has_svideo = !0,
265 .flag_digital_requires_cx23416 = !0,
266 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
267 .digital_control_scheme = PVR2_DIGITAL_SCHEME_ONAIR,
268 .default_std_mask = V4L2_STD_NTSC_M,
269 #ifdef CONFIG_VIDEO_PVRUSB2_DVB
270 .dvb_props = &pvr2_onair_usb2_fe_props,
276 /*------------------------------------------------------------------------*/
277 /* Hauppauge PVR-USB2 Model 73xxx */
279 #ifdef CONFIG_VIDEO_PVRUSB2_DVB
280 static struct tda10048_config hauppauge_tda10048_config = {
281 .demod_address = 0x10 >> 1,
282 .output_mode = TDA10048_PARALLEL_OUTPUT,
283 .fwbulkwritelen = TDA10048_BULKWRITE_50,
284 .inversion = TDA10048_INVERSION_ON,
287 static struct tda829x_config tda829x_no_probe = {
288 .probe_tuner = TDA829X_DONT_PROBE,
291 static struct tda18271_config hauppauge_tda18271_dvb_config = {
292 .gate = TDA18271_GATE_ANALOG,
295 static int pvr2_tda10048_attach(struct pvr2_dvb_adapter *adap)
297 adap->fe = dvb_attach(tda10048_attach, &hauppauge_tda10048_config,
298 &adap->channel.hdw->i2c_adap);
305 static int pvr2_73xxx_tda18271_8295_attach(struct pvr2_dvb_adapter *adap)
307 dvb_attach(tda829x_attach, adap->fe,
308 &adap->channel.hdw->i2c_adap, 0x42,
310 dvb_attach(tda18271_attach, adap->fe, 0x60,
311 &adap->channel.hdw->i2c_adap,
312 &hauppauge_tda18271_dvb_config);
317 static struct pvr2_dvb_props pvr2_73xxx_dvb_props = {
318 .frontend_attach = pvr2_tda10048_attach,
319 .tuner_attach = pvr2_73xxx_tda18271_8295_attach,
323 static const char *pvr2_client_73xxx[] = {
328 static const char *pvr2_fw1_names_73xxx[] = {
329 "v4l-pvrusb2-73xxx-01.fw",
332 static const struct pvr2_device_desc pvr2_device_73xxx = {
333 .description = "WinTV PVR USB2 Model Category 73xxx",
334 .shortname = "73xxx",
335 .client_modules.lst = pvr2_client_73xxx,
336 .client_modules.cnt = ARRAY_SIZE(pvr2_client_73xxx),
337 .fx2_firmware.lst = pvr2_fw1_names_73xxx,
338 .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_73xxx),
339 .flag_has_cx25840 = !0,
340 .flag_has_hauppauge_rom = !0,
341 .flag_has_analogtuner = !0,
342 .flag_has_composite = !0,
343 .flag_has_svideo = !0,
344 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
345 .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE,
346 .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
347 #ifdef CONFIG_VIDEO_PVRUSB2_DVB
348 .dvb_props = &pvr2_73xxx_dvb_props,
354 /*------------------------------------------------------------------------*/
355 /* Hauppauge PVR-USB2 Model 75xxx */
357 #ifdef CONFIG_VIDEO_PVRUSB2_DVB
358 static struct s5h1409_config pvr2_s5h1409_config = {
359 .demod_address = 0x32 >> 1,
360 .output_mode = S5H1409_PARALLEL_OUTPUT,
361 .gpio = S5H1409_GPIO_OFF,
363 .inversion = S5H1409_INVERSION_ON,
364 .status_mode = S5H1409_DEMODLOCKING,
367 static struct s5h1411_config pvr2_s5h1411_config = {
368 .output_mode = S5H1411_PARALLEL_OUTPUT,
369 .gpio = S5H1411_GPIO_OFF,
370 .vsb_if = S5H1411_IF_44000,
371 .qam_if = S5H1411_IF_4000,
372 .inversion = S5H1411_INVERSION_ON,
373 .status_mode = S5H1411_DEMODLOCKING,
376 static struct tda18271_std_map hauppauge_tda18271_std_map = {
377 .atsc_6 = { .if_freq = 5380, .agc_mode = 3, .std = 3,
378 .if_lvl = 6, .rfagc_top = 0x37, },
379 .qam_6 = { .if_freq = 4000, .agc_mode = 3, .std = 0,
380 .if_lvl = 6, .rfagc_top = 0x37, },
383 static struct tda18271_config hauppauge_tda18271_config = {
384 .std_map = &hauppauge_tda18271_std_map,
385 .gate = TDA18271_GATE_ANALOG,
388 static int pvr2_s5h1409_attach(struct pvr2_dvb_adapter *adap)
390 adap->fe = dvb_attach(s5h1409_attach, &pvr2_s5h1409_config,
391 &adap->channel.hdw->i2c_adap);
398 static int pvr2_s5h1411_attach(struct pvr2_dvb_adapter *adap)
400 adap->fe = dvb_attach(s5h1411_attach, &pvr2_s5h1411_config,
401 &adap->channel.hdw->i2c_adap);
408 static int pvr2_tda18271_8295_attach(struct pvr2_dvb_adapter *adap)
410 dvb_attach(tda829x_attach, adap->fe,
411 &adap->channel.hdw->i2c_adap, 0x42,
413 dvb_attach(tda18271_attach, adap->fe, 0x60,
414 &adap->channel.hdw->i2c_adap,
415 &hauppauge_tda18271_config);
420 static struct pvr2_dvb_props pvr2_750xx_dvb_props = {
421 .frontend_attach = pvr2_s5h1409_attach,
422 .tuner_attach = pvr2_tda18271_8295_attach,
425 static struct pvr2_dvb_props pvr2_751xx_dvb_props = {
426 .frontend_attach = pvr2_s5h1411_attach,
427 .tuner_attach = pvr2_tda18271_8295_attach,
431 static const char *pvr2_client_75xxx[] = {
436 static const char *pvr2_fw1_names_75xxx[] = {
437 "v4l-pvrusb2-73xxx-01.fw",
440 static const struct pvr2_device_desc pvr2_device_750xx = {
441 .description = "WinTV PVR USB2 Model Category 750xx",
442 .shortname = "750xx",
443 .client_modules.lst = pvr2_client_75xxx,
444 .client_modules.cnt = ARRAY_SIZE(pvr2_client_75xxx),
445 .fx2_firmware.lst = pvr2_fw1_names_75xxx,
446 .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_75xxx),
447 .flag_has_cx25840 = !0,
448 .flag_has_hauppauge_rom = !0,
449 .flag_has_analogtuner = !0,
450 .flag_has_composite = !0,
451 .flag_has_svideo = !0,
452 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
453 .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE,
454 .default_std_mask = V4L2_STD_NTSC_M,
455 .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
456 #ifdef CONFIG_VIDEO_PVRUSB2_DVB
457 .dvb_props = &pvr2_750xx_dvb_props,
461 static const struct pvr2_device_desc pvr2_device_751xx = {
462 .description = "WinTV PVR USB2 Model Category 751xx",
463 .shortname = "751xx",
464 .client_modules.lst = pvr2_client_75xxx,
465 .client_modules.cnt = ARRAY_SIZE(pvr2_client_75xxx),
466 .fx2_firmware.lst = pvr2_fw1_names_75xxx,
467 .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_75xxx),
468 .flag_has_cx25840 = !0,
469 .flag_has_hauppauge_rom = !0,
470 .flag_has_analogtuner = !0,
471 .flag_has_composite = !0,
472 .flag_has_svideo = !0,
473 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
474 .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE,
475 .default_std_mask = V4L2_STD_NTSC_M,
476 .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
477 #ifdef CONFIG_VIDEO_PVRUSB2_DVB
478 .dvb_props = &pvr2_751xx_dvb_props,
484 /*------------------------------------------------------------------------*/
486 struct usb_device_id pvr2_device_table[] = {
487 { USB_DEVICE(0x2040, 0x2900),
488 .driver_info = (kernel_ulong_t)&pvr2_device_29xxx},
489 { USB_DEVICE(0x2040, 0x2400),
490 .driver_info = (kernel_ulong_t)&pvr2_device_24xxx},
491 { USB_DEVICE(0x1164, 0x0622),
492 .driver_info = (kernel_ulong_t)&pvr2_device_gotview_2},
493 { USB_DEVICE(0x1164, 0x0602),
494 .driver_info = (kernel_ulong_t)&pvr2_device_gotview_2d},
495 { USB_DEVICE(0x11ba, 0x1003),
496 .driver_info = (kernel_ulong_t)&pvr2_device_onair_creator},
497 { USB_DEVICE(0x11ba, 0x1001),
498 .driver_info = (kernel_ulong_t)&pvr2_device_onair_usb2},
499 { USB_DEVICE(0x2040, 0x7300),
500 .driver_info = (kernel_ulong_t)&pvr2_device_73xxx},
501 { USB_DEVICE(0x2040, 0x7500),
502 .driver_info = (kernel_ulong_t)&pvr2_device_750xx},
503 { USB_DEVICE(0x2040, 0x7501),
504 .driver_info = (kernel_ulong_t)&pvr2_device_751xx},
508 MODULE_DEVICE_TABLE(usb, pvr2_device_table);
512 Stuff for Emacs to see, in order to encourage consistent editing style:
513 *** Local Variables: ***
515 *** fill-column: 75 ***
517 *** c-basic-offset: 8 ***