blob: e799331389b1b7dc3e92af6a15e8ef7469d5a89e [file] [log] [blame]
Mike Isely989eb152007-11-26 01:53:12 -03001/*
2 *
Mike Isely989eb152007-11-26 01:53:12 -03003 *
4 * Copyright (C) 2007 Mike Isely <isely@pobox.com>
5 *
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
9 *
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.
14 *
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
18 *
19 */
20
21/*
22
23This source file should encompass ALL per-device type information for the
24driver. To define a new device, add elements to the pvr2_device_table and
25pvr2_device_desc structures.
26
27*/
28
29#include "pvrusb2-devattr.h"
30#include <linux/usb.h>
Mike Isely6a540252007-12-02 23:51:34 -030031/* This is needed in order to pull in tuner type ids... */
Mike Isely9e2e3ae2007-11-26 02:14:23 -030032#include <linux/i2c.h>
Mike Isely9e2e3ae2007-11-26 02:14:23 -030033#include <media/tuner.h>
Michael Krufky906a4952008-03-28 05:47:47 -030034#ifdef CONFIG_VIDEO_PVRUSB2_DVB
35#include "pvrusb2-hdw-internal.h"
36#include "lgdt330x.h"
Michael Krufky087886e2008-03-28 05:49:36 -030037#include "s5h1409.h"
Michael Krufky4aef8fd2008-04-25 04:19:02 -030038#include "s5h1411.h"
Michael Krufky95814bc2008-04-19 15:36:51 -030039#include "tda10048.h"
Michael Krufky087886e2008-03-28 05:49:36 -030040#include "tda18271.h"
41#include "tda8290.h"
Michael Krufky906a4952008-03-28 05:47:47 -030042#include "tuner-simple.h"
43#endif
Mike Isely989eb152007-11-26 01:53:12 -030044
Mike Isely45427832007-12-08 17:11:13 -030045
Mike Iselyd130fa82007-12-08 17:20:06 -030046/*------------------------------------------------------------------------*/
47/* Hauppauge PVR-USB2 Model 29xxx */
Mike Isely989eb152007-11-26 01:53:12 -030048
Mike Iselydd5f3222009-03-07 02:07:12 -030049static 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 },
Mike Iselybb652422009-03-14 14:09:04 -030053 { .module_id = PVR2_CLIENT_ID_DEMOD },
Mike Isely989eb152007-11-26 01:53:12 -030054};
55
Mike Isely989eb152007-11-26 01:53:12 -030056static const char *pvr2_fw1_names_29xxx[] = {
57 "v4l-pvrusb2-29xxx-01.fw",
58};
59
Mike Iselyd130fa82007-12-08 17:20:06 -030060static const struct pvr2_device_desc pvr2_device_29xxx = {
Mike Isely1d70c7f2009-11-25 02:55:38 -030061 .description = "WinTV PVR USB2 Model 29xxx",
Mike Isely989eb152007-11-26 01:53:12 -030062 .shortname = "29xxx",
Mike Iselydd5f3222009-03-07 02:07:12 -030063 .client_table.lst = pvr2_cli_29xxx,
64 .client_table.cnt = ARRAY_SIZE(pvr2_cli_29xxx),
Mike Isely989eb152007-11-26 01:53:12 -030065 .fx2_firmware.lst = pvr2_fw1_names_29xxx,
66 .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_29xxx),
Mike Iselyaaf78842007-11-26 02:04:11 -030067 .flag_has_hauppauge_rom = !0,
Mike Isely1aaac602008-04-22 14:45:36 -030068 .flag_has_analogtuner = !0,
Mike Iselyd068c6e2008-04-22 14:45:36 -030069 .flag_has_fmradio = !0,
Mike Isely1aaac602008-04-22 14:45:36 -030070 .flag_has_composite = !0,
71 .flag_has_svideo = !0,
Mike Iselyf5174af2007-11-26 02:07:26 -030072 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
Mike Isely40381cb2008-04-22 14:45:42 -030073 .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
Mike Isely27eab382009-04-06 01:51:38 -030074 .ir_scheme = PVR2_IR_SCHEME_29XXX,
Mike Iselyd130fa82007-12-08 17:20:06 -030075};
76
77
78
79/*------------------------------------------------------------------------*/
80/* Hauppauge PVR-USB2 Model 24xxx */
81
Mike Iselydd5f3222009-03-07 02:07:12 -030082static const struct pvr2_device_client_desc pvr2_cli_24xxx[] = {
83 { .module_id = PVR2_CLIENT_ID_CX25840 },
84 { .module_id = PVR2_CLIENT_ID_TUNER },
85 { .module_id = PVR2_CLIENT_ID_WM8775 },
Mike Iselybb652422009-03-14 14:09:04 -030086 { .module_id = PVR2_CLIENT_ID_DEMOD },
Mike Iselyd130fa82007-12-08 17:20:06 -030087};
88
89static const char *pvr2_fw1_names_24xxx[] = {
90 "v4l-pvrusb2-24xxx-01.fw",
91};
92
93static const struct pvr2_device_desc pvr2_device_24xxx = {
Mike Isely1d70c7f2009-11-25 02:55:38 -030094 .description = "WinTV PVR USB2 Model 24xxx",
Mike Isely989eb152007-11-26 01:53:12 -030095 .shortname = "24xxx",
Mike Iselydd5f3222009-03-07 02:07:12 -030096 .client_table.lst = pvr2_cli_24xxx,
97 .client_table.cnt = ARRAY_SIZE(pvr2_cli_24xxx),
Mike Isely989eb152007-11-26 01:53:12 -030098 .fx2_firmware.lst = pvr2_fw1_names_24xxx,
99 .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_24xxx),
100 .flag_has_cx25840 = !0,
101 .flag_has_wm8775 = !0,
Mike Iselyaaf78842007-11-26 02:04:11 -0300102 .flag_has_hauppauge_rom = !0,
Mike Isely1aaac602008-04-22 14:45:36 -0300103 .flag_has_analogtuner = !0,
Mike Iselyd068c6e2008-04-22 14:45:36 -0300104 .flag_has_fmradio = !0,
Mike Isely1aaac602008-04-22 14:45:36 -0300105 .flag_has_composite = !0,
106 .flag_has_svideo = !0,
Mike Iselyf5174af2007-11-26 02:07:26 -0300107 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
Mike Isely40381cb2008-04-22 14:45:42 -0300108 .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
Mike Isely31335b12008-07-25 19:35:31 -0300109 .ir_scheme = PVR2_IR_SCHEME_24XXX,
Mike Iselyd130fa82007-12-08 17:20:06 -0300110};
111
112
113
114/*------------------------------------------------------------------------*/
115/* GOTVIEW USB2.0 DVD2 */
116
Mike Iselydd5f3222009-03-07 02:07:12 -0300117static const struct pvr2_device_client_desc pvr2_cli_gotview_2[] = {
118 { .module_id = PVR2_CLIENT_ID_CX25840 },
119 { .module_id = PVR2_CLIENT_ID_TUNER },
Mike Iselyc641a182010-05-15 00:07:04 -0300120 { .module_id = PVR2_CLIENT_ID_DEMOD },
Mike Iselyd130fa82007-12-08 17:20:06 -0300121};
122
123static const struct pvr2_device_desc pvr2_device_gotview_2 = {
Mike Isely9e2e3ae2007-11-26 02:14:23 -0300124 .description = "Gotview USB 2.0 DVD 2",
125 .shortname = "gv2",
Mike Iselydd5f3222009-03-07 02:07:12 -0300126 .client_table.lst = pvr2_cli_gotview_2,
127 .client_table.cnt = ARRAY_SIZE(pvr2_cli_gotview_2),
Mike Isely787f5ab2007-12-08 17:08:32 -0300128 .flag_has_cx25840 = !0,
Mike Isely9e2e3ae2007-11-26 02:14:23 -0300129 .default_tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
Mike Isely1aaac602008-04-22 14:45:36 -0300130 .flag_has_analogtuner = !0,
Mike Isely1df59f02008-04-21 03:50:39 -0300131 .flag_has_fmradio = !0,
Mike Isely1aaac602008-04-22 14:45:36 -0300132 .flag_has_composite = !0,
133 .flag_has_svideo = !0,
Mike Isely9e2e3ae2007-11-26 02:14:23 -0300134 .signal_routing_scheme = PVR2_ROUTING_SCHEME_GOTVIEW,
Mike Isely989eb152007-11-26 01:53:12 -0300135};
136
Mike Iselyd130fa82007-12-08 17:20:06 -0300137
138
Mike Iselyfd1da782008-04-22 14:45:42 -0300139/*------------------------------------------------------------------------*/
140/* GOTVIEW USB2.0 DVD Deluxe */
141
142/* (same module list as gotview_2) */
143
144static const struct pvr2_device_desc pvr2_device_gotview_2d = {
145 .description = "Gotview USB 2.0 DVD Deluxe",
146 .shortname = "gv2d",
Mike Iselydd5f3222009-03-07 02:07:12 -0300147 .client_table.lst = pvr2_cli_gotview_2,
148 .client_table.cnt = ARRAY_SIZE(pvr2_cli_gotview_2),
Mike Iselyfd1da782008-04-22 14:45:42 -0300149 .flag_has_cx25840 = !0,
150 .default_tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
151 .flag_has_analogtuner = !0,
152 .flag_has_composite = !0,
153 .flag_has_svideo = !0,
154 .signal_routing_scheme = PVR2_ROUTING_SCHEME_GOTVIEW,
155};
156
157
158
Mike Iselyd130fa82007-12-08 17:20:06 -0300159/*------------------------------------------------------------------------*/
Mike Isely43823c02011-03-13 20:37:11 -0300160/* Terratec Grabster AV400 */
161
162static const struct pvr2_device_client_desc pvr2_cli_av400[] = {
163 { .module_id = PVR2_CLIENT_ID_CX25840 },
164};
165
166static const struct pvr2_device_desc pvr2_device_av400 = {
167 .description = "Terratec Grabster AV400",
168 .shortname = "av400",
169 .flag_is_experimental = 1,
170 .client_table.lst = pvr2_cli_av400,
171 .client_table.cnt = ARRAY_SIZE(pvr2_cli_av400),
172 .flag_has_cx25840 = !0,
173 .flag_has_analogtuner = 0,
174 .flag_has_composite = !0,
175 .flag_has_svideo = !0,
176 .signal_routing_scheme = PVR2_ROUTING_SCHEME_AV400,
177};
178
179
180
181/*------------------------------------------------------------------------*/
Mike Iselyd130fa82007-12-08 17:20:06 -0300182/* OnAir Creator */
183
Michael Krufky906a4952008-03-28 05:47:47 -0300184#ifdef CONFIG_VIDEO_PVRUSB2_DVB
185static struct lgdt330x_config pvr2_lgdt3303_config = {
186 .demod_address = 0x0e,
187 .demod_chip = LGDT3303,
188 .clock_polarity_flip = 1,
189};
190
191static int pvr2_lgdt3303_attach(struct pvr2_dvb_adapter *adap)
192{
193 adap->fe = dvb_attach(lgdt330x_attach, &pvr2_lgdt3303_config,
194 &adap->channel.hdw->i2c_adap);
195 if (adap->fe)
196 return 0;
197
198 return -EIO;
199}
200
201static int pvr2_lgh06xf_attach(struct pvr2_dvb_adapter *adap)
202{
203 dvb_attach(simple_tuner_attach, adap->fe,
204 &adap->channel.hdw->i2c_adap, 0x61,
205 TUNER_LG_TDVS_H06XF);
206
207 return 0;
208}
209
Mike Isely69ea3c12009-03-07 02:08:58 -0300210static const struct pvr2_dvb_props pvr2_onair_creator_fe_props = {
Michael Krufky906a4952008-03-28 05:47:47 -0300211 .frontend_attach = pvr2_lgdt3303_attach,
212 .tuner_attach = pvr2_lgh06xf_attach,
213};
214#endif
215
Mike Iselydd5f3222009-03-07 02:07:12 -0300216static const struct pvr2_device_client_desc pvr2_cli_onair_creator[] = {
217 { .module_id = PVR2_CLIENT_ID_SAA7115 },
218 { .module_id = PVR2_CLIENT_ID_CS53L32A },
219 { .module_id = PVR2_CLIENT_ID_TUNER },
Mike Iselyd130fa82007-12-08 17:20:06 -0300220};
221
222static const struct pvr2_device_desc pvr2_device_onair_creator = {
223 .description = "OnAir Creator Hybrid USB tuner",
224 .shortname = "oac",
Mike Iselydd5f3222009-03-07 02:07:12 -0300225 .client_table.lst = pvr2_cli_onair_creator,
226 .client_table.cnt = ARRAY_SIZE(pvr2_cli_onair_creator),
Mike Iselyd130fa82007-12-08 17:20:06 -0300227 .default_tuner_type = TUNER_LG_TDVS_H06XF,
Mike Isely1aaac602008-04-22 14:45:36 -0300228 .flag_has_analogtuner = !0,
229 .flag_has_composite = !0,
230 .flag_has_svideo = !0,
Mike Isely72998b72008-04-03 04:51:19 -0300231 .flag_digital_requires_cx23416 = !0,
Mike Isely2a6b6272009-03-15 17:53:29 -0300232 .signal_routing_scheme = PVR2_ROUTING_SCHEME_ONAIR,
Mike Iselye8f5bac2008-04-22 14:45:40 -0300233 .digital_control_scheme = PVR2_DIGITAL_SCHEME_ONAIR,
Michael Krufkyf0910c72008-04-22 14:45:45 -0300234 .default_std_mask = V4L2_STD_NTSC_M,
Michael Krufky906a4952008-03-28 05:47:47 -0300235#ifdef CONFIG_VIDEO_PVRUSB2_DVB
236 .dvb_props = &pvr2_onair_creator_fe_props,
237#endif
Mike Iselyd130fa82007-12-08 17:20:06 -0300238};
Mike Iselyd130fa82007-12-08 17:20:06 -0300239
240
241
Mike Iselyd130fa82007-12-08 17:20:06 -0300242/*------------------------------------------------------------------------*/
243/* OnAir USB 2.0 */
244
Michael Krufky906a4952008-03-28 05:47:47 -0300245#ifdef CONFIG_VIDEO_PVRUSB2_DVB
246static struct lgdt330x_config pvr2_lgdt3302_config = {
247 .demod_address = 0x0e,
248 .demod_chip = LGDT3302,
249};
250
251static int pvr2_lgdt3302_attach(struct pvr2_dvb_adapter *adap)
252{
253 adap->fe = dvb_attach(lgdt330x_attach, &pvr2_lgdt3302_config,
254 &adap->channel.hdw->i2c_adap);
255 if (adap->fe)
256 return 0;
257
258 return -EIO;
259}
260
261static int pvr2_fcv1236d_attach(struct pvr2_dvb_adapter *adap)
262{
263 dvb_attach(simple_tuner_attach, adap->fe,
264 &adap->channel.hdw->i2c_adap, 0x61,
265 TUNER_PHILIPS_FCV1236D);
266
267 return 0;
268}
269
Mike Isely69ea3c12009-03-07 02:08:58 -0300270static const struct pvr2_dvb_props pvr2_onair_usb2_fe_props = {
Michael Krufky906a4952008-03-28 05:47:47 -0300271 .frontend_attach = pvr2_lgdt3302_attach,
272 .tuner_attach = pvr2_fcv1236d_attach,
273};
274#endif
275
Mike Iselydd5f3222009-03-07 02:07:12 -0300276static const struct pvr2_device_client_desc pvr2_cli_onair_usb2[] = {
277 { .module_id = PVR2_CLIENT_ID_SAA7115 },
278 { .module_id = PVR2_CLIENT_ID_CS53L32A },
279 { .module_id = PVR2_CLIENT_ID_TUNER },
Mike Iselyd130fa82007-12-08 17:20:06 -0300280};
281
282static const struct pvr2_device_desc pvr2_device_onair_usb2 = {
283 .description = "OnAir USB2 Hybrid USB tuner",
284 .shortname = "oa2",
Mike Iselydd5f3222009-03-07 02:07:12 -0300285 .client_table.lst = pvr2_cli_onair_usb2,
286 .client_table.cnt = ARRAY_SIZE(pvr2_cli_onair_usb2),
Michael Krufkyab8b8702008-04-22 14:46:05 -0300287 .default_tuner_type = TUNER_PHILIPS_FCV1236D,
Mike Isely1aaac602008-04-22 14:45:36 -0300288 .flag_has_analogtuner = !0,
289 .flag_has_composite = !0,
290 .flag_has_svideo = !0,
Mike Isely72998b72008-04-03 04:51:19 -0300291 .flag_digital_requires_cx23416 = !0,
Mike Isely2a6b6272009-03-15 17:53:29 -0300292 .signal_routing_scheme = PVR2_ROUTING_SCHEME_ONAIR,
Mike Iselye8f5bac2008-04-22 14:45:40 -0300293 .digital_control_scheme = PVR2_DIGITAL_SCHEME_ONAIR,
Michael Krufkyf0910c72008-04-22 14:45:45 -0300294 .default_std_mask = V4L2_STD_NTSC_M,
Michael Krufky906a4952008-03-28 05:47:47 -0300295#ifdef CONFIG_VIDEO_PVRUSB2_DVB
296 .dvb_props = &pvr2_onair_usb2_fe_props,
297#endif
Mike Iselyd130fa82007-12-08 17:20:06 -0300298};
Mike Iselyd130fa82007-12-08 17:20:06 -0300299
300
301
302/*------------------------------------------------------------------------*/
Michael Krufky92c9d072008-03-15 23:59:29 -0300303/* Hauppauge PVR-USB2 Model 73xxx */
304
Michael Krufky95814bc2008-04-19 15:36:51 -0300305#ifdef CONFIG_VIDEO_PVRUSB2_DVB
306static struct tda10048_config hauppauge_tda10048_config = {
307 .demod_address = 0x10 >> 1,
308 .output_mode = TDA10048_PARALLEL_OUTPUT,
309 .fwbulkwritelen = TDA10048_BULKWRITE_50,
310 .inversion = TDA10048_INVERSION_ON,
Steven Toth08b83582009-05-15 21:04:56 -0300311 .dtv6_if_freq_khz = TDA10048_IF_3300,
312 .dtv7_if_freq_khz = TDA10048_IF_3800,
313 .dtv8_if_freq_khz = TDA10048_IF_4300,
Steven Tothc7470202009-05-02 11:09:08 -0300314 .clk_freq_khz = TDA10048_CLK_16000,
Steven Toth507a34f2009-05-05 19:31:42 -0300315 .disable_gate_access = 1,
Michael Krufky95814bc2008-04-19 15:36:51 -0300316};
317
318static struct tda829x_config tda829x_no_probe = {
319 .probe_tuner = TDA829X_DONT_PROBE,
320};
321
322static struct tda18271_config hauppauge_tda18271_dvb_config = {
323 .gate = TDA18271_GATE_ANALOG,
Michael Krufkya18eaf02009-08-29 17:47:01 -0300324 .output_opt = TDA18271_OUTPUT_LT_OFF,
Michael Krufky95814bc2008-04-19 15:36:51 -0300325};
326
327static int pvr2_tda10048_attach(struct pvr2_dvb_adapter *adap)
328{
329 adap->fe = dvb_attach(tda10048_attach, &hauppauge_tda10048_config,
330 &adap->channel.hdw->i2c_adap);
331 if (adap->fe)
332 return 0;
333
334 return -EIO;
335}
336
337static int pvr2_73xxx_tda18271_8295_attach(struct pvr2_dvb_adapter *adap)
338{
339 dvb_attach(tda829x_attach, adap->fe,
340 &adap->channel.hdw->i2c_adap, 0x42,
341 &tda829x_no_probe);
342 dvb_attach(tda18271_attach, adap->fe, 0x60,
343 &adap->channel.hdw->i2c_adap,
344 &hauppauge_tda18271_dvb_config);
345
346 return 0;
347}
348
Mike Isely69ea3c12009-03-07 02:08:58 -0300349static const struct pvr2_dvb_props pvr2_73xxx_dvb_props = {
Michael Krufky95814bc2008-04-19 15:36:51 -0300350 .frontend_attach = pvr2_tda10048_attach,
351 .tuner_attach = pvr2_73xxx_tda18271_8295_attach,
352};
353#endif
354
Mike Iselydd5f3222009-03-07 02:07:12 -0300355static const struct pvr2_device_client_desc pvr2_cli_73xxx[] = {
356 { .module_id = PVR2_CLIENT_ID_CX25840 },
357 { .module_id = PVR2_CLIENT_ID_TUNER,
358 .i2c_address_list = "\x42"},
Michael Krufky92c9d072008-03-15 23:59:29 -0300359};
360
361static const char *pvr2_fw1_names_73xxx[] = {
362 "v4l-pvrusb2-73xxx-01.fw",
363};
364
365static const struct pvr2_device_desc pvr2_device_73xxx = {
Mike Isely1d70c7f2009-11-25 02:55:38 -0300366 .description = "WinTV HVR-1900 Model 73xxx",
Michael Krufky92c9d072008-03-15 23:59:29 -0300367 .shortname = "73xxx",
Mike Iselydd5f3222009-03-07 02:07:12 -0300368 .client_table.lst = pvr2_cli_73xxx,
369 .client_table.cnt = ARRAY_SIZE(pvr2_cli_73xxx),
Michael Krufky92c9d072008-03-15 23:59:29 -0300370 .fx2_firmware.lst = pvr2_fw1_names_73xxx,
371 .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_73xxx),
372 .flag_has_cx25840 = !0,
373 .flag_has_hauppauge_rom = !0,
374 .flag_has_analogtuner = !0,
375 .flag_has_composite = !0,
376 .flag_has_svideo = !0,
Gary Francis75727462009-11-25 03:03:31 -0300377 .flag_fx2_16kb = !0,
Michael Krufky92c9d072008-03-15 23:59:29 -0300378 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
379 .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE,
380 .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
Mike Isely31335b12008-07-25 19:35:31 -0300381 .ir_scheme = PVR2_IR_SCHEME_ZILOG,
Michael Krufky95814bc2008-04-19 15:36:51 -0300382#ifdef CONFIG_VIDEO_PVRUSB2_DVB
383 .dvb_props = &pvr2_73xxx_dvb_props,
384#endif
Michael Krufky92c9d072008-03-15 23:59:29 -0300385};
386
387
388
389/*------------------------------------------------------------------------*/
Michael Krufky11fcd472007-10-25 02:01:10 -0300390/* Hauppauge PVR-USB2 Model 75xxx */
391
Michael Krufky087886e2008-03-28 05:49:36 -0300392#ifdef CONFIG_VIDEO_PVRUSB2_DVB
393static struct s5h1409_config pvr2_s5h1409_config = {
394 .demod_address = 0x32 >> 1,
395 .output_mode = S5H1409_PARALLEL_OUTPUT,
396 .gpio = S5H1409_GPIO_OFF,
397 .qam_if = 4000,
398 .inversion = S5H1409_INVERSION_ON,
399 .status_mode = S5H1409_DEMODLOCKING,
400};
401
Michael Krufky4aef8fd2008-04-25 04:19:02 -0300402static struct s5h1411_config pvr2_s5h1411_config = {
403 .output_mode = S5H1411_PARALLEL_OUTPUT,
404 .gpio = S5H1411_GPIO_OFF,
405 .vsb_if = S5H1411_IF_44000,
406 .qam_if = S5H1411_IF_4000,
407 .inversion = S5H1411_INVERSION_ON,
408 .status_mode = S5H1411_DEMODLOCKING,
409};
410
Michael Krufky087886e2008-03-28 05:49:36 -0300411static struct tda18271_std_map hauppauge_tda18271_std_map = {
412 .atsc_6 = { .if_freq = 5380, .agc_mode = 3, .std = 3,
413 .if_lvl = 6, .rfagc_top = 0x37, },
414 .qam_6 = { .if_freq = 4000, .agc_mode = 3, .std = 0,
415 .if_lvl = 6, .rfagc_top = 0x37, },
416};
417
418static struct tda18271_config hauppauge_tda18271_config = {
419 .std_map = &hauppauge_tda18271_std_map,
420 .gate = TDA18271_GATE_ANALOG,
Michael Krufkya18eaf02009-08-29 17:47:01 -0300421 .output_opt = TDA18271_OUTPUT_LT_OFF,
Michael Krufky087886e2008-03-28 05:49:36 -0300422};
423
424static int pvr2_s5h1409_attach(struct pvr2_dvb_adapter *adap)
425{
426 adap->fe = dvb_attach(s5h1409_attach, &pvr2_s5h1409_config,
427 &adap->channel.hdw->i2c_adap);
428 if (adap->fe)
429 return 0;
430
431 return -EIO;
432}
433
Michael Krufky4aef8fd2008-04-25 04:19:02 -0300434static int pvr2_s5h1411_attach(struct pvr2_dvb_adapter *adap)
435{
436 adap->fe = dvb_attach(s5h1411_attach, &pvr2_s5h1411_config,
437 &adap->channel.hdw->i2c_adap);
438 if (adap->fe)
439 return 0;
440
441 return -EIO;
442}
443
Michael Krufky087886e2008-03-28 05:49:36 -0300444static int pvr2_tda18271_8295_attach(struct pvr2_dvb_adapter *adap)
445{
446 dvb_attach(tda829x_attach, adap->fe,
447 &adap->channel.hdw->i2c_adap, 0x42,
448 &tda829x_no_probe);
449 dvb_attach(tda18271_attach, adap->fe, 0x60,
450 &adap->channel.hdw->i2c_adap,
451 &hauppauge_tda18271_config);
452
453 return 0;
454}
455
Mike Isely69ea3c12009-03-07 02:08:58 -0300456static const struct pvr2_dvb_props pvr2_750xx_dvb_props = {
Michael Krufky087886e2008-03-28 05:49:36 -0300457 .frontend_attach = pvr2_s5h1409_attach,
458 .tuner_attach = pvr2_tda18271_8295_attach,
459};
Michael Krufky4aef8fd2008-04-25 04:19:02 -0300460
Mike Isely69ea3c12009-03-07 02:08:58 -0300461static const struct pvr2_dvb_props pvr2_751xx_dvb_props = {
Michael Krufky4aef8fd2008-04-25 04:19:02 -0300462 .frontend_attach = pvr2_s5h1411_attach,
463 .tuner_attach = pvr2_tda18271_8295_attach,
464};
Michael Krufky087886e2008-03-28 05:49:36 -0300465#endif
466
Michael Krufky11fcd472007-10-25 02:01:10 -0300467static const char *pvr2_fw1_names_75xxx[] = {
468 "v4l-pvrusb2-73xxx-01.fw",
469};
470
Michael Krufkyc8812842008-03-28 05:48:44 -0300471static const struct pvr2_device_desc pvr2_device_750xx = {
Mike Isely1d70c7f2009-11-25 02:55:38 -0300472 .description = "WinTV HVR-1950 Model 750xx",
Michael Krufkyc8812842008-03-28 05:48:44 -0300473 .shortname = "750xx",
Mike Iselydd5f3222009-03-07 02:07:12 -0300474 .client_table.lst = pvr2_cli_73xxx,
475 .client_table.cnt = ARRAY_SIZE(pvr2_cli_73xxx),
Michael Krufkyc8812842008-03-28 05:48:44 -0300476 .fx2_firmware.lst = pvr2_fw1_names_75xxx,
477 .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_75xxx),
478 .flag_has_cx25840 = !0,
479 .flag_has_hauppauge_rom = !0,
480 .flag_has_analogtuner = !0,
481 .flag_has_composite = !0,
482 .flag_has_svideo = !0,
Mike Iselyc21c2db2009-11-25 02:49:21 -0300483 .flag_fx2_16kb = !0,
Michael Krufkyc8812842008-03-28 05:48:44 -0300484 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
485 .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE,
486 .default_std_mask = V4L2_STD_NTSC_M,
487 .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
Mike Isely31335b12008-07-25 19:35:31 -0300488 .ir_scheme = PVR2_IR_SCHEME_ZILOG,
Michael Krufky087886e2008-03-28 05:49:36 -0300489#ifdef CONFIG_VIDEO_PVRUSB2_DVB
490 .dvb_props = &pvr2_750xx_dvb_props,
491#endif
Michael Krufkyc8812842008-03-28 05:48:44 -0300492};
493
494static const struct pvr2_device_desc pvr2_device_751xx = {
Mike Isely1d70c7f2009-11-25 02:55:38 -0300495 .description = "WinTV HVR-1950 Model 751xx",
Michael Krufkyc8812842008-03-28 05:48:44 -0300496 .shortname = "751xx",
Mike Iselydd5f3222009-03-07 02:07:12 -0300497 .client_table.lst = pvr2_cli_73xxx,
498 .client_table.cnt = ARRAY_SIZE(pvr2_cli_73xxx),
Michael Krufky11fcd472007-10-25 02:01:10 -0300499 .fx2_firmware.lst = pvr2_fw1_names_75xxx,
500 .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_75xxx),
501 .flag_has_cx25840 = !0,
502 .flag_has_hauppauge_rom = !0,
Mike Isely1aaac602008-04-22 14:45:36 -0300503 .flag_has_analogtuner = !0,
504 .flag_has_composite = !0,
505 .flag_has_svideo = !0,
Mike Iselyc21c2db2009-11-25 02:49:21 -0300506 .flag_fx2_16kb = !0,
Michael Krufky11fcd472007-10-25 02:01:10 -0300507 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
Mike Iselye8f5bac2008-04-22 14:45:40 -0300508 .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE,
Michael Krufky11fcd472007-10-25 02:01:10 -0300509 .default_std_mask = V4L2_STD_NTSC_M,
Mike Isely40381cb2008-04-22 14:45:42 -0300510 .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
Mike Isely31335b12008-07-25 19:35:31 -0300511 .ir_scheme = PVR2_IR_SCHEME_ZILOG,
Michael Krufky4aef8fd2008-04-25 04:19:02 -0300512#ifdef CONFIG_VIDEO_PVRUSB2_DVB
513 .dvb_props = &pvr2_751xx_dvb_props,
514#endif
Michael Krufky11fcd472007-10-25 02:01:10 -0300515};
516
517
518
519/*------------------------------------------------------------------------*/
Mike Iselyd130fa82007-12-08 17:20:06 -0300520
521struct usb_device_id pvr2_device_table[] = {
522 { USB_DEVICE(0x2040, 0x2900),
523 .driver_info = (kernel_ulong_t)&pvr2_device_29xxx},
Mike Iselyb675c052008-08-30 15:08:28 -0300524 { USB_DEVICE(0x2040, 0x2950), /* Logically identical to 2900 */
525 .driver_info = (kernel_ulong_t)&pvr2_device_29xxx},
Mike Iselyd130fa82007-12-08 17:20:06 -0300526 { USB_DEVICE(0x2040, 0x2400),
527 .driver_info = (kernel_ulong_t)&pvr2_device_24xxx},
528 { USB_DEVICE(0x1164, 0x0622),
529 .driver_info = (kernel_ulong_t)&pvr2_device_gotview_2},
Mike Iselyfd1da782008-04-22 14:45:42 -0300530 { USB_DEVICE(0x1164, 0x0602),
531 .driver_info = (kernel_ulong_t)&pvr2_device_gotview_2d},
Mike Iselyd130fa82007-12-08 17:20:06 -0300532 { USB_DEVICE(0x11ba, 0x1003),
533 .driver_info = (kernel_ulong_t)&pvr2_device_onair_creator},
Mike Iselyd130fa82007-12-08 17:20:06 -0300534 { USB_DEVICE(0x11ba, 0x1001),
535 .driver_info = (kernel_ulong_t)&pvr2_device_onair_usb2},
Michael Krufky92c9d072008-03-15 23:59:29 -0300536 { USB_DEVICE(0x2040, 0x7300),
537 .driver_info = (kernel_ulong_t)&pvr2_device_73xxx},
Michael Krufky11fcd472007-10-25 02:01:10 -0300538 { USB_DEVICE(0x2040, 0x7500),
Michael Krufkyc8812842008-03-28 05:48:44 -0300539 .driver_info = (kernel_ulong_t)&pvr2_device_750xx},
Michael Krufkydd6e9462008-03-08 06:07:38 -0300540 { USB_DEVICE(0x2040, 0x7501),
Michael Krufkyc8812842008-03-28 05:48:44 -0300541 .driver_info = (kernel_ulong_t)&pvr2_device_751xx},
Mike Isely43823c02011-03-13 20:37:11 -0300542 { USB_DEVICE(0x0ccd, 0x0039),
543 .driver_info = (kernel_ulong_t)&pvr2_device_av400},
Mike Iselyd130fa82007-12-08 17:20:06 -0300544 { }
545};
Mike Isely989eb152007-11-26 01:53:12 -0300546
547MODULE_DEVICE_TABLE(usb, pvr2_device_table);
548
549
550/*
551 Stuff for Emacs to see, in order to encourage consistent editing style:
552 *** Local Variables: ***
553 *** mode: c ***
554 *** fill-column: 75 ***
555 *** tab-width: 8 ***
556 *** c-basic-offset: 8 ***
557 *** End: ***
558 */