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> | |
32 | ||
33 | /* Known major hardware variants, keyed from device ID */ | |
34 | #define PVR2_HDW_TYPE_29XXX 0 | |
35 | #define PVR2_HDW_TYPE_24XXX 1 | |
36 | ||
37 | struct usb_device_id pvr2_device_table[] = { | |
38 | [PVR2_HDW_TYPE_29XXX] = { USB_DEVICE(0x2040, 0x2900) }, | |
39 | [PVR2_HDW_TYPE_24XXX] = { USB_DEVICE(0x2040, 0x2400) }, | |
40 | { } | |
41 | }; | |
42 | ||
43 | /* Names of other client modules to request for 24xxx model hardware */ | |
44 | static const char *pvr2_client_24xxx[] = { | |
45 | "cx25840", | |
46 | "tuner", | |
47 | "wm8775", | |
48 | }; | |
49 | ||
50 | /* Names of other client modules to request for 29xxx model hardware */ | |
51 | static const char *pvr2_client_29xxx[] = { | |
52 | "msp3400", | |
53 | "saa7115", | |
54 | "tuner", | |
55 | }; | |
56 | ||
57 | /* Firmware file name(s) for 29xxx devices */ | |
58 | static const char *pvr2_fw1_names_29xxx[] = { | |
59 | "v4l-pvrusb2-29xxx-01.fw", | |
60 | }; | |
61 | ||
62 | /* Firmware file name(s) for 29xxx devices */ | |
63 | static const char *pvr2_fw1_names_24xxx[] = { | |
64 | "v4l-pvrusb2-24xxx-01.fw", | |
65 | }; | |
66 | ||
67 | const struct pvr2_device_desc pvr2_device_descriptions[] = { | |
68 | [PVR2_HDW_TYPE_29XXX] = { | |
69 | .description = "WinTV PVR USB2 Model Category 29xxxx", | |
70 | .shortname = "29xxx", | |
71 | .client_modules.lst = pvr2_client_29xxx, | |
72 | .client_modules.cnt = ARRAY_SIZE(pvr2_client_29xxx), | |
73 | .fx2_firmware.lst = pvr2_fw1_names_29xxx, | |
74 | .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_29xxx), | |
75 | }, | |
76 | [PVR2_HDW_TYPE_24XXX] = { | |
77 | .description = "WinTV PVR USB2 Model Category 24xxxx", | |
78 | .shortname = "24xxx", | |
79 | .client_modules.lst = pvr2_client_24xxx, | |
80 | .client_modules.cnt = ARRAY_SIZE(pvr2_client_24xxx), | |
81 | .fx2_firmware.lst = pvr2_fw1_names_24xxx, | |
82 | .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_24xxx), | |
83 | .flag_has_cx25840 = !0, | |
84 | .flag_has_wm8775 = !0, | |
85 | }, | |
86 | }; | |
87 | ||
88 | const unsigned int pvr2_device_count = ARRAY_SIZE(pvr2_device_descriptions); | |
89 | ||
90 | MODULE_DEVICE_TABLE(usb, pvr2_device_table); | |
91 | ||
92 | ||
93 | /* | |
94 | Stuff for Emacs to see, in order to encourage consistent editing style: | |
95 | *** Local Variables: *** | |
96 | *** mode: c *** | |
97 | *** fill-column: 75 *** | |
98 | *** tab-width: 8 *** | |
99 | *** c-basic-offset: 8 *** | |
100 | *** End: *** | |
101 | */ |