Commit | Line | Data |
---|---|---|
989eb154 MI |
1 | /* |
2 | * | |
3 | * $Id$ | |
4 | * | |
5 | * Copyright (C) 2007 Mike Isely <isely@pobox.com> | |
6 | * | |
7 | * This program is free software; you can redistribute it and/or modify | |
8 | * it under the terms of the GNU General Public License as published by | |
9 | * the Free Software Foundation; either version 2 of the License | |
10 | * | |
11 | * This program is distributed in the hope that it will be useful, | |
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | * GNU General Public License for more details. | |
15 | * | |
16 | * You should have received a copy of the GNU General Public License | |
17 | * along with this program; if not, write to the Free Software | |
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
19 | * | |
20 | */ | |
21 | ||
22 | /* | |
23 | ||
24 | This source file should encompass ALL per-device type information for the | |
25 | driver. To define a new device, add elements to the pvr2_device_table and | |
26 | pvr2_device_desc structures. | |
27 | ||
28 | */ | |
29 | ||
30 | #include "pvrusb2-devattr.h" | |
31 | #include <linux/usb.h> | |
6a540254 | 32 | /* This is needed in order to pull in tuner type ids... */ |
9e2e3aeb | 33 | #include <linux/i2c.h> |
9e2e3aeb | 34 | #include <media/tuner.h> |
906a4957 MK |
35 | #ifdef CONFIG_VIDEO_PVRUSB2_DVB |
36 | #include "pvrusb2-hdw-internal.h" | |
37 | #include "lgdt330x.h" | |
38 | #include "tuner-simple.h" | |
39 | #endif | |
4542783c | 40 | |
989eb154 | 41 | |
d130fa8a MI |
42 | /*------------------------------------------------------------------------*/ |
43 | /* Hauppauge PVR-USB2 Model 29xxx */ | |
989eb154 | 44 | |
989eb154 MI |
45 | static const char *pvr2_client_29xxx[] = { |
46 | "msp3400", | |
47 | "saa7115", | |
48 | "tuner", | |
49 | }; | |
50 | ||
989eb154 MI |
51 | static const char *pvr2_fw1_names_29xxx[] = { |
52 | "v4l-pvrusb2-29xxx-01.fw", | |
53 | }; | |
54 | ||
d130fa8a | 55 | static const struct pvr2_device_desc pvr2_device_29xxx = { |
e7f677f3 | 56 | .description = "WinTV PVR USB2 Model Category 29xxx", |
989eb154 MI |
57 | .shortname = "29xxx", |
58 | .client_modules.lst = pvr2_client_29xxx, | |
59 | .client_modules.cnt = ARRAY_SIZE(pvr2_client_29xxx), | |
60 | .fx2_firmware.lst = pvr2_fw1_names_29xxx, | |
61 | .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_29xxx), | |
aaf7884d | 62 | .flag_has_hauppauge_rom = !0, |
1aaac60f | 63 | .flag_has_analogtuner = !0, |
d068c6ee | 64 | .flag_has_fmradio = !0, |
1aaac60f MI |
65 | .flag_has_composite = !0, |
66 | .flag_has_svideo = !0, | |
f5174af2 | 67 | .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, |
40381cb0 | 68 | .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE, |
d130fa8a MI |
69 | }; |
70 | ||
71 | ||
72 | ||
73 | /*------------------------------------------------------------------------*/ | |
74 | /* Hauppauge PVR-USB2 Model 24xxx */ | |
75 | ||
76 | static const char *pvr2_client_24xxx[] = { | |
77 | "cx25840", | |
78 | "tuner", | |
79 | "wm8775", | |
80 | }; | |
81 | ||
82 | static const char *pvr2_fw1_names_24xxx[] = { | |
83 | "v4l-pvrusb2-24xxx-01.fw", | |
84 | }; | |
85 | ||
86 | static const struct pvr2_device_desc pvr2_device_24xxx = { | |
e7f677f3 | 87 | .description = "WinTV PVR USB2 Model Category 24xxx", |
989eb154 MI |
88 | .shortname = "24xxx", |
89 | .client_modules.lst = pvr2_client_24xxx, | |
90 | .client_modules.cnt = ARRAY_SIZE(pvr2_client_24xxx), | |
91 | .fx2_firmware.lst = pvr2_fw1_names_24xxx, | |
92 | .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_24xxx), | |
93 | .flag_has_cx25840 = !0, | |
94 | .flag_has_wm8775 = !0, | |
aaf7884d | 95 | .flag_has_hauppauge_rom = !0, |
056d1a89 | 96 | .flag_has_hauppauge_custom_ir = !0, |
1aaac60f | 97 | .flag_has_analogtuner = !0, |
d068c6ee | 98 | .flag_has_fmradio = !0, |
1aaac60f MI |
99 | .flag_has_composite = !0, |
100 | .flag_has_svideo = !0, | |
f5174af2 | 101 | .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, |
40381cb0 | 102 | .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE, |
d130fa8a MI |
103 | }; |
104 | ||
105 | ||
106 | ||
107 | /*------------------------------------------------------------------------*/ | |
108 | /* GOTVIEW USB2.0 DVD2 */ | |
109 | ||
110 | static const char *pvr2_client_gotview_2[] = { | |
111 | "cx25840", | |
112 | "tuner", | |
113 | }; | |
114 | ||
115 | static const struct pvr2_device_desc pvr2_device_gotview_2 = { | |
9e2e3aeb MI |
116 | .description = "Gotview USB 2.0 DVD 2", |
117 | .shortname = "gv2", | |
118 | .client_modules.lst = pvr2_client_gotview_2, | |
119 | .client_modules.cnt = ARRAY_SIZE(pvr2_client_gotview_2), | |
787f5abb | 120 | .flag_has_cx25840 = !0, |
9e2e3aeb | 121 | .default_tuner_type = TUNER_PHILIPS_FM1216ME_MK3, |
1aaac60f MI |
122 | .flag_has_analogtuner = !0, |
123 | .flag_has_composite = !0, | |
124 | .flag_has_svideo = !0, | |
9e2e3aeb | 125 | .signal_routing_scheme = PVR2_ROUTING_SCHEME_GOTVIEW, |
d130fa8a MI |
126 | }; |
127 | ||
128 | ||
129 | ||
fd1da789 MI |
130 | /*------------------------------------------------------------------------*/ |
131 | /* GOTVIEW USB2.0 DVD Deluxe */ | |
132 | ||
133 | /* (same module list as gotview_2) */ | |
134 | ||
135 | static const struct pvr2_device_desc pvr2_device_gotview_2d = { | |
136 | .description = "Gotview USB 2.0 DVD Deluxe", | |
137 | .shortname = "gv2d", | |
138 | .client_modules.lst = pvr2_client_gotview_2, | |
139 | .client_modules.cnt = ARRAY_SIZE(pvr2_client_gotview_2), | |
140 | .flag_has_cx25840 = !0, | |
141 | .default_tuner_type = TUNER_PHILIPS_FM1216ME_MK3, | |
142 | .flag_has_analogtuner = !0, | |
143 | .flag_has_composite = !0, | |
144 | .flag_has_svideo = !0, | |
145 | .signal_routing_scheme = PVR2_ROUTING_SCHEME_GOTVIEW, | |
146 | }; | |
147 | ||
148 | ||
149 | ||
4542783c | 150 | #ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_CREATOR |
d130fa8a MI |
151 | /*------------------------------------------------------------------------*/ |
152 | /* OnAir Creator */ | |
153 | ||
906a4957 MK |
154 | #ifdef CONFIG_VIDEO_PVRUSB2_DVB |
155 | static struct lgdt330x_config pvr2_lgdt3303_config = { | |
156 | .demod_address = 0x0e, | |
157 | .demod_chip = LGDT3303, | |
158 | .clock_polarity_flip = 1, | |
159 | }; | |
160 | ||
161 | static int pvr2_lgdt3303_attach(struct pvr2_dvb_adapter *adap) | |
162 | { | |
163 | adap->fe = dvb_attach(lgdt330x_attach, &pvr2_lgdt3303_config, | |
164 | &adap->channel.hdw->i2c_adap); | |
165 | if (adap->fe) | |
166 | return 0; | |
167 | ||
168 | return -EIO; | |
169 | } | |
170 | ||
171 | static int pvr2_lgh06xf_attach(struct pvr2_dvb_adapter *adap) | |
172 | { | |
173 | dvb_attach(simple_tuner_attach, adap->fe, | |
174 | &adap->channel.hdw->i2c_adap, 0x61, | |
175 | TUNER_LG_TDVS_H06XF); | |
176 | ||
177 | return 0; | |
178 | } | |
179 | ||
180 | struct pvr2_dvb_props pvr2_onair_creator_fe_props = { | |
181 | .frontend_attach = pvr2_lgdt3303_attach, | |
182 | .tuner_attach = pvr2_lgh06xf_attach, | |
183 | }; | |
184 | #endif | |
185 | ||
d130fa8a MI |
186 | static const char *pvr2_client_onair_creator[] = { |
187 | "saa7115", | |
188 | "tuner", | |
189 | "cs53l32a", | |
190 | }; | |
191 | ||
192 | static const struct pvr2_device_desc pvr2_device_onair_creator = { | |
4542783c MI |
193 | .description = "OnAir Creator Hybrid USB tuner", |
194 | .shortname = "oac", | |
d130fa8a MI |
195 | .client_modules.lst = pvr2_client_onair_creator, |
196 | .client_modules.cnt = ARRAY_SIZE(pvr2_client_onair_creator), | |
4542783c | 197 | .default_tuner_type = TUNER_LG_TDVS_H06XF, |
1aaac60f MI |
198 | .flag_has_analogtuner = !0, |
199 | .flag_has_composite = !0, | |
200 | .flag_has_svideo = !0, | |
4542783c | 201 | .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, |
e8f5bacf | 202 | .digital_control_scheme = PVR2_DIGITAL_SCHEME_ONAIR, |
f0910c74 | 203 | .default_std_mask = V4L2_STD_NTSC_M, |
906a4957 MK |
204 | #ifdef CONFIG_VIDEO_PVRUSB2_DVB |
205 | .dvb_props = &pvr2_onair_creator_fe_props, | |
206 | #endif | |
d130fa8a | 207 | }; |
4542783c | 208 | #endif |
d130fa8a MI |
209 | |
210 | ||
211 | ||
4542783c | 212 | #ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_USB2 |
d130fa8a MI |
213 | /*------------------------------------------------------------------------*/ |
214 | /* OnAir USB 2.0 */ | |
215 | ||
906a4957 MK |
216 | #ifdef CONFIG_VIDEO_PVRUSB2_DVB |
217 | static struct lgdt330x_config pvr2_lgdt3302_config = { | |
218 | .demod_address = 0x0e, | |
219 | .demod_chip = LGDT3302, | |
220 | }; | |
221 | ||
222 | static int pvr2_lgdt3302_attach(struct pvr2_dvb_adapter *adap) | |
223 | { | |
224 | adap->fe = dvb_attach(lgdt330x_attach, &pvr2_lgdt3302_config, | |
225 | &adap->channel.hdw->i2c_adap); | |
226 | if (adap->fe) | |
227 | return 0; | |
228 | ||
229 | return -EIO; | |
230 | } | |
231 | ||
232 | static int pvr2_fcv1236d_attach(struct pvr2_dvb_adapter *adap) | |
233 | { | |
234 | dvb_attach(simple_tuner_attach, adap->fe, | |
235 | &adap->channel.hdw->i2c_adap, 0x61, | |
236 | TUNER_PHILIPS_FCV1236D); | |
237 | ||
238 | return 0; | |
239 | } | |
240 | ||
241 | struct pvr2_dvb_props pvr2_onair_usb2_fe_props = { | |
242 | .frontend_attach = pvr2_lgdt3302_attach, | |
243 | .tuner_attach = pvr2_fcv1236d_attach, | |
244 | }; | |
245 | #endif | |
246 | ||
d130fa8a MI |
247 | static const char *pvr2_client_onair_usb2[] = { |
248 | "saa7115", | |
249 | "tuner", | |
250 | "cs53l32a", | |
251 | }; | |
252 | ||
253 | static const struct pvr2_device_desc pvr2_device_onair_usb2 = { | |
4542783c MI |
254 | .description = "OnAir USB2 Hybrid USB tuner", |
255 | .shortname = "oa2", | |
d130fa8a MI |
256 | .client_modules.lst = pvr2_client_onair_usb2, |
257 | .client_modules.cnt = ARRAY_SIZE(pvr2_client_onair_usb2), | |
ab8b870e | 258 | .default_tuner_type = TUNER_PHILIPS_FCV1236D, |
1aaac60f MI |
259 | .flag_has_analogtuner = !0, |
260 | .flag_has_composite = !0, | |
261 | .flag_has_svideo = !0, | |
4542783c | 262 | .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, |
e8f5bacf | 263 | .digital_control_scheme = PVR2_DIGITAL_SCHEME_ONAIR, |
f0910c74 | 264 | .default_std_mask = V4L2_STD_NTSC_M, |
906a4957 MK |
265 | #ifdef CONFIG_VIDEO_PVRUSB2_DVB |
266 | .dvb_props = &pvr2_onair_usb2_fe_props, | |
267 | #endif | |
989eb154 | 268 | }; |
d130fa8a MI |
269 | #endif |
270 | ||
271 | ||
989eb154 | 272 | |
92c9d075 MK |
273 | /*------------------------------------------------------------------------*/ |
274 | /* Hauppauge PVR-USB2 Model 73xxx */ | |
275 | ||
276 | static const char *pvr2_client_73xxx[] = { | |
277 | "cx25840", | |
278 | "tuner", | |
279 | }; | |
280 | ||
281 | static const char *pvr2_fw1_names_73xxx[] = { | |
282 | "v4l-pvrusb2-73xxx-01.fw", | |
283 | }; | |
284 | ||
285 | static const struct pvr2_device_desc pvr2_device_73xxx = { | |
e7f677f3 | 286 | .description = "WinTV PVR USB2 Model Category 73xxx", |
92c9d075 MK |
287 | .shortname = "73xxx", |
288 | .client_modules.lst = pvr2_client_73xxx, | |
289 | .client_modules.cnt = ARRAY_SIZE(pvr2_client_73xxx), | |
290 | .fx2_firmware.lst = pvr2_fw1_names_73xxx, | |
291 | .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_73xxx), | |
292 | .flag_has_cx25840 = !0, | |
293 | .flag_has_hauppauge_rom = !0, | |
294 | .flag_has_analogtuner = !0, | |
295 | .flag_has_composite = !0, | |
296 | .flag_has_svideo = !0, | |
297 | .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, | |
298 | .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE, | |
299 | .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE, | |
300 | }; | |
301 | ||
302 | ||
303 | ||
11fcd470 MK |
304 | /*------------------------------------------------------------------------*/ |
305 | /* Hauppauge PVR-USB2 Model 75xxx */ | |
306 | ||
307 | static const char *pvr2_client_75xxx[] = { | |
308 | "cx25840", | |
309 | "tuner", | |
310 | }; | |
311 | ||
312 | static const char *pvr2_fw1_names_75xxx[] = { | |
313 | "v4l-pvrusb2-73xxx-01.fw", | |
314 | }; | |
315 | ||
c8812841 MK |
316 | static const struct pvr2_device_desc pvr2_device_750xx = { |
317 | .description = "WinTV PVR USB2 Model Category 750xx", | |
318 | .shortname = "750xx", | |
319 | .client_modules.lst = pvr2_client_75xxx, | |
320 | .client_modules.cnt = ARRAY_SIZE(pvr2_client_75xxx), | |
321 | .fx2_firmware.lst = pvr2_fw1_names_75xxx, | |
322 | .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_75xxx), | |
323 | .flag_has_cx25840 = !0, | |
324 | .flag_has_hauppauge_rom = !0, | |
325 | .flag_has_analogtuner = !0, | |
326 | .flag_has_composite = !0, | |
327 | .flag_has_svideo = !0, | |
328 | .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, | |
329 | .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE, | |
330 | .default_std_mask = V4L2_STD_NTSC_M, | |
331 | .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE, | |
332 | }; | |
333 | ||
334 | static const struct pvr2_device_desc pvr2_device_751xx = { | |
335 | .description = "WinTV PVR USB2 Model Category 751xx", | |
336 | .shortname = "751xx", | |
11fcd470 MK |
337 | .client_modules.lst = pvr2_client_75xxx, |
338 | .client_modules.cnt = ARRAY_SIZE(pvr2_client_75xxx), | |
339 | .fx2_firmware.lst = pvr2_fw1_names_75xxx, | |
340 | .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_75xxx), | |
341 | .flag_has_cx25840 = !0, | |
342 | .flag_has_hauppauge_rom = !0, | |
1aaac60f MI |
343 | .flag_has_analogtuner = !0, |
344 | .flag_has_composite = !0, | |
345 | .flag_has_svideo = !0, | |
11fcd470 | 346 | .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, |
e8f5bacf | 347 | .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE, |
11fcd470 | 348 | .default_std_mask = V4L2_STD_NTSC_M, |
40381cb0 | 349 | .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE, |
11fcd470 MK |
350 | }; |
351 | ||
352 | ||
353 | ||
d130fa8a MI |
354 | /*------------------------------------------------------------------------*/ |
355 | ||
356 | struct usb_device_id pvr2_device_table[] = { | |
357 | { USB_DEVICE(0x2040, 0x2900), | |
358 | .driver_info = (kernel_ulong_t)&pvr2_device_29xxx}, | |
359 | { USB_DEVICE(0x2040, 0x2400), | |
360 | .driver_info = (kernel_ulong_t)&pvr2_device_24xxx}, | |
361 | { USB_DEVICE(0x1164, 0x0622), | |
362 | .driver_info = (kernel_ulong_t)&pvr2_device_gotview_2}, | |
fd1da789 MI |
363 | { USB_DEVICE(0x1164, 0x0602), |
364 | .driver_info = (kernel_ulong_t)&pvr2_device_gotview_2d}, | |
d130fa8a MI |
365 | #ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_CREATOR |
366 | { USB_DEVICE(0x11ba, 0x1003), | |
367 | .driver_info = (kernel_ulong_t)&pvr2_device_onair_creator}, | |
368 | #endif | |
369 | #ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_USB2 | |
370 | { USB_DEVICE(0x11ba, 0x1001), | |
371 | .driver_info = (kernel_ulong_t)&pvr2_device_onair_usb2}, | |
372 | #endif | |
92c9d075 MK |
373 | { USB_DEVICE(0x2040, 0x7300), |
374 | .driver_info = (kernel_ulong_t)&pvr2_device_73xxx}, | |
11fcd470 | 375 | { USB_DEVICE(0x2040, 0x7500), |
c8812841 | 376 | .driver_info = (kernel_ulong_t)&pvr2_device_750xx}, |
dd6e9467 | 377 | { USB_DEVICE(0x2040, 0x7501), |
c8812841 | 378 | .driver_info = (kernel_ulong_t)&pvr2_device_751xx}, |
d130fa8a MI |
379 | { } |
380 | }; | |
989eb154 MI |
381 | |
382 | MODULE_DEVICE_TABLE(usb, pvr2_device_table); | |
383 | ||
384 | ||
385 | /* | |
386 | Stuff for Emacs to see, in order to encourage consistent editing style: | |
387 | *** Local Variables: *** | |
388 | *** mode: c *** | |
389 | *** fill-column: 75 *** | |
390 | *** tab-width: 8 *** | |
391 | *** c-basic-offset: 8 *** | |
392 | *** End: *** | |
393 | */ |