1a60591e38b5c1d4226dc5ce23daca98e1c85a34
[pandora-kernel.git] / drivers / media / video / pvrusb2 / pvrusb2-devattr.c
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>
32 /* This is needed in order to pull in tuner type ids... */
33 #include <linux/i2c.h>
34 #include <media/tuner.h>
35
36
37
38 /*------------------------------------------------------------------------*/
39 /* Hauppauge PVR-USB2 Model 29xxx */
40
41 static const char *pvr2_client_29xxx[] = {
42         "msp3400",
43         "saa7115",
44         "tuner",
45 };
46
47 static const char *pvr2_fw1_names_29xxx[] = {
48                 "v4l-pvrusb2-29xxx-01.fw",
49 };
50
51 static const struct pvr2_device_desc pvr2_device_29xxx = {
52                 .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),
58                 .flag_has_hauppauge_rom = !0,
59                 .flag_has_analogtuner = !0,
60                 .flag_has_fmradio = !0,
61                 .flag_has_composite = !0,
62                 .flag_has_svideo = !0,
63                 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
64 };
65
66
67
68 /*------------------------------------------------------------------------*/
69 /* Hauppauge PVR-USB2 Model 24xxx */
70
71 static const char *pvr2_client_24xxx[] = {
72         "cx25840",
73         "tuner",
74         "wm8775",
75 };
76
77 static const char *pvr2_fw1_names_24xxx[] = {
78                 "v4l-pvrusb2-24xxx-01.fw",
79 };
80
81 static const struct pvr2_device_desc pvr2_device_24xxx = {
82                 .description = "WinTV PVR USB2 Model Category 24xxxx",
83                 .shortname = "24xxx",
84                 .client_modules.lst = pvr2_client_24xxx,
85                 .client_modules.cnt = ARRAY_SIZE(pvr2_client_24xxx),
86                 .fx2_firmware.lst = pvr2_fw1_names_24xxx,
87                 .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_24xxx),
88                 .flag_has_cx25840 = !0,
89                 .flag_has_wm8775 = !0,
90                 .flag_has_hauppauge_rom = !0,
91                 .flag_has_hauppauge_custom_ir = !0,
92                 .flag_has_analogtuner = !0,
93                 .flag_has_fmradio = !0,
94                 .flag_has_composite = !0,
95                 .flag_has_svideo = !0,
96                 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
97 };
98
99
100
101 /*------------------------------------------------------------------------*/
102 /* GOTVIEW USB2.0 DVD2 */
103
104 static const char *pvr2_client_gotview_2[] = {
105         "cx25840",
106         "tuner",
107 };
108
109 static const struct pvr2_device_desc pvr2_device_gotview_2 = {
110                 .description = "Gotview USB 2.0 DVD 2",
111                 .shortname = "gv2",
112                 .client_modules.lst = pvr2_client_gotview_2,
113                 .client_modules.cnt = ARRAY_SIZE(pvr2_client_gotview_2),
114                 .flag_has_cx25840 = !0,
115                 .default_tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
116                 .flag_has_analogtuner = !0,
117                 .flag_has_composite = !0,
118                 .flag_has_svideo = !0,
119                 .signal_routing_scheme = PVR2_ROUTING_SCHEME_GOTVIEW,
120 };
121
122
123
124 #ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_CREATOR
125 /*------------------------------------------------------------------------*/
126 /* OnAir Creator */
127
128 static const char *pvr2_client_onair_creator[] = {
129         "saa7115",
130         "tuner",
131         "cs53l32a",
132 };
133
134 static const struct pvr2_device_desc pvr2_device_onair_creator = {
135                 .description = "OnAir Creator Hybrid USB tuner",
136                 .shortname = "oac",
137                 .client_modules.lst = pvr2_client_onair_creator,
138                 .client_modules.cnt = ARRAY_SIZE(pvr2_client_onair_creator),
139                 .default_tuner_type = TUNER_LG_TDVS_H06XF,
140                 .flag_has_analogtuner = !0,
141                 .flag_has_composite = !0,
142                 .flag_has_svideo = !0,
143                 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
144                 .digital_control_scheme = PVR2_DIGITAL_SCHEME_ONAIR,
145 };
146 #endif
147
148
149
150 #ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_USB2
151 /*------------------------------------------------------------------------*/
152 /* OnAir USB 2.0 */
153
154 static const char *pvr2_client_onair_usb2[] = {
155         "saa7115",
156         "tuner",
157         "cs53l32a",
158 };
159
160 static const struct pvr2_device_desc pvr2_device_onair_usb2 = {
161                 .description = "OnAir USB2 Hybrid USB tuner",
162                 .shortname = "oa2",
163                 .client_modules.lst = pvr2_client_onair_usb2,
164                 .client_modules.cnt = ARRAY_SIZE(pvr2_client_onair_usb2),
165                 .default_tuner_type = TUNER_PHILIPS_ATSC,
166                 .flag_has_analogtuner = !0,
167                 .flag_has_composite = !0,
168                 .flag_has_svideo = !0,
169                 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
170                 .digital_control_scheme = PVR2_DIGITAL_SCHEME_ONAIR,
171 };
172 #endif
173
174
175
176 /*------------------------------------------------------------------------*/
177 /* Hauppauge PVR-USB2 Model 73xxx */
178
179 static const char *pvr2_client_73xxx[] = {
180         "cx25840",
181         "tuner",
182 };
183
184 static const char *pvr2_fw1_names_73xxx[] = {
185                 "v4l-pvrusb2-73xxx-01.fw",
186 };
187
188 static const struct pvr2_device_desc pvr2_device_73xxx = {
189                 .description = "WinTV PVR USB2 Model Category 73xxxx",
190                 .shortname = "73xxx",
191                 .client_modules.lst = pvr2_client_73xxx,
192                 .client_modules.cnt = ARRAY_SIZE(pvr2_client_73xxx),
193                 .fx2_firmware.lst = pvr2_fw1_names_73xxx,
194                 .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_73xxx),
195                 .flag_has_cx25840 = !0,
196                 .flag_has_hauppauge_rom = !0,
197 #if 0
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_HAUPPAUGE,
203                 .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
204 #else
205                 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
206 #endif
207 };
208
209
210
211 /*------------------------------------------------------------------------*/
212 /* Hauppauge PVR-USB2 Model 75xxx */
213
214 static const char *pvr2_client_75xxx[] = {
215         "cx25840",
216         "tuner",
217 };
218
219 static const char *pvr2_fw1_names_75xxx[] = {
220                 "v4l-pvrusb2-73xxx-01.fw",
221 };
222
223 static const struct pvr2_device_desc pvr2_device_75xxx = {
224                 .description = "WinTV PVR USB2 Model Category 75xxxx",
225                 .shortname = "75xxx",
226                 .client_modules.lst = pvr2_client_75xxx,
227                 .client_modules.cnt = ARRAY_SIZE(pvr2_client_75xxx),
228                 .fx2_firmware.lst = pvr2_fw1_names_75xxx,
229                 .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_75xxx),
230                 .flag_has_cx25840 = !0,
231                 .flag_has_hauppauge_rom = !0,
232                 .flag_has_analogtuner = !0,
233                 .flag_has_composite = !0,
234                 .flag_has_svideo = !0,
235                 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
236                 .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE,
237                 .default_std_mask = V4L2_STD_NTSC_M,
238 };
239
240
241
242 /*------------------------------------------------------------------------*/
243
244 struct usb_device_id pvr2_device_table[] = {
245         { USB_DEVICE(0x2040, 0x2900),
246           .driver_info = (kernel_ulong_t)&pvr2_device_29xxx},
247         { USB_DEVICE(0x2040, 0x2400),
248           .driver_info = (kernel_ulong_t)&pvr2_device_24xxx},
249         { USB_DEVICE(0x1164, 0x0622),
250           .driver_info = (kernel_ulong_t)&pvr2_device_gotview_2},
251 #ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_CREATOR
252         { USB_DEVICE(0x11ba, 0x1003),
253           .driver_info = (kernel_ulong_t)&pvr2_device_onair_creator},
254 #endif
255 #ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_USB2
256         { USB_DEVICE(0x11ba, 0x1001),
257           .driver_info = (kernel_ulong_t)&pvr2_device_onair_usb2},
258 #endif
259         { USB_DEVICE(0x2040, 0x7300),
260           .driver_info = (kernel_ulong_t)&pvr2_device_73xxx},
261         { USB_DEVICE(0x2040, 0x7500),
262           .driver_info = (kernel_ulong_t)&pvr2_device_75xxx},
263         { USB_DEVICE(0x2040, 0x7501),
264           .driver_info = (kernel_ulong_t)&pvr2_device_75xxx},
265         { }
266 };
267
268 MODULE_DEVICE_TABLE(usb, pvr2_device_table);
269
270
271 /*
272   Stuff for Emacs to see, in order to encourage consistent editing style:
273   *** Local Variables: ***
274   *** mode: c ***
275   *** fill-column: 75 ***
276   *** tab-width: 8 ***
277   *** c-basic-offset: 8 ***
278   *** End: ***
279   */