5 * Copyright (C) 2007 Mike Isely <isely@pobox.com>
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
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.
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
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.
30 #include "pvrusb2-devattr.h"
31 #include <linux/usb.h>
32 /* This is needed in order to pull in tuner type ids... */
33 #include <linux/i2c.h>
34 #include <media/tuner.h>
35 #ifdef CONFIG_VIDEO_PVRUSB2_DVB
36 #include "pvrusb2-hdw-internal.h"
38 #include "tuner-simple.h"
42 /*------------------------------------------------------------------------*/
43 /* Hauppauge PVR-USB2 Model 29xxx */
45 static const char *pvr2_client_29xxx
[] = {
51 static const char *pvr2_fw1_names_29xxx
[] = {
52 "v4l-pvrusb2-29xxx-01.fw",
55 static const struct pvr2_device_desc pvr2_device_29xxx
= {
56 .description
= "WinTV PVR USB2 Model Category 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
),
62 .flag_has_hauppauge_rom
= !0,
63 .flag_has_analogtuner
= !0,
64 .flag_has_fmradio
= !0,
65 .flag_has_composite
= !0,
66 .flag_has_svideo
= !0,
67 .signal_routing_scheme
= PVR2_ROUTING_SCHEME_HAUPPAUGE
,
68 .led_scheme
= PVR2_LED_SCHEME_HAUPPAUGE
,
73 /*------------------------------------------------------------------------*/
74 /* Hauppauge PVR-USB2 Model 24xxx */
76 static const char *pvr2_client_24xxx
[] = {
82 static const char *pvr2_fw1_names_24xxx
[] = {
83 "v4l-pvrusb2-24xxx-01.fw",
86 static const struct pvr2_device_desc pvr2_device_24xxx
= {
87 .description
= "WinTV PVR USB2 Model Category 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,
95 .flag_has_hauppauge_rom
= !0,
96 .flag_has_hauppauge_custom_ir
= !0,
97 .flag_has_analogtuner
= !0,
98 .flag_has_fmradio
= !0,
99 .flag_has_composite
= !0,
100 .flag_has_svideo
= !0,
101 .signal_routing_scheme
= PVR2_ROUTING_SCHEME_HAUPPAUGE
,
102 .led_scheme
= PVR2_LED_SCHEME_HAUPPAUGE
,
107 /*------------------------------------------------------------------------*/
108 /* GOTVIEW USB2.0 DVD2 */
110 static const char *pvr2_client_gotview_2
[] = {
115 static const struct pvr2_device_desc pvr2_device_gotview_2
= {
116 .description
= "Gotview USB 2.0 DVD 2",
118 .client_modules
.lst
= pvr2_client_gotview_2
,
119 .client_modules
.cnt
= ARRAY_SIZE(pvr2_client_gotview_2
),
120 .flag_has_cx25840
= !0,
121 .default_tuner_type
= TUNER_PHILIPS_FM1216ME_MK3
,
122 .flag_has_analogtuner
= !0,
123 .flag_has_composite
= !0,
124 .flag_has_svideo
= !0,
125 .signal_routing_scheme
= PVR2_ROUTING_SCHEME_GOTVIEW
,
130 /*------------------------------------------------------------------------*/
131 /* GOTVIEW USB2.0 DVD Deluxe */
133 /* (same module list as gotview_2) */
135 static const struct pvr2_device_desc pvr2_device_gotview_2d
= {
136 .description
= "Gotview USB 2.0 DVD Deluxe",
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
,
150 #ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_CREATOR
151 /*------------------------------------------------------------------------*/
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,
161 static int pvr2_lgdt3303_attach(struct pvr2_dvb_adapter
*adap
)
163 adap
->fe
= dvb_attach(lgdt330x_attach
, &pvr2_lgdt3303_config
,
164 &adap
->channel
.hdw
->i2c_adap
);
171 static int pvr2_lgh06xf_attach(struct pvr2_dvb_adapter
*adap
)
173 dvb_attach(simple_tuner_attach
, adap
->fe
,
174 &adap
->channel
.hdw
->i2c_adap
, 0x61,
175 TUNER_LG_TDVS_H06XF
);
180 struct pvr2_dvb_props pvr2_onair_creator_fe_props
= {
181 .frontend_attach
= pvr2_lgdt3303_attach
,
182 .tuner_attach
= pvr2_lgh06xf_attach
,
186 static const char *pvr2_client_onair_creator
[] = {
192 static const struct pvr2_device_desc pvr2_device_onair_creator
= {
193 .description
= "OnAir Creator Hybrid USB tuner",
195 .client_modules
.lst
= pvr2_client_onair_creator
,
196 .client_modules
.cnt
= ARRAY_SIZE(pvr2_client_onair_creator
),
197 .default_tuner_type
= TUNER_LG_TDVS_H06XF
,
198 .flag_has_analogtuner
= !0,
199 .flag_has_composite
= !0,
200 .flag_has_svideo
= !0,
201 .signal_routing_scheme
= PVR2_ROUTING_SCHEME_HAUPPAUGE
,
202 .digital_control_scheme
= PVR2_DIGITAL_SCHEME_ONAIR
,
203 .default_std_mask
= V4L2_STD_NTSC_M
,
204 #ifdef CONFIG_VIDEO_PVRUSB2_DVB
205 .dvb_props
= &pvr2_onair_creator_fe_props
,
212 #ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_USB2
213 /*------------------------------------------------------------------------*/
216 #ifdef CONFIG_VIDEO_PVRUSB2_DVB
217 static struct lgdt330x_config pvr2_lgdt3302_config
= {
218 .demod_address
= 0x0e,
219 .demod_chip
= LGDT3302
,
222 static int pvr2_lgdt3302_attach(struct pvr2_dvb_adapter
*adap
)
224 adap
->fe
= dvb_attach(lgdt330x_attach
, &pvr2_lgdt3302_config
,
225 &adap
->channel
.hdw
->i2c_adap
);
232 static int pvr2_fcv1236d_attach(struct pvr2_dvb_adapter
*adap
)
234 dvb_attach(simple_tuner_attach
, adap
->fe
,
235 &adap
->channel
.hdw
->i2c_adap
, 0x61,
236 TUNER_PHILIPS_FCV1236D
);
241 struct pvr2_dvb_props pvr2_onair_usb2_fe_props
= {
242 .frontend_attach
= pvr2_lgdt3302_attach
,
243 .tuner_attach
= pvr2_fcv1236d_attach
,
247 static const char *pvr2_client_onair_usb2
[] = {
253 static const struct pvr2_device_desc pvr2_device_onair_usb2
= {
254 .description
= "OnAir USB2 Hybrid USB tuner",
256 .client_modules
.lst
= pvr2_client_onair_usb2
,
257 .client_modules
.cnt
= ARRAY_SIZE(pvr2_client_onair_usb2
),
258 .default_tuner_type
= TUNER_PHILIPS_FCV1236D
,
259 .flag_has_analogtuner
= !0,
260 .flag_has_composite
= !0,
261 .flag_has_svideo
= !0,
262 .signal_routing_scheme
= PVR2_ROUTING_SCHEME_HAUPPAUGE
,
263 .digital_control_scheme
= PVR2_DIGITAL_SCHEME_ONAIR
,
264 .default_std_mask
= V4L2_STD_NTSC_M
,
265 #ifdef CONFIG_VIDEO_PVRUSB2_DVB
266 .dvb_props
= &pvr2_onair_usb2_fe_props
,
273 /*------------------------------------------------------------------------*/
274 /* Hauppauge PVR-USB2 Model 73xxx */
276 static const char *pvr2_client_73xxx
[] = {
281 static const char *pvr2_fw1_names_73xxx
[] = {
282 "v4l-pvrusb2-73xxx-01.fw",
285 static const struct pvr2_device_desc pvr2_device_73xxx
= {
286 .description
= "WinTV PVR USB2 Model Category 73xxx",
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
,
304 /*------------------------------------------------------------------------*/
305 /* Hauppauge PVR-USB2 Model 75xxx */
307 static const char *pvr2_client_75xxx
[] = {
312 static const char *pvr2_fw1_names_75xxx
[] = {
313 "v4l-pvrusb2-73xxx-01.fw",
316 static const struct pvr2_device_desc pvr2_device_75xxx
= {
317 .description
= "WinTV PVR USB2 Model Category 75xxx",
318 .shortname
= "75xxx",
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
,
336 /*------------------------------------------------------------------------*/
338 struct usb_device_id pvr2_device_table
[] = {
339 { USB_DEVICE(0x2040, 0x2900),
340 .driver_info
= (kernel_ulong_t
)&pvr2_device_29xxx
},
341 { USB_DEVICE(0x2040, 0x2400),
342 .driver_info
= (kernel_ulong_t
)&pvr2_device_24xxx
},
343 { USB_DEVICE(0x1164, 0x0622),
344 .driver_info
= (kernel_ulong_t
)&pvr2_device_gotview_2
},
345 { USB_DEVICE(0x1164, 0x0602),
346 .driver_info
= (kernel_ulong_t
)&pvr2_device_gotview_2d
},
347 #ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_CREATOR
348 { USB_DEVICE(0x11ba, 0x1003),
349 .driver_info
= (kernel_ulong_t
)&pvr2_device_onair_creator
},
351 #ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_USB2
352 { USB_DEVICE(0x11ba, 0x1001),
353 .driver_info
= (kernel_ulong_t
)&pvr2_device_onair_usb2
},
355 { USB_DEVICE(0x2040, 0x7300),
356 .driver_info
= (kernel_ulong_t
)&pvr2_device_73xxx
},
357 { USB_DEVICE(0x2040, 0x7500),
358 .driver_info
= (kernel_ulong_t
)&pvr2_device_75xxx
},
359 { USB_DEVICE(0x2040, 0x7501),
360 .driver_info
= (kernel_ulong_t
)&pvr2_device_75xxx
},
364 MODULE_DEVICE_TABLE(usb
, pvr2_device_table
);
368 Stuff for Emacs to see, in order to encourage consistent editing style:
369 *** Local Variables: ***
371 *** fill-column: 75 ***
373 *** c-basic-offset: 8 ***