blob: 1edb066142b4dfa620b5049f43b32f9531d218b4 [file] [log] [blame]
Mike Isely989eb152007-11-26 01:53:12 -03001/*
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
24This source file should encompass ALL per-device type information for the
25driver. To define a new device, add elements to the pvr2_device_table and
26pvr2_device_desc structures.
27
28*/
29
30#include "pvrusb2-devattr.h"
31#include <linux/usb.h>
Mike Isely6a540252007-12-02 23:51:34 -030032/* This is needed in order to pull in tuner type ids... */
Mike Isely9e2e3ae2007-11-26 02:14:23 -030033#include <linux/i2c.h>
Mike Isely9e2e3ae2007-11-26 02:14:23 -030034#include <media/tuner.h>
Mike Isely989eb152007-11-26 01:53:12 -030035
Mike Isely989eb152007-11-26 01:53:12 -030036
Mike Isely45427832007-12-08 17:11:13 -030037
Mike Iselyd130fa82007-12-08 17:20:06 -030038/*------------------------------------------------------------------------*/
39/* Hauppauge PVR-USB2 Model 29xxx */
Mike Isely989eb152007-11-26 01:53:12 -030040
Mike Isely989eb152007-11-26 01:53:12 -030041static const char *pvr2_client_29xxx[] = {
42 "msp3400",
43 "saa7115",
44 "tuner",
45};
46
Mike Isely989eb152007-11-26 01:53:12 -030047static const char *pvr2_fw1_names_29xxx[] = {
48 "v4l-pvrusb2-29xxx-01.fw",
49};
50
Mike Iselyd130fa82007-12-08 17:20:06 -030051static const struct pvr2_device_desc pvr2_device_29xxx = {
Mike Isely989eb152007-11-26 01:53:12 -030052 .description = "WinTV PVR USB2 Model Category 29xxxx",
53 .shortname = "29xxx",
54 .client_modules.lst = pvr2_client_29xxx,
55 .client_modules.cnt = ARRAY_SIZE(pvr2_client_29xxx),
56 .fx2_firmware.lst = pvr2_fw1_names_29xxx,
57 .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_29xxx),
Mike Iselyaaf78842007-11-26 02:04:11 -030058 .flag_has_hauppauge_rom = !0,
Mike Isely1aaac602008-04-22 14:45:36 -030059 .flag_has_analogtuner = !0,
Mike Iselyd068c6e2008-04-22 14:45:36 -030060 .flag_has_fmradio = !0,
Mike Isely1aaac602008-04-22 14:45:36 -030061 .flag_has_composite = !0,
62 .flag_has_svideo = !0,
Mike Iselyf5174af2007-11-26 02:07:26 -030063 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
Mike Isely40381cb2008-04-22 14:45:42 -030064 .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
Mike Iselyd130fa82007-12-08 17:20:06 -030065};
66
67
68
69/*------------------------------------------------------------------------*/
70/* Hauppauge PVR-USB2 Model 24xxx */
71
72static const char *pvr2_client_24xxx[] = {
73 "cx25840",
74 "tuner",
75 "wm8775",
76};
77
78static const char *pvr2_fw1_names_24xxx[] = {
79 "v4l-pvrusb2-24xxx-01.fw",
80};
81
82static const struct pvr2_device_desc pvr2_device_24xxx = {
Mike Isely989eb152007-11-26 01:53:12 -030083 .description = "WinTV PVR USB2 Model Category 24xxxx",
84 .shortname = "24xxx",
85 .client_modules.lst = pvr2_client_24xxx,
86 .client_modules.cnt = ARRAY_SIZE(pvr2_client_24xxx),
87 .fx2_firmware.lst = pvr2_fw1_names_24xxx,
88 .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_24xxx),
89 .flag_has_cx25840 = !0,
90 .flag_has_wm8775 = !0,
Mike Iselyaaf78842007-11-26 02:04:11 -030091 .flag_has_hauppauge_rom = !0,
Mike Isely056d1a82007-11-26 02:09:42 -030092 .flag_has_hauppauge_custom_ir = !0,
Mike Isely1aaac602008-04-22 14:45:36 -030093 .flag_has_analogtuner = !0,
Mike Iselyd068c6e2008-04-22 14:45:36 -030094 .flag_has_fmradio = !0,
Mike Isely1aaac602008-04-22 14:45:36 -030095 .flag_has_composite = !0,
96 .flag_has_svideo = !0,
Mike Iselyf5174af2007-11-26 02:07:26 -030097 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
Mike Isely40381cb2008-04-22 14:45:42 -030098 .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
Mike Iselyd130fa82007-12-08 17:20:06 -030099};
100
101
102
103/*------------------------------------------------------------------------*/
104/* GOTVIEW USB2.0 DVD2 */
105
106static const char *pvr2_client_gotview_2[] = {
107 "cx25840",
108 "tuner",
109};
110
111static const struct pvr2_device_desc pvr2_device_gotview_2 = {
Mike Isely9e2e3ae2007-11-26 02:14:23 -0300112 .description = "Gotview USB 2.0 DVD 2",
113 .shortname = "gv2",
114 .client_modules.lst = pvr2_client_gotview_2,
115 .client_modules.cnt = ARRAY_SIZE(pvr2_client_gotview_2),
Mike Isely787f5ab2007-12-08 17:08:32 -0300116 .flag_has_cx25840 = !0,
Mike Isely9e2e3ae2007-11-26 02:14:23 -0300117 .default_tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
Mike Isely1aaac602008-04-22 14:45:36 -0300118 .flag_has_analogtuner = !0,
119 .flag_has_composite = !0,
120 .flag_has_svideo = !0,
Mike Isely9e2e3ae2007-11-26 02:14:23 -0300121 .signal_routing_scheme = PVR2_ROUTING_SCHEME_GOTVIEW,
Mike Isely989eb152007-11-26 01:53:12 -0300122};
123
Mike Iselyd130fa82007-12-08 17:20:06 -0300124
125
Mike Iselyfd1da782008-04-22 14:45:42 -0300126/*------------------------------------------------------------------------*/
127/* GOTVIEW USB2.0 DVD Deluxe */
128
129/* (same module list as gotview_2) */
130
131static const struct pvr2_device_desc pvr2_device_gotview_2d = {
132 .description = "Gotview USB 2.0 DVD Deluxe",
133 .shortname = "gv2d",
134 .client_modules.lst = pvr2_client_gotview_2,
135 .client_modules.cnt = ARRAY_SIZE(pvr2_client_gotview_2),
136 .flag_has_cx25840 = !0,
137 .default_tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
138 .flag_has_analogtuner = !0,
139 .flag_has_composite = !0,
140 .flag_has_svideo = !0,
141 .signal_routing_scheme = PVR2_ROUTING_SCHEME_GOTVIEW,
142};
143
144
145
Mike Iselyd130fa82007-12-08 17:20:06 -0300146#ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_CREATOR
147/*------------------------------------------------------------------------*/
148/* OnAir Creator */
149
150static const char *pvr2_client_onair_creator[] = {
151 "saa7115",
152 "tuner",
153 "cs53l32a",
154};
155
156static const struct pvr2_device_desc pvr2_device_onair_creator = {
157 .description = "OnAir Creator Hybrid USB tuner",
158 .shortname = "oac",
159 .client_modules.lst = pvr2_client_onair_creator,
160 .client_modules.cnt = ARRAY_SIZE(pvr2_client_onair_creator),
161 .default_tuner_type = TUNER_LG_TDVS_H06XF,
Mike Isely1aaac602008-04-22 14:45:36 -0300162 .flag_has_analogtuner = !0,
163 .flag_has_composite = !0,
164 .flag_has_svideo = !0,
Mike Iselyd130fa82007-12-08 17:20:06 -0300165 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
Mike Iselye8f5bac2008-04-22 14:45:40 -0300166 .digital_control_scheme = PVR2_DIGITAL_SCHEME_ONAIR,
Mike Iselyd130fa82007-12-08 17:20:06 -0300167};
168#endif
169
170
171
172#ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_USB2
173/*------------------------------------------------------------------------*/
174/* OnAir USB 2.0 */
175
176static const char *pvr2_client_onair_usb2[] = {
177 "saa7115",
178 "tuner",
179 "cs53l32a",
180};
181
182static const struct pvr2_device_desc pvr2_device_onair_usb2 = {
183 .description = "OnAir USB2 Hybrid USB tuner",
184 .shortname = "oa2",
185 .client_modules.lst = pvr2_client_onair_usb2,
186 .client_modules.cnt = ARRAY_SIZE(pvr2_client_onair_usb2),
187 .default_tuner_type = TUNER_PHILIPS_ATSC,
Mike Isely1aaac602008-04-22 14:45:36 -0300188 .flag_has_analogtuner = !0,
189 .flag_has_composite = !0,
190 .flag_has_svideo = !0,
Mike Iselyd130fa82007-12-08 17:20:06 -0300191 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
Mike Iselye8f5bac2008-04-22 14:45:40 -0300192 .digital_control_scheme = PVR2_DIGITAL_SCHEME_ONAIR,
Mike Iselyd130fa82007-12-08 17:20:06 -0300193};
194#endif
195
196
197
198/*------------------------------------------------------------------------*/
Michael Krufky92c9d072008-03-15 23:59:29 -0300199/* Hauppauge PVR-USB2 Model 73xxx */
200
201static const char *pvr2_client_73xxx[] = {
202 "cx25840",
203 "tuner",
204};
205
206static const char *pvr2_fw1_names_73xxx[] = {
207 "v4l-pvrusb2-73xxx-01.fw",
208};
209
210static const struct pvr2_device_desc pvr2_device_73xxx = {
211 .description = "WinTV PVR USB2 Model Category 73xxxx",
212 .shortname = "73xxx",
213 .client_modules.lst = pvr2_client_73xxx,
214 .client_modules.cnt = ARRAY_SIZE(pvr2_client_73xxx),
215 .fx2_firmware.lst = pvr2_fw1_names_73xxx,
216 .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_73xxx),
217 .flag_has_cx25840 = !0,
218 .flag_has_hauppauge_rom = !0,
Michael Krufky4c3b01f2008-04-06 20:40:17 -0400219#if 0
Michael Krufky92c9d072008-03-15 23:59:29 -0300220 .flag_has_analogtuner = !0,
221 .flag_has_composite = !0,
222 .flag_has_svideo = !0,
223 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
224 .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE,
225 .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
Michael Krufky4c3b01f2008-04-06 20:40:17 -0400226#else
227 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
228#endif
Michael Krufky92c9d072008-03-15 23:59:29 -0300229};
230
231
232
233/*------------------------------------------------------------------------*/
Michael Krufky11fcd472007-10-25 02:01:10 -0300234/* Hauppauge PVR-USB2 Model 75xxx */
235
236static const char *pvr2_client_75xxx[] = {
237 "cx25840",
238 "tuner",
239};
240
241static const char *pvr2_fw1_names_75xxx[] = {
242 "v4l-pvrusb2-73xxx-01.fw",
243};
244
245static const struct pvr2_device_desc pvr2_device_75xxx = {
246 .description = "WinTV PVR USB2 Model Category 75xxxx",
247 .shortname = "75xxx",
248 .client_modules.lst = pvr2_client_75xxx,
249 .client_modules.cnt = ARRAY_SIZE(pvr2_client_75xxx),
250 .fx2_firmware.lst = pvr2_fw1_names_75xxx,
251 .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_75xxx),
252 .flag_has_cx25840 = !0,
253 .flag_has_hauppauge_rom = !0,
Mike Isely1aaac602008-04-22 14:45:36 -0300254 .flag_has_analogtuner = !0,
255 .flag_has_composite = !0,
256 .flag_has_svideo = !0,
Michael Krufky11fcd472007-10-25 02:01:10 -0300257 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
Mike Iselye8f5bac2008-04-22 14:45:40 -0300258 .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE,
Michael Krufky11fcd472007-10-25 02:01:10 -0300259 .default_std_mask = V4L2_STD_NTSC_M,
Mike Isely40381cb2008-04-22 14:45:42 -0300260 .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
Michael Krufky11fcd472007-10-25 02:01:10 -0300261};
262
263
264
265/*------------------------------------------------------------------------*/
Mike Iselyd130fa82007-12-08 17:20:06 -0300266
267struct usb_device_id pvr2_device_table[] = {
268 { USB_DEVICE(0x2040, 0x2900),
269 .driver_info = (kernel_ulong_t)&pvr2_device_29xxx},
270 { USB_DEVICE(0x2040, 0x2400),
271 .driver_info = (kernel_ulong_t)&pvr2_device_24xxx},
272 { USB_DEVICE(0x1164, 0x0622),
273 .driver_info = (kernel_ulong_t)&pvr2_device_gotview_2},
Mike Iselyfd1da782008-04-22 14:45:42 -0300274 { USB_DEVICE(0x1164, 0x0602),
275 .driver_info = (kernel_ulong_t)&pvr2_device_gotview_2d},
Mike Iselyd130fa82007-12-08 17:20:06 -0300276#ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_CREATOR
277 { USB_DEVICE(0x11ba, 0x1003),
278 .driver_info = (kernel_ulong_t)&pvr2_device_onair_creator},
279#endif
280#ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_USB2
281 { USB_DEVICE(0x11ba, 0x1001),
282 .driver_info = (kernel_ulong_t)&pvr2_device_onair_usb2},
283#endif
Michael Krufky92c9d072008-03-15 23:59:29 -0300284 { USB_DEVICE(0x2040, 0x7300),
285 .driver_info = (kernel_ulong_t)&pvr2_device_73xxx},
Michael Krufky11fcd472007-10-25 02:01:10 -0300286 { USB_DEVICE(0x2040, 0x7500),
287 .driver_info = (kernel_ulong_t)&pvr2_device_75xxx},
Michael Krufkydd6e9462008-03-08 06:07:38 -0300288 { USB_DEVICE(0x2040, 0x7501),
289 .driver_info = (kernel_ulong_t)&pvr2_device_75xxx},
Mike Iselyd130fa82007-12-08 17:20:06 -0300290 { }
291};
Mike Isely989eb152007-11-26 01:53:12 -0300292
293MODULE_DEVICE_TABLE(usb, pvr2_device_table);
294
295
296/*
297 Stuff for Emacs to see, in order to encourage consistent editing style:
298 *** Local Variables: ***
299 *** mode: c ***
300 *** fill-column: 75 ***
301 *** tab-width: 8 ***
302 *** c-basic-offset: 8 ***
303 *** End: ***
304 */