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 struct pvr2_device_client_desc pvr2_cli_29xxx[] = {
50 { .module_id = PVR2_CLIENT_ID_SAA7115 },
51 { .module_id = PVR2_CLIENT_ID_MSP3400 },
52 { .module_id = PVR2_CLIENT_ID_TUNER },
53 { .module_id = PVR2_CLIENT_ID_DEMOD },
56 static const char *pvr2_fw1_names_29xxx[] = {
57 "v4l-pvrusb2-29xxx-01.fw",
60 static const struct pvr2_device_desc pvr2_device_29xxx = {
61 .description = "WinTV PVR USB2 Model Category 29xxx",
63 .client_table.lst = pvr2_cli_29xxx,
64 .client_table.cnt = ARRAY_SIZE(pvr2_cli_29xxx),
65 .fx2_firmware.lst = pvr2_fw1_names_29xxx,
66 .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_29xxx),
67 .flag_has_hauppauge_rom = !0,
68 .flag_has_analogtuner = !0,
69 .flag_has_fmradio = !0,
70 .flag_has_composite = !0,
71 .flag_has_svideo = !0,
72 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
73 .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
78 /*------------------------------------------------------------------------*/
79 /* Hauppauge PVR-USB2 Model 24xxx */
81 static const struct pvr2_device_client_desc pvr2_cli_24xxx[] = {
82 { .module_id = PVR2_CLIENT_ID_CX25840 },
83 { .module_id = PVR2_CLIENT_ID_TUNER },
84 { .module_id = PVR2_CLIENT_ID_WM8775 },
85 { .module_id = PVR2_CLIENT_ID_DEMOD },
88 static const char *pvr2_fw1_names_24xxx[] = {
89 "v4l-pvrusb2-24xxx-01.fw",
92 static const struct pvr2_device_desc pvr2_device_24xxx = {
93 .description = "WinTV PVR USB2 Model Category 24xxx",
95 .client_table.lst = pvr2_cli_24xxx,
96 .client_table.cnt = ARRAY_SIZE(pvr2_cli_24xxx),
97 .fx2_firmware.lst = pvr2_fw1_names_24xxx,
98 .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_24xxx),
99 .flag_has_cx25840 = !0,
100 .flag_has_wm8775 = !0,
101 .flag_has_hauppauge_rom = !0,
102 .flag_has_analogtuner = !0,
103 .flag_has_fmradio = !0,
104 .flag_has_composite = !0,
105 .flag_has_svideo = !0,
106 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
107 .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
108 .ir_scheme = PVR2_IR_SCHEME_24XXX,
113 /*------------------------------------------------------------------------*/
114 /* GOTVIEW USB2.0 DVD2 */
116 static const struct pvr2_device_client_desc pvr2_cli_gotview_2[] = {
117 { .module_id = PVR2_CLIENT_ID_CX25840 },
118 { .module_id = PVR2_CLIENT_ID_TUNER },
121 static const struct pvr2_device_desc pvr2_device_gotview_2 = {
122 .description = "Gotview USB 2.0 DVD 2",
124 .client_table.lst = pvr2_cli_gotview_2,
125 .client_table.cnt = ARRAY_SIZE(pvr2_cli_gotview_2),
126 .flag_has_cx25840 = !0,
127 .default_tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
128 .flag_has_analogtuner = !0,
129 .flag_has_fmradio = !0,
130 .flag_has_composite = !0,
131 .flag_has_svideo = !0,
132 .signal_routing_scheme = PVR2_ROUTING_SCHEME_GOTVIEW,
137 /*------------------------------------------------------------------------*/
138 /* GOTVIEW USB2.0 DVD Deluxe */
140 /* (same module list as gotview_2) */
142 static const struct pvr2_device_desc pvr2_device_gotview_2d = {
143 .description = "Gotview USB 2.0 DVD Deluxe",
145 .client_table.lst = pvr2_cli_gotview_2,
146 .client_table.cnt = ARRAY_SIZE(pvr2_cli_gotview_2),
147 .flag_has_cx25840 = !0,
148 .default_tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
149 .flag_has_analogtuner = !0,
150 .flag_has_composite = !0,
151 .flag_has_svideo = !0,
152 .signal_routing_scheme = PVR2_ROUTING_SCHEME_GOTVIEW,
157 /*------------------------------------------------------------------------*/
160 #ifdef CONFIG_VIDEO_PVRUSB2_DVB
161 static struct lgdt330x_config pvr2_lgdt3303_config = {
162 .demod_address = 0x0e,
163 .demod_chip = LGDT3303,
164 .clock_polarity_flip = 1,
167 static int pvr2_lgdt3303_attach(struct pvr2_dvb_adapter *adap)
169 adap->fe = dvb_attach(lgdt330x_attach, &pvr2_lgdt3303_config,
170 &adap->channel.hdw->i2c_adap);
177 static int pvr2_lgh06xf_attach(struct pvr2_dvb_adapter *adap)
179 dvb_attach(simple_tuner_attach, adap->fe,
180 &adap->channel.hdw->i2c_adap, 0x61,
181 TUNER_LG_TDVS_H06XF);
186 static const struct pvr2_dvb_props pvr2_onair_creator_fe_props = {
187 .frontend_attach = pvr2_lgdt3303_attach,
188 .tuner_attach = pvr2_lgh06xf_attach,
192 static const struct pvr2_device_client_desc pvr2_cli_onair_creator[] = {
193 { .module_id = PVR2_CLIENT_ID_SAA7115 },
194 { .module_id = PVR2_CLIENT_ID_CS53L32A },
195 { .module_id = PVR2_CLIENT_ID_TUNER },
198 static const struct pvr2_device_desc pvr2_device_onair_creator = {
199 .description = "OnAir Creator Hybrid USB tuner",
201 .client_table.lst = pvr2_cli_onair_creator,
202 .client_table.cnt = ARRAY_SIZE(pvr2_cli_onair_creator),
203 .default_tuner_type = TUNER_LG_TDVS_H06XF,
204 .flag_has_analogtuner = !0,
205 .flag_has_composite = !0,
206 .flag_has_svideo = !0,
207 .flag_digital_requires_cx23416 = !0,
208 .signal_routing_scheme = PVR2_ROUTING_SCHEME_ONAIR,
209 .digital_control_scheme = PVR2_DIGITAL_SCHEME_ONAIR,
210 .default_std_mask = V4L2_STD_NTSC_M,
211 #ifdef CONFIG_VIDEO_PVRUSB2_DVB
212 .dvb_props = &pvr2_onair_creator_fe_props,
218 /*------------------------------------------------------------------------*/
221 #ifdef CONFIG_VIDEO_PVRUSB2_DVB
222 static struct lgdt330x_config pvr2_lgdt3302_config = {
223 .demod_address = 0x0e,
224 .demod_chip = LGDT3302,
227 static int pvr2_lgdt3302_attach(struct pvr2_dvb_adapter *adap)
229 adap->fe = dvb_attach(lgdt330x_attach, &pvr2_lgdt3302_config,
230 &adap->channel.hdw->i2c_adap);
237 static int pvr2_fcv1236d_attach(struct pvr2_dvb_adapter *adap)
239 dvb_attach(simple_tuner_attach, adap->fe,
240 &adap->channel.hdw->i2c_adap, 0x61,
241 TUNER_PHILIPS_FCV1236D);
246 static const struct pvr2_dvb_props pvr2_onair_usb2_fe_props = {
247 .frontend_attach = pvr2_lgdt3302_attach,
248 .tuner_attach = pvr2_fcv1236d_attach,
252 static const struct pvr2_device_client_desc pvr2_cli_onair_usb2[] = {
253 { .module_id = PVR2_CLIENT_ID_SAA7115 },
254 { .module_id = PVR2_CLIENT_ID_CS53L32A },
255 { .module_id = PVR2_CLIENT_ID_TUNER },
258 static const struct pvr2_device_desc pvr2_device_onair_usb2 = {
259 .description = "OnAir USB2 Hybrid USB tuner",
261 .client_table.lst = pvr2_cli_onair_usb2,
262 .client_table.cnt = ARRAY_SIZE(pvr2_cli_onair_usb2),
263 .default_tuner_type = TUNER_PHILIPS_FCV1236D,
264 .flag_has_analogtuner = !0,
265 .flag_has_composite = !0,
266 .flag_has_svideo = !0,
267 .flag_digital_requires_cx23416 = !0,
268 .signal_routing_scheme = PVR2_ROUTING_SCHEME_ONAIR,
269 .digital_control_scheme = PVR2_DIGITAL_SCHEME_ONAIR,
270 .default_std_mask = V4L2_STD_NTSC_M,
271 #ifdef CONFIG_VIDEO_PVRUSB2_DVB
272 .dvb_props = &pvr2_onair_usb2_fe_props,
278 /*------------------------------------------------------------------------*/
279 /* Hauppauge PVR-USB2 Model 73xxx */
281 #ifdef CONFIG_VIDEO_PVRUSB2_DVB
282 static struct tda10048_config hauppauge_tda10048_config = {
283 .demod_address = 0x10 >> 1,
284 .output_mode = TDA10048_PARALLEL_OUTPUT,
285 .fwbulkwritelen = TDA10048_BULKWRITE_50,
286 .inversion = TDA10048_INVERSION_ON,
289 static struct tda829x_config tda829x_no_probe = {
290 .probe_tuner = TDA829X_DONT_PROBE,
293 static struct tda18271_config hauppauge_tda18271_dvb_config = {
294 .gate = TDA18271_GATE_ANALOG,
297 static int pvr2_tda10048_attach(struct pvr2_dvb_adapter *adap)
299 adap->fe = dvb_attach(tda10048_attach, &hauppauge_tda10048_config,
300 &adap->channel.hdw->i2c_adap);
307 static int pvr2_73xxx_tda18271_8295_attach(struct pvr2_dvb_adapter *adap)
309 dvb_attach(tda829x_attach, adap->fe,
310 &adap->channel.hdw->i2c_adap, 0x42,
312 dvb_attach(tda18271_attach, adap->fe, 0x60,
313 &adap->channel.hdw->i2c_adap,
314 &hauppauge_tda18271_dvb_config);
319 static const struct pvr2_dvb_props pvr2_73xxx_dvb_props = {
320 .frontend_attach = pvr2_tda10048_attach,
321 .tuner_attach = pvr2_73xxx_tda18271_8295_attach,
325 static const struct pvr2_device_client_desc pvr2_cli_73xxx[] = {
326 { .module_id = PVR2_CLIENT_ID_CX25840 },
327 { .module_id = PVR2_CLIENT_ID_TUNER,
328 .i2c_address_list = "\x42"},
331 static const char *pvr2_fw1_names_73xxx[] = {
332 "v4l-pvrusb2-73xxx-01.fw",
335 static const struct pvr2_device_desc pvr2_device_73xxx = {
336 .description = "WinTV HVR-1900 Model Category 73xxx",
337 .shortname = "73xxx",
338 .client_table.lst = pvr2_cli_73xxx,
339 .client_table.cnt = ARRAY_SIZE(pvr2_cli_73xxx),
340 .fx2_firmware.lst = pvr2_fw1_names_73xxx,
341 .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_73xxx),
342 .flag_has_cx25840 = !0,
343 .flag_has_hauppauge_rom = !0,
344 .flag_has_analogtuner = !0,
345 .flag_has_composite = !0,
346 .flag_has_svideo = !0,
347 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
348 .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE,
349 .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
350 .ir_scheme = PVR2_IR_SCHEME_ZILOG,
351 #ifdef CONFIG_VIDEO_PVRUSB2_DVB
352 .dvb_props = &pvr2_73xxx_dvb_props,
358 /*------------------------------------------------------------------------*/
359 /* Hauppauge PVR-USB2 Model 75xxx */
361 #ifdef CONFIG_VIDEO_PVRUSB2_DVB
362 static struct s5h1409_config pvr2_s5h1409_config = {
363 .demod_address = 0x32 >> 1,
364 .output_mode = S5H1409_PARALLEL_OUTPUT,
365 .gpio = S5H1409_GPIO_OFF,
367 .inversion = S5H1409_INVERSION_ON,
368 .status_mode = S5H1409_DEMODLOCKING,
371 static struct s5h1411_config pvr2_s5h1411_config = {
372 .output_mode = S5H1411_PARALLEL_OUTPUT,
373 .gpio = S5H1411_GPIO_OFF,
374 .vsb_if = S5H1411_IF_44000,
375 .qam_if = S5H1411_IF_4000,
376 .inversion = S5H1411_INVERSION_ON,
377 .status_mode = S5H1411_DEMODLOCKING,
380 static struct tda18271_std_map hauppauge_tda18271_std_map = {
381 .atsc_6 = { .if_freq = 5380, .agc_mode = 3, .std = 3,
382 .if_lvl = 6, .rfagc_top = 0x37, },
383 .qam_6 = { .if_freq = 4000, .agc_mode = 3, .std = 0,
384 .if_lvl = 6, .rfagc_top = 0x37, },
387 static struct tda18271_config hauppauge_tda18271_config = {
388 .std_map = &hauppauge_tda18271_std_map,
389 .gate = TDA18271_GATE_ANALOG,
392 static int pvr2_s5h1409_attach(struct pvr2_dvb_adapter *adap)
394 adap->fe = dvb_attach(s5h1409_attach, &pvr2_s5h1409_config,
395 &adap->channel.hdw->i2c_adap);
402 static int pvr2_s5h1411_attach(struct pvr2_dvb_adapter *adap)
404 adap->fe = dvb_attach(s5h1411_attach, &pvr2_s5h1411_config,
405 &adap->channel.hdw->i2c_adap);
412 static int pvr2_tda18271_8295_attach(struct pvr2_dvb_adapter *adap)
414 dvb_attach(tda829x_attach, adap->fe,
415 &adap->channel.hdw->i2c_adap, 0x42,
417 dvb_attach(tda18271_attach, adap->fe, 0x60,
418 &adap->channel.hdw->i2c_adap,
419 &hauppauge_tda18271_config);
424 static const struct pvr2_dvb_props pvr2_750xx_dvb_props = {
425 .frontend_attach = pvr2_s5h1409_attach,
426 .tuner_attach = pvr2_tda18271_8295_attach,
429 static const struct pvr2_dvb_props pvr2_751xx_dvb_props = {
430 .frontend_attach = pvr2_s5h1411_attach,
431 .tuner_attach = pvr2_tda18271_8295_attach,
435 static const char *pvr2_fw1_names_75xxx[] = {
436 "v4l-pvrusb2-73xxx-01.fw",
439 static const struct pvr2_device_desc pvr2_device_750xx = {
440 .description = "WinTV HVR-1950 Model Category 750xx",
441 .shortname = "750xx",
442 .client_table.lst = pvr2_cli_73xxx,
443 .client_table.cnt = ARRAY_SIZE(pvr2_cli_73xxx),
444 .fx2_firmware.lst = pvr2_fw1_names_75xxx,
445 .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_75xxx),
446 .flag_has_cx25840 = !0,
447 .flag_has_hauppauge_rom = !0,
448 .flag_has_analogtuner = !0,
449 .flag_has_composite = !0,
450 .flag_has_svideo = !0,
451 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
452 .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE,
453 .default_std_mask = V4L2_STD_NTSC_M,
454 .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
455 .ir_scheme = PVR2_IR_SCHEME_ZILOG,
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 HVR-1950 Model Category 751xx",
463 .shortname = "751xx",
464 .client_table.lst = pvr2_cli_73xxx,
465 .client_table.cnt = ARRAY_SIZE(pvr2_cli_73xxx),
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 .ir_scheme = PVR2_IR_SCHEME_ZILOG,
478 #ifdef CONFIG_VIDEO_PVRUSB2_DVB
479 .dvb_props = &pvr2_751xx_dvb_props,
485 /*------------------------------------------------------------------------*/
487 struct usb_device_id pvr2_device_table[] = {
488 { USB_DEVICE(0x2040, 0x2900),
489 .driver_info = (kernel_ulong_t)&pvr2_device_29xxx},
490 { USB_DEVICE(0x2040, 0x2950), /* Logically identical to 2900 */
491 .driver_info = (kernel_ulong_t)&pvr2_device_29xxx},
492 { USB_DEVICE(0x2040, 0x2400),
493 .driver_info = (kernel_ulong_t)&pvr2_device_24xxx},
494 { USB_DEVICE(0x1164, 0x0622),
495 .driver_info = (kernel_ulong_t)&pvr2_device_gotview_2},
496 { USB_DEVICE(0x1164, 0x0602),
497 .driver_info = (kernel_ulong_t)&pvr2_device_gotview_2d},
498 { USB_DEVICE(0x11ba, 0x1003),
499 .driver_info = (kernel_ulong_t)&pvr2_device_onair_creator},
500 { USB_DEVICE(0x11ba, 0x1001),
501 .driver_info = (kernel_ulong_t)&pvr2_device_onair_usb2},
502 { USB_DEVICE(0x2040, 0x7300),
503 .driver_info = (kernel_ulong_t)&pvr2_device_73xxx},
504 { USB_DEVICE(0x2040, 0x7500),
505 .driver_info = (kernel_ulong_t)&pvr2_device_750xx},
506 { USB_DEVICE(0x2040, 0x7501),
507 .driver_info = (kernel_ulong_t)&pvr2_device_751xx},
511 MODULE_DEVICE_TABLE(usb, pvr2_device_table);
515 Stuff for Emacs to see, in order to encourage consistent editing style:
516 *** Local Variables: ***
518 *** fill-column: 75 ***
520 *** c-basic-offset: 8 ***