aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/pvrusb2/pvrusb2-devattr.c
blob: 2d6519d20f078b59c2ab5baca4688056c6805c1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
/*
 *
 *  $Id$
 *
 *  Copyright (C) 2007 Mike Isely <isely@pobox.com>
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 */

/*

This source file should encompass ALL per-device type information for the
driver.  To define a new device, add elements to the pvr2_device_table and
pvr2_device_desc structures.

*/

#include "pvrusb2-devattr.h"
#include <linux/usb.h>
/* This is needed in order to pull in tuner type ids... */
#include <linux/i2c.h>
#include <media/tuner.h>

/* Known major hardware variants, keyed from device ID */
#define PVR2_HDW_TYPE_29XXX 0
#define PVR2_HDW_TYPE_24XXX 1
#define PVR2_HDW_TYPE_GOTVIEW_2 2
#ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_CREATOR
#define PVR2_HDW_TYPE_ONAIR_CREATOR 3
#endif
#ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_USB2
#define PVR2_HDW_TYPE_ONAIR_USB2 4
#endif

struct usb_device_id pvr2_device_table[] = {
	[PVR2_HDW_TYPE_29XXX] = { USB_DEVICE(0x2040, 0x2900) },
	[PVR2_HDW_TYPE_24XXX] = { USB_DEVICE(0x2040, 0x2400) },
	[PVR2_HDW_TYPE_GOTVIEW_2] = { USB_DEVICE(0x1164, 0x0622) },
#ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_CREATOR
	[PVR2_HDW_TYPE_ONAIR_CREATOR] = { USB_DEVICE(0x11ba, 0x1003) },
#endif
#ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_USB2
	[PVR2_HDW_TYPE_ONAIR_USB2] = { USB_DEVICE(0x11ba, 0x1001) },
#endif
	{ }
};
#if defined(CONFIG_VIDEO_PVRUSB2_ONAIR_CREATOR) || defined(CONFIG_VIDEO_PVRUSB2_ONAIR_USB2)

/* Names of other client modules to request for Creator model hardware */
static const char *pvr2_client_onair[] = {
	"saa7115",
	"tuner",
	"cs53l32a",
};
#endif

/* Names of other client modules to request for 24xxx model hardware */
static const char *pvr2_client_24xxx[] = {
	"cx25840",
	"tuner",
	"wm8775",
};

/* Names of other client modules to request for 29xxx model hardware */
static const char *pvr2_client_29xxx[] = {
	"msp3400",
	"saa7115",
	"tuner",
};

// Names of other client modules to request for Gotview 2 model hardware
static const char *pvr2_client_gotview_2[] = {
	"cx25840",
	"tuner",
};

/* Firmware file name(s) for 29xxx devices */
static const char *pvr2_fw1_names_29xxx[] = {
		"v4l-pvrusb2-29xxx-01.fw",
};

/* Firmware file name(s) for 24xxx devices */
static const char *pvr2_fw1_names_24xxx[] = {
		"v4l-pvrusb2-24xxx-01.fw",
};

const struct pvr2_device_desc pvr2_device_descriptions[] = {
	[PVR2_HDW_TYPE_29XXX] = {
		.description = "WinTV PVR USB2 Model Category 29xxxx",
		.shortname = "29xxx",
		.client_modules.lst = pvr2_client_29xxx,
		.client_modules.cnt = ARRAY_SIZE(pvr2_client_29xxx),
		.fx2_firmware.lst = pvr2_fw1_names_29xxx,
		.fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_29xxx),
		.flag_has_hauppauge_rom = !0,
		.signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
	},
	[PVR2_HDW_TYPE_24XXX] = {
		.description = "WinTV PVR USB2 Model Category 24xxxx",
		.shortname = "24xxx",
		.client_modules.lst = pvr2_client_24xxx,
		.client_modules.cnt = ARRAY_SIZE(pvr2_client_24xxx),
		.fx2_firmware.lst = pvr2_fw1_names_24xxx,
		.fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_24xxx),
		.flag_has_cx25840 = !0,
		.flag_has_wm8775 = !0,
		.flag_has_hauppauge_rom = !0,
		.flag_has_hauppauge_custom_ir = !0,
		.signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
	},
	[PVR2_HDW_TYPE_GOTVIEW_2] = {
		.description = "Gotview USB 2.0 DVD 2",
		.shortname = "gv2",
		.client_modules.lst = pvr2_client_gotview_2,
		.client_modules.cnt = ARRAY_SIZE(pvr2_client_gotview_2),
		.flag_has_cx25840 = !0,
		.default_tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
		.signal_routing_scheme = PVR2_ROUTING_SCHEME_GOTVIEW,
	},
#ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_CREATOR
	[PVR2_HDW_TYPE_ONAIR_CREATOR] = {
		.description = "OnAir Creator Hybrid USB tuner",
		.shortname = "oac",
		.client_modules.lst = pvr2_client_onair,
		.client_modules.cnt = ARRAY_SIZE(pvr2_client_onair),
		.default_tuner_type = TUNER_LG_TDVS_H06XF,
		.signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
	},
#endif
#ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_USB2
	[PVR2_HDW_TYPE_ONAIR_USB2] = {
		.description = "OnAir USB2 Hybrid USB tuner",
		.shortname = "oa2",
		.client_modules.lst = pvr2_client_onair,
		.client_modules.cnt = ARRAY_SIZE(pvr2_client_onair),
		.default_tuner_type = TUNER_PHILIPS_ATSC,
		.signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
	},
#endif
};

const unsigned int pvr2_device_count = ARRAY_SIZE(pvr2_device_descriptions);

MODULE_DEVICE_TABLE(usb, pvr2_device_table);


/*
  Stuff for Emacs to see, in order to encourage consistent editing style:
  *** Local Variables: ***
  *** mode: c ***
  *** fill-column: 75 ***
  *** tab-width: 8 ***
  *** c-basic-offset: 8 ***
  *** End: ***
  */