blob: 2d6519d20f078b59c2ab5baca4688056c6805c1e [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
36/* Known major hardware variants, keyed from device ID */
37#define PVR2_HDW_TYPE_29XXX 0
38#define PVR2_HDW_TYPE_24XXX 1
Mike Isely9e2e3ae2007-11-26 02:14:23 -030039#define PVR2_HDW_TYPE_GOTVIEW_2 2
Mike Isely45427832007-12-08 17:11:13 -030040#ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_CREATOR
41#define PVR2_HDW_TYPE_ONAIR_CREATOR 3
42#endif
43#ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_USB2
44#define PVR2_HDW_TYPE_ONAIR_USB2 4
45#endif
Mike Isely989eb152007-11-26 01:53:12 -030046
47struct usb_device_id pvr2_device_table[] = {
48 [PVR2_HDW_TYPE_29XXX] = { USB_DEVICE(0x2040, 0x2900) },
49 [PVR2_HDW_TYPE_24XXX] = { USB_DEVICE(0x2040, 0x2400) },
Mike Isely9e2e3ae2007-11-26 02:14:23 -030050 [PVR2_HDW_TYPE_GOTVIEW_2] = { USB_DEVICE(0x1164, 0x0622) },
Mike Isely45427832007-12-08 17:11:13 -030051#ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_CREATOR
52 [PVR2_HDW_TYPE_ONAIR_CREATOR] = { USB_DEVICE(0x11ba, 0x1003) },
53#endif
54#ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_USB2
55 [PVR2_HDW_TYPE_ONAIR_USB2] = { USB_DEVICE(0x11ba, 0x1001) },
56#endif
Mike Isely989eb152007-11-26 01:53:12 -030057 { }
58};
Mike Isely45427832007-12-08 17:11:13 -030059#if defined(CONFIG_VIDEO_PVRUSB2_ONAIR_CREATOR) || defined(CONFIG_VIDEO_PVRUSB2_ONAIR_USB2)
60
61/* Names of other client modules to request for Creator model hardware */
62static const char *pvr2_client_onair[] = {
63 "saa7115",
64 "tuner",
65 "cs53l32a",
66};
67#endif
Mike Isely989eb152007-11-26 01:53:12 -030068
69/* Names of other client modules to request for 24xxx model hardware */
70static const char *pvr2_client_24xxx[] = {
71 "cx25840",
72 "tuner",
73 "wm8775",
74};
75
76/* Names of other client modules to request for 29xxx model hardware */
77static const char *pvr2_client_29xxx[] = {
78 "msp3400",
79 "saa7115",
80 "tuner",
81};
82
Mike Isely9e2e3ae2007-11-26 02:14:23 -030083// Names of other client modules to request for Gotview 2 model hardware
84static const char *pvr2_client_gotview_2[] = {
85 "cx25840",
86 "tuner",
87};
88
Mike Isely989eb152007-11-26 01:53:12 -030089/* Firmware file name(s) for 29xxx devices */
90static const char *pvr2_fw1_names_29xxx[] = {
91 "v4l-pvrusb2-29xxx-01.fw",
92};
93
Michael Krufky482cb9a2007-11-27 16:58:33 -030094/* Firmware file name(s) for 24xxx devices */
Mike Isely989eb152007-11-26 01:53:12 -030095static const char *pvr2_fw1_names_24xxx[] = {
96 "v4l-pvrusb2-24xxx-01.fw",
97};
98
99const struct pvr2_device_desc pvr2_device_descriptions[] = {
100 [PVR2_HDW_TYPE_29XXX] = {
101 .description = "WinTV PVR USB2 Model Category 29xxxx",
102 .shortname = "29xxx",
103 .client_modules.lst = pvr2_client_29xxx,
104 .client_modules.cnt = ARRAY_SIZE(pvr2_client_29xxx),
105 .fx2_firmware.lst = pvr2_fw1_names_29xxx,
106 .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_29xxx),
Mike Iselyaaf78842007-11-26 02:04:11 -0300107 .flag_has_hauppauge_rom = !0,
Mike Iselyf5174af2007-11-26 02:07:26 -0300108 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
Mike Isely989eb152007-11-26 01:53:12 -0300109 },
110 [PVR2_HDW_TYPE_24XXX] = {
111 .description = "WinTV PVR USB2 Model Category 24xxxx",
112 .shortname = "24xxx",
113 .client_modules.lst = pvr2_client_24xxx,
114 .client_modules.cnt = ARRAY_SIZE(pvr2_client_24xxx),
115 .fx2_firmware.lst = pvr2_fw1_names_24xxx,
116 .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_24xxx),
117 .flag_has_cx25840 = !0,
118 .flag_has_wm8775 = !0,
Mike Iselyaaf78842007-11-26 02:04:11 -0300119 .flag_has_hauppauge_rom = !0,
Mike Isely056d1a82007-11-26 02:09:42 -0300120 .flag_has_hauppauge_custom_ir = !0,
Mike Iselyf5174af2007-11-26 02:07:26 -0300121 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
Mike Isely989eb152007-11-26 01:53:12 -0300122 },
Mike Isely9e2e3ae2007-11-26 02:14:23 -0300123 [PVR2_HDW_TYPE_GOTVIEW_2] = {
124 .description = "Gotview USB 2.0 DVD 2",
125 .shortname = "gv2",
126 .client_modules.lst = pvr2_client_gotview_2,
127 .client_modules.cnt = ARRAY_SIZE(pvr2_client_gotview_2),
Mike Isely787f5ab2007-12-08 17:08:32 -0300128 .flag_has_cx25840 = !0,
Mike Isely9e2e3ae2007-11-26 02:14:23 -0300129 .default_tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
130 .signal_routing_scheme = PVR2_ROUTING_SCHEME_GOTVIEW,
131 },
Mike Isely45427832007-12-08 17:11:13 -0300132#ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_CREATOR
133 [PVR2_HDW_TYPE_ONAIR_CREATOR] = {
134 .description = "OnAir Creator Hybrid USB tuner",
135 .shortname = "oac",
136 .client_modules.lst = pvr2_client_onair,
137 .client_modules.cnt = ARRAY_SIZE(pvr2_client_onair),
138 .default_tuner_type = TUNER_LG_TDVS_H06XF,
139 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
140 },
141#endif
142#ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_USB2
143 [PVR2_HDW_TYPE_ONAIR_USB2] = {
144 .description = "OnAir USB2 Hybrid USB tuner",
145 .shortname = "oa2",
146 .client_modules.lst = pvr2_client_onair,
147 .client_modules.cnt = ARRAY_SIZE(pvr2_client_onair),
148 .default_tuner_type = TUNER_PHILIPS_ATSC,
149 .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
150 },
151#endif
Mike Isely989eb152007-11-26 01:53:12 -0300152};
153
154const unsigned int pvr2_device_count = ARRAY_SIZE(pvr2_device_descriptions);
155
156MODULE_DEVICE_TABLE(usb, pvr2_device_table);
157
158
159/*
160 Stuff for Emacs to see, in order to encourage consistent editing style:
161 *** Local Variables: ***
162 *** mode: c ***
163 *** fill-column: 75 ***
164 *** tab-width: 8 ***
165 *** c-basic-offset: 8 ***
166 *** End: ***
167 */