blob: 08d4ac659e3d0ba660d8e82ee2d851d3de40d65e [file] [log] [blame]
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08001/*
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03002 em28xx-cards.c - driver for Empia EM2800/EM2820/2840 USB
3 video capture devices
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08004
Mauro Carvalho Chehabf7abcd32005-11-08 21:38:25 -08005 Copyright (C) 2005 Ludovico Cavedon <cavedon@sssup.it>
6 Markus Rechberger <mrechberger@gmail.com>
Mauro Carvalho Chehab2e7c6dc2006-04-03 07:53:40 -03007 Mauro Carvalho Chehab <mchehab@infradead.org>
Mauro Carvalho Chehabf7abcd32005-11-08 21:38:25 -08008 Sascha Sommer <saschasommer@freenet.de>
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08009
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 */
24
25#include <linux/init.h>
26#include <linux/module.h>
Tejun Heo5a0e3ad2010-03-24 17:04:11 +090027#include <linux/slab.h>
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -080028#include <linux/delay.h>
29#include <linux/i2c.h>
30#include <linux/usb.h>
31#include <media/tuner.h>
Hans Verkuil2474ed42006-03-19 12:35:57 -030032#include <media/msp3400.h>
Hans Verkuilc7c0b342006-04-02 13:35:00 -030033#include <media/saa7115.h>
34#include <media/tvp5150.h>
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -030035#include <media/tvaudio.h>
Hans Verkuil3c7c9372011-01-08 07:08:02 -030036#include <media/mt9v011.h>
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -030037#include <media/i2c-addr.h>
Mauro Carvalho Chehab1f6173e2005-11-08 21:37:16 -080038#include <media/tveeprom.h>
Mauro Carvalho Chehab9bb13a62006-01-09 15:25:37 -020039#include <media/v4l2-common.h>
Hans Verkuil38f9d302008-07-23 05:09:15 -030040#include <media/v4l2-chip-ident.h>
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -080041
Mauro Carvalho Chehabf7abcd32005-11-08 21:38:25 -080042#include "em28xx.h"
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -080043
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -030044#define DRIVER_NAME "em28xx"
45
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -030046static int tuner = -1;
47module_param(tuner, int, 0444);
48MODULE_PARM_DESC(tuner, "tuner type");
49
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -030050static unsigned int disable_ir;
51module_param(disable_ir, int, 0444);
52MODULE_PARM_DESC(disable_ir, "disable infrared remote support");
53
Devin Heitmuellere2a1b792009-05-27 23:44:10 -030054static unsigned int disable_usb_speed_check;
55module_param(disable_usb_speed_check, int, 0444);
56MODULE_PARM_DESC(disable_usb_speed_check,
57 "override min bandwidth requirement of 480M bps");
58
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -030059static unsigned int card[] = {[0 ... (EM28XX_MAXBOARDS - 1)] = UNSET };
60module_param_array(card, int, NULL, 0444);
61MODULE_PARM_DESC(card, "card type");
62
Chris Rankin38b61eb2011-08-20 08:21:03 -030063/* Bitmask marking allocated devices from 0 to EM28XX_MAXBOARDS - 1 */
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -030064static unsigned long em28xx_devused;
65
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -030066struct em28xx_hash_table {
67 unsigned long hash;
68 unsigned int model;
69 unsigned int tuner;
70};
71
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -030072/*
73 * Reset sequences for analog/digital modes
74 */
75
76/* Reset for the most [analog] boards */
77static struct em28xx_reg_seq default_analog[] = {
78 {EM28XX_R08_GPIO, 0x6d, ~EM_GPIO_4, 10},
79 { -1, -1, -1, -1},
80};
81
82/* Reset for the most [digital] boards */
83static struct em28xx_reg_seq default_digital[] = {
84 {EM28XX_R08_GPIO, 0x6e, ~EM_GPIO_4, 10},
85 { -1, -1, -1, -1},
86};
87
88/* Board Hauppauge WinTV HVR 900 analog */
89static struct em28xx_reg_seq hauppauge_wintv_hvr_900_analog[] = {
90 {EM28XX_R08_GPIO, 0x2d, ~EM_GPIO_4, 10},
91 {0x05, 0xff, 0x10, 10},
92 { -1, -1, -1, -1},
93};
94
95/* Board Hauppauge WinTV HVR 900 digital */
96static struct em28xx_reg_seq hauppauge_wintv_hvr_900_digital[] = {
97 {EM28XX_R08_GPIO, 0x2e, ~EM_GPIO_4, 10},
98 {EM2880_R04_GPO, 0x04, 0x0f, 10},
99 {EM2880_R04_GPO, 0x0c, 0x0f, 10},
100 { -1, -1, -1, -1},
101};
102
Devin Heitmueller7030f522011-03-13 02:04:53 -0300103/* Board Hauppauge WinTV HVR 900 (R2) digital */
104static struct em28xx_reg_seq hauppauge_wintv_hvr_900R2_digital[] = {
105 {EM28XX_R08_GPIO, 0x2e, ~EM_GPIO_4, 10},
106 {EM2880_R04_GPO, 0x0c, 0x0f, 10},
107 { -1, -1, -1, -1},
108};
109
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -0300110/* Boards - EM2880 MSI DIGIVOX AD and EM2880_BOARD_MSI_DIGIVOX_AD_II */
111static struct em28xx_reg_seq em2880_msi_digivox_ad_analog[] = {
112 {EM28XX_R08_GPIO, 0x69, ~EM_GPIO_4, 10},
113 { -1, -1, -1, -1},
114};
115
116/* Boards - EM2880 MSI DIGIVOX AD and EM2880_BOARD_MSI_DIGIVOX_AD_II */
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -0300117
118/* Board - EM2870 Kworld 355u
119 Analog - No input analog */
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -0300120
Franklin Mengd7de5d82009-06-06 17:05:02 -0300121/* Board - EM2882 Kworld 315U digital */
122static struct em28xx_reg_seq em2882_kworld_315u_digital[] = {
123 {EM28XX_R08_GPIO, 0xff, 0xff, 10},
124 {EM28XX_R08_GPIO, 0xfe, 0xff, 10},
125 {EM2880_R04_GPO, 0x04, 0xff, 10},
126 {EM2880_R04_GPO, 0x0c, 0xff, 10},
127 {EM28XX_R08_GPIO, 0x7e, 0xff, 10},
128 { -1, -1, -1, -1},
129};
130
131static struct em28xx_reg_seq em2882_kworld_315u_tuner_gpio[] = {
132 {EM2880_R04_GPO, 0x08, 0xff, 10},
133 {EM2880_R04_GPO, 0x0c, 0xff, 10},
134 {EM2880_R04_GPO, 0x08, 0xff, 10},
135 {EM2880_R04_GPO, 0x0c, 0xff, 10},
136 { -1, -1, -1, -1},
137};
138
Robert Krakora6e7b9ea2009-01-18 21:59:34 -0300139static struct em28xx_reg_seq kworld_330u_analog[] = {
140 {EM28XX_R08_GPIO, 0x6d, ~EM_GPIO_4, 10},
141 {EM2880_R04_GPO, 0x00, 0xff, 10},
142 { -1, -1, -1, -1},
143};
144
145static struct em28xx_reg_seq kworld_330u_digital[] = {
146 {EM28XX_R08_GPIO, 0x6e, ~EM_GPIO_4, 10},
147 {EM2880_R04_GPO, 0x08, 0xff, 10},
148 { -1, -1, -1, -1},
149};
150
Devin Heitmueller19859222009-06-19 00:33:54 -0300151/* Evga inDtube
152 GPIO0 - Enable digital power (s5h1409) - low to enable
153 GPIO1 - Enable analog power (tvp5150/emp202) - low to enable
154 GPIO4 - xc3028 reset
155 GOP3 - s5h1409 reset
156 */
157static struct em28xx_reg_seq evga_indtube_analog[] = {
158 {EM28XX_R08_GPIO, 0x79, 0xff, 60},
159 { -1, -1, -1, -1},
160};
161
162static struct em28xx_reg_seq evga_indtube_digital[] = {
163 {EM28XX_R08_GPIO, 0x7a, 0xff, 1},
164 {EM2880_R04_GPO, 0x04, 0xff, 10},
165 {EM2880_R04_GPO, 0x0c, 0xff, 1},
166 { -1, -1, -1, -1},
167};
168
Jarod Wilson7e48b302010-03-07 17:55:43 -0300169/*
170 * KWorld PlusTV 340U and UB435-Q (ATSC) GPIOs map:
171 * EM_GPIO_0 - currently unknown
172 * EM_GPIO_1 - LED disable/enable (1 = off, 0 = on)
173 * EM_GPIO_2 - currently unknown
174 * EM_GPIO_3 - currently unknown
175 * EM_GPIO_4 - TDA18271HD/C1 tuner (1 = active, 0 = in reset)
176 * EM_GPIO_5 - LGDT3304 ATSC/QAM demod (1 = active, 0 = in reset)
177 * EM_GPIO_6 - currently unknown
178 * EM_GPIO_7 - currently unknown
179 */
180static struct em28xx_reg_seq kworld_a340_digital[] = {
181 {EM28XX_R08_GPIO, 0x6d, ~EM_GPIO_4, 10},
182 { -1, -1, -1, -1},
183};
184
Devin Heitmuellerd5b3ba92009-07-08 21:51:35 -0300185/* Pinnacle Hybrid Pro eb1a:2881 */
186static struct em28xx_reg_seq pinnacle_hybrid_pro_analog[] = {
Devin Heitmueller44010442009-07-08 22:18:15 -0300187 {EM28XX_R08_GPIO, 0xfd, ~EM_GPIO_4, 10},
Devin Heitmuellerd5b3ba92009-07-08 21:51:35 -0300188 { -1, -1, -1, -1},
189};
190
191static struct em28xx_reg_seq pinnacle_hybrid_pro_digital[] = {
192 {EM28XX_R08_GPIO, 0x6e, ~EM_GPIO_4, 10},
193 {EM2880_R04_GPO, 0x04, 0xff, 100},/* zl10353 reset */
194 {EM2880_R04_GPO, 0x0c, 0xff, 1},
195 { -1, -1, -1, -1},
196};
197
Michel Garniercec4e6c2010-10-16 14:42:01 -0300198static struct em28xx_reg_seq terratec_cinergy_USB_XS_FR_analog[] = {
199 {EM28XX_R08_GPIO, 0x6d, ~EM_GPIO_4, 10},
200 {EM2880_R04_GPO, 0x00, 0xff, 10},
201 { -1, -1, -1, -1},
202};
203
204static struct em28xx_reg_seq terratec_cinergy_USB_XS_FR_digital[] = {
205 {EM28XX_R08_GPIO, 0x6e, ~EM_GPIO_4, 10},
206 {EM2880_R04_GPO, 0x08, 0xff, 10},
207 { -1, -1, -1, -1},
208};
209
Antti Palosaari285eb1a2009-09-15 14:42:13 -0300210/* eb1a:2868 Reddo DVB-C USB TV Box
211 GPIO4 - CU1216L NIM
212 Other GPIOs seems to be don't care. */
213static struct em28xx_reg_seq reddo_dvb_c_usb_box[] = {
214 {EM28XX_R08_GPIO, 0xfe, 0xff, 10},
215 {EM28XX_R08_GPIO, 0xde, 0xff, 10},
216 {EM28XX_R08_GPIO, 0xfe, 0xff, 10},
217 {EM28XX_R08_GPIO, 0xff, 0xff, 10},
218 {EM28XX_R08_GPIO, 0x7f, 0xff, 10},
219 {EM28XX_R08_GPIO, 0x6f, 0xff, 10},
220 {EM28XX_R08_GPIO, 0xff, 0xff, 10},
221 {-1, -1, -1, -1},
222};
Devin Heitmuellerd5b3ba92009-07-08 21:51:35 -0300223
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -0300224/* Callback for the most boards */
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -0300225static struct em28xx_reg_seq default_tuner_gpio[] = {
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -0300226 {EM28XX_R08_GPIO, EM_GPIO_4, EM_GPIO_4, 10},
227 {EM28XX_R08_GPIO, 0, EM_GPIO_4, 10},
228 {EM28XX_R08_GPIO, EM_GPIO_4, EM_GPIO_4, 10},
229 { -1, -1, -1, -1},
230};
231
Vitaly Wool2bd1d9e2009-03-04 08:27:52 -0300232/* Mute/unmute */
233static struct em28xx_reg_seq compro_unmute_tv_gpio[] = {
234 {EM28XX_R08_GPIO, 5, 7, 10},
235 { -1, -1, -1, -1},
236};
237
238static struct em28xx_reg_seq compro_unmute_svid_gpio[] = {
239 {EM28XX_R08_GPIO, 4, 7, 10},
240 { -1, -1, -1, -1},
241};
242
243static struct em28xx_reg_seq compro_mute_gpio[] = {
244 {EM28XX_R08_GPIO, 6, 7, 10},
245 { -1, -1, -1, -1},
246};
247
Mauro Carvalho Chehab766ed642009-05-24 00:46:01 -0300248/* Terratec AV350 */
249static struct em28xx_reg_seq terratec_av350_mute_gpio[] = {
250 {EM28XX_R08_GPIO, 0xff, 0x7f, 10},
251 { -1, -1, -1, -1},
252};
253
254static struct em28xx_reg_seq terratec_av350_unmute_gpio[] = {
255 {EM28XX_R08_GPIO, 0xff, 0xff, 10},
256 { -1, -1, -1, -1},
257};
Mauro Carvalho Chehab02e78042009-06-29 11:35:05 -0300258
259static struct em28xx_reg_seq silvercrest_reg_seq[] = {
260 {EM28XX_R08_GPIO, 0xff, 0xff, 10},
261 {EM28XX_R08_GPIO, 0x01, 0xf7, 10},
262 { -1, -1, -1, -1},
263};
264
Mauro Carvalho Chehab694a1012009-11-26 21:26:13 -0300265static struct em28xx_reg_seq vc211a_enable[] = {
266 {EM28XX_R08_GPIO, 0xff, 0x07, 10},
267 {EM28XX_R08_GPIO, 0xff, 0x0f, 10},
268 {EM28XX_R08_GPIO, 0xff, 0x0b, 10},
269 { -1, -1, -1, -1},
270};
271
Andrea.Amorosi76@gmail.com7ca7ef62010-02-09 17:53:38 -0300272static struct em28xx_reg_seq dikom_dk300_digital[] = {
273 {EM28XX_R08_GPIO, 0x6e, ~EM_GPIO_4, 10},
274 {EM2880_R04_GPO, 0x08, 0xff, 10},
275 { -1, -1, -1, -1},
276};
277
Mauro Carvalho Chehab694a1012009-11-26 21:26:13 -0300278
Mauro Carvalho Chehabca3dfd62010-09-10 17:29:14 -0300279/* Reset for the most [digital] boards */
280static struct em28xx_reg_seq leadership_digital[] = {
281 {EM2874_R80_GPIO, 0x70, 0xff, 10},
282 { -1, -1, -1, -1},
283};
284
285static struct em28xx_reg_seq leadership_reset[] = {
286 {EM2874_R80_GPIO, 0xf0, 0xff, 10},
287 {EM2874_R80_GPIO, 0xb0, 0xff, 10},
288 {EM2874_R80_GPIO, 0xf0, 0xff, 10},
289 { -1, -1, -1, -1},
290};
291
Antti Palosaari460312e2011-05-25 17:03:50 -0300292/* 2013:024f PCTV nanoStick T2 290e
Antti Palosaarid6a5f922011-04-07 16:34:44 -0300293 * GPIO_6 - demod reset
294 * GPIO_7 - LED
295 */
296static struct em28xx_reg_seq pctv_290e[] = {
297 {EM2874_R80_GPIO, 0x00, 0xff, 80},
298 {EM2874_R80_GPIO, 0x40, 0xff, 80}, /* GPIO_6 = 1 */
299 {EM2874_R80_GPIO, 0xc0, 0xff, 80}, /* GPIO_7 = 1 */
300 {-1, -1, -1, -1},
301};
Mauro Carvalho Chehabca3dfd62010-09-10 17:29:14 -0300302
Mauro Carvalho Chehabfec528b2011-07-03 21:05:06 -0300303#if 0
304static struct em28xx_reg_seq terratec_h5_gpio[] = {
305 {EM28XX_R08_GPIO, 0xff, 0xff, 10},
306 {EM2874_R80_GPIO, 0xf6, 0xff, 100},
307 {EM2874_R80_GPIO, 0xf2, 0xff, 50},
308 {EM2874_R80_GPIO, 0xf6, 0xff, 50},
309 { -1, -1, -1, -1},
310};
311
312static struct em28xx_reg_seq terratec_h5_digital[] = {
313 {EM2874_R80_GPIO, 0xf6, 0xff, 10},
314 {EM2874_R80_GPIO, 0xe6, 0xff, 100},
315 {EM2874_R80_GPIO, 0xa6, 0xff, 10},
316 { -1, -1, -1, -1},
317};
318#endif
319
Antti Palosaari36588712011-08-01 01:15:30 -0300320/* 2013:024f PCTV DVB-S2 Stick 460e
321 * GPIO_0 - POWER_ON
322 * GPIO_1 - BOOST
323 * GPIO_2 - VUV_LNB (red LED)
324 * GPIO_3 - EXT_12V
325 * GPIO_4 - INT_DEM (DEMOD GPIO_0)
326 * GPIO_5 - INT_LNB
327 * GPIO_6 - RESET_DEM
328 * GPIO_7 - LED (green LED)
329 */
330static struct em28xx_reg_seq pctv_460e[] = {
331 {EM2874_R80_GPIO, 0x01, 0xff, 50},
332 {0x0d, 0xff, 0xff, 50},
333 {EM2874_R80_GPIO, 0x41, 0xff, 50}, /* GPIO_6=1 */
334 {0x0d, 0x42, 0xff, 50},
335 {EM2874_R80_GPIO, 0x61, 0xff, 50}, /* GPIO_5=1 */
336 { -1, -1, -1, -1},
337};
338
Mauro Carvalho Chehab85032322011-11-24 15:01:45 -0200339#if 0
Eddi De Pieri82e7dbb2011-11-19 11:37:14 -0300340static struct em28xx_reg_seq hauppauge_930c_gpio[] = {
Eddi De Pieri82e7dbb2011-11-19 11:37:14 -0300341 {EM2874_R80_GPIO, 0x6f, 0xff, 10},
Mauro Carvalho Chehabde724052011-11-20 11:23:24 -0200342 {EM2874_R80_GPIO, 0x4f, 0xff, 10}, /* xc5000 reset */
Eddi De Pieri82e7dbb2011-11-19 11:37:14 -0300343 {EM2874_R80_GPIO, 0x6f, 0xff, 10},
344 {EM2874_R80_GPIO, 0x4f, 0xff, 10},
345 { -1, -1, -1, -1},
346};
347
Eddi De Pieri82e7dbb2011-11-19 11:37:14 -0300348static struct em28xx_reg_seq hauppauge_930c_digital[] = {
349 {EM2874_R80_GPIO, 0xf6, 0xff, 10},
350 {EM2874_R80_GPIO, 0xe6, 0xff, 100},
351 {EM2874_R80_GPIO, 0xa6, 0xff, 10},
352 { -1, -1, -1, -1},
353};
354#endif
355
Antti Palosaari35530852012-03-18 18:09:01 -0300356/* 1b80:e425 MaxMedia UB425-TC
357 * GPIO_6 - demod reset, 0=active
358 * GPIO_7 - LED, 0=active
359 */
360static struct em28xx_reg_seq maxmedia_ub425_tc[] = {
361 {EM2874_R80_GPIO, 0x83, 0xff, 100},
362 {EM2874_R80_GPIO, 0xc3, 0xff, 100}, /* GPIO_6 = 1 */
363 {EM2874_R80_GPIO, 0x43, 0xff, 000}, /* GPIO_7 = 0 */
364 {-1, -1, -1, -1},
365};
366
Antti Palosaaric247d7b2012-03-19 11:48:19 -0300367/* 2013:0251 PCTV QuatroStick nano (520e)
368 * GPIO_2: decoder reset, 0=active
369 * GPIO_4: decoder suspend, 0=active
370 * GPIO_6: demod reset, 0=active
371 * GPIO_7: LED, 1=active
372 */
373static struct em28xx_reg_seq pctv_520e[] = {
374 {EM2874_R80_GPIO, 0x10, 0xff, 100},
375 {EM2874_R80_GPIO, 0x14, 0xff, 100}, /* GPIO_2 = 1 */
376 {EM2874_R80_GPIO, 0x54, 0xff, 050}, /* GPIO_6 = 1 */
377 {EM2874_R80_GPIO, 0xd4, 0xff, 000}, /* GPIO_7 = 1 */
378 { -1, -1, -1, -1},
379};
380
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -0300381/*
382 * Board definitions
383 */
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800384struct em28xx_board em28xx_boards[] = {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300385 [EM2750_BOARD_UNKNOWN] = {
Mauro Carvalho Chehab8b220792009-07-12 10:56:21 -0300386 .name = "EM2710/EM2750/EM2751 webcam grabber",
Mauro Carvalho Chehab3d3215c2009-08-10 10:29:27 -0300387 .xclk = EM28XX_XCLK_FREQUENCY_20MHZ,
Mauro Carvalho Chehab8a2e6992009-07-12 10:26:36 -0300388 .tuner_type = TUNER_ABSENT,
389 .is_webcam = 1,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300390 .input = { {
391 .type = EM28XX_VMUX_COMPOSITE1,
392 .vmux = 0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300393 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabb80fd2d2009-07-14 21:08:22 -0300394 .gpio = silvercrest_reg_seq,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300395 } },
396 },
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -0800397 [EM2800_BOARD_UNKNOWN] = {
398 .name = "Unknown EM2800 video grabber",
399 .is_em2800 = 1,
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -0800400 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300401 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehab1c67e762008-11-27 07:46:59 -0300402 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300403 .input = { {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800404 .type = EM28XX_VMUX_COMPOSITE1,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300405 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300406 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300407 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800408 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300409 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300410 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300411 } },
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -0800412 },
413 [EM2820_BOARD_UNKNOWN] = {
Mauro Carvalho Chehaba2070c62008-11-25 07:05:06 -0300414 .name = "Unknown EM2750/28xx video grabber",
415 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehabb04fb662009-07-13 01:28:21 -0300416 .is_webcam = 1, /* To enable sensor probe */
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -0800417 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300418 [EM2750_BOARD_DLCW_130] = {
419 /* Beijing Huaqi Information Digital Technology Co., Ltd */
420 .name = "Huaqi DLCW-130",
421 .valid = EM28XX_BOARD_NOT_VALIDATED,
Mauro Carvalho Chehaba2070c62008-11-25 07:05:06 -0300422 .xclk = EM28XX_XCLK_FREQUENCY_48MHZ,
Mauro Carvalho Chehab8a2e6992009-07-12 10:26:36 -0300423 .tuner_type = TUNER_ABSENT,
424 .is_webcam = 1,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300425 .input = { {
426 .type = EM28XX_VMUX_COMPOSITE1,
427 .vmux = 0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300428 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300429 } },
430 },
Markus Rechberger4d17d082006-02-07 06:25:39 -0200431 [EM2820_BOARD_KWORLD_PVRTV2800RF] = {
Markus Rechberger33ccaa32006-02-07 06:25:41 -0200432 .name = "Kworld PVR TV 2800 RF",
Mauro Carvalho Chehabed086312008-01-24 06:59:20 -0300433 .tuner_type = TUNER_TEMIC_PAL,
Markus Rechberger4d17d082006-02-07 06:25:39 -0200434 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300435 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300436 .input = { {
Markus Rechberger4d17d082006-02-07 06:25:39 -0200437 .type = EM28XX_VMUX_COMPOSITE1,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300438 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300439 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300440 }, {
Markus Rechberger4d17d082006-02-07 06:25:39 -0200441 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300442 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300443 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300444 } },
Markus Rechberger4d17d082006-02-07 06:25:39 -0200445 },
Douglas Schilling Landgraff7fe3e62009-01-19 09:31:55 -0300446 [EM2820_BOARD_GADMEI_TVR200] = {
447 .name = "Gadmei TVR200",
448 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
449 .tda9887_conf = TDA9887_PRESENT,
450 .decoder = EM28XX_SAA711X,
451 .input = { {
452 .type = EM28XX_VMUX_TELEVISION,
453 .vmux = SAA7115_COMPOSITE2,
454 .amux = EM28XX_AMUX_LINE_IN,
455 }, {
456 .type = EM28XX_VMUX_COMPOSITE1,
457 .vmux = SAA7115_COMPOSITE0,
458 .amux = EM28XX_AMUX_LINE_IN,
459 }, {
460 .type = EM28XX_VMUX_SVIDEO,
461 .vmux = SAA7115_SVIDEO3,
462 .amux = EM28XX_AMUX_LINE_IN,
463 } },
464 },
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800465 [EM2820_BOARD_TERRATEC_CINERGY_250] = {
466 .name = "Terratec Cinergy 250 USB",
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800467 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
Mauro Carvalho Chehabac07bb72009-09-08 14:04:41 -0300468 .has_ir_i2c = 1,
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800469 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300470 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300471 .input = { {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800472 .type = EM28XX_VMUX_TELEVISION,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300473 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300474 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300475 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800476 .type = EM28XX_VMUX_COMPOSITE1,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300477 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300478 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300479 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800480 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300481 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300482 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300483 } },
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800484 },
485 [EM2820_BOARD_PINNACLE_USB_2] = {
486 .name = "Pinnacle PCTV USB 2",
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800487 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
Mauro Carvalho Chehabac07bb72009-09-08 14:04:41 -0300488 .has_ir_i2c = 1,
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800489 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300490 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300491 .input = { {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800492 .type = EM28XX_VMUX_TELEVISION,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300493 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300494 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300495 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800496 .type = EM28XX_VMUX_COMPOSITE1,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300497 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300498 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300499 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800500 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300501 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300502 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300503 } },
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800504 },
505 [EM2820_BOARD_HAUPPAUGE_WINTV_USB_2] = {
506 .name = "Hauppauge WinTV USB 2",
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800507 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300508 .tda9887_conf = TDA9887_PRESENT |
Nicola Soranzoa1a6ee72009-02-10 23:28:24 -0300509 TDA9887_PORT1_ACTIVE |
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300510 TDA9887_PORT2_ACTIVE,
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800511 .decoder = EM28XX_TVP5150,
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800512 .has_msp34xx = 1,
Mauro Carvalho Chehabac07bb72009-09-08 14:04:41 -0300513 .has_ir_i2c = 1,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300514 .input = { {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800515 .type = EM28XX_VMUX_TELEVISION,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300516 .vmux = TVP5150_COMPOSITE0,
Hans Verkuil2474ed42006-03-19 12:35:57 -0300517 .amux = MSP_INPUT_DEFAULT,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300518 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800519 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300520 .vmux = TVP5150_SVIDEO,
Hans Verkuil07151722006-04-01 18:03:23 -0300521 .amux = MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1,
522 MSP_DSP_IN_SCART, MSP_DSP_IN_SCART),
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300523 } },
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800524 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300525 [EM2820_BOARD_DLINK_USB_TV] = {
526 .name = "D-Link DUB-T210 TV Tuner",
527 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300528 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
529 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300530 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300531 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300532 .type = EM28XX_VMUX_TELEVISION,
533 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300534 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300535 }, {
536 .type = EM28XX_VMUX_COMPOSITE1,
537 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300538 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300539 }, {
540 .type = EM28XX_VMUX_SVIDEO,
541 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300542 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300543 } },
544 },
545 [EM2820_BOARD_HERCULES_SMART_TV_USB2] = {
546 .name = "Hercules Smart TV USB 2.0",
547 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300548 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
549 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300550 .decoder = EM28XX_SAA711X,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300551 .input = { {
552 .type = EM28XX_VMUX_TELEVISION,
553 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300554 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300555 }, {
556 .type = EM28XX_VMUX_COMPOSITE1,
557 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300558 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300559 }, {
560 .type = EM28XX_VMUX_SVIDEO,
561 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300562 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300563 } },
564 },
565 [EM2820_BOARD_PINNACLE_USB_2_FM1216ME] = {
566 .name = "Pinnacle PCTV USB 2 (Philips FM1216ME)",
567 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300568 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
569 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300570 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300571 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300572 .type = EM28XX_VMUX_TELEVISION,
573 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300574 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300575 }, {
576 .type = EM28XX_VMUX_COMPOSITE1,
577 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300578 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300579 }, {
580 .type = EM28XX_VMUX_SVIDEO,
581 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300582 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300583 } },
584 },
585 [EM2820_BOARD_GADMEI_UTV310] = {
586 .name = "Gadmei UTV310",
587 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300588 .tuner_type = TUNER_TNF_5335MF,
589 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300590 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300591 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300592 .type = EM28XX_VMUX_TELEVISION,
593 .vmux = SAA7115_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300594 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300595 }, {
596 .type = EM28XX_VMUX_COMPOSITE1,
597 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300598 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300599 }, {
600 .type = EM28XX_VMUX_SVIDEO,
601 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300602 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300603 } },
604 },
605 [EM2820_BOARD_LEADTEK_WINFAST_USBII_DELUXE] = {
606 .name = "Leadtek Winfast USB II Deluxe",
607 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300608 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
Magnus Almca39d842009-11-13 05:48:24 -0300609 .has_ir_i2c = 1,
610 .tvaudio_addr = 0x58,
611 .tda9887_conf = TDA9887_PRESENT |
612 TDA9887_PORT2_ACTIVE |
613 TDA9887_QSS,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300614 .decoder = EM28XX_SAA711X,
Magnus Almca39d842009-11-13 05:48:24 -0300615 .adecoder = EM28XX_TVAUDIO,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300616 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300617 .type = EM28XX_VMUX_TELEVISION,
Magnus Almca39d842009-11-13 05:48:24 -0300618 .vmux = SAA7115_COMPOSITE4,
619 .amux = EM28XX_AMUX_AUX,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300620 }, {
621 .type = EM28XX_VMUX_COMPOSITE1,
Magnus Almca39d842009-11-13 05:48:24 -0300622 .vmux = SAA7115_COMPOSITE5,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300623 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300624 }, {
625 .type = EM28XX_VMUX_SVIDEO,
Magnus Almca39d842009-11-13 05:48:24 -0300626 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300627 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300628 } },
Magnus Almca39d842009-11-13 05:48:24 -0300629 .radio = {
630 .type = EM28XX_RADIO,
631 .amux = EM28XX_AMUX_AUX,
632 }
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300633 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300634 [EM2820_BOARD_VIDEOLOGY_20K14XUSB] = {
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300635 .name = "Videology 20K14XUSB USB2.0",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300636 .valid = EM28XX_BOARD_NOT_VALIDATED,
Mauro Carvalho Chehab8a2e6992009-07-12 10:26:36 -0300637 .tuner_type = TUNER_ABSENT,
638 .is_webcam = 1,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300639 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300640 .type = EM28XX_VMUX_COMPOSITE1,
641 .vmux = 0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300642 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300643 } },
644 },
Mauro Carvalho Chehab02e78042009-06-29 11:35:05 -0300645 [EM2820_BOARD_SILVERCREST_WEBCAM] = {
646 .name = "Silvercrest Webcam 1.3mpix",
647 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehabc43221d2009-07-12 10:23:23 -0300648 .is_webcam = 1,
Mauro Carvalho Chehab02e78042009-06-29 11:35:05 -0300649 .input = { {
650 .type = EM28XX_VMUX_COMPOSITE1,
651 .vmux = 0,
652 .amux = EM28XX_AMUX_VIDEO,
653 .gpio = silvercrest_reg_seq,
654 } },
655 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300656 [EM2821_BOARD_SUPERCOMP_USB_2] = {
657 .name = "Supercomp USB 2.0 TV",
658 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300659 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
660 .tda9887_conf = TDA9887_PRESENT |
661 TDA9887_PORT1_ACTIVE |
662 TDA9887_PORT2_ACTIVE,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300663 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300664 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300665 .type = EM28XX_VMUX_TELEVISION,
666 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300667 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300668 }, {
669 .type = EM28XX_VMUX_COMPOSITE1,
670 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300671 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300672 }, {
673 .type = EM28XX_VMUX_SVIDEO,
674 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300675 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300676 } },
677 },
678 [EM2821_BOARD_USBGEAR_VD204] = {
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300679 .name = "Usbgear VD204v9",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300680 .valid = EM28XX_BOARD_NOT_VALIDATED,
Mauro Carvalho Chehab1c67e762008-11-27 07:46:59 -0300681 .tuner_type = TUNER_ABSENT, /* Capture only device */
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300682 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300683 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300684 .type = EM28XX_VMUX_COMPOSITE1,
685 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300686 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300687 }, {
688 .type = EM28XX_VMUX_SVIDEO,
689 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300690 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300691 } },
692 },
693 [EM2860_BOARD_NETGMBH_CAM] = {
694 /* Beijing Huaqi Information Digital Technology Co., Ltd */
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300695 .name = "NetGMBH Cam",
696 .valid = EM28XX_BOARD_NOT_VALIDATED,
Mauro Carvalho Chehab8a2e6992009-07-12 10:26:36 -0300697 .tuner_type = TUNER_ABSENT,
698 .is_webcam = 1,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300699 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300700 .type = EM28XX_VMUX_COMPOSITE1,
701 .vmux = 0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300702 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300703 } },
704 },
705 [EM2860_BOARD_TYPHOON_DVD_MAKER] = {
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300706 .name = "Typhoon DVD Maker",
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300707 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehab1c67e762008-11-27 07:46:59 -0300708 .tuner_type = TUNER_ABSENT, /* Capture only device */
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300709 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300710 .type = EM28XX_VMUX_COMPOSITE1,
711 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300712 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300713 }, {
714 .type = EM28XX_VMUX_SVIDEO,
715 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300716 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300717 } },
718 },
719 [EM2860_BOARD_GADMEI_UTV330] = {
720 .name = "Gadmei UTV330",
721 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300722 .tuner_type = TUNER_TNF_5335MF,
723 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300724 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300725 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300726 .type = EM28XX_VMUX_TELEVISION,
727 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300728 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300729 }, {
730 .type = EM28XX_VMUX_COMPOSITE1,
731 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300732 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300733 }, {
734 .type = EM28XX_VMUX_SVIDEO,
735 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300736 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300737 } },
738 },
Mauro Carvalho Chehab6d888a62009-08-30 13:05:56 -0300739 [EM2861_BOARD_GADMEI_UTV330PLUS] = {
740 .name = "Gadmei UTV330+",
741 .tuner_type = TUNER_TNF_5335MF,
742 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehab02858ee2010-04-02 20:01:00 -0300743 .ir_codes = RC_MAP_GADMEI_RM008Z,
Mauro Carvalho Chehab6d888a62009-08-30 13:05:56 -0300744 .decoder = EM28XX_SAA711X,
745 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ,
746 .input = { {
747 .type = EM28XX_VMUX_TELEVISION,
748 .vmux = SAA7115_COMPOSITE2,
749 .amux = EM28XX_AMUX_VIDEO,
750 }, {
751 .type = EM28XX_VMUX_COMPOSITE1,
752 .vmux = SAA7115_COMPOSITE0,
753 .amux = EM28XX_AMUX_LINE_IN,
754 }, {
755 .type = EM28XX_VMUX_SVIDEO,
756 .vmux = SAA7115_SVIDEO3,
757 .amux = EM28XX_AMUX_LINE_IN,
758 } },
759 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300760 [EM2860_BOARD_TERRATEC_HYBRID_XS] = {
761 .name = "Terratec Cinergy A Hybrid XS",
762 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300763 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -0300764 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300765 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -0300766
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300767 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300768 .type = EM28XX_VMUX_TELEVISION,
769 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300770 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -0300771 .gpio = hauppauge_wintv_hvr_900_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300772 }, {
773 .type = EM28XX_VMUX_COMPOSITE1,
774 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300775 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -0300776 .gpio = hauppauge_wintv_hvr_900_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300777 }, {
778 .type = EM28XX_VMUX_SVIDEO,
779 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300780 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -0300781 .gpio = hauppauge_wintv_hvr_900_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300782 } },
783 },
784 [EM2861_BOARD_KWORLD_PVRTV_300U] = {
785 .name = "KWorld PVRTV 300U",
786 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300787 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -0300788 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300789 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300790 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300791 .type = EM28XX_VMUX_TELEVISION,
792 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300793 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300794 }, {
795 .type = EM28XX_VMUX_COMPOSITE1,
796 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300797 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300798 }, {
799 .type = EM28XX_VMUX_SVIDEO,
800 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300801 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300802 } },
803 },
804 [EM2861_BOARD_YAKUMO_MOVIE_MIXER] = {
805 .name = "Yakumo MovieMixer",
Nicola Soranzoa1a6ee72009-02-10 23:28:24 -0300806 .tuner_type = TUNER_ABSENT, /* Capture only device */
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300807 .decoder = EM28XX_TVP5150,
808 .input = { {
809 .type = EM28XX_VMUX_TELEVISION,
810 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300811 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300812 }, {
813 .type = EM28XX_VMUX_COMPOSITE1,
814 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300815 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300816 }, {
817 .type = EM28XX_VMUX_SVIDEO,
818 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300819 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300820 } },
821 },
Devin Heitmueller443fed92010-03-19 23:53:12 -0300822 [EM2860_BOARD_TVP5150_REFERENCE_DESIGN] = {
823 .name = "EM2860/TVP5150 Reference Design",
824 .tuner_type = TUNER_ABSENT, /* Capture only device */
825 .decoder = EM28XX_TVP5150,
826 .input = { {
827 .type = EM28XX_VMUX_COMPOSITE1,
828 .vmux = TVP5150_COMPOSITE1,
829 .amux = EM28XX_AMUX_LINE_IN,
830 }, {
831 .type = EM28XX_VMUX_SVIDEO,
832 .vmux = TVP5150_SVIDEO,
833 .amux = EM28XX_AMUX_LINE_IN,
834 } },
835 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300836 [EM2861_BOARD_PLEXTOR_PX_TV100U] = {
837 .name = "Plextor ConvertX PX-TV100U",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300838 .tuner_type = TUNER_TNF_5335MF,
Mauro Carvalho Chehab0a6e44d2009-07-29 01:39:12 -0300839 .xclk = EM28XX_XCLK_I2S_MSB_TIMING |
840 EM28XX_XCLK_FREQUENCY_12MHZ,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300841 .tda9887_conf = TDA9887_PRESENT,
842 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehab0a6e44d2009-07-29 01:39:12 -0300843 .has_msp34xx = 1,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300844 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300845 .type = EM28XX_VMUX_TELEVISION,
846 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300847 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab0a6e44d2009-07-29 01:39:12 -0300848 .gpio = pinnacle_hybrid_pro_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300849 }, {
850 .type = EM28XX_VMUX_COMPOSITE1,
851 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300852 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab0a6e44d2009-07-29 01:39:12 -0300853 .gpio = pinnacle_hybrid_pro_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300854 }, {
855 .type = EM28XX_VMUX_SVIDEO,
856 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300857 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab0a6e44d2009-07-29 01:39:12 -0300858 .gpio = pinnacle_hybrid_pro_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300859 } },
860 },
Mauro Carvalho Chehab1c67e762008-11-27 07:46:59 -0300861
862 /* Those boards with em2870 are DVB Only*/
863
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300864 [EM2870_BOARD_TERRATEC_XS] = {
865 .name = "Terratec Cinergy T XS",
866 .valid = EM28XX_BOARD_NOT_VALIDATED,
867 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -0300868 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300869 },
870 [EM2870_BOARD_TERRATEC_XS_MT2060] = {
871 .name = "Terratec Cinergy T XS (MT2060)",
872 .valid = EM28XX_BOARD_NOT_VALIDATED,
873 .tuner_type = TUNER_ABSENT, /* MT2060 */
874 },
875 [EM2870_BOARD_KWORLD_350U] = {
876 .name = "Kworld 350 U DVB-T",
877 .valid = EM28XX_BOARD_NOT_VALIDATED,
878 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -0300879 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300880 },
881 [EM2870_BOARD_KWORLD_355U] = {
882 .name = "Kworld 355 U DVB-T",
883 .valid = EM28XX_BOARD_NOT_VALIDATED,
Aivar Päkk1985f6f2011-12-11 18:15:00 -0300884 .tuner_type = TUNER_ABSENT,
885 .tuner_gpio = default_tuner_gpio,
886 .has_dvb = 1,
887 .dvb_gpio = default_digital,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300888 },
889 [EM2870_BOARD_PINNACLE_PCTV_DVB] = {
890 .name = "Pinnacle PCTV DVB-T",
891 .valid = EM28XX_BOARD_NOT_VALIDATED,
892 .tuner_type = TUNER_ABSENT, /* MT2060 */
Mauro Carvalho Chehaba2070c62008-11-25 07:05:06 -0300893 /* djh - I have serious doubts this is right... */
894 .xclk = EM28XX_XCLK_IR_RC5_MODE |
895 EM28XX_XCLK_FREQUENCY_10MHZ,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300896 },
897 [EM2870_BOARD_COMPRO_VIDEOMATE] = {
898 .name = "Compro, VideoMate U3",
899 .valid = EM28XX_BOARD_NOT_VALIDATED,
900 .tuner_type = TUNER_ABSENT, /* MT2060 */
901 },
Mauro Carvalho Chehab1c67e762008-11-27 07:46:59 -0300902
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300903 [EM2880_BOARD_TERRATEC_HYBRID_XS_FR] = {
904 .name = "Terratec Hybrid XS Secam",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300905 .has_msp34xx = 1,
906 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -0300907 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300908 .decoder = EM28XX_TVP5150,
Catimimi65638012010-02-18 18:06:32 -0300909 .has_dvb = 1,
Michel Garniercec4e6c2010-10-16 14:42:01 -0300910 .dvb_gpio = terratec_cinergy_USB_XS_FR_digital,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300911 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300912 .type = EM28XX_VMUX_TELEVISION,
913 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300914 .amux = EM28XX_AMUX_VIDEO,
Michel Garniercec4e6c2010-10-16 14:42:01 -0300915 .gpio = terratec_cinergy_USB_XS_FR_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300916 }, {
917 .type = EM28XX_VMUX_COMPOSITE1,
918 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300919 .amux = EM28XX_AMUX_LINE_IN,
Michel Garniercec4e6c2010-10-16 14:42:01 -0300920 .gpio = terratec_cinergy_USB_XS_FR_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300921 }, {
922 .type = EM28XX_VMUX_SVIDEO,
923 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300924 .amux = EM28XX_AMUX_LINE_IN,
Michel Garniercec4e6c2010-10-16 14:42:01 -0300925 .gpio = terratec_cinergy_USB_XS_FR_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300926 } },
927 },
Mauro Carvalho Chehabfec528b2011-07-03 21:05:06 -0300928 [EM2884_BOARD_TERRATEC_H5] = {
929 .name = "Terratec Cinergy H5",
930 .has_dvb = 1,
931#if 0
932 .tuner_type = TUNER_PHILIPS_TDA8290,
933 .tuner_addr = 0x41,
934 .dvb_gpio = terratec_h5_digital, /* FIXME: probably wrong */
935 .tuner_gpio = terratec_h5_gpio,
Mauro Carvalho Chehabde724052011-11-20 11:23:24 -0200936#else
937 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehabfec528b2011-07-03 21:05:06 -0300938#endif
939 .i2c_speed = EM2874_I2C_SECONDARY_BUS_SELECT |
940 EM28XX_I2C_CLK_WAIT_ENABLE |
941 EM28XX_I2C_FREQ_400_KHZ,
942 },
Eddi De Pieri82e7dbb2011-11-19 11:37:14 -0300943 [EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C] = {
944 .name = "Hauppauge WinTV HVR 930C",
945 .has_dvb = 1,
Mauro Carvalho Chehabde724052011-11-20 11:23:24 -0200946#if 0 /* FIXME: Add analog support */
947 .tuner_type = TUNER_XC5000,
948 .tuner_addr = 0x41,
949 .dvb_gpio = hauppauge_930c_digital,
Eddi De Pieri82e7dbb2011-11-19 11:37:14 -0300950 .tuner_gpio = hauppauge_930c_gpio,
Mauro Carvalho Chehabde724052011-11-20 11:23:24 -0200951#else
952 .tuner_type = TUNER_ABSENT,
953#endif
Mauro Carvalho Chehabdfbbf5d2011-11-20 12:16:25 -0200954 .ir_codes = RC_MAP_HAUPPAUGE,
Eddi De Pieri82e7dbb2011-11-19 11:37:14 -0300955 .i2c_speed = EM2874_I2C_SECONDARY_BUS_SELECT |
956 EM28XX_I2C_CLK_WAIT_ENABLE |
957 EM28XX_I2C_FREQ_400_KHZ,
958 },
Andreas Oberrittera1ed02e2011-11-16 11:06:50 -0300959 [EM2884_BOARD_CINERGY_HTC_STICK] = {
960 .name = "Terratec Cinergy HTC Stick",
961 .has_dvb = 1,
962#if 0
963 .tuner_type = TUNER_PHILIPS_TDA8290,
964 .tuner_addr = 0x41,
965 .dvb_gpio = terratec_h5_digital, /* FIXME: probably wrong */
966 .tuner_gpio = terratec_h5_gpio,
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800967#endif
968 .i2c_speed = EM2874_I2C_SECONDARY_BUS_SELECT |
969 EM28XX_I2C_CLK_WAIT_ENABLE |
970 EM28XX_I2C_FREQ_400_KHZ,
971 },
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -0300972 [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900] = {
Aidan Thornton122d1582007-11-20 15:25:08 -0300973 .name = "Hauppauge WinTV HVR 900",
Aidan Thornton122d1582007-11-20 15:25:08 -0300974 .tda9887_conf = TDA9887_PRESENT,
975 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -0300976 .tuner_gpio = default_tuner_gpio,
Mauro Carvalho Chehab5add9a62007-11-22 12:08:53 -0300977 .mts_firmware = 1,
Mauro Carvalho Chehaba2070c62008-11-25 07:05:06 -0300978 .has_dvb = 1,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -0300979 .dvb_gpio = hauppauge_wintv_hvr_900_digital,
Mauro Carvalho Chehabaf86ce72011-01-24 12:18:48 -0300980 .ir_codes = RC_MAP_HAUPPAUGE,
Aidan Thornton122d1582007-11-20 15:25:08 -0300981 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300982 .input = { {
Aidan Thornton122d1582007-11-20 15:25:08 -0300983 .type = EM28XX_VMUX_TELEVISION,
984 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300985 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -0300986 .gpio = hauppauge_wintv_hvr_900_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300987 }, {
Aidan Thornton122d1582007-11-20 15:25:08 -0300988 .type = EM28XX_VMUX_COMPOSITE1,
989 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300990 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -0300991 .gpio = hauppauge_wintv_hvr_900_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300992 }, {
Aidan Thornton122d1582007-11-20 15:25:08 -0300993 .type = EM28XX_VMUX_SVIDEO,
994 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300995 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -0300996 .gpio = hauppauge_wintv_hvr_900_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300997 } },
Aidan Thornton122d1582007-11-20 15:25:08 -0300998 },
Devin Heitmueller17d9d552008-06-08 10:22:03 -0300999 [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2] = {
1000 .name = "Hauppauge WinTV HVR 900 (R2)",
Devin Heitmueller17d9d552008-06-08 10:22:03 -03001001 .tda9887_conf = TDA9887_PRESENT,
1002 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001003 .tuner_gpio = default_tuner_gpio,
Devin Heitmueller17d9d552008-06-08 10:22:03 -03001004 .mts_firmware = 1,
Devin Heitmueller75e2b862011-03-13 02:01:02 -03001005 .has_dvb = 1,
Devin Heitmueller7030f522011-03-13 02:04:53 -03001006 .dvb_gpio = hauppauge_wintv_hvr_900R2_digital,
Mauro Carvalho Chehabaf86ce72011-01-24 12:18:48 -03001007 .ir_codes = RC_MAP_HAUPPAUGE,
Devin Heitmueller17d9d552008-06-08 10:22:03 -03001008 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001009 .input = { {
Devin Heitmueller17d9d552008-06-08 10:22:03 -03001010 .type = EM28XX_VMUX_TELEVISION,
1011 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001012 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001013 .gpio = hauppauge_wintv_hvr_900_analog,
Devin Heitmueller17d9d552008-06-08 10:22:03 -03001014 }, {
1015 .type = EM28XX_VMUX_COMPOSITE1,
1016 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehaba5942b52008-11-27 07:44:00 -03001017 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001018 .gpio = hauppauge_wintv_hvr_900_analog,
Devin Heitmueller17d9d552008-06-08 10:22:03 -03001019 }, {
1020 .type = EM28XX_VMUX_SVIDEO,
1021 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001022 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001023 .gpio = hauppauge_wintv_hvr_900_analog,
Devin Heitmueller17d9d552008-06-08 10:22:03 -03001024 } },
1025 },
Douglas Schilling Landgraff89bc322008-12-01 21:01:04 -03001026 [EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850] = {
1027 .name = "Hauppauge WinTV HVR 850",
1028 .tuner_type = TUNER_XC2028,
1029 .tuner_gpio = default_tuner_gpio,
1030 .mts_firmware = 1,
1031 .has_dvb = 1,
1032 .dvb_gpio = hauppauge_wintv_hvr_900_digital,
Mauro Carvalho Chehabaf86ce72011-01-24 12:18:48 -03001033 .ir_codes = RC_MAP_HAUPPAUGE,
Douglas Schilling Landgraff89bc322008-12-01 21:01:04 -03001034 .decoder = EM28XX_TVP5150,
1035 .input = { {
1036 .type = EM28XX_VMUX_TELEVISION,
1037 .vmux = TVP5150_COMPOSITE0,
1038 .amux = EM28XX_AMUX_VIDEO,
1039 .gpio = hauppauge_wintv_hvr_900_analog,
1040 }, {
1041 .type = EM28XX_VMUX_COMPOSITE1,
1042 .vmux = TVP5150_COMPOSITE1,
1043 .amux = EM28XX_AMUX_LINE_IN,
1044 .gpio = hauppauge_wintv_hvr_900_analog,
1045 }, {
1046 .type = EM28XX_VMUX_SVIDEO,
1047 .vmux = TVP5150_SVIDEO,
1048 .amux = EM28XX_AMUX_LINE_IN,
1049 .gpio = hauppauge_wintv_hvr_900_analog,
1050 } },
1051 },
Mauro Carvalho Chehab10ac6602008-07-27 14:58:58 -03001052 [EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950] = {
Mauro Carvalho Chehab3abee532008-01-05 17:01:41 -03001053 .name = "Hauppauge WinTV HVR 950",
Mauro Carvalho Chehab3abee532008-01-05 17:01:41 -03001054 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001055 .tuner_gpio = default_tuner_gpio,
Mauro Carvalho Chehab3abee532008-01-05 17:01:41 -03001056 .mts_firmware = 1,
Mauro Carvalho Chehab227ad4a2008-04-17 21:37:40 -03001057 .has_dvb = 1,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001058 .dvb_gpio = hauppauge_wintv_hvr_900_digital,
Mauro Carvalho Chehab15195d32011-01-24 12:18:47 -03001059 .ir_codes = RC_MAP_HAUPPAUGE,
Mauro Carvalho Chehab3abee532008-01-05 17:01:41 -03001060 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001061 .input = { {
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001062 .type = EM28XX_VMUX_TELEVISION,
1063 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001064 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001065 .gpio = hauppauge_wintv_hvr_900_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001066 }, {
Mauro Carvalho Chehab7d070e22007-11-01 21:52:58 -03001067 .type = EM28XX_VMUX_COMPOSITE1,
1068 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001069 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001070 .gpio = hauppauge_wintv_hvr_900_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001071 }, {
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001072 .type = EM28XX_VMUX_SVIDEO,
1073 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001074 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001075 .gpio = hauppauge_wintv_hvr_900_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001076 } },
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001077 },
Devin Heitmueller4fd305b2008-06-04 13:43:46 -03001078 [EM2880_BOARD_PINNACLE_PCTV_HD_PRO] = {
1079 .name = "Pinnacle PCTV HD Pro Stick",
Devin Heitmueller4fd305b2008-06-04 13:43:46 -03001080 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001081 .tuner_gpio = default_tuner_gpio,
Devin Heitmueller4fd305b2008-06-04 13:43:46 -03001082 .mts_firmware = 1,
Devin Heitmueller4fd305b2008-06-04 13:43:46 -03001083 .has_dvb = 1,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001084 .dvb_gpio = hauppauge_wintv_hvr_900_digital,
Mauro Carvalho Chehab02858ee2010-04-02 20:01:00 -03001085 .ir_codes = RC_MAP_PINNACLE_PCTV_HD,
Devin Heitmueller4fd305b2008-06-04 13:43:46 -03001086 .decoder = EM28XX_TVP5150,
1087 .input = { {
1088 .type = EM28XX_VMUX_TELEVISION,
1089 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001090 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001091 .gpio = hauppauge_wintv_hvr_900_analog,
Devin Heitmueller4fd305b2008-06-04 13:43:46 -03001092 }, {
1093 .type = EM28XX_VMUX_COMPOSITE1,
1094 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001095 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001096 .gpio = hauppauge_wintv_hvr_900_analog,
Devin Heitmueller4fd305b2008-06-04 13:43:46 -03001097 }, {
1098 .type = EM28XX_VMUX_SVIDEO,
1099 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001100 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001101 .gpio = hauppauge_wintv_hvr_900_analog,
Devin Heitmueller4fd305b2008-06-04 13:43:46 -03001102 } },
1103 },
Devin Heitmuellere14b3652008-07-26 11:04:33 -03001104 [EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600] = {
1105 .name = "AMD ATI TV Wonder HD 600",
Devin Heitmuellere14b3652008-07-26 11:04:33 -03001106 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001107 .tuner_gpio = default_tuner_gpio,
Devin Heitmuellere14b3652008-07-26 11:04:33 -03001108 .mts_firmware = 1,
Devin Heitmuellere14b3652008-07-26 11:04:33 -03001109 .has_dvb = 1,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001110 .dvb_gpio = hauppauge_wintv_hvr_900_digital,
Mauro Carvalho Chehab02858ee2010-04-02 20:01:00 -03001111 .ir_codes = RC_MAP_ATI_TV_WONDER_HD_600,
Devin Heitmuellere14b3652008-07-26 11:04:33 -03001112 .decoder = EM28XX_TVP5150,
1113 .input = { {
1114 .type = EM28XX_VMUX_TELEVISION,
1115 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001116 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001117 .gpio = hauppauge_wintv_hvr_900_analog,
Devin Heitmuellere14b3652008-07-26 11:04:33 -03001118 }, {
1119 .type = EM28XX_VMUX_COMPOSITE1,
1120 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001121 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001122 .gpio = hauppauge_wintv_hvr_900_analog,
Devin Heitmuellere14b3652008-07-26 11:04:33 -03001123 }, {
1124 .type = EM28XX_VMUX_SVIDEO,
1125 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001126 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001127 .gpio = hauppauge_wintv_hvr_900_analog,
Devin Heitmuellere14b3652008-07-26 11:04:33 -03001128 } },
1129 },
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001130 [EM2880_BOARD_TERRATEC_HYBRID_XS] = {
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001131 .name = "Terratec Hybrid XS",
1132 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001133 .tuner_gpio = default_tuner_gpio,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001134 .decoder = EM28XX_TVP5150,
reinhard schwab655b8402008-07-26 10:47:00 -03001135 .has_dvb = 1,
Devin Heitmuellerf7976082009-06-22 22:32:32 -03001136 .dvb_gpio = default_digital,
Mauro Carvalho Chehab02858ee2010-04-02 20:01:00 -03001137 .ir_codes = RC_MAP_TERRATEC_CINERGY_XS,
Devin Heitmueller8cd9aae2009-08-03 23:56:51 -03001138 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, /* NEC IR */
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001139 .input = { {
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001140 .type = EM28XX_VMUX_TELEVISION,
1141 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001142 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001143 .gpio = default_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001144 }, {
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001145 .type = EM28XX_VMUX_COMPOSITE1,
1146 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001147 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001148 .gpio = default_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001149 }, {
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001150 .type = EM28XX_VMUX_SVIDEO,
1151 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001152 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001153 .gpio = default_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001154 } },
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001155 },
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001156 /* maybe there's a reason behind it why Terratec sells the Hybrid XS
1157 as Prodigy XS with a different PID, let's keep it separated for now
1158 maybe we'll need it lateron */
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001159 [EM2880_BOARD_TERRATEC_PRODIGY_XS] = {
1160 .name = "Terratec Prodigy XS",
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001161 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001162 .tuner_gpio = default_tuner_gpio,
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001163 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001164 .input = { {
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001165 .type = EM28XX_VMUX_TELEVISION,
1166 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001167 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001168 .gpio = hauppauge_wintv_hvr_900_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001169 }, {
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001170 .type = EM28XX_VMUX_COMPOSITE1,
1171 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001172 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001173 .gpio = hauppauge_wintv_hvr_900_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001174 }, {
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001175 .type = EM28XX_VMUX_SVIDEO,
1176 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001177 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001178 .gpio = hauppauge_wintv_hvr_900_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001179 } },
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001180 },
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08001181 [EM2820_BOARD_MSI_VOX_USB_2] = {
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -03001182 .name = "MSI VOX USB 2.0",
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -03001183 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
1184 .tda9887_conf = TDA9887_PRESENT |
1185 TDA9887_PORT1_ACTIVE |
1186 TDA9887_PORT2_ACTIVE,
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -03001187 .max_range_640_480 = 1,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -03001188 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -03001189 .input = { {
1190 .type = EM28XX_VMUX_TELEVISION,
1191 .vmux = SAA7115_COMPOSITE4,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001192 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001193 }, {
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -03001194 .type = EM28XX_VMUX_COMPOSITE1,
1195 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001196 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001197 }, {
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -03001198 .type = EM28XX_VMUX_SVIDEO,
1199 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001200 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001201 } },
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08001202 },
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -08001203 [EM2800_BOARD_TERRATEC_CINERGY_200] = {
1204 .name = "Terratec Cinergy 200 USB",
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -08001205 .is_em2800 = 1,
Mauro Carvalho Chehabac07bb72009-09-08 14:04:41 -03001206 .has_ir_i2c = 1,
Sascha Sommer53b667e2012-01-08 16:41:22 -03001207 .tuner_type = TUNER_LG_TALN,
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -08001208 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -03001209 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001210 .input = { {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -08001211 .type = EM28XX_VMUX_TELEVISION,
Hans Verkuilc7c0b342006-04-02 13:35:00 -03001212 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001213 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001214 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -08001215 .type = EM28XX_VMUX_COMPOSITE1,
Hans Verkuilc7c0b342006-04-02 13:35:00 -03001216 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001217 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001218 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -08001219 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -03001220 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001221 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001222 } },
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -08001223 },
Aron Szabo59d07f12008-07-27 13:47:52 -03001224 [EM2800_BOARD_GRABBEEX_USB2800] = {
Nicola Soranzoa1a6ee72009-02-10 23:28:24 -03001225 .name = "eMPIA Technology, Inc. GrabBeeX+ Video Encoder",
1226 .is_em2800 = 1,
1227 .decoder = EM28XX_SAA711X,
1228 .tuner_type = TUNER_ABSENT, /* capture only board */
1229 .input = { {
Aron Szabo59d07f12008-07-27 13:47:52 -03001230 .type = EM28XX_VMUX_COMPOSITE1,
1231 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001232 .amux = EM28XX_AMUX_LINE_IN,
Aron Szabo59d07f12008-07-27 13:47:52 -03001233 }, {
1234 .type = EM28XX_VMUX_SVIDEO,
1235 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001236 .amux = EM28XX_AMUX_LINE_IN,
Aron Szabo59d07f12008-07-27 13:47:52 -03001237 } },
1238 },
Mauro Carvalho Chehab694a1012009-11-26 21:26:13 -03001239 [EM2800_BOARD_VC211A] = {
1240 .name = "Actionmaster/LinXcel/Digitus VC211A",
1241 .is_em2800 = 1,
1242 .tuner_type = TUNER_ABSENT, /* Capture-only board */
1243 .decoder = EM28XX_SAA711X,
1244 .input = { {
1245 .type = EM28XX_VMUX_COMPOSITE1,
1246 .vmux = SAA7115_COMPOSITE0,
1247 .amux = EM28XX_AMUX_LINE_IN,
1248 .gpio = vc211a_enable,
1249 }, {
1250 .type = EM28XX_VMUX_SVIDEO,
1251 .vmux = SAA7115_SVIDEO3,
1252 .amux = EM28XX_AMUX_LINE_IN,
1253 .gpio = vc211a_enable,
1254 } },
1255 },
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -08001256 [EM2800_BOARD_LEADTEK_WINFAST_USBII] = {
1257 .name = "Leadtek Winfast USB II",
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -08001258 .is_em2800 = 1,
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -08001259 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
1260 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -03001261 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001262 .input = { {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -08001263 .type = EM28XX_VMUX_TELEVISION,
Hans Verkuilc7c0b342006-04-02 13:35:00 -03001264 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001265 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001266 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -08001267 .type = EM28XX_VMUX_COMPOSITE1,
Hans Verkuilc7c0b342006-04-02 13:35:00 -03001268 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001269 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001270 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -08001271 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -03001272 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001273 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001274 } },
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -08001275 },
1276 [EM2800_BOARD_KWORLD_USB2800] = {
1277 .name = "Kworld USB2800",
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -08001278 .is_em2800 = 1,
Michael Krufkyab8b8702008-04-22 14:46:05 -03001279 .tuner_type = TUNER_PHILIPS_FCV1236D,
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -08001280 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -03001281 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001282 .input = { {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -08001283 .type = EM28XX_VMUX_TELEVISION,
Hans Verkuilc7c0b342006-04-02 13:35:00 -03001284 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001285 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001286 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -08001287 .type = EM28XX_VMUX_COMPOSITE1,
Hans Verkuilc7c0b342006-04-02 13:35:00 -03001288 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001289 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001290 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -08001291 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -03001292 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001293 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001294 } },
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -08001295 },
Mauro Carvalho Chehab45632c42005-11-08 21:38:15 -08001296 [EM2820_BOARD_PINNACLE_DVC_90] = {
Douglas Schilling Landgrafea476892009-09-06 18:41:59 -03001297 .name = "Pinnacle Dazzle DVC 90/100/101/107 / Kaiser Baas Video to DVD maker "
Don Kramer74e07f32012-01-02 16:15:44 -03001298 "/ Kworld DVD Maker 2 / Plextor ConvertX PX-AV100U",
Mauro Carvalho Chehab1c67e762008-11-27 07:46:59 -03001299 .tuner_type = TUNER_ABSENT, /* capture only board */
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -03001300 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001301 .input = { {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -08001302 .type = EM28XX_VMUX_COMPOSITE1,
Hans Verkuilc7c0b342006-04-02 13:35:00 -03001303 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001304 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001305 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -08001306 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -03001307 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001308 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001309 } },
Mauro Carvalho Chehab45632c42005-11-08 21:38:15 -08001310 },
Sascha Sommer43625592007-11-03 15:05:07 -03001311 [EM2800_BOARD_VGEAR_POCKETTV] = {
1312 .name = "V-Gear PocketTV",
1313 .is_em2800 = 1,
Sascha Sommer43625592007-11-03 15:05:07 -03001314 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
1315 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -03001316 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001317 .input = { {
Sascha Sommer43625592007-11-03 15:05:07 -03001318 .type = EM28XX_VMUX_TELEVISION,
1319 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001320 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001321 }, {
Sascha Sommer43625592007-11-03 15:05:07 -03001322 .type = EM28XX_VMUX_COMPOSITE1,
1323 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001324 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001325 }, {
Sascha Sommer43625592007-11-03 15:05:07 -03001326 .type = EM28XX_VMUX_SVIDEO,
1327 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001328 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001329 } },
Sascha Sommer43625592007-11-03 15:05:07 -03001330 },
Douglas Schilling Landgraf1e1addd2008-12-27 21:38:14 -03001331 [EM2820_BOARD_PROLINK_PLAYTV_BOX4_USB2] = {
1332 .name = "Pixelview PlayTV Box 4 USB 2.0",
1333 .tda9887_conf = TDA9887_PRESENT,
1334 .tuner_type = TUNER_YMEC_TVF_5533MF,
1335 .decoder = EM28XX_SAA711X,
1336 .input = { {
1337 .type = EM28XX_VMUX_TELEVISION,
1338 .vmux = SAA7115_COMPOSITE2,
1339 .amux = EM28XX_AMUX_VIDEO,
1340 .aout = EM28XX_AOUT_MONO | /* I2S */
1341 EM28XX_AOUT_MASTER, /* Line out pin */
1342 }, {
1343 .type = EM28XX_VMUX_COMPOSITE1,
1344 .vmux = SAA7115_COMPOSITE0,
1345 .amux = EM28XX_AMUX_LINE_IN,
1346 }, {
1347 .type = EM28XX_VMUX_SVIDEO,
1348 .vmux = SAA7115_SVIDEO3,
1349 .amux = EM28XX_AMUX_LINE_IN,
1350 } },
1351 },
Mauro Carvalho Chehabea4fd562007-11-03 21:21:57 -03001352 [EM2820_BOARD_PROLINK_PLAYTV_USB2] = {
Douglas Schilling Landgraf1f372a92009-02-25 16:54:31 -03001353 .name = "SIIG AVTuner-PVR / Pixelview Prolink PlayTV USB 2.0",
Douglas Schilling Landgraf5609cfd2008-12-27 21:39:35 -03001354 .has_snapshot_button = 1,
Mauro Carvalho Chehabea4fd562007-11-03 21:21:57 -03001355 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabed086312008-01-24 06:59:20 -03001356 .tuner_type = TUNER_YMEC_TVF_5533MF,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -03001357 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001358 .input = { {
Mauro Carvalho Chehabea4fd562007-11-03 21:21:57 -03001359 .type = EM28XX_VMUX_TELEVISION,
1360 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab30e4ac72008-11-20 13:43:05 -03001361 .amux = EM28XX_AMUX_VIDEO,
1362 .aout = EM28XX_AOUT_MONO | /* I2S */
1363 EM28XX_AOUT_MASTER, /* Line out pin */
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001364 }, {
Mauro Carvalho Chehabea4fd562007-11-03 21:21:57 -03001365 .type = EM28XX_VMUX_COMPOSITE1,
1366 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab7463dda2008-02-05 22:29:26 -03001367 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001368 }, {
Mauro Carvalho Chehabea4fd562007-11-03 21:21:57 -03001369 .type = EM28XX_VMUX_SVIDEO,
1370 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab7463dda2008-02-05 22:29:26 -03001371 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001372 } },
Mauro Carvalho Chehabea4fd562007-11-03 21:21:57 -03001373 },
Devin Heitmueller3ed58ba2009-05-27 23:27:26 -03001374 [EM2860_BOARD_SAA711X_REFERENCE_DESIGN] = {
1375 .name = "EM2860/SAA711X Reference Design",
Devin Heitmuellera9fc52b2008-06-28 08:57:06 -03001376 .has_snapshot_button = 1,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001377 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -03001378 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001379 .input = { {
Devin Heitmuellera9fc52b2008-06-28 08:57:06 -03001380 .type = EM28XX_VMUX_SVIDEO,
1381 .vmux = SAA7115_SVIDEO3,
Devin Heitmueller3ed58ba2009-05-27 23:27:26 -03001382 }, {
1383 .type = EM28XX_VMUX_COMPOSITE1,
1384 .vmux = SAA7115_COMPOSITE0,
Devin Heitmuellera9fc52b2008-06-28 08:57:06 -03001385 } },
1386 },
Mauro Carvalho Chehabca3dfd62010-09-10 17:29:14 -03001387
Mauro Carvalho Chehabebaefdb2011-06-01 10:16:25 -03001388 [EM2874_BOARD_LEADERSHIP_ISDBT] = {
Mauro Carvalho Chehabca3dfd62010-09-10 17:29:14 -03001389 .i2c_speed = EM2874_I2C_SECONDARY_BUS_SELECT |
1390 EM28XX_I2C_CLK_WAIT_ENABLE |
1391 EM28XX_I2C_FREQ_100_KHZ,
1392 .xclk = EM28XX_XCLK_FREQUENCY_10MHZ,
1393 .name = "EM2874 Leadership ISDBT",
1394 .tuner_type = TUNER_ABSENT,
1395 .tuner_gpio = leadership_reset,
1396 .dvb_gpio = leadership_digital,
1397 .has_dvb = 1,
1398 },
1399
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001400 [EM2880_BOARD_MSI_DIGIVOX_AD] = {
1401 .name = "MSI DigiVox A/D",
1402 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001403 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001404 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001405 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001406 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001407 .type = EM28XX_VMUX_TELEVISION,
1408 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001409 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001410 .gpio = em2880_msi_digivox_ad_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001411 }, {
1412 .type = EM28XX_VMUX_COMPOSITE1,
1413 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001414 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001415 .gpio = em2880_msi_digivox_ad_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001416 }, {
1417 .type = EM28XX_VMUX_SVIDEO,
1418 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001419 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001420 .gpio = em2880_msi_digivox_ad_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001421 } },
1422 },
1423 [EM2880_BOARD_MSI_DIGIVOX_AD_II] = {
1424 .name = "MSI DigiVox A/D II",
1425 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001426 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001427 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001428 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001429 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001430 .type = EM28XX_VMUX_TELEVISION,
1431 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001432 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001433 .gpio = em2880_msi_digivox_ad_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001434 }, {
1435 .type = EM28XX_VMUX_COMPOSITE1,
1436 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001437 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001438 .gpio = em2880_msi_digivox_ad_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001439 }, {
1440 .type = EM28XX_VMUX_SVIDEO,
1441 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001442 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001443 .gpio = em2880_msi_digivox_ad_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001444 } },
1445 },
1446 [EM2880_BOARD_KWORLD_DVB_305U] = {
1447 .name = "KWorld DVB-T 305U",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001448 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001449 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001450 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001451 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001452 .type = EM28XX_VMUX_TELEVISION,
1453 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001454 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001455 }, {
1456 .type = EM28XX_VMUX_COMPOSITE1,
1457 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001458 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001459 }, {
1460 .type = EM28XX_VMUX_SVIDEO,
1461 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001462 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001463 } },
1464 },
1465 [EM2880_BOARD_KWORLD_DVB_310U] = {
1466 .name = "KWorld DVB-T 310U",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001467 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001468 .tuner_gpio = default_tuner_gpio,
Darron Broadda3808e2008-09-30 02:46:41 -03001469 .has_dvb = 1,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001470 .dvb_gpio = default_digital,
Darron Broadda3808e2008-09-30 02:46:41 -03001471 .mts_firmware = 1,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001472 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001473 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001474 .type = EM28XX_VMUX_TELEVISION,
1475 .vmux = TVP5150_COMPOSITE0,
Darron Broadda3808e2008-09-30 02:46:41 -03001476 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001477 .gpio = default_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001478 }, {
1479 .type = EM28XX_VMUX_COMPOSITE1,
1480 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehaba42aa192008-11-19 11:08:53 -03001481 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001482 .gpio = default_analog,
Darron Broadda3808e2008-09-30 02:46:41 -03001483 }, { /* S-video has not been tested yet */
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001484 .type = EM28XX_VMUX_SVIDEO,
1485 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehaba42aa192008-11-19 11:08:53 -03001486 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001487 .gpio = default_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001488 } },
1489 },
Franklin Mengd7de5d82009-06-06 17:05:02 -03001490 [EM2882_BOARD_KWORLD_ATSC_315U] = {
1491 .name = "KWorld ATSC 315U HDTV TV Box",
1492 .valid = EM28XX_BOARD_NOT_VALIDATED,
1493 .tuner_type = TUNER_THOMSON_DTT761X,
1494 .tuner_gpio = em2882_kworld_315u_tuner_gpio,
1495 .tda9887_conf = TDA9887_PRESENT,
1496 .decoder = EM28XX_SAA711X,
1497 .has_dvb = 1,
1498 .dvb_gpio = em2882_kworld_315u_digital,
Mauro Carvalho Chehab02858ee2010-04-02 20:01:00 -03001499 .ir_codes = RC_MAP_KWORLD_315U,
Franklin Mengd7de5d82009-06-06 17:05:02 -03001500 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ,
1501 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE,
1502 /* Analog mode - still not ready */
1503 /*.input = { {
1504 .type = EM28XX_VMUX_TELEVISION,
1505 .vmux = SAA7115_COMPOSITE2,
1506 .amux = EM28XX_AMUX_VIDEO,
1507 .gpio = em2882_kworld_315u_analog,
1508 .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO,
1509 }, {
1510 .type = EM28XX_VMUX_COMPOSITE1,
1511 .vmux = SAA7115_COMPOSITE0,
1512 .amux = EM28XX_AMUX_LINE_IN,
1513 .gpio = em2882_kworld_315u_analog1,
1514 .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO,
1515 }, {
1516 .type = EM28XX_VMUX_SVIDEO,
1517 .vmux = SAA7115_SVIDEO3,
1518 .amux = EM28XX_AMUX_LINE_IN,
1519 .gpio = em2882_kworld_315u_analog1,
1520 .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO,
1521 } }, */
1522 },
Douglas Schilling Landgrafe5db5d42009-04-09 18:24:34 -03001523 [EM2880_BOARD_EMPIRE_DUAL_TV] = {
1524 .name = "Empire dual TV",
1525 .tuner_type = TUNER_XC2028,
1526 .tuner_gpio = default_tuner_gpio,
1527 .has_dvb = 1,
1528 .dvb_gpio = default_digital,
1529 .mts_firmware = 1,
1530 .decoder = EM28XX_TVP5150,
1531 .input = { {
1532 .type = EM28XX_VMUX_TELEVISION,
1533 .vmux = TVP5150_COMPOSITE0,
1534 .amux = EM28XX_AMUX_VIDEO,
1535 .gpio = default_analog,
1536 }, {
1537 .type = EM28XX_VMUX_COMPOSITE1,
1538 .vmux = TVP5150_COMPOSITE1,
1539 .amux = EM28XX_AMUX_LINE_IN,
1540 .gpio = default_analog,
1541 }, {
1542 .type = EM28XX_VMUX_SVIDEO,
1543 .vmux = TVP5150_SVIDEO,
1544 .amux = EM28XX_AMUX_LINE_IN,
1545 .gpio = default_analog,
1546 } },
1547 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001548 [EM2881_BOARD_DNT_DA2_HYBRID] = {
1549 .name = "DNT DA2 Hybrid",
1550 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001551 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001552 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001553 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001554 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001555 .type = EM28XX_VMUX_TELEVISION,
1556 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001557 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001558 .gpio = default_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001559 }, {
1560 .type = EM28XX_VMUX_COMPOSITE1,
1561 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001562 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001563 .gpio = default_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001564 }, {
1565 .type = EM28XX_VMUX_SVIDEO,
1566 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001567 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001568 .gpio = default_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001569 } },
1570 },
1571 [EM2881_BOARD_PINNACLE_HYBRID_PRO] = {
1572 .name = "Pinnacle Hybrid Pro",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001573 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001574 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001575 .decoder = EM28XX_TVP5150,
Devin Heitmuellerd5b3ba92009-07-08 21:51:35 -03001576 .has_dvb = 1,
1577 .dvb_gpio = pinnacle_hybrid_pro_digital,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001578 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001579 .type = EM28XX_VMUX_TELEVISION,
1580 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001581 .amux = EM28XX_AMUX_VIDEO,
Devin Heitmuellerd5b3ba92009-07-08 21:51:35 -03001582 .gpio = pinnacle_hybrid_pro_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001583 }, {
1584 .type = EM28XX_VMUX_COMPOSITE1,
1585 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001586 .amux = EM28XX_AMUX_LINE_IN,
Devin Heitmuellerd5b3ba92009-07-08 21:51:35 -03001587 .gpio = pinnacle_hybrid_pro_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001588 }, {
1589 .type = EM28XX_VMUX_SVIDEO,
1590 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001591 .amux = EM28XX_AMUX_LINE_IN,
Devin Heitmuellerd5b3ba92009-07-08 21:51:35 -03001592 .gpio = pinnacle_hybrid_pro_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001593 } },
1594 },
Devin Heitmueller09bc1942011-03-13 02:07:54 -03001595 [EM2882_BOARD_PINNACLE_HYBRID_PRO_330E] = {
1596 .name = "Pinnacle Hybrid Pro (330e)",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001597 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001598 .tuner_gpio = default_tuner_gpio,
Eugeniy Meshcheryakova674a3b2008-08-01 08:23:41 -03001599 .mts_firmware = 1,
Devin Heitmuellerad9b4bb2011-03-13 02:09:59 -03001600 .has_dvb = 1,
1601 .dvb_gpio = hauppauge_wintv_hvr_900R2_digital,
Devin Heitmueller9b316d62011-03-13 02:18:34 -03001602 .ir_codes = RC_MAP_PINNACLE_PCTV_HD,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001603 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001604 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001605 .type = EM28XX_VMUX_TELEVISION,
1606 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001607 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001608 .gpio = hauppauge_wintv_hvr_900_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001609 }, {
1610 .type = EM28XX_VMUX_COMPOSITE1,
1611 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001612 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001613 .gpio = hauppauge_wintv_hvr_900_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001614 }, {
1615 .type = EM28XX_VMUX_SVIDEO,
1616 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001617 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001618 .gpio = hauppauge_wintv_hvr_900_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001619 } },
1620 },
1621 [EM2882_BOARD_KWORLD_VS_DVBT] = {
1622 .name = "Kworld VS-DVB-T 323UR",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001623 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001624 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001625 .decoder = EM28XX_TVP5150,
Antonio Larrosa811fab62010-03-04 22:19:48 -03001626 .mts_firmware = 1,
1627 .has_dvb = 1,
1628 .dvb_gpio = kworld_330u_digital,
1629 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, /* NEC IR */
Mauro Carvalho Chehab02858ee2010-04-02 20:01:00 -03001630 .ir_codes = RC_MAP_KWORLD_315U,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001631 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001632 .type = EM28XX_VMUX_TELEVISION,
1633 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001634 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001635 }, {
1636 .type = EM28XX_VMUX_COMPOSITE1,
1637 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001638 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001639 }, {
1640 .type = EM28XX_VMUX_SVIDEO,
1641 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001642 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001643 } },
1644 },
1645 [EM2882_BOARD_TERRATEC_HYBRID_XS] = {
Philippe Bourdin91245442010-10-31 09:57:58 -03001646 .name = "Terratec Cinnergy Hybrid T USB XS (em2882)",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001647 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001648 .tuner_gpio = default_tuner_gpio,
Uroš Vamplec994d02009-09-30 22:53:37 -03001649 .mts_firmware = 1,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001650 .decoder = EM28XX_TVP5150,
Uroš Vamplec994d02009-09-30 22:53:37 -03001651 .has_dvb = 1,
1652 .dvb_gpio = hauppauge_wintv_hvr_900_digital,
Mauro Carvalho Chehab02858ee2010-04-02 20:01:00 -03001653 .ir_codes = RC_MAP_TERRATEC_CINERGY_XS,
Uroš Vamplec994d02009-09-30 22:53:37 -03001654 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001655 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001656 .type = EM28XX_VMUX_TELEVISION,
1657 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001658 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001659 .gpio = hauppauge_wintv_hvr_900_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001660 }, {
1661 .type = EM28XX_VMUX_COMPOSITE1,
1662 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001663 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001664 .gpio = hauppauge_wintv_hvr_900_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001665 }, {
1666 .type = EM28XX_VMUX_SVIDEO,
1667 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001668 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001669 .gpio = hauppauge_wintv_hvr_900_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001670 } },
1671 },
Andrea.Amorosi76@gmail.com7ca7ef62010-02-09 17:53:38 -03001672 [EM2882_BOARD_DIKOM_DK300] = {
1673 .name = "Dikom DK300",
1674 .tuner_type = TUNER_XC2028,
1675 .tuner_gpio = default_tuner_gpio,
1676 .decoder = EM28XX_TVP5150,
1677 .mts_firmware = 1,
1678 .has_dvb = 1,
1679 .dvb_gpio = dikom_dk300_digital,
1680 .input = { {
1681 .type = EM28XX_VMUX_TELEVISION,
1682 .vmux = TVP5150_COMPOSITE0,
1683 .amux = EM28XX_AMUX_VIDEO,
1684 .gpio = default_analog,
1685 } },
1686 },
Robert Krakora6e7b9ea2009-01-18 21:59:34 -03001687 [EM2883_BOARD_KWORLD_HYBRID_330U] = {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001688 .name = "Kworld PlusTV HD Hybrid 330",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001689 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001690 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001691 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabbe2c6db2008-12-09 15:43:10 -03001692 .mts_firmware = 1,
1693 .has_dvb = 1,
Robert Krakora6e7b9ea2009-01-18 21:59:34 -03001694 .dvb_gpio = kworld_330u_digital,
1695 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ,
Nicola Soranzoa1a6ee72009-02-10 23:28:24 -03001696 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
1697 EM28XX_I2C_EEPROM_ON_BOARD |
1698 EM28XX_I2C_EEPROM_KEY_VALID,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001699 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001700 .type = EM28XX_VMUX_TELEVISION,
1701 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001702 .amux = EM28XX_AMUX_VIDEO,
Robert Krakora6e7b9ea2009-01-18 21:59:34 -03001703 .gpio = kworld_330u_analog,
1704 .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001705 }, {
1706 .type = EM28XX_VMUX_COMPOSITE1,
1707 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001708 .amux = EM28XX_AMUX_LINE_IN,
Robert Krakora6e7b9ea2009-01-18 21:59:34 -03001709 .gpio = kworld_330u_analog,
1710 .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001711 }, {
1712 .type = EM28XX_VMUX_SVIDEO,
1713 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001714 .amux = EM28XX_AMUX_LINE_IN,
Robert Krakora6e7b9ea2009-01-18 21:59:34 -03001715 .gpio = kworld_330u_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001716 } },
1717 },
Mauro Carvalho Chehabee281b82008-07-27 16:58:04 -03001718 [EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU] = {
Vitaly Woold3603342008-07-27 14:10:11 -03001719 .name = "Compro VideoMate ForYou/Stereo",
Vitaly Woold3603342008-07-27 14:10:11 -03001720 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03001721 .tvaudio_addr = 0xb0,
Vitaly Woold3603342008-07-27 14:10:11 -03001722 .tda9887_conf = TDA9887_PRESENT,
1723 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabdf7fa092009-02-25 09:06:13 -03001724 .adecoder = EM28XX_TVAUDIO,
Vitaly Wool2bd1d9e2009-03-04 08:27:52 -03001725 .mute_gpio = compro_mute_gpio,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001726 .input = { {
Vitaly Woold3603342008-07-27 14:10:11 -03001727 .type = EM28XX_VMUX_TELEVISION,
1728 .vmux = TVP5150_COMPOSITE0,
Vitaly Wool2bd1d9e2009-03-04 08:27:52 -03001729 .amux = EM28XX_AMUX_VIDEO,
1730 .gpio = compro_unmute_tv_gpio,
Vitaly Woold3603342008-07-27 14:10:11 -03001731 }, {
1732 .type = EM28XX_VMUX_SVIDEO,
1733 .vmux = TVP5150_SVIDEO,
1734 .amux = EM28XX_AMUX_LINE_IN,
Vitaly Wool2bd1d9e2009-03-04 08:27:52 -03001735 .gpio = compro_unmute_svid_gpio,
Vitaly Woold3603342008-07-27 14:10:11 -03001736 } },
1737 },
Mauro Carvalho Chehab0bf4f6c2009-02-11 14:13:20 -03001738 [EM2860_BOARD_KAIOMY_TVNPC_U2] = {
1739 .name = "Kaiomy TVnPC U2",
1740 .vchannels = 3,
1741 .tuner_type = TUNER_XC2028,
1742 .tuner_addr = 0x61,
1743 .mts_firmware = 1,
1744 .decoder = EM28XX_TVP5150,
1745 .tuner_gpio = default_tuner_gpio,
Mauro Carvalho Chehab02858ee2010-04-02 20:01:00 -03001746 .ir_codes = RC_MAP_KAIOMY,
Mauro Carvalho Chehab0bf4f6c2009-02-11 14:13:20 -03001747 .input = { {
1748 .type = EM28XX_VMUX_TELEVISION,
1749 .vmux = TVP5150_COMPOSITE0,
1750 .amux = EM28XX_AMUX_VIDEO,
1751
1752 }, {
1753 .type = EM28XX_VMUX_COMPOSITE1,
1754 .vmux = TVP5150_COMPOSITE1,
1755 .amux = EM28XX_AMUX_LINE_IN,
1756 }, {
1757 .type = EM28XX_VMUX_SVIDEO,
1758 .vmux = TVP5150_SVIDEO,
1759 .amux = EM28XX_AMUX_LINE_IN,
1760 } },
1761 .radio = {
1762 .type = EM28XX_RADIO,
1763 .amux = EM28XX_AMUX_LINE_IN,
1764 }
Mauro Carvalho Chehab56ee3802009-02-11 14:18:36 -03001765 },
1766 [EM2860_BOARD_EASYCAP] = {
1767 .name = "Easy Cap Capture DC-60",
1768 .vchannels = 2,
1769 .tuner_type = TUNER_ABSENT,
1770 .decoder = EM28XX_SAA711X,
1771 .input = { {
1772 .type = EM28XX_VMUX_COMPOSITE1,
1773 .vmux = SAA7115_COMPOSITE0,
1774 .amux = EM28XX_AMUX_LINE_IN,
1775 }, {
1776 .type = EM28XX_VMUX_SVIDEO,
1777 .vmux = SAA7115_SVIDEO3,
1778 .amux = EM28XX_AMUX_LINE_IN,
1779 } },
1780 },
Indika Katugampalaf74a61e32009-02-11 11:13:05 -03001781 [EM2820_BOARD_IODATA_GVMVP_SZ] = {
1782 .name = "IO-DATA GV-MVP/SZ",
1783 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
1784 .tuner_gpio = default_tuner_gpio,
1785 .tda9887_conf = TDA9887_PRESENT,
1786 .decoder = EM28XX_TVP5150,
1787 .input = { {
1788 .type = EM28XX_VMUX_TELEVISION,
1789 .vmux = TVP5150_COMPOSITE0,
1790 .amux = EM28XX_AMUX_VIDEO,
1791 }, { /* Composite has not been tested yet */
1792 .type = EM28XX_VMUX_COMPOSITE1,
1793 .vmux = TVP5150_COMPOSITE1,
1794 .amux = EM28XX_AMUX_VIDEO,
1795 }, { /* S-video has not been tested yet */
1796 .type = EM28XX_VMUX_SVIDEO,
1797 .vmux = TVP5150_SVIDEO,
1798 .amux = EM28XX_AMUX_VIDEO,
1799 } },
1800 },
Mauro Carvalho Chehab4557af92009-05-23 09:58:52 -03001801 [EM2860_BOARD_TERRATEC_GRABBY] = {
1802 .name = "Terratec Grabby",
1803 .vchannels = 2,
1804 .tuner_type = TUNER_ABSENT,
1805 .decoder = EM28XX_SAA711X,
1806 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ,
1807 .input = { {
1808 .type = EM28XX_VMUX_COMPOSITE1,
1809 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehaba3fa9042010-10-25 17:51:15 -03001810 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab4557af92009-05-23 09:58:52 -03001811 }, {
1812 .type = EM28XX_VMUX_SVIDEO,
1813 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehaba3fa9042010-10-25 17:51:15 -03001814 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab4557af92009-05-23 09:58:52 -03001815 } },
1816 },
Mauro Carvalho Chehab766ed642009-05-24 00:46:01 -03001817 [EM2860_BOARD_TERRATEC_AV350] = {
1818 .name = "Terratec AV350",
1819 .vchannels = 2,
1820 .tuner_type = TUNER_ABSENT,
1821 .decoder = EM28XX_TVP5150,
1822 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ,
1823 .mute_gpio = terratec_av350_mute_gpio,
1824 .input = { {
1825 .type = EM28XX_VMUX_COMPOSITE1,
1826 .vmux = TVP5150_COMPOSITE1,
1827 .amux = EM28XX_AUDIO_SRC_LINE,
Jean Delvare1df8e982009-05-13 16:48:07 -03001828 .gpio = terratec_av350_unmute_gpio,
Mauro Carvalho Chehab766ed642009-05-24 00:46:01 -03001829
1830 }, {
1831 .type = EM28XX_VMUX_SVIDEO,
1832 .vmux = TVP5150_SVIDEO,
1833 .amux = EM28XX_AUDIO_SRC_LINE,
Jean Delvare1df8e982009-05-13 16:48:07 -03001834 .gpio = terratec_av350_unmute_gpio,
Mauro Carvalho Chehab766ed642009-05-24 00:46:01 -03001835 } },
1836 },
Adrian Taylor8298f2f2010-10-20 07:55:33 -03001837
1838 [EM2860_BOARD_ELGATO_VIDEO_CAPTURE] = {
1839 .name = "Elgato Video Capture",
1840 .decoder = EM28XX_SAA711X,
1841 .tuner_type = TUNER_ABSENT, /* Capture only device */
1842 .input = { {
1843 .type = EM28XX_VMUX_COMPOSITE1,
1844 .vmux = SAA7115_COMPOSITE0,
1845 .amux = EM28XX_AMUX_LINE_IN,
1846 }, {
1847 .type = EM28XX_VMUX_SVIDEO,
1848 .vmux = SAA7115_SVIDEO3,
1849 .amux = EM28XX_AMUX_LINE_IN,
1850 } },
1851 },
1852
Devin Heitmueller19859222009-06-19 00:33:54 -03001853 [EM2882_BOARD_EVGA_INDTUBE] = {
1854 .name = "Evga inDtube",
1855 .tuner_type = TUNER_XC2028,
1856 .tuner_gpio = default_tuner_gpio,
1857 .decoder = EM28XX_TVP5150,
Devin Heitmuellera4c47302009-06-20 21:34:42 -03001858 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, /* NEC IR */
Devin Heitmueller19859222009-06-19 00:33:54 -03001859 .mts_firmware = 1,
1860 .has_dvb = 1,
1861 .dvb_gpio = evga_indtube_digital,
Mauro Carvalho Chehab02858ee2010-04-02 20:01:00 -03001862 .ir_codes = RC_MAP_EVGA_INDTUBE,
Devin Heitmueller19859222009-06-19 00:33:54 -03001863 .input = { {
1864 .type = EM28XX_VMUX_TELEVISION,
1865 .vmux = TVP5150_COMPOSITE0,
1866 .amux = EM28XX_AMUX_VIDEO,
1867 .gpio = evga_indtube_analog,
1868 }, {
1869 .type = EM28XX_VMUX_COMPOSITE1,
1870 .vmux = TVP5150_COMPOSITE1,
1871 .amux = EM28XX_AMUX_LINE_IN,
1872 .gpio = evga_indtube_analog,
1873 }, {
1874 .type = EM28XX_VMUX_SVIDEO,
1875 .vmux = TVP5150_SVIDEO,
1876 .amux = EM28XX_AMUX_LINE_IN,
1877 .gpio = evga_indtube_analog,
1878 } },
1879 },
Antti Palosaari285eb1a2009-09-15 14:42:13 -03001880 /* eb1a:2868 Empia EM2870 + Philips CU1216L NIM (Philips TDA10023 +
1881 Infineon TUA6034) */
1882 [EM2870_BOARD_REDDO_DVB_C_USB_BOX] = {
1883 .name = "Reddo DVB-C USB TV Box",
1884 .tuner_type = TUNER_ABSENT,
Antti Palosaari28f4ddd12009-10-04 12:59:35 -03001885 .tuner_gpio = reddo_dvb_c_usb_box,
Antti Palosaari285eb1a2009-09-15 14:42:13 -03001886 .has_dvb = 1,
Antti Palosaari285eb1a2009-09-15 14:42:13 -03001887 },
Jarod Wilson7e48b302010-03-07 17:55:43 -03001888 /* 1b80:a340 - Empia EM2870, NXP TDA18271HD and LG DT3304, sold
1889 * initially as the KWorld PlusTV 340U, then as the UB435-Q.
1890 * Early variants have a TDA18271HD/C1, later ones a TDA18271HD/C2 */
1891 [EM2870_BOARD_KWORLD_A340] = {
1892 .name = "KWorld PlusTV 340U or UB435-Q (ATSC)",
1893 .tuner_type = TUNER_ABSENT, /* Digital-only TDA18271HD */
1894 .has_dvb = 1,
1895 .dvb_gpio = kworld_a340_digital,
1896 .tuner_gpio = default_tuner_gpio,
1897 },
Antti Palosaari460312e2011-05-25 17:03:50 -03001898 /* 2013:024f PCTV nanoStick T2 290e.
Antti Palosaarid6a5f922011-04-07 16:34:44 -03001899 * Empia EM28174, Sony CXD2820R and NXP TDA18271HD/C2 */
1900 [EM28174_BOARD_PCTV_290E] = {
Antti Palosaari460312e2011-05-25 17:03:50 -03001901 .name = "PCTV nanoStick T2 290e",
Antti Palosaarid6a5f922011-04-07 16:34:44 -03001902 .i2c_speed = EM2874_I2C_SECONDARY_BUS_SELECT |
1903 EM28XX_I2C_CLK_WAIT_ENABLE | EM28XX_I2C_FREQ_100_KHZ,
Antti Palosaarid6a5f922011-04-07 16:34:44 -03001904 .tuner_type = TUNER_ABSENT,
1905 .tuner_gpio = pctv_290e,
1906 .has_dvb = 1,
Antti Palosaariff7b9292011-05-25 17:00:35 -03001907 .ir_codes = RC_MAP_PINNACLE_PCTV_HD,
Antti Palosaarid6a5f922011-04-07 16:34:44 -03001908 },
Antti Palosaari36588712011-08-01 01:15:30 -03001909 /* 2013:024f PCTV DVB-S2 Stick 460e
1910 * Empia EM28174, NXP TDA10071, Conexant CX24118A and Allegro A8293 */
1911 [EM28174_BOARD_PCTV_460E] = {
1912 .i2c_speed = EM2874_I2C_SECONDARY_BUS_SELECT |
1913 EM28XX_I2C_CLK_WAIT_ENABLE | EM28XX_I2C_FREQ_400_KHZ,
1914 .name = "PCTV DVB-S2 Stick (460e)",
1915 .tuner_type = TUNER_ABSENT,
1916 .tuner_gpio = pctv_460e,
1917 .has_dvb = 1,
1918 .ir_codes = RC_MAP_PINNACLE_PCTV_HD,
1919 },
Gareth Williams4d28d3d2011-12-24 05:47:29 -03001920 /* eb1a:5006 Honestech VIDBOX NW03
1921 * Empia EM2860, Philips SAA7113, Empia EMP202, No Tuner */
1922 [EM2860_BOARD_HT_VIDBOX_NW03] = {
1923 .name = "Honestech Vidbox NW03",
1924 .tuner_type = TUNER_ABSENT,
1925 .decoder = EM28XX_SAA711X,
1926 .input = { {
1927 .type = EM28XX_VMUX_COMPOSITE1,
1928 .vmux = SAA7115_COMPOSITE0,
1929 .amux = EM28XX_AMUX_LINE_IN,
1930 }, {
1931 .type = EM28XX_VMUX_SVIDEO,
1932 .vmux = SAA7115_SVIDEO3, /* S-VIDEO needs confirming */
1933 .amux = EM28XX_AMUX_LINE_IN,
1934 } },
1935 },
Antti Palosaari35530852012-03-18 18:09:01 -03001936 /* 1b80:e425 MaxMedia UB425-TC
1937 * Empia EM2874B + Micronas DRX 3913KA2 + NXP TDA18271HDC2 */
1938 [EM2874_BOARD_MAXMEDIA_UB425_TC] = {
1939 .name = "MaxMedia UB425-TC",
1940 .tuner_type = TUNER_ABSENT,
1941 .tuner_gpio = maxmedia_ub425_tc,
1942 .has_dvb = 1,
1943 .i2c_speed = EM2874_I2C_SECONDARY_BUS_SELECT |
1944 EM28XX_I2C_CLK_WAIT_ENABLE |
1945 EM28XX_I2C_FREQ_400_KHZ,
1946 },
Antti Palosaaric247d7b2012-03-19 11:48:19 -03001947 /* 2013:0251 PCTV QuatroStick nano (520e)
1948 * Empia EM2884 + Micronas DRX 3926K + NXP TDA18271HDC2 */
1949 [EM2884_BOARD_PCTV_520E] = {
1950 .name = "PCTV QuatroStick nano (520e)",
1951 .tuner_type = TUNER_ABSENT,
1952 .tuner_gpio = pctv_520e,
1953 .has_dvb = 1,
1954 .ir_codes = RC_MAP_PINNACLE_PCTV_HD,
1955 .i2c_speed = EM2874_I2C_SECONDARY_BUS_SELECT |
1956 EM28XX_I2C_CLK_WAIT_ENABLE |
1957 EM28XX_I2C_FREQ_400_KHZ,
1958 },
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08001959};
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -08001960const unsigned int em28xx_bcount = ARRAY_SIZE(em28xx_boards);
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08001961
1962/* table of devices that work with this driver */
Nicola Soranzoa1a6ee72009-02-10 23:28:24 -03001963struct usb_device_id em28xx_id_table[] = {
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001964 { USB_DEVICE(0xeb1a, 0x2750),
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001965 .driver_info = EM2750_BOARD_UNKNOWN },
1966 { USB_DEVICE(0xeb1a, 0x2751),
1967 .driver_info = EM2750_BOARD_UNKNOWN },
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001968 { USB_DEVICE(0xeb1a, 0x2800),
1969 .driver_info = EM2800_BOARD_UNKNOWN },
Mauro Carvalho Chehab9b4e8452009-08-07 12:08:02 -03001970 { USB_DEVICE(0xeb1a, 0x2710),
1971 .driver_info = EM2820_BOARD_UNKNOWN },
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001972 { USB_DEVICE(0xeb1a, 0x2820),
1973 .driver_info = EM2820_BOARD_UNKNOWN },
1974 { USB_DEVICE(0xeb1a, 0x2821),
Devin Heitmuellerc665f4d2008-12-16 23:35:23 -03001975 .driver_info = EM2820_BOARD_UNKNOWN },
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001976 { USB_DEVICE(0xeb1a, 0x2860),
1977 .driver_info = EM2820_BOARD_UNKNOWN },
1978 { USB_DEVICE(0xeb1a, 0x2861),
1979 .driver_info = EM2820_BOARD_UNKNOWN },
Devin Heitmuellerf91cb652009-09-30 22:44:19 -03001980 { USB_DEVICE(0xeb1a, 0x2862),
1981 .driver_info = EM2820_BOARD_UNKNOWN },
Devin Heitmueller443fed92010-03-19 23:53:12 -03001982 { USB_DEVICE(0xeb1a, 0x2863),
1983 .driver_info = EM2820_BOARD_UNKNOWN },
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001984 { USB_DEVICE(0xeb1a, 0x2870),
1985 .driver_info = EM2820_BOARD_UNKNOWN },
1986 { USB_DEVICE(0xeb1a, 0x2881),
1987 .driver_info = EM2820_BOARD_UNKNOWN },
1988 { USB_DEVICE(0xeb1a, 0x2883),
1989 .driver_info = EM2820_BOARD_UNKNOWN },
Antti Palosaari285eb1a2009-09-15 14:42:13 -03001990 { USB_DEVICE(0xeb1a, 0x2868),
1991 .driver_info = EM2820_BOARD_UNKNOWN },
Mauro Carvalho Chehabca3dfd62010-09-10 17:29:14 -03001992 { USB_DEVICE(0xeb1a, 0x2875),
1993 .driver_info = EM2820_BOARD_UNKNOWN },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001994 { USB_DEVICE(0xeb1a, 0xe300),
1995 .driver_info = EM2861_BOARD_KWORLD_PVRTV_300U },
Mauro Carvalho Chehab0bf4f6c2009-02-11 14:13:20 -03001996 { USB_DEVICE(0xeb1a, 0xe303),
1997 .driver_info = EM2860_BOARD_KAIOMY_TVNPC_U2 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001998 { USB_DEVICE(0xeb1a, 0xe305),
1999 .driver_info = EM2880_BOARD_KWORLD_DVB_305U },
2000 { USB_DEVICE(0xeb1a, 0xe310),
2001 .driver_info = EM2880_BOARD_MSI_DIGIVOX_AD },
Franklin Mengd7de5d82009-06-06 17:05:02 -03002002 { USB_DEVICE(0xeb1a, 0xa313),
2003 .driver_info = EM2882_BOARD_KWORLD_ATSC_315U },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002004 { USB_DEVICE(0xeb1a, 0xa316),
Robert Krakora6e7b9ea2009-01-18 21:59:34 -03002005 .driver_info = EM2883_BOARD_KWORLD_HYBRID_330U },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002006 { USB_DEVICE(0xeb1a, 0xe320),
2007 .driver_info = EM2880_BOARD_MSI_DIGIVOX_AD_II },
2008 { USB_DEVICE(0xeb1a, 0xe323),
2009 .driver_info = EM2882_BOARD_KWORLD_VS_DVBT },
2010 { USB_DEVICE(0xeb1a, 0xe350),
2011 .driver_info = EM2870_BOARD_KWORLD_350U },
2012 { USB_DEVICE(0xeb1a, 0xe355),
2013 .driver_info = EM2870_BOARD_KWORLD_355U },
2014 { USB_DEVICE(0xeb1a, 0x2801),
2015 .driver_info = EM2800_BOARD_GRABBEEX_USB2800 },
2016 { USB_DEVICE(0xeb1a, 0xe357),
2017 .driver_info = EM2870_BOARD_KWORLD_355U },
Aivar Päkk1985f6f2011-12-11 18:15:00 -03002018 { USB_DEVICE(0xeb1a, 0xe359),
2019 .driver_info = EM2870_BOARD_KWORLD_355U },
Douglas Schilling Landgrafac40d9e2009-02-25 16:55:48 -03002020 { USB_DEVICE(0x1b80, 0xe302),
2021 .driver_info = EM2820_BOARD_PINNACLE_DVC_90 }, /* Kaiser Baas Video to DVD maker */
Douglas Schilling Landgrafea476892009-09-06 18:41:59 -03002022 { USB_DEVICE(0x1b80, 0xe304),
2023 .driver_info = EM2820_BOARD_PINNACLE_DVC_90 }, /* Kworld DVD Maker 2 */
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03002024 { USB_DEVICE(0x0ccd, 0x0036),
2025 .driver_info = EM2820_BOARD_TERRATEC_CINERGY_250 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002026 { USB_DEVICE(0x0ccd, 0x004c),
2027 .driver_info = EM2880_BOARD_TERRATEC_HYBRID_XS_FR },
2028 { USB_DEVICE(0x0ccd, 0x004f),
2029 .driver_info = EM2860_BOARD_TERRATEC_HYBRID_XS },
2030 { USB_DEVICE(0x0ccd, 0x005e),
2031 .driver_info = EM2882_BOARD_TERRATEC_HYBRID_XS },
2032 { USB_DEVICE(0x0ccd, 0x0042),
Philippe Bourdin91245442010-10-31 09:57:58 -03002033 .driver_info = EM2882_BOARD_TERRATEC_HYBRID_XS },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002034 { USB_DEVICE(0x0ccd, 0x0043),
Mauro Carvalho Chehab4e145342011-11-16 14:38:28 -02002035 .driver_info = EM2870_BOARD_TERRATEC_XS },
Holger Nelson6c3b9062011-12-23 23:15:32 -03002036 { USB_DEVICE(0x0ccd, 0x008e), /* Cinergy HTC USB XS Rev. 1 */
Mauro Carvalho Chehabfec528b2011-07-03 21:05:06 -03002037 .driver_info = EM2884_BOARD_TERRATEC_H5 },
Holger Nelson6c3b9062011-12-23 23:15:32 -03002038 { USB_DEVICE(0x0ccd, 0x00ac), /* Cinergy HTC USB XS Rev. 2 */
Mauro Carvalho Chehab33ba28e2011-07-14 21:48:00 -03002039 .driver_info = EM2884_BOARD_TERRATEC_H5 },
Mauro Carvalho Chehab4e145342011-11-16 14:38:28 -02002040 { USB_DEVICE(0x0ccd, 0x10a2), /* H5 Rev. 1 */
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002041 .driver_info = EM2884_BOARD_TERRATEC_H5 },
Mauro Carvalho Chehab4e145342011-11-16 14:38:28 -02002042 { USB_DEVICE(0x0ccd, 0x10ad), /* H5 Rev. 2 */
Mauro Carvalho Chehab33ba28e2011-07-14 21:48:00 -03002043 .driver_info = EM2884_BOARD_TERRATEC_H5 },
Mauro Carvalho Chehab766ed642009-05-24 00:46:01 -03002044 { USB_DEVICE(0x0ccd, 0x0084),
2045 .driver_info = EM2860_BOARD_TERRATEC_AV350 },
Mauro Carvalho Chehab4557af92009-05-23 09:58:52 -03002046 { USB_DEVICE(0x0ccd, 0x0096),
2047 .driver_info = EM2860_BOARD_TERRATEC_GRABBY },
Tekaefabaaf2011-10-14 05:40:29 -03002048 { USB_DEVICE(0x0ccd, 0x10AF),
2049 .driver_info = EM2860_BOARD_TERRATEC_GRABBY },
Andreas Oberrittera1ed02e2011-11-16 11:06:50 -03002050 { USB_DEVICE(0x0ccd, 0x00b2),
2051 .driver_info = EM2884_BOARD_CINERGY_HTC_STICK },
Adrian Taylor8298f2f2010-10-20 07:55:33 -03002052 { USB_DEVICE(0x0fd9, 0x0033),
2053 .driver_info = EM2860_BOARD_ELGATO_VIDEO_CAPTURE},
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002054 { USB_DEVICE(0x185b, 0x2870),
2055 .driver_info = EM2870_BOARD_COMPRO_VIDEOMATE },
Vitaly Woold3603342008-07-27 14:10:11 -03002056 { USB_DEVICE(0x185b, 0x2041),
Mauro Carvalho Chehabee281b82008-07-27 16:58:04 -03002057 .driver_info = EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU },
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03002058 { USB_DEVICE(0x2040, 0x4200),
2059 .driver_info = EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 },
Mauro Carvalho Chehab15b9bec2008-01-13 12:02:20 -03002060 { USB_DEVICE(0x2040, 0x4201),
2061 .driver_info = EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 },
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03002062 { USB_DEVICE(0x2040, 0x6500),
2063 .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900 },
Luc Saillard427d20c2008-01-30 17:23:00 -03002064 { USB_DEVICE(0x2040, 0x6502),
Devin Heitmueller17d9d552008-06-08 10:22:03 -03002065 .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2 },
Michael Krufky74ee0512008-05-01 18:02:30 -03002066 { USB_DEVICE(0x2040, 0x6513), /* HCW HVR-980 */
Mauro Carvalho Chehab10ac6602008-07-27 14:58:58 -03002067 .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 },
Michael Krufky74ee0512008-05-01 18:02:30 -03002068 { USB_DEVICE(0x2040, 0x6517), /* HP HVR-950 */
Mauro Carvalho Chehab10ac6602008-07-27 14:58:58 -03002069 .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 },
Michael Krufky74ee0512008-05-01 18:02:30 -03002070 { USB_DEVICE(0x2040, 0x651b), /* RP HVR-950 */
Mauro Carvalho Chehab10ac6602008-07-27 14:58:58 -03002071 .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 },
Douglas Schilling Landgraff89bc322008-12-01 21:01:04 -03002072 { USB_DEVICE(0x2040, 0x651f),
2073 .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850 },
Devin Heitmuellere14b3652008-07-26 11:04:33 -03002074 { USB_DEVICE(0x0438, 0xb002),
2075 .driver_info = EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002076 { USB_DEVICE(0x2001, 0xf112),
2077 .driver_info = EM2820_BOARD_DLINK_USB_TV },
2078 { USB_DEVICE(0x2304, 0x0207),
2079 .driver_info = EM2820_BOARD_PINNACLE_DVC_90 },
2080 { USB_DEVICE(0x2304, 0x0208),
2081 .driver_info = EM2820_BOARD_PINNACLE_USB_2 },
2082 { USB_DEVICE(0x2304, 0x021a),
2083 .driver_info = EM2820_BOARD_PINNACLE_DVC_90 },
2084 { USB_DEVICE(0x2304, 0x0226),
Devin Heitmueller09bc1942011-03-13 02:07:54 -03002085 .driver_info = EM2882_BOARD_PINNACLE_HYBRID_PRO_330E },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002086 { USB_DEVICE(0x2304, 0x0227),
2087 .driver_info = EM2880_BOARD_PINNACLE_PCTV_HD_PRO },
2088 { USB_DEVICE(0x0413, 0x6023),
2089 .driver_info = EM2800_BOARD_LEADTEK_WINFAST_USBII },
Don Kramer74e07f32012-01-02 16:15:44 -03002090 { USB_DEVICE(0x093b, 0xa003),
2091 .driver_info = EM2820_BOARD_PINNACLE_DVC_90 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002092 { USB_DEVICE(0x093b, 0xa005),
2093 .driver_info = EM2861_BOARD_PLEXTOR_PX_TV100U },
Indika Katugampalaf74a61e32009-02-11 11:13:05 -03002094 { USB_DEVICE(0x04bb, 0x0515),
2095 .driver_info = EM2820_BOARD_IODATA_GVMVP_SZ },
Zhenyu Wang7c8b5672009-07-05 10:51:21 -03002096 { USB_DEVICE(0xeb1a, 0x50a6),
2097 .driver_info = EM2860_BOARD_GADMEI_UTV330 },
Jarod Wilson7e48b302010-03-07 17:55:43 -03002098 { USB_DEVICE(0x1b80, 0xa340),
2099 .driver_info = EM2870_BOARD_KWORLD_A340 },
Antti Palosaarid6a5f922011-04-07 16:34:44 -03002100 { USB_DEVICE(0x2013, 0x024f),
2101 .driver_info = EM28174_BOARD_PCTV_290E },
Antti Palosaari36588712011-08-01 01:15:30 -03002102 { USB_DEVICE(0x2013, 0x024c),
2103 .driver_info = EM28174_BOARD_PCTV_460E },
Eddi De Pieri82e7dbb2011-11-19 11:37:14 -03002104 { USB_DEVICE(0x2040, 0x1605),
2105 .driver_info = EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C },
Gareth Williams4d28d3d2011-12-24 05:47:29 -03002106 { USB_DEVICE(0xeb1a, 0x5006),
2107 .driver_info = EM2860_BOARD_HT_VIDBOX_NW03 },
Mario Ceresa2f786042012-01-06 16:00:12 -03002108 { USB_DEVICE(0x1b80, 0xe309), /* Sveon STV40 */
2109 .driver_info = EM2860_BOARD_EASYCAP },
Antti Palosaari35530852012-03-18 18:09:01 -03002110 { USB_DEVICE(0x1b80, 0xe425),
2111 .driver_info = EM2874_BOARD_MAXMEDIA_UB425_TC },
Antti Palosaaric247d7b2012-03-19 11:48:19 -03002112 { USB_DEVICE(0x2013, 0x0251),
2113 .driver_info = EM2884_BOARD_PCTV_520E },
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08002114 { },
2115};
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03002116MODULE_DEVICE_TABLE(usb, em28xx_id_table);
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08002117
Mauro Carvalho Chehab102a0b02008-04-17 21:40:45 -03002118/*
Mauro Carvalho Chehab102a0b02008-04-17 21:40:45 -03002119 * EEPROM hash table for devices with generic USB IDs
2120 */
Nicola Soranzoa1a6ee72009-02-10 23:28:24 -03002121static struct em28xx_hash_table em28xx_eeprom_hash[] = {
Mauro Carvalho Chehabea4fd562007-11-03 21:21:57 -03002122 /* P/N: SA 60002070465 Tuner: TVF7533-MF */
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03002123 {0x6ce05a8f, EM2820_BOARD_PROLINK_PLAYTV_USB2, TUNER_YMEC_TVF_5533MF},
Douglas Schilling Landgraf1e1addd2008-12-27 21:38:14 -03002124 {0x72cc5a8b, EM2820_BOARD_PROLINK_PLAYTV_BOX4_USB2, TUNER_YMEC_TVF_5533MF},
Darron Broadda3808e2008-09-30 02:46:41 -03002125 {0x966a0441, EM2880_BOARD_KWORLD_DVB_310U, TUNER_XC2028},
Douglas Schilling Landgrafa35c87c2009-08-06 12:52:11 -03002126 {0x166a0441, EM2880_BOARD_EMPIRE_DUAL_TV, TUNER_XC2028},
Devin Heitmueller19859222009-06-19 00:33:54 -03002127 {0xcee44a99, EM2882_BOARD_EVGA_INDTUBE, TUNER_XC2028},
Devin Heitmuellerd5b3ba92009-07-08 21:51:35 -03002128 {0xb8846b20, EM2881_BOARD_PINNACLE_HYBRID_PRO, TUNER_XC2028},
Antti Palosaari285eb1a2009-09-15 14:42:13 -03002129 {0x63f653bd, EM2870_BOARD_REDDO_DVB_C_USB_BOX, TUNER_ABSENT},
Andrea.Amorosi76@gmail.com7ca7ef62010-02-09 17:53:38 -03002130 {0x4e913442, EM2882_BOARD_DIKOM_DK300, TUNER_XC2028},
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002131};
2132
Mauro Carvalho Chehabd2ba0552007-11-04 08:32:42 -03002133/* I2C devicelist hash table for devices with generic USB IDs */
Sascha Sommerfad7b952007-11-04 08:06:48 -03002134static struct em28xx_hash_table em28xx_i2c_hash[] = {
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03002135 {0xb06a32c3, EM2800_BOARD_TERRATEC_CINERGY_200, TUNER_LG_PAL_NEW_TAPC},
2136 {0xf51200e3, EM2800_BOARD_VGEAR_POCKETTV, TUNER_LG_PAL_NEW_TAPC},
Devin Heitmueller3ed58ba2009-05-27 23:27:26 -03002137 {0x1ba50080, EM2860_BOARD_SAA711X_REFERENCE_DESIGN, TUNER_ABSENT},
Devin Heitmueller443fed92010-03-19 23:53:12 -03002138 {0x77800080, EM2860_BOARD_TVP5150_REFERENCE_DESIGN, TUNER_ABSENT},
Douglas Schilling Landgraff7fe3e62009-01-19 09:31:55 -03002139 {0xc51200e3, EM2820_BOARD_GADMEI_TVR200, TUNER_LG_PAL_NEW_TAPC},
Mauro Carvalho Chehab6d888a62009-08-30 13:05:56 -03002140 {0x4ba50080, EM2861_BOARD_GADMEI_UTV330PLUS, TUNER_TNF_5335MF},
Mauro Carvalho Chehabebaefdb2011-06-01 10:16:25 -03002141 {0x6b800080, EM2874_BOARD_LEADERSHIP_ISDBT, TUNER_ABSENT},
Sascha Sommerfad7b952007-11-04 08:06:48 -03002142};
2143
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03002144/* I2C possible address to saa7115, tvp5150, msp3400, tvaudio */
2145static unsigned short saa711x_addrs[] = {
2146 0x4a >> 1, 0x48 >> 1, /* SAA7111, SAA7111A and SAA7113 */
2147 0x42 >> 1, 0x40 >> 1, /* SAA7114, SAA7115 and SAA7118 */
2148 I2C_CLIENT_END };
2149
2150static unsigned short tvp5150_addrs[] = {
2151 0xb8 >> 1,
2152 0xba >> 1,
2153 I2C_CLIENT_END
2154};
2155
2156static unsigned short msp3400_addrs[] = {
2157 0x80 >> 1,
2158 0x88 >> 1,
2159 I2C_CLIENT_END
2160};
2161
Michael Krufkyd7cba042008-09-12 13:31:45 -03002162int em28xx_tuner_callback(void *ptr, int component, int command, int arg)
Mauro Carvalho Chehabee6e3a82008-04-17 21:37:31 -03002163{
Mauro Carvalho Chehab102a0b02008-04-17 21:40:45 -03002164 int rc = 0;
Mauro Carvalho Chehabee6e3a82008-04-17 21:37:31 -03002165 struct em28xx *dev = ptr;
Mauro Carvalho Chehabee6e3a82008-04-17 21:37:31 -03002166
Eddi De Pieri82e7dbb2011-11-19 11:37:14 -03002167 if (dev->tuner_type != TUNER_XC2028 && dev->tuner_type != TUNER_XC5000)
Mauro Carvalho Chehabee6e3a82008-04-17 21:37:31 -03002168 return 0;
2169
Eddi De Pieri82e7dbb2011-11-19 11:37:14 -03002170 if (command != XC2028_TUNER_RESET && command != XC5000_TUNER_RESET)
Mauro Carvalho Chehabee6e3a82008-04-17 21:37:31 -03002171 return 0;
2172
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03002173 rc = em28xx_gpio_set(dev, dev->board.tuner_gpio);
Mauro Carvalho Chehabee6e3a82008-04-17 21:37:31 -03002174
Mauro Carvalho Chehabee6e3a82008-04-17 21:37:31 -03002175 return rc;
2176}
2177EXPORT_SYMBOL_GPL(em28xx_tuner_callback);
2178
Nicola Soranzoa1a6ee72009-02-10 23:28:24 -03002179static inline void em28xx_set_model(struct em28xx *dev)
Mauro Carvalho Chehabee6e3a82008-04-17 21:37:31 -03002180{
Mauro Carvalho Chehab505b6d02008-11-25 09:39:50 -03002181 memcpy(&dev->board, &em28xx_boards[dev->model], sizeof(dev->board));
Devin Heitmuellered14e1c2008-12-29 22:27:30 -03002182
2183 /* Those are the default values for the majority of boards
2184 Use those values if not specified otherwise at boards entry
2185 */
2186 if (!dev->board.xclk)
2187 dev->board.xclk = EM28XX_XCLK_IR_RC5_MODE |
2188 EM28XX_XCLK_FREQUENCY_12MHZ;
2189
2190 if (!dev->board.i2c_speed)
2191 dev->board.i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
2192 EM28XX_I2C_FREQ_100_KHZ;
Mauro Carvalho Chehabee6e3a82008-04-17 21:37:31 -03002193}
2194
Mauro Carvalho Chehabf2e26ae2009-08-12 20:21:44 -03002195
2196/* FIXME: Should be replaced by a proper mt9m111 driver */
2197static int em28xx_initialize_mt9m111(struct em28xx *dev)
2198{
2199 int i;
2200 unsigned char regs[][3] = {
2201 { 0x0d, 0x00, 0x01, }, /* reset and use defaults */
2202 { 0x0d, 0x00, 0x00, },
2203 { 0x0a, 0x00, 0x21, },
2204 { 0x21, 0x04, 0x00, }, /* full readout speed, no row/col skipping */
2205 };
2206
2207 for (i = 0; i < ARRAY_SIZE(regs); i++)
2208 i2c_master_send(&dev->i2c_client, &regs[i][0], 3);
2209
2210 return 0;
2211}
2212
2213
Mauro Carvalho Chehabb80fd2d2009-07-14 21:08:22 -03002214/* FIXME: Should be replaced by a proper mt9m001 driver */
2215static int em28xx_initialize_mt9m001(struct em28xx *dev)
2216{
2217 int i;
2218 unsigned char regs[][3] = {
2219 { 0x0d, 0x00, 0x01, },
2220 { 0x0d, 0x00, 0x00, },
2221 { 0x04, 0x05, 0x00, }, /* hres = 1280 */
2222 { 0x03, 0x04, 0x00, }, /* vres = 1024 */
2223 { 0x20, 0x11, 0x00, },
2224 { 0x06, 0x00, 0x10, },
2225 { 0x2b, 0x00, 0x24, },
2226 { 0x2e, 0x00, 0x24, },
2227 { 0x35, 0x00, 0x24, },
2228 { 0x2d, 0x00, 0x20, },
2229 { 0x2c, 0x00, 0x20, },
2230 { 0x09, 0x0a, 0xd4, },
2231 { 0x35, 0x00, 0x57, },
2232 };
2233
2234 for (i = 0; i < ARRAY_SIZE(regs); i++)
2235 i2c_master_send(&dev->i2c_client, &regs[i][0], 3);
2236
2237 return 0;
2238}
2239
Mauro Carvalho Chehab791a08f2009-07-03 15:36:18 -03002240/* HINT method: webcam I2C chips
2241 *
Mauro Carvalho Chehabf2e26ae2009-08-12 20:21:44 -03002242 * This method works for webcams with Micron sensors
Mauro Carvalho Chehab791a08f2009-07-03 15:36:18 -03002243 */
2244static int em28xx_hint_sensor(struct em28xx *dev)
2245{
2246 int rc;
2247 char *sensor_name;
2248 unsigned char cmd;
2249 __be16 version_be;
2250 u16 version;
2251
Mauro Carvalho Chehab3d3215c2009-08-10 10:29:27 -03002252 /* Micron sensor detection */
Mauro Carvalho Chehab791a08f2009-07-03 15:36:18 -03002253 dev->i2c_client.addr = 0xba >> 1;
2254 cmd = 0;
2255 i2c_master_send(&dev->i2c_client, &cmd, 1);
2256 rc = i2c_master_recv(&dev->i2c_client, (char *)&version_be, 2);
2257 if (rc != 2)
2258 return -EINVAL;
2259
2260 version = be16_to_cpu(version_be);
Mauro Carvalho Chehab791a08f2009-07-03 15:36:18 -03002261 switch (version) {
Mauro Carvalho Chehab296544e2009-07-27 08:24:29 -03002262 case 0x8232: /* mt9v011 640x480 1.3 Mpix sensor */
2263 case 0x8243: /* mt9v011 rev B 640x480 1.3 Mpix sensor */
Mauro Carvalho Chehab791a08f2009-07-03 15:36:18 -03002264 dev->model = EM2820_BOARD_SILVERCREST_WEBCAM;
Mauro Carvalho Chehab3d3215c2009-08-10 10:29:27 -03002265 em28xx_set_model(dev);
2266
Mauro Carvalho Chehab791a08f2009-07-03 15:36:18 -03002267 sensor_name = "mt9v011";
Mauro Carvalho Chehab527f09a2009-07-12 11:04:15 -03002268 dev->em28xx_sensor = EM28XX_MT9V011;
Mauro Carvalho Chehab55699962009-07-13 20:15:02 -03002269 dev->sensor_xres = 640;
2270 dev->sensor_yres = 480;
Mauro Carvalho Chehab3d3215c2009-08-10 10:29:27 -03002271 /*
2272 * FIXME: mt9v011 uses I2S speed as xtal clk - at least with
2273 * the Silvercrest cam I have here for testing - for higher
2274 * resolutions, a high clock cause horizontal artifacts, so we
2275 * need to use a lower xclk frequency.
2276 * Yet, it would be possible to adjust xclk depending on the
2277 * desired resolution, since this affects directly the
2278 * frame rate.
2279 */
2280 dev->board.xclk = EM28XX_XCLK_FREQUENCY_4_3MHZ;
2281 dev->sensor_xtal = 4300000;
Mauro Carvalho Chehab579d3152009-07-14 12:33:25 -03002282
2283 /* probably means GRGB 16 bit bayer */
2284 dev->vinmode = 0x0d;
2285 dev->vinctl = 0x00;
2286
Mauro Carvalho Chehab791a08f2009-07-03 15:36:18 -03002287 break;
Mauro Carvalho Chehabf2e26ae2009-08-12 20:21:44 -03002288
2289 case 0x143a: /* MT9M111 as found in the ECS G200 */
2290 dev->model = EM2750_BOARD_UNKNOWN;
2291 em28xx_set_model(dev);
2292
2293 sensor_name = "mt9m111";
2294 dev->board.xclk = EM28XX_XCLK_FREQUENCY_48MHZ;
2295 dev->em28xx_sensor = EM28XX_MT9M111;
2296 em28xx_initialize_mt9m111(dev);
2297 dev->sensor_xres = 640;
2298 dev->sensor_yres = 512;
2299
2300 dev->vinmode = 0x0a;
2301 dev->vinctl = 0x00;
2302
2303 break;
2304
Mauro Carvalho Chehabb80fd2d2009-07-14 21:08:22 -03002305 case 0x8431:
2306 dev->model = EM2750_BOARD_UNKNOWN;
Mauro Carvalho Chehab3d3215c2009-08-10 10:29:27 -03002307 em28xx_set_model(dev);
2308
Mauro Carvalho Chehabb80fd2d2009-07-14 21:08:22 -03002309 sensor_name = "mt9m001";
2310 dev->em28xx_sensor = EM28XX_MT9M001;
2311 em28xx_initialize_mt9m001(dev);
2312 dev->sensor_xres = 1280;
2313 dev->sensor_yres = 1024;
2314
2315 /* probably means BGGR 16 bit bayer */
2316 dev->vinmode = 0x0c;
2317 dev->vinctl = 0x00;
2318
2319 break;
Mauro Carvalho Chehab791a08f2009-07-03 15:36:18 -03002320 default:
Mauro Carvalho Chehabf2e26ae2009-08-12 20:21:44 -03002321 printk("Unknown Micron Sensor 0x%04x\n", version);
Mauro Carvalho Chehab791a08f2009-07-03 15:36:18 -03002322 return -EINVAL;
2323 }
2324
Mauro Carvalho Chehab3d3215c2009-08-10 10:29:27 -03002325 /* Setup webcam defaults */
2326 em28xx_pre_card_setup(dev);
2327
Mauro Carvalho Chehab8b220792009-07-12 10:56:21 -03002328 em28xx_errdev("Sensor is %s, using model %s entry.\n",
Mauro Carvalho Chehab791a08f2009-07-03 15:36:18 -03002329 sensor_name, em28xx_boards[dev->model].name);
2330
2331 return 0;
2332}
2333
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002334/* Since em28xx_pre_card_setup() requires a proper dev->model,
2335 * this won't work for boards with generic PCI IDs
2336 */
Markus Rechbergera94e95b2006-01-23 17:11:10 -02002337void em28xx_pre_card_setup(struct em28xx *dev)
2338{
Devin Heitmuellered14e1c2008-12-29 22:27:30 -03002339 /* Set the initial XCLK and I2C clock values based on the board
2340 definition */
Mauro Carvalho Chehab505b6d02008-11-25 09:39:50 -03002341 em28xx_write_reg(dev, EM28XX_R0F_XCLK, dev->board.xclk & 0x7f);
Sascha Sommerca80cf62012-01-08 16:32:09 -03002342 if (!dev->board.is_em2800)
2343 em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, dev->board.i2c_speed);
Mauro Carvalho Chehaba2070c62008-11-25 07:05:06 -03002344 msleep(50);
2345
Markus Rechbergera94e95b2006-01-23 17:11:10 -02002346 /* request some modules */
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03002347 switch (dev->model) {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002348 case EM2861_BOARD_PLEXTOR_PX_TV100U:
Mauro Carvalho Chehab0a6e44d2009-07-29 01:39:12 -03002349 /* Sets the msp34xx I2S speed */
2350 dev->i2s_speed = 2048000;
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002351 break;
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002352 case EM2861_BOARD_KWORLD_PVRTV_300U:
2353 case EM2880_BOARD_KWORLD_DVB_305U:
Devin Heitmueller6d676d82008-11-25 06:04:02 -03002354 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0x6d);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002355 msleep(10);
Devin Heitmueller6d676d82008-11-25 06:04:02 -03002356 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0x7d);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002357 msleep(10);
2358 break;
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002359 case EM2870_BOARD_COMPRO_VIDEOMATE:
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002360 /* TODO: someone can do some cleanup here...
2361 not everything's needed */
Devin Heitmueller6d676d82008-11-25 06:04:02 -03002362 em28xx_write_reg(dev, EM2880_R04_GPO, 0x00);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002363 msleep(10);
Devin Heitmueller6d676d82008-11-25 06:04:02 -03002364 em28xx_write_reg(dev, EM2880_R04_GPO, 0x01);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002365 msleep(10);
Devin Heitmueller6d676d82008-11-25 06:04:02 -03002366 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfd);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002367 mdelay(70);
Devin Heitmueller6d676d82008-11-25 06:04:02 -03002368 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfc);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002369 mdelay(70);
Devin Heitmueller6d676d82008-11-25 06:04:02 -03002370 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xdc);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002371 mdelay(70);
Devin Heitmueller6d676d82008-11-25 06:04:02 -03002372 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfc);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002373 mdelay(70);
2374 break;
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002375 case EM2870_BOARD_TERRATEC_XS_MT2060:
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002376 /* this device needs some gpio writes to get the DVB-T
2377 demod work */
Devin Heitmueller6d676d82008-11-25 06:04:02 -03002378 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfe);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002379 mdelay(70);
Devin Heitmueller6d676d82008-11-25 06:04:02 -03002380 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xde);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002381 mdelay(70);
Devin Heitmueller6d676d82008-11-25 06:04:02 -03002382 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfe);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002383 mdelay(70);
2384 break;
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002385 case EM2870_BOARD_PINNACLE_PCTV_DVB:
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002386 /* this device needs some gpio writes to get the
2387 DVB-T demod work */
Devin Heitmueller6d676d82008-11-25 06:04:02 -03002388 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfe);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002389 mdelay(70);
Devin Heitmueller6d676d82008-11-25 06:04:02 -03002390 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xde);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002391 mdelay(70);
Devin Heitmueller6d676d82008-11-25 06:04:02 -03002392 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfe);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002393 mdelay(70);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002394 break;
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002395 case EM2820_BOARD_GADMEI_UTV310:
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002396 case EM2820_BOARD_MSI_VOX_USB_2:
Mauro Carvalho Chehaba2070c62008-11-25 07:05:06 -03002397 /* enables audio for that devices */
Devin Heitmueller6d676d82008-11-25 06:04:02 -03002398 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfd);
Mauro Carvalho Chehab102a0b02008-04-17 21:40:45 -03002399 break;
Mauro Carvalho Chehab0bf4f6c2009-02-11 14:13:20 -03002400
Franklin Mengd7de5d82009-06-06 17:05:02 -03002401 case EM2882_BOARD_KWORLD_ATSC_315U:
2402 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xff);
2403 msleep(10);
2404 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfe);
2405 msleep(10);
2406 em28xx_write_reg(dev, EM2880_R04_GPO, 0x00);
2407 msleep(10);
2408 em28xx_write_reg(dev, EM2880_R04_GPO, 0x08);
2409 msleep(10);
2410 break;
2411
Mauro Carvalho Chehab0bf4f6c2009-02-11 14:13:20 -03002412 case EM2860_BOARD_KAIOMY_TVNPC_U2:
2413 em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x07", 1);
2414 em28xx_write_regs(dev, EM28XX_R06_I2C_CLK, "\x40", 1);
2415 em28xx_write_regs(dev, 0x0d, "\x42", 1);
2416 em28xx_write_regs(dev, 0x08, "\xfd", 1);
2417 msleep(10);
2418 em28xx_write_regs(dev, 0x08, "\xff", 1);
2419 msleep(10);
2420 em28xx_write_regs(dev, 0x08, "\x7f", 1);
2421 msleep(10);
2422 em28xx_write_regs(dev, 0x08, "\x6b", 1);
2423
2424 break;
Mauro Carvalho Chehab56ee3802009-02-11 14:18:36 -03002425 case EM2860_BOARD_EASYCAP:
2426 em28xx_write_regs(dev, 0x08, "\xf8", 1);
2427 break;
2428
Indika Katugampalaf74a61e32009-02-11 11:13:05 -03002429 case EM2820_BOARD_IODATA_GVMVP_SZ:
2430 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xff);
2431 msleep(70);
2432 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xf7);
2433 msleep(10);
2434 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfe);
2435 msleep(70);
2436 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfd);
2437 msleep(70);
2438 break;
Mauro Carvalho Chehab102a0b02008-04-17 21:40:45 -03002439 }
Mauro Carvalho Chehabc67ec532008-04-17 21:48:00 -03002440
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03002441 em28xx_gpio_set(dev, dev->board.tuner_gpio);
Mauro Carvalho Chehabc67ec532008-04-17 21:48:00 -03002442 em28xx_set_mode(dev, EM28XX_ANALOG_MODE);
2443
2444 /* Unlock device */
Mauro Carvalho Chehab2fe3e2e2008-11-27 09:10:40 -03002445 em28xx_set_mode(dev, EM28XX_SUSPEND);
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002446}
2447
Mauro Carvalho Chehabe54318e2008-04-18 18:34:31 -03002448static void em28xx_setup_xc3028(struct em28xx *dev, struct xc2028_ctrl *ctl)
Mauro Carvalho Chehab3ca9c092008-04-17 21:37:53 -03002449{
2450 memset(ctl, 0, sizeof(*ctl));
2451
2452 ctl->fname = XC2028_DEFAULT_FIRMWARE;
2453 ctl->max_len = 64;
2454 ctl->mts = em28xx_boards[dev->model].mts_firmware;
2455
2456 switch (dev->model) {
Douglas Schilling Landgrafe5db5d42009-04-09 18:24:34 -03002457 case EM2880_BOARD_EMPIRE_DUAL_TV:
Mauro Carvalho Chehabe77ebda2008-04-18 18:37:25 -03002458 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900:
Uroš Vamplec994d02009-09-30 22:53:37 -03002459 case EM2882_BOARD_TERRATEC_HYBRID_XS:
Mauro Carvalho Chehabe77ebda2008-04-18 18:37:25 -03002460 ctl->demod = XC3028_FE_ZARLINK456;
2461 break;
reinhard schwab655b8402008-07-26 10:47:00 -03002462 case EM2880_BOARD_TERRATEC_HYBRID_XS:
Michel Garniercec4e6c2010-10-16 14:42:01 -03002463 case EM2880_BOARD_TERRATEC_HYBRID_XS_FR:
Devin Heitmuellere16e5a32009-07-15 00:37:22 -03002464 case EM2881_BOARD_PINNACLE_HYBRID_PRO:
reinhard schwab655b8402008-07-26 10:47:00 -03002465 ctl->demod = XC3028_FE_ZARLINK456;
2466 break;
Devin Heitmueller17d9d552008-06-08 10:22:03 -03002467 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2:
Devin Heitmuellerad9b4bb2011-03-13 02:09:59 -03002468 case EM2882_BOARD_PINNACLE_HYBRID_PRO_330E:
Devin Heitmueller17d9d552008-06-08 10:22:03 -03002469 ctl->demod = XC3028_FE_DEFAULT;
2470 break;
Devin Heitmueller5ea7fe42008-09-16 02:02:12 -03002471 case EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600:
2472 ctl->demod = XC3028_FE_DEFAULT;
2473 ctl->fname = XC3028L_DEFAULT_FIRMWARE;
2474 break;
Douglas Schilling Landgraff89bc322008-12-01 21:01:04 -03002475 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850:
Mauro Carvalho Chehab10ac6602008-07-27 14:58:58 -03002476 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950:
Devin Heitmueller4fd305b2008-06-04 13:43:46 -03002477 case EM2880_BOARD_PINNACLE_PCTV_HD_PRO:
Mauro Carvalho Chehabe77ebda2008-04-18 18:37:25 -03002478 /* FIXME: Better to specify the needed IF */
Devin Heitmuellerbdfbf952008-04-17 21:38:27 -03002479 ctl->demod = XC3028_FE_DEFAULT;
2480 break;
Robert Krakora6e7b9ea2009-01-18 21:59:34 -03002481 case EM2883_BOARD_KWORLD_HYBRID_330U:
Andrea.Amorosi76@gmail.com7ca7ef62010-02-09 17:53:38 -03002482 case EM2882_BOARD_DIKOM_DK300:
Antonio Larrosa811fab62010-03-04 22:19:48 -03002483 case EM2882_BOARD_KWORLD_VS_DVBT:
Robert Krakora6e7b9ea2009-01-18 21:59:34 -03002484 ctl->demod = XC3028_FE_CHINA;
2485 ctl->fname = XC2028_DEFAULT_FIRMWARE;
2486 break;
Devin Heitmueller19859222009-06-19 00:33:54 -03002487 case EM2882_BOARD_EVGA_INDTUBE:
2488 ctl->demod = XC3028_FE_CHINA;
2489 ctl->fname = XC3028L_DEFAULT_FIRMWARE;
2490 break;
Mauro Carvalho Chehab3ca9c092008-04-17 21:37:53 -03002491 default:
2492 ctl->demod = XC3028_FE_OREN538;
2493 }
2494}
Mauro Carvalho Chehab3ca9c092008-04-17 21:37:53 -03002495
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03002496static void em28xx_tuner_setup(struct em28xx *dev)
Mauro Carvalho Chehab882876b2007-10-29 11:33:18 -03002497{
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002498 struct tuner_setup tun_setup;
2499 struct v4l2_frequency f;
Mauro Carvalho Chehab882876b2007-10-29 11:33:18 -03002500
Mauro Carvalho Chehabed086312008-01-24 06:59:20 -03002501 if (dev->tuner_type == TUNER_ABSENT)
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002502 return;
Mauro Carvalho Chehab882876b2007-10-29 11:33:18 -03002503
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03002504 memset(&tun_setup, 0, sizeof(tun_setup));
2505
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002506 tun_setup.mode_mask = T_ANALOG_TV | T_RADIO;
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002507 tun_setup.tuner_callback = em28xx_tuner_callback;
Mauro Carvalho Chehab882876b2007-10-29 11:33:18 -03002508
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03002509 if (dev->board.radio.type) {
2510 tun_setup.type = dev->board.radio.type;
2511 tun_setup.addr = dev->board.radio_addr;
2512
2513 v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_type_addr, &tun_setup);
2514 }
2515
2516 if ((dev->tuner_type != TUNER_ABSENT) && (dev->tuner_type)) {
2517 tun_setup.type = dev->tuner_type;
2518 tun_setup.addr = dev->tuner_addr;
2519
2520 v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_type_addr, &tun_setup);
2521 }
2522
2523 if (dev->tda9887_conf) {
2524 struct v4l2_priv_tun_config tda9887_cfg;
2525
2526 tda9887_cfg.tuner = TUNER_TDA9887;
2527 tda9887_cfg.priv = &dev->tda9887_conf;
2528
2529 v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_config, &tda9887_cfg);
2530 }
Mauro Carvalho Chehab882876b2007-10-29 11:33:18 -03002531
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002532 if (dev->tuner_type == TUNER_XC2028) {
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03002533 struct v4l2_priv_tun_config xc2028_cfg;
Mauro Carvalho Chehab3ca9c092008-04-17 21:37:53 -03002534 struct xc2028_ctrl ctl;
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002535
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03002536 memset(&xc2028_cfg, 0, sizeof(xc2028_cfg));
2537 memset(&ctl, 0, sizeof(ctl));
2538
Mauro Carvalho Chehab3ca9c092008-04-17 21:37:53 -03002539 em28xx_setup_xc3028(dev, &ctl);
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002540
2541 xc2028_cfg.tuner = TUNER_XC2028;
2542 xc2028_cfg.priv = &ctl;
2543
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03002544 v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_config, &xc2028_cfg);
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002545 }
2546
2547 /* configure tuner */
2548 f.tuner = 0;
2549 f.type = V4L2_TUNER_ANALOG_TV;
2550 f.frequency = 9076; /* just a magic number */
2551 dev->ctl_freq = f.frequency;
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03002552 v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_frequency, &f);
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002553}
2554
2555static int em28xx_hint_board(struct em28xx *dev)
2556{
2557 int i;
2558
Mauro Carvalho Chehabd2ba0552007-11-04 08:32:42 -03002559 /* HINT method: EEPROM
2560 *
2561 * This method works only for boards with eeprom.
2562 * Uses a hash of all eeprom bytes. The hash should be
2563 * unique for a vendor/tuner pair.
2564 * There are a high chance that tuners for different
2565 * video standards produce different hashes.
2566 */
2567 for (i = 0; i < ARRAY_SIZE(em28xx_eeprom_hash); i++) {
2568 if (dev->hash == em28xx_eeprom_hash[i].hash) {
2569 dev->model = em28xx_eeprom_hash[i].model;
2570 dev->tuner_type = em28xx_eeprom_hash[i].tuner;
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002571
2572 em28xx_errdev("Your board has no unique USB ID.\n");
2573 em28xx_errdev("A hint were successfully done, "
2574 "based on eeprom hash.\n");
2575 em28xx_errdev("This method is not 100%% failproof.\n");
2576 em28xx_errdev("If the board were missdetected, "
2577 "please email this log to:\n");
2578 em28xx_errdev("\tV4L Mailing List "
Alexey Klimov51caf912009-01-25 12:53:09 -03002579 " <linux-media@vger.kernel.org>\n");
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002580 em28xx_errdev("Board detected as %s\n",
2581 em28xx_boards[dev->model].name);
2582
2583 return 0;
2584 }
2585 }
Sascha Sommerfad7b952007-11-04 08:06:48 -03002586
Mauro Carvalho Chehabd2ba0552007-11-04 08:32:42 -03002587 /* HINT method: I2C attached devices
2588 *
2589 * This method works for all boards.
2590 * Uses a hash of i2c scanned devices.
2591 * Devices with the same i2c attached chips will
2592 * be considered equal.
2593 * This method is less precise than the eeprom one.
2594 */
2595
Sascha Sommerfad7b952007-11-04 08:06:48 -03002596 /* user did not request i2c scanning => do it now */
2597 if (!dev->i2c_hash)
2598 em28xx_do_i2c_scan(dev);
2599
2600 for (i = 0; i < ARRAY_SIZE(em28xx_i2c_hash); i++) {
2601 if (dev->i2c_hash == em28xx_i2c_hash[i].hash) {
2602 dev->model = em28xx_i2c_hash[i].model;
2603 dev->tuner_type = em28xx_i2c_hash[i].tuner;
2604 em28xx_errdev("Your board has no unique USB ID.\n");
2605 em28xx_errdev("A hint were successfully done, "
2606 "based on i2c devicelist hash.\n");
2607 em28xx_errdev("This method is not 100%% failproof.\n");
2608 em28xx_errdev("If the board were missdetected, "
2609 "please email this log to:\n");
2610 em28xx_errdev("\tV4L Mailing List "
Alexey Klimov51caf912009-01-25 12:53:09 -03002611 " <linux-media@vger.kernel.org>\n");
Sascha Sommerfad7b952007-11-04 08:06:48 -03002612 em28xx_errdev("Board detected as %s\n",
2613 em28xx_boards[dev->model].name);
2614
2615 return 0;
2616 }
2617 }
2618
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002619 em28xx_errdev("Your board has no unique USB ID and thus need a "
2620 "hint to be detected.\n");
2621 em28xx_errdev("You may try to use card=<n> insmod option to "
2622 "workaround that.\n");
2623 em28xx_errdev("Please send an email with this log to:\n");
Alexey Klimov51caf912009-01-25 12:53:09 -03002624 em28xx_errdev("\tV4L Mailing List <linux-media@vger.kernel.org>\n");
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002625 em28xx_errdev("Board eeprom hash is 0x%08lx\n", dev->hash);
Sascha Sommerfad7b952007-11-04 08:06:48 -03002626 em28xx_errdev("Board i2c devicelist hash is 0x%08lx\n", dev->i2c_hash);
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002627
2628 em28xx_errdev("Here is a list of valid choices for the card=<n>"
2629 " insmod option:\n");
2630 for (i = 0; i < em28xx_bcount; i++) {
2631 em28xx_errdev(" card=%d -> %s\n",
2632 i, em28xx_boards[i].name);
2633 }
2634 return -1;
Mauro Carvalho Chehab882876b2007-10-29 11:33:18 -03002635}
2636
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -03002637/* ----------------------------------------------------------------------- */
Jean Delvarec668f322009-05-13 16:48:50 -03002638void em28xx_register_i2c_ir(struct em28xx *dev)
2639{
Magnus Almca39d842009-11-13 05:48:24 -03002640 /* Leadtek winfast tv USBII deluxe can find a non working IR-device */
2641 /* at address 0x18, so if that address is needed for another board in */
2642 /* the future, please put it after 0x1f. */
Jean Delvare43e16ea2009-10-02 05:47:08 -03002643 struct i2c_board_info info;
Jean Delvarec668f322009-05-13 16:48:50 -03002644 const unsigned short addr_list[] = {
Magnus Almca39d842009-11-13 05:48:24 -03002645 0x1f, 0x30, 0x47, I2C_CLIENT_END
Jean Delvarec668f322009-05-13 16:48:50 -03002646 };
2647
2648 if (disable_ir)
2649 return;
2650
Jean Delvare43e16ea2009-10-02 05:47:08 -03002651 memset(&info, 0, sizeof(struct i2c_board_info));
Mauro Carvalho Chehabd2ebd0f82009-09-07 02:16:47 -03002652 memset(&dev->init_data, 0, sizeof(dev->init_data));
Jean Delvare43e16ea2009-10-02 05:47:08 -03002653 strlcpy(info.type, "ir_video", I2C_NAME_SIZE);
Jean Delvarec668f322009-05-13 16:48:50 -03002654
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -03002655 /* detect & configure */
2656 switch (dev->model) {
Mauro Carvalho Chehab7e8e16c2009-09-08 14:07:05 -03002657 case EM2800_BOARD_TERRATEC_CINERGY_200:
2658 case EM2820_BOARD_TERRATEC_CINERGY_250:
Mauro Carvalho Chehab02858ee2010-04-02 20:01:00 -03002659 dev->init_data.ir_codes = RC_MAP_EM_TERRATEC;
Mauro Carvalho Chehabd2ebd0f82009-09-07 02:16:47 -03002660 dev->init_data.get_key = em28xx_get_key_terratec;
2661 dev->init_data.name = "i2c IR (EM28XX Terratec)";
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -03002662 break;
Mauro Carvalho Chehab7e8e16c2009-09-08 14:07:05 -03002663 case EM2820_BOARD_PINNACLE_USB_2:
Mauro Carvalho Chehab02858ee2010-04-02 20:01:00 -03002664 dev->init_data.ir_codes = RC_MAP_PINNACLE_GREY;
Mauro Carvalho Chehabd2ebd0f82009-09-07 02:16:47 -03002665 dev->init_data.get_key = em28xx_get_key_pinnacle_usb_grey;
2666 dev->init_data.name = "i2c IR (EM28XX Pinnacle PCTV)";
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -03002667 break;
Mauro Carvalho Chehab7e8e16c2009-09-08 14:07:05 -03002668 case EM2820_BOARD_HAUPPAUGE_WINTV_USB_2:
Mauro Carvalho Chehab15195d32011-01-24 12:18:47 -03002669 dev->init_data.ir_codes = RC_MAP_HAUPPAUGE;
Mauro Carvalho Chehabd2ebd0f82009-09-07 02:16:47 -03002670 dev->init_data.get_key = em28xx_get_key_em_haup;
2671 dev->init_data.name = "i2c IR (EM2840 Hauppauge)";
Mauro Carvalho Chehab5a850252011-01-12 14:22:42 -03002672 break;
Douglas Schilling Landgraf0a711022010-02-05 14:33:38 -02002673 case EM2820_BOARD_LEADTEK_WINFAST_USBII_DELUXE:
Joe Perchesb1dc6142010-11-15 00:04:28 -03002674 dev->init_data.ir_codes = RC_MAP_WINFAST_USBII_DELUXE;
Douglas Schilling Landgraf0a711022010-02-05 14:33:38 -02002675 dev->init_data.get_key = em28xx_get_key_winfast_usbii_deluxe;
2676 dev->init_data.name = "i2c IR (EM2820 Winfast TV USBII Deluxe)";
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -03002677 break;
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -03002678 }
Jean Delvare4d7a2d62009-05-13 16:49:32 -03002679
Mauro Carvalho Chehabd2ebd0f82009-09-07 02:16:47 -03002680 if (dev->init_data.name)
Jean Delvare43e16ea2009-10-02 05:47:08 -03002681 info.platform_data = &dev->init_data;
Jean Delvare9a942412010-08-11 18:20:56 +02002682 i2c_new_probed_device(&dev->i2c_adap, &info, addr_list, NULL);
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -03002683}
2684
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -08002685void em28xx_card_setup(struct em28xx *dev)
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08002686{
Mauro Carvalho Chehab3d3215c2009-08-10 10:29:27 -03002687 /*
2688 * If the device can be a webcam, seek for a sensor.
2689 * If sensor is not found, then it isn't a webcam.
2690 */
2691 if (dev->board.is_webcam) {
2692 if (em28xx_hint_sensor(dev) < 0)
2693 dev->board.is_webcam = 0;
2694 else
2695 dev->progressive = 1;
Mauro Carvalho Chehabca3dfd62010-09-10 17:29:14 -03002696 }
2697
2698 if (!dev->board.is_webcam) {
2699 switch (dev->model) {
2700 case EM2820_BOARD_UNKNOWN:
2701 case EM2800_BOARD_UNKNOWN:
2702 /*
2703 * The K-WORLD DVB-T 310U is detected as an MSI Digivox AD.
2704 *
2705 * This occurs because they share identical USB vendor and
2706 * product IDs.
2707 *
2708 * What we do here is look up the EEPROM hash of the K-WORLD
2709 * and if it is found then we decide that we do not have
2710 * a DIGIVOX and reset the device to the K-WORLD instead.
2711 *
2712 * This solution is only valid if they do not share eeprom
2713 * hash identities which has not been determined as yet.
2714 */
2715 if (em28xx_hint_board(dev) < 0)
2716 em28xx_errdev("Board not discovered\n");
2717 else {
2718 em28xx_set_model(dev);
2719 em28xx_pre_card_setup(dev);
2720 }
2721 break;
2722 default:
2723 em28xx_set_model(dev);
2724 }
2725 }
Mauro Carvalho Chehab3d3215c2009-08-10 10:29:27 -03002726
2727 em28xx_info("Identified as %s (card=%d)\n",
2728 dev->board.name, dev->model);
Mauro Carvalho Chehabf8b60302007-11-05 08:42:55 -03002729
2730 dev->tuner_type = em28xx_boards[dev->model].tuner_type;
Mauro Carvalho Chehab31e05302008-11-20 18:47:37 -03002731 if (em28xx_boards[dev->model].tuner_addr)
2732 dev->tuner_addr = em28xx_boards[dev->model].tuner_addr;
Mauro Carvalho Chehabf8b60302007-11-05 08:42:55 -03002733
Franklin Mengae3340c2009-06-06 16:34:01 -03002734 if (em28xx_boards[dev->model].tda9887_conf)
2735 dev->tda9887_conf = em28xx_boards[dev->model].tda9887_conf;
2736
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08002737 /* request some modules */
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002738 switch (dev->model) {
2739 case EM2820_BOARD_HAUPPAUGE_WINTV_USB_2:
Mauro Carvalho Chehab98ae1272007-11-05 09:30:39 -03002740 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900:
Devin Heitmueller17d9d552008-06-08 10:22:03 -03002741 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2:
Douglas Schilling Landgraff89bc322008-12-01 21:01:04 -03002742 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850:
Mauro Carvalho Chehab10ac6602008-07-27 14:58:58 -03002743 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950:
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002744 {
2745 struct tveeprom tv;
Mauro Carvalho Chehabac07bb72009-09-08 14:04:41 -03002746#if defined(CONFIG_MODULES) && defined(MODULE)
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002747 request_module("tveeprom");
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08002748#endif
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002749 /* Call first TVeeprom */
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08002750
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002751 dev->i2c_client.addr = 0xa0 >> 1;
2752 tveeprom_hauppauge_analog(&dev->i2c_client, &tv, dev->eedata);
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08002753
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002754 dev->tuner_type = tv.tuner_type;
Mauro Carvalho Chehabed086312008-01-24 06:59:20 -03002755
Hans Verkuil38f9d302008-07-23 05:09:15 -03002756 if (tv.audio_processor == V4L2_IDENT_MSPX4XX) {
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002757 dev->i2s_speed = 2048000;
Mauro Carvalho Chehab505b6d02008-11-25 09:39:50 -03002758 dev->board.has_msp34xx = 1;
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002759 }
2760 break;
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08002761 }
Franklin Mengd7de5d82009-06-06 17:05:02 -03002762 case EM2882_BOARD_KWORLD_ATSC_315U:
2763 em28xx_write_reg(dev, 0x0d, 0x42);
2764 msleep(10);
2765 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfd);
2766 msleep(10);
2767 break;
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002768 case EM2820_BOARD_KWORLD_PVRTV2800RF:
2769 /* GPIO enables sound on KWORLD PVR TV 2800RF */
Devin Heitmueller6d676d82008-11-25 06:04:02 -03002770 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xf9);
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002771 break;
2772 case EM2820_BOARD_UNKNOWN:
2773 case EM2800_BOARD_UNKNOWN:
Darron Broadda3808e2008-09-30 02:46:41 -03002774 /*
2775 * The K-WORLD DVB-T 310U is detected as an MSI Digivox AD.
2776 *
2777 * This occurs because they share identical USB vendor and
2778 * product IDs.
2779 *
2780 * What we do here is look up the EEPROM hash of the K-WORLD
2781 * and if it is found then we decide that we do not have
2782 * a DIGIVOX and reset the device to the K-WORLD instead.
2783 *
2784 * This solution is only valid if they do not share eeprom
2785 * hash identities which has not been determined as yet.
2786 */
2787 case EM2880_BOARD_MSI_DIGIVOX_AD:
Mauro Carvalho Chehabf8b60302007-11-05 08:42:55 -03002788 if (!em28xx_hint_board(dev))
2789 em28xx_set_model(dev);
Devin Heitmuellercdf7bfa2009-06-19 00:20:28 -03002790
2791 /* In cases where we had to use a board hint, the call to
2792 em28xx_set_mode() in em28xx_pre_card_setup() was a no-op,
2793 so make the call now so the analog GPIOs are set properly
2794 before probing the i2c bus. */
Devin Heitmueller5343e442009-07-15 00:35:47 -03002795 em28xx_gpio_set(dev, dev->board.tuner_gpio);
Devin Heitmuellercdf7bfa2009-06-19 00:20:28 -03002796 em28xx_set_mode(dev, EM28XX_ANALOG_MODE);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002797 break;
Andrea.Amorosi76@gmail.com7ca7ef62010-02-09 17:53:38 -03002798
2799/*
2800 * The Dikom DK300 is detected as an Kworld VS-DVB-T 323UR.
2801 *
2802 * This occurs because they share identical USB vendor and
2803 * product IDs.
2804 *
2805 * What we do here is look up the EEPROM hash of the Dikom
2806 * and if it is found then we decide that we do not have
2807 * a Kworld and reset the device to the Dikom instead.
2808 *
2809 * This solution is only valid if they do not share eeprom
2810 * hash identities which has not been determined as yet.
2811 */
2812 case EM2882_BOARD_KWORLD_VS_DVBT:
2813 if (!em28xx_hint_board(dev))
2814 em28xx_set_model(dev);
2815
2816 /* In cases where we had to use a board hint, the call to
2817 em28xx_set_mode() in em28xx_pre_card_setup() was a no-op,
2818 so make the call now so the analog GPIOs are set properly
2819 before probing the i2c bus. */
2820 em28xx_gpio_set(dev, dev->board.tuner_gpio);
2821 em28xx_set_mode(dev, EM28XX_ANALOG_MODE);
2822 break;
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002823 }
2824
Mauro Carvalho Chehabac07bb72009-09-08 14:04:41 -03002825#if defined(CONFIG_MODULES) && defined(MODULE)
2826 if (dev->board.has_ir_i2c && !disable_ir)
2827 request_module("ir-kbd-i2c");
2828#endif
Mauro Carvalho Chehab505b6d02008-11-25 09:39:50 -03002829 if (dev->board.has_snapshot_button)
Devin Heitmuellera9fc52b2008-06-28 08:57:06 -03002830 em28xx_register_snapshot_button(dev);
2831
Mauro Carvalho Chehab505b6d02008-11-25 09:39:50 -03002832 if (dev->board.valid == EM28XX_BOARD_NOT_VALIDATED) {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002833 em28xx_errdev("\n\n");
2834 em28xx_errdev("The support for this board weren't "
2835 "valid yet.\n");
2836 em28xx_errdev("Please send a report of having this working\n");
2837 em28xx_errdev("not to V4L mailing list (and/or to other "
2838 "addresses)\n\n");
2839 }
2840
Mauro Carvalho Chehabf8b60302007-11-05 08:42:55 -03002841 /* Allow override tuner type by a module parameter */
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002842 if (tuner >= 0)
2843 dev->tuner_type = tuner;
2844
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002845 /* request some modules */
Mauro Carvalho Chehab505b6d02008-11-25 09:39:50 -03002846 if (dev->board.has_msp34xx)
Hans Verkuil53dacb12009-08-10 02:49:08 -03002847 v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03002848 "msp3400", 0, msp3400_addrs);
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03002849
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -03002850 if (dev->board.decoder == EM28XX_SAA711X)
Hans Verkuil53dacb12009-08-10 02:49:08 -03002851 v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03002852 "saa7115_auto", 0, saa711x_addrs);
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03002853
Mauro Carvalho Chehab505b6d02008-11-25 09:39:50 -03002854 if (dev->board.decoder == EM28XX_TVP5150)
Hans Verkuil53dacb12009-08-10 02:49:08 -03002855 v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03002856 "tvp5150", 0, tvp5150_addrs);
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03002857
Mauro Carvalho Chehabd36bb4e2009-07-14 03:18:39 -03002858 if (dev->em28xx_sensor == EM28XX_MT9V011) {
Hans Verkuil3c7c9372011-01-08 07:08:02 -03002859 struct mt9v011_platform_data pdata;
2860 struct i2c_board_info mt9v011_info = {
2861 .type = "mt9v011",
2862 .addr = 0xba >> 1,
2863 .platform_data = &pdata,
2864 };
Mauro Carvalho Chehabd36bb4e2009-07-14 03:18:39 -03002865
Hans Verkuil3c7c9372011-01-08 07:08:02 -03002866 pdata.xtal = dev->sensor_xtal;
Mauro Carvalho Chehab00d2e7a2011-06-17 20:28:51 -03002867 v4l2_i2c_new_subdev_board(&dev->v4l2_dev, &dev->i2c_adap,
Hans Verkuil3c7c9372011-01-08 07:08:02 -03002868 &mt9v011_info, NULL);
Mauro Carvalho Chehabd36bb4e2009-07-14 03:18:39 -03002869 }
Mauro Carvalho Chehab02e78042009-06-29 11:35:05 -03002870
Mauro Carvalho Chehabb80fd2d2009-07-14 21:08:22 -03002871
Mauro Carvalho Chehabdf7fa092009-02-25 09:06:13 -03002872 if (dev->board.adecoder == EM28XX_TVAUDIO)
Hans Verkuile6574f22009-04-01 03:57:53 -03002873 v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03002874 "tvaudio", dev->board.tvaudio_addr, NULL);
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002875
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03002876 if (dev->board.tuner_type != TUNER_ABSENT) {
2877 int has_demod = (dev->tda9887_conf & TDA9887_PRESENT);
Mauro Carvalho Chehaba924a492008-11-12 08:41:29 -03002878
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03002879 if (dev->board.radio.type)
Hans Verkuile6574f22009-04-01 03:57:53 -03002880 v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03002881 "tuner", dev->board.radio_addr, NULL);
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03002882
2883 if (has_demod)
Hans Verkuil53dacb12009-08-10 02:49:08 -03002884 v4l2_i2c_new_subdev(&dev->v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03002885 &dev->i2c_adap, "tuner",
Hans Verkuil53dacb12009-08-10 02:49:08 -03002886 0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03002887 if (dev->tuner_addr == 0) {
2888 enum v4l2_i2c_tuner_type type =
2889 has_demod ? ADDRS_TV_WITH_DEMOD : ADDRS_TV;
2890 struct v4l2_subdev *sd;
2891
Hans Verkuil53dacb12009-08-10 02:49:08 -03002892 sd = v4l2_i2c_new_subdev(&dev->v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03002893 &dev->i2c_adap, "tuner",
Hans Verkuil53dacb12009-08-10 02:49:08 -03002894 0, v4l2_i2c_tuner_addrs(type));
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03002895
2896 if (sd)
2897 dev->tuner_addr = v4l2_i2c_subdev_addr(sd);
2898 } else {
Hans Verkuile6574f22009-04-01 03:57:53 -03002899 v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03002900 "tuner", dev->tuner_addr, NULL);
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03002901 }
2902 }
2903
2904 em28xx_tuner_setup(dev);
Shine Liuf4c5e802009-08-20 23:49:26 -03002905
2906 if(!disable_ir)
2907 em28xx_ir_init(dev);
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08002908}
Mauro Carvalho Chehabc8644052008-11-25 13:10:14 -03002909
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03002910
2911#if defined(CONFIG_MODULES) && defined(MODULE)
2912static void request_module_async(struct work_struct *work)
2913{
2914 struct em28xx *dev = container_of(work,
2915 struct em28xx, request_module_wk);
2916
2917 if (dev->has_audio_class)
2918 request_module("snd-usb-audio");
2919 else if (dev->has_alsa_audio)
2920 request_module("em28xx-alsa");
2921
2922 if (dev->board.has_dvb)
2923 request_module("em28xx-dvb");
2924}
2925
2926static void request_modules(struct em28xx *dev)
2927{
2928 INIT_WORK(&dev->request_module_wk, request_module_async);
2929 schedule_work(&dev->request_module_wk);
2930}
Tejun Heo707bcf32010-12-24 16:14:20 +01002931
2932static void flush_request_modules(struct em28xx *dev)
2933{
2934 flush_work_sync(&dev->request_module_wk);
2935}
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03002936#else
2937#define request_modules(dev)
Tejun Heo707bcf32010-12-24 16:14:20 +01002938#define flush_request_modules(dev)
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03002939#endif /* CONFIG_MODULES */
2940
2941/*
Chris Rankind7222e72011-09-24 11:02:32 -03002942 * em28xx_release_resources()
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03002943 * unregisters the v4l2,i2c and usb devices
Chris Rankind7222e72011-09-24 11:02:32 -03002944 * called when the device gets disconnected or at module unload
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03002945*/
2946void em28xx_release_resources(struct em28xx *dev)
2947{
2948 if (dev->sbutton_input_dev)
2949 em28xx_deregister_snapshot_button(dev);
2950
2951 if (dev->ir)
2952 em28xx_ir_fini(dev);
2953
2954 /*FIXME: I2C IR should be disconnected */
2955
2956 em28xx_release_analog_resources(dev);
2957
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03002958 em28xx_i2c_unregister(dev);
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03002959
2960 v4l2_device_unregister(&dev->v4l2_dev);
2961
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03002962 usb_put_dev(dev->udev);
2963
2964 /* Mark device as unused */
Chris Rankin38b61eb2011-08-20 08:21:03 -03002965 clear_bit(dev->devno, &em28xx_devused);
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03002966};
2967
2968/*
2969 * em28xx_init_dev()
2970 * allocates and inits the device structs, registers i2c bus and v4l device
2971 */
Thomas Petazzoni622c2fc2012-01-07 10:18:45 -03002972static int em28xx_init_dev(struct em28xx *dev, struct usb_device *udev,
Mauro Carvalho Chehab36fa6742009-04-05 08:02:15 -03002973 struct usb_interface *interface,
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03002974 int minor)
2975{
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03002976 int retval;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03002977
2978 dev->udev = udev;
2979 mutex_init(&dev->ctrl_urb_lock);
2980 spin_lock_init(&dev->slock);
2981 init_waitqueue_head(&dev->open);
2982 init_waitqueue_head(&dev->wait_frame);
2983 init_waitqueue_head(&dev->wait_stream);
2984
2985 dev->em28xx_write_regs = em28xx_write_regs;
2986 dev->em28xx_read_reg = em28xx_read_reg;
2987 dev->em28xx_read_reg_req_len = em28xx_read_reg_req_len;
2988 dev->em28xx_write_regs_req = em28xx_write_regs_req;
2989 dev->em28xx_read_reg_req = em28xx_read_reg_req;
2990 dev->board.is_em2800 = em28xx_boards[dev->model].is_em2800;
2991
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03002992 em28xx_set_model(dev);
2993
2994 /* Set the default GPO/GPIO for legacy devices */
2995 dev->reg_gpo_num = EM2880_R04_GPO;
2996 dev->reg_gpio_num = EM28XX_R08_GPIO;
2997
2998 dev->wait_after_write = 5;
2999
3000 /* Based on the Chip ID, set the device configuration */
3001 retval = em28xx_read_reg(dev, EM28XX_R0A_CHIPID);
3002 if (retval > 0) {
3003 dev->chip_id = retval;
3004
3005 switch (dev->chip_id) {
Mauro Carvalho Chehabf57b17c32009-11-12 11:21:05 -03003006 case CHIP_ID_EM2800:
3007 em28xx_info("chip ID is em2800\n");
3008 break;
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003009 case CHIP_ID_EM2710:
3010 em28xx_info("chip ID is em2710\n");
3011 break;
3012 case CHIP_ID_EM2750:
3013 em28xx_info("chip ID is em2750\n");
3014 break;
3015 case CHIP_ID_EM2820:
3016 em28xx_info("chip ID is em2820 (or em2710)\n");
3017 break;
3018 case CHIP_ID_EM2840:
3019 em28xx_info("chip ID is em2840\n");
3020 break;
3021 case CHIP_ID_EM2860:
3022 em28xx_info("chip ID is em2860\n");
3023 break;
3024 case CHIP_ID_EM2870:
3025 em28xx_info("chip ID is em2870\n");
3026 dev->wait_after_write = 0;
3027 break;
3028 case CHIP_ID_EM2874:
3029 em28xx_info("chip ID is em2874\n");
3030 dev->reg_gpio_num = EM2874_R80_GPIO;
3031 dev->wait_after_write = 0;
3032 break;
Antti Palosaaribc022692011-04-07 16:04:48 -03003033 case CHIP_ID_EM28174:
3034 em28xx_info("chip ID is em28174\n");
3035 dev->reg_gpio_num = EM2874_R80_GPIO;
3036 dev->wait_after_write = 0;
3037 break;
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003038 case CHIP_ID_EM2883:
3039 em28xx_info("chip ID is em2882/em2883\n");
3040 dev->wait_after_write = 0;
3041 break;
Mauro Carvalho Chehabfec528b2011-07-03 21:05:06 -03003042 case CHIP_ID_EM2884:
3043 em28xx_info("chip ID is em2884\n");
3044 dev->reg_gpio_num = EM2874_R80_GPIO;
3045 dev->wait_after_write = 0;
3046 break;
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003047 default:
3048 em28xx_info("em28xx chip ID = %d\n", dev->chip_id);
3049 }
3050 }
3051
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003052 if (dev->is_audio_only) {
Chris Rankin6c03e382011-08-20 08:28:17 -03003053 retval = em28xx_audio_setup(dev);
3054 if (retval)
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003055 return -ENODEV;
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003056 em28xx_init_extension(dev);
3057
3058 return 0;
3059 }
3060
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003061 /* Prepopulate cached GPO register content */
3062 retval = em28xx_read_reg(dev, dev->reg_gpo_num);
3063 if (retval >= 0)
3064 dev->reg_gpo = retval;
3065
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003066 em28xx_pre_card_setup(dev);
3067
3068 if (!dev->board.is_em2800) {
Mauro Carvalho Chehabca3dfd62010-09-10 17:29:14 -03003069 /* Resets I2C speed */
Sascha Sommer0903bb52012-01-08 16:19:30 -03003070 retval = em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, dev->board.i2c_speed);
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003071 if (retval < 0) {
Chris Rankin6c03e382011-08-20 08:28:17 -03003072 em28xx_errdev("%s: em28xx_write_reg failed!"
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003073 " retval [%d]\n",
3074 __func__, retval);
3075 return retval;
3076 }
3077 }
3078
Mauro Carvalho Chehab36fa6742009-04-05 08:02:15 -03003079 retval = v4l2_device_register(&interface->dev, &dev->v4l2_dev);
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03003080 if (retval < 0) {
3081 em28xx_errdev("Call to v4l2_device_register() failed!\n");
3082 return retval;
3083 }
3084
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003085 /* register i2c bus */
Chris Rankin6c03e382011-08-20 08:28:17 -03003086 retval = em28xx_i2c_register(dev);
3087 if (retval < 0) {
3088 em28xx_errdev("%s: em28xx_i2c_register - error [%d]!\n",
3089 __func__, retval);
3090 goto unregister_dev;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003091 }
3092
Mauro Carvalho Chehabb04fb662009-07-13 01:28:21 -03003093 /*
Mauro Carvalho Chehab579d3152009-07-14 12:33:25 -03003094 * Default format, used for tvp5150 or saa711x output formats
3095 */
3096 dev->vinmode = 0x10;
Devin Heitmueller206313d2009-08-31 23:23:03 -03003097 dev->vinctl = EM28XX_VINCTRL_INTERLACED |
3098 EM28XX_VINCTRL_CCIR656_ENABLE;
Mauro Carvalho Chehab579d3152009-07-14 12:33:25 -03003099
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003100 /* Do board specific init and eeprom reading */
3101 em28xx_card_setup(dev);
3102
3103 /* Configure audio */
Chris Rankin6c03e382011-08-20 08:28:17 -03003104 retval = em28xx_audio_setup(dev);
3105 if (retval < 0) {
3106 em28xx_errdev("%s: Error while setting audio - error [%d]!\n",
3107 __func__, retval);
3108 goto fail;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003109 }
3110
3111 /* wake i2c devices */
3112 em28xx_wake_i2c(dev);
3113
3114 /* init video dma queues */
3115 INIT_LIST_HEAD(&dev->vidq.active);
3116 INIT_LIST_HEAD(&dev->vidq.queued);
Devin Heitmueller28abf0832009-09-01 01:54:54 -03003117 INIT_LIST_HEAD(&dev->vbiq.active);
3118 INIT_LIST_HEAD(&dev->vbiq.queued);
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003119
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003120 if (dev->board.has_msp34xx) {
3121 /* Send a reset to other chips via gpio */
Chris Rankin6c03e382011-08-20 08:28:17 -03003122 retval = em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xf7);
3123 if (retval < 0) {
3124 em28xx_errdev("%s: em28xx_write_reg - "
3125 "msp34xx(1) failed! error [%d]\n",
3126 __func__, retval);
3127 goto fail;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003128 }
3129 msleep(3);
3130
Chris Rankin6c03e382011-08-20 08:28:17 -03003131 retval = em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xff);
3132 if (retval < 0) {
3133 em28xx_errdev("%s: em28xx_write_reg - "
3134 "msp34xx(2) failed! error [%d]\n",
3135 __func__, retval);
3136 goto fail;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003137 }
3138 msleep(3);
3139 }
3140
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003141 retval = em28xx_register_analog_devices(dev);
3142 if (retval < 0) {
Chris Rankin6c03e382011-08-20 08:28:17 -03003143 goto fail;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003144 }
3145
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003146 /* Save some power by putting tuner to sleep */
Laurent Pinchart622b8282009-10-05 10:48:17 -03003147 v4l2_device_call_all(&dev->v4l2_dev, 0, core, s_power, 0);
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003148
3149 return 0;
3150
Chris Rankin6c03e382011-08-20 08:28:17 -03003151fail:
3152 em28xx_i2c_unregister(dev);
3153
3154unregister_dev:
3155 v4l2_device_unregister(&dev->v4l2_dev);
3156
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003157 return retval;
3158}
3159
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003160/* high bandwidth multiplier, as encoded in highspeed endpoint descriptors */
3161#define hb_mult(wMaxPacketSize) (1 + (((wMaxPacketSize) >> 11) & 0x03))
3162
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003163/*
3164 * em28xx_usb_probe()
3165 * checks for supported devices
3166 */
3167static int em28xx_usb_probe(struct usb_interface *interface,
3168 const struct usb_device_id *id)
3169{
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003170 struct usb_device *udev;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003171 struct em28xx *dev = NULL;
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03003172 int retval;
Holger Nelson8ab33622011-12-28 18:55:41 -03003173 bool has_audio = false, has_video = false, has_dvb = false;
3174 int i, nr;
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003175 const int ifnum = interface->altsetting[0].desc.bInterfaceNumber;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003176 char *speed;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003177
3178 udev = usb_get_dev(interface_to_usbdev(interface));
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003179
3180 /* Check to see next free device and mark as used */
Chris Rankin38b61eb2011-08-20 08:21:03 -03003181 do {
3182 nr = find_first_zero_bit(&em28xx_devused, EM28XX_MAXBOARDS);
3183 if (nr >= EM28XX_MAXBOARDS) {
3184 /* No free device slots */
3185 printk(DRIVER_NAME ": Supports only %i em28xx boards.\n",
3186 EM28XX_MAXBOARDS);
3187 retval = -ENOMEM;
3188 goto err_no_slot;
3189 }
3190 } while (test_and_set_bit(nr, &em28xx_devused));
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003191
3192 /* Don't register audio interfaces */
3193 if (interface->altsetting[0].desc.bInterfaceClass == USB_CLASS_AUDIO) {
3194 em28xx_err(DRIVER_NAME " audio device (%04x:%04x): "
3195 "interface %i, class %i\n",
3196 le16_to_cpu(udev->descriptor.idVendor),
3197 le16_to_cpu(udev->descriptor.idProduct),
3198 ifnum,
3199 interface->altsetting[0].desc.bInterfaceClass);
3200
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03003201 retval = -ENODEV;
3202 goto err;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003203 }
3204
Holger Nelson8ab33622011-12-28 18:55:41 -03003205 /* allocate memory for our device state and initialize it */
3206 dev = kzalloc(sizeof(*dev), GFP_KERNEL);
3207 if (dev == NULL) {
3208 em28xx_err(DRIVER_NAME ": out of memory!\n");
3209 retval = -ENOMEM;
3210 goto err;
3211 }
3212
3213 /* compute alternate max packet sizes */
3214 dev->alt_max_pkt_size = kmalloc(sizeof(dev->alt_max_pkt_size[0]) *
3215 interface->num_altsetting, GFP_KERNEL);
3216 if (dev->alt_max_pkt_size == NULL) {
3217 em28xx_errdev("out of memory!\n");
3218 kfree(dev);
3219 retval = -ENOMEM;
3220 goto err;
3221 }
3222
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003223 /* Get endpoints */
3224 for (i = 0; i < interface->num_altsetting; i++) {
3225 int ep;
3226
3227 for (ep = 0; ep < interface->altsetting[i].desc.bNumEndpoints; ep++) {
Holger Nelson8ab33622011-12-28 18:55:41 -03003228 const struct usb_endpoint_descriptor *e;
3229 int sizedescr, size;
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003230
Holger Nelson8ab33622011-12-28 18:55:41 -03003231 e = &interface->altsetting[i].endpoint[ep].desc;
3232
3233 sizedescr = le16_to_cpu(e->wMaxPacketSize);
3234 size = sizedescr & 0x7ff;
3235
3236 if (udev->speed == USB_SPEED_HIGH)
3237 size = size * hb_mult(sizedescr);
3238
3239 if (usb_endpoint_xfer_isoc(e) &&
3240 usb_endpoint_dir_in(e)) {
3241 switch (e->bEndpointAddress) {
3242 case EM28XX_EP_AUDIO:
3243 has_audio = true;
3244 break;
3245 case EM28XX_EP_ANALOG:
3246 has_video = true;
3247 dev->alt_max_pkt_size[i] = size;
3248 break;
3249 case EM28XX_EP_DIGITAL:
3250 has_dvb = true;
3251 if (size > dev->dvb_max_pkt_size) {
3252 dev->dvb_max_pkt_size = size;
3253 dev->dvb_alt = i;
3254 }
3255 break;
3256 }
3257 }
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003258 }
3259 }
3260
Holger Nelson8ab33622011-12-28 18:55:41 -03003261 if (!(has_audio || has_video || has_dvb)) {
3262 retval = -ENODEV;
3263 goto err_free;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003264 }
3265
3266 switch (udev->speed) {
3267 case USB_SPEED_LOW:
3268 speed = "1.5";
3269 break;
3270 case USB_SPEED_UNKNOWN:
3271 case USB_SPEED_FULL:
3272 speed = "12";
3273 break;
3274 case USB_SPEED_HIGH:
3275 speed = "480";
3276 break;
3277 default:
3278 speed = "unknown";
3279 }
3280
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003281 printk(KERN_INFO DRIVER_NAME
Ezequiel García401a5822012-03-13 10:27:09 -03003282 ": New device %s %s @ %s Mbps "
3283 "(%04x:%04x, interface %d, class %d)\n",
3284 udev->manufacturer ? udev->manufacturer : "",
3285 udev->product ? udev->product : "",
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003286 speed,
3287 le16_to_cpu(udev->descriptor.idVendor),
3288 le16_to_cpu(udev->descriptor.idProduct),
3289 ifnum,
3290 interface->altsetting->desc.bInterfaceNumber);
3291
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003292 if (has_audio)
3293 printk(KERN_INFO DRIVER_NAME
3294 ": Audio Vendor Class interface %i found\n",
3295 ifnum);
Holger Nelson8ab33622011-12-28 18:55:41 -03003296 if (has_video)
3297 printk(KERN_INFO DRIVER_NAME
3298 ": Video interface %i found\n",
3299 ifnum);
3300 if (has_dvb)
3301 printk(KERN_INFO DRIVER_NAME
3302 ": DVB interface %i found\n",
3303 ifnum);
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003304
Devin Heitmueller64a00b42009-05-27 23:23:37 -03003305 /*
3306 * Make sure we have 480 Mbps of bandwidth, otherwise things like
3307 * video stream wouldn't likely work, since 12 Mbps is generally
3308 * not enough even for most Digital TV streams.
3309 */
Devin Heitmuellere2a1b792009-05-27 23:44:10 -03003310 if (udev->speed != USB_SPEED_HIGH && disable_usb_speed_check == 0) {
Devin Heitmueller64a00b42009-05-27 23:23:37 -03003311 printk(DRIVER_NAME ": Device initialization failed.\n");
3312 printk(DRIVER_NAME ": Device must be connected to a high-speed"
3313 " USB 2.0 port.\n");
Devin Heitmueller64a00b42009-05-27 23:23:37 -03003314 retval = -ENODEV;
Holger Nelson8ab33622011-12-28 18:55:41 -03003315 goto err_free;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003316 }
3317
Chris Rankinf38f3332011-08-20 08:08:34 -03003318 snprintf(dev->name, sizeof(dev->name), "em28xx #%d", nr);
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003319 dev->devno = nr;
3320 dev->model = id->driver_info;
3321 dev->alt = -1;
Holger Nelson8ab33622011-12-28 18:55:41 -03003322 dev->is_audio_only = has_audio && !(has_video || has_dvb);
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003323 dev->has_alsa_audio = has_audio;
3324 dev->audio_ifnum = ifnum;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003325
3326 /* Checks if audio is provided by some interface */
3327 for (i = 0; i < udev->config->desc.bNumInterfaces; i++) {
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003328 struct usb_interface *uif = udev->config->interface[i];
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003329 if (uif->altsetting[0].desc.bInterfaceClass == USB_CLASS_AUDIO) {
3330 dev->has_audio_class = 1;
3331 break;
3332 }
3333 }
3334
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003335 dev->num_alt = interface->num_altsetting;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003336
3337 if ((card[nr] >= 0) && (card[nr] < em28xx_bcount))
3338 dev->model = card[nr];
3339
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003340 /* save our data pointer in this interface device */
3341 usb_set_intfdata(interface, dev);
3342
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003343 /* allocate device struct */
3344 mutex_init(&dev->lock);
3345 mutex_lock(&dev->lock);
Thomas Petazzoni622c2fc2012-01-07 10:18:45 -03003346 retval = em28xx_init_dev(dev, udev, interface, nr);
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003347 if (retval) {
Holger Nelson8ab33622011-12-28 18:55:41 -03003348 goto unlock_and_free;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003349 }
3350
Gianluca Gennari86d38d12012-02-13 13:59:22 -03003351 if (has_dvb) {
3352 /* pre-allocate DVB isoc transfer buffers */
3353 retval = em28xx_alloc_isoc(dev, EM28XX_DIGITAL_MODE,
3354 EM28XX_DVB_MAX_PACKETS,
3355 EM28XX_DVB_NUM_BUFS,
3356 dev->dvb_max_pkt_size);
3357 if (retval) {
3358 goto unlock_and_free;
3359 }
3360 }
3361
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003362 request_modules(dev);
3363
3364 /* Should be the last thing to do, to avoid newer udev's to
3365 open the device before fully initializing it
3366 */
3367 mutex_unlock(&dev->lock);
3368
Chris Rankin778f2952011-09-25 18:43:12 -03003369 /*
3370 * These extensions can be modules. If the modules are already
3371 * loaded then we can initialise the device now, otherwise we
3372 * will initialise it when the modules load instead.
3373 */
3374 em28xx_init_extension(dev);
3375
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003376 return 0;
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03003377
Holger Nelson8ab33622011-12-28 18:55:41 -03003378unlock_and_free:
3379 mutex_unlock(&dev->lock);
3380
3381err_free:
3382 kfree(dev->alt_max_pkt_size);
3383 kfree(dev);
3384
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03003385err:
Chris Rankin38b61eb2011-08-20 08:21:03 -03003386 clear_bit(nr, &em28xx_devused);
3387
3388err_no_slot:
3389 usb_put_dev(udev);
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03003390 return retval;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003391}
3392
3393/*
3394 * em28xx_usb_disconnect()
Chris Rankind7222e72011-09-24 11:02:32 -03003395 * called when the device gets disconnected
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003396 * video device will be unregistered on v4l2_close in case it is still open
3397 */
3398static void em28xx_usb_disconnect(struct usb_interface *interface)
3399{
3400 struct em28xx *dev;
3401
3402 dev = usb_get_intfdata(interface);
3403 usb_set_intfdata(interface, NULL);
3404
3405 if (!dev)
3406 return;
3407
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003408 if (dev->is_audio_only) {
3409 mutex_lock(&dev->lock);
3410 em28xx_close_extension(dev);
3411 mutex_unlock(&dev->lock);
3412 return;
3413 }
3414
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003415 em28xx_info("disconnecting %s\n", dev->vdev->name);
3416
Tejun Heo707bcf32010-12-24 16:14:20 +01003417 flush_request_modules(dev);
3418
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003419 /* wait until all current v4l2 io is finished then deallocate
3420 resources */
3421 mutex_lock(&dev->lock);
3422
3423 wake_up_interruptible_all(&dev->open);
3424
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03003425 v4l2_device_disconnect(&dev->v4l2_dev);
3426
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003427 if (dev->users) {
3428 em28xx_warn
Laurent Pinchart38c7c032009-11-27 13:57:15 -03003429 ("device %s is open! Deregistration and memory "
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003430 "deallocation are deferred on close.\n",
Laurent Pinchart38c7c032009-11-27 13:57:15 -03003431 video_device_node_name(dev->vdev));
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003432
3433 dev->state |= DEV_MISCONFIGURED;
Gianluca Gennari86d38d12012-02-13 13:59:22 -03003434 em28xx_uninit_isoc(dev, dev->mode);
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003435 dev->state |= DEV_DISCONNECTED;
3436 wake_up_interruptible(&dev->wait_frame);
3437 wake_up_interruptible(&dev->wait_stream);
3438 } else {
3439 dev->state |= DEV_DISCONNECTED;
3440 em28xx_release_resources(dev);
3441 }
3442
Gianluca Gennari86d38d12012-02-13 13:59:22 -03003443 /* free DVB isoc buffers */
3444 em28xx_uninit_isoc(dev, EM28XX_DIGITAL_MODE);
3445
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003446 mutex_unlock(&dev->lock);
3447
Chris Rankinb868a532011-09-24 16:54:58 -03003448 em28xx_close_extension(dev);
3449
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003450 if (!dev->users) {
3451 kfree(dev->alt_max_pkt_size);
3452 kfree(dev);
3453 }
3454}
3455
3456static struct usb_driver em28xx_usb_driver = {
3457 .name = "em28xx",
3458 .probe = em28xx_usb_probe,
3459 .disconnect = em28xx_usb_disconnect,
3460 .id_table = em28xx_id_table,
3461};
3462
Greg Kroah-Hartmanecb3b2b2011-11-18 09:46:12 -08003463module_usb_driver(em28xx_usb_driver);