Commit | Line | Data |
---|---|---|
a6c2ba28 | 1 | /* |
c23f5949 MCC |
2 | em28xx-cards.c - driver for Empia EM2800/EM2820/2840 USB |
3 | video capture devices | |
a6c2ba28 | 4 | |
f7abcd38 MCC |
5 | Copyright (C) 2005 Ludovico Cavedon <cavedon@sssup.it> |
6 | Markus Rechberger <mrechberger@gmail.com> | |
2e7c6dc3 | 7 | Mauro Carvalho Chehab <mchehab@infradead.org> |
f7abcd38 | 8 | Sascha Sommer <saschasommer@freenet.de> |
c647a91a | 9 | Copyright (C) 2012 Frank Schäfer <fschaefer.oss@googlemail.com> |
a6c2ba28 | 10 | |
11 | This program is free software; you can redistribute it and/or modify | |
12 | it under the terms of the GNU General Public License as published by | |
13 | the Free Software Foundation; either version 2 of the License, or | |
14 | (at your option) any later version. | |
15 | ||
16 | This program is distributed in the hope that it will be useful, | |
17 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 | GNU General Public License for more details. | |
20 | ||
21 | You should have received a copy of the GNU General Public License | |
22 | along with this program; if not, write to the Free Software | |
23 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |
24 | */ | |
25 | ||
26 | #include <linux/init.h> | |
27 | #include <linux/module.h> | |
5a0e3ad6 | 28 | #include <linux/slab.h> |
a6c2ba28 | 29 | #include <linux/delay.h> |
30 | #include <linux/i2c.h> | |
31 | #include <linux/usb.h> | |
32 | #include <media/tuner.h> | |
2474ed44 | 33 | #include <media/msp3400.h> |
b5dcee22 MCC |
34 | #include <media/i2c/saa7115.h> |
35 | #include <media/i2c/tvp5150.h> | |
36 | #include <media/i2c/tvaudio.h> | |
f2cf250a | 37 | #include <media/i2c-addr.h> |
1f6173ed | 38 | #include <media/tveeprom.h> |
9bb13a6d | 39 | #include <media/v4l2-common.h> |
a6c2ba28 | 40 | |
f7abcd38 | 41 | #include "em28xx.h" |
a6c2ba28 | 42 | |
1a23f81b MCC |
43 | #define DRIVER_NAME "em28xx" |
44 | ||
03910cc3 MCC |
45 | static int tuner = -1; |
46 | module_param(tuner, int, 0444); | |
47 | MODULE_PARM_DESC(tuner, "tuner type"); | |
48 | ||
c8793b03 MCC |
49 | static unsigned int disable_ir; |
50 | module_param(disable_ir, int, 0444); | |
51 | MODULE_PARM_DESC(disable_ir, "disable infrared remote support"); | |
52 | ||
e2a1b79f DH |
53 | static unsigned int disable_usb_speed_check; |
54 | module_param(disable_usb_speed_check, int, 0444); | |
55 | MODULE_PARM_DESC(disable_usb_speed_check, | |
56 | "override min bandwidth requirement of 480M bps"); | |
57 | ||
d3829fad | 58 | static unsigned int card[] = {[0 ... (EM28XX_MAXBOARDS - 1)] = -1U }; |
1a23f81b MCC |
59 | module_param_array(card, int, NULL, 0444); |
60 | MODULE_PARM_DESC(card, "card type"); | |
61 | ||
7e5d74ee FS |
62 | static int usb_xfer_mode = -1; |
63 | module_param(usb_xfer_mode, int, 0444); | |
64 | MODULE_PARM_DESC(usb_xfer_mode, | |
65 | "USB transfer mode for frame data (-1 = auto, 0 = prefer isoc, 1 = prefer bulk)"); | |
454fe92f | 66 | |
38b61eb2 | 67 | /* Bitmask marking allocated devices from 0 to EM28XX_MAXBOARDS - 1 */ |
9e8ca38c | 68 | static DECLARE_BITMAP(em28xx_devused, EM28XX_MAXBOARDS); |
1a23f81b | 69 | |
03910cc3 MCC |
70 | struct em28xx_hash_table { |
71 | unsigned long hash; | |
72 | unsigned int model; | |
73 | unsigned int tuner; | |
74 | }; | |
75 | ||
60332f03 EG |
76 | static void em28xx_pre_card_setup(struct em28xx *dev); |
77 | ||
0ec202d1 MCC |
78 | /* |
79 | * Reset sequences for analog/digital modes | |
80 | */ | |
81 | ||
82 | /* Reset for the most [analog] boards */ | |
83 | static struct em28xx_reg_seq default_analog[] = { | |
c074fc4c | 84 | {EM2820_R08_GPIO_CTRL, 0x6d, ~EM_GPIO_4, 10}, |
0ec202d1 MCC |
85 | { -1, -1, -1, -1}, |
86 | }; | |
87 | ||
88 | /* Reset for the most [digital] boards */ | |
89 | static struct em28xx_reg_seq default_digital[] = { | |
c074fc4c | 90 | {EM2820_R08_GPIO_CTRL, 0x6e, ~EM_GPIO_4, 10}, |
0ec202d1 MCC |
91 | { -1, -1, -1, -1}, |
92 | }; | |
93 | ||
94 | /* Board Hauppauge WinTV HVR 900 analog */ | |
95 | static struct em28xx_reg_seq hauppauge_wintv_hvr_900_analog[] = { | |
c074fc4c | 96 | {EM2820_R08_GPIO_CTRL, 0x2d, ~EM_GPIO_4, 10}, |
b68cafc5 FS |
97 | { 0x05, 0xff, 0x10, 10}, |
98 | { -1, -1, -1, -1}, | |
0ec202d1 MCC |
99 | }; |
100 | ||
101 | /* Board Hauppauge WinTV HVR 900 digital */ | |
102 | static struct em28xx_reg_seq hauppauge_wintv_hvr_900_digital[] = { | |
c074fc4c | 103 | {EM2820_R08_GPIO_CTRL, 0x2e, ~EM_GPIO_4, 10}, |
0ec202d1 MCC |
104 | {EM2880_R04_GPO, 0x04, 0x0f, 10}, |
105 | {EM2880_R04_GPO, 0x0c, 0x0f, 10}, | |
b68cafc5 | 106 | { -1, -1, -1, -1}, |
0ec202d1 MCC |
107 | }; |
108 | ||
7030f52b DH |
109 | /* Board Hauppauge WinTV HVR 900 (R2) digital */ |
110 | static struct em28xx_reg_seq hauppauge_wintv_hvr_900R2_digital[] = { | |
c074fc4c | 111 | {EM2820_R08_GPIO_CTRL, 0x2e, ~EM_GPIO_4, 10}, |
7030f52b | 112 | {EM2880_R04_GPO, 0x0c, 0x0f, 10}, |
b68cafc5 | 113 | { -1, -1, -1, -1}, |
7030f52b DH |
114 | }; |
115 | ||
0ec202d1 MCC |
116 | /* Boards - EM2880 MSI DIGIVOX AD and EM2880_BOARD_MSI_DIGIVOX_AD_II */ |
117 | static struct em28xx_reg_seq em2880_msi_digivox_ad_analog[] = { | |
b68cafc5 FS |
118 | {EM2820_R08_GPIO_CTRL, 0x69, ~EM_GPIO_4, 10}, |
119 | { -1, -1, -1, -1}, | |
0ec202d1 MCC |
120 | }; |
121 | ||
122 | /* Boards - EM2880 MSI DIGIVOX AD and EM2880_BOARD_MSI_DIGIVOX_AD_II */ | |
0ec202d1 MCC |
123 | |
124 | /* Board - EM2870 Kworld 355u | |
125 | Analog - No input analog */ | |
0ec202d1 | 126 | |
d7de5d8f FM |
127 | /* Board - EM2882 Kworld 315U digital */ |
128 | static struct em28xx_reg_seq em2882_kworld_315u_digital[] = { | |
c074fc4c FS |
129 | {EM2820_R08_GPIO_CTRL, 0xff, 0xff, 10}, |
130 | {EM2820_R08_GPIO_CTRL, 0xfe, 0xff, 10}, | |
d7de5d8f FM |
131 | {EM2880_R04_GPO, 0x04, 0xff, 10}, |
132 | {EM2880_R04_GPO, 0x0c, 0xff, 10}, | |
c074fc4c | 133 | {EM2820_R08_GPIO_CTRL, 0x7e, 0xff, 10}, |
b68cafc5 | 134 | { -1, -1, -1, -1}, |
d7de5d8f FM |
135 | }; |
136 | ||
137 | static struct em28xx_reg_seq em2882_kworld_315u_tuner_gpio[] = { | |
138 | {EM2880_R04_GPO, 0x08, 0xff, 10}, | |
139 | {EM2880_R04_GPO, 0x0c, 0xff, 10}, | |
140 | {EM2880_R04_GPO, 0x08, 0xff, 10}, | |
141 | {EM2880_R04_GPO, 0x0c, 0xff, 10}, | |
b68cafc5 | 142 | { -1, -1, -1, -1}, |
d7de5d8f FM |
143 | }; |
144 | ||
6e7b9ea0 | 145 | static struct em28xx_reg_seq kworld_330u_analog[] = { |
c074fc4c | 146 | {EM2820_R08_GPIO_CTRL, 0x6d, ~EM_GPIO_4, 10}, |
6e7b9ea0 | 147 | {EM2880_R04_GPO, 0x00, 0xff, 10}, |
b68cafc5 | 148 | { -1, -1, -1, -1}, |
6e7b9ea0 RK |
149 | }; |
150 | ||
151 | static struct em28xx_reg_seq kworld_330u_digital[] = { | |
c074fc4c | 152 | {EM2820_R08_GPIO_CTRL, 0x6e, ~EM_GPIO_4, 10}, |
6e7b9ea0 | 153 | {EM2880_R04_GPO, 0x08, 0xff, 10}, |
b68cafc5 | 154 | { -1, -1, -1, -1}, |
6e7b9ea0 RK |
155 | }; |
156 | ||
19859229 DH |
157 | /* Evga inDtube |
158 | GPIO0 - Enable digital power (s5h1409) - low to enable | |
159 | GPIO1 - Enable analog power (tvp5150/emp202) - low to enable | |
160 | GPIO4 - xc3028 reset | |
161 | GOP3 - s5h1409 reset | |
162 | */ | |
163 | static struct em28xx_reg_seq evga_indtube_analog[] = { | |
c074fc4c | 164 | {EM2820_R08_GPIO_CTRL, 0x79, 0xff, 60}, |
19859229 DH |
165 | { -1, -1, -1, -1}, |
166 | }; | |
167 | ||
168 | static struct em28xx_reg_seq evga_indtube_digital[] = { | |
c074fc4c | 169 | {EM2820_R08_GPIO_CTRL, 0x7a, 0xff, 1}, |
19859229 DH |
170 | {EM2880_R04_GPO, 0x04, 0xff, 10}, |
171 | {EM2880_R04_GPO, 0x0c, 0xff, 1}, | |
b68cafc5 | 172 | { -1, -1, -1, -1}, |
19859229 DH |
173 | }; |
174 | ||
7e48b30a | 175 | /* |
6dbea9f0 | 176 | * KWorld PlusTV 340U, UB435-Q and UB435-Q V2 (ATSC) GPIOs map: |
7e48b30a JW |
177 | * EM_GPIO_0 - currently unknown |
178 | * EM_GPIO_1 - LED disable/enable (1 = off, 0 = on) | |
179 | * EM_GPIO_2 - currently unknown | |
180 | * EM_GPIO_3 - currently unknown | |
181 | * EM_GPIO_4 - TDA18271HD/C1 tuner (1 = active, 0 = in reset) | |
182 | * EM_GPIO_5 - LGDT3304 ATSC/QAM demod (1 = active, 0 = in reset) | |
183 | * EM_GPIO_6 - currently unknown | |
184 | * EM_GPIO_7 - currently unknown | |
185 | */ | |
186 | static struct em28xx_reg_seq kworld_a340_digital[] = { | |
b68cafc5 FS |
187 | {EM2820_R08_GPIO_CTRL, 0x6d, ~EM_GPIO_4, 10}, |
188 | { -1, -1, -1, -1}, | |
7e48b30a JW |
189 | }; |
190 | ||
02bc1f55 | 191 | static struct em28xx_reg_seq kworld_ub435q_v3_digital[] = { |
fdf1bc9f MCC |
192 | {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 100}, |
193 | {EM2874_R80_GPIO_P0_CTRL, 0xfe, 0xff, 100}, | |
02bc1f55 MCC |
194 | {EM2874_R80_GPIO_P0_CTRL, 0xbe, 0xff, 100}, |
195 | {EM2874_R80_GPIO_P0_CTRL, 0xfe, 0xff, 100}, | |
196 | { -1, -1, -1, -1}, | |
197 | }; | |
198 | ||
d5b3ba9c DH |
199 | /* Pinnacle Hybrid Pro eb1a:2881 */ |
200 | static struct em28xx_reg_seq pinnacle_hybrid_pro_analog[] = { | |
c074fc4c | 201 | {EM2820_R08_GPIO_CTRL, 0xfd, ~EM_GPIO_4, 10}, |
d5b3ba9c DH |
202 | { -1, -1, -1, -1}, |
203 | }; | |
204 | ||
205 | static struct em28xx_reg_seq pinnacle_hybrid_pro_digital[] = { | |
c074fc4c | 206 | {EM2820_R08_GPIO_CTRL, 0x6e, ~EM_GPIO_4, 10}, |
d5b3ba9c DH |
207 | {EM2880_R04_GPO, 0x04, 0xff, 100},/* zl10353 reset */ |
208 | {EM2880_R04_GPO, 0x0c, 0xff, 1}, | |
209 | { -1, -1, -1, -1}, | |
210 | }; | |
211 | ||
cec4e6c1 | 212 | static struct em28xx_reg_seq terratec_cinergy_USB_XS_FR_analog[] = { |
c074fc4c | 213 | {EM2820_R08_GPIO_CTRL, 0x6d, ~EM_GPIO_4, 10}, |
cec4e6c1 | 214 | {EM2880_R04_GPO, 0x00, 0xff, 10}, |
b68cafc5 | 215 | { -1, -1, -1, -1}, |
cec4e6c1 MG |
216 | }; |
217 | ||
218 | static struct em28xx_reg_seq terratec_cinergy_USB_XS_FR_digital[] = { | |
c074fc4c | 219 | {EM2820_R08_GPIO_CTRL, 0x6e, ~EM_GPIO_4, 10}, |
cec4e6c1 | 220 | {EM2880_R04_GPO, 0x08, 0xff, 10}, |
b68cafc5 | 221 | { -1, -1, -1, -1}, |
cec4e6c1 MG |
222 | }; |
223 | ||
38b2df95 DH |
224 | /* PCTV HD Mini (80e) GPIOs |
225 | 0-5: not used | |
226 | 6: demod reset, active low | |
227 | 7: LED on, active high */ | |
228 | static struct em28xx_reg_seq em2874_pctv_80e_digital[] = { | |
229 | {EM28XX_R06_I2C_CLK, 0x45, 0xff, 10}, /*400 KHz*/ | |
88e4fcda MCC |
230 | {EM2874_R80_GPIO_P0_CTRL, 0x00, 0xff, 100},/*Demod reset*/ |
231 | {EM2874_R80_GPIO_P0_CTRL, 0x40, 0xff, 10}, | |
38b2df95 DH |
232 | { -1, -1, -1, -1}, |
233 | }; | |
234 | ||
285eb1a4 AP |
235 | /* eb1a:2868 Reddo DVB-C USB TV Box |
236 | GPIO4 - CU1216L NIM | |
237 | Other GPIOs seems to be don't care. */ | |
238 | static struct em28xx_reg_seq reddo_dvb_c_usb_box[] = { | |
c074fc4c FS |
239 | {EM2820_R08_GPIO_CTRL, 0xfe, 0xff, 10}, |
240 | {EM2820_R08_GPIO_CTRL, 0xde, 0xff, 10}, | |
241 | {EM2820_R08_GPIO_CTRL, 0xfe, 0xff, 10}, | |
242 | {EM2820_R08_GPIO_CTRL, 0xff, 0xff, 10}, | |
243 | {EM2820_R08_GPIO_CTRL, 0x7f, 0xff, 10}, | |
244 | {EM2820_R08_GPIO_CTRL, 0x6f, 0xff, 10}, | |
245 | {EM2820_R08_GPIO_CTRL, 0xff, 0xff, 10}, | |
b68cafc5 | 246 | { -1, -1, -1, -1}, |
285eb1a4 | 247 | }; |
d5b3ba9c | 248 | |
0ec202d1 | 249 | /* Callback for the most boards */ |
017ab4b1 | 250 | static struct em28xx_reg_seq default_tuner_gpio[] = { |
c074fc4c FS |
251 | {EM2820_R08_GPIO_CTRL, EM_GPIO_4, EM_GPIO_4, 10}, |
252 | {EM2820_R08_GPIO_CTRL, 0, EM_GPIO_4, 10}, | |
253 | {EM2820_R08_GPIO_CTRL, EM_GPIO_4, EM_GPIO_4, 10}, | |
b68cafc5 | 254 | { -1, -1, -1, -1}, |
0ec202d1 MCC |
255 | }; |
256 | ||
2bd1d9eb VW |
257 | /* Mute/unmute */ |
258 | static struct em28xx_reg_seq compro_unmute_tv_gpio[] = { | |
b68cafc5 FS |
259 | {EM2820_R08_GPIO_CTRL, 5, 7, 10}, |
260 | { -1, -1, -1, -1}, | |
2bd1d9eb VW |
261 | }; |
262 | ||
263 | static struct em28xx_reg_seq compro_unmute_svid_gpio[] = { | |
b68cafc5 FS |
264 | {EM2820_R08_GPIO_CTRL, 4, 7, 10}, |
265 | { -1, -1, -1, -1}, | |
2bd1d9eb VW |
266 | }; |
267 | ||
268 | static struct em28xx_reg_seq compro_mute_gpio[] = { | |
b68cafc5 FS |
269 | {EM2820_R08_GPIO_CTRL, 6, 7, 10}, |
270 | { -1, -1, -1, -1}, | |
2bd1d9eb VW |
271 | }; |
272 | ||
766ed64d MCC |
273 | /* Terratec AV350 */ |
274 | static struct em28xx_reg_seq terratec_av350_mute_gpio[] = { | |
c074fc4c | 275 | {EM2820_R08_GPIO_CTRL, 0xff, 0x7f, 10}, |
766ed64d MCC |
276 | { -1, -1, -1, -1}, |
277 | }; | |
278 | ||
279 | static struct em28xx_reg_seq terratec_av350_unmute_gpio[] = { | |
c074fc4c | 280 | {EM2820_R08_GPIO_CTRL, 0xff, 0xff, 10}, |
766ed64d MCC |
281 | { -1, -1, -1, -1}, |
282 | }; | |
02e7804b MCC |
283 | |
284 | static struct em28xx_reg_seq silvercrest_reg_seq[] = { | |
c074fc4c FS |
285 | {EM2820_R08_GPIO_CTRL, 0xff, 0xff, 10}, |
286 | {EM2820_R08_GPIO_CTRL, 0x01, 0xf7, 10}, | |
02e7804b MCC |
287 | { -1, -1, -1, -1}, |
288 | }; | |
289 | ||
694a101e | 290 | static struct em28xx_reg_seq vc211a_enable[] = { |
c074fc4c FS |
291 | {EM2820_R08_GPIO_CTRL, 0xff, 0x07, 10}, |
292 | {EM2820_R08_GPIO_CTRL, 0xff, 0x0f, 10}, | |
293 | {EM2820_R08_GPIO_CTRL, 0xff, 0x0b, 10}, | |
694a101e MCC |
294 | { -1, -1, -1, -1}, |
295 | }; | |
296 | ||
7ca7ef60 | 297 | static struct em28xx_reg_seq dikom_dk300_digital[] = { |
c074fc4c | 298 | {EM2820_R08_GPIO_CTRL, 0x6e, ~EM_GPIO_4, 10}, |
7ca7ef60 | 299 | {EM2880_R04_GPO, 0x08, 0xff, 10}, |
b68cafc5 | 300 | { -1, -1, -1, -1}, |
7ca7ef60 AA |
301 | }; |
302 | ||
ca3dfd6a MCC |
303 | /* Reset for the most [digital] boards */ |
304 | static struct em28xx_reg_seq leadership_digital[] = { | |
907d109b | 305 | {EM2874_R80_GPIO_P0_CTRL, 0x70, 0xff, 10}, |
b68cafc5 | 306 | { -1, -1, -1, -1}, |
ca3dfd6a MCC |
307 | }; |
308 | ||
309 | static struct em28xx_reg_seq leadership_reset[] = { | |
907d109b FS |
310 | {EM2874_R80_GPIO_P0_CTRL, 0xf0, 0xff, 10}, |
311 | {EM2874_R80_GPIO_P0_CTRL, 0xb0, 0xff, 10}, | |
312 | {EM2874_R80_GPIO_P0_CTRL, 0xf0, 0xff, 10}, | |
b68cafc5 | 313 | { -1, -1, -1, -1}, |
ca3dfd6a MCC |
314 | }; |
315 | ||
460312ec | 316 | /* 2013:024f PCTV nanoStick T2 290e |
d6a5f921 AP |
317 | * GPIO_6 - demod reset |
318 | * GPIO_7 - LED | |
319 | */ | |
320 | static struct em28xx_reg_seq pctv_290e[] = { | |
907d109b FS |
321 | {EM2874_R80_GPIO_P0_CTRL, 0x00, 0xff, 80}, |
322 | {EM2874_R80_GPIO_P0_CTRL, 0x40, 0xff, 80}, /* GPIO_6 = 1 */ | |
323 | {EM2874_R80_GPIO_P0_CTRL, 0xc0, 0xff, 80}, /* GPIO_7 = 1 */ | |
b68cafc5 | 324 | { -1, -1, -1, -1}, |
d6a5f921 | 325 | }; |
ca3dfd6a | 326 | |
fec528b7 MCC |
327 | #if 0 |
328 | static struct em28xx_reg_seq terratec_h5_gpio[] = { | |
c074fc4c | 329 | {EM2820_R08_GPIO_CTRL, 0xff, 0xff, 10}, |
907d109b FS |
330 | {EM2874_R80_GPIO_P0_CTRL, 0xf6, 0xff, 100}, |
331 | {EM2874_R80_GPIO_P0_CTRL, 0xf2, 0xff, 50}, | |
332 | {EM2874_R80_GPIO_P0_CTRL, 0xf6, 0xff, 50}, | |
b68cafc5 | 333 | { -1, -1, -1, -1}, |
fec528b7 MCC |
334 | }; |
335 | ||
336 | static struct em28xx_reg_seq terratec_h5_digital[] = { | |
907d109b FS |
337 | {EM2874_R80_GPIO_P0_CTRL, 0xf6, 0xff, 10}, |
338 | {EM2874_R80_GPIO_P0_CTRL, 0xe6, 0xff, 100}, | |
339 | {EM2874_R80_GPIO_P0_CTRL, 0xa6, 0xff, 10}, | |
b68cafc5 | 340 | { -1, -1, -1, -1}, |
fec528b7 MCC |
341 | }; |
342 | #endif | |
343 | ||
36588715 AP |
344 | /* 2013:024f PCTV DVB-S2 Stick 460e |
345 | * GPIO_0 - POWER_ON | |
346 | * GPIO_1 - BOOST | |
347 | * GPIO_2 - VUV_LNB (red LED) | |
348 | * GPIO_3 - EXT_12V | |
349 | * GPIO_4 - INT_DEM (DEMOD GPIO_0) | |
350 | * GPIO_5 - INT_LNB | |
351 | * GPIO_6 - RESET_DEM | |
352 | * GPIO_7 - LED (green LED) | |
353 | */ | |
354 | static struct em28xx_reg_seq pctv_460e[] = { | |
b68cafc5 FS |
355 | {EM2874_R80_GPIO_P0_CTRL, 0x01, 0xff, 50}, |
356 | { 0x0d, 0xff, 0xff, 50}, | |
357 | {EM2874_R80_GPIO_P0_CTRL, 0x41, 0xff, 50}, /* GPIO_6=1 */ | |
358 | { 0x0d, 0x42, 0xff, 50}, | |
359 | {EM2874_R80_GPIO_P0_CTRL, 0x61, 0xff, 50}, /* GPIO_5=1 */ | |
360 | { -1, -1, -1, -1}, | |
36588715 AP |
361 | }; |
362 | ||
4159d01b | 363 | static struct em28xx_reg_seq c3tech_digital_duo_digital[] = { |
907d109b FS |
364 | {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 10}, |
365 | {EM2874_R80_GPIO_P0_CTRL, 0xfd, 0xff, 10}, /* xc5000 reset */ | |
366 | {EM2874_R80_GPIO_P0_CTRL, 0xf9, 0xff, 35}, | |
367 | {EM2874_R80_GPIO_P0_CTRL, 0xfd, 0xff, 10}, | |
368 | {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 10}, | |
369 | {EM2874_R80_GPIO_P0_CTRL, 0xfe, 0xff, 10}, | |
370 | {EM2874_R80_GPIO_P0_CTRL, 0xbe, 0xff, 10}, | |
371 | {EM2874_R80_GPIO_P0_CTRL, 0xfe, 0xff, 20}, | |
b68cafc5 | 372 | { -1, -1, -1, -1}, |
4159d01b MCC |
373 | }; |
374 | ||
ec573362 AP |
375 | /* |
376 | * 2013:0258 PCTV DVB-S2 Stick (461e) | |
377 | * GPIO 0 = POWER_ON | |
378 | * GPIO 1 = BOOST | |
379 | * GPIO 2 = VUV_LNB (red LED) | |
380 | * GPIO 3 = #EXT_12V | |
381 | * GPIO 4 = INT_DEM | |
382 | * GPIO 5 = INT_LNB | |
383 | * GPIO 6 = #RESET_DEM | |
384 | * GPIO 7 = P07_LED (green LED) | |
385 | */ | |
386 | static struct em28xx_reg_seq pctv_461e[] = { | |
387 | {EM2874_R80_GPIO_P0_CTRL, 0x7f, 0xff, 0}, | |
388 | {0x0d, 0xff, 0xff, 0}, | |
389 | {EM2874_R80_GPIO_P0_CTRL, 0x3f, 0xff, 100}, /* reset demod */ | |
390 | {EM2874_R80_GPIO_P0_CTRL, 0x7f, 0xff, 200}, /* reset demod */ | |
391 | {0x0d, 0x42, 0xff, 0}, | |
392 | {EM2874_R80_GPIO_P0_CTRL, 0xeb, 0xff, 0}, | |
393 | {EM2874_R5F_TS_ENABLE, 0x84, 0x84, 0}, /* parallel? | null discard */ | |
394 | { -1, -1, -1, -1}, | |
395 | }; | |
396 | ||
8503232f | 397 | #if 0 |
82e7dbbd | 398 | static struct em28xx_reg_seq hauppauge_930c_gpio[] = { |
907d109b FS |
399 | {EM2874_R80_GPIO_P0_CTRL, 0x6f, 0xff, 10}, |
400 | {EM2874_R80_GPIO_P0_CTRL, 0x4f, 0xff, 10}, /* xc5000 reset */ | |
401 | {EM2874_R80_GPIO_P0_CTRL, 0x6f, 0xff, 10}, | |
402 | {EM2874_R80_GPIO_P0_CTRL, 0x4f, 0xff, 10}, | |
b68cafc5 | 403 | { -1, -1, -1, -1}, |
82e7dbbd EDP |
404 | }; |
405 | ||
82e7dbbd | 406 | static struct em28xx_reg_seq hauppauge_930c_digital[] = { |
907d109b FS |
407 | {EM2874_R80_GPIO_P0_CTRL, 0xf6, 0xff, 10}, |
408 | {EM2874_R80_GPIO_P0_CTRL, 0xe6, 0xff, 100}, | |
409 | {EM2874_R80_GPIO_P0_CTRL, 0xa6, 0xff, 10}, | |
b68cafc5 | 410 | { -1, -1, -1, -1}, |
82e7dbbd EDP |
411 | }; |
412 | #endif | |
413 | ||
3553085c | 414 | /* 1b80:e425 MaxMedia UB425-TC |
7c1dfdb0 | 415 | * 1b80:e1cc Delock 61959 |
3553085c AP |
416 | * GPIO_6 - demod reset, 0=active |
417 | * GPIO_7 - LED, 0=active | |
418 | */ | |
419 | static struct em28xx_reg_seq maxmedia_ub425_tc[] = { | |
b68cafc5 FS |
420 | {EM2874_R80_GPIO_P0_CTRL, 0x83, 0xff, 100}, |
421 | {EM2874_R80_GPIO_P0_CTRL, 0xc3, 0xff, 100}, /* GPIO_6 = 1 */ | |
422 | {EM2874_R80_GPIO_P0_CTRL, 0x43, 0xff, 000}, /* GPIO_7 = 0 */ | |
423 | { -1, -1, -1, -1}, | |
3553085c AP |
424 | }; |
425 | ||
fa5527cd IK |
426 | /* 2304:0242 PCTV QuatroStick (510e) |
427 | * GPIO_2: decoder reset, 0=active | |
428 | * GPIO_4: decoder suspend, 0=active | |
429 | * GPIO_6: demod reset, 0=active | |
430 | * GPIO_7: LED, 1=active | |
431 | */ | |
432 | static struct em28xx_reg_seq pctv_510e[] = { | |
b68cafc5 FS |
433 | {EM2874_R80_GPIO_P0_CTRL, 0x10, 0xff, 100}, |
434 | {EM2874_R80_GPIO_P0_CTRL, 0x14, 0xff, 100}, /* GPIO_2 = 1 */ | |
435 | {EM2874_R80_GPIO_P0_CTRL, 0x54, 0xff, 050}, /* GPIO_6 = 1 */ | |
436 | { -1, -1, -1, -1}, | |
fa5527cd IK |
437 | }; |
438 | ||
c247d7b1 AP |
439 | /* 2013:0251 PCTV QuatroStick nano (520e) |
440 | * GPIO_2: decoder reset, 0=active | |
441 | * GPIO_4: decoder suspend, 0=active | |
442 | * GPIO_6: demod reset, 0=active | |
443 | * GPIO_7: LED, 1=active | |
444 | */ | |
445 | static struct em28xx_reg_seq pctv_520e[] = { | |
b68cafc5 FS |
446 | {EM2874_R80_GPIO_P0_CTRL, 0x10, 0xff, 100}, |
447 | {EM2874_R80_GPIO_P0_CTRL, 0x14, 0xff, 100}, /* GPIO_2 = 1 */ | |
448 | {EM2874_R80_GPIO_P0_CTRL, 0x54, 0xff, 050}, /* GPIO_6 = 1 */ | |
449 | {EM2874_R80_GPIO_P0_CTRL, 0xd4, 0xff, 000}, /* GPIO_7 = 1 */ | |
450 | { -1, -1, -1, -1}, | |
c247d7b1 AP |
451 | }; |
452 | ||
0c37e736 FS |
453 | /* 1ae7:9003/9004 SpeedLink Vicious And Devine Laplace webcam |
454 | * reg 0x80/0x84: | |
455 | * GPIO_0: capturing LED, 0=on, 1=off | |
456 | * GPIO_2: AV mute button, 0=pressed, 1=unpressed | |
457 | * GPIO 3: illumination button, 0=pressed, 1=unpressed | |
458 | * GPIO_6: illumination/flash LED, 0=on, 1=off | |
459 | * reg 0x81/0x85: | |
460 | * GPIO_7: snapshot button, 0=pressed, 1=unpressed | |
461 | */ | |
462 | static struct em28xx_reg_seq speedlink_vad_laplace_reg_seq[] = { | |
463 | {EM2820_R08_GPIO_CTRL, 0xf7, 0xff, 10}, | |
464 | {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xb2, 10}, | |
465 | { -1, -1, -1, -1}, | |
466 | }; | |
467 | ||
19229240 AP |
468 | static struct em28xx_reg_seq pctv_292e[] = { |
469 | {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 0}, | |
470 | {0x0d, 0xff, 0xff, 950}, | |
471 | {EM2874_R80_GPIO_P0_CTRL, 0xbd, 0xff, 100}, | |
472 | {EM2874_R80_GPIO_P0_CTRL, 0xfd, 0xff, 410}, | |
473 | {EM2874_R80_GPIO_P0_CTRL, 0x7d, 0xff, 300}, | |
474 | {EM2874_R80_GPIO_P0_CTRL, 0x7c, 0xff, 60}, | |
475 | {0x0d, 0x42, 0xff, 50}, | |
476 | {EM2874_R5F_TS_ENABLE, 0x85, 0xff, 0}, | |
477 | {-1, -1, -1, -1}, | |
478 | }; | |
479 | ||
fc30dd76 OS |
480 | static struct em28xx_reg_seq terratec_t2_stick_hd[] = { |
481 | {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 0}, | |
482 | {0x0d, 0xff, 0xff, 600}, | |
483 | {EM2874_R80_GPIO_P0_CTRL, 0xfc, 0xff, 10}, | |
484 | {EM2874_R80_GPIO_P0_CTRL, 0xbc, 0xff, 100}, | |
485 | {EM2874_R80_GPIO_P0_CTRL, 0xfc, 0xff, 100}, | |
486 | {EM2874_R80_GPIO_P0_CTRL, 0x00, 0xff, 300}, | |
487 | {EM2874_R80_GPIO_P0_CTRL, 0xf8, 0xff, 100}, | |
488 | {EM2874_R80_GPIO_P0_CTRL, 0xfc, 0xff, 300}, | |
489 | {0x0d, 0x42, 0xff, 1000}, | |
490 | {EM2874_R5F_TS_ENABLE, 0x85, 0xff, 0}, | |
491 | {-1, -1, -1, -1}, | |
492 | }; | |
493 | ||
f5222609 FS |
494 | /* |
495 | * Button definitions | |
496 | */ | |
497 | static struct em28xx_button std_snapshot_button[] = { | |
498 | { | |
499 | .role = EM28XX_BUTTON_SNAPSHOT, | |
500 | .reg_r = EM28XX_R0C_USBSUSP, | |
501 | .reg_clearing = EM28XX_R0C_USBSUSP, | |
502 | .mask = EM28XX_R0C_USBSUSP_SNAPSHOT, | |
503 | .inverted = 0, | |
504 | }, | |
505 | {-1, 0, 0, 0, 0}, | |
506 | }; | |
507 | ||
0c37e736 FS |
508 | static struct em28xx_button speedlink_vad_laplace_buttons[] = { |
509 | { | |
510 | .role = EM28XX_BUTTON_SNAPSHOT, | |
511 | .reg_r = EM2874_R85_GPIO_P1_STATE, | |
512 | .mask = 0x80, | |
513 | .inverted = 1, | |
514 | }, | |
515 | { | |
516 | .role = EM28XX_BUTTON_ILLUMINATION, | |
517 | .reg_r = EM2874_R84_GPIO_P0_STATE, | |
518 | .mask = 0x08, | |
519 | .inverted = 1, | |
520 | }, | |
521 | {-1, 0, 0, 0, 0}, | |
522 | }; | |
523 | ||
524 | /* | |
525 | * LED definitions | |
526 | */ | |
527 | static struct em28xx_led speedlink_vad_laplace_leds[] = { | |
528 | { | |
529 | .role = EM28XX_LED_ANALOG_CAPTURING, | |
530 | .gpio_reg = EM2874_R80_GPIO_P0_CTRL, | |
531 | .gpio_mask = 0x01, | |
532 | .inverted = 1, | |
533 | }, | |
534 | { | |
535 | .role = EM28XX_LED_ILLUMINATION, | |
536 | .gpio_reg = EM2874_R80_GPIO_P0_CTRL, | |
537 | .gpio_mask = 0x40, | |
538 | .inverted = 1, | |
539 | }, | |
540 | {-1, 0, 0, 0}, | |
541 | }; | |
542 | ||
59432be1 MCC |
543 | static struct em28xx_led kworld_ub435q_v3_leds[] = { |
544 | { | |
545 | .role = EM28XX_LED_DIGITAL_CAPTURING, | |
546 | .gpio_reg = EM2874_R80_GPIO_P0_CTRL, | |
547 | .gpio_mask = 0x80, | |
548 | .inverted = 1, | |
549 | }, | |
550 | {-1, 0, 0, 0}, | |
551 | }; | |
552 | ||
88e4fcda MCC |
553 | static struct em28xx_led pctv_80e_leds[] = { |
554 | { | |
555 | .role = EM28XX_LED_DIGITAL_CAPTURING, | |
556 | .gpio_reg = EM2874_R80_GPIO_P0_CTRL, | |
557 | .gpio_mask = 0x80, | |
558 | .inverted = 0, | |
559 | }, | |
560 | {-1, 0, 0, 0}, | |
561 | }; | |
562 | ||
0ec202d1 MCC |
563 | /* |
564 | * Board definitions | |
565 | */ | |
3acf2809 | 566 | struct em28xx_board em28xx_boards[] = { |
95b86a9a | 567 | [EM2750_BOARD_UNKNOWN] = { |
8b220793 | 568 | .name = "EM2710/EM2750/EM2751 webcam grabber", |
3d3215c4 | 569 | .xclk = EM28XX_XCLK_FREQUENCY_20MHZ, |
8a2e6990 MCC |
570 | .tuner_type = TUNER_ABSENT, |
571 | .is_webcam = 1, | |
95b86a9a DSL |
572 | .input = { { |
573 | .type = EM28XX_VMUX_COMPOSITE1, | |
574 | .vmux = 0, | |
8a5caa6b | 575 | .amux = EM28XX_AMUX_VIDEO, |
b80fd2d8 | 576 | .gpio = silvercrest_reg_seq, |
95b86a9a DSL |
577 | } }, |
578 | }, | |
596d92d5 MCC |
579 | [EM2800_BOARD_UNKNOWN] = { |
580 | .name = "Unknown EM2800 video grabber", | |
581 | .is_em2800 = 1, | |
596d92d5 | 582 | .tda9887_conf = TDA9887_PRESENT, |
ec5de990 | 583 | .decoder = EM28XX_SAA711X, |
1c67e76f | 584 | .tuner_type = TUNER_ABSENT, |
d4d889e3 | 585 | .input = { { |
3acf2809 | 586 | .type = EM28XX_VMUX_COMPOSITE1, |
c7c0b34c | 587 | .vmux = SAA7115_COMPOSITE0, |
8a5caa6b | 588 | .amux = EM28XX_AMUX_LINE_IN, |
c23f5949 | 589 | }, { |
3acf2809 | 590 | .type = EM28XX_VMUX_SVIDEO, |
c7c0b34c | 591 | .vmux = SAA7115_SVIDEO3, |
8a5caa6b | 592 | .amux = EM28XX_AMUX_LINE_IN, |
c23f5949 | 593 | } }, |
596d92d5 MCC |
594 | }, |
595 | [EM2820_BOARD_UNKNOWN] = { | |
a2070c66 MCC |
596 | .name = "Unknown EM2750/28xx video grabber", |
597 | .tuner_type = TUNER_ABSENT, | |
b04fb661 | 598 | .is_webcam = 1, /* To enable sensor probe */ |
596d92d5 | 599 | }, |
95b86a9a DSL |
600 | [EM2750_BOARD_DLCW_130] = { |
601 | /* Beijing Huaqi Information Digital Technology Co., Ltd */ | |
602 | .name = "Huaqi DLCW-130", | |
603 | .valid = EM28XX_BOARD_NOT_VALIDATED, | |
a2070c66 | 604 | .xclk = EM28XX_XCLK_FREQUENCY_48MHZ, |
8a2e6990 MCC |
605 | .tuner_type = TUNER_ABSENT, |
606 | .is_webcam = 1, | |
95b86a9a DSL |
607 | .input = { { |
608 | .type = EM28XX_VMUX_COMPOSITE1, | |
609 | .vmux = 0, | |
8a5caa6b | 610 | .amux = EM28XX_AMUX_VIDEO, |
95b86a9a DSL |
611 | } }, |
612 | }, | |
4d17d083 | 613 | [EM2820_BOARD_KWORLD_PVRTV2800RF] = { |
33ccaa3f | 614 | .name = "Kworld PVR TV 2800 RF", |
ed086314 | 615 | .tuner_type = TUNER_TEMIC_PAL, |
4d17d083 | 616 | .tda9887_conf = TDA9887_PRESENT, |
ec5de990 | 617 | .decoder = EM28XX_SAA711X, |
d4d889e3 | 618 | .input = { { |
4d17d083 | 619 | .type = EM28XX_VMUX_COMPOSITE1, |
c7c0b34c | 620 | .vmux = SAA7115_COMPOSITE0, |
8a5caa6b | 621 | .amux = EM28XX_AMUX_LINE_IN, |
c23f5949 | 622 | }, { |
4d17d083 | 623 | .type = EM28XX_VMUX_SVIDEO, |
c7c0b34c | 624 | .vmux = SAA7115_SVIDEO3, |
8a5caa6b | 625 | .amux = EM28XX_AMUX_LINE_IN, |
c23f5949 | 626 | } }, |
4d17d083 | 627 | }, |
f7fe3e6f DSL |
628 | [EM2820_BOARD_GADMEI_TVR200] = { |
629 | .name = "Gadmei TVR200", | |
630 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, | |
631 | .tda9887_conf = TDA9887_PRESENT, | |
632 | .decoder = EM28XX_SAA711X, | |
633 | .input = { { | |
634 | .type = EM28XX_VMUX_TELEVISION, | |
635 | .vmux = SAA7115_COMPOSITE2, | |
636 | .amux = EM28XX_AMUX_LINE_IN, | |
637 | }, { | |
638 | .type = EM28XX_VMUX_COMPOSITE1, | |
639 | .vmux = SAA7115_COMPOSITE0, | |
640 | .amux = EM28XX_AMUX_LINE_IN, | |
641 | }, { | |
642 | .type = EM28XX_VMUX_SVIDEO, | |
643 | .vmux = SAA7115_SVIDEO3, | |
644 | .amux = EM28XX_AMUX_LINE_IN, | |
645 | } }, | |
646 | }, | |
a6c2ba28 | 647 | [EM2820_BOARD_TERRATEC_CINERGY_250] = { |
648 | .name = "Terratec Cinergy 250 USB", | |
a6c2ba28 | 649 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
ac07bb73 | 650 | .has_ir_i2c = 1, |
a6c2ba28 | 651 | .tda9887_conf = TDA9887_PRESENT, |
ec5de990 | 652 | .decoder = EM28XX_SAA711X, |
d4d889e3 | 653 | .input = { { |
3acf2809 | 654 | .type = EM28XX_VMUX_TELEVISION, |
c7c0b34c | 655 | .vmux = SAA7115_COMPOSITE2, |
5e8d02bb | 656 | .amux = EM28XX_AMUX_VIDEO, |
c23f5949 | 657 | }, { |
3acf2809 | 658 | .type = EM28XX_VMUX_COMPOSITE1, |
c7c0b34c | 659 | .vmux = SAA7115_COMPOSITE0, |
8a5caa6b | 660 | .amux = EM28XX_AMUX_LINE_IN, |
c23f5949 | 661 | }, { |
3acf2809 | 662 | .type = EM28XX_VMUX_SVIDEO, |
c7c0b34c | 663 | .vmux = SAA7115_SVIDEO3, |
8a5caa6b | 664 | .amux = EM28XX_AMUX_LINE_IN, |
c23f5949 | 665 | } }, |
a6c2ba28 | 666 | }, |
667 | [EM2820_BOARD_PINNACLE_USB_2] = { | |
668 | .name = "Pinnacle PCTV USB 2", | |
a6c2ba28 | 669 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
ac07bb73 | 670 | .has_ir_i2c = 1, |
a6c2ba28 | 671 | .tda9887_conf = TDA9887_PRESENT, |
ec5de990 | 672 | .decoder = EM28XX_SAA711X, |
d4d889e3 | 673 | .input = { { |
3acf2809 | 674 | .type = EM28XX_VMUX_TELEVISION, |
c7c0b34c | 675 | .vmux = SAA7115_COMPOSITE2, |
8a5caa6b | 676 | .amux = EM28XX_AMUX_VIDEO, |
c23f5949 | 677 | }, { |
3acf2809 | 678 | .type = EM28XX_VMUX_COMPOSITE1, |
c7c0b34c | 679 | .vmux = SAA7115_COMPOSITE0, |
8a5caa6b | 680 | .amux = EM28XX_AMUX_LINE_IN, |
c23f5949 | 681 | }, { |
3acf2809 | 682 | .type = EM28XX_VMUX_SVIDEO, |
c7c0b34c | 683 | .vmux = SAA7115_SVIDEO3, |
8a5caa6b | 684 | .amux = EM28XX_AMUX_LINE_IN, |
c23f5949 | 685 | } }, |
a6c2ba28 | 686 | }, |
687 | [EM2820_BOARD_HAUPPAUGE_WINTV_USB_2] = { | |
688 | .name = "Hauppauge WinTV USB 2", | |
a6c2ba28 | 689 | .tuner_type = TUNER_PHILIPS_FM1236_MK3, |
c23f5949 | 690 | .tda9887_conf = TDA9887_PRESENT | |
a1a6ee74 | 691 | TDA9887_PORT1_ACTIVE | |
c23f5949 | 692 | TDA9887_PORT2_ACTIVE, |
3acf2809 | 693 | .decoder = EM28XX_TVP5150, |
a6c2ba28 | 694 | .has_msp34xx = 1, |
ac07bb73 | 695 | .has_ir_i2c = 1, |
d4d889e3 | 696 | .input = { { |
3acf2809 | 697 | .type = EM28XX_VMUX_TELEVISION, |
c7c0b34c | 698 | .vmux = TVP5150_COMPOSITE0, |
2474ed44 | 699 | .amux = MSP_INPUT_DEFAULT, |
c23f5949 | 700 | }, { |
3acf2809 | 701 | .type = EM28XX_VMUX_SVIDEO, |
c7c0b34c | 702 | .vmux = TVP5150_SVIDEO, |
07151724 HV |
703 | .amux = MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1, |
704 | MSP_DSP_IN_SCART, MSP_DSP_IN_SCART), | |
c23f5949 | 705 | } }, |
a6c2ba28 | 706 | }, |
95b86a9a DSL |
707 | [EM2820_BOARD_DLINK_USB_TV] = { |
708 | .name = "D-Link DUB-T210 TV Tuner", | |
709 | .valid = EM28XX_BOARD_NOT_VALIDATED, | |
95b86a9a DSL |
710 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
711 | .tda9887_conf = TDA9887_PRESENT, | |
ec5de990 | 712 | .decoder = EM28XX_SAA711X, |
d4d889e3 | 713 | .input = { { |
95b86a9a DSL |
714 | .type = EM28XX_VMUX_TELEVISION, |
715 | .vmux = SAA7115_COMPOSITE2, | |
8a5caa6b | 716 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
717 | }, { |
718 | .type = EM28XX_VMUX_COMPOSITE1, | |
719 | .vmux = SAA7115_COMPOSITE0, | |
8a5caa6b | 720 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
721 | }, { |
722 | .type = EM28XX_VMUX_SVIDEO, | |
723 | .vmux = SAA7115_SVIDEO3, | |
8a5caa6b | 724 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
725 | } }, |
726 | }, | |
727 | [EM2820_BOARD_HERCULES_SMART_TV_USB2] = { | |
728 | .name = "Hercules Smart TV USB 2.0", | |
729 | .valid = EM28XX_BOARD_NOT_VALIDATED, | |
95b86a9a DSL |
730 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
731 | .tda9887_conf = TDA9887_PRESENT, | |
ec5de990 | 732 | .decoder = EM28XX_SAA711X, |
95b86a9a DSL |
733 | .input = { { |
734 | .type = EM28XX_VMUX_TELEVISION, | |
735 | .vmux = SAA7115_COMPOSITE2, | |
8a5caa6b | 736 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
737 | }, { |
738 | .type = EM28XX_VMUX_COMPOSITE1, | |
739 | .vmux = SAA7115_COMPOSITE0, | |
8a5caa6b | 740 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
741 | }, { |
742 | .type = EM28XX_VMUX_SVIDEO, | |
743 | .vmux = SAA7115_SVIDEO3, | |
8a5caa6b | 744 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
745 | } }, |
746 | }, | |
747 | [EM2820_BOARD_PINNACLE_USB_2_FM1216ME] = { | |
748 | .name = "Pinnacle PCTV USB 2 (Philips FM1216ME)", | |
749 | .valid = EM28XX_BOARD_NOT_VALIDATED, | |
95b86a9a DSL |
750 | .tuner_type = TUNER_PHILIPS_FM1216ME_MK3, |
751 | .tda9887_conf = TDA9887_PRESENT, | |
ec5de990 | 752 | .decoder = EM28XX_SAA711X, |
d4d889e3 | 753 | .input = { { |
95b86a9a DSL |
754 | .type = EM28XX_VMUX_TELEVISION, |
755 | .vmux = SAA7115_COMPOSITE2, | |
8a5caa6b | 756 | .amux = EM28XX_AMUX_VIDEO, |
95b86a9a DSL |
757 | }, { |
758 | .type = EM28XX_VMUX_COMPOSITE1, | |
759 | .vmux = SAA7115_COMPOSITE0, | |
8a5caa6b | 760 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
761 | }, { |
762 | .type = EM28XX_VMUX_SVIDEO, | |
763 | .vmux = SAA7115_SVIDEO3, | |
8a5caa6b | 764 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
765 | } }, |
766 | }, | |
767 | [EM2820_BOARD_GADMEI_UTV310] = { | |
768 | .name = "Gadmei UTV310", | |
769 | .valid = EM28XX_BOARD_NOT_VALIDATED, | |
95b86a9a DSL |
770 | .tuner_type = TUNER_TNF_5335MF, |
771 | .tda9887_conf = TDA9887_PRESENT, | |
ec5de990 | 772 | .decoder = EM28XX_SAA711X, |
d4d889e3 | 773 | .input = { { |
95b86a9a DSL |
774 | .type = EM28XX_VMUX_TELEVISION, |
775 | .vmux = SAA7115_COMPOSITE1, | |
8a5caa6b | 776 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
777 | }, { |
778 | .type = EM28XX_VMUX_COMPOSITE1, | |
779 | .vmux = SAA7115_COMPOSITE0, | |
8a5caa6b | 780 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
781 | }, { |
782 | .type = EM28XX_VMUX_SVIDEO, | |
783 | .vmux = SAA7115_SVIDEO3, | |
8a5caa6b | 784 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
785 | } }, |
786 | }, | |
787 | [EM2820_BOARD_LEADTEK_WINFAST_USBII_DELUXE] = { | |
788 | .name = "Leadtek Winfast USB II Deluxe", | |
789 | .valid = EM28XX_BOARD_NOT_VALIDATED, | |
95b86a9a | 790 | .tuner_type = TUNER_PHILIPS_FM1216ME_MK3, |
ca39d84d MA |
791 | .has_ir_i2c = 1, |
792 | .tvaudio_addr = 0x58, | |
793 | .tda9887_conf = TDA9887_PRESENT | | |
794 | TDA9887_PORT2_ACTIVE | | |
795 | TDA9887_QSS, | |
ec5de990 | 796 | .decoder = EM28XX_SAA711X, |
ca39d84d | 797 | .adecoder = EM28XX_TVAUDIO, |
d4d889e3 | 798 | .input = { { |
95b86a9a | 799 | .type = EM28XX_VMUX_TELEVISION, |
ca39d84d MA |
800 | .vmux = SAA7115_COMPOSITE4, |
801 | .amux = EM28XX_AMUX_AUX, | |
95b86a9a DSL |
802 | }, { |
803 | .type = EM28XX_VMUX_COMPOSITE1, | |
ca39d84d | 804 | .vmux = SAA7115_COMPOSITE5, |
8a5caa6b | 805 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
806 | }, { |
807 | .type = EM28XX_VMUX_SVIDEO, | |
ca39d84d | 808 | .vmux = SAA7115_SVIDEO3, |
8a5caa6b | 809 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a | 810 | } }, |
ca39d84d MA |
811 | .radio = { |
812 | .type = EM28XX_RADIO, | |
813 | .amux = EM28XX_AMUX_AUX, | |
814 | } | |
95b86a9a | 815 | }, |
95b86a9a | 816 | [EM2820_BOARD_VIDEOLOGY_20K14XUSB] = { |
d4d889e3 | 817 | .name = "Videology 20K14XUSB USB2.0", |
95b86a9a | 818 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
8a2e6990 MCC |
819 | .tuner_type = TUNER_ABSENT, |
820 | .is_webcam = 1, | |
d4d889e3 | 821 | .input = { { |
95b86a9a DSL |
822 | .type = EM28XX_VMUX_COMPOSITE1, |
823 | .vmux = 0, | |
8a5caa6b | 824 | .amux = EM28XX_AMUX_VIDEO, |
95b86a9a DSL |
825 | } }, |
826 | }, | |
02e7804b MCC |
827 | [EM2820_BOARD_SILVERCREST_WEBCAM] = { |
828 | .name = "Silvercrest Webcam 1.3mpix", | |
829 | .tuner_type = TUNER_ABSENT, | |
c43221df | 830 | .is_webcam = 1, |
02e7804b MCC |
831 | .input = { { |
832 | .type = EM28XX_VMUX_COMPOSITE1, | |
833 | .vmux = 0, | |
834 | .amux = EM28XX_AMUX_VIDEO, | |
835 | .gpio = silvercrest_reg_seq, | |
836 | } }, | |
837 | }, | |
95b86a9a DSL |
838 | [EM2821_BOARD_SUPERCOMP_USB_2] = { |
839 | .name = "Supercomp USB 2.0 TV", | |
840 | .valid = EM28XX_BOARD_NOT_VALIDATED, | |
95b86a9a DSL |
841 | .tuner_type = TUNER_PHILIPS_FM1236_MK3, |
842 | .tda9887_conf = TDA9887_PRESENT | | |
843 | TDA9887_PORT1_ACTIVE | | |
844 | TDA9887_PORT2_ACTIVE, | |
ec5de990 | 845 | .decoder = EM28XX_SAA711X, |
d4d889e3 | 846 | .input = { { |
95b86a9a DSL |
847 | .type = EM28XX_VMUX_TELEVISION, |
848 | .vmux = SAA7115_COMPOSITE2, | |
8a5caa6b | 849 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
850 | }, { |
851 | .type = EM28XX_VMUX_COMPOSITE1, | |
852 | .vmux = SAA7115_COMPOSITE0, | |
8a5caa6b | 853 | .amux = EM28XX_AMUX_VIDEO, |
95b86a9a DSL |
854 | }, { |
855 | .type = EM28XX_VMUX_SVIDEO, | |
856 | .vmux = SAA7115_SVIDEO3, | |
8a5caa6b | 857 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
858 | } }, |
859 | }, | |
860 | [EM2821_BOARD_USBGEAR_VD204] = { | |
d4d889e3 | 861 | .name = "Usbgear VD204v9", |
95b86a9a | 862 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
1c67e76f | 863 | .tuner_type = TUNER_ABSENT, /* Capture only device */ |
ec5de990 | 864 | .decoder = EM28XX_SAA711X, |
d4d889e3 | 865 | .input = { { |
95b86a9a DSL |
866 | .type = EM28XX_VMUX_COMPOSITE1, |
867 | .vmux = SAA7115_COMPOSITE0, | |
8a5caa6b | 868 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
869 | }, { |
870 | .type = EM28XX_VMUX_SVIDEO, | |
871 | .vmux = SAA7115_SVIDEO3, | |
8a5caa6b | 872 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
873 | } }, |
874 | }, | |
875 | [EM2860_BOARD_NETGMBH_CAM] = { | |
876 | /* Beijing Huaqi Information Digital Technology Co., Ltd */ | |
d4d889e3 MCC |
877 | .name = "NetGMBH Cam", |
878 | .valid = EM28XX_BOARD_NOT_VALIDATED, | |
8a2e6990 MCC |
879 | .tuner_type = TUNER_ABSENT, |
880 | .is_webcam = 1, | |
d4d889e3 | 881 | .input = { { |
95b86a9a DSL |
882 | .type = EM28XX_VMUX_COMPOSITE1, |
883 | .vmux = 0, | |
8a5caa6b | 884 | .amux = EM28XX_AMUX_VIDEO, |
95b86a9a DSL |
885 | } }, |
886 | }, | |
887 | [EM2860_BOARD_TYPHOON_DVD_MAKER] = { | |
d4d889e3 | 888 | .name = "Typhoon DVD Maker", |
ec5de990 | 889 | .decoder = EM28XX_SAA711X, |
1c67e76f | 890 | .tuner_type = TUNER_ABSENT, /* Capture only device */ |
d4d889e3 | 891 | .input = { { |
95b86a9a DSL |
892 | .type = EM28XX_VMUX_COMPOSITE1, |
893 | .vmux = SAA7115_COMPOSITE0, | |
8a5caa6b | 894 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
895 | }, { |
896 | .type = EM28XX_VMUX_SVIDEO, | |
897 | .vmux = SAA7115_SVIDEO3, | |
8a5caa6b | 898 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
899 | } }, |
900 | }, | |
901 | [EM2860_BOARD_GADMEI_UTV330] = { | |
902 | .name = "Gadmei UTV330", | |
903 | .valid = EM28XX_BOARD_NOT_VALIDATED, | |
95b86a9a | 904 | .tuner_type = TUNER_TNF_5335MF, |
122d1588 | 905 | .tda9887_conf = TDA9887_PRESENT, |
ec5de990 | 906 | .decoder = EM28XX_SAA711X, |
d4d889e3 | 907 | .input = { { |
95b86a9a DSL |
908 | .type = EM28XX_VMUX_TELEVISION, |
909 | .vmux = SAA7115_COMPOSITE2, | |
8a5caa6b | 910 | .amux = EM28XX_AMUX_VIDEO, |
95b86a9a DSL |
911 | }, { |
912 | .type = EM28XX_VMUX_COMPOSITE1, | |
913 | .vmux = SAA7115_COMPOSITE0, | |
8a5caa6b | 914 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
915 | }, { |
916 | .type = EM28XX_VMUX_SVIDEO, | |
917 | .vmux = SAA7115_SVIDEO3, | |
8a5caa6b | 918 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
919 | } }, |
920 | }, | |
6d888a66 MCC |
921 | [EM2861_BOARD_GADMEI_UTV330PLUS] = { |
922 | .name = "Gadmei UTV330+", | |
923 | .tuner_type = TUNER_TNF_5335MF, | |
924 | .tda9887_conf = TDA9887_PRESENT, | |
02858eed | 925 | .ir_codes = RC_MAP_GADMEI_RM008Z, |
6d888a66 MCC |
926 | .decoder = EM28XX_SAA711X, |
927 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, | |
928 | .input = { { | |
929 | .type = EM28XX_VMUX_TELEVISION, | |
930 | .vmux = SAA7115_COMPOSITE2, | |
931 | .amux = EM28XX_AMUX_VIDEO, | |
932 | }, { | |
933 | .type = EM28XX_VMUX_COMPOSITE1, | |
934 | .vmux = SAA7115_COMPOSITE0, | |
935 | .amux = EM28XX_AMUX_LINE_IN, | |
936 | }, { | |
937 | .type = EM28XX_VMUX_SVIDEO, | |
938 | .vmux = SAA7115_SVIDEO3, | |
939 | .amux = EM28XX_AMUX_LINE_IN, | |
940 | } }, | |
941 | }, | |
95b86a9a DSL |
942 | [EM2860_BOARD_TERRATEC_HYBRID_XS] = { |
943 | .name = "Terratec Cinergy A Hybrid XS", | |
944 | .valid = EM28XX_BOARD_NOT_VALIDATED, | |
122d1588 | 945 | .tuner_type = TUNER_XC2028, |
017ab4b1 | 946 | .tuner_gpio = default_tuner_gpio, |
122d1588 | 947 | .decoder = EM28XX_TVP5150, |
017ab4b1 | 948 | |
d4d889e3 | 949 | .input = { { |
122d1588 AT |
950 | .type = EM28XX_VMUX_TELEVISION, |
951 | .vmux = TVP5150_COMPOSITE0, | |
8a5caa6b | 952 | .amux = EM28XX_AMUX_VIDEO, |
122b77e5 | 953 | .gpio = hauppauge_wintv_hvr_900_analog, |
c23f5949 | 954 | }, { |
122d1588 AT |
955 | .type = EM28XX_VMUX_COMPOSITE1, |
956 | .vmux = TVP5150_COMPOSITE1, | |
8a5caa6b | 957 | .amux = EM28XX_AMUX_LINE_IN, |
122b77e5 | 958 | .gpio = hauppauge_wintv_hvr_900_analog, |
c23f5949 | 959 | }, { |
122d1588 AT |
960 | .type = EM28XX_VMUX_SVIDEO, |
961 | .vmux = TVP5150_SVIDEO, | |
8a5caa6b | 962 | .amux = EM28XX_AMUX_LINE_IN, |
122b77e5 | 963 | .gpio = hauppauge_wintv_hvr_900_analog, |
c23f5949 | 964 | } }, |
122d1588 | 965 | }, |
95b86a9a DSL |
966 | [EM2861_BOARD_KWORLD_PVRTV_300U] = { |
967 | .name = "KWorld PVRTV 300U", | |
968 | .valid = EM28XX_BOARD_NOT_VALIDATED, | |
17d9d558 | 969 | .tuner_type = TUNER_XC2028, |
017ab4b1 | 970 | .tuner_gpio = default_tuner_gpio, |
17d9d558 | 971 | .decoder = EM28XX_TVP5150, |
d4d889e3 | 972 | .input = { { |
17d9d558 DH |
973 | .type = EM28XX_VMUX_TELEVISION, |
974 | .vmux = TVP5150_COMPOSITE0, | |
8a5caa6b | 975 | .amux = EM28XX_AMUX_VIDEO, |
17d9d558 DH |
976 | }, { |
977 | .type = EM28XX_VMUX_COMPOSITE1, | |
978 | .vmux = TVP5150_COMPOSITE1, | |
8a5caa6b | 979 | .amux = EM28XX_AMUX_LINE_IN, |
17d9d558 DH |
980 | }, { |
981 | .type = EM28XX_VMUX_SVIDEO, | |
982 | .vmux = TVP5150_SVIDEO, | |
8a5caa6b | 983 | .amux = EM28XX_AMUX_LINE_IN, |
17d9d558 DH |
984 | } }, |
985 | }, | |
95b86a9a DSL |
986 | [EM2861_BOARD_YAKUMO_MOVIE_MIXER] = { |
987 | .name = "Yakumo MovieMixer", | |
a1a6ee74 | 988 | .tuner_type = TUNER_ABSENT, /* Capture only device */ |
95b86a9a DSL |
989 | .decoder = EM28XX_TVP5150, |
990 | .input = { { | |
12466577 MCC |
991 | .type = EM28XX_VMUX_TELEVISION, |
992 | .vmux = TVP5150_COMPOSITE0, | |
8a5caa6b | 993 | .amux = EM28XX_AMUX_VIDEO, |
c23f5949 | 994 | }, { |
7d070e26 MCC |
995 | .type = EM28XX_VMUX_COMPOSITE1, |
996 | .vmux = TVP5150_COMPOSITE1, | |
8a5caa6b | 997 | .amux = EM28XX_AMUX_LINE_IN, |
c23f5949 | 998 | }, { |
12466577 MCC |
999 | .type = EM28XX_VMUX_SVIDEO, |
1000 | .vmux = TVP5150_SVIDEO, | |
8a5caa6b | 1001 | .amux = EM28XX_AMUX_LINE_IN, |
c23f5949 | 1002 | } }, |
12466577 | 1003 | }, |
443fed9f DH |
1004 | [EM2860_BOARD_TVP5150_REFERENCE_DESIGN] = { |
1005 | .name = "EM2860/TVP5150 Reference Design", | |
1006 | .tuner_type = TUNER_ABSENT, /* Capture only device */ | |
1007 | .decoder = EM28XX_TVP5150, | |
1008 | .input = { { | |
1009 | .type = EM28XX_VMUX_COMPOSITE1, | |
1010 | .vmux = TVP5150_COMPOSITE1, | |
1011 | .amux = EM28XX_AMUX_LINE_IN, | |
1012 | }, { | |
1013 | .type = EM28XX_VMUX_SVIDEO, | |
1014 | .vmux = TVP5150_SVIDEO, | |
1015 | .amux = EM28XX_AMUX_LINE_IN, | |
1016 | } }, | |
1017 | }, | |
95b86a9a DSL |
1018 | [EM2861_BOARD_PLEXTOR_PX_TV100U] = { |
1019 | .name = "Plextor ConvertX PX-TV100U", | |
95b86a9a | 1020 | .tuner_type = TUNER_TNF_5335MF, |
0a6e44d1 MCC |
1021 | .xclk = EM28XX_XCLK_I2S_MSB_TIMING | |
1022 | EM28XX_XCLK_FREQUENCY_12MHZ, | |
95b86a9a DSL |
1023 | .tda9887_conf = TDA9887_PRESENT, |
1024 | .decoder = EM28XX_TVP5150, | |
0a6e44d1 | 1025 | .has_msp34xx = 1, |
d4d889e3 | 1026 | .input = { { |
4fd305b2 DH |
1027 | .type = EM28XX_VMUX_TELEVISION, |
1028 | .vmux = TVP5150_COMPOSITE0, | |
8a5caa6b | 1029 | .amux = EM28XX_AMUX_LINE_IN, |
0a6e44d1 | 1030 | .gpio = pinnacle_hybrid_pro_analog, |
4fd305b2 DH |
1031 | }, { |
1032 | .type = EM28XX_VMUX_COMPOSITE1, | |
1033 | .vmux = TVP5150_COMPOSITE1, | |
8a5caa6b | 1034 | .amux = EM28XX_AMUX_LINE_IN, |
0a6e44d1 | 1035 | .gpio = pinnacle_hybrid_pro_analog, |
4fd305b2 DH |
1036 | }, { |
1037 | .type = EM28XX_VMUX_SVIDEO, | |
1038 | .vmux = TVP5150_SVIDEO, | |
8a5caa6b | 1039 | .amux = EM28XX_AMUX_LINE_IN, |
0a6e44d1 | 1040 | .gpio = pinnacle_hybrid_pro_analog, |
4fd305b2 DH |
1041 | } }, |
1042 | }, | |
1c67e76f MCC |
1043 | |
1044 | /* Those boards with em2870 are DVB Only*/ | |
1045 | ||
95b86a9a DSL |
1046 | [EM2870_BOARD_TERRATEC_XS] = { |
1047 | .name = "Terratec Cinergy T XS", | |
1048 | .valid = EM28XX_BOARD_NOT_VALIDATED, | |
1049 | .tuner_type = TUNER_XC2028, | |
017ab4b1 | 1050 | .tuner_gpio = default_tuner_gpio, |
95b86a9a DSL |
1051 | }, |
1052 | [EM2870_BOARD_TERRATEC_XS_MT2060] = { | |
1053 | .name = "Terratec Cinergy T XS (MT2060)", | |
1054 | .valid = EM28XX_BOARD_NOT_VALIDATED, | |
1055 | .tuner_type = TUNER_ABSENT, /* MT2060 */ | |
1056 | }, | |
1057 | [EM2870_BOARD_KWORLD_350U] = { | |
1058 | .name = "Kworld 350 U DVB-T", | |
1059 | .valid = EM28XX_BOARD_NOT_VALIDATED, | |
1060 | .tuner_type = TUNER_XC2028, | |
017ab4b1 | 1061 | .tuner_gpio = default_tuner_gpio, |
95b86a9a DSL |
1062 | }, |
1063 | [EM2870_BOARD_KWORLD_355U] = { | |
1064 | .name = "Kworld 355 U DVB-T", | |
1065 | .valid = EM28XX_BOARD_NOT_VALIDATED, | |
1985f6fb AP |
1066 | .tuner_type = TUNER_ABSENT, |
1067 | .tuner_gpio = default_tuner_gpio, | |
1068 | .has_dvb = 1, | |
1069 | .dvb_gpio = default_digital, | |
95b86a9a DSL |
1070 | }, |
1071 | [EM2870_BOARD_PINNACLE_PCTV_DVB] = { | |
1072 | .name = "Pinnacle PCTV DVB-T", | |
1073 | .valid = EM28XX_BOARD_NOT_VALIDATED, | |
1074 | .tuner_type = TUNER_ABSENT, /* MT2060 */ | |
a2070c66 MCC |
1075 | /* djh - I have serious doubts this is right... */ |
1076 | .xclk = EM28XX_XCLK_IR_RC5_MODE | | |
1077 | EM28XX_XCLK_FREQUENCY_10MHZ, | |
95b86a9a DSL |
1078 | }, |
1079 | [EM2870_BOARD_COMPRO_VIDEOMATE] = { | |
1080 | .name = "Compro, VideoMate U3", | |
1081 | .valid = EM28XX_BOARD_NOT_VALIDATED, | |
1082 | .tuner_type = TUNER_ABSENT, /* MT2060 */ | |
1083 | }, | |
1c67e76f | 1084 | |
95b86a9a DSL |
1085 | [EM2880_BOARD_TERRATEC_HYBRID_XS_FR] = { |
1086 | .name = "Terratec Hybrid XS Secam", | |
95b86a9a DSL |
1087 | .has_msp34xx = 1, |
1088 | .tuner_type = TUNER_XC2028, | |
017ab4b1 | 1089 | .tuner_gpio = default_tuner_gpio, |
95b86a9a | 1090 | .decoder = EM28XX_TVP5150, |
65638011 | 1091 | .has_dvb = 1, |
cec4e6c1 | 1092 | .dvb_gpio = terratec_cinergy_USB_XS_FR_digital, |
d4d889e3 | 1093 | .input = { { |
e14b3658 DH |
1094 | .type = EM28XX_VMUX_TELEVISION, |
1095 | .vmux = TVP5150_COMPOSITE0, | |
8a5caa6b | 1096 | .amux = EM28XX_AMUX_VIDEO, |
cec4e6c1 | 1097 | .gpio = terratec_cinergy_USB_XS_FR_analog, |
e14b3658 DH |
1098 | }, { |
1099 | .type = EM28XX_VMUX_COMPOSITE1, | |
1100 | .vmux = TVP5150_COMPOSITE1, | |
8a5caa6b | 1101 | .amux = EM28XX_AMUX_LINE_IN, |
cec4e6c1 | 1102 | .gpio = terratec_cinergy_USB_XS_FR_analog, |
e14b3658 DH |
1103 | }, { |
1104 | .type = EM28XX_VMUX_SVIDEO, | |
1105 | .vmux = TVP5150_SVIDEO, | |
8a5caa6b | 1106 | .amux = EM28XX_AMUX_LINE_IN, |
cec4e6c1 | 1107 | .gpio = terratec_cinergy_USB_XS_FR_analog, |
e14b3658 DH |
1108 | } }, |
1109 | }, | |
fec528b7 MCC |
1110 | [EM2884_BOARD_TERRATEC_H5] = { |
1111 | .name = "Terratec Cinergy H5", | |
1112 | .has_dvb = 1, | |
1113 | #if 0 | |
1114 | .tuner_type = TUNER_PHILIPS_TDA8290, | |
1115 | .tuner_addr = 0x41, | |
1116 | .dvb_gpio = terratec_h5_digital, /* FIXME: probably wrong */ | |
1117 | .tuner_gpio = terratec_h5_gpio, | |
de72405f MCC |
1118 | #else |
1119 | .tuner_type = TUNER_ABSENT, | |
fec528b7 | 1120 | #endif |
3aa2b3b9 MCC |
1121 | .def_i2c_bus = 1, |
1122 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | | |
fec528b7 MCC |
1123 | EM28XX_I2C_FREQ_400_KHZ, |
1124 | }, | |
82e7dbbd EDP |
1125 | [EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C] = { |
1126 | .name = "Hauppauge WinTV HVR 930C", | |
1127 | .has_dvb = 1, | |
de72405f MCC |
1128 | #if 0 /* FIXME: Add analog support */ |
1129 | .tuner_type = TUNER_XC5000, | |
1130 | .tuner_addr = 0x41, | |
1131 | .dvb_gpio = hauppauge_930c_digital, | |
82e7dbbd | 1132 | .tuner_gpio = hauppauge_930c_gpio, |
de72405f MCC |
1133 | #else |
1134 | .tuner_type = TUNER_ABSENT, | |
1135 | #endif | |
dfbbf5da | 1136 | .ir_codes = RC_MAP_HAUPPAUGE, |
3aa2b3b9 MCC |
1137 | .def_i2c_bus = 1, |
1138 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | | |
82e7dbbd EDP |
1139 | EM28XX_I2C_FREQ_400_KHZ, |
1140 | }, | |
4159d01b MCC |
1141 | [EM2884_BOARD_C3TECH_DIGITAL_DUO] = { |
1142 | .name = "C3 Tech Digital Duo HDTV/SDTV USB", | |
1143 | .has_dvb = 1, | |
1144 | /* FIXME: Add analog support - need a saa7136 driver */ | |
1145 | .tuner_type = TUNER_ABSENT, /* Digital-only TDA18271HD */ | |
1146 | .ir_codes = RC_MAP_EMPTY, | |
1147 | .def_i2c_bus = 1, | |
1148 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE, | |
1149 | .dvb_gpio = c3tech_digital_duo_digital, | |
1150 | }, | |
a1ed02e9 AO |
1151 | [EM2884_BOARD_CINERGY_HTC_STICK] = { |
1152 | .name = "Terratec Cinergy HTC Stick", | |
1153 | .has_dvb = 1, | |
bdca5036 | 1154 | .ir_codes = RC_MAP_NEC_TERRATEC_CINERGY_XS, |
c8dce008 | 1155 | .tuner_type = TUNER_ABSENT, |
3aa2b3b9 MCC |
1156 | .def_i2c_bus = 1, |
1157 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | | |
fec528b7 MCC |
1158 | EM28XX_I2C_FREQ_400_KHZ, |
1159 | }, | |
1fe0fbd6 GR |
1160 | [EM2884_BOARD_ELGATO_EYETV_HYBRID_2008] = { |
1161 | .name = "Elgato EyeTV Hybrid 2008 INT", | |
1162 | .has_dvb = 1, | |
1163 | .ir_codes = RC_MAP_NEC_TERRATEC_CINERGY_XS, | |
1164 | .tuner_type = TUNER_ABSENT, | |
1165 | .def_i2c_bus = 1, | |
1166 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | | |
1167 | EM28XX_I2C_FREQ_400_KHZ, | |
1168 | }, | |
95b86a9a DSL |
1169 | [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900] = { |
1170 | .name = "Hauppauge WinTV HVR 900", | |
95b86a9a DSL |
1171 | .tda9887_conf = TDA9887_PRESENT, |
1172 | .tuner_type = TUNER_XC2028, | |
017ab4b1 | 1173 | .tuner_gpio = default_tuner_gpio, |
95b86a9a | 1174 | .mts_firmware = 1, |
a2070c66 | 1175 | .has_dvb = 1, |
122b77e5 | 1176 | .dvb_gpio = hauppauge_wintv_hvr_900_digital, |
af86ce79 | 1177 | .ir_codes = RC_MAP_HAUPPAUGE, |
95b86a9a | 1178 | .decoder = EM28XX_TVP5150, |
d4d889e3 | 1179 | .input = { { |
95b86a9a DSL |
1180 | .type = EM28XX_VMUX_TELEVISION, |
1181 | .vmux = TVP5150_COMPOSITE0, | |
8a5caa6b | 1182 | .amux = EM28XX_AMUX_VIDEO, |
122b77e5 | 1183 | .gpio = hauppauge_wintv_hvr_900_analog, |
95b86a9a DSL |
1184 | }, { |
1185 | .type = EM28XX_VMUX_COMPOSITE1, | |
1186 | .vmux = TVP5150_COMPOSITE1, | |
8a5caa6b | 1187 | .amux = EM28XX_AMUX_LINE_IN, |
122b77e5 | 1188 | .gpio = hauppauge_wintv_hvr_900_analog, |
95b86a9a DSL |
1189 | }, { |
1190 | .type = EM28XX_VMUX_SVIDEO, | |
1191 | .vmux = TVP5150_SVIDEO, | |
8a5caa6b | 1192 | .amux = EM28XX_AMUX_LINE_IN, |
122b77e5 | 1193 | .gpio = hauppauge_wintv_hvr_900_analog, |
95b86a9a DSL |
1194 | } }, |
1195 | }, | |
1196 | [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2] = { | |
1197 | .name = "Hauppauge WinTV HVR 900 (R2)", | |
95b86a9a DSL |
1198 | .tda9887_conf = TDA9887_PRESENT, |
1199 | .tuner_type = TUNER_XC2028, | |
017ab4b1 | 1200 | .tuner_gpio = default_tuner_gpio, |
95b86a9a | 1201 | .mts_firmware = 1, |
75e2b869 | 1202 | .has_dvb = 1, |
7030f52b | 1203 | .dvb_gpio = hauppauge_wintv_hvr_900R2_digital, |
af86ce79 | 1204 | .ir_codes = RC_MAP_HAUPPAUGE, |
95b86a9a | 1205 | .decoder = EM28XX_TVP5150, |
d4d889e3 | 1206 | .input = { { |
95b86a9a DSL |
1207 | .type = EM28XX_VMUX_TELEVISION, |
1208 | .vmux = TVP5150_COMPOSITE0, | |
8a5caa6b | 1209 | .amux = EM28XX_AMUX_VIDEO, |
122b77e5 | 1210 | .gpio = hauppauge_wintv_hvr_900_analog, |
95b86a9a DSL |
1211 | }, { |
1212 | .type = EM28XX_VMUX_COMPOSITE1, | |
1213 | .vmux = TVP5150_COMPOSITE1, | |
a5942b5c | 1214 | .amux = EM28XX_AMUX_LINE_IN, |
122b77e5 | 1215 | .gpio = hauppauge_wintv_hvr_900_analog, |
95b86a9a DSL |
1216 | }, { |
1217 | .type = EM28XX_VMUX_SVIDEO, | |
1218 | .vmux = TVP5150_SVIDEO, | |
8a5caa6b | 1219 | .amux = EM28XX_AMUX_LINE_IN, |
122b77e5 | 1220 | .gpio = hauppauge_wintv_hvr_900_analog, |
95b86a9a DSL |
1221 | } }, |
1222 | }, | |
f89bc329 DSL |
1223 | [EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850] = { |
1224 | .name = "Hauppauge WinTV HVR 850", | |
1225 | .tuner_type = TUNER_XC2028, | |
1226 | .tuner_gpio = default_tuner_gpio, | |
1227 | .mts_firmware = 1, | |
1228 | .has_dvb = 1, | |
1229 | .dvb_gpio = hauppauge_wintv_hvr_900_digital, | |
af86ce79 | 1230 | .ir_codes = RC_MAP_HAUPPAUGE, |
f89bc329 DSL |
1231 | .decoder = EM28XX_TVP5150, |
1232 | .input = { { | |
1233 | .type = EM28XX_VMUX_TELEVISION, | |
1234 | .vmux = TVP5150_COMPOSITE0, | |
1235 | .amux = EM28XX_AMUX_VIDEO, | |
1236 | .gpio = hauppauge_wintv_hvr_900_analog, | |
1237 | }, { | |
1238 | .type = EM28XX_VMUX_COMPOSITE1, | |
1239 | .vmux = TVP5150_COMPOSITE1, | |
1240 | .amux = EM28XX_AMUX_LINE_IN, | |
1241 | .gpio = hauppauge_wintv_hvr_900_analog, | |
1242 | }, { | |
1243 | .type = EM28XX_VMUX_SVIDEO, | |
1244 | .vmux = TVP5150_SVIDEO, | |
1245 | .amux = EM28XX_AMUX_LINE_IN, | |
1246 | .gpio = hauppauge_wintv_hvr_900_analog, | |
1247 | } }, | |
1248 | }, | |
10ac6603 | 1249 | [EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950] = { |
95b86a9a | 1250 | .name = "Hauppauge WinTV HVR 950", |
95b86a9a | 1251 | .tuner_type = TUNER_XC2028, |
017ab4b1 | 1252 | .tuner_gpio = default_tuner_gpio, |
95b86a9a | 1253 | .mts_firmware = 1, |
95b86a9a | 1254 | .has_dvb = 1, |
122b77e5 | 1255 | .dvb_gpio = hauppauge_wintv_hvr_900_digital, |
15195d3a | 1256 | .ir_codes = RC_MAP_HAUPPAUGE, |
95b86a9a DSL |
1257 | .decoder = EM28XX_TVP5150, |
1258 | .input = { { | |
1259 | .type = EM28XX_VMUX_TELEVISION, | |
1260 | .vmux = TVP5150_COMPOSITE0, | |
8a5caa6b | 1261 | .amux = EM28XX_AMUX_VIDEO, |
122b77e5 | 1262 | .gpio = hauppauge_wintv_hvr_900_analog, |
95b86a9a DSL |
1263 | }, { |
1264 | .type = EM28XX_VMUX_COMPOSITE1, | |
1265 | .vmux = TVP5150_COMPOSITE1, | |
8a5caa6b | 1266 | .amux = EM28XX_AMUX_LINE_IN, |
122b77e5 | 1267 | .gpio = hauppauge_wintv_hvr_900_analog, |
95b86a9a DSL |
1268 | }, { |
1269 | .type = EM28XX_VMUX_SVIDEO, | |
1270 | .vmux = TVP5150_SVIDEO, | |
8a5caa6b | 1271 | .amux = EM28XX_AMUX_LINE_IN, |
122b77e5 | 1272 | .gpio = hauppauge_wintv_hvr_900_analog, |
95b86a9a DSL |
1273 | } }, |
1274 | }, | |
1275 | [EM2880_BOARD_PINNACLE_PCTV_HD_PRO] = { | |
1276 | .name = "Pinnacle PCTV HD Pro Stick", | |
95b86a9a | 1277 | .tuner_type = TUNER_XC2028, |
017ab4b1 | 1278 | .tuner_gpio = default_tuner_gpio, |
95b86a9a | 1279 | .mts_firmware = 1, |
95b86a9a | 1280 | .has_dvb = 1, |
122b77e5 | 1281 | .dvb_gpio = hauppauge_wintv_hvr_900_digital, |
02858eed | 1282 | .ir_codes = RC_MAP_PINNACLE_PCTV_HD, |
95b86a9a DSL |
1283 | .decoder = EM28XX_TVP5150, |
1284 | .input = { { | |
1285 | .type = EM28XX_VMUX_TELEVISION, | |
1286 | .vmux = TVP5150_COMPOSITE0, | |
8a5caa6b | 1287 | .amux = EM28XX_AMUX_VIDEO, |
122b77e5 | 1288 | .gpio = hauppauge_wintv_hvr_900_analog, |
95b86a9a DSL |
1289 | }, { |
1290 | .type = EM28XX_VMUX_COMPOSITE1, | |
1291 | .vmux = TVP5150_COMPOSITE1, | |
8a5caa6b | 1292 | .amux = EM28XX_AMUX_LINE_IN, |
122b77e5 | 1293 | .gpio = hauppauge_wintv_hvr_900_analog, |
95b86a9a DSL |
1294 | }, { |
1295 | .type = EM28XX_VMUX_SVIDEO, | |
1296 | .vmux = TVP5150_SVIDEO, | |
8a5caa6b | 1297 | .amux = EM28XX_AMUX_LINE_IN, |
122b77e5 | 1298 | .gpio = hauppauge_wintv_hvr_900_analog, |
95b86a9a DSL |
1299 | } }, |
1300 | }, | |
1301 | [EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600] = { | |
1302 | .name = "AMD ATI TV Wonder HD 600", | |
95b86a9a | 1303 | .tuner_type = TUNER_XC2028, |
017ab4b1 | 1304 | .tuner_gpio = default_tuner_gpio, |
95b86a9a | 1305 | .mts_firmware = 1, |
95b86a9a | 1306 | .has_dvb = 1, |
122b77e5 | 1307 | .dvb_gpio = hauppauge_wintv_hvr_900_digital, |
02858eed | 1308 | .ir_codes = RC_MAP_ATI_TV_WONDER_HD_600, |
95b86a9a DSL |
1309 | .decoder = EM28XX_TVP5150, |
1310 | .input = { { | |
1311 | .type = EM28XX_VMUX_TELEVISION, | |
1312 | .vmux = TVP5150_COMPOSITE0, | |
8a5caa6b | 1313 | .amux = EM28XX_AMUX_VIDEO, |
122b77e5 | 1314 | .gpio = hauppauge_wintv_hvr_900_analog, |
95b86a9a DSL |
1315 | }, { |
1316 | .type = EM28XX_VMUX_COMPOSITE1, | |
1317 | .vmux = TVP5150_COMPOSITE1, | |
8a5caa6b | 1318 | .amux = EM28XX_AMUX_LINE_IN, |
122b77e5 | 1319 | .gpio = hauppauge_wintv_hvr_900_analog, |
95b86a9a DSL |
1320 | }, { |
1321 | .type = EM28XX_VMUX_SVIDEO, | |
1322 | .vmux = TVP5150_SVIDEO, | |
8a5caa6b | 1323 | .amux = EM28XX_AMUX_LINE_IN, |
122b77e5 | 1324 | .gpio = hauppauge_wintv_hvr_900_analog, |
95b86a9a DSL |
1325 | } }, |
1326 | }, | |
1327 | [EM2880_BOARD_TERRATEC_HYBRID_XS] = { | |
d4d889e3 MCC |
1328 | .name = "Terratec Hybrid XS", |
1329 | .tuner_type = TUNER_XC2028, | |
017ab4b1 | 1330 | .tuner_gpio = default_tuner_gpio, |
d4d889e3 | 1331 | .decoder = EM28XX_TVP5150, |
95b86a9a | 1332 | .has_dvb = 1, |
f797608c | 1333 | .dvb_gpio = default_digital, |
02858eed | 1334 | .ir_codes = RC_MAP_TERRATEC_CINERGY_XS, |
8cd9aaef | 1335 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, /* NEC IR */ |
95b86a9a DSL |
1336 | .input = { { |
1337 | .type = EM28XX_VMUX_TELEVISION, | |
1338 | .vmux = TVP5150_COMPOSITE0, | |
8a5caa6b | 1339 | .amux = EM28XX_AMUX_VIDEO, |
122b77e5 | 1340 | .gpio = default_analog, |
95b86a9a DSL |
1341 | }, { |
1342 | .type = EM28XX_VMUX_COMPOSITE1, | |
1343 | .vmux = TVP5150_COMPOSITE1, | |
8a5caa6b | 1344 | .amux = EM28XX_AMUX_LINE_IN, |
122b77e5 | 1345 | .gpio = default_analog, |
95b86a9a DSL |
1346 | }, { |
1347 | .type = EM28XX_VMUX_SVIDEO, | |
1348 | .vmux = TVP5150_SVIDEO, | |
8a5caa6b | 1349 | .amux = EM28XX_AMUX_LINE_IN, |
122b77e5 | 1350 | .gpio = default_analog, |
95b86a9a DSL |
1351 | } }, |
1352 | }, | |
1353 | /* maybe there's a reason behind it why Terratec sells the Hybrid XS | |
1354 | as Prodigy XS with a different PID, let's keep it separated for now | |
1355 | maybe we'll need it lateron */ | |
1356 | [EM2880_BOARD_TERRATEC_PRODIGY_XS] = { | |
1357 | .name = "Terratec Prodigy XS", | |
95b86a9a | 1358 | .tuner_type = TUNER_XC2028, |
017ab4b1 | 1359 | .tuner_gpio = default_tuner_gpio, |
95b86a9a | 1360 | .decoder = EM28XX_TVP5150, |
d4d889e3 | 1361 | .input = { { |
95b86a9a DSL |
1362 | .type = EM28XX_VMUX_TELEVISION, |
1363 | .vmux = TVP5150_COMPOSITE0, | |
8a5caa6b | 1364 | .amux = EM28XX_AMUX_VIDEO, |
122b77e5 | 1365 | .gpio = hauppauge_wintv_hvr_900_analog, |
95b86a9a DSL |
1366 | }, { |
1367 | .type = EM28XX_VMUX_COMPOSITE1, | |
1368 | .vmux = TVP5150_COMPOSITE1, | |
8a5caa6b | 1369 | .amux = EM28XX_AMUX_LINE_IN, |
122b77e5 | 1370 | .gpio = hauppauge_wintv_hvr_900_analog, |
95b86a9a DSL |
1371 | }, { |
1372 | .type = EM28XX_VMUX_SVIDEO, | |
1373 | .vmux = TVP5150_SVIDEO, | |
8a5caa6b | 1374 | .amux = EM28XX_AMUX_LINE_IN, |
122b77e5 | 1375 | .gpio = hauppauge_wintv_hvr_900_analog, |
95b86a9a DSL |
1376 | } }, |
1377 | }, | |
1378 | [EM2820_BOARD_MSI_VOX_USB_2] = { | |
1379 | .name = "MSI VOX USB 2.0", | |
95b86a9a DSL |
1380 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
1381 | .tda9887_conf = TDA9887_PRESENT | | |
1382 | TDA9887_PORT1_ACTIVE | | |
1383 | TDA9887_PORT2_ACTIVE, | |
1384 | .max_range_640_480 = 1, | |
ec5de990 | 1385 | .decoder = EM28XX_SAA711X, |
95b86a9a DSL |
1386 | .input = { { |
1387 | .type = EM28XX_VMUX_TELEVISION, | |
1388 | .vmux = SAA7115_COMPOSITE4, | |
8a5caa6b | 1389 | .amux = EM28XX_AMUX_VIDEO, |
95b86a9a DSL |
1390 | }, { |
1391 | .type = EM28XX_VMUX_COMPOSITE1, | |
1392 | .vmux = SAA7115_COMPOSITE0, | |
8a5caa6b | 1393 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
1394 | }, { |
1395 | .type = EM28XX_VMUX_SVIDEO, | |
1396 | .vmux = SAA7115_SVIDEO3, | |
8a5caa6b | 1397 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
1398 | } }, |
1399 | }, | |
1400 | [EM2800_BOARD_TERRATEC_CINERGY_200] = { | |
1401 | .name = "Terratec Cinergy 200 USB", | |
1402 | .is_em2800 = 1, | |
ac07bb73 | 1403 | .has_ir_i2c = 1, |
53b667eb | 1404 | .tuner_type = TUNER_LG_TALN, |
95b86a9a | 1405 | .tda9887_conf = TDA9887_PRESENT, |
ec5de990 | 1406 | .decoder = EM28XX_SAA711X, |
d4d889e3 | 1407 | .input = { { |
95b86a9a DSL |
1408 | .type = EM28XX_VMUX_TELEVISION, |
1409 | .vmux = SAA7115_COMPOSITE2, | |
8a5caa6b | 1410 | .amux = EM28XX_AMUX_VIDEO, |
95b86a9a DSL |
1411 | }, { |
1412 | .type = EM28XX_VMUX_COMPOSITE1, | |
1413 | .vmux = SAA7115_COMPOSITE0, | |
8a5caa6b | 1414 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
1415 | }, { |
1416 | .type = EM28XX_VMUX_SVIDEO, | |
1417 | .vmux = SAA7115_SVIDEO3, | |
8a5caa6b | 1418 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
1419 | } }, |
1420 | }, | |
1421 | [EM2800_BOARD_GRABBEEX_USB2800] = { | |
a1a6ee74 NS |
1422 | .name = "eMPIA Technology, Inc. GrabBeeX+ Video Encoder", |
1423 | .is_em2800 = 1, | |
1424 | .decoder = EM28XX_SAA711X, | |
1425 | .tuner_type = TUNER_ABSENT, /* capture only board */ | |
1426 | .input = { { | |
95b86a9a DSL |
1427 | .type = EM28XX_VMUX_COMPOSITE1, |
1428 | .vmux = SAA7115_COMPOSITE0, | |
8a5caa6b | 1429 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
1430 | }, { |
1431 | .type = EM28XX_VMUX_SVIDEO, | |
1432 | .vmux = SAA7115_SVIDEO3, | |
8a5caa6b | 1433 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
1434 | } }, |
1435 | }, | |
694a101e MCC |
1436 | [EM2800_BOARD_VC211A] = { |
1437 | .name = "Actionmaster/LinXcel/Digitus VC211A", | |
1438 | .is_em2800 = 1, | |
1439 | .tuner_type = TUNER_ABSENT, /* Capture-only board */ | |
1440 | .decoder = EM28XX_SAA711X, | |
1441 | .input = { { | |
1442 | .type = EM28XX_VMUX_COMPOSITE1, | |
1443 | .vmux = SAA7115_COMPOSITE0, | |
1444 | .amux = EM28XX_AMUX_LINE_IN, | |
1445 | .gpio = vc211a_enable, | |
1446 | }, { | |
1447 | .type = EM28XX_VMUX_SVIDEO, | |
1448 | .vmux = SAA7115_SVIDEO3, | |
1449 | .amux = EM28XX_AMUX_LINE_IN, | |
1450 | .gpio = vc211a_enable, | |
1451 | } }, | |
1452 | }, | |
95b86a9a DSL |
1453 | [EM2800_BOARD_LEADTEK_WINFAST_USBII] = { |
1454 | .name = "Leadtek Winfast USB II", | |
1455 | .is_em2800 = 1, | |
95b86a9a DSL |
1456 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
1457 | .tda9887_conf = TDA9887_PRESENT, | |
ec5de990 | 1458 | .decoder = EM28XX_SAA711X, |
d4d889e3 | 1459 | .input = { { |
95b86a9a DSL |
1460 | .type = EM28XX_VMUX_TELEVISION, |
1461 | .vmux = SAA7115_COMPOSITE2, | |
8a5caa6b | 1462 | .amux = EM28XX_AMUX_VIDEO, |
95b86a9a DSL |
1463 | }, { |
1464 | .type = EM28XX_VMUX_COMPOSITE1, | |
1465 | .vmux = SAA7115_COMPOSITE0, | |
8a5caa6b | 1466 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
1467 | }, { |
1468 | .type = EM28XX_VMUX_SVIDEO, | |
1469 | .vmux = SAA7115_SVIDEO3, | |
8a5caa6b | 1470 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
1471 | } }, |
1472 | }, | |
1473 | [EM2800_BOARD_KWORLD_USB2800] = { | |
1474 | .name = "Kworld USB2800", | |
1475 | .is_em2800 = 1, | |
95b86a9a DSL |
1476 | .tuner_type = TUNER_PHILIPS_FCV1236D, |
1477 | .tda9887_conf = TDA9887_PRESENT, | |
ec5de990 | 1478 | .decoder = EM28XX_SAA711X, |
d4d889e3 | 1479 | .input = { { |
95b86a9a DSL |
1480 | .type = EM28XX_VMUX_TELEVISION, |
1481 | .vmux = SAA7115_COMPOSITE2, | |
8a5caa6b | 1482 | .amux = EM28XX_AMUX_VIDEO, |
95b86a9a DSL |
1483 | }, { |
1484 | .type = EM28XX_VMUX_COMPOSITE1, | |
1485 | .vmux = SAA7115_COMPOSITE0, | |
8a5caa6b | 1486 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
1487 | }, { |
1488 | .type = EM28XX_VMUX_SVIDEO, | |
1489 | .vmux = SAA7115_SVIDEO3, | |
8a5caa6b | 1490 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
1491 | } }, |
1492 | }, | |
1493 | [EM2820_BOARD_PINNACLE_DVC_90] = { | |
ea47689e | 1494 | .name = "Pinnacle Dazzle DVC 90/100/101/107 / Kaiser Baas Video to DVD maker " |
74e07f3e | 1495 | "/ Kworld DVD Maker 2 / Plextor ConvertX PX-AV100U", |
1c67e76f | 1496 | .tuner_type = TUNER_ABSENT, /* capture only board */ |
ec5de990 | 1497 | .decoder = EM28XX_SAA711X, |
d4d889e3 | 1498 | .input = { { |
95b86a9a DSL |
1499 | .type = EM28XX_VMUX_COMPOSITE1, |
1500 | .vmux = SAA7115_COMPOSITE0, | |
8a5caa6b | 1501 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
1502 | }, { |
1503 | .type = EM28XX_VMUX_SVIDEO, | |
1504 | .vmux = SAA7115_SVIDEO3, | |
8a5caa6b | 1505 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
1506 | } }, |
1507 | }, | |
1508 | [EM2800_BOARD_VGEAR_POCKETTV] = { | |
1509 | .name = "V-Gear PocketTV", | |
1510 | .is_em2800 = 1, | |
95b86a9a DSL |
1511 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
1512 | .tda9887_conf = TDA9887_PRESENT, | |
ec5de990 | 1513 | .decoder = EM28XX_SAA711X, |
d4d889e3 | 1514 | .input = { { |
95b86a9a DSL |
1515 | .type = EM28XX_VMUX_TELEVISION, |
1516 | .vmux = SAA7115_COMPOSITE2, | |
8a5caa6b | 1517 | .amux = EM28XX_AMUX_VIDEO, |
95b86a9a DSL |
1518 | }, { |
1519 | .type = EM28XX_VMUX_COMPOSITE1, | |
1520 | .vmux = SAA7115_COMPOSITE0, | |
8a5caa6b | 1521 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
1522 | }, { |
1523 | .type = EM28XX_VMUX_SVIDEO, | |
1524 | .vmux = SAA7115_SVIDEO3, | |
8a5caa6b | 1525 | .amux = EM28XX_AMUX_LINE_IN, |
95b86a9a DSL |
1526 | } }, |
1527 | }, | |
1e1addd5 DSL |
1528 | [EM2820_BOARD_PROLINK_PLAYTV_BOX4_USB2] = { |
1529 | .name = "Pixelview PlayTV Box 4 USB 2.0", | |
1530 | .tda9887_conf = TDA9887_PRESENT, | |
1531 | .tuner_type = TUNER_YMEC_TVF_5533MF, | |
1532 | .decoder = EM28XX_SAA711X, | |
1533 | .input = { { | |
1534 | .type = EM28XX_VMUX_TELEVISION, | |
1535 | .vmux = SAA7115_COMPOSITE2, | |
1536 | .amux = EM28XX_AMUX_VIDEO, | |
fdf1bc9f | 1537 | .aout = EM28XX_AOUT_MONO | /* I2S */ |
1e1addd5 DSL |
1538 | EM28XX_AOUT_MASTER, /* Line out pin */ |
1539 | }, { | |
1540 | .type = EM28XX_VMUX_COMPOSITE1, | |
1541 | .vmux = SAA7115_COMPOSITE0, | |
1542 | .amux = EM28XX_AMUX_LINE_IN, | |
1543 | }, { | |
1544 | .type = EM28XX_VMUX_SVIDEO, | |
1545 | .vmux = SAA7115_SVIDEO3, | |
1546 | .amux = EM28XX_AMUX_LINE_IN, | |
1547 | } }, | |
1548 | }, | |
95b86a9a | 1549 | [EM2820_BOARD_PROLINK_PLAYTV_USB2] = { |
1f372a93 | 1550 | .name = "SIIG AVTuner-PVR / Pixelview Prolink PlayTV USB 2.0", |
f5222609 | 1551 | .buttons = std_snapshot_button, |
95b86a9a DSL |
1552 | .tda9887_conf = TDA9887_PRESENT, |
1553 | .tuner_type = TUNER_YMEC_TVF_5533MF, | |
ec5de990 | 1554 | .decoder = EM28XX_SAA711X, |
d4d889e3 | 1555 | .input = { { |
95b86a9a DSL |
1556 | .type = EM28XX_VMUX_TELEVISION, |
1557 | .vmux = SAA7115_COMPOSITE2, | |
30e4ac7c | 1558 | .amux = EM28XX_AMUX_VIDEO, |
fdf1bc9f | 1559 | .aout = EM28XX_AOUT_MONO | /* I2S */ |
30e4ac7c | 1560 | EM28XX_AOUT_MASTER, /* Line out pin */ |
95b86a9a DSL |
1561 | }, { |
1562 | .type = EM28XX_VMUX_COMPOSITE1, | |
1563 | .vmux = SAA7115_COMPOSITE0, | |
1564 | .amux = EM28XX_AMUX_LINE_IN, | |
1565 | }, { | |
1566 | .type = EM28XX_VMUX_SVIDEO, | |
1567 | .vmux = SAA7115_SVIDEO3, | |
1568 | .amux = EM28XX_AMUX_LINE_IN, | |
1569 | } }, | |
1570 | }, | |
3ed58baf DH |
1571 | [EM2860_BOARD_SAA711X_REFERENCE_DESIGN] = { |
1572 | .name = "EM2860/SAA711X Reference Design", | |
f5222609 | 1573 | .buttons = std_snapshot_button, |
d4d889e3 | 1574 | .tuner_type = TUNER_ABSENT, |
ec5de990 | 1575 | .decoder = EM28XX_SAA711X, |
d4d889e3 | 1576 | .input = { { |
95b86a9a DSL |
1577 | .type = EM28XX_VMUX_SVIDEO, |
1578 | .vmux = SAA7115_SVIDEO3, | |
3ed58baf DH |
1579 | }, { |
1580 | .type = EM28XX_VMUX_COMPOSITE1, | |
1581 | .vmux = SAA7115_COMPOSITE0, | |
95b86a9a DSL |
1582 | } }, |
1583 | }, | |
ca3dfd6a | 1584 | |
ebaefdb7 | 1585 | [EM2874_BOARD_LEADERSHIP_ISDBT] = { |
3aa2b3b9 MCC |
1586 | .def_i2c_bus = 1, |
1587 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | | |
ca3dfd6a MCC |
1588 | EM28XX_I2C_FREQ_100_KHZ, |
1589 | .xclk = EM28XX_XCLK_FREQUENCY_10MHZ, | |
1590 | .name = "EM2874 Leadership ISDBT", | |
1591 | .tuner_type = TUNER_ABSENT, | |
1592 | .tuner_gpio = leadership_reset, | |
1593 | .dvb_gpio = leadership_digital, | |
1594 | .has_dvb = 1, | |
1595 | }, | |
1596 | ||
95b86a9a DSL |
1597 | [EM2880_BOARD_MSI_DIGIVOX_AD] = { |
1598 | .name = "MSI DigiVox A/D", | |
1599 | .valid = EM28XX_BOARD_NOT_VALIDATED, | |
95b86a9a | 1600 | .tuner_type = TUNER_XC2028, |
017ab4b1 | 1601 | .tuner_gpio = default_tuner_gpio, |
95b86a9a | 1602 | .decoder = EM28XX_TVP5150, |
d4d889e3 | 1603 | .input = { { |
95b86a9a DSL |
1604 | .type = EM28XX_VMUX_TELEVISION, |
1605 | .vmux = TVP5150_COMPOSITE0, | |
8a5caa6b | 1606 | .amux = EM28XX_AMUX_VIDEO, |
122b77e5 | 1607 | .gpio = em2880_msi_digivox_ad_analog, |
95b86a9a DSL |
1608 | }, { |
1609 | .type = EM28XX_VMUX_COMPOSITE1, | |
1610 | .vmux = TVP5150_COMPOSITE1, | |
8a5caa6b | 1611 | .amux = EM28XX_AMUX_LINE_IN, |
122b77e5 | 1612 | .gpio = em2880_msi_digivox_ad_analog, |
95b86a9a DSL |
1613 | }, { |
1614 | .type = EM28XX_VMUX_SVIDEO, | |
1615 | .vmux = TVP5150_SVIDEO, | |
8a5caa6b | 1616 | .amux = EM28XX_AMUX_LINE_IN, |
122b77e5 | 1617 | .gpio = em2880_msi_digivox_ad_analog, |
95b86a9a DSL |
1618 | } }, |
1619 | }, | |
1620 | [EM2880_BOARD_MSI_DIGIVOX_AD_II] = { | |
1621 | .name = "MSI DigiVox A/D II", | |
1622 | .valid = EM28XX_BOARD_NOT_VALIDATED, | |
95b86a9a | 1623 | .tuner_type = TUNER_XC2028, |
017ab4b1 | 1624 | .tuner_gpio = default_tuner_gpio, |
95b86a9a | 1625 | .decoder = EM28XX_TVP5150, |
d4d889e3 | 1626 | .input = { { |
e14b3658 DH |
1627 | .type = EM28XX_VMUX_TELEVISION, |
1628 | .vmux = TVP5150_COMPOSITE0, | |
8a5caa6b | 1629 | .amux = EM28XX_AMUX_VIDEO, |
122b77e5 | 1630 | .gpio = em2880_msi_digivox_ad_analog, |
e14b3658 DH |
1631 | }, { |
1632 | .type = EM28XX_VMUX_COMPOSITE1, | |
1633 | .vmux = TVP5150_COMPOSITE1, | |
8a5caa6b | 1634 | .amux = EM28XX_AMUX_LINE_IN, |
122b77e5 | 1635 | .gpio = em2880_msi_digivox_ad_analog, |
e14b3658 DH |
1636 | }, { |
1637 | .type = EM28XX_VMUX_SVIDEO, | |
1638 | .vmux = TVP5150_SVIDEO, | |
8a5caa6b | 1639 | .amux = EM28XX_AMUX_LINE_IN, |
122b77e5 | 1640 | .gpio = em2880_msi_digivox_ad_analog, |
e14b3658 DH |
1641 | } }, |
1642 | }, | |
95b86a9a DSL |
1643 | [EM2880_BOARD_KWORLD_DVB_305U] = { |
1644 | .name = "KWorld DVB-T 305U", | |
12466577 | 1645 | .tuner_type = TUNER_XC2028, |
017ab4b1 | 1646 | .tuner_gpio = default_tuner_gpio, |
12466577 | 1647 | .decoder = EM28XX_TVP5150, |
d4d889e3 | 1648 | .input = { { |
12466577 MCC |
1649 | .type = EM28XX_VMUX_TELEVISION, |
1650 | .vmux = TVP5150_COMPOSITE0, | |
8a5caa6b | 1651 | .amux = EM28XX_AMUX_VIDEO, |
c23f5949 | 1652 | }, { |
12466577 MCC |
1653 | .type = EM28XX_VMUX_COMPOSITE1, |
1654 | .vmux = TVP5150_COMPOSITE1, | |
8a5caa6b | 1655 | .amux = EM28XX_AMUX_LINE_IN, |
c23f5949 | 1656 | }, { |
12466577 MCC |
1657 | .type = EM28XX_VMUX_SVIDEO, |
1658 | .vmux = TVP5150_SVIDEO, | |
8a5caa6b | 1659 | .amux = EM28XX_AMUX_LINE_IN, |
c23f5949 | 1660 | } }, |
12466577 | 1661 | }, |
95b86a9a DSL |
1662 | [EM2880_BOARD_KWORLD_DVB_310U] = { |
1663 | .name = "KWorld DVB-T 310U", | |
12466577 | 1664 | .tuner_type = TUNER_XC2028, |
017ab4b1 | 1665 | .tuner_gpio = default_tuner_gpio, |
da3808e1 | 1666 | .has_dvb = 1, |
122b77e5 | 1667 | .dvb_gpio = default_digital, |
da3808e1 | 1668 | .mts_firmware = 1, |
12466577 | 1669 | .decoder = EM28XX_TVP5150, |
d4d889e3 | 1670 | .input = { { |
12466577 MCC |
1671 | .type = EM28XX_VMUX_TELEVISION, |
1672 | .vmux = TVP5150_COMPOSITE0, | |
da3808e1 | 1673 | .amux = EM28XX_AMUX_VIDEO, |
122b77e5 | 1674 | .gpio = default_analog, |
c23f5949 | 1675 | }, { |
12466577 MCC |
1676 | .type = EM28XX_VMUX_COMPOSITE1, |
1677 | .vmux = TVP5150_COMPOSITE1, | |
a42aa191 | 1678 | .amux = EM28XX_AMUX_LINE_IN, |
122b77e5 | 1679 | .gpio = default_analog, |
da3808e1 | 1680 | }, { /* S-video has not been tested yet */ |
12466577 MCC |
1681 | .type = EM28XX_VMUX_SVIDEO, |
1682 | .vmux = TVP5150_SVIDEO, | |
a42aa191 | 1683 | .amux = EM28XX_AMUX_LINE_IN, |
122b77e5 | 1684 | .gpio = default_analog, |
c23f5949 | 1685 | } }, |
12466577 | 1686 | }, |
d7de5d8f FM |
1687 | [EM2882_BOARD_KWORLD_ATSC_315U] = { |
1688 | .name = "KWorld ATSC 315U HDTV TV Box", | |
1689 | .valid = EM28XX_BOARD_NOT_VALIDATED, | |
1690 | .tuner_type = TUNER_THOMSON_DTT761X, | |
1691 | .tuner_gpio = em2882_kworld_315u_tuner_gpio, | |
1692 | .tda9887_conf = TDA9887_PRESENT, | |
1693 | .decoder = EM28XX_SAA711X, | |
1694 | .has_dvb = 1, | |
1695 | .dvb_gpio = em2882_kworld_315u_digital, | |
02858eed | 1696 | .ir_codes = RC_MAP_KWORLD_315U, |
d7de5d8f FM |
1697 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, |
1698 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE, | |
1699 | /* Analog mode - still not ready */ | |
1700 | /*.input = { { | |
1701 | .type = EM28XX_VMUX_TELEVISION, | |
1702 | .vmux = SAA7115_COMPOSITE2, | |
1703 | .amux = EM28XX_AMUX_VIDEO, | |
1704 | .gpio = em2882_kworld_315u_analog, | |
1705 | .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO, | |
1706 | }, { | |
1707 | .type = EM28XX_VMUX_COMPOSITE1, | |
1708 | .vmux = SAA7115_COMPOSITE0, | |
1709 | .amux = EM28XX_AMUX_LINE_IN, | |
1710 | .gpio = em2882_kworld_315u_analog1, | |
1711 | .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO, | |
1712 | }, { | |
1713 | .type = EM28XX_VMUX_SVIDEO, | |
1714 | .vmux = SAA7115_SVIDEO3, | |
1715 | .amux = EM28XX_AMUX_LINE_IN, | |
1716 | .gpio = em2882_kworld_315u_analog1, | |
1717 | .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO, | |
1718 | } }, */ | |
1719 | }, | |
e5db5d44 DSL |
1720 | [EM2880_BOARD_EMPIRE_DUAL_TV] = { |
1721 | .name = "Empire dual TV", | |
1722 | .tuner_type = TUNER_XC2028, | |
1723 | .tuner_gpio = default_tuner_gpio, | |
1724 | .has_dvb = 1, | |
1725 | .dvb_gpio = default_digital, | |
1726 | .mts_firmware = 1, | |
1727 | .decoder = EM28XX_TVP5150, | |
1728 | .input = { { | |
1729 | .type = EM28XX_VMUX_TELEVISION, | |
1730 | .vmux = TVP5150_COMPOSITE0, | |
1731 | .amux = EM28XX_AMUX_VIDEO, | |
1732 | .gpio = default_analog, | |
1733 | }, { | |
1734 | .type = EM28XX_VMUX_COMPOSITE1, | |
1735 | .vmux = TVP5150_COMPOSITE1, | |
1736 | .amux = EM28XX_AMUX_LINE_IN, | |
1737 | .gpio = default_analog, | |
1738 | }, { | |
1739 | .type = EM28XX_VMUX_SVIDEO, | |
1740 | .vmux = TVP5150_SVIDEO, | |
1741 | .amux = EM28XX_AMUX_LINE_IN, | |
1742 | .gpio = default_analog, | |
1743 | } }, | |
1744 | }, | |
95b86a9a DSL |
1745 | [EM2881_BOARD_DNT_DA2_HYBRID] = { |
1746 | .name = "DNT DA2 Hybrid", | |
1747 | .valid = EM28XX_BOARD_NOT_VALIDATED, | |
95b86a9a | 1748 | .tuner_type = TUNER_XC2028, |
017ab4b1 | 1749 | .tuner_gpio = default_tuner_gpio, |
95b86a9a | 1750 | .decoder = EM28XX_TVP5150, |
d4d889e3 | 1751 | .input = { { |
3acf2809 | 1752 | .type = EM28XX_VMUX_TELEVISION, |
95b86a9a | 1753 | .vmux = TVP5150_COMPOSITE0, |
8a5caa6b | 1754 | .amux = EM28XX_AMUX_VIDEO, |
122b77e5 | 1755 | .gpio = default_analog, |
c23f5949 | 1756 | }, { |
3acf2809 | 1757 | .type = EM28XX_VMUX_COMPOSITE1, |
95b86a9a | 1758 | .vmux = TVP5150_COMPOSITE1, |
8a5caa6b | 1759 | .amux = EM28XX_AMUX_LINE_IN, |
122b77e5 | 1760 | .gpio = default_analog, |
c23f5949 | 1761 | }, { |
3acf2809 | 1762 | .type = EM28XX_VMUX_SVIDEO, |
95b86a9a | 1763 | .vmux = TVP5150_SVIDEO, |
8a5caa6b | 1764 | .amux = EM28XX_AMUX_LINE_IN, |
122b77e5 | 1765 | .gpio = default_analog, |
c23f5949 | 1766 | } }, |
596d92d5 | 1767 | }, |
95b86a9a DSL |
1768 | [EM2881_BOARD_PINNACLE_HYBRID_PRO] = { |
1769 | .name = "Pinnacle Hybrid Pro", | |
95b86a9a | 1770 | .tuner_type = TUNER_XC2028, |
017ab4b1 | 1771 | .tuner_gpio = default_tuner_gpio, |
95b86a9a | 1772 | .decoder = EM28XX_TVP5150, |
d5b3ba9c DH |
1773 | .has_dvb = 1, |
1774 | .dvb_gpio = pinnacle_hybrid_pro_digital, | |
d4d889e3 | 1775 | .input = { { |
95b86a9a DSL |
1776 | .type = EM28XX_VMUX_TELEVISION, |
1777 | .vmux = TVP5150_COMPOSITE0, | |
8a5caa6b | 1778 | .amux = EM28XX_AMUX_VIDEO, |
d5b3ba9c | 1779 | .gpio = pinnacle_hybrid_pro_analog, |
95b86a9a | 1780 | }, { |
59d07f1b | 1781 | .type = EM28XX_VMUX_COMPOSITE1, |
95b86a9a | 1782 | .vmux = TVP5150_COMPOSITE1, |
8a5caa6b | 1783 | .amux = EM28XX_AMUX_LINE_IN, |
d5b3ba9c | 1784 | .gpio = pinnacle_hybrid_pro_analog, |
59d07f1b AS |
1785 | }, { |
1786 | .type = EM28XX_VMUX_SVIDEO, | |
95b86a9a | 1787 | .vmux = TVP5150_SVIDEO, |
8a5caa6b | 1788 | .amux = EM28XX_AMUX_LINE_IN, |
d5b3ba9c | 1789 | .gpio = pinnacle_hybrid_pro_analog, |
59d07f1b AS |
1790 | } }, |
1791 | }, | |
09bc1942 DH |
1792 | [EM2882_BOARD_PINNACLE_HYBRID_PRO_330E] = { |
1793 | .name = "Pinnacle Hybrid Pro (330e)", | |
95b86a9a | 1794 | .tuner_type = TUNER_XC2028, |
017ab4b1 | 1795 | .tuner_gpio = default_tuner_gpio, |
a674a3b4 | 1796 | .mts_firmware = 1, |
ad9b4bb2 DH |
1797 | .has_dvb = 1, |
1798 | .dvb_gpio = hauppauge_wintv_hvr_900R2_digital, | |
9b316d6b | 1799 | .ir_codes = RC_MAP_PINNACLE_PCTV_HD, |
95b86a9a | 1800 | .decoder = EM28XX_TVP5150, |
d4d889e3 | 1801 | .input = { { |
3acf2809 | 1802 | .type = EM28XX_VMUX_TELEVISION, |
95b86a9a | 1803 | .vmux = TVP5150_COMPOSITE0, |
8a5caa6b | 1804 | .amux = EM28XX_AMUX_VIDEO, |
122b77e5 | 1805 | .gpio = hauppauge_wintv_hvr_900_analog, |
c23f5949 | 1806 | }, { |
3acf2809 | 1807 | .type = EM28XX_VMUX_COMPOSITE1, |
95b86a9a | 1808 | .vmux = TVP5150_COMPOSITE1, |
8a5caa6b | 1809 | .amux = EM28XX_AMUX_LINE_IN, |
122b77e5 | 1810 | .gpio = hauppauge_wintv_hvr_900_analog, |
c23f5949 | 1811 | }, { |
3acf2809 | 1812 | .type = EM28XX_VMUX_SVIDEO, |
95b86a9a | 1813 | .vmux = TVP5150_SVIDEO, |
8a5caa6b | 1814 | .amux = EM28XX_AMUX_LINE_IN, |
122b77e5 | 1815 | .gpio = hauppauge_wintv_hvr_900_analog, |
c23f5949 | 1816 | } }, |
596d92d5 | 1817 | }, |
95b86a9a DSL |
1818 | [EM2882_BOARD_KWORLD_VS_DVBT] = { |
1819 | .name = "Kworld VS-DVB-T 323UR", | |
95b86a9a | 1820 | .tuner_type = TUNER_XC2028, |
017ab4b1 | 1821 | .tuner_gpio = default_tuner_gpio, |
95b86a9a | 1822 | .decoder = EM28XX_TVP5150, |
811fab62 AL |
1823 | .mts_firmware = 1, |
1824 | .has_dvb = 1, | |
1825 | .dvb_gpio = kworld_330u_digital, | |
1826 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, /* NEC IR */ | |
02858eed | 1827 | .ir_codes = RC_MAP_KWORLD_315U, |
d4d889e3 | 1828 | .input = { { |
3acf2809 | 1829 | .type = EM28XX_VMUX_TELEVISION, |
95b86a9a | 1830 | .vmux = TVP5150_COMPOSITE0, |
8a5caa6b | 1831 | .amux = EM28XX_AMUX_VIDEO, |
c23f5949 | 1832 | }, { |
3acf2809 | 1833 | .type = EM28XX_VMUX_COMPOSITE1, |
95b86a9a | 1834 | .vmux = TVP5150_COMPOSITE1, |
8a5caa6b | 1835 | .amux = EM28XX_AMUX_LINE_IN, |
c23f5949 | 1836 | }, { |
3acf2809 | 1837 | .type = EM28XX_VMUX_SVIDEO, |
95b86a9a | 1838 | .vmux = TVP5150_SVIDEO, |
8a5caa6b | 1839 | .amux = EM28XX_AMUX_LINE_IN, |
c23f5949 | 1840 | } }, |
596d92d5 | 1841 | }, |
95b86a9a | 1842 | [EM2882_BOARD_TERRATEC_HYBRID_XS] = { |
91245443 | 1843 | .name = "Terratec Cinnergy Hybrid T USB XS (em2882)", |
95b86a9a | 1844 | .tuner_type = TUNER_XC2028, |
017ab4b1 | 1845 | .tuner_gpio = default_tuner_gpio, |
ec994d05 | 1846 | .mts_firmware = 1, |
95b86a9a | 1847 | .decoder = EM28XX_TVP5150, |
ec994d05 UV |
1848 | .has_dvb = 1, |
1849 | .dvb_gpio = hauppauge_wintv_hvr_900_digital, | |
02858eed | 1850 | .ir_codes = RC_MAP_TERRATEC_CINERGY_XS, |
ec994d05 | 1851 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, |
d4d889e3 | 1852 | .input = { { |
95b86a9a DSL |
1853 | .type = EM28XX_VMUX_TELEVISION, |
1854 | .vmux = TVP5150_COMPOSITE0, | |
8a5caa6b | 1855 | .amux = EM28XX_AMUX_VIDEO, |
122b77e5 | 1856 | .gpio = hauppauge_wintv_hvr_900_analog, |
95b86a9a | 1857 | }, { |
3acf2809 | 1858 | .type = EM28XX_VMUX_COMPOSITE1, |
95b86a9a | 1859 | .vmux = TVP5150_COMPOSITE1, |
8a5caa6b | 1860 | .amux = EM28XX_AMUX_LINE_IN, |
122b77e5 | 1861 | .gpio = hauppauge_wintv_hvr_900_analog, |
c23f5949 | 1862 | }, { |
3acf2809 | 1863 | .type = EM28XX_VMUX_SVIDEO, |
95b86a9a | 1864 | .vmux = TVP5150_SVIDEO, |
8a5caa6b | 1865 | .amux = EM28XX_AMUX_LINE_IN, |
122b77e5 | 1866 | .gpio = hauppauge_wintv_hvr_900_analog, |
c23f5949 | 1867 | } }, |
45632c4f | 1868 | }, |
7ca7ef60 AA |
1869 | [EM2882_BOARD_DIKOM_DK300] = { |
1870 | .name = "Dikom DK300", | |
1871 | .tuner_type = TUNER_XC2028, | |
1872 | .tuner_gpio = default_tuner_gpio, | |
1873 | .decoder = EM28XX_TVP5150, | |
1874 | .mts_firmware = 1, | |
1875 | .has_dvb = 1, | |
1876 | .dvb_gpio = dikom_dk300_digital, | |
1877 | .input = { { | |
1878 | .type = EM28XX_VMUX_TELEVISION, | |
1879 | .vmux = TVP5150_COMPOSITE0, | |
1880 | .amux = EM28XX_AMUX_VIDEO, | |
1881 | .gpio = default_analog, | |
1882 | } }, | |
1883 | }, | |
6e7b9ea0 | 1884 | [EM2883_BOARD_KWORLD_HYBRID_330U] = { |
95b86a9a | 1885 | .name = "Kworld PlusTV HD Hybrid 330", |
95b86a9a | 1886 | .tuner_type = TUNER_XC2028, |
017ab4b1 | 1887 | .tuner_gpio = default_tuner_gpio, |
95b86a9a | 1888 | .decoder = EM28XX_TVP5150, |
be2c6db1 MCC |
1889 | .mts_firmware = 1, |
1890 | .has_dvb = 1, | |
6e7b9ea0 RK |
1891 | .dvb_gpio = kworld_330u_digital, |
1892 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, | |
a1a6ee74 NS |
1893 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | |
1894 | EM28XX_I2C_EEPROM_ON_BOARD | | |
1895 | EM28XX_I2C_EEPROM_KEY_VALID, | |
d4d889e3 | 1896 | .input = { { |
ea4fd567 | 1897 | .type = EM28XX_VMUX_TELEVISION, |
95b86a9a | 1898 | .vmux = TVP5150_COMPOSITE0, |
8a5caa6b | 1899 | .amux = EM28XX_AMUX_VIDEO, |
6e7b9ea0 RK |
1900 | .gpio = kworld_330u_analog, |
1901 | .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO, | |
c23f5949 | 1902 | }, { |
ea4fd567 | 1903 | .type = EM28XX_VMUX_COMPOSITE1, |
95b86a9a | 1904 | .vmux = TVP5150_COMPOSITE1, |
8a5caa6b | 1905 | .amux = EM28XX_AMUX_LINE_IN, |
6e7b9ea0 RK |
1906 | .gpio = kworld_330u_analog, |
1907 | .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO, | |
c23f5949 | 1908 | }, { |
ea4fd567 | 1909 | .type = EM28XX_VMUX_SVIDEO, |
95b86a9a | 1910 | .vmux = TVP5150_SVIDEO, |
8a5caa6b | 1911 | .amux = EM28XX_AMUX_LINE_IN, |
6e7b9ea0 | 1912 | .gpio = kworld_330u_analog, |
a9fc52bc DH |
1913 | } }, |
1914 | }, | |
ee281b85 | 1915 | [EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU] = { |
d3603341 | 1916 | .name = "Compro VideoMate ForYou/Stereo", |
d3603341 | 1917 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
f2cf250a | 1918 | .tvaudio_addr = 0xb0, |
d3603341 VW |
1919 | .tda9887_conf = TDA9887_PRESENT, |
1920 | .decoder = EM28XX_TVP5150, | |
df7fa09c | 1921 | .adecoder = EM28XX_TVAUDIO, |
2bd1d9eb | 1922 | .mute_gpio = compro_mute_gpio, |
d4d889e3 | 1923 | .input = { { |
d3603341 VW |
1924 | .type = EM28XX_VMUX_TELEVISION, |
1925 | .vmux = TVP5150_COMPOSITE0, | |
2bd1d9eb VW |
1926 | .amux = EM28XX_AMUX_VIDEO, |
1927 | .gpio = compro_unmute_tv_gpio, | |
d3603341 VW |
1928 | }, { |
1929 | .type = EM28XX_VMUX_SVIDEO, | |
1930 | .vmux = TVP5150_SVIDEO, | |
1931 | .amux = EM28XX_AMUX_LINE_IN, | |
2bd1d9eb | 1932 | .gpio = compro_unmute_svid_gpio, |
d3603341 VW |
1933 | } }, |
1934 | }, | |
0bf4f6ce MCC |
1935 | [EM2860_BOARD_KAIOMY_TVNPC_U2] = { |
1936 | .name = "Kaiomy TVnPC U2", | |
1937 | .vchannels = 3, | |
1938 | .tuner_type = TUNER_XC2028, | |
1939 | .tuner_addr = 0x61, | |
1940 | .mts_firmware = 1, | |
1941 | .decoder = EM28XX_TVP5150, | |
1942 | .tuner_gpio = default_tuner_gpio, | |
02858eed | 1943 | .ir_codes = RC_MAP_KAIOMY, |
0bf4f6ce MCC |
1944 | .input = { { |
1945 | .type = EM28XX_VMUX_TELEVISION, | |
1946 | .vmux = TVP5150_COMPOSITE0, | |
1947 | .amux = EM28XX_AMUX_VIDEO, | |
1948 | ||
1949 | }, { | |
1950 | .type = EM28XX_VMUX_COMPOSITE1, | |
1951 | .vmux = TVP5150_COMPOSITE1, | |
1952 | .amux = EM28XX_AMUX_LINE_IN, | |
1953 | }, { | |
1954 | .type = EM28XX_VMUX_SVIDEO, | |
1955 | .vmux = TVP5150_SVIDEO, | |
1956 | .amux = EM28XX_AMUX_LINE_IN, | |
1957 | } }, | |
1958 | .radio = { | |
1959 | .type = EM28XX_RADIO, | |
1960 | .amux = EM28XX_AMUX_LINE_IN, | |
1961 | } | |
56ee3807 MCC |
1962 | }, |
1963 | [EM2860_BOARD_EASYCAP] = { | |
1964 | .name = "Easy Cap Capture DC-60", | |
1965 | .vchannels = 2, | |
1966 | .tuner_type = TUNER_ABSENT, | |
1967 | .decoder = EM28XX_SAA711X, | |
1968 | .input = { { | |
1969 | .type = EM28XX_VMUX_COMPOSITE1, | |
1970 | .vmux = SAA7115_COMPOSITE0, | |
1971 | .amux = EM28XX_AMUX_LINE_IN, | |
1972 | }, { | |
1973 | .type = EM28XX_VMUX_SVIDEO, | |
1974 | .vmux = SAA7115_SVIDEO3, | |
1975 | .amux = EM28XX_AMUX_LINE_IN, | |
1976 | } }, | |
1977 | }, | |
f74a61e3 IK |
1978 | [EM2820_BOARD_IODATA_GVMVP_SZ] = { |
1979 | .name = "IO-DATA GV-MVP/SZ", | |
1980 | .tuner_type = TUNER_PHILIPS_FM1236_MK3, | |
1981 | .tuner_gpio = default_tuner_gpio, | |
1982 | .tda9887_conf = TDA9887_PRESENT, | |
1983 | .decoder = EM28XX_TVP5150, | |
1984 | .input = { { | |
1985 | .type = EM28XX_VMUX_TELEVISION, | |
1986 | .vmux = TVP5150_COMPOSITE0, | |
1987 | .amux = EM28XX_AMUX_VIDEO, | |
1988 | }, { /* Composite has not been tested yet */ | |
1989 | .type = EM28XX_VMUX_COMPOSITE1, | |
1990 | .vmux = TVP5150_COMPOSITE1, | |
1991 | .amux = EM28XX_AMUX_VIDEO, | |
1992 | }, { /* S-video has not been tested yet */ | |
1993 | .type = EM28XX_VMUX_SVIDEO, | |
1994 | .vmux = TVP5150_SVIDEO, | |
1995 | .amux = EM28XX_AMUX_VIDEO, | |
1996 | } }, | |
1997 | }, | |
4557af9c MCC |
1998 | [EM2860_BOARD_TERRATEC_GRABBY] = { |
1999 | .name = "Terratec Grabby", | |
2000 | .vchannels = 2, | |
2001 | .tuner_type = TUNER_ABSENT, | |
2002 | .decoder = EM28XX_SAA711X, | |
2003 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, | |
2004 | .input = { { | |
2005 | .type = EM28XX_VMUX_COMPOSITE1, | |
2006 | .vmux = SAA7115_COMPOSITE0, | |
a3fa904e | 2007 | .amux = EM28XX_AMUX_LINE_IN, |
4557af9c MCC |
2008 | }, { |
2009 | .type = EM28XX_VMUX_SVIDEO, | |
2010 | .vmux = SAA7115_SVIDEO3, | |
a3fa904e | 2011 | .amux = EM28XX_AMUX_LINE_IN, |
4557af9c MCC |
2012 | } }, |
2013 | }, | |
766ed64d MCC |
2014 | [EM2860_BOARD_TERRATEC_AV350] = { |
2015 | .name = "Terratec AV350", | |
2016 | .vchannels = 2, | |
2017 | .tuner_type = TUNER_ABSENT, | |
2018 | .decoder = EM28XX_TVP5150, | |
2019 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, | |
2020 | .mute_gpio = terratec_av350_mute_gpio, | |
2021 | .input = { { | |
2022 | .type = EM28XX_VMUX_COMPOSITE1, | |
2023 | .vmux = TVP5150_COMPOSITE1, | |
2024 | .amux = EM28XX_AUDIO_SRC_LINE, | |
1df8e986 | 2025 | .gpio = terratec_av350_unmute_gpio, |
766ed64d MCC |
2026 | |
2027 | }, { | |
2028 | .type = EM28XX_VMUX_SVIDEO, | |
2029 | .vmux = TVP5150_SVIDEO, | |
2030 | .amux = EM28XX_AUDIO_SRC_LINE, | |
1df8e986 | 2031 | .gpio = terratec_av350_unmute_gpio, |
766ed64d MCC |
2032 | } }, |
2033 | }, | |
8298f2f8 AT |
2034 | |
2035 | [EM2860_BOARD_ELGATO_VIDEO_CAPTURE] = { | |
2036 | .name = "Elgato Video Capture", | |
2037 | .decoder = EM28XX_SAA711X, | |
2038 | .tuner_type = TUNER_ABSENT, /* Capture only device */ | |
2039 | .input = { { | |
2040 | .type = EM28XX_VMUX_COMPOSITE1, | |
2041 | .vmux = SAA7115_COMPOSITE0, | |
2042 | .amux = EM28XX_AMUX_LINE_IN, | |
2043 | }, { | |
2044 | .type = EM28XX_VMUX_SVIDEO, | |
2045 | .vmux = SAA7115_SVIDEO3, | |
2046 | .amux = EM28XX_AMUX_LINE_IN, | |
2047 | } }, | |
2048 | }, | |
2049 | ||
19859229 DH |
2050 | [EM2882_BOARD_EVGA_INDTUBE] = { |
2051 | .name = "Evga inDtube", | |
2052 | .tuner_type = TUNER_XC2028, | |
2053 | .tuner_gpio = default_tuner_gpio, | |
2054 | .decoder = EM28XX_TVP5150, | |
a4c47303 | 2055 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, /* NEC IR */ |
19859229 DH |
2056 | .mts_firmware = 1, |
2057 | .has_dvb = 1, | |
2058 | .dvb_gpio = evga_indtube_digital, | |
02858eed | 2059 | .ir_codes = RC_MAP_EVGA_INDTUBE, |
19859229 DH |
2060 | .input = { { |
2061 | .type = EM28XX_VMUX_TELEVISION, | |
2062 | .vmux = TVP5150_COMPOSITE0, | |
2063 | .amux = EM28XX_AMUX_VIDEO, | |
2064 | .gpio = evga_indtube_analog, | |
2065 | }, { | |
2066 | .type = EM28XX_VMUX_COMPOSITE1, | |
2067 | .vmux = TVP5150_COMPOSITE1, | |
2068 | .amux = EM28XX_AMUX_LINE_IN, | |
2069 | .gpio = evga_indtube_analog, | |
2070 | }, { | |
2071 | .type = EM28XX_VMUX_SVIDEO, | |
2072 | .vmux = TVP5150_SVIDEO, | |
2073 | .amux = EM28XX_AMUX_LINE_IN, | |
2074 | .gpio = evga_indtube_analog, | |
2075 | } }, | |
2076 | }, | |
285eb1a4 AP |
2077 | /* eb1a:2868 Empia EM2870 + Philips CU1216L NIM (Philips TDA10023 + |
2078 | Infineon TUA6034) */ | |
2079 | [EM2870_BOARD_REDDO_DVB_C_USB_BOX] = { | |
2080 | .name = "Reddo DVB-C USB TV Box", | |
2081 | .tuner_type = TUNER_ABSENT, | |
28f4ddd1 | 2082 | .tuner_gpio = reddo_dvb_c_usb_box, |
285eb1a4 | 2083 | .has_dvb = 1, |
285eb1a4 | 2084 | }, |
7e48b30a JW |
2085 | /* 1b80:a340 - Empia EM2870, NXP TDA18271HD and LG DT3304, sold |
2086 | * initially as the KWorld PlusTV 340U, then as the UB435-Q. | |
2087 | * Early variants have a TDA18271HD/C1, later ones a TDA18271HD/C2 */ | |
2088 | [EM2870_BOARD_KWORLD_A340] = { | |
2089 | .name = "KWorld PlusTV 340U or UB435-Q (ATSC)", | |
2090 | .tuner_type = TUNER_ABSENT, /* Digital-only TDA18271HD */ | |
2091 | .has_dvb = 1, | |
2092 | .dvb_gpio = kworld_a340_digital, | |
2093 | .tuner_gpio = default_tuner_gpio, | |
2094 | }, | |
460312ec | 2095 | /* 2013:024f PCTV nanoStick T2 290e. |
d6a5f921 AP |
2096 | * Empia EM28174, Sony CXD2820R and NXP TDA18271HD/C2 */ |
2097 | [EM28174_BOARD_PCTV_290E] = { | |
460312ec | 2098 | .name = "PCTV nanoStick T2 290e", |
3aa2b3b9 MCC |
2099 | .def_i2c_bus = 1, |
2100 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | EM28XX_I2C_FREQ_100_KHZ, | |
d6a5f921 AP |
2101 | .tuner_type = TUNER_ABSENT, |
2102 | .tuner_gpio = pctv_290e, | |
2103 | .has_dvb = 1, | |
ff7b929f | 2104 | .ir_codes = RC_MAP_PINNACLE_PCTV_HD, |
d6a5f921 | 2105 | }, |
36588715 AP |
2106 | /* 2013:024f PCTV DVB-S2 Stick 460e |
2107 | * Empia EM28174, NXP TDA10071, Conexant CX24118A and Allegro A8293 */ | |
2108 | [EM28174_BOARD_PCTV_460E] = { | |
3aa2b3b9 MCC |
2109 | .def_i2c_bus = 1, |
2110 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | EM28XX_I2C_FREQ_400_KHZ, | |
36588715 AP |
2111 | .name = "PCTV DVB-S2 Stick (460e)", |
2112 | .tuner_type = TUNER_ABSENT, | |
2113 | .tuner_gpio = pctv_460e, | |
2114 | .has_dvb = 1, | |
2115 | .ir_codes = RC_MAP_PINNACLE_PCTV_HD, | |
2116 | }, | |
4d28d3d9 GW |
2117 | /* eb1a:5006 Honestech VIDBOX NW03 |
2118 | * Empia EM2860, Philips SAA7113, Empia EMP202, No Tuner */ | |
2119 | [EM2860_BOARD_HT_VIDBOX_NW03] = { | |
2120 | .name = "Honestech Vidbox NW03", | |
2121 | .tuner_type = TUNER_ABSENT, | |
2122 | .decoder = EM28XX_SAA711X, | |
2123 | .input = { { | |
2124 | .type = EM28XX_VMUX_COMPOSITE1, | |
2125 | .vmux = SAA7115_COMPOSITE0, | |
2126 | .amux = EM28XX_AMUX_LINE_IN, | |
2127 | }, { | |
2128 | .type = EM28XX_VMUX_SVIDEO, | |
2129 | .vmux = SAA7115_SVIDEO3, /* S-VIDEO needs confirming */ | |
2130 | .amux = EM28XX_AMUX_LINE_IN, | |
2131 | } }, | |
2132 | }, | |
3553085c AP |
2133 | /* 1b80:e425 MaxMedia UB425-TC |
2134 | * Empia EM2874B + Micronas DRX 3913KA2 + NXP TDA18271HDC2 */ | |
2135 | [EM2874_BOARD_MAXMEDIA_UB425_TC] = { | |
2136 | .name = "MaxMedia UB425-TC", | |
2137 | .tuner_type = TUNER_ABSENT, | |
2138 | .tuner_gpio = maxmedia_ub425_tc, | |
2139 | .has_dvb = 1, | |
831378db | 2140 | .ir_codes = RC_MAP_REDDO, |
3aa2b3b9 MCC |
2141 | .def_i2c_bus = 1, |
2142 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | | |
3553085c AP |
2143 | EM28XX_I2C_FREQ_400_KHZ, |
2144 | }, | |
fa5527cd IK |
2145 | /* 2304:0242 PCTV QuatroStick (510e) |
2146 | * Empia EM2884 + Micronas DRX 3926K + NXP TDA18271HDC2 */ | |
2147 | [EM2884_BOARD_PCTV_510E] = { | |
2148 | .name = "PCTV QuatroStick (510e)", | |
2149 | .tuner_type = TUNER_ABSENT, | |
2150 | .tuner_gpio = pctv_510e, | |
2151 | .has_dvb = 1, | |
2152 | .ir_codes = RC_MAP_PINNACLE_PCTV_HD, | |
3aa2b3b9 MCC |
2153 | .def_i2c_bus = 1, |
2154 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | | |
fa5527cd IK |
2155 | EM28XX_I2C_FREQ_400_KHZ, |
2156 | }, | |
c247d7b1 AP |
2157 | /* 2013:0251 PCTV QuatroStick nano (520e) |
2158 | * Empia EM2884 + Micronas DRX 3926K + NXP TDA18271HDC2 */ | |
2159 | [EM2884_BOARD_PCTV_520E] = { | |
2160 | .name = "PCTV QuatroStick nano (520e)", | |
2161 | .tuner_type = TUNER_ABSENT, | |
2162 | .tuner_gpio = pctv_520e, | |
2163 | .has_dvb = 1, | |
2164 | .ir_codes = RC_MAP_PINNACLE_PCTV_HD, | |
3aa2b3b9 MCC |
2165 | .def_i2c_bus = 1, |
2166 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | | |
c247d7b1 AP |
2167 | EM28XX_I2C_FREQ_400_KHZ, |
2168 | }, | |
89040136 MB |
2169 | [EM2884_BOARD_TERRATEC_HTC_USB_XS] = { |
2170 | .name = "Terratec Cinergy HTC USB XS", | |
2171 | .has_dvb = 1, | |
2172 | .ir_codes = RC_MAP_NEC_TERRATEC_CINERGY_XS, | |
2173 | .tuner_type = TUNER_ABSENT, | |
3aa2b3b9 MCC |
2174 | .def_i2c_bus = 1, |
2175 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | | |
89040136 MB |
2176 | EM28XX_I2C_FREQ_400_KHZ, |
2177 | }, | |
7c1dfdb0 JH |
2178 | /* 1b80:e1cc Delock 61959 |
2179 | * Empia EM2874B + Micronas DRX 3913KA2 + NXP TDA18271HDC2 | |
ce67943e | 2180 | * mostly the same as MaxMedia UB-425-TC but different remote */ |
7c1dfdb0 JH |
2181 | [EM2874_BOARD_DELOCK_61959] = { |
2182 | .name = "Delock 61959", | |
2183 | .tuner_type = TUNER_ABSENT, | |
2184 | .tuner_gpio = maxmedia_ub425_tc, | |
2185 | .has_dvb = 1, | |
2186 | .ir_codes = RC_MAP_DELOCK_61959, | |
2187 | .def_i2c_bus = 1, | |
2188 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | | |
2189 | EM28XX_I2C_FREQ_400_KHZ, | |
2190 | }, | |
6dbea9f0 JFT |
2191 | /* |
2192 | * 1b80:e346 KWorld USB ATSC TV Stick UB435-Q V2 | |
2193 | * Empia EM2874B + LG DT3305 + NXP TDA18271HDC2 | |
2194 | */ | |
2195 | [EM2874_BOARD_KWORLD_UB435Q_V2] = { | |
2196 | .name = "KWorld USB ATSC TV Stick UB435-Q V2", | |
2197 | .tuner_type = TUNER_ABSENT, | |
2198 | .has_dvb = 1, | |
2199 | .dvb_gpio = kworld_a340_digital, | |
2200 | .tuner_gpio = default_tuner_gpio, | |
2201 | .def_i2c_bus = 1, | |
2202 | }, | |
02bc1f55 MCC |
2203 | /* |
2204 | * 1b80:e34c KWorld USB ATSC TV Stick UB435-Q V3 | |
2205 | * Empia EM2874B + LG DT3305 + NXP TDA18271HDC2 | |
2206 | */ | |
2207 | [EM2874_BOARD_KWORLD_UB435Q_V3] = { | |
2208 | .name = "KWorld USB ATSC TV Stick UB435-Q V3", | |
2209 | .tuner_type = TUNER_ABSENT, | |
2210 | .has_dvb = 1, | |
2211 | .tuner_gpio = kworld_ub435q_v3_digital, | |
2212 | .def_i2c_bus = 1, | |
2213 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | | |
2214 | EM28XX_I2C_FREQ_100_KHZ, | |
59432be1 | 2215 | .leds = kworld_ub435q_v3_leds, |
02bc1f55 | 2216 | }, |
38b2df95 DH |
2217 | [EM2874_BOARD_PCTV_HD_MINI_80E] = { |
2218 | .name = "Pinnacle PCTV HD Mini", | |
2219 | .tuner_type = TUNER_ABSENT, | |
2220 | .has_dvb = 1, | |
2221 | .dvb_gpio = em2874_pctv_80e_digital, | |
2222 | .decoder = EM28XX_NODECODER, | |
959505bd | 2223 | .ir_codes = RC_MAP_PINNACLE_PCTV_HD, |
88e4fcda | 2224 | .leds = pctv_80e_leds, |
38b2df95 | 2225 | }, |
0c37e736 FS |
2226 | /* 1ae7:9003/9004 SpeedLink Vicious And Devine Laplace webcam |
2227 | * Empia EM2765 + OmniVision OV2640 */ | |
2228 | [EM2765_BOARD_SPEEDLINK_VAD_LAPLACE] = { | |
2229 | .name = "SpeedLink Vicious And Devine Laplace webcam", | |
2230 | .xclk = EM28XX_XCLK_FREQUENCY_24MHZ, | |
2231 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | | |
2232 | EM28XX_I2C_FREQ_100_KHZ, | |
2233 | .def_i2c_bus = 1, | |
2234 | .tuner_type = TUNER_ABSENT, | |
2235 | .is_webcam = 1, | |
2236 | .input = { { | |
2237 | .type = EM28XX_VMUX_COMPOSITE1, | |
2238 | .amux = EM28XX_AMUX_VIDEO, | |
2239 | .gpio = speedlink_vad_laplace_reg_seq, | |
2240 | } }, | |
2241 | .buttons = speedlink_vad_laplace_buttons, | |
2242 | .leds = speedlink_vad_laplace_leds, | |
2243 | }, | |
ec573362 AP |
2244 | /* 2013:0258 PCTV DVB-S2 Stick (461e) |
2245 | * Empia EM28178, Montage M88DS3103, Montage M88TS2022, Allegro A8293 */ | |
2246 | [EM28178_BOARD_PCTV_461E] = { | |
2247 | .def_i2c_bus = 1, | |
2248 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | EM28XX_I2C_FREQ_400_KHZ, | |
2249 | .name = "PCTV DVB-S2 Stick (461e)", | |
2250 | .tuner_type = TUNER_ABSENT, | |
2251 | .tuner_gpio = pctv_461e, | |
2252 | .has_dvb = 1, | |
2253 | .ir_codes = RC_MAP_PINNACLE_PCTV_HD, | |
2254 | }, | |
19229240 AP |
2255 | /* 2013:025f PCTV tripleStick (292e). |
2256 | * Empia EM28178, Silicon Labs Si2168, Silicon Labs Si2157 */ | |
2257 | [EM28178_BOARD_PCTV_292E] = { | |
2258 | .name = "PCTV tripleStick (292e)", | |
2259 | .def_i2c_bus = 1, | |
2260 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | EM28XX_I2C_FREQ_400_KHZ, | |
2261 | .tuner_type = TUNER_ABSENT, | |
2262 | .tuner_gpio = pctv_292e, | |
2263 | .has_dvb = 1, | |
2264 | .ir_codes = RC_MAP_PINNACLE_PCTV_HD, | |
2265 | }, | |
eace9721 WK |
2266 | [EM2861_BOARD_LEADTEK_VC100] = { |
2267 | .name = "Leadtek VC100", | |
2268 | .tuner_type = TUNER_ABSENT, /* Capture only device */ | |
2269 | .decoder = EM28XX_TVP5150, | |
2270 | .input = { { | |
2271 | .type = EM28XX_VMUX_COMPOSITE1, | |
2272 | .vmux = TVP5150_COMPOSITE1, | |
2273 | .amux = EM28XX_AMUX_LINE_IN, | |
2274 | }, { | |
2275 | .type = EM28XX_VMUX_SVIDEO, | |
2276 | .vmux = TVP5150_SVIDEO, | |
2277 | .amux = EM28XX_AMUX_LINE_IN, | |
2278 | } }, | |
2279 | }, | |
fc30dd76 OS |
2280 | /* eb1a:8179 Terratec Cinergy T2 Stick HD. |
2281 | * Empia EM28178, Silicon Labs Si2168, Silicon Labs Si2146 */ | |
2282 | [EM28178_BOARD_TERRATEC_T2_STICK_HD] = { | |
2283 | .name = "Terratec Cinergy T2 Stick HD", | |
2284 | .def_i2c_bus = 1, | |
2285 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | EM28XX_I2C_FREQ_400_KHZ, | |
2286 | .tuner_type = TUNER_ABSENT, | |
2287 | .tuner_gpio = terratec_t2_stick_hd, | |
2288 | .has_dvb = 1, | |
2289 | .ir_codes = RC_MAP_TERRATEC_SLIM_2, | |
2290 | }, | |
a6c2ba28 | 2291 | }; |
01c28193 MCC |
2292 | EXPORT_SYMBOL_GPL(em28xx_boards); |
2293 | ||
4a9e512a | 2294 | static const unsigned int em28xx_bcount = ARRAY_SIZE(em28xx_boards); |
a6c2ba28 | 2295 | |
2296 | /* table of devices that work with this driver */ | |
a1a6ee74 | 2297 | struct usb_device_id em28xx_id_table[] = { |
c23f5949 | 2298 | { USB_DEVICE(0xeb1a, 0x2750), |
95b86a9a DSL |
2299 | .driver_info = EM2750_BOARD_UNKNOWN }, |
2300 | { USB_DEVICE(0xeb1a, 0x2751), | |
2301 | .driver_info = EM2750_BOARD_UNKNOWN }, | |
c23f5949 MCC |
2302 | { USB_DEVICE(0xeb1a, 0x2800), |
2303 | .driver_info = EM2800_BOARD_UNKNOWN }, | |
9b4e845c MCC |
2304 | { USB_DEVICE(0xeb1a, 0x2710), |
2305 | .driver_info = EM2820_BOARD_UNKNOWN }, | |
c23f5949 MCC |
2306 | { USB_DEVICE(0xeb1a, 0x2820), |
2307 | .driver_info = EM2820_BOARD_UNKNOWN }, | |
2308 | { USB_DEVICE(0xeb1a, 0x2821), | |
c665f4dd | 2309 | .driver_info = EM2820_BOARD_UNKNOWN }, |
c23f5949 MCC |
2310 | { USB_DEVICE(0xeb1a, 0x2860), |
2311 | .driver_info = EM2820_BOARD_UNKNOWN }, | |
2312 | { USB_DEVICE(0xeb1a, 0x2861), | |
2313 | .driver_info = EM2820_BOARD_UNKNOWN }, | |
f91cb65b DH |
2314 | { USB_DEVICE(0xeb1a, 0x2862), |
2315 | .driver_info = EM2820_BOARD_UNKNOWN }, | |
443fed9f DH |
2316 | { USB_DEVICE(0xeb1a, 0x2863), |
2317 | .driver_info = EM2820_BOARD_UNKNOWN }, | |
c23f5949 MCC |
2318 | { USB_DEVICE(0xeb1a, 0x2870), |
2319 | .driver_info = EM2820_BOARD_UNKNOWN }, | |
2320 | { USB_DEVICE(0xeb1a, 0x2881), | |
2321 | .driver_info = EM2820_BOARD_UNKNOWN }, | |
2322 | { USB_DEVICE(0xeb1a, 0x2883), | |
2323 | .driver_info = EM2820_BOARD_UNKNOWN }, | |
285eb1a4 AP |
2324 | { USB_DEVICE(0xeb1a, 0x2868), |
2325 | .driver_info = EM2820_BOARD_UNKNOWN }, | |
ca3dfd6a MCC |
2326 | { USB_DEVICE(0xeb1a, 0x2875), |
2327 | .driver_info = EM2820_BOARD_UNKNOWN }, | |
e22eca78 HV |
2328 | { USB_DEVICE(0xeb1a, 0x2885), /* MSI Digivox Trio */ |
2329 | .driver_info = EM2884_BOARD_TERRATEC_H5 }, | |
95b86a9a DSL |
2330 | { USB_DEVICE(0xeb1a, 0xe300), |
2331 | .driver_info = EM2861_BOARD_KWORLD_PVRTV_300U }, | |
0bf4f6ce MCC |
2332 | { USB_DEVICE(0xeb1a, 0xe303), |
2333 | .driver_info = EM2860_BOARD_KAIOMY_TVNPC_U2 }, | |
95b86a9a DSL |
2334 | { USB_DEVICE(0xeb1a, 0xe305), |
2335 | .driver_info = EM2880_BOARD_KWORLD_DVB_305U }, | |
2336 | { USB_DEVICE(0xeb1a, 0xe310), | |
2337 | .driver_info = EM2880_BOARD_MSI_DIGIVOX_AD }, | |
d7de5d8f FM |
2338 | { USB_DEVICE(0xeb1a, 0xa313), |
2339 | .driver_info = EM2882_BOARD_KWORLD_ATSC_315U }, | |
95b86a9a | 2340 | { USB_DEVICE(0xeb1a, 0xa316), |
6e7b9ea0 | 2341 | .driver_info = EM2883_BOARD_KWORLD_HYBRID_330U }, |
95b86a9a DSL |
2342 | { USB_DEVICE(0xeb1a, 0xe320), |
2343 | .driver_info = EM2880_BOARD_MSI_DIGIVOX_AD_II }, | |
2344 | { USB_DEVICE(0xeb1a, 0xe323), | |
2345 | .driver_info = EM2882_BOARD_KWORLD_VS_DVBT }, | |
2346 | { USB_DEVICE(0xeb1a, 0xe350), | |
2347 | .driver_info = EM2870_BOARD_KWORLD_350U }, | |
2348 | { USB_DEVICE(0xeb1a, 0xe355), | |
2349 | .driver_info = EM2870_BOARD_KWORLD_355U }, | |
2350 | { USB_DEVICE(0xeb1a, 0x2801), | |
2351 | .driver_info = EM2800_BOARD_GRABBEEX_USB2800 }, | |
2352 | { USB_DEVICE(0xeb1a, 0xe357), | |
2353 | .driver_info = EM2870_BOARD_KWORLD_355U }, | |
1985f6fb AP |
2354 | { USB_DEVICE(0xeb1a, 0xe359), |
2355 | .driver_info = EM2870_BOARD_KWORLD_355U }, | |
ac40d9e0 DSL |
2356 | { USB_DEVICE(0x1b80, 0xe302), |
2357 | .driver_info = EM2820_BOARD_PINNACLE_DVC_90 }, /* Kaiser Baas Video to DVD maker */ | |
ea47689e DSL |
2358 | { USB_DEVICE(0x1b80, 0xe304), |
2359 | .driver_info = EM2820_BOARD_PINNACLE_DVC_90 }, /* Kworld DVD Maker 2 */ | |
c23f5949 MCC |
2360 | { USB_DEVICE(0x0ccd, 0x0036), |
2361 | .driver_info = EM2820_BOARD_TERRATEC_CINERGY_250 }, | |
95b86a9a DSL |
2362 | { USB_DEVICE(0x0ccd, 0x004c), |
2363 | .driver_info = EM2880_BOARD_TERRATEC_HYBRID_XS_FR }, | |
2364 | { USB_DEVICE(0x0ccd, 0x004f), | |
2365 | .driver_info = EM2860_BOARD_TERRATEC_HYBRID_XS }, | |
2366 | { USB_DEVICE(0x0ccd, 0x005e), | |
2367 | .driver_info = EM2882_BOARD_TERRATEC_HYBRID_XS }, | |
2368 | { USB_DEVICE(0x0ccd, 0x0042), | |
91245443 | 2369 | .driver_info = EM2882_BOARD_TERRATEC_HYBRID_XS }, |
95b86a9a | 2370 | { USB_DEVICE(0x0ccd, 0x0043), |
4e145349 | 2371 | .driver_info = EM2870_BOARD_TERRATEC_XS }, |
6c3b906c | 2372 | { USB_DEVICE(0x0ccd, 0x008e), /* Cinergy HTC USB XS Rev. 1 */ |
89040136 | 2373 | .driver_info = EM2884_BOARD_TERRATEC_HTC_USB_XS }, |
6c3b906c | 2374 | { USB_DEVICE(0x0ccd, 0x00ac), /* Cinergy HTC USB XS Rev. 2 */ |
89040136 | 2375 | .driver_info = EM2884_BOARD_TERRATEC_HTC_USB_XS }, |
4e145349 | 2376 | { USB_DEVICE(0x0ccd, 0x10a2), /* H5 Rev. 1 */ |
fec528b7 | 2377 | .driver_info = EM2884_BOARD_TERRATEC_H5 }, |
4e145349 | 2378 | { USB_DEVICE(0x0ccd, 0x10ad), /* H5 Rev. 2 */ |
33ba28ee | 2379 | .driver_info = EM2884_BOARD_TERRATEC_H5 }, |
676fa7d4 RS |
2380 | { USB_DEVICE(0x0ccd, 0x10b6), /* H5 Rev. 3 */ |
2381 | .driver_info = EM2884_BOARD_TERRATEC_H5 }, | |
766ed64d MCC |
2382 | { USB_DEVICE(0x0ccd, 0x0084), |
2383 | .driver_info = EM2860_BOARD_TERRATEC_AV350 }, | |
4557af9c MCC |
2384 | { USB_DEVICE(0x0ccd, 0x0096), |
2385 | .driver_info = EM2860_BOARD_TERRATEC_GRABBY }, | |
efabaaf3 T |
2386 | { USB_DEVICE(0x0ccd, 0x10AF), |
2387 | .driver_info = EM2860_BOARD_TERRATEC_GRABBY }, | |
a1ed02e9 AO |
2388 | { USB_DEVICE(0x0ccd, 0x00b2), |
2389 | .driver_info = EM2884_BOARD_CINERGY_HTC_STICK }, | |
1fe0fbd6 GR |
2390 | { USB_DEVICE(0x0fd9, 0x0018), |
2391 | .driver_info = EM2884_BOARD_ELGATO_EYETV_HYBRID_2008 }, | |
8298f2f8 | 2392 | { USB_DEVICE(0x0fd9, 0x0033), |
1fe0fbd6 | 2393 | .driver_info = EM2860_BOARD_ELGATO_VIDEO_CAPTURE }, |
95b86a9a DSL |
2394 | { USB_DEVICE(0x185b, 0x2870), |
2395 | .driver_info = EM2870_BOARD_COMPRO_VIDEOMATE }, | |
d3603341 | 2396 | { USB_DEVICE(0x185b, 0x2041), |
ee281b85 | 2397 | .driver_info = EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU }, |
c23f5949 MCC |
2398 | { USB_DEVICE(0x2040, 0x4200), |
2399 | .driver_info = EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 }, | |
15b9becc MCC |
2400 | { USB_DEVICE(0x2040, 0x4201), |
2401 | .driver_info = EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 }, | |
c23f5949 MCC |
2402 | { USB_DEVICE(0x2040, 0x6500), |
2403 | .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900 }, | |
427d20c4 | 2404 | { USB_DEVICE(0x2040, 0x6502), |
17d9d558 | 2405 | .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2 }, |
74ee0510 | 2406 | { USB_DEVICE(0x2040, 0x6513), /* HCW HVR-980 */ |
10ac6603 | 2407 | .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 }, |
74ee0510 | 2408 | { USB_DEVICE(0x2040, 0x6517), /* HP HVR-950 */ |
10ac6603 | 2409 | .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 }, |
74ee0510 | 2410 | { USB_DEVICE(0x2040, 0x651b), /* RP HVR-950 */ |
10ac6603 | 2411 | .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 }, |
f89bc329 DSL |
2412 | { USB_DEVICE(0x2040, 0x651f), |
2413 | .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850 }, | |
e14b3658 DH |
2414 | { USB_DEVICE(0x0438, 0xb002), |
2415 | .driver_info = EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600 }, | |
95b86a9a DSL |
2416 | { USB_DEVICE(0x2001, 0xf112), |
2417 | .driver_info = EM2820_BOARD_DLINK_USB_TV }, | |
2418 | { USB_DEVICE(0x2304, 0x0207), | |
2419 | .driver_info = EM2820_BOARD_PINNACLE_DVC_90 }, | |
2420 | { USB_DEVICE(0x2304, 0x0208), | |
2421 | .driver_info = EM2820_BOARD_PINNACLE_USB_2 }, | |
2422 | { USB_DEVICE(0x2304, 0x021a), | |
2423 | .driver_info = EM2820_BOARD_PINNACLE_DVC_90 }, | |
2424 | { USB_DEVICE(0x2304, 0x0226), | |
09bc1942 | 2425 | .driver_info = EM2882_BOARD_PINNACLE_HYBRID_PRO_330E }, |
95b86a9a DSL |
2426 | { USB_DEVICE(0x2304, 0x0227), |
2427 | .driver_info = EM2880_BOARD_PINNACLE_PCTV_HD_PRO }, | |
38b2df95 DH |
2428 | { USB_DEVICE(0x2304, 0x023f), |
2429 | .driver_info = EM2874_BOARD_PCTV_HD_MINI_80E }, | |
95b86a9a DSL |
2430 | { USB_DEVICE(0x0413, 0x6023), |
2431 | .driver_info = EM2800_BOARD_LEADTEK_WINFAST_USBII }, | |
74e07f3e DK |
2432 | { USB_DEVICE(0x093b, 0xa003), |
2433 | .driver_info = EM2820_BOARD_PINNACLE_DVC_90 }, | |
95b86a9a DSL |
2434 | { USB_DEVICE(0x093b, 0xa005), |
2435 | .driver_info = EM2861_BOARD_PLEXTOR_PX_TV100U }, | |
f74a61e3 IK |
2436 | { USB_DEVICE(0x04bb, 0x0515), |
2437 | .driver_info = EM2820_BOARD_IODATA_GVMVP_SZ }, | |
7c8b5679 ZW |
2438 | { USB_DEVICE(0xeb1a, 0x50a6), |
2439 | .driver_info = EM2860_BOARD_GADMEI_UTV330 }, | |
7e48b30a JW |
2440 | { USB_DEVICE(0x1b80, 0xa340), |
2441 | .driver_info = EM2870_BOARD_KWORLD_A340 }, | |
6dbea9f0 JFT |
2442 | { USB_DEVICE(0x1b80, 0xe346), |
2443 | .driver_info = EM2874_BOARD_KWORLD_UB435Q_V2 }, | |
02bc1f55 MCC |
2444 | { USB_DEVICE(0x1b80, 0xe34c), |
2445 | .driver_info = EM2874_BOARD_KWORLD_UB435Q_V3 }, | |
d6a5f921 AP |
2446 | { USB_DEVICE(0x2013, 0x024f), |
2447 | .driver_info = EM28174_BOARD_PCTV_290E }, | |
36588715 AP |
2448 | { USB_DEVICE(0x2013, 0x024c), |
2449 | .driver_info = EM28174_BOARD_PCTV_460E }, | |
82e7dbbd EDP |
2450 | { USB_DEVICE(0x2040, 0x1605), |
2451 | .driver_info = EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C }, | |
4159d01b MCC |
2452 | { USB_DEVICE(0x1b80, 0xe755), |
2453 | .driver_info = EM2884_BOARD_C3TECH_DIGITAL_DUO }, | |
4d28d3d9 GW |
2454 | { USB_DEVICE(0xeb1a, 0x5006), |
2455 | .driver_info = EM2860_BOARD_HT_VIDBOX_NW03 }, | |
2f78604a MC |
2456 | { USB_DEVICE(0x1b80, 0xe309), /* Sveon STV40 */ |
2457 | .driver_info = EM2860_BOARD_EASYCAP }, | |
3553085c AP |
2458 | { USB_DEVICE(0x1b80, 0xe425), |
2459 | .driver_info = EM2874_BOARD_MAXMEDIA_UB425_TC }, | |
fa5527cd IK |
2460 | { USB_DEVICE(0x2304, 0x0242), |
2461 | .driver_info = EM2884_BOARD_PCTV_510E }, | |
c247d7b1 AP |
2462 | { USB_DEVICE(0x2013, 0x0251), |
2463 | .driver_info = EM2884_BOARD_PCTV_520E }, | |
7c1dfdb0 JH |
2464 | { USB_DEVICE(0x1b80, 0xe1cc), |
2465 | .driver_info = EM2874_BOARD_DELOCK_61959 }, | |
0c37e736 FS |
2466 | { USB_DEVICE(0x1ae7, 0x9003), |
2467 | .driver_info = EM2765_BOARD_SPEEDLINK_VAD_LAPLACE }, | |
2468 | { USB_DEVICE(0x1ae7, 0x9004), | |
2469 | .driver_info = EM2765_BOARD_SPEEDLINK_VAD_LAPLACE }, | |
ec573362 AP |
2470 | { USB_DEVICE(0x2013, 0x0258), |
2471 | .driver_info = EM28178_BOARD_PCTV_461E }, | |
19229240 AP |
2472 | { USB_DEVICE(0x2013, 0x025f), |
2473 | .driver_info = EM28178_BOARD_PCTV_292E }, | |
eace9721 WK |
2474 | { USB_DEVICE(0x0413, 0x6f07), |
2475 | .driver_info = EM2861_BOARD_LEADTEK_VC100 }, | |
fc30dd76 OS |
2476 | { USB_DEVICE(0xeb1a, 0x8179), |
2477 | .driver_info = EM28178_BOARD_TERRATEC_T2_STICK_HD }, | |
a6c2ba28 | 2478 | { }, |
2479 | }; | |
c23f5949 | 2480 | MODULE_DEVICE_TABLE(usb, em28xx_id_table); |
03910cc3 | 2481 | |
102a0b08 MCC |
2482 | /* |
2483 | * EEPROM hash table for devices with generic USB IDs | |
2484 | */ | |
a1a6ee74 | 2485 | static struct em28xx_hash_table em28xx_eeprom_hash[] = { |
ea4fd567 | 2486 | /* P/N: SA 60002070465 Tuner: TVF7533-MF */ |
c23f5949 | 2487 | {0x6ce05a8f, EM2820_BOARD_PROLINK_PLAYTV_USB2, TUNER_YMEC_TVF_5533MF}, |
1e1addd5 | 2488 | {0x72cc5a8b, EM2820_BOARD_PROLINK_PLAYTV_BOX4_USB2, TUNER_YMEC_TVF_5533MF}, |
da3808e1 | 2489 | {0x966a0441, EM2880_BOARD_KWORLD_DVB_310U, TUNER_XC2028}, |
a35c87c7 | 2490 | {0x166a0441, EM2880_BOARD_EMPIRE_DUAL_TV, TUNER_XC2028}, |
19859229 | 2491 | {0xcee44a99, EM2882_BOARD_EVGA_INDTUBE, TUNER_XC2028}, |
d5b3ba9c | 2492 | {0xb8846b20, EM2881_BOARD_PINNACLE_HYBRID_PRO, TUNER_XC2028}, |
285eb1a4 | 2493 | {0x63f653bd, EM2870_BOARD_REDDO_DVB_C_USB_BOX, TUNER_ABSENT}, |
7ca7ef60 | 2494 | {0x4e913442, EM2882_BOARD_DIKOM_DK300, TUNER_XC2028}, |
03910cc3 | 2495 | }; |
a6c2ba28 | 2496 | |
d2ba055d | 2497 | /* I2C devicelist hash table for devices with generic USB IDs */ |
fad7b958 | 2498 | static struct em28xx_hash_table em28xx_i2c_hash[] = { |
c23f5949 MCC |
2499 | {0xb06a32c3, EM2800_BOARD_TERRATEC_CINERGY_200, TUNER_LG_PAL_NEW_TAPC}, |
2500 | {0xf51200e3, EM2800_BOARD_VGEAR_POCKETTV, TUNER_LG_PAL_NEW_TAPC}, | |
3ed58baf | 2501 | {0x1ba50080, EM2860_BOARD_SAA711X_REFERENCE_DESIGN, TUNER_ABSENT}, |
443fed9f | 2502 | {0x77800080, EM2860_BOARD_TVP5150_REFERENCE_DESIGN, TUNER_ABSENT}, |
f7fe3e6f | 2503 | {0xc51200e3, EM2820_BOARD_GADMEI_TVR200, TUNER_LG_PAL_NEW_TAPC}, |
6d888a66 | 2504 | {0x4ba50080, EM2861_BOARD_GADMEI_UTV330PLUS, TUNER_TNF_5335MF}, |
ebaefdb7 | 2505 | {0x6b800080, EM2874_BOARD_LEADERSHIP_ISDBT, TUNER_ABSENT}, |
fad7b958 | 2506 | }; |
fdf1bc9f | 2507 | |
87b52439 | 2508 | /* NOTE: introduce a separate hash table for devices with 16 bit eeproms */ |
fad7b958 | 2509 | |
d7cba043 | 2510 | int em28xx_tuner_callback(void *ptr, int component, int command, int arg) |
ee6e3a86 | 2511 | { |
bc3d2928 HV |
2512 | struct em28xx_i2c_bus *i2c_bus = ptr; |
2513 | struct em28xx *dev = i2c_bus->dev; | |
102a0b08 | 2514 | int rc = 0; |
ee6e3a86 | 2515 | |
82e7dbbd | 2516 | if (dev->tuner_type != TUNER_XC2028 && dev->tuner_type != TUNER_XC5000) |
ee6e3a86 MCC |
2517 | return 0; |
2518 | ||
82e7dbbd | 2519 | if (command != XC2028_TUNER_RESET && command != XC5000_TUNER_RESET) |
ee6e3a86 MCC |
2520 | return 0; |
2521 | ||
017ab4b1 | 2522 | rc = em28xx_gpio_set(dev, dev->board.tuner_gpio); |
ee6e3a86 | 2523 | |
ee6e3a86 MCC |
2524 | return rc; |
2525 | } | |
2526 | EXPORT_SYMBOL_GPL(em28xx_tuner_callback); | |
2527 | ||
a1a6ee74 | 2528 | static inline void em28xx_set_model(struct em28xx *dev) |
ee6e3a86 | 2529 | { |
e0f6e4d6 | 2530 | dev->board = em28xx_boards[dev->model]; |
ed14e1c2 DH |
2531 | |
2532 | /* Those are the default values for the majority of boards | |
2533 | Use those values if not specified otherwise at boards entry | |
2534 | */ | |
2535 | if (!dev->board.xclk) | |
2536 | dev->board.xclk = EM28XX_XCLK_IR_RC5_MODE | | |
2537 | EM28XX_XCLK_FREQUENCY_12MHZ; | |
2538 | ||
2539 | if (!dev->board.i2c_speed) | |
2540 | dev->board.i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | | |
2541 | EM28XX_I2C_FREQ_100_KHZ; | |
3aa2b3b9 | 2542 | |
aab3125c MCC |
2543 | /* Should be initialized early, for I2C to work */ |
2544 | dev->def_i2c_bus = dev->board.def_i2c_bus; | |
ee6e3a86 MCC |
2545 | } |
2546 | ||
03910cc3 MCC |
2547 | /* Since em28xx_pre_card_setup() requires a proper dev->model, |
2548 | * this won't work for boards with generic PCI IDs | |
2549 | */ | |
60332f03 | 2550 | static void em28xx_pre_card_setup(struct em28xx *dev) |
a94e95b4 | 2551 | { |
ed14e1c2 DH |
2552 | /* Set the initial XCLK and I2C clock values based on the board |
2553 | definition */ | |
505b6d0b | 2554 | em28xx_write_reg(dev, EM28XX_R0F_XCLK, dev->board.xclk & 0x7f); |
ca80cf60 SS |
2555 | if (!dev->board.is_em2800) |
2556 | em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, dev->board.i2c_speed); | |
a2070c66 MCC |
2557 | msleep(50); |
2558 | ||
a94e95b4 | 2559 | /* request some modules */ |
c23f5949 | 2560 | switch (dev->model) { |
95b86a9a | 2561 | case EM2861_BOARD_PLEXTOR_PX_TV100U: |
0a6e44d1 MCC |
2562 | /* Sets the msp34xx I2S speed */ |
2563 | dev->i2s_speed = 2048000; | |
95b86a9a | 2564 | break; |
95b86a9a DSL |
2565 | case EM2861_BOARD_KWORLD_PVRTV_300U: |
2566 | case EM2880_BOARD_KWORLD_DVB_305U: | |
c074fc4c | 2567 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0x6d); |
95b86a9a | 2568 | msleep(10); |
c074fc4c | 2569 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0x7d); |
95b86a9a DSL |
2570 | msleep(10); |
2571 | break; | |
95b86a9a | 2572 | case EM2870_BOARD_COMPRO_VIDEOMATE: |
95b86a9a DSL |
2573 | /* TODO: someone can do some cleanup here... |
2574 | not everything's needed */ | |
6d676d8a | 2575 | em28xx_write_reg(dev, EM2880_R04_GPO, 0x00); |
95b86a9a | 2576 | msleep(10); |
6d676d8a | 2577 | em28xx_write_reg(dev, EM2880_R04_GPO, 0x01); |
95b86a9a | 2578 | msleep(10); |
c074fc4c | 2579 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfd); |
95b86a9a | 2580 | mdelay(70); |
c074fc4c | 2581 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfc); |
95b86a9a | 2582 | mdelay(70); |
c074fc4c | 2583 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xdc); |
95b86a9a | 2584 | mdelay(70); |
c074fc4c | 2585 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfc); |
95b86a9a DSL |
2586 | mdelay(70); |
2587 | break; | |
95b86a9a | 2588 | case EM2870_BOARD_TERRATEC_XS_MT2060: |
95b86a9a DSL |
2589 | /* this device needs some gpio writes to get the DVB-T |
2590 | demod work */ | |
c074fc4c | 2591 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfe); |
95b86a9a | 2592 | mdelay(70); |
c074fc4c | 2593 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xde); |
95b86a9a | 2594 | mdelay(70); |
c074fc4c | 2595 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfe); |
95b86a9a DSL |
2596 | mdelay(70); |
2597 | break; | |
95b86a9a | 2598 | case EM2870_BOARD_PINNACLE_PCTV_DVB: |
95b86a9a DSL |
2599 | /* this device needs some gpio writes to get the |
2600 | DVB-T demod work */ | |
c074fc4c | 2601 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfe); |
95b86a9a | 2602 | mdelay(70); |
c074fc4c | 2603 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xde); |
95b86a9a | 2604 | mdelay(70); |
c074fc4c | 2605 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfe); |
95b86a9a | 2606 | mdelay(70); |
95b86a9a | 2607 | break; |
95b86a9a | 2608 | case EM2820_BOARD_GADMEI_UTV310: |
95b86a9a | 2609 | case EM2820_BOARD_MSI_VOX_USB_2: |
a2070c66 | 2610 | /* enables audio for that devices */ |
c074fc4c | 2611 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfd); |
102a0b08 | 2612 | break; |
0bf4f6ce | 2613 | |
d7de5d8f | 2614 | case EM2882_BOARD_KWORLD_ATSC_315U: |
c074fc4c | 2615 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xff); |
d7de5d8f | 2616 | msleep(10); |
c074fc4c | 2617 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfe); |
d7de5d8f FM |
2618 | msleep(10); |
2619 | em28xx_write_reg(dev, EM2880_R04_GPO, 0x00); | |
2620 | msleep(10); | |
2621 | em28xx_write_reg(dev, EM2880_R04_GPO, 0x08); | |
2622 | msleep(10); | |
2623 | break; | |
2624 | ||
0bf4f6ce MCC |
2625 | case EM2860_BOARD_KAIOMY_TVNPC_U2: |
2626 | em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x07", 1); | |
2627 | em28xx_write_regs(dev, EM28XX_R06_I2C_CLK, "\x40", 1); | |
2628 | em28xx_write_regs(dev, 0x0d, "\x42", 1); | |
2629 | em28xx_write_regs(dev, 0x08, "\xfd", 1); | |
2630 | msleep(10); | |
2631 | em28xx_write_regs(dev, 0x08, "\xff", 1); | |
2632 | msleep(10); | |
2633 | em28xx_write_regs(dev, 0x08, "\x7f", 1); | |
2634 | msleep(10); | |
2635 | em28xx_write_regs(dev, 0x08, "\x6b", 1); | |
2636 | ||
2637 | break; | |
56ee3807 MCC |
2638 | case EM2860_BOARD_EASYCAP: |
2639 | em28xx_write_regs(dev, 0x08, "\xf8", 1); | |
2640 | break; | |
2641 | ||
f74a61e3 | 2642 | case EM2820_BOARD_IODATA_GVMVP_SZ: |
c074fc4c | 2643 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xff); |
f74a61e3 | 2644 | msleep(70); |
c074fc4c | 2645 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xf7); |
f74a61e3 | 2646 | msleep(10); |
c074fc4c | 2647 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfe); |
f74a61e3 | 2648 | msleep(70); |
c074fc4c | 2649 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfd); |
f74a61e3 IK |
2650 | msleep(70); |
2651 | break; | |
102a0b08 | 2652 | } |
c67ec53f | 2653 | |
017ab4b1 | 2654 | em28xx_gpio_set(dev, dev->board.tuner_gpio); |
c67ec53f MCC |
2655 | em28xx_set_mode(dev, EM28XX_ANALOG_MODE); |
2656 | ||
2657 | /* Unlock device */ | |
2fe3e2ee | 2658 | em28xx_set_mode(dev, EM28XX_SUSPEND); |
a94e95b4 MR |
2659 | } |
2660 | ||
03910cc3 MCC |
2661 | static int em28xx_hint_board(struct em28xx *dev) |
2662 | { | |
2663 | int i; | |
882876bf | 2664 | |
2d466e11 FS |
2665 | if (dev->board.is_webcam) { |
2666 | if (dev->em28xx_sensor == EM28XX_MT9V011) { | |
2667 | dev->model = EM2820_BOARD_SILVERCREST_WEBCAM; | |
2668 | } else if (dev->em28xx_sensor == EM28XX_MT9M001 || | |
2669 | dev->em28xx_sensor == EM28XX_MT9M111) { | |
2670 | dev->model = EM2750_BOARD_UNKNOWN; | |
2671 | } | |
2672 | /* FIXME: IMPROVE ! */ | |
2673 | ||
2674 | return 0; | |
2675 | } | |
2676 | ||
d2ba055d MCC |
2677 | /* HINT method: EEPROM |
2678 | * | |
2679 | * This method works only for boards with eeprom. | |
2680 | * Uses a hash of all eeprom bytes. The hash should be | |
2681 | * unique for a vendor/tuner pair. | |
2682 | * There are a high chance that tuners for different | |
2683 | * video standards produce different hashes. | |
2684 | */ | |
2685 | for (i = 0; i < ARRAY_SIZE(em28xx_eeprom_hash); i++) { | |
2686 | if (dev->hash == em28xx_eeprom_hash[i].hash) { | |
2687 | dev->model = em28xx_eeprom_hash[i].model; | |
2688 | dev->tuner_type = em28xx_eeprom_hash[i].tuner; | |
882876bf | 2689 | |
03910cc3 MCC |
2690 | em28xx_errdev("Your board has no unique USB ID.\n"); |
2691 | em28xx_errdev("A hint were successfully done, " | |
2692 | "based on eeprom hash.\n"); | |
2693 | em28xx_errdev("This method is not 100%% failproof.\n"); | |
2694 | em28xx_errdev("If the board were missdetected, " | |
2695 | "please email this log to:\n"); | |
2696 | em28xx_errdev("\tV4L Mailing List " | |
51caf91f | 2697 | " <linux-media@vger.kernel.org>\n"); |
03910cc3 MCC |
2698 | em28xx_errdev("Board detected as %s\n", |
2699 | em28xx_boards[dev->model].name); | |
882876bf | 2700 | |
03910cc3 MCC |
2701 | return 0; |
2702 | } | |
2703 | } | |
fad7b958 | 2704 | |
d2ba055d MCC |
2705 | /* HINT method: I2C attached devices |
2706 | * | |
2707 | * This method works for all boards. | |
2708 | * Uses a hash of i2c scanned devices. | |
2709 | * Devices with the same i2c attached chips will | |
2710 | * be considered equal. | |
2711 | * This method is less precise than the eeprom one. | |
2712 | */ | |
2713 | ||
fad7b958 SS |
2714 | /* user did not request i2c scanning => do it now */ |
2715 | if (!dev->i2c_hash) | |
aab3125c | 2716 | em28xx_do_i2c_scan(dev, dev->def_i2c_bus); |
fad7b958 SS |
2717 | |
2718 | for (i = 0; i < ARRAY_SIZE(em28xx_i2c_hash); i++) { | |
2719 | if (dev->i2c_hash == em28xx_i2c_hash[i].hash) { | |
2720 | dev->model = em28xx_i2c_hash[i].model; | |
2721 | dev->tuner_type = em28xx_i2c_hash[i].tuner; | |
2722 | em28xx_errdev("Your board has no unique USB ID.\n"); | |
2723 | em28xx_errdev("A hint were successfully done, " | |
2724 | "based on i2c devicelist hash.\n"); | |
2725 | em28xx_errdev("This method is not 100%% failproof.\n"); | |
2726 | em28xx_errdev("If the board were missdetected, " | |
2727 | "please email this log to:\n"); | |
2728 | em28xx_errdev("\tV4L Mailing List " | |
51caf91f | 2729 | " <linux-media@vger.kernel.org>\n"); |
fad7b958 SS |
2730 | em28xx_errdev("Board detected as %s\n", |
2731 | em28xx_boards[dev->model].name); | |
2732 | ||
2733 | return 0; | |
2734 | } | |
2735 | } | |
2736 | ||
03910cc3 MCC |
2737 | em28xx_errdev("Your board has no unique USB ID and thus need a " |
2738 | "hint to be detected.\n"); | |
2739 | em28xx_errdev("You may try to use card=<n> insmod option to " | |
2740 | "workaround that.\n"); | |
2741 | em28xx_errdev("Please send an email with this log to:\n"); | |
51caf91f | 2742 | em28xx_errdev("\tV4L Mailing List <linux-media@vger.kernel.org>\n"); |
03910cc3 | 2743 | em28xx_errdev("Board eeprom hash is 0x%08lx\n", dev->hash); |
fad7b958 | 2744 | em28xx_errdev("Board i2c devicelist hash is 0x%08lx\n", dev->i2c_hash); |
03910cc3 MCC |
2745 | |
2746 | em28xx_errdev("Here is a list of valid choices for the card=<n>" | |
2747 | " insmod option:\n"); | |
2748 | for (i = 0; i < em28xx_bcount; i++) { | |
2749 | em28xx_errdev(" card=%d -> %s\n", | |
fdf1bc9f | 2750 | i, em28xx_boards[i].name); |
03910cc3 MCC |
2751 | } |
2752 | return -1; | |
882876bf MCC |
2753 | } |
2754 | ||
60332f03 | 2755 | static void em28xx_card_setup(struct em28xx *dev) |
a6c2ba28 | 2756 | { |
3d3215c4 MCC |
2757 | /* |
2758 | * If the device can be a webcam, seek for a sensor. | |
2759 | * If sensor is not found, then it isn't a webcam. | |
2760 | */ | |
2761 | if (dev->board.is_webcam) { | |
b3944c8f | 2762 | if (em28xx_detect_sensor(dev) < 0) |
3d3215c4 | 2763 | dev->board.is_webcam = 0; |
ca3dfd6a MCC |
2764 | } |
2765 | ||
2d466e11 FS |
2766 | switch (dev->model) { |
2767 | case EM2750_BOARD_UNKNOWN: | |
2768 | case EM2820_BOARD_UNKNOWN: | |
2769 | case EM2800_BOARD_UNKNOWN: | |
ca3dfd6a MCC |
2770 | /* |
2771 | * The K-WORLD DVB-T 310U is detected as an MSI Digivox AD. | |
2772 | * | |
2773 | * This occurs because they share identical USB vendor and | |
2774 | * product IDs. | |
2775 | * | |
2776 | * What we do here is look up the EEPROM hash of the K-WORLD | |
2777 | * and if it is found then we decide that we do not have | |
2778 | * a DIGIVOX and reset the device to the K-WORLD instead. | |
2779 | * | |
2780 | * This solution is only valid if they do not share eeprom | |
2781 | * hash identities which has not been determined as yet. | |
2782 | */ | |
2783 | if (em28xx_hint_board(dev) < 0) | |
2784 | em28xx_errdev("Board not discovered\n"); | |
2785 | else { | |
2786 | em28xx_set_model(dev); | |
2787 | em28xx_pre_card_setup(dev); | |
2788 | } | |
2789 | break; | |
2d466e11 FS |
2790 | default: |
2791 | em28xx_set_model(dev); | |
ca3dfd6a | 2792 | } |
3d3215c4 MCC |
2793 | |
2794 | em28xx_info("Identified as %s (card=%d)\n", | |
2795 | dev->board.name, dev->model); | |
f8b6030c MCC |
2796 | |
2797 | dev->tuner_type = em28xx_boards[dev->model].tuner_type; | |
2798 | ||
a6c2ba28 | 2799 | /* request some modules */ |
03910cc3 MCC |
2800 | switch (dev->model) { |
2801 | case EM2820_BOARD_HAUPPAUGE_WINTV_USB_2: | |
98ae127c | 2802 | case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900: |
17d9d558 | 2803 | case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2: |
f89bc329 | 2804 | case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850: |
10ac6603 | 2805 | case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950: |
a6166018 | 2806 | case EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C: |
03910cc3 MCC |
2807 | { |
2808 | struct tveeprom tv; | |
a217968f FS |
2809 | |
2810 | if (dev->eedata == NULL) | |
2811 | break; | |
ac07bb73 | 2812 | #if defined(CONFIG_MODULES) && defined(MODULE) |
03910cc3 | 2813 | request_module("tveeprom"); |
a6c2ba28 | 2814 | #endif |
03910cc3 MCC |
2815 | /* Call first TVeeprom */ |
2816 | ||
c7a45e5b MCC |
2817 | dev->i2c_client[dev->def_i2c_bus].addr = 0xa0 >> 1; |
2818 | tveeprom_hauppauge_analog(&dev->i2c_client[dev->def_i2c_bus], &tv, dev->eedata); | |
4d17d083 | 2819 | |
03910cc3 | 2820 | dev->tuner_type = tv.tuner_type; |
ed086314 | 2821 | |
33001010 | 2822 | if (tv.audio_processor == TVEEPROM_AUDPROC_MSP) { |
03910cc3 | 2823 | dev->i2s_speed = 2048000; |
505b6d0b | 2824 | dev->board.has_msp34xx = 1; |
03910cc3 MCC |
2825 | } |
2826 | break; | |
a6c2ba28 | 2827 | } |
d7de5d8f FM |
2828 | case EM2882_BOARD_KWORLD_ATSC_315U: |
2829 | em28xx_write_reg(dev, 0x0d, 0x42); | |
2830 | msleep(10); | |
c074fc4c | 2831 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfd); |
d7de5d8f FM |
2832 | msleep(10); |
2833 | break; | |
03910cc3 MCC |
2834 | case EM2820_BOARD_KWORLD_PVRTV2800RF: |
2835 | /* GPIO enables sound on KWORLD PVR TV 2800RF */ | |
c074fc4c | 2836 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xf9); |
03910cc3 MCC |
2837 | break; |
2838 | case EM2820_BOARD_UNKNOWN: | |
2839 | case EM2800_BOARD_UNKNOWN: | |
da3808e1 DB |
2840 | /* |
2841 | * The K-WORLD DVB-T 310U is detected as an MSI Digivox AD. | |
2842 | * | |
2843 | * This occurs because they share identical USB vendor and | |
2844 | * product IDs. | |
2845 | * | |
2846 | * What we do here is look up the EEPROM hash of the K-WORLD | |
2847 | * and if it is found then we decide that we do not have | |
2848 | * a DIGIVOX and reset the device to the K-WORLD instead. | |
2849 | * | |
2850 | * This solution is only valid if they do not share eeprom | |
2851 | * hash identities which has not been determined as yet. | |
2852 | */ | |
2853 | case EM2880_BOARD_MSI_DIGIVOX_AD: | |
f8b6030c MCC |
2854 | if (!em28xx_hint_board(dev)) |
2855 | em28xx_set_model(dev); | |
cdf7bfa8 DH |
2856 | |
2857 | /* In cases where we had to use a board hint, the call to | |
7ca7ef60 AA |
2858 | em28xx_set_mode() in em28xx_pre_card_setup() was a no-op, |
2859 | so make the call now so the analog GPIOs are set properly | |
2860 | before probing the i2c bus. */ | |
2861 | em28xx_gpio_set(dev, dev->board.tuner_gpio); | |
2862 | em28xx_set_mode(dev, EM28XX_ANALOG_MODE); | |
2863 | break; | |
2864 | ||
a217968f | 2865 | /* |
7ca7ef60 AA |
2866 | * The Dikom DK300 is detected as an Kworld VS-DVB-T 323UR. |
2867 | * | |
2868 | * This occurs because they share identical USB vendor and | |
2869 | * product IDs. | |
2870 | * | |
2871 | * What we do here is look up the EEPROM hash of the Dikom | |
2872 | * and if it is found then we decide that we do not have | |
2873 | * a Kworld and reset the device to the Dikom instead. | |
2874 | * | |
2875 | * This solution is only valid if they do not share eeprom | |
2876 | * hash identities which has not been determined as yet. | |
2877 | */ | |
2878 | case EM2882_BOARD_KWORLD_VS_DVBT: | |
2879 | if (!em28xx_hint_board(dev)) | |
2880 | em28xx_set_model(dev); | |
2881 | ||
2882 | /* In cases where we had to use a board hint, the call to | |
cdf7bfa8 DH |
2883 | em28xx_set_mode() in em28xx_pre_card_setup() was a no-op, |
2884 | so make the call now so the analog GPIOs are set properly | |
2885 | before probing the i2c bus. */ | |
5343e446 | 2886 | em28xx_gpio_set(dev, dev->board.tuner_gpio); |
cdf7bfa8 | 2887 | em28xx_set_mode(dev, EM28XX_ANALOG_MODE); |
95b86a9a | 2888 | break; |
03910cc3 MCC |
2889 | } |
2890 | ||
505b6d0b | 2891 | if (dev->board.valid == EM28XX_BOARD_NOT_VALIDATED) { |
95b86a9a DSL |
2892 | em28xx_errdev("\n\n"); |
2893 | em28xx_errdev("The support for this board weren't " | |
2894 | "valid yet.\n"); | |
2895 | em28xx_errdev("Please send a report of having this working\n"); | |
2896 | em28xx_errdev("not to V4L mailing list (and/or to other " | |
2897 | "addresses)\n\n"); | |
2898 | } | |
2899 | ||
a217968f FS |
2900 | /* Free eeprom data memory */ |
2901 | kfree(dev->eedata); | |
2902 | dev->eedata = NULL; | |
2903 | ||
f8b6030c | 2904 | /* Allow override tuner type by a module parameter */ |
03910cc3 MCC |
2905 | if (tuner >= 0) |
2906 | dev->tuner_type = tuner; | |
a6c2ba28 | 2907 | } |
c8644057 | 2908 | |
ee97207c MCC |
2909 | void em28xx_setup_xc3028(struct em28xx *dev, struct xc2028_ctrl *ctl) |
2910 | { | |
2911 | memset(ctl, 0, sizeof(*ctl)); | |
2912 | ||
2913 | ctl->fname = XC2028_DEFAULT_FIRMWARE; | |
2914 | ctl->max_len = 64; | |
2915 | ctl->mts = em28xx_boards[dev->model].mts_firmware; | |
2916 | ||
2917 | switch (dev->model) { | |
2918 | case EM2880_BOARD_EMPIRE_DUAL_TV: | |
2919 | case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900: | |
2920 | case EM2882_BOARD_TERRATEC_HYBRID_XS: | |
2921 | ctl->demod = XC3028_FE_ZARLINK456; | |
2922 | break; | |
2923 | case EM2880_BOARD_TERRATEC_HYBRID_XS: | |
2924 | case EM2880_BOARD_TERRATEC_HYBRID_XS_FR: | |
2925 | case EM2881_BOARD_PINNACLE_HYBRID_PRO: | |
2926 | ctl->demod = XC3028_FE_ZARLINK456; | |
2927 | break; | |
2928 | case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2: | |
2929 | case EM2882_BOARD_PINNACLE_HYBRID_PRO_330E: | |
2930 | ctl->demod = XC3028_FE_DEFAULT; | |
2931 | break; | |
2932 | case EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600: | |
2933 | ctl->demod = XC3028_FE_DEFAULT; | |
2934 | ctl->fname = XC3028L_DEFAULT_FIRMWARE; | |
2935 | break; | |
2936 | case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850: | |
2937 | case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950: | |
2938 | case EM2880_BOARD_PINNACLE_PCTV_HD_PRO: | |
2939 | /* FIXME: Better to specify the needed IF */ | |
2940 | ctl->demod = XC3028_FE_DEFAULT; | |
2941 | break; | |
2942 | case EM2883_BOARD_KWORLD_HYBRID_330U: | |
2943 | case EM2882_BOARD_DIKOM_DK300: | |
2944 | case EM2882_BOARD_KWORLD_VS_DVBT: | |
2945 | ctl->demod = XC3028_FE_CHINA; | |
2946 | ctl->fname = XC2028_DEFAULT_FIRMWARE; | |
2947 | break; | |
2948 | case EM2882_BOARD_EVGA_INDTUBE: | |
2949 | ctl->demod = XC3028_FE_CHINA; | |
2950 | ctl->fname = XC3028L_DEFAULT_FIRMWARE; | |
2951 | break; | |
2952 | default: | |
2953 | ctl->demod = XC3028_FE_OREN538; | |
2954 | } | |
2955 | } | |
2956 | EXPORT_SYMBOL_GPL(em28xx_setup_xc3028); | |
2957 | ||
1a23f81b MCC |
2958 | static void request_module_async(struct work_struct *work) |
2959 | { | |
2960 | struct em28xx *dev = container_of(work, | |
2961 | struct em28xx, request_module_wk); | |
2962 | ||
6ae5e060 MCC |
2963 | /* |
2964 | * The em28xx extensions can be modules or builtin. If the | |
2965 | * modules are already loaded or are built in, those extensions | |
2966 | * can be initialised right now. Otherwise, the module init | |
2967 | * code will do it. | |
2968 | */ | |
e63fa180 MCC |
2969 | |
2970 | /* | |
2971 | * Devicdes with an audio-only interface also have a V4L/DVB/RC | |
2972 | * interface. Don't register extensions twice on those devices. | |
2973 | */ | |
2974 | if (dev->is_audio_only) { | |
2975 | #if defined(CONFIG_MODULES) && defined(MODULE) | |
2976 | request_module("em28xx-alsa"); | |
2977 | #endif | |
2978 | return; | |
2979 | } | |
2980 | ||
6ae5e060 MCC |
2981 | em28xx_init_extension(dev); |
2982 | ||
2983 | #if defined(CONFIG_MODULES) && defined(MODULE) | |
01c28193 MCC |
2984 | if (dev->has_video) |
2985 | request_module("em28xx-v4l"); | |
c5874208 | 2986 | if (dev->usb_audio_type == EM28XX_USB_AUDIO_CLASS) |
1a23f81b | 2987 | request_module("snd-usb-audio"); |
c5874208 | 2988 | else if (dev->usb_audio_type == EM28XX_USB_AUDIO_VENDOR) |
1a23f81b | 2989 | request_module("em28xx-alsa"); |
1a23f81b MCC |
2990 | if (dev->board.has_dvb) |
2991 | request_module("em28xx-dvb"); | |
f5222609 | 2992 | if (dev->board.buttons || |
2b64cbd1 | 2993 | ((dev->board.ir_codes || dev->board.has_ir_i2c) && !disable_ir)) |
f4d4e765 | 2994 | request_module("em28xx-rc"); |
6ae5e060 | 2995 | #endif /* CONFIG_MODULES */ |
1a23f81b MCC |
2996 | } |
2997 | ||
2998 | static void request_modules(struct em28xx *dev) | |
2999 | { | |
3000 | INIT_WORK(&dev->request_module_wk, request_module_async); | |
3001 | schedule_work(&dev->request_module_wk); | |
3002 | } | |
707bcf32 TH |
3003 | |
3004 | static void flush_request_modules(struct em28xx *dev) | |
3005 | { | |
43829731 | 3006 | flush_work(&dev->request_module_wk); |
707bcf32 | 3007 | } |
1a23f81b MCC |
3008 | |
3009 | /* | |
d7222e7d | 3010 | * em28xx_release_resources() |
1a23f81b | 3011 | * unregisters the v4l2,i2c and usb devices |
d7222e7d | 3012 | * called when the device gets disconnected or at module unload |
1a23f81b | 3013 | */ |
47677e51 | 3014 | static void em28xx_release_resources(struct em28xx *dev) |
1a23f81b | 3015 | { |
1a23f81b MCC |
3016 | /*FIXME: I2C IR should be disconnected */ |
3017 | ||
5a620c7c FS |
3018 | mutex_lock(&dev->lock); |
3019 | ||
aab3125c MCC |
3020 | if (dev->def_i2c_bus) |
3021 | em28xx_i2c_unregister(dev, 1); | |
3022 | em28xx_i2c_unregister(dev, 0); | |
f2cf250a | 3023 | |
1a23f81b MCC |
3024 | usb_put_dev(dev->udev); |
3025 | ||
3026 | /* Mark device as unused */ | |
c3aed262 | 3027 | clear_bit(dev->devno, em28xx_devused); |
5a620c7c FS |
3028 | |
3029 | mutex_unlock(&dev->lock); | |
1a23f81b | 3030 | }; |
47677e51 MCC |
3031 | |
3032 | /** | |
3033 | * em28xx_free_device() - Free em28xx device | |
3034 | * | |
3035 | * @ref: struct kref for em28xx device | |
3036 | * | |
3037 | * This is called when all extensions and em28xx core unregisters a device | |
3038 | */ | |
3039 | void em28xx_free_device(struct kref *ref) | |
3040 | { | |
3041 | struct em28xx *dev = kref_to_dev(ref); | |
3042 | ||
3043 | em28xx_info("Freeing device\n"); | |
3044 | ||
3045 | if (!dev->disconnected) | |
3046 | em28xx_release_resources(dev); | |
3047 | ||
3048 | kfree(dev->alt_max_pkt_size_isoc); | |
3049 | kfree(dev); | |
3050 | } | |
3051 | EXPORT_SYMBOL_GPL(em28xx_free_device); | |
1a23f81b MCC |
3052 | |
3053 | /* | |
3054 | * em28xx_init_dev() | |
3055 | * allocates and inits the device structs, registers i2c bus and v4l device | |
3056 | */ | |
622c2fc1 | 3057 | static int em28xx_init_dev(struct em28xx *dev, struct usb_device *udev, |
36fa674e | 3058 | struct usb_interface *interface, |
1a23f81b MCC |
3059 | int minor) |
3060 | { | |
fcd20e3c | 3061 | int retval; |
a3efa1cc MCC |
3062 | static const char *default_chip_name = "em28xx"; |
3063 | const char *chip_name = default_chip_name; | |
1a23f81b MCC |
3064 | |
3065 | dev->udev = udev; | |
3066 | mutex_init(&dev->ctrl_urb_lock); | |
3067 | spin_lock_init(&dev->slock); | |
1a23f81b MCC |
3068 | |
3069 | dev->em28xx_write_regs = em28xx_write_regs; | |
3070 | dev->em28xx_read_reg = em28xx_read_reg; | |
3071 | dev->em28xx_read_reg_req_len = em28xx_read_reg_req_len; | |
3072 | dev->em28xx_write_regs_req = em28xx_write_regs_req; | |
3073 | dev->em28xx_read_reg_req = em28xx_read_reg_req; | |
3074 | dev->board.is_em2800 = em28xx_boards[dev->model].is_em2800; | |
3075 | ||
fcd20e3c MCC |
3076 | em28xx_set_model(dev); |
3077 | ||
fcd20e3c MCC |
3078 | dev->wait_after_write = 5; |
3079 | ||
3080 | /* Based on the Chip ID, set the device configuration */ | |
3081 | retval = em28xx_read_reg(dev, EM28XX_R0A_CHIPID); | |
3082 | if (retval > 0) { | |
3083 | dev->chip_id = retval; | |
3084 | ||
3085 | switch (dev->chip_id) { | |
f57b17c3 | 3086 | case CHIP_ID_EM2800: |
a3efa1cc | 3087 | chip_name = "em2800"; |
f57b17c3 | 3088 | break; |
fcd20e3c | 3089 | case CHIP_ID_EM2710: |
a3efa1cc | 3090 | chip_name = "em2710"; |
fcd20e3c MCC |
3091 | break; |
3092 | case CHIP_ID_EM2750: | |
a3efa1cc | 3093 | chip_name = "em2750"; |
fcd20e3c | 3094 | break; |
736a320b FS |
3095 | case CHIP_ID_EM2765: |
3096 | chip_name = "em2765"; | |
3097 | dev->wait_after_write = 0; | |
3098 | dev->is_em25xx = 1; | |
3099 | dev->eeprom_addrwidth_16bit = 1; | |
3100 | break; | |
fcd20e3c | 3101 | case CHIP_ID_EM2820: |
a3efa1cc | 3102 | chip_name = "em2710/2820"; |
1552fb34 FS |
3103 | if (le16_to_cpu(dev->udev->descriptor.idVendor) |
3104 | == 0xeb1a) { | |
61ff5d69 | 3105 | __le16 idProd = dev->udev->descriptor.idProduct; |
fdf1bc9f | 3106 | |
61ff5d69 FS |
3107 | if (le16_to_cpu(idProd) == 0x2710) |
3108 | chip_name = "em2710"; | |
3109 | else if (le16_to_cpu(idProd) == 0x2820) | |
3110 | chip_name = "em2820"; | |
3111 | } | |
3112 | /* NOTE: the em2820 is used in webcams, too ! */ | |
fcd20e3c MCC |
3113 | break; |
3114 | case CHIP_ID_EM2840: | |
a3efa1cc | 3115 | chip_name = "em2840"; |
fcd20e3c MCC |
3116 | break; |
3117 | case CHIP_ID_EM2860: | |
a3efa1cc | 3118 | chip_name = "em2860"; |
fcd20e3c MCC |
3119 | break; |
3120 | case CHIP_ID_EM2870: | |
a3efa1cc | 3121 | chip_name = "em2870"; |
fcd20e3c MCC |
3122 | dev->wait_after_write = 0; |
3123 | break; | |
3124 | case CHIP_ID_EM2874: | |
a3efa1cc | 3125 | chip_name = "em2874"; |
fcd20e3c | 3126 | dev->wait_after_write = 0; |
87b52439 | 3127 | dev->eeprom_addrwidth_16bit = 1; |
fcd20e3c | 3128 | break; |
bc022694 | 3129 | case CHIP_ID_EM28174: |
a3efa1cc | 3130 | chip_name = "em28174"; |
bc022694 | 3131 | dev->wait_after_write = 0; |
87b52439 | 3132 | dev->eeprom_addrwidth_16bit = 1; |
bc022694 | 3133 | break; |
9f1d0bda AP |
3134 | case CHIP_ID_EM28178: |
3135 | chip_name = "em28178"; | |
3136 | dev->wait_after_write = 0; | |
3137 | dev->eeprom_addrwidth_16bit = 1; | |
3138 | break; | |
fcd20e3c | 3139 | case CHIP_ID_EM2883: |
a3efa1cc | 3140 | chip_name = "em2882/3"; |
fcd20e3c MCC |
3141 | dev->wait_after_write = 0; |
3142 | break; | |
fec528b7 | 3143 | case CHIP_ID_EM2884: |
a3efa1cc | 3144 | chip_name = "em2884"; |
fec528b7 | 3145 | dev->wait_after_write = 0; |
87b52439 | 3146 | dev->eeprom_addrwidth_16bit = 1; |
fec528b7 | 3147 | break; |
fcd20e3c | 3148 | default: |
a3efa1cc MCC |
3149 | printk(KERN_INFO DRIVER_NAME |
3150 | ": unknown em28xx chip ID (%d)\n", dev->chip_id); | |
fcd20e3c MCC |
3151 | } |
3152 | } | |
3153 | ||
a3efa1cc MCC |
3154 | if (chip_name != default_chip_name) |
3155 | printk(KERN_INFO DRIVER_NAME | |
3156 | ": chip ID is %s\n", chip_name); | |
3157 | ||
3158 | /* | |
3159 | * For em2820/em2710, the name may change latter, after checking | |
3160 | * if the device has a sensor (so, it is em2710) or not. | |
3161 | */ | |
3162 | snprintf(dev->name, sizeof(dev->name), "%s #%d", chip_name, dev->devno); | |
3163 | ||
4f83e7b3 | 3164 | if (dev->is_audio_only) { |
6c03e38b CR |
3165 | retval = em28xx_audio_setup(dev); |
3166 | if (retval) | |
4f83e7b3 | 3167 | return -ENODEV; |
4f83e7b3 MCC |
3168 | em28xx_init_extension(dev); |
3169 | ||
3170 | return 0; | |
3171 | } | |
3172 | ||
1a23f81b MCC |
3173 | em28xx_pre_card_setup(dev); |
3174 | ||
3175 | if (!dev->board.is_em2800) { | |
ca3dfd6a | 3176 | /* Resets I2C speed */ |
0903bb54 | 3177 | retval = em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, dev->board.i2c_speed); |
1a23f81b | 3178 | if (retval < 0) { |
6c03e38b | 3179 | em28xx_errdev("%s: em28xx_write_reg failed!" |
1a23f81b MCC |
3180 | " retval [%d]\n", |
3181 | __func__, retval); | |
3182 | return retval; | |
3183 | } | |
3184 | } | |
3185 | ||
aab3125c MCC |
3186 | rt_mutex_init(&dev->i2c_bus_lock); |
3187 | ||
3188 | /* register i2c bus 0 */ | |
a3ea4bf9 FS |
3189 | if (dev->board.is_em2800) |
3190 | retval = em28xx_i2c_register(dev, 0, EM28XX_I2C_ALGO_EM2800); | |
3191 | else | |
3192 | retval = em28xx_i2c_register(dev, 0, EM28XX_I2C_ALGO_EM28XX); | |
6c03e38b | 3193 | if (retval < 0) { |
aab3125c | 3194 | em28xx_errdev("%s: em28xx_i2c_register bus 0 - error [%d]!\n", |
fdf1bc9f | 3195 | __func__, retval); |
b64f8e9a | 3196 | return retval; |
1a23f81b MCC |
3197 | } |
3198 | ||
a3ea4bf9 | 3199 | /* register i2c bus 1 */ |
aab3125c | 3200 | if (dev->def_i2c_bus) { |
736a320b FS |
3201 | if (dev->is_em25xx) |
3202 | retval = em28xx_i2c_register(dev, 1, | |
fdf1bc9f | 3203 | EM28XX_I2C_ALGO_EM25XX_BUS_B); |
736a320b FS |
3204 | else |
3205 | retval = em28xx_i2c_register(dev, 1, | |
fdf1bc9f | 3206 | EM28XX_I2C_ALGO_EM28XX); |
aab3125c MCC |
3207 | if (retval < 0) { |
3208 | em28xx_errdev("%s: em28xx_i2c_register bus 1 - error [%d]!\n", | |
fdf1bc9f | 3209 | __func__, retval); |
1f0ee65a MCC |
3210 | |
3211 | em28xx_i2c_unregister(dev, 0); | |
3212 | ||
b64f8e9a | 3213 | return retval; |
aab3125c MCC |
3214 | } |
3215 | } | |
3216 | ||
1a23f81b MCC |
3217 | /* Do board specific init and eeprom reading */ |
3218 | em28xx_card_setup(dev); | |
3219 | ||
1a23f81b | 3220 | return 0; |
1a23f81b MCC |
3221 | } |
3222 | ||
4f83e7b3 MCC |
3223 | /* high bandwidth multiplier, as encoded in highspeed endpoint descriptors */ |
3224 | #define hb_mult(wMaxPacketSize) (1 + (((wMaxPacketSize) >> 11) & 0x03)) | |
3225 | ||
1a23f81b MCC |
3226 | /* |
3227 | * em28xx_usb_probe() | |
3228 | * checks for supported devices | |
3229 | */ | |
3230 | static int em28xx_usb_probe(struct usb_interface *interface, | |
3231 | const struct usb_device_id *id) | |
3232 | { | |
1a23f81b | 3233 | struct usb_device *udev; |
1a23f81b | 3234 | struct em28xx *dev = NULL; |
f2cf250a | 3235 | int retval; |
c5874208 | 3236 | bool has_vendor_audio = false, has_video = false, has_dvb = false; |
8b2aea78 | 3237 | int i, nr, try_bulk; |
4f83e7b3 | 3238 | const int ifnum = interface->altsetting[0].desc.bInterfaceNumber; |
1a23f81b | 3239 | char *speed; |
1a23f81b MCC |
3240 | |
3241 | udev = usb_get_dev(interface_to_usbdev(interface)); | |
1a23f81b MCC |
3242 | |
3243 | /* Check to see next free device and mark as used */ | |
38b61eb2 | 3244 | do { |
c3aed262 | 3245 | nr = find_first_zero_bit(em28xx_devused, EM28XX_MAXBOARDS); |
38b61eb2 CR |
3246 | if (nr >= EM28XX_MAXBOARDS) { |
3247 | /* No free device slots */ | |
3248 | printk(DRIVER_NAME ": Supports only %i em28xx boards.\n", | |
fdf1bc9f | 3249 | EM28XX_MAXBOARDS); |
38b61eb2 CR |
3250 | retval = -ENOMEM; |
3251 | goto err_no_slot; | |
3252 | } | |
c3aed262 | 3253 | } while (test_and_set_bit(nr, em28xx_devused)); |
1a23f81b MCC |
3254 | |
3255 | /* Don't register audio interfaces */ | |
3256 | if (interface->altsetting[0].desc.bInterfaceClass == USB_CLASS_AUDIO) { | |
3257 | em28xx_err(DRIVER_NAME " audio device (%04x:%04x): " | |
3258 | "interface %i, class %i\n", | |
3259 | le16_to_cpu(udev->descriptor.idVendor), | |
3260 | le16_to_cpu(udev->descriptor.idProduct), | |
3261 | ifnum, | |
3262 | interface->altsetting[0].desc.bInterfaceClass); | |
3263 | ||
f2cf250a DSL |
3264 | retval = -ENODEV; |
3265 | goto err; | |
1a23f81b MCC |
3266 | } |
3267 | ||
8ab33626 HN |
3268 | /* allocate memory for our device state and initialize it */ |
3269 | dev = kzalloc(sizeof(*dev), GFP_KERNEL); | |
3270 | if (dev == NULL) { | |
3271 | em28xx_err(DRIVER_NAME ": out of memory!\n"); | |
3272 | retval = -ENOMEM; | |
3273 | goto err; | |
3274 | } | |
3275 | ||
3276 | /* compute alternate max packet sizes */ | |
0cf544a6 FS |
3277 | dev->alt_max_pkt_size_isoc = |
3278 | kmalloc(sizeof(dev->alt_max_pkt_size_isoc[0]) * | |
8ab33626 | 3279 | interface->num_altsetting, GFP_KERNEL); |
0cf544a6 | 3280 | if (dev->alt_max_pkt_size_isoc == NULL) { |
8ab33626 HN |
3281 | em28xx_errdev("out of memory!\n"); |
3282 | kfree(dev); | |
3283 | retval = -ENOMEM; | |
3284 | goto err; | |
3285 | } | |
3286 | ||
4f83e7b3 MCC |
3287 | /* Get endpoints */ |
3288 | for (i = 0; i < interface->num_altsetting; i++) { | |
3289 | int ep; | |
3290 | ||
3291 | for (ep = 0; ep < interface->altsetting[i].desc.bNumEndpoints; ep++) { | |
8ab33626 HN |
3292 | const struct usb_endpoint_descriptor *e; |
3293 | int sizedescr, size; | |
3294 | ||
3295 | e = &interface->altsetting[i].endpoint[ep].desc; | |
3296 | ||
3297 | sizedescr = le16_to_cpu(e->wMaxPacketSize); | |
3298 | size = sizedescr & 0x7ff; | |
3299 | ||
3300 | if (udev->speed == USB_SPEED_HIGH) | |
3301 | size = size * hb_mult(sizedescr); | |
3302 | ||
c647a91a | 3303 | if (usb_endpoint_dir_in(e)) { |
8ab33626 | 3304 | switch (e->bEndpointAddress) { |
c647a91a | 3305 | case 0x82: |
8ab33626 | 3306 | has_video = true; |
c647a91a FS |
3307 | if (usb_endpoint_xfer_isoc(e)) { |
3308 | dev->analog_ep_isoc = | |
3309 | e->bEndpointAddress; | |
3310 | dev->alt_max_pkt_size_isoc[i] = size; | |
3311 | } else if (usb_endpoint_xfer_bulk(e)) { | |
3312 | dev->analog_ep_bulk = | |
3313 | e->bEndpointAddress; | |
3314 | } | |
3315 | break; | |
3316 | case 0x83: | |
3317 | if (usb_endpoint_xfer_isoc(e)) { | |
c5874208 | 3318 | has_vendor_audio = true; |
c647a91a FS |
3319 | } else { |
3320 | printk(KERN_INFO DRIVER_NAME | |
3321 | ": error: skipping audio endpoint 0x83, because it uses bulk transfers !\n"); | |
3322 | } | |
8ab33626 | 3323 | break; |
c647a91a FS |
3324 | case 0x84: |
3325 | if (has_video && | |
3326 | (usb_endpoint_xfer_bulk(e))) { | |
3327 | dev->analog_ep_bulk = | |
3328 | e->bEndpointAddress; | |
3329 | } else { | |
c647a91a | 3330 | if (usb_endpoint_xfer_isoc(e)) { |
c647a91a | 3331 | if (size > dev->dvb_max_pkt_size_isoc) { |
72cc9ba3 | 3332 | has_dvb = true; /* see NOTE (~) */ |
b3404a8e | 3333 | dev->dvb_ep_isoc = e->bEndpointAddress; |
c647a91a FS |
3334 | dev->dvb_max_pkt_size_isoc = size; |
3335 | dev->dvb_alt_isoc = i; | |
3336 | } | |
3337 | } else { | |
72cc9ba3 | 3338 | has_dvb = true; |
c647a91a FS |
3339 | dev->dvb_ep_bulk = e->bEndpointAddress; |
3340 | } | |
8ab33626 HN |
3341 | } |
3342 | break; | |
3343 | } | |
3344 | } | |
c647a91a FS |
3345 | /* NOTE: |
3346 | * Old logic with support for isoc transfers only was: | |
3347 | * 0x82 isoc => analog | |
3348 | * 0x83 isoc => audio | |
3349 | * 0x84 isoc => digital | |
3350 | * | |
3351 | * New logic with support for bulk transfers | |
3352 | * 0x82 isoc => analog | |
3353 | * 0x82 bulk => analog | |
3354 | * 0x83 isoc* => audio | |
3355 | * 0x84 isoc => digital | |
3356 | * 0x84 bulk => analog or digital** | |
3357 | * (*: audio should always be isoc) | |
3358 | * (**: analog, if ep 0x82 is isoc, otherwise digital) | |
3359 | * | |
3360 | * The new logic preserves backwards compatibility and | |
3361 | * reflects the endpoint configurations we have seen | |
3362 | * so far. But there might be devices for which this | |
3363 | * logic is not sufficient... | |
3364 | */ | |
72cc9ba3 FS |
3365 | /* |
3366 | * NOTE (~): some manufacturers (e.g. Terratec) disable | |
3367 | * endpoints by setting wMaxPacketSize to 0 bytes for | |
3368 | * all alt settings. So far, we've seen this for | |
3369 | * DVB isoc endpoints only. | |
3370 | */ | |
4f83e7b3 MCC |
3371 | } |
3372 | } | |
3373 | ||
c5874208 | 3374 | if (!(has_vendor_audio || has_video || has_dvb)) { |
8ab33626 HN |
3375 | retval = -ENODEV; |
3376 | goto err_free; | |
1a23f81b MCC |
3377 | } |
3378 | ||
3379 | switch (udev->speed) { | |
3380 | case USB_SPEED_LOW: | |
3381 | speed = "1.5"; | |
3382 | break; | |
3383 | case USB_SPEED_UNKNOWN: | |
3384 | case USB_SPEED_FULL: | |
3385 | speed = "12"; | |
3386 | break; | |
3387 | case USB_SPEED_HIGH: | |
3388 | speed = "480"; | |
3389 | break; | |
3390 | default: | |
3391 | speed = "unknown"; | |
3392 | } | |
3393 | ||
4f83e7b3 | 3394 | printk(KERN_INFO DRIVER_NAME |
401a582f EG |
3395 | ": New device %s %s @ %s Mbps " |
3396 | "(%04x:%04x, interface %d, class %d)\n", | |
3397 | udev->manufacturer ? udev->manufacturer : "", | |
3398 | udev->product ? udev->product : "", | |
1a23f81b MCC |
3399 | speed, |
3400 | le16_to_cpu(udev->descriptor.idVendor), | |
3401 | le16_to_cpu(udev->descriptor.idProduct), | |
3402 | ifnum, | |
3403 | interface->altsetting->desc.bInterfaceNumber); | |
3404 | ||
64a00b43 DH |
3405 | /* |
3406 | * Make sure we have 480 Mbps of bandwidth, otherwise things like | |
3407 | * video stream wouldn't likely work, since 12 Mbps is generally | |
3408 | * not enough even for most Digital TV streams. | |
3409 | */ | |
e2a1b79f | 3410 | if (udev->speed != USB_SPEED_HIGH && disable_usb_speed_check == 0) { |
64a00b43 DH |
3411 | printk(DRIVER_NAME ": Device initialization failed.\n"); |
3412 | printk(DRIVER_NAME ": Device must be connected to a high-speed" | |
3413 | " USB 2.0 port.\n"); | |
64a00b43 | 3414 | retval = -ENODEV; |
8ab33626 | 3415 | goto err_free; |
1a23f81b MCC |
3416 | } |
3417 | ||
1a23f81b MCC |
3418 | dev->devno = nr; |
3419 | dev->model = id->driver_info; | |
3420 | dev->alt = -1; | |
c5874208 | 3421 | dev->is_audio_only = has_vendor_audio && !(has_video || has_dvb); |
01c28193 | 3422 | dev->has_video = has_video; |
961717b4 | 3423 | dev->ifnum = ifnum; |
1a23f81b | 3424 | |
c5874208 FS |
3425 | if (has_vendor_audio) { |
3426 | printk(KERN_INFO DRIVER_NAME ": Audio interface %i found %s\n", | |
3427 | ifnum, "(Vendor Class)"); | |
3428 | dev->usb_audio_type = EM28XX_USB_AUDIO_VENDOR; | |
3429 | } | |
3430 | /* Checks if audio is provided by a USB Audio Class interface */ | |
1a23f81b | 3431 | for (i = 0; i < udev->config->desc.bNumInterfaces; i++) { |
4f83e7b3 | 3432 | struct usb_interface *uif = udev->config->interface[i]; |
fdf1bc9f | 3433 | |
1a23f81b | 3434 | if (uif->altsetting[0].desc.bInterfaceClass == USB_CLASS_AUDIO) { |
c5874208 FS |
3435 | if (has_vendor_audio) |
3436 | em28xx_err("em28xx: device seems to have vendor AND usb audio class interfaces !\n" | |
3437 | "\t\tThe vendor interface will be ignored. Please contact the developers <linux-media@vger.kernel.org>\n"); | |
3438 | dev->usb_audio_type = EM28XX_USB_AUDIO_CLASS; | |
1a23f81b MCC |
3439 | break; |
3440 | } | |
3441 | } | |
3442 | ||
aa51496b MCC |
3443 | if (has_video) |
3444 | printk(KERN_INFO DRIVER_NAME | |
3445 | ": Video interface %i found:%s%s\n", | |
3446 | ifnum, | |
3447 | dev->analog_ep_bulk ? " bulk" : "", | |
3448 | dev->analog_ep_isoc ? " isoc" : ""); | |
3449 | if (has_dvb) | |
3450 | printk(KERN_INFO DRIVER_NAME | |
3451 | ": DVB interface %i found:%s%s\n", | |
3452 | ifnum, | |
3453 | dev->dvb_ep_bulk ? " bulk" : "", | |
3454 | dev->dvb_ep_isoc ? " isoc" : ""); | |
3455 | ||
4f83e7b3 | 3456 | dev->num_alt = interface->num_altsetting; |
1a23f81b | 3457 | |
d3e4ea01 | 3458 | if ((unsigned)card[nr] < em28xx_bcount) |
1a23f81b MCC |
3459 | dev->model = card[nr]; |
3460 | ||
4f83e7b3 MCC |
3461 | /* save our data pointer in this interface device */ |
3462 | usb_set_intfdata(interface, dev); | |
3463 | ||
1a23f81b MCC |
3464 | /* allocate device struct */ |
3465 | mutex_init(&dev->lock); | |
622c2fc1 | 3466 | retval = em28xx_init_dev(dev, udev, interface, nr); |
1a23f81b | 3467 | if (retval) { |
01c28193 | 3468 | goto err_free; |
1a23f81b MCC |
3469 | } |
3470 | ||
7e5d74ee | 3471 | if (usb_xfer_mode < 0) { |
8b2aea78 MCC |
3472 | if (dev->board.is_webcam) |
3473 | try_bulk = 1; | |
3474 | else | |
3475 | try_bulk = 0; | |
3476 | } else { | |
7e5d74ee | 3477 | try_bulk = usb_xfer_mode > 0; |
8b2aea78 MCC |
3478 | } |
3479 | ||
3480 | /* Select USB transfer types to use */ | |
3481 | if (has_video) { | |
58697783 FS |
3482 | if (!dev->analog_ep_isoc || (try_bulk && dev->analog_ep_bulk)) |
3483 | dev->analog_xfer_bulk = 1; | |
3484 | em28xx_info("analog set to %s mode.\n", | |
3485 | dev->analog_xfer_bulk ? "bulk" : "isoc"); | |
8b2aea78 | 3486 | } |
86d38d1e | 3487 | if (has_dvb) { |
58697783 FS |
3488 | if (!dev->dvb_ep_isoc || (try_bulk && dev->dvb_ep_bulk)) |
3489 | dev->dvb_xfer_bulk = 1; | |
8b2aea78 MCC |
3490 | em28xx_info("dvb set to %s mode.\n", |
3491 | dev->dvb_xfer_bulk ? "bulk" : "isoc"); | |
86d38d1e GG |
3492 | } |
3493 | ||
47677e51 MCC |
3494 | kref_init(&dev->ref); |
3495 | ||
1a23f81b MCC |
3496 | request_modules(dev); |
3497 | ||
3498 | /* Should be the last thing to do, to avoid newer udev's to | |
3499 | open the device before fully initializing it | |
3500 | */ | |
1a23f81b MCC |
3501 | |
3502 | return 0; | |
f2cf250a | 3503 | |
8ab33626 | 3504 | err_free: |
0cf544a6 | 3505 | kfree(dev->alt_max_pkt_size_isoc); |
8ab33626 HN |
3506 | kfree(dev); |
3507 | ||
f2cf250a | 3508 | err: |
c3aed262 | 3509 | clear_bit(nr, em28xx_devused); |
38b61eb2 CR |
3510 | |
3511 | err_no_slot: | |
3512 | usb_put_dev(udev); | |
f2cf250a | 3513 | return retval; |
1a23f81b MCC |
3514 | } |
3515 | ||
3516 | /* | |
3517 | * em28xx_usb_disconnect() | |
d7222e7d | 3518 | * called when the device gets disconnected |
1a23f81b MCC |
3519 | * video device will be unregistered on v4l2_close in case it is still open |
3520 | */ | |
3521 | static void em28xx_usb_disconnect(struct usb_interface *interface) | |
3522 | { | |
3523 | struct em28xx *dev; | |
3524 | ||
3525 | dev = usb_get_intfdata(interface); | |
3526 | usb_set_intfdata(interface, NULL); | |
3527 | ||
3528 | if (!dev) | |
3529 | return; | |
3530 | ||
05fe2175 FS |
3531 | dev->disconnected = 1; |
3532 | ||
6582af4c | 3533 | em28xx_info("Disconnecting %s\n", dev->name); |
1a23f81b | 3534 | |
707bcf32 TH |
3535 | flush_request_modules(dev); |
3536 | ||
05fe2175 | 3537 | em28xx_close_extension(dev); |
54a2a84e | 3538 | |
5a620c7c | 3539 | em28xx_release_resources(dev); |
47677e51 | 3540 | kref_put(&dev->ref, em28xx_free_device); |
1a23f81b MCC |
3541 | } |
3542 | ||
cd701c89 | 3543 | static int em28xx_usb_suspend(struct usb_interface *interface, |
fdf1bc9f | 3544 | pm_message_t message) |
cd701c89 SK |
3545 | { |
3546 | struct em28xx *dev; | |
3547 | ||
3548 | dev = usb_get_intfdata(interface); | |
3549 | if (!dev) | |
3550 | return 0; | |
3551 | em28xx_suspend_extension(dev); | |
3552 | return 0; | |
3553 | } | |
3554 | ||
3555 | static int em28xx_usb_resume(struct usb_interface *interface) | |
3556 | { | |
3557 | struct em28xx *dev; | |
3558 | ||
3559 | dev = usb_get_intfdata(interface); | |
3560 | if (!dev) | |
3561 | return 0; | |
3562 | em28xx_resume_extension(dev); | |
3563 | return 0; | |
3564 | } | |
3565 | ||
1a23f81b MCC |
3566 | static struct usb_driver em28xx_usb_driver = { |
3567 | .name = "em28xx", | |
3568 | .probe = em28xx_usb_probe, | |
3569 | .disconnect = em28xx_usb_disconnect, | |
cd701c89 SK |
3570 | .suspend = em28xx_usb_suspend, |
3571 | .resume = em28xx_usb_resume, | |
214635f9 | 3572 | .reset_resume = em28xx_usb_resume, |
1a23f81b MCC |
3573 | .id_table = em28xx_id_table, |
3574 | }; | |
3575 | ||
ecb3b2b3 | 3576 | module_usb_driver(em28xx_usb_driver); |