blob: bed41c1b4817b1e9d266f63021099b8298581323 [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>
Frank Schaeferc647a912012-11-08 14:11:52 -03009 Copyright (C) 2012 Frank Schäfer <fschaefer.oss@googlemail.com>
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -080010
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2 of the License, or
14 (at your option) any later version.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 */
25
26#include <linux/init.h>
27#include <linux/module.h>
Tejun Heo5a0e3ad2010-03-24 17:04:11 +090028#include <linux/slab.h>
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -080029#include <linux/delay.h>
30#include <linux/i2c.h>
31#include <linux/usb.h>
32#include <media/tuner.h>
Mauro Carvalho Chehabd647f0b2015-11-13 19:40:07 -020033#include <media/drv-intf/msp3400.h>
Mauro Carvalho Chehabb5dcee22015-11-10 12:01:44 -020034#include <media/i2c/saa7115.h>
Javier Martinez Canillasb802fb92016-02-05 17:09:56 -020035#include <dt-bindings/media/tvp5150.h>
Mauro Carvalho Chehabb5dcee22015-11-10 12:01:44 -020036#include <media/i2c/tvaudio.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>
Matthieu Rogez0899f622016-03-04 18:33:08 -030040#include <sound/ac97_codec.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
Devin Heitmuellerd3829fa2013-01-04 16:16:24 -030059static unsigned int card[] = {[0 ... (EM28XX_MAXBOARDS - 1)] = -1U };
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -030060module_param_array(card, int, NULL, 0444);
61MODULE_PARM_DESC(card, "card type");
62
Frank Schaefer7e5d74e2012-12-26 15:12:37 -030063static int usb_xfer_mode = -1;
64module_param(usb_xfer_mode, int, 0444);
65MODULE_PARM_DESC(usb_xfer_mode,
66 "USB transfer mode for frame data (-1 = auto, 0 = prefer isoc, 1 = prefer bulk)");
Frank Schaefer454fe922012-11-08 14:11:53 -030067
Chris Rankin38b61eb2011-08-20 08:21:03 -030068/* Bitmask marking allocated devices from 0 to EM28XX_MAXBOARDS - 1 */
Fengguang Wu9e8ca382014-01-15 18:50:26 -030069static DECLARE_BITMAP(em28xx_devused, EM28XX_MAXBOARDS);
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -030070
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -030071struct em28xx_hash_table {
72 unsigned long hash;
73 unsigned int model;
74 unsigned int tuner;
75};
76
Ezequiel Garcia60332f02012-04-28 09:57:01 -030077static void em28xx_pre_card_setup(struct em28xx *dev);
78
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -030079/*
80 * Reset sequences for analog/digital modes
81 */
82
83/* Reset for the most [analog] boards */
84static struct em28xx_reg_seq default_analog[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -030085 {EM2820_R08_GPIO_CTRL, 0x6d, ~EM_GPIO_4, 10},
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -030086 { -1, -1, -1, -1},
87};
88
89/* Reset for the most [digital] boards */
90static struct em28xx_reg_seq default_digital[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -030091 {EM2820_R08_GPIO_CTRL, 0x6e, ~EM_GPIO_4, 10},
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -030092 { -1, -1, -1, -1},
93};
94
95/* Board Hauppauge WinTV HVR 900 analog */
96static struct em28xx_reg_seq hauppauge_wintv_hvr_900_analog[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -030097 {EM2820_R08_GPIO_CTRL, 0x2d, ~EM_GPIO_4, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -030098 { 0x05, 0xff, 0x10, 10},
99 { -1, -1, -1, -1},
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -0300100};
101
102/* Board Hauppauge WinTV HVR 900 digital */
103static struct em28xx_reg_seq hauppauge_wintv_hvr_900_digital[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300104 {EM2820_R08_GPIO_CTRL, 0x2e, ~EM_GPIO_4, 10},
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -0300105 {EM2880_R04_GPO, 0x04, 0x0f, 10},
106 {EM2880_R04_GPO, 0x0c, 0x0f, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300107 { -1, -1, -1, -1},
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -0300108};
109
Devin Heitmueller7030f522011-03-13 02:04:53 -0300110/* Board Hauppauge WinTV HVR 900 (R2) digital */
111static struct em28xx_reg_seq hauppauge_wintv_hvr_900R2_digital[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300112 {EM2820_R08_GPIO_CTRL, 0x2e, ~EM_GPIO_4, 10},
Devin Heitmueller7030f522011-03-13 02:04:53 -0300113 {EM2880_R04_GPO, 0x0c, 0x0f, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300114 { -1, -1, -1, -1},
Devin Heitmueller7030f522011-03-13 02:04:53 -0300115};
116
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -0300117/* Boards - EM2880 MSI DIGIVOX AD and EM2880_BOARD_MSI_DIGIVOX_AD_II */
118static struct em28xx_reg_seq em2880_msi_digivox_ad_analog[] = {
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300119 {EM2820_R08_GPIO_CTRL, 0x69, ~EM_GPIO_4, 10},
120 { -1, -1, -1, -1},
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -0300121};
122
123/* Boards - EM2880 MSI DIGIVOX AD and EM2880_BOARD_MSI_DIGIVOX_AD_II */
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -0300124
125/* Board - EM2870 Kworld 355u
126 Analog - No input analog */
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -0300127
Franklin Mengd7de5d82009-06-06 17:05:02 -0300128/* Board - EM2882 Kworld 315U digital */
129static struct em28xx_reg_seq em2882_kworld_315u_digital[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300130 {EM2820_R08_GPIO_CTRL, 0xff, 0xff, 10},
131 {EM2820_R08_GPIO_CTRL, 0xfe, 0xff, 10},
Franklin Mengd7de5d82009-06-06 17:05:02 -0300132 {EM2880_R04_GPO, 0x04, 0xff, 10},
133 {EM2880_R04_GPO, 0x0c, 0xff, 10},
Frank Schaeferc074fc42013-06-03 14:12:03 -0300134 {EM2820_R08_GPIO_CTRL, 0x7e, 0xff, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300135 { -1, -1, -1, -1},
Franklin Mengd7de5d82009-06-06 17:05:02 -0300136};
137
138static struct em28xx_reg_seq em2882_kworld_315u_tuner_gpio[] = {
139 {EM2880_R04_GPO, 0x08, 0xff, 10},
140 {EM2880_R04_GPO, 0x0c, 0xff, 10},
141 {EM2880_R04_GPO, 0x08, 0xff, 10},
142 {EM2880_R04_GPO, 0x0c, 0xff, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300143 { -1, -1, -1, -1},
Franklin Mengd7de5d82009-06-06 17:05:02 -0300144};
145
Robert Krakora6e7b9ea2009-01-18 21:59:34 -0300146static struct em28xx_reg_seq kworld_330u_analog[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300147 {EM2820_R08_GPIO_CTRL, 0x6d, ~EM_GPIO_4, 10},
Robert Krakora6e7b9ea2009-01-18 21:59:34 -0300148 {EM2880_R04_GPO, 0x00, 0xff, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300149 { -1, -1, -1, -1},
Robert Krakora6e7b9ea2009-01-18 21:59:34 -0300150};
151
152static struct em28xx_reg_seq kworld_330u_digital[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300153 {EM2820_R08_GPIO_CTRL, 0x6e, ~EM_GPIO_4, 10},
Robert Krakora6e7b9ea2009-01-18 21:59:34 -0300154 {EM2880_R04_GPO, 0x08, 0xff, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300155 { -1, -1, -1, -1},
Robert Krakora6e7b9ea2009-01-18 21:59:34 -0300156};
157
Devin Heitmueller19859222009-06-19 00:33:54 -0300158/* Evga inDtube
159 GPIO0 - Enable digital power (s5h1409) - low to enable
160 GPIO1 - Enable analog power (tvp5150/emp202) - low to enable
161 GPIO4 - xc3028 reset
162 GOP3 - s5h1409 reset
163 */
164static struct em28xx_reg_seq evga_indtube_analog[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300165 {EM2820_R08_GPIO_CTRL, 0x79, 0xff, 60},
Devin Heitmueller19859222009-06-19 00:33:54 -0300166 { -1, -1, -1, -1},
167};
168
169static struct em28xx_reg_seq evga_indtube_digital[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300170 {EM2820_R08_GPIO_CTRL, 0x7a, 0xff, 1},
Devin Heitmueller19859222009-06-19 00:33:54 -0300171 {EM2880_R04_GPO, 0x04, 0xff, 10},
172 {EM2880_R04_GPO, 0x0c, 0xff, 1},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300173 { -1, -1, -1, -1},
Devin Heitmueller19859222009-06-19 00:33:54 -0300174};
175
Jarod Wilson7e48b302010-03-07 17:55:43 -0300176/*
Jean-Francois Thibert6dbea9f2013-10-09 11:18:05 -0300177 * KWorld PlusTV 340U, UB435-Q and UB435-Q V2 (ATSC) GPIOs map:
Jarod Wilson7e48b302010-03-07 17:55:43 -0300178 * EM_GPIO_0 - currently unknown
179 * EM_GPIO_1 - LED disable/enable (1 = off, 0 = on)
180 * EM_GPIO_2 - currently unknown
181 * EM_GPIO_3 - currently unknown
182 * EM_GPIO_4 - TDA18271HD/C1 tuner (1 = active, 0 = in reset)
183 * EM_GPIO_5 - LGDT3304 ATSC/QAM demod (1 = active, 0 = in reset)
184 * EM_GPIO_6 - currently unknown
185 * EM_GPIO_7 - currently unknown
186 */
187static struct em28xx_reg_seq kworld_a340_digital[] = {
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300188 {EM2820_R08_GPIO_CTRL, 0x6d, ~EM_GPIO_4, 10},
189 { -1, -1, -1, -1},
Jarod Wilson7e48b302010-03-07 17:55:43 -0300190};
191
Mauro Carvalho Chehab02bc1f52014-03-03 16:28:39 -0300192static struct em28xx_reg_seq kworld_ub435q_v3_digital[] = {
Mauro Carvalho Chehabfdf1bc92014-11-28 08:34:15 -0300193 {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 100},
194 {EM2874_R80_GPIO_P0_CTRL, 0xfe, 0xff, 100},
Mauro Carvalho Chehab02bc1f52014-03-03 16:28:39 -0300195 {EM2874_R80_GPIO_P0_CTRL, 0xbe, 0xff, 100},
196 {EM2874_R80_GPIO_P0_CTRL, 0xfe, 0xff, 100},
197 { -1, -1, -1, -1},
198};
199
Devin Heitmuellerd5b3ba92009-07-08 21:51:35 -0300200/* Pinnacle Hybrid Pro eb1a:2881 */
201static struct em28xx_reg_seq pinnacle_hybrid_pro_analog[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300202 {EM2820_R08_GPIO_CTRL, 0xfd, ~EM_GPIO_4, 10},
Devin Heitmuellerd5b3ba92009-07-08 21:51:35 -0300203 { -1, -1, -1, -1},
204};
205
206static struct em28xx_reg_seq pinnacle_hybrid_pro_digital[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300207 {EM2820_R08_GPIO_CTRL, 0x6e, ~EM_GPIO_4, 10},
Devin Heitmuellerd5b3ba92009-07-08 21:51:35 -0300208 {EM2880_R04_GPO, 0x04, 0xff, 100},/* zl10353 reset */
209 {EM2880_R04_GPO, 0x0c, 0xff, 1},
210 { -1, -1, -1, -1},
211};
212
Michel Garniercec4e6c2010-10-16 14:42:01 -0300213static struct em28xx_reg_seq terratec_cinergy_USB_XS_FR_analog[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300214 {EM2820_R08_GPIO_CTRL, 0x6d, ~EM_GPIO_4, 10},
Michel Garniercec4e6c2010-10-16 14:42:01 -0300215 {EM2880_R04_GPO, 0x00, 0xff, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300216 { -1, -1, -1, -1},
Michel Garniercec4e6c2010-10-16 14:42:01 -0300217};
218
219static struct em28xx_reg_seq terratec_cinergy_USB_XS_FR_digital[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300220 {EM2820_R08_GPIO_CTRL, 0x6e, ~EM_GPIO_4, 10},
Michel Garniercec4e6c2010-10-16 14:42:01 -0300221 {EM2880_R04_GPO, 0x08, 0xff, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300222 { -1, -1, -1, -1},
Michel Garniercec4e6c2010-10-16 14:42:01 -0300223};
224
Devin Heitmueller38b2df92012-08-13 21:18:02 -0300225/* PCTV HD Mini (80e) GPIOs
226 0-5: not used
227 6: demod reset, active low
228 7: LED on, active high */
229static struct em28xx_reg_seq em2874_pctv_80e_digital[] = {
230 {EM28XX_R06_I2C_CLK, 0x45, 0xff, 10}, /*400 KHz*/
Mauro Carvalho Chehab88e4fcd2014-03-04 20:49:07 -0300231 {EM2874_R80_GPIO_P0_CTRL, 0x00, 0xff, 100},/*Demod reset*/
232 {EM2874_R80_GPIO_P0_CTRL, 0x40, 0xff, 10},
Devin Heitmueller38b2df92012-08-13 21:18:02 -0300233 { -1, -1, -1, -1},
234};
235
Antti Palosaari285eb1a2009-09-15 14:42:13 -0300236/* eb1a:2868 Reddo DVB-C USB TV Box
237 GPIO4 - CU1216L NIM
238 Other GPIOs seems to be don't care. */
239static struct em28xx_reg_seq reddo_dvb_c_usb_box[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300240 {EM2820_R08_GPIO_CTRL, 0xfe, 0xff, 10},
241 {EM2820_R08_GPIO_CTRL, 0xde, 0xff, 10},
242 {EM2820_R08_GPIO_CTRL, 0xfe, 0xff, 10},
243 {EM2820_R08_GPIO_CTRL, 0xff, 0xff, 10},
244 {EM2820_R08_GPIO_CTRL, 0x7f, 0xff, 10},
245 {EM2820_R08_GPIO_CTRL, 0x6f, 0xff, 10},
246 {EM2820_R08_GPIO_CTRL, 0xff, 0xff, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300247 { -1, -1, -1, -1},
Antti Palosaari285eb1a2009-09-15 14:42:13 -0300248};
Devin Heitmuellerd5b3ba92009-07-08 21:51:35 -0300249
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -0300250/* Callback for the most boards */
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -0300251static struct em28xx_reg_seq default_tuner_gpio[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300252 {EM2820_R08_GPIO_CTRL, EM_GPIO_4, EM_GPIO_4, 10},
253 {EM2820_R08_GPIO_CTRL, 0, EM_GPIO_4, 10},
254 {EM2820_R08_GPIO_CTRL, EM_GPIO_4, EM_GPIO_4, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300255 { -1, -1, -1, -1},
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -0300256};
257
Vitaly Wool2bd1d9e2009-03-04 08:27:52 -0300258/* Mute/unmute */
259static struct em28xx_reg_seq compro_unmute_tv_gpio[] = {
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300260 {EM2820_R08_GPIO_CTRL, 5, 7, 10},
261 { -1, -1, -1, -1},
Vitaly Wool2bd1d9e2009-03-04 08:27:52 -0300262};
263
264static struct em28xx_reg_seq compro_unmute_svid_gpio[] = {
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300265 {EM2820_R08_GPIO_CTRL, 4, 7, 10},
266 { -1, -1, -1, -1},
Vitaly Wool2bd1d9e2009-03-04 08:27:52 -0300267};
268
269static struct em28xx_reg_seq compro_mute_gpio[] = {
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300270 {EM2820_R08_GPIO_CTRL, 6, 7, 10},
271 { -1, -1, -1, -1},
Vitaly Wool2bd1d9e2009-03-04 08:27:52 -0300272};
273
Mauro Carvalho Chehab766ed642009-05-24 00:46:01 -0300274/* Terratec AV350 */
275static struct em28xx_reg_seq terratec_av350_mute_gpio[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300276 {EM2820_R08_GPIO_CTRL, 0xff, 0x7f, 10},
Mauro Carvalho Chehab766ed642009-05-24 00:46:01 -0300277 { -1, -1, -1, -1},
278};
279
280static struct em28xx_reg_seq terratec_av350_unmute_gpio[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300281 {EM2820_R08_GPIO_CTRL, 0xff, 0xff, 10},
Mauro Carvalho Chehab766ed642009-05-24 00:46:01 -0300282 { -1, -1, -1, -1},
283};
Mauro Carvalho Chehab02e78042009-06-29 11:35:05 -0300284
285static struct em28xx_reg_seq silvercrest_reg_seq[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300286 {EM2820_R08_GPIO_CTRL, 0xff, 0xff, 10},
287 {EM2820_R08_GPIO_CTRL, 0x01, 0xf7, 10},
Mauro Carvalho Chehab02e78042009-06-29 11:35:05 -0300288 { -1, -1, -1, -1},
289};
290
Mauro Carvalho Chehab694a1012009-11-26 21:26:13 -0300291static struct em28xx_reg_seq vc211a_enable[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300292 {EM2820_R08_GPIO_CTRL, 0xff, 0x07, 10},
293 {EM2820_R08_GPIO_CTRL, 0xff, 0x0f, 10},
294 {EM2820_R08_GPIO_CTRL, 0xff, 0x0b, 10},
Mauro Carvalho Chehab694a1012009-11-26 21:26:13 -0300295 { -1, -1, -1, -1},
296};
297
Andrea.Amorosi76@gmail.com7ca7ef62010-02-09 17:53:38 -0300298static struct em28xx_reg_seq dikom_dk300_digital[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300299 {EM2820_R08_GPIO_CTRL, 0x6e, ~EM_GPIO_4, 10},
Andrea.Amorosi76@gmail.com7ca7ef62010-02-09 17:53:38 -0300300 {EM2880_R04_GPO, 0x08, 0xff, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300301 { -1, -1, -1, -1},
Andrea.Amorosi76@gmail.com7ca7ef62010-02-09 17:53:38 -0300302};
303
Mauro Carvalho Chehabca3dfd62010-09-10 17:29:14 -0300304/* Reset for the most [digital] boards */
305static struct em28xx_reg_seq leadership_digital[] = {
Frank Schaefer907d1092013-06-03 14:12:02 -0300306 {EM2874_R80_GPIO_P0_CTRL, 0x70, 0xff, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300307 { -1, -1, -1, -1},
Mauro Carvalho Chehabca3dfd62010-09-10 17:29:14 -0300308};
309
310static struct em28xx_reg_seq leadership_reset[] = {
Frank Schaefer907d1092013-06-03 14:12:02 -0300311 {EM2874_R80_GPIO_P0_CTRL, 0xf0, 0xff, 10},
312 {EM2874_R80_GPIO_P0_CTRL, 0xb0, 0xff, 10},
313 {EM2874_R80_GPIO_P0_CTRL, 0xf0, 0xff, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300314 { -1, -1, -1, -1},
Mauro Carvalho Chehabca3dfd62010-09-10 17:29:14 -0300315};
316
Antti Palosaari460312e2011-05-25 17:03:50 -0300317/* 2013:024f PCTV nanoStick T2 290e
Antti Palosaarid6a5f922011-04-07 16:34:44 -0300318 * GPIO_6 - demod reset
319 * GPIO_7 - LED
320 */
321static struct em28xx_reg_seq pctv_290e[] = {
Frank Schaefer907d1092013-06-03 14:12:02 -0300322 {EM2874_R80_GPIO_P0_CTRL, 0x00, 0xff, 80},
323 {EM2874_R80_GPIO_P0_CTRL, 0x40, 0xff, 80}, /* GPIO_6 = 1 */
324 {EM2874_R80_GPIO_P0_CTRL, 0xc0, 0xff, 80}, /* GPIO_7 = 1 */
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300325 { -1, -1, -1, -1},
Antti Palosaarid6a5f922011-04-07 16:34:44 -0300326};
Mauro Carvalho Chehabca3dfd62010-09-10 17:29:14 -0300327
Mauro Carvalho Chehabfec528b2011-07-03 21:05:06 -0300328#if 0
329static struct em28xx_reg_seq terratec_h5_gpio[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300330 {EM2820_R08_GPIO_CTRL, 0xff, 0xff, 10},
Frank Schaefer907d1092013-06-03 14:12:02 -0300331 {EM2874_R80_GPIO_P0_CTRL, 0xf6, 0xff, 100},
332 {EM2874_R80_GPIO_P0_CTRL, 0xf2, 0xff, 50},
333 {EM2874_R80_GPIO_P0_CTRL, 0xf6, 0xff, 50},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300334 { -1, -1, -1, -1},
Mauro Carvalho Chehabfec528b2011-07-03 21:05:06 -0300335};
336
337static struct em28xx_reg_seq terratec_h5_digital[] = {
Frank Schaefer907d1092013-06-03 14:12:02 -0300338 {EM2874_R80_GPIO_P0_CTRL, 0xf6, 0xff, 10},
339 {EM2874_R80_GPIO_P0_CTRL, 0xe6, 0xff, 100},
340 {EM2874_R80_GPIO_P0_CTRL, 0xa6, 0xff, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300341 { -1, -1, -1, -1},
Mauro Carvalho Chehabfec528b2011-07-03 21:05:06 -0300342};
343#endif
344
Antti Palosaari36588712011-08-01 01:15:30 -0300345/* 2013:024f PCTV DVB-S2 Stick 460e
346 * GPIO_0 - POWER_ON
347 * GPIO_1 - BOOST
348 * GPIO_2 - VUV_LNB (red LED)
349 * GPIO_3 - EXT_12V
350 * GPIO_4 - INT_DEM (DEMOD GPIO_0)
351 * GPIO_5 - INT_LNB
352 * GPIO_6 - RESET_DEM
353 * GPIO_7 - LED (green LED)
354 */
355static struct em28xx_reg_seq pctv_460e[] = {
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300356 {EM2874_R80_GPIO_P0_CTRL, 0x01, 0xff, 50},
357 { 0x0d, 0xff, 0xff, 50},
358 {EM2874_R80_GPIO_P0_CTRL, 0x41, 0xff, 50}, /* GPIO_6=1 */
359 { 0x0d, 0x42, 0xff, 50},
360 {EM2874_R80_GPIO_P0_CTRL, 0x61, 0xff, 50}, /* GPIO_5=1 */
361 { -1, -1, -1, -1},
Antti Palosaari36588712011-08-01 01:15:30 -0300362};
363
Mauro Carvalho Chehab4159d012013-02-28 10:35:56 -0300364static struct em28xx_reg_seq c3tech_digital_duo_digital[] = {
Frank Schaefer907d1092013-06-03 14:12:02 -0300365 {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 10},
366 {EM2874_R80_GPIO_P0_CTRL, 0xfd, 0xff, 10}, /* xc5000 reset */
367 {EM2874_R80_GPIO_P0_CTRL, 0xf9, 0xff, 35},
368 {EM2874_R80_GPIO_P0_CTRL, 0xfd, 0xff, 10},
369 {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 10},
370 {EM2874_R80_GPIO_P0_CTRL, 0xfe, 0xff, 10},
371 {EM2874_R80_GPIO_P0_CTRL, 0xbe, 0xff, 10},
372 {EM2874_R80_GPIO_P0_CTRL, 0xfe, 0xff, 20},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300373 { -1, -1, -1, -1},
Mauro Carvalho Chehab4159d012013-02-28 10:35:56 -0300374};
375
Antti Palosaariec573362013-02-25 09:01:13 -0300376/*
377 * 2013:0258 PCTV DVB-S2 Stick (461e)
378 * GPIO 0 = POWER_ON
379 * GPIO 1 = BOOST
380 * GPIO 2 = VUV_LNB (red LED)
381 * GPIO 3 = #EXT_12V
382 * GPIO 4 = INT_DEM
383 * GPIO 5 = INT_LNB
384 * GPIO 6 = #RESET_DEM
385 * GPIO 7 = P07_LED (green LED)
386 */
387static struct em28xx_reg_seq pctv_461e[] = {
388 {EM2874_R80_GPIO_P0_CTRL, 0x7f, 0xff, 0},
389 {0x0d, 0xff, 0xff, 0},
390 {EM2874_R80_GPIO_P0_CTRL, 0x3f, 0xff, 100}, /* reset demod */
391 {EM2874_R80_GPIO_P0_CTRL, 0x7f, 0xff, 200}, /* reset demod */
392 {0x0d, 0x42, 0xff, 0},
393 {EM2874_R80_GPIO_P0_CTRL, 0xeb, 0xff, 0},
394 {EM2874_R5F_TS_ENABLE, 0x84, 0x84, 0}, /* parallel? | null discard */
395 { -1, -1, -1, -1},
396};
397
Mauro Carvalho Chehab85032322011-11-24 15:01:45 -0200398#if 0
Eddi De Pieri82e7dbb2011-11-19 11:37:14 -0300399static struct em28xx_reg_seq hauppauge_930c_gpio[] = {
Frank Schaefer907d1092013-06-03 14:12:02 -0300400 {EM2874_R80_GPIO_P0_CTRL, 0x6f, 0xff, 10},
401 {EM2874_R80_GPIO_P0_CTRL, 0x4f, 0xff, 10}, /* xc5000 reset */
402 {EM2874_R80_GPIO_P0_CTRL, 0x6f, 0xff, 10},
403 {EM2874_R80_GPIO_P0_CTRL, 0x4f, 0xff, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300404 { -1, -1, -1, -1},
Eddi De Pieri82e7dbb2011-11-19 11:37:14 -0300405};
406
Eddi De Pieri82e7dbb2011-11-19 11:37:14 -0300407static struct em28xx_reg_seq hauppauge_930c_digital[] = {
Frank Schaefer907d1092013-06-03 14:12:02 -0300408 {EM2874_R80_GPIO_P0_CTRL, 0xf6, 0xff, 10},
409 {EM2874_R80_GPIO_P0_CTRL, 0xe6, 0xff, 100},
410 {EM2874_R80_GPIO_P0_CTRL, 0xa6, 0xff, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300411 { -1, -1, -1, -1},
Eddi De Pieri82e7dbb2011-11-19 11:37:14 -0300412};
413#endif
414
Antti Palosaari35530852012-03-18 18:09:01 -0300415/* 1b80:e425 MaxMedia UB425-TC
Jakob Haufe7c1dfdb2013-04-13 11:03:37 -0300416 * 1b80:e1cc Delock 61959
Antti Palosaari35530852012-03-18 18:09:01 -0300417 * GPIO_6 - demod reset, 0=active
418 * GPIO_7 - LED, 0=active
419 */
420static struct em28xx_reg_seq maxmedia_ub425_tc[] = {
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300421 {EM2874_R80_GPIO_P0_CTRL, 0x83, 0xff, 100},
422 {EM2874_R80_GPIO_P0_CTRL, 0xc3, 0xff, 100}, /* GPIO_6 = 1 */
423 {EM2874_R80_GPIO_P0_CTRL, 0x43, 0xff, 000}, /* GPIO_7 = 0 */
424 { -1, -1, -1, -1},
Antti Palosaari35530852012-03-18 18:09:01 -0300425};
426
Ivan Kalvachevfa5527c2012-03-19 20:09:55 -0300427/* 2304:0242 PCTV QuatroStick (510e)
428 * GPIO_2: decoder reset, 0=active
429 * GPIO_4: decoder suspend, 0=active
430 * GPIO_6: demod reset, 0=active
431 * GPIO_7: LED, 1=active
432 */
433static struct em28xx_reg_seq pctv_510e[] = {
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300434 {EM2874_R80_GPIO_P0_CTRL, 0x10, 0xff, 100},
435 {EM2874_R80_GPIO_P0_CTRL, 0x14, 0xff, 100}, /* GPIO_2 = 1 */
436 {EM2874_R80_GPIO_P0_CTRL, 0x54, 0xff, 050}, /* GPIO_6 = 1 */
437 { -1, -1, -1, -1},
Ivan Kalvachevfa5527c2012-03-19 20:09:55 -0300438};
439
Antti Palosaaric247d7b2012-03-19 11:48:19 -0300440/* 2013:0251 PCTV QuatroStick nano (520e)
441 * GPIO_2: decoder reset, 0=active
442 * GPIO_4: decoder suspend, 0=active
443 * GPIO_6: demod reset, 0=active
444 * GPIO_7: LED, 1=active
445 */
446static struct em28xx_reg_seq pctv_520e[] = {
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300447 {EM2874_R80_GPIO_P0_CTRL, 0x10, 0xff, 100},
448 {EM2874_R80_GPIO_P0_CTRL, 0x14, 0xff, 100}, /* GPIO_2 = 1 */
449 {EM2874_R80_GPIO_P0_CTRL, 0x54, 0xff, 050}, /* GPIO_6 = 1 */
450 {EM2874_R80_GPIO_P0_CTRL, 0xd4, 0xff, 000}, /* GPIO_7 = 1 */
451 { -1, -1, -1, -1},
Antti Palosaaric247d7b2012-03-19 11:48:19 -0300452};
453
Frank Schaefer0c37e732013-12-01 18:06:57 -0300454/* 1ae7:9003/9004 SpeedLink Vicious And Devine Laplace webcam
455 * reg 0x80/0x84:
456 * GPIO_0: capturing LED, 0=on, 1=off
457 * GPIO_2: AV mute button, 0=pressed, 1=unpressed
458 * GPIO 3: illumination button, 0=pressed, 1=unpressed
459 * GPIO_6: illumination/flash LED, 0=on, 1=off
460 * reg 0x81/0x85:
461 * GPIO_7: snapshot button, 0=pressed, 1=unpressed
462 */
463static struct em28xx_reg_seq speedlink_vad_laplace_reg_seq[] = {
464 {EM2820_R08_GPIO_CTRL, 0xf7, 0xff, 10},
465 {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xb2, 10},
466 { -1, -1, -1, -1},
467};
468
Antti Palosaari19229242014-04-10 22:11:27 -0300469static struct em28xx_reg_seq pctv_292e[] = {
470 {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 0},
471 {0x0d, 0xff, 0xff, 950},
472 {EM2874_R80_GPIO_P0_CTRL, 0xbd, 0xff, 100},
473 {EM2874_R80_GPIO_P0_CTRL, 0xfd, 0xff, 410},
474 {EM2874_R80_GPIO_P0_CTRL, 0x7d, 0xff, 300},
475 {EM2874_R80_GPIO_P0_CTRL, 0x7c, 0xff, 60},
476 {0x0d, 0x42, 0xff, 50},
477 {EM2874_R5F_TS_ENABLE, 0x85, 0xff, 0},
478 {-1, -1, -1, -1},
479};
480
Olli Salonenfc30dd762014-11-24 03:57:34 -0300481static struct em28xx_reg_seq terratec_t2_stick_hd[] = {
482 {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 0},
483 {0x0d, 0xff, 0xff, 600},
484 {EM2874_R80_GPIO_P0_CTRL, 0xfc, 0xff, 10},
485 {EM2874_R80_GPIO_P0_CTRL, 0xbc, 0xff, 100},
486 {EM2874_R80_GPIO_P0_CTRL, 0xfc, 0xff, 100},
487 {EM2874_R80_GPIO_P0_CTRL, 0x00, 0xff, 300},
488 {EM2874_R80_GPIO_P0_CTRL, 0xf8, 0xff, 100},
489 {EM2874_R80_GPIO_P0_CTRL, 0xfc, 0xff, 300},
490 {0x0d, 0x42, 0xff, 1000},
491 {EM2874_R5F_TS_ENABLE, 0x85, 0xff, 0},
492 {-1, -1, -1, -1},
493};
494
Satoshi Nagahamaab4d1452016-05-06 16:35:05 -0300495static struct em28xx_reg_seq plex_px_bcud[] = {
496 {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 0},
497 {0x0d, 0xff, 0xff, 0},
498 {EM2874_R50_IR_CONFIG, 0x01, 0xff, 0},
499 {EM28XX_R06_I2C_CLK, 0x40, 0xff, 0},
500 {EM2874_R80_GPIO_P0_CTRL, 0xfd, 0xff, 100},
501 {EM28XX_R12_VINENABLE, 0x20, 0x20, 0},
502 {0x0d, 0x42, 0xff, 1000},
503 {EM2874_R80_GPIO_P0_CTRL, 0xfc, 0xff, 10},
504 {EM2874_R80_GPIO_P0_CTRL, 0xfd, 0xff, 10},
505 {0x73, 0xfd, 0xff, 100},
506 {-1, -1, -1, -1},
507};
508
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -0300509/*
Olli Salonen11a2a942016-04-04 12:12:52 -0300510 * 2040:0265 Hauppauge WinTV-dualHD DVB
511 * reg 0x80/0x84:
512 * GPIO_0: Yellow LED tuner 1, 0=on, 1=off
513 * GPIO_1: Green LED tuner 1, 0=on, 1=off
514 * GPIO_2: Yellow LED tuner 2, 0=on, 1=off
515 * GPIO_3: Green LED tuner 2, 0=on, 1=off
516 * GPIO_5: Reset #2, 0=active
517 * GPIO_6: Reset #1, 0=active
518 */
519static struct em28xx_reg_seq hauppauge_dualhd_dvb[] = {
520 {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 0},
521 {0x0d, 0xff, 0xff, 200},
522 {0x50, 0x04, 0xff, 300},
523 {EM2874_R80_GPIO_P0_CTRL, 0xbf, 0xff, 100}, /* demod 1 reset */
524 {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 100},
525 {EM2874_R80_GPIO_P0_CTRL, 0xdf, 0xff, 100}, /* demod 2 reset */
526 {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 100},
527 {EM2874_R5F_TS_ENABLE, 0x44, 0xff, 50},
528 {EM2874_R5D_TS1_PKT_SIZE, 0x05, 0xff, 50},
529 {EM2874_R5E_TS2_PKT_SIZE, 0x05, 0xff, 50},
530 {-1, -1, -1, -1},
531};
532
533/*
Frank Schaeferf52226092013-12-01 18:06:52 -0300534 * Button definitions
535 */
536static struct em28xx_button std_snapshot_button[] = {
537 {
538 .role = EM28XX_BUTTON_SNAPSHOT,
539 .reg_r = EM28XX_R0C_USBSUSP,
540 .reg_clearing = EM28XX_R0C_USBSUSP,
541 .mask = EM28XX_R0C_USBSUSP_SNAPSHOT,
542 .inverted = 0,
543 },
544 {-1, 0, 0, 0, 0},
545};
546
Frank Schaefer0c37e732013-12-01 18:06:57 -0300547static struct em28xx_button speedlink_vad_laplace_buttons[] = {
548 {
549 .role = EM28XX_BUTTON_SNAPSHOT,
550 .reg_r = EM2874_R85_GPIO_P1_STATE,
551 .mask = 0x80,
552 .inverted = 1,
553 },
554 {
555 .role = EM28XX_BUTTON_ILLUMINATION,
556 .reg_r = EM2874_R84_GPIO_P0_STATE,
557 .mask = 0x08,
558 .inverted = 1,
559 },
560 {-1, 0, 0, 0, 0},
561};
562
563/*
564 * LED definitions
565 */
566static struct em28xx_led speedlink_vad_laplace_leds[] = {
567 {
568 .role = EM28XX_LED_ANALOG_CAPTURING,
569 .gpio_reg = EM2874_R80_GPIO_P0_CTRL,
570 .gpio_mask = 0x01,
571 .inverted = 1,
572 },
573 {
574 .role = EM28XX_LED_ILLUMINATION,
575 .gpio_reg = EM2874_R80_GPIO_P0_CTRL,
576 .gpio_mask = 0x40,
577 .inverted = 1,
578 },
579 {-1, 0, 0, 0},
580};
581
Mauro Carvalho Chehab59432be2014-03-04 12:34:34 -0300582static struct em28xx_led kworld_ub435q_v3_leds[] = {
583 {
584 .role = EM28XX_LED_DIGITAL_CAPTURING,
585 .gpio_reg = EM2874_R80_GPIO_P0_CTRL,
586 .gpio_mask = 0x80,
587 .inverted = 1,
588 },
589 {-1, 0, 0, 0},
590};
591
Mauro Carvalho Chehab88e4fcd2014-03-04 20:49:07 -0300592static struct em28xx_led pctv_80e_leds[] = {
593 {
594 .role = EM28XX_LED_DIGITAL_CAPTURING,
595 .gpio_reg = EM2874_R80_GPIO_P0_CTRL,
596 .gpio_mask = 0x80,
597 .inverted = 0,
598 },
599 {-1, 0, 0, 0},
600};
601
Matthieu Rogez565e37d2016-02-28 08:26:22 -0300602static struct em28xx_led terratec_grabby_leds[] = {
603 {
604 .role = EM28XX_LED_ANALOG_CAPTURING,
605 .gpio_reg = EM2820_R08_GPIO_CTRL,
606 .gpio_mask = EM_GPIO_3,
607 .inverted = 1,
608 },
609 {-1, 0, 0, 0},
610};
611
Olli Salonen11a2a942016-04-04 12:12:52 -0300612static struct em28xx_led hauppauge_dualhd_leds[] = {
613 {
614 .role = EM28XX_LED_DIGITAL_CAPTURING,
615 .gpio_reg = EM2874_R80_GPIO_P0_CTRL,
616 .gpio_mask = EM_GPIO_1,
617 .inverted = 1,
618 },
619 {
620 .role = EM28XX_LED_DIGITAL_CAPTURING_TS2,
621 .gpio_reg = EM2874_R80_GPIO_P0_CTRL,
622 .gpio_mask = EM_GPIO_3,
623 .inverted = 1,
624 },
625 {-1, 0, 0, 0},
626};
627
Frank Schaeferf52226092013-12-01 18:06:52 -0300628/*
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -0300629 * Board definitions
630 */
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800631struct em28xx_board em28xx_boards[] = {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300632 [EM2750_BOARD_UNKNOWN] = {
Mauro Carvalho Chehab8b220792009-07-12 10:56:21 -0300633 .name = "EM2710/EM2750/EM2751 webcam grabber",
Mauro Carvalho Chehab3d3215c2009-08-10 10:29:27 -0300634 .xclk = EM28XX_XCLK_FREQUENCY_20MHZ,
Mauro Carvalho Chehab8a2e6992009-07-12 10:26:36 -0300635 .tuner_type = TUNER_ABSENT,
636 .is_webcam = 1,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300637 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200638 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300639 .vmux = 0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300640 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabb80fd2d2009-07-14 21:08:22 -0300641 .gpio = silvercrest_reg_seq,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300642 } },
643 },
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -0800644 [EM2800_BOARD_UNKNOWN] = {
645 .name = "Unknown EM2800 video grabber",
646 .is_em2800 = 1,
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -0800647 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300648 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehab1c67e762008-11-27 07:46:59 -0300649 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300650 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200651 .type = EM28XX_VMUX_COMPOSITE,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300652 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300653 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300654 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800655 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300656 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300657 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300658 } },
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -0800659 },
660 [EM2820_BOARD_UNKNOWN] = {
Mauro Carvalho Chehaba2070c62008-11-25 07:05:06 -0300661 .name = "Unknown EM2750/28xx video grabber",
662 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehabb04fb662009-07-13 01:28:21 -0300663 .is_webcam = 1, /* To enable sensor probe */
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -0800664 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300665 [EM2750_BOARD_DLCW_130] = {
666 /* Beijing Huaqi Information Digital Technology Co., Ltd */
667 .name = "Huaqi DLCW-130",
668 .valid = EM28XX_BOARD_NOT_VALIDATED,
Mauro Carvalho Chehaba2070c62008-11-25 07:05:06 -0300669 .xclk = EM28XX_XCLK_FREQUENCY_48MHZ,
Mauro Carvalho Chehab8a2e6992009-07-12 10:26:36 -0300670 .tuner_type = TUNER_ABSENT,
671 .is_webcam = 1,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300672 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200673 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300674 .vmux = 0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300675 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300676 } },
677 },
Markus Rechberger4d17d082006-02-07 06:25:39 -0200678 [EM2820_BOARD_KWORLD_PVRTV2800RF] = {
Markus Rechberger33ccaa32006-02-07 06:25:41 -0200679 .name = "Kworld PVR TV 2800 RF",
Mauro Carvalho Chehabed086312008-01-24 06:59:20 -0300680 .tuner_type = TUNER_TEMIC_PAL,
Markus Rechberger4d17d082006-02-07 06:25:39 -0200681 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300682 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300683 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200684 .type = EM28XX_VMUX_COMPOSITE,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300685 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300686 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300687 }, {
Markus Rechberger4d17d082006-02-07 06:25:39 -0200688 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300689 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300690 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300691 } },
Markus Rechberger4d17d082006-02-07 06:25:39 -0200692 },
Douglas Schilling Landgraff7fe3e62009-01-19 09:31:55 -0300693 [EM2820_BOARD_GADMEI_TVR200] = {
694 .name = "Gadmei TVR200",
695 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
696 .tda9887_conf = TDA9887_PRESENT,
697 .decoder = EM28XX_SAA711X,
698 .input = { {
699 .type = EM28XX_VMUX_TELEVISION,
700 .vmux = SAA7115_COMPOSITE2,
701 .amux = EM28XX_AMUX_LINE_IN,
702 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200703 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraff7fe3e62009-01-19 09:31:55 -0300704 .vmux = SAA7115_COMPOSITE0,
705 .amux = EM28XX_AMUX_LINE_IN,
706 }, {
707 .type = EM28XX_VMUX_SVIDEO,
708 .vmux = SAA7115_SVIDEO3,
709 .amux = EM28XX_AMUX_LINE_IN,
710 } },
711 },
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800712 [EM2820_BOARD_TERRATEC_CINERGY_250] = {
713 .name = "Terratec Cinergy 250 USB",
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800714 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
Mauro Carvalho Chehabac07bb72009-09-08 14:04:41 -0300715 .has_ir_i2c = 1,
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800716 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300717 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300718 .input = { {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800719 .type = EM28XX_VMUX_TELEVISION,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300720 .vmux = SAA7115_COMPOSITE2,
Frank Schaefer5e8d02b2013-01-05 08:44:09 -0300721 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300722 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200723 .type = EM28XX_VMUX_COMPOSITE,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300724 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300725 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300726 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800727 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300728 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300729 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300730 } },
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800731 },
732 [EM2820_BOARD_PINNACLE_USB_2] = {
733 .name = "Pinnacle PCTV USB 2",
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800734 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
Mauro Carvalho Chehabac07bb72009-09-08 14:04:41 -0300735 .has_ir_i2c = 1,
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800736 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300737 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300738 .input = { {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800739 .type = EM28XX_VMUX_TELEVISION,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300740 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300741 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300742 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200743 .type = EM28XX_VMUX_COMPOSITE,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300744 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300745 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300746 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800747 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300748 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300749 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300750 } },
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800751 },
752 [EM2820_BOARD_HAUPPAUGE_WINTV_USB_2] = {
753 .name = "Hauppauge WinTV USB 2",
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800754 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300755 .tda9887_conf = TDA9887_PRESENT |
Nicola Soranzoa1a6ee72009-02-10 23:28:24 -0300756 TDA9887_PORT1_ACTIVE |
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300757 TDA9887_PORT2_ACTIVE,
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800758 .decoder = EM28XX_TVP5150,
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800759 .has_msp34xx = 1,
Mauro Carvalho Chehabac07bb72009-09-08 14:04:41 -0300760 .has_ir_i2c = 1,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300761 .input = { {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800762 .type = EM28XX_VMUX_TELEVISION,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300763 .vmux = TVP5150_COMPOSITE0,
Hans Verkuil2474ed42006-03-19 12:35:57 -0300764 .amux = MSP_INPUT_DEFAULT,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300765 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800766 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300767 .vmux = TVP5150_SVIDEO,
Hans Verkuil07151722006-04-01 18:03:23 -0300768 .amux = MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1,
769 MSP_DSP_IN_SCART, MSP_DSP_IN_SCART),
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300770 } },
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800771 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300772 [EM2820_BOARD_DLINK_USB_TV] = {
773 .name = "D-Link DUB-T210 TV Tuner",
774 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300775 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
776 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300777 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300778 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300779 .type = EM28XX_VMUX_TELEVISION,
780 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300781 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300782 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200783 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300784 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300785 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300786 }, {
787 .type = EM28XX_VMUX_SVIDEO,
788 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300789 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300790 } },
791 },
792 [EM2820_BOARD_HERCULES_SMART_TV_USB2] = {
793 .name = "Hercules Smart TV USB 2.0",
794 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300795 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
796 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300797 .decoder = EM28XX_SAA711X,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300798 .input = { {
799 .type = EM28XX_VMUX_TELEVISION,
800 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300801 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300802 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200803 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300804 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300805 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300806 }, {
807 .type = EM28XX_VMUX_SVIDEO,
808 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300809 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300810 } },
811 },
812 [EM2820_BOARD_PINNACLE_USB_2_FM1216ME] = {
813 .name = "Pinnacle PCTV USB 2 (Philips FM1216ME)",
814 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300815 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
816 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300817 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300818 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300819 .type = EM28XX_VMUX_TELEVISION,
820 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300821 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300822 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200823 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300824 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300825 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300826 }, {
827 .type = EM28XX_VMUX_SVIDEO,
828 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300829 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300830 } },
831 },
832 [EM2820_BOARD_GADMEI_UTV310] = {
833 .name = "Gadmei UTV310",
834 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300835 .tuner_type = TUNER_TNF_5335MF,
836 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300837 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300838 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300839 .type = EM28XX_VMUX_TELEVISION,
840 .vmux = SAA7115_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300841 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300842 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200843 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300844 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300845 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300846 }, {
847 .type = EM28XX_VMUX_SVIDEO,
848 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300849 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300850 } },
851 },
852 [EM2820_BOARD_LEADTEK_WINFAST_USBII_DELUXE] = {
853 .name = "Leadtek Winfast USB II Deluxe",
854 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300855 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
Magnus Almca39d842009-11-13 05:48:24 -0300856 .has_ir_i2c = 1,
857 .tvaudio_addr = 0x58,
858 .tda9887_conf = TDA9887_PRESENT |
859 TDA9887_PORT2_ACTIVE |
860 TDA9887_QSS,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300861 .decoder = EM28XX_SAA711X,
Magnus Almca39d842009-11-13 05:48:24 -0300862 .adecoder = EM28XX_TVAUDIO,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300863 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300864 .type = EM28XX_VMUX_TELEVISION,
Magnus Almca39d842009-11-13 05:48:24 -0300865 .vmux = SAA7115_COMPOSITE4,
866 .amux = EM28XX_AMUX_AUX,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300867 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200868 .type = EM28XX_VMUX_COMPOSITE,
Magnus Almca39d842009-11-13 05:48:24 -0300869 .vmux = SAA7115_COMPOSITE5,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300870 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300871 }, {
872 .type = EM28XX_VMUX_SVIDEO,
Magnus Almca39d842009-11-13 05:48:24 -0300873 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300874 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300875 } },
Magnus Almca39d842009-11-13 05:48:24 -0300876 .radio = {
877 .type = EM28XX_RADIO,
878 .amux = EM28XX_AMUX_AUX,
879 }
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300880 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300881 [EM2820_BOARD_VIDEOLOGY_20K14XUSB] = {
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300882 .name = "Videology 20K14XUSB USB2.0",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300883 .valid = EM28XX_BOARD_NOT_VALIDATED,
Mauro Carvalho Chehab8a2e6992009-07-12 10:26:36 -0300884 .tuner_type = TUNER_ABSENT,
885 .is_webcam = 1,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300886 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200887 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300888 .vmux = 0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300889 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300890 } },
891 },
Mauro Carvalho Chehab02e78042009-06-29 11:35:05 -0300892 [EM2820_BOARD_SILVERCREST_WEBCAM] = {
893 .name = "Silvercrest Webcam 1.3mpix",
894 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehabc43221d2009-07-12 10:23:23 -0300895 .is_webcam = 1,
Mauro Carvalho Chehab02e78042009-06-29 11:35:05 -0300896 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200897 .type = EM28XX_VMUX_COMPOSITE,
Mauro Carvalho Chehab02e78042009-06-29 11:35:05 -0300898 .vmux = 0,
899 .amux = EM28XX_AMUX_VIDEO,
900 .gpio = silvercrest_reg_seq,
901 } },
902 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300903 [EM2821_BOARD_SUPERCOMP_USB_2] = {
904 .name = "Supercomp USB 2.0 TV",
905 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300906 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
907 .tda9887_conf = TDA9887_PRESENT |
908 TDA9887_PORT1_ACTIVE |
909 TDA9887_PORT2_ACTIVE,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300910 .decoder = EM28XX_SAA711X,
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 = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300914 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300915 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200916 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300917 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300918 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300919 }, {
920 .type = EM28XX_VMUX_SVIDEO,
921 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300922 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300923 } },
924 },
925 [EM2821_BOARD_USBGEAR_VD204] = {
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300926 .name = "Usbgear VD204v9",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300927 .valid = EM28XX_BOARD_NOT_VALIDATED,
Mauro Carvalho Chehab1c67e762008-11-27 07:46:59 -0300928 .tuner_type = TUNER_ABSENT, /* Capture only device */
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300929 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300930 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200931 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300932 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300933 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300934 }, {
935 .type = EM28XX_VMUX_SVIDEO,
936 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300937 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300938 } },
939 },
940 [EM2860_BOARD_NETGMBH_CAM] = {
941 /* Beijing Huaqi Information Digital Technology Co., Ltd */
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300942 .name = "NetGMBH Cam",
943 .valid = EM28XX_BOARD_NOT_VALIDATED,
Mauro Carvalho Chehab8a2e6992009-07-12 10:26:36 -0300944 .tuner_type = TUNER_ABSENT,
945 .is_webcam = 1,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300946 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200947 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300948 .vmux = 0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300949 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300950 } },
951 },
952 [EM2860_BOARD_TYPHOON_DVD_MAKER] = {
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300953 .name = "Typhoon DVD Maker",
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300954 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehab1c67e762008-11-27 07:46:59 -0300955 .tuner_type = TUNER_ABSENT, /* Capture only device */
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300956 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200957 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300958 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300959 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300960 }, {
961 .type = EM28XX_VMUX_SVIDEO,
962 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300963 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300964 } },
965 },
966 [EM2860_BOARD_GADMEI_UTV330] = {
967 .name = "Gadmei UTV330",
968 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300969 .tuner_type = TUNER_TNF_5335MF,
970 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300971 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300972 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300973 .type = EM28XX_VMUX_TELEVISION,
974 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300975 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300976 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200977 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300978 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300979 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300980 }, {
981 .type = EM28XX_VMUX_SVIDEO,
982 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300983 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300984 } },
985 },
Mauro Carvalho Chehab6d888a62009-08-30 13:05:56 -0300986 [EM2861_BOARD_GADMEI_UTV330PLUS] = {
987 .name = "Gadmei UTV330+",
988 .tuner_type = TUNER_TNF_5335MF,
989 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehab02858ee2010-04-02 20:01:00 -0300990 .ir_codes = RC_MAP_GADMEI_RM008Z,
Mauro Carvalho Chehab6d888a62009-08-30 13:05:56 -0300991 .decoder = EM28XX_SAA711X,
992 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ,
993 .input = { {
994 .type = EM28XX_VMUX_TELEVISION,
995 .vmux = SAA7115_COMPOSITE2,
996 .amux = EM28XX_AMUX_VIDEO,
997 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200998 .type = EM28XX_VMUX_COMPOSITE,
Mauro Carvalho Chehab6d888a62009-08-30 13:05:56 -0300999 .vmux = SAA7115_COMPOSITE0,
1000 .amux = EM28XX_AMUX_LINE_IN,
1001 }, {
1002 .type = EM28XX_VMUX_SVIDEO,
1003 .vmux = SAA7115_SVIDEO3,
1004 .amux = EM28XX_AMUX_LINE_IN,
1005 } },
1006 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001007 [EM2860_BOARD_TERRATEC_HYBRID_XS] = {
1008 .name = "Terratec Cinergy A Hybrid XS",
1009 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001010 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001011 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001012 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001013
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001014 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001015 .type = EM28XX_VMUX_TELEVISION,
1016 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001017 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001018 .gpio = hauppauge_wintv_hvr_900_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001019 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001020 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001021 .vmux = TVP5150_COMPOSITE1,
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,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001024 }, {
1025 .type = EM28XX_VMUX_SVIDEO,
1026 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001027 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001028 .gpio = hauppauge_wintv_hvr_900_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001029 } },
1030 },
1031 [EM2861_BOARD_KWORLD_PVRTV_300U] = {
1032 .name = "KWorld PVRTV 300U",
1033 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001034 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001035 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001036 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001037 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001038 .type = EM28XX_VMUX_TELEVISION,
1039 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001040 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001041 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001042 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001043 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001044 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001045 }, {
1046 .type = EM28XX_VMUX_SVIDEO,
1047 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001048 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001049 } },
1050 },
1051 [EM2861_BOARD_YAKUMO_MOVIE_MIXER] = {
1052 .name = "Yakumo MovieMixer",
Nicola Soranzoa1a6ee72009-02-10 23:28:24 -03001053 .tuner_type = TUNER_ABSENT, /* Capture only device */
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001054 .decoder = EM28XX_TVP5150,
1055 .input = { {
1056 .type = EM28XX_VMUX_TELEVISION,
1057 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001058 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001059 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001060 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001061 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001062 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001063 }, {
1064 .type = EM28XX_VMUX_SVIDEO,
1065 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001066 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001067 } },
1068 },
Devin Heitmueller443fed92010-03-19 23:53:12 -03001069 [EM2860_BOARD_TVP5150_REFERENCE_DESIGN] = {
1070 .name = "EM2860/TVP5150 Reference Design",
1071 .tuner_type = TUNER_ABSENT, /* Capture only device */
1072 .decoder = EM28XX_TVP5150,
1073 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001074 .type = EM28XX_VMUX_COMPOSITE,
Devin Heitmueller443fed92010-03-19 23:53:12 -03001075 .vmux = TVP5150_COMPOSITE1,
1076 .amux = EM28XX_AMUX_LINE_IN,
1077 }, {
1078 .type = EM28XX_VMUX_SVIDEO,
1079 .vmux = TVP5150_SVIDEO,
1080 .amux = EM28XX_AMUX_LINE_IN,
1081 } },
1082 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001083 [EM2861_BOARD_PLEXTOR_PX_TV100U] = {
1084 .name = "Plextor ConvertX PX-TV100U",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001085 .tuner_type = TUNER_TNF_5335MF,
Mauro Carvalho Chehab0a6e44d2009-07-29 01:39:12 -03001086 .xclk = EM28XX_XCLK_I2S_MSB_TIMING |
1087 EM28XX_XCLK_FREQUENCY_12MHZ,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001088 .tda9887_conf = TDA9887_PRESENT,
1089 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehab0a6e44d2009-07-29 01:39:12 -03001090 .has_msp34xx = 1,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001091 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001092 .type = EM28XX_VMUX_TELEVISION,
1093 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001094 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab0a6e44d2009-07-29 01:39:12 -03001095 .gpio = pinnacle_hybrid_pro_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001096 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001097 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001098 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001099 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab0a6e44d2009-07-29 01:39:12 -03001100 .gpio = pinnacle_hybrid_pro_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001101 }, {
1102 .type = EM28XX_VMUX_SVIDEO,
1103 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001104 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab0a6e44d2009-07-29 01:39:12 -03001105 .gpio = pinnacle_hybrid_pro_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001106 } },
1107 },
Mauro Carvalho Chehab1c67e762008-11-27 07:46:59 -03001108
1109 /* Those boards with em2870 are DVB Only*/
1110
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001111 [EM2870_BOARD_TERRATEC_XS] = {
1112 .name = "Terratec Cinergy T XS",
1113 .valid = EM28XX_BOARD_NOT_VALIDATED,
1114 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001115 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001116 },
1117 [EM2870_BOARD_TERRATEC_XS_MT2060] = {
1118 .name = "Terratec Cinergy T XS (MT2060)",
Alberto Mardegan8c473112015-10-27 17:24:14 -02001119 .xclk = EM28XX_XCLK_IR_RC5_MODE |
1120 EM28XX_XCLK_FREQUENCY_12MHZ,
1121 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001122 .tuner_type = TUNER_ABSENT, /* MT2060 */
Alberto Mardegan8c473112015-10-27 17:24:14 -02001123 .has_dvb = 1,
1124 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001125 },
1126 [EM2870_BOARD_KWORLD_350U] = {
1127 .name = "Kworld 350 U DVB-T",
1128 .valid = EM28XX_BOARD_NOT_VALIDATED,
1129 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001130 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001131 },
1132 [EM2870_BOARD_KWORLD_355U] = {
1133 .name = "Kworld 355 U DVB-T",
1134 .valid = EM28XX_BOARD_NOT_VALIDATED,
Aivar Päkk1985f6f2011-12-11 18:15:00 -03001135 .tuner_type = TUNER_ABSENT,
1136 .tuner_gpio = default_tuner_gpio,
1137 .has_dvb = 1,
1138 .dvb_gpio = default_digital,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001139 },
1140 [EM2870_BOARD_PINNACLE_PCTV_DVB] = {
1141 .name = "Pinnacle PCTV DVB-T",
1142 .valid = EM28XX_BOARD_NOT_VALIDATED,
1143 .tuner_type = TUNER_ABSENT, /* MT2060 */
Mauro Carvalho Chehaba2070c62008-11-25 07:05:06 -03001144 /* djh - I have serious doubts this is right... */
1145 .xclk = EM28XX_XCLK_IR_RC5_MODE |
1146 EM28XX_XCLK_FREQUENCY_10MHZ,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001147 },
1148 [EM2870_BOARD_COMPRO_VIDEOMATE] = {
1149 .name = "Compro, VideoMate U3",
1150 .valid = EM28XX_BOARD_NOT_VALIDATED,
1151 .tuner_type = TUNER_ABSENT, /* MT2060 */
1152 },
Mauro Carvalho Chehab1c67e762008-11-27 07:46:59 -03001153
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001154 [EM2880_BOARD_TERRATEC_HYBRID_XS_FR] = {
1155 .name = "Terratec Hybrid XS Secam",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001156 .has_msp34xx = 1,
1157 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001158 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001159 .decoder = EM28XX_TVP5150,
Catimimi65638012010-02-18 18:06:32 -03001160 .has_dvb = 1,
Michel Garniercec4e6c2010-10-16 14:42:01 -03001161 .dvb_gpio = terratec_cinergy_USB_XS_FR_digital,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001162 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001163 .type = EM28XX_VMUX_TELEVISION,
1164 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001165 .amux = EM28XX_AMUX_VIDEO,
Michel Garniercec4e6c2010-10-16 14:42:01 -03001166 .gpio = terratec_cinergy_USB_XS_FR_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001167 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001168 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001169 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001170 .amux = EM28XX_AMUX_LINE_IN,
Michel Garniercec4e6c2010-10-16 14:42:01 -03001171 .gpio = terratec_cinergy_USB_XS_FR_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001172 }, {
1173 .type = EM28XX_VMUX_SVIDEO,
1174 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001175 .amux = EM28XX_AMUX_LINE_IN,
Michel Garniercec4e6c2010-10-16 14:42:01 -03001176 .gpio = terratec_cinergy_USB_XS_FR_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001177 } },
1178 },
Mauro Carvalho Chehabfec528b2011-07-03 21:05:06 -03001179 [EM2884_BOARD_TERRATEC_H5] = {
1180 .name = "Terratec Cinergy H5",
1181 .has_dvb = 1,
1182#if 0
1183 .tuner_type = TUNER_PHILIPS_TDA8290,
1184 .tuner_addr = 0x41,
1185 .dvb_gpio = terratec_h5_digital, /* FIXME: probably wrong */
1186 .tuner_gpio = terratec_h5_gpio,
Mauro Carvalho Chehabde724052011-11-20 11:23:24 -02001187#else
1188 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehabfec528b2011-07-03 21:05:06 -03001189#endif
Mauro Carvalho Chehab3aa2b3b2013-03-05 06:55:27 -03001190 .def_i2c_bus = 1,
1191 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
Mauro Carvalho Chehabfec528b2011-07-03 21:05:06 -03001192 EM28XX_I2C_FREQ_400_KHZ,
1193 },
Eddi De Pieri82e7dbb2011-11-19 11:37:14 -03001194 [EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C] = {
1195 .name = "Hauppauge WinTV HVR 930C",
1196 .has_dvb = 1,
Mauro Carvalho Chehabde724052011-11-20 11:23:24 -02001197#if 0 /* FIXME: Add analog support */
1198 .tuner_type = TUNER_XC5000,
1199 .tuner_addr = 0x41,
1200 .dvb_gpio = hauppauge_930c_digital,
Eddi De Pieri82e7dbb2011-11-19 11:37:14 -03001201 .tuner_gpio = hauppauge_930c_gpio,
Mauro Carvalho Chehabde724052011-11-20 11:23:24 -02001202#else
1203 .tuner_type = TUNER_ABSENT,
1204#endif
Mauro Carvalho Chehabdfbbf5d2011-11-20 12:16:25 -02001205 .ir_codes = RC_MAP_HAUPPAUGE,
Mauro Carvalho Chehab3aa2b3b2013-03-05 06:55:27 -03001206 .def_i2c_bus = 1,
1207 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
Eddi De Pieri82e7dbb2011-11-19 11:37:14 -03001208 EM28XX_I2C_FREQ_400_KHZ,
1209 },
Mauro Carvalho Chehab4159d012013-02-28 10:35:56 -03001210 [EM2884_BOARD_C3TECH_DIGITAL_DUO] = {
1211 .name = "C3 Tech Digital Duo HDTV/SDTV USB",
1212 .has_dvb = 1,
1213 /* FIXME: Add analog support - need a saa7136 driver */
1214 .tuner_type = TUNER_ABSENT, /* Digital-only TDA18271HD */
1215 .ir_codes = RC_MAP_EMPTY,
1216 .def_i2c_bus = 1,
1217 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE,
1218 .dvb_gpio = c3tech_digital_duo_digital,
1219 },
Andreas Oberrittera1ed02e2011-11-16 11:06:50 -03001220 [EM2884_BOARD_CINERGY_HTC_STICK] = {
1221 .name = "Terratec Cinergy HTC Stick",
1222 .has_dvb = 1,
Martin Blumenstinglc8dce002012-06-12 18:19:28 -03001223 .ir_codes = RC_MAP_NEC_TERRATEC_CINERGY_XS,
1224 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab3aa2b3b2013-03-05 06:55:27 -03001225 .def_i2c_bus = 1,
1226 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08001227 EM28XX_I2C_FREQ_400_KHZ,
1228 },
Gilles Risch1fe0fbd2015-03-01 17:11:05 -03001229 [EM2884_BOARD_ELGATO_EYETV_HYBRID_2008] = {
1230 .name = "Elgato EyeTV Hybrid 2008 INT",
1231 .has_dvb = 1,
1232 .ir_codes = RC_MAP_NEC_TERRATEC_CINERGY_XS,
1233 .tuner_type = TUNER_ABSENT,
1234 .def_i2c_bus = 1,
1235 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
1236 EM28XX_I2C_FREQ_400_KHZ,
1237 },
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001238 [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900] = {
Aidan Thornton122d1582007-11-20 15:25:08 -03001239 .name = "Hauppauge WinTV HVR 900",
Aidan Thornton122d1582007-11-20 15:25:08 -03001240 .tda9887_conf = TDA9887_PRESENT,
1241 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001242 .tuner_gpio = default_tuner_gpio,
Mauro Carvalho Chehab5add9a62007-11-22 12:08:53 -03001243 .mts_firmware = 1,
Mauro Carvalho Chehaba2070c62008-11-25 07:05:06 -03001244 .has_dvb = 1,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001245 .dvb_gpio = hauppauge_wintv_hvr_900_digital,
Mauro Carvalho Chehabaf86ce72011-01-24 12:18:48 -03001246 .ir_codes = RC_MAP_HAUPPAUGE,
Aidan Thornton122d1582007-11-20 15:25:08 -03001247 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001248 .input = { {
Aidan Thornton122d1582007-11-20 15:25:08 -03001249 .type = EM28XX_VMUX_TELEVISION,
1250 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001251 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001252 .gpio = hauppauge_wintv_hvr_900_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001253 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001254 .type = EM28XX_VMUX_COMPOSITE,
Aidan Thornton122d1582007-11-20 15:25:08 -03001255 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001256 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001257 .gpio = hauppauge_wintv_hvr_900_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001258 }, {
Aidan Thornton122d1582007-11-20 15:25:08 -03001259 .type = EM28XX_VMUX_SVIDEO,
1260 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001261 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001262 .gpio = hauppauge_wintv_hvr_900_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001263 } },
Aidan Thornton122d1582007-11-20 15:25:08 -03001264 },
Devin Heitmueller17d9d552008-06-08 10:22:03 -03001265 [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2] = {
1266 .name = "Hauppauge WinTV HVR 900 (R2)",
Devin Heitmueller17d9d552008-06-08 10:22:03 -03001267 .tda9887_conf = TDA9887_PRESENT,
1268 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001269 .tuner_gpio = default_tuner_gpio,
Devin Heitmueller17d9d552008-06-08 10:22:03 -03001270 .mts_firmware = 1,
Devin Heitmueller75e2b862011-03-13 02:01:02 -03001271 .has_dvb = 1,
Devin Heitmueller7030f522011-03-13 02:04:53 -03001272 .dvb_gpio = hauppauge_wintv_hvr_900R2_digital,
Mauro Carvalho Chehabaf86ce72011-01-24 12:18:48 -03001273 .ir_codes = RC_MAP_HAUPPAUGE,
Devin Heitmueller17d9d552008-06-08 10:22:03 -03001274 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001275 .input = { {
Devin Heitmueller17d9d552008-06-08 10:22:03 -03001276 .type = EM28XX_VMUX_TELEVISION,
1277 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001278 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001279 .gpio = hauppauge_wintv_hvr_900_analog,
Devin Heitmueller17d9d552008-06-08 10:22:03 -03001280 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001281 .type = EM28XX_VMUX_COMPOSITE,
Devin Heitmueller17d9d552008-06-08 10:22:03 -03001282 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehaba5942b52008-11-27 07:44:00 -03001283 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001284 .gpio = hauppauge_wintv_hvr_900_analog,
Devin Heitmueller17d9d552008-06-08 10:22:03 -03001285 }, {
1286 .type = EM28XX_VMUX_SVIDEO,
1287 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001288 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001289 .gpio = hauppauge_wintv_hvr_900_analog,
Devin Heitmueller17d9d552008-06-08 10:22:03 -03001290 } },
1291 },
Douglas Schilling Landgraff89bc322008-12-01 21:01:04 -03001292 [EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850] = {
1293 .name = "Hauppauge WinTV HVR 850",
1294 .tuner_type = TUNER_XC2028,
1295 .tuner_gpio = default_tuner_gpio,
1296 .mts_firmware = 1,
1297 .has_dvb = 1,
1298 .dvb_gpio = hauppauge_wintv_hvr_900_digital,
Mauro Carvalho Chehabaf86ce72011-01-24 12:18:48 -03001299 .ir_codes = RC_MAP_HAUPPAUGE,
Douglas Schilling Landgraff89bc322008-12-01 21:01:04 -03001300 .decoder = EM28XX_TVP5150,
1301 .input = { {
1302 .type = EM28XX_VMUX_TELEVISION,
1303 .vmux = TVP5150_COMPOSITE0,
1304 .amux = EM28XX_AMUX_VIDEO,
1305 .gpio = hauppauge_wintv_hvr_900_analog,
1306 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001307 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraff89bc322008-12-01 21:01:04 -03001308 .vmux = TVP5150_COMPOSITE1,
1309 .amux = EM28XX_AMUX_LINE_IN,
1310 .gpio = hauppauge_wintv_hvr_900_analog,
1311 }, {
1312 .type = EM28XX_VMUX_SVIDEO,
1313 .vmux = TVP5150_SVIDEO,
1314 .amux = EM28XX_AMUX_LINE_IN,
1315 .gpio = hauppauge_wintv_hvr_900_analog,
1316 } },
1317 },
Mauro Carvalho Chehab10ac6602008-07-27 14:58:58 -03001318 [EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950] = {
Mauro Carvalho Chehab3abee532008-01-05 17:01:41 -03001319 .name = "Hauppauge WinTV HVR 950",
Mauro Carvalho Chehab3abee532008-01-05 17:01:41 -03001320 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001321 .tuner_gpio = default_tuner_gpio,
Mauro Carvalho Chehab3abee532008-01-05 17:01:41 -03001322 .mts_firmware = 1,
Mauro Carvalho Chehab227ad4a2008-04-17 21:37:40 -03001323 .has_dvb = 1,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001324 .dvb_gpio = hauppauge_wintv_hvr_900_digital,
Mauro Carvalho Chehab15195d32011-01-24 12:18:47 -03001325 .ir_codes = RC_MAP_HAUPPAUGE,
Mauro Carvalho Chehab3abee532008-01-05 17:01:41 -03001326 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001327 .input = { {
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001328 .type = EM28XX_VMUX_TELEVISION,
1329 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001330 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001331 .gpio = hauppauge_wintv_hvr_900_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001332 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001333 .type = EM28XX_VMUX_COMPOSITE,
Mauro Carvalho Chehab7d070e22007-11-01 21:52:58 -03001334 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001335 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001336 .gpio = hauppauge_wintv_hvr_900_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001337 }, {
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001338 .type = EM28XX_VMUX_SVIDEO,
1339 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001340 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001341 .gpio = hauppauge_wintv_hvr_900_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001342 } },
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001343 },
Devin Heitmueller4fd305b2008-06-04 13:43:46 -03001344 [EM2880_BOARD_PINNACLE_PCTV_HD_PRO] = {
1345 .name = "Pinnacle PCTV HD Pro Stick",
Devin Heitmueller4fd305b2008-06-04 13:43:46 -03001346 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001347 .tuner_gpio = default_tuner_gpio,
Devin Heitmueller4fd305b2008-06-04 13:43:46 -03001348 .mts_firmware = 1,
Devin Heitmueller4fd305b2008-06-04 13:43:46 -03001349 .has_dvb = 1,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001350 .dvb_gpio = hauppauge_wintv_hvr_900_digital,
Mauro Carvalho Chehab02858ee2010-04-02 20:01:00 -03001351 .ir_codes = RC_MAP_PINNACLE_PCTV_HD,
Devin Heitmueller4fd305b2008-06-04 13:43:46 -03001352 .decoder = EM28XX_TVP5150,
1353 .input = { {
1354 .type = EM28XX_VMUX_TELEVISION,
1355 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001356 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001357 .gpio = hauppauge_wintv_hvr_900_analog,
Devin Heitmueller4fd305b2008-06-04 13:43:46 -03001358 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001359 .type = EM28XX_VMUX_COMPOSITE,
Devin Heitmueller4fd305b2008-06-04 13:43:46 -03001360 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001361 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001362 .gpio = hauppauge_wintv_hvr_900_analog,
Devin Heitmueller4fd305b2008-06-04 13:43:46 -03001363 }, {
1364 .type = EM28XX_VMUX_SVIDEO,
1365 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001366 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001367 .gpio = hauppauge_wintv_hvr_900_analog,
Devin Heitmueller4fd305b2008-06-04 13:43:46 -03001368 } },
1369 },
Devin Heitmuellere14b3652008-07-26 11:04:33 -03001370 [EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600] = {
1371 .name = "AMD ATI TV Wonder HD 600",
Devin Heitmuellere14b3652008-07-26 11:04:33 -03001372 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001373 .tuner_gpio = default_tuner_gpio,
Devin Heitmuellere14b3652008-07-26 11:04:33 -03001374 .mts_firmware = 1,
Devin Heitmuellere14b3652008-07-26 11:04:33 -03001375 .has_dvb = 1,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001376 .dvb_gpio = hauppauge_wintv_hvr_900_digital,
Mauro Carvalho Chehab02858ee2010-04-02 20:01:00 -03001377 .ir_codes = RC_MAP_ATI_TV_WONDER_HD_600,
Devin Heitmuellere14b3652008-07-26 11:04:33 -03001378 .decoder = EM28XX_TVP5150,
1379 .input = { {
1380 .type = EM28XX_VMUX_TELEVISION,
1381 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001382 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001383 .gpio = hauppauge_wintv_hvr_900_analog,
Devin Heitmuellere14b3652008-07-26 11:04:33 -03001384 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001385 .type = EM28XX_VMUX_COMPOSITE,
Devin Heitmuellere14b3652008-07-26 11:04:33 -03001386 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001387 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001388 .gpio = hauppauge_wintv_hvr_900_analog,
Devin Heitmuellere14b3652008-07-26 11:04:33 -03001389 }, {
1390 .type = EM28XX_VMUX_SVIDEO,
1391 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001392 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001393 .gpio = hauppauge_wintv_hvr_900_analog,
Devin Heitmuellere14b3652008-07-26 11:04:33 -03001394 } },
1395 },
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001396 [EM2880_BOARD_TERRATEC_HYBRID_XS] = {
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001397 .name = "Terratec Hybrid XS",
1398 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001399 .tuner_gpio = default_tuner_gpio,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001400 .decoder = EM28XX_TVP5150,
reinhard schwab655b8402008-07-26 10:47:00 -03001401 .has_dvb = 1,
Devin Heitmuellerf7976082009-06-22 22:32:32 -03001402 .dvb_gpio = default_digital,
Mauro Carvalho Chehab02858ee2010-04-02 20:01:00 -03001403 .ir_codes = RC_MAP_TERRATEC_CINERGY_XS,
Devin Heitmueller8cd9aae2009-08-03 23:56:51 -03001404 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, /* NEC IR */
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001405 .input = { {
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001406 .type = EM28XX_VMUX_TELEVISION,
1407 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001408 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001409 .gpio = default_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001410 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001411 .type = EM28XX_VMUX_COMPOSITE,
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001412 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001413 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001414 .gpio = default_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001415 }, {
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001416 .type = EM28XX_VMUX_SVIDEO,
1417 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001418 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001419 .gpio = default_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001420 } },
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001421 },
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001422 /* maybe there's a reason behind it why Terratec sells the Hybrid XS
1423 as Prodigy XS with a different PID, let's keep it separated for now
1424 maybe we'll need it lateron */
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001425 [EM2880_BOARD_TERRATEC_PRODIGY_XS] = {
1426 .name = "Terratec Prodigy XS",
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001427 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001428 .tuner_gpio = default_tuner_gpio,
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001429 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001430 .input = { {
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001431 .type = EM28XX_VMUX_TELEVISION,
1432 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001433 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001434 .gpio = hauppauge_wintv_hvr_900_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001435 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001436 .type = EM28XX_VMUX_COMPOSITE,
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001437 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001438 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001439 .gpio = hauppauge_wintv_hvr_900_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001440 }, {
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001441 .type = EM28XX_VMUX_SVIDEO,
1442 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001443 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001444 .gpio = hauppauge_wintv_hvr_900_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001445 } },
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001446 },
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08001447 [EM2820_BOARD_MSI_VOX_USB_2] = {
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -03001448 .name = "MSI VOX USB 2.0",
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -03001449 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
1450 .tda9887_conf = TDA9887_PRESENT |
1451 TDA9887_PORT1_ACTIVE |
1452 TDA9887_PORT2_ACTIVE,
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -03001453 .max_range_640_480 = 1,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -03001454 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -03001455 .input = { {
1456 .type = EM28XX_VMUX_TELEVISION,
1457 .vmux = SAA7115_COMPOSITE4,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001458 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001459 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001460 .type = EM28XX_VMUX_COMPOSITE,
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -03001461 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001462 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001463 }, {
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -03001464 .type = EM28XX_VMUX_SVIDEO,
1465 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001466 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001467 } },
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08001468 },
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -08001469 [EM2800_BOARD_TERRATEC_CINERGY_200] = {
1470 .name = "Terratec Cinergy 200 USB",
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -08001471 .is_em2800 = 1,
Mauro Carvalho Chehabac07bb72009-09-08 14:04:41 -03001472 .has_ir_i2c = 1,
Sascha Sommer53b667e2012-01-08 16:41:22 -03001473 .tuner_type = TUNER_LG_TALN,
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -08001474 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -03001475 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001476 .input = { {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -08001477 .type = EM28XX_VMUX_TELEVISION,
Hans Verkuilc7c0b342006-04-02 13:35:00 -03001478 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001479 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001480 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001481 .type = EM28XX_VMUX_COMPOSITE,
Hans Verkuilc7c0b342006-04-02 13:35:00 -03001482 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001483 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001484 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -08001485 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -03001486 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001487 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001488 } },
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -08001489 },
Aron Szabo59d07f12008-07-27 13:47:52 -03001490 [EM2800_BOARD_GRABBEEX_USB2800] = {
Nicola Soranzoa1a6ee72009-02-10 23:28:24 -03001491 .name = "eMPIA Technology, Inc. GrabBeeX+ Video Encoder",
1492 .is_em2800 = 1,
1493 .decoder = EM28XX_SAA711X,
1494 .tuner_type = TUNER_ABSENT, /* capture only board */
1495 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001496 .type = EM28XX_VMUX_COMPOSITE,
Aron Szabo59d07f12008-07-27 13:47:52 -03001497 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001498 .amux = EM28XX_AMUX_LINE_IN,
Aron Szabo59d07f12008-07-27 13:47:52 -03001499 }, {
1500 .type = EM28XX_VMUX_SVIDEO,
1501 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001502 .amux = EM28XX_AMUX_LINE_IN,
Aron Szabo59d07f12008-07-27 13:47:52 -03001503 } },
1504 },
Mauro Carvalho Chehab694a1012009-11-26 21:26:13 -03001505 [EM2800_BOARD_VC211A] = {
1506 .name = "Actionmaster/LinXcel/Digitus VC211A",
1507 .is_em2800 = 1,
1508 .tuner_type = TUNER_ABSENT, /* Capture-only board */
1509 .decoder = EM28XX_SAA711X,
1510 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001511 .type = EM28XX_VMUX_COMPOSITE,
Mauro Carvalho Chehab694a1012009-11-26 21:26:13 -03001512 .vmux = SAA7115_COMPOSITE0,
1513 .amux = EM28XX_AMUX_LINE_IN,
1514 .gpio = vc211a_enable,
1515 }, {
1516 .type = EM28XX_VMUX_SVIDEO,
1517 .vmux = SAA7115_SVIDEO3,
1518 .amux = EM28XX_AMUX_LINE_IN,
1519 .gpio = vc211a_enable,
1520 } },
1521 },
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -08001522 [EM2800_BOARD_LEADTEK_WINFAST_USBII] = {
1523 .name = "Leadtek Winfast USB II",
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -08001524 .is_em2800 = 1,
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -08001525 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
1526 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -03001527 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001528 .input = { {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -08001529 .type = EM28XX_VMUX_TELEVISION,
Hans Verkuilc7c0b342006-04-02 13:35:00 -03001530 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001531 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001532 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001533 .type = EM28XX_VMUX_COMPOSITE,
Hans Verkuilc7c0b342006-04-02 13:35:00 -03001534 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001535 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001536 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -08001537 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -03001538 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001539 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001540 } },
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -08001541 },
1542 [EM2800_BOARD_KWORLD_USB2800] = {
1543 .name = "Kworld USB2800",
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -08001544 .is_em2800 = 1,
Michael Krufkyab8b8702008-04-22 14:46:05 -03001545 .tuner_type = TUNER_PHILIPS_FCV1236D,
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -08001546 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -03001547 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001548 .input = { {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -08001549 .type = EM28XX_VMUX_TELEVISION,
Hans Verkuilc7c0b342006-04-02 13:35:00 -03001550 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001551 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001552 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001553 .type = EM28XX_VMUX_COMPOSITE,
Hans Verkuilc7c0b342006-04-02 13:35:00 -03001554 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001555 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001556 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -08001557 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -03001558 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001559 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001560 } },
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -08001561 },
Mauro Carvalho Chehab45632c42005-11-08 21:38:15 -08001562 [EM2820_BOARD_PINNACLE_DVC_90] = {
Douglas Schilling Landgrafea476892009-09-06 18:41:59 -03001563 .name = "Pinnacle Dazzle DVC 90/100/101/107 / Kaiser Baas Video to DVD maker "
Don Kramer74e07f32012-01-02 16:15:44 -03001564 "/ Kworld DVD Maker 2 / Plextor ConvertX PX-AV100U",
Mauro Carvalho Chehab1c67e762008-11-27 07:46:59 -03001565 .tuner_type = TUNER_ABSENT, /* capture only board */
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -03001566 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001567 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001568 .type = EM28XX_VMUX_COMPOSITE,
Hans Verkuilc7c0b342006-04-02 13:35:00 -03001569 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001570 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001571 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -08001572 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -03001573 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001574 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001575 } },
Mauro Carvalho Chehab45632c42005-11-08 21:38:15 -08001576 },
Sascha Sommer43625592007-11-03 15:05:07 -03001577 [EM2800_BOARD_VGEAR_POCKETTV] = {
1578 .name = "V-Gear PocketTV",
1579 .is_em2800 = 1,
Sascha Sommer43625592007-11-03 15:05:07 -03001580 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
1581 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -03001582 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001583 .input = { {
Sascha Sommer43625592007-11-03 15:05:07 -03001584 .type = EM28XX_VMUX_TELEVISION,
1585 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001586 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001587 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001588 .type = EM28XX_VMUX_COMPOSITE,
Sascha Sommer43625592007-11-03 15:05:07 -03001589 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001590 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001591 }, {
Sascha Sommer43625592007-11-03 15:05:07 -03001592 .type = EM28XX_VMUX_SVIDEO,
1593 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001594 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001595 } },
Sascha Sommer43625592007-11-03 15:05:07 -03001596 },
Douglas Schilling Landgraf1e1addd2008-12-27 21:38:14 -03001597 [EM2820_BOARD_PROLINK_PLAYTV_BOX4_USB2] = {
1598 .name = "Pixelview PlayTV Box 4 USB 2.0",
1599 .tda9887_conf = TDA9887_PRESENT,
1600 .tuner_type = TUNER_YMEC_TVF_5533MF,
1601 .decoder = EM28XX_SAA711X,
1602 .input = { {
1603 .type = EM28XX_VMUX_TELEVISION,
1604 .vmux = SAA7115_COMPOSITE2,
1605 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabfdf1bc92014-11-28 08:34:15 -03001606 .aout = EM28XX_AOUT_MONO | /* I2S */
Douglas Schilling Landgraf1e1addd2008-12-27 21:38:14 -03001607 EM28XX_AOUT_MASTER, /* Line out pin */
1608 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001609 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf1e1addd2008-12-27 21:38:14 -03001610 .vmux = SAA7115_COMPOSITE0,
1611 .amux = EM28XX_AMUX_LINE_IN,
1612 }, {
1613 .type = EM28XX_VMUX_SVIDEO,
1614 .vmux = SAA7115_SVIDEO3,
1615 .amux = EM28XX_AMUX_LINE_IN,
1616 } },
1617 },
Mauro Carvalho Chehabea4fd562007-11-03 21:21:57 -03001618 [EM2820_BOARD_PROLINK_PLAYTV_USB2] = {
Douglas Schilling Landgraf1f372a92009-02-25 16:54:31 -03001619 .name = "SIIG AVTuner-PVR / Pixelview Prolink PlayTV USB 2.0",
Frank Schaeferf52226092013-12-01 18:06:52 -03001620 .buttons = std_snapshot_button,
Mauro Carvalho Chehabea4fd562007-11-03 21:21:57 -03001621 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabed086312008-01-24 06:59:20 -03001622 .tuner_type = TUNER_YMEC_TVF_5533MF,
Mauro Carvalho Chehab41a5e7e2016-01-29 10:11:57 -02001623 .tuner_addr = 0x60,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -03001624 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001625 .input = { {
Mauro Carvalho Chehabea4fd562007-11-03 21:21:57 -03001626 .type = EM28XX_VMUX_TELEVISION,
1627 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab30e4ac72008-11-20 13:43:05 -03001628 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabfdf1bc92014-11-28 08:34:15 -03001629 .aout = EM28XX_AOUT_MONO | /* I2S */
Mauro Carvalho Chehab30e4ac72008-11-20 13:43:05 -03001630 EM28XX_AOUT_MASTER, /* Line out pin */
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001631 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001632 .type = EM28XX_VMUX_COMPOSITE,
Mauro Carvalho Chehabea4fd562007-11-03 21:21:57 -03001633 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab7463dda2008-02-05 22:29:26 -03001634 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001635 }, {
Mauro Carvalho Chehabea4fd562007-11-03 21:21:57 -03001636 .type = EM28XX_VMUX_SVIDEO,
1637 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab7463dda2008-02-05 22:29:26 -03001638 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001639 } },
Mauro Carvalho Chehabea4fd562007-11-03 21:21:57 -03001640 },
Devin Heitmueller3ed58ba2009-05-27 23:27:26 -03001641 [EM2860_BOARD_SAA711X_REFERENCE_DESIGN] = {
1642 .name = "EM2860/SAA711X Reference Design",
Frank Schaeferf52226092013-12-01 18:06:52 -03001643 .buttons = std_snapshot_button,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001644 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -03001645 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001646 .input = { {
Devin Heitmuellera9fc52b2008-06-28 08:57:06 -03001647 .type = EM28XX_VMUX_SVIDEO,
1648 .vmux = SAA7115_SVIDEO3,
Devin Heitmueller3ed58ba2009-05-27 23:27:26 -03001649 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001650 .type = EM28XX_VMUX_COMPOSITE,
Devin Heitmueller3ed58ba2009-05-27 23:27:26 -03001651 .vmux = SAA7115_COMPOSITE0,
Devin Heitmuellera9fc52b2008-06-28 08:57:06 -03001652 } },
1653 },
Mauro Carvalho Chehabca3dfd62010-09-10 17:29:14 -03001654
Mauro Carvalho Chehabebaefdb2011-06-01 10:16:25 -03001655 [EM2874_BOARD_LEADERSHIP_ISDBT] = {
Mauro Carvalho Chehab3aa2b3b2013-03-05 06:55:27 -03001656 .def_i2c_bus = 1,
1657 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
Mauro Carvalho Chehabca3dfd62010-09-10 17:29:14 -03001658 EM28XX_I2C_FREQ_100_KHZ,
1659 .xclk = EM28XX_XCLK_FREQUENCY_10MHZ,
1660 .name = "EM2874 Leadership ISDBT",
1661 .tuner_type = TUNER_ABSENT,
1662 .tuner_gpio = leadership_reset,
1663 .dvb_gpio = leadership_digital,
1664 .has_dvb = 1,
1665 },
1666
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001667 [EM2880_BOARD_MSI_DIGIVOX_AD] = {
1668 .name = "MSI DigiVox A/D",
1669 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001670 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001671 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001672 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001673 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001674 .type = EM28XX_VMUX_TELEVISION,
1675 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001676 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001677 .gpio = em2880_msi_digivox_ad_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001678 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001679 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001680 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001681 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001682 .gpio = em2880_msi_digivox_ad_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001683 }, {
1684 .type = EM28XX_VMUX_SVIDEO,
1685 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001686 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001687 .gpio = em2880_msi_digivox_ad_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001688 } },
1689 },
1690 [EM2880_BOARD_MSI_DIGIVOX_AD_II] = {
1691 .name = "MSI DigiVox A/D II",
1692 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001693 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001694 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001695 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001696 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001697 .type = EM28XX_VMUX_TELEVISION,
1698 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001699 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001700 .gpio = em2880_msi_digivox_ad_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001701 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001702 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001703 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001704 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001705 .gpio = em2880_msi_digivox_ad_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001706 }, {
1707 .type = EM28XX_VMUX_SVIDEO,
1708 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001709 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001710 .gpio = em2880_msi_digivox_ad_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001711 } },
1712 },
1713 [EM2880_BOARD_KWORLD_DVB_305U] = {
1714 .name = "KWorld DVB-T 305U",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001715 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001716 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001717 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001718 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001719 .type = EM28XX_VMUX_TELEVISION,
1720 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001721 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001722 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001723 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001724 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001725 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001726 }, {
1727 .type = EM28XX_VMUX_SVIDEO,
1728 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001729 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001730 } },
1731 },
1732 [EM2880_BOARD_KWORLD_DVB_310U] = {
1733 .name = "KWorld DVB-T 310U",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001734 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001735 .tuner_gpio = default_tuner_gpio,
Darron Broadda3808e2008-09-30 02:46:41 -03001736 .has_dvb = 1,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001737 .dvb_gpio = default_digital,
Darron Broadda3808e2008-09-30 02:46:41 -03001738 .mts_firmware = 1,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001739 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001740 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001741 .type = EM28XX_VMUX_TELEVISION,
1742 .vmux = TVP5150_COMPOSITE0,
Darron Broadda3808e2008-09-30 02:46:41 -03001743 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001744 .gpio = default_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001745 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001746 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001747 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehaba42aa192008-11-19 11:08:53 -03001748 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001749 .gpio = default_analog,
Darron Broadda3808e2008-09-30 02:46:41 -03001750 }, { /* S-video has not been tested yet */
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001751 .type = EM28XX_VMUX_SVIDEO,
1752 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehaba42aa192008-11-19 11:08:53 -03001753 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001754 .gpio = default_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001755 } },
1756 },
Franklin Mengd7de5d82009-06-06 17:05:02 -03001757 [EM2882_BOARD_KWORLD_ATSC_315U] = {
1758 .name = "KWorld ATSC 315U HDTV TV Box",
1759 .valid = EM28XX_BOARD_NOT_VALIDATED,
1760 .tuner_type = TUNER_THOMSON_DTT761X,
1761 .tuner_gpio = em2882_kworld_315u_tuner_gpio,
1762 .tda9887_conf = TDA9887_PRESENT,
1763 .decoder = EM28XX_SAA711X,
1764 .has_dvb = 1,
1765 .dvb_gpio = em2882_kworld_315u_digital,
Mauro Carvalho Chehab02858ee2010-04-02 20:01:00 -03001766 .ir_codes = RC_MAP_KWORLD_315U,
Franklin Mengd7de5d82009-06-06 17:05:02 -03001767 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ,
1768 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE,
1769 /* Analog mode - still not ready */
1770 /*.input = { {
1771 .type = EM28XX_VMUX_TELEVISION,
1772 .vmux = SAA7115_COMPOSITE2,
1773 .amux = EM28XX_AMUX_VIDEO,
1774 .gpio = em2882_kworld_315u_analog,
1775 .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO,
1776 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001777 .type = EM28XX_VMUX_COMPOSITE,
Franklin Mengd7de5d82009-06-06 17:05:02 -03001778 .vmux = SAA7115_COMPOSITE0,
1779 .amux = EM28XX_AMUX_LINE_IN,
1780 .gpio = em2882_kworld_315u_analog1,
1781 .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO,
1782 }, {
1783 .type = EM28XX_VMUX_SVIDEO,
1784 .vmux = SAA7115_SVIDEO3,
1785 .amux = EM28XX_AMUX_LINE_IN,
1786 .gpio = em2882_kworld_315u_analog1,
1787 .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO,
1788 } }, */
1789 },
Douglas Schilling Landgrafe5db5d42009-04-09 18:24:34 -03001790 [EM2880_BOARD_EMPIRE_DUAL_TV] = {
1791 .name = "Empire dual TV",
1792 .tuner_type = TUNER_XC2028,
1793 .tuner_gpio = default_tuner_gpio,
1794 .has_dvb = 1,
1795 .dvb_gpio = default_digital,
1796 .mts_firmware = 1,
1797 .decoder = EM28XX_TVP5150,
1798 .input = { {
1799 .type = EM28XX_VMUX_TELEVISION,
1800 .vmux = TVP5150_COMPOSITE0,
1801 .amux = EM28XX_AMUX_VIDEO,
1802 .gpio = default_analog,
1803 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001804 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgrafe5db5d42009-04-09 18:24:34 -03001805 .vmux = TVP5150_COMPOSITE1,
1806 .amux = EM28XX_AMUX_LINE_IN,
1807 .gpio = default_analog,
1808 }, {
1809 .type = EM28XX_VMUX_SVIDEO,
1810 .vmux = TVP5150_SVIDEO,
1811 .amux = EM28XX_AMUX_LINE_IN,
1812 .gpio = default_analog,
1813 } },
1814 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001815 [EM2881_BOARD_DNT_DA2_HYBRID] = {
1816 .name = "DNT DA2 Hybrid",
1817 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001818 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001819 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001820 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001821 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001822 .type = EM28XX_VMUX_TELEVISION,
1823 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001824 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001825 .gpio = default_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001826 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001827 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001828 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001829 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001830 .gpio = default_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001831 }, {
1832 .type = EM28XX_VMUX_SVIDEO,
1833 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001834 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001835 .gpio = default_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001836 } },
1837 },
1838 [EM2881_BOARD_PINNACLE_HYBRID_PRO] = {
1839 .name = "Pinnacle Hybrid Pro",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001840 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001841 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001842 .decoder = EM28XX_TVP5150,
Devin Heitmuellerd5b3ba92009-07-08 21:51:35 -03001843 .has_dvb = 1,
1844 .dvb_gpio = pinnacle_hybrid_pro_digital,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001845 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001846 .type = EM28XX_VMUX_TELEVISION,
1847 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001848 .amux = EM28XX_AMUX_VIDEO,
Devin Heitmuellerd5b3ba92009-07-08 21:51:35 -03001849 .gpio = pinnacle_hybrid_pro_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001850 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001851 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001852 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001853 .amux = EM28XX_AMUX_LINE_IN,
Devin Heitmuellerd5b3ba92009-07-08 21:51:35 -03001854 .gpio = pinnacle_hybrid_pro_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001855 }, {
1856 .type = EM28XX_VMUX_SVIDEO,
1857 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001858 .amux = EM28XX_AMUX_LINE_IN,
Devin Heitmuellerd5b3ba92009-07-08 21:51:35 -03001859 .gpio = pinnacle_hybrid_pro_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001860 } },
1861 },
Devin Heitmueller09bc1942011-03-13 02:07:54 -03001862 [EM2882_BOARD_PINNACLE_HYBRID_PRO_330E] = {
1863 .name = "Pinnacle Hybrid Pro (330e)",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001864 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001865 .tuner_gpio = default_tuner_gpio,
Eugeniy Meshcheryakova674a3b2008-08-01 08:23:41 -03001866 .mts_firmware = 1,
Devin Heitmuellerad9b4bb2011-03-13 02:09:59 -03001867 .has_dvb = 1,
1868 .dvb_gpio = hauppauge_wintv_hvr_900R2_digital,
Devin Heitmueller9b316d62011-03-13 02:18:34 -03001869 .ir_codes = RC_MAP_PINNACLE_PCTV_HD,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001870 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001871 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001872 .type = EM28XX_VMUX_TELEVISION,
1873 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001874 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001875 .gpio = hauppauge_wintv_hvr_900_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001876 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001877 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001878 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001879 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001880 .gpio = hauppauge_wintv_hvr_900_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001881 }, {
1882 .type = EM28XX_VMUX_SVIDEO,
1883 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001884 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001885 .gpio = hauppauge_wintv_hvr_900_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001886 } },
1887 },
1888 [EM2882_BOARD_KWORLD_VS_DVBT] = {
1889 .name = "Kworld VS-DVB-T 323UR",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001890 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001891 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001892 .decoder = EM28XX_TVP5150,
Antonio Larrosa811fab62010-03-04 22:19:48 -03001893 .mts_firmware = 1,
1894 .has_dvb = 1,
1895 .dvb_gpio = kworld_330u_digital,
1896 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, /* NEC IR */
Mauro Carvalho Chehab02858ee2010-04-02 20:01:00 -03001897 .ir_codes = RC_MAP_KWORLD_315U,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001898 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001899 .type = EM28XX_VMUX_TELEVISION,
1900 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001901 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001902 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001903 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001904 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001905 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001906 }, {
1907 .type = EM28XX_VMUX_SVIDEO,
1908 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001909 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001910 } },
1911 },
1912 [EM2882_BOARD_TERRATEC_HYBRID_XS] = {
Philippe Bourdin91245442010-10-31 09:57:58 -03001913 .name = "Terratec Cinnergy Hybrid T USB XS (em2882)",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001914 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001915 .tuner_gpio = default_tuner_gpio,
Uroš Vamplec994d02009-09-30 22:53:37 -03001916 .mts_firmware = 1,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001917 .decoder = EM28XX_TVP5150,
Uroš Vamplec994d02009-09-30 22:53:37 -03001918 .has_dvb = 1,
1919 .dvb_gpio = hauppauge_wintv_hvr_900_digital,
Mauro Carvalho Chehab02858ee2010-04-02 20:01:00 -03001920 .ir_codes = RC_MAP_TERRATEC_CINERGY_XS,
Uroš Vamplec994d02009-09-30 22:53:37 -03001921 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001922 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001923 .type = EM28XX_VMUX_TELEVISION,
1924 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001925 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001926 .gpio = hauppauge_wintv_hvr_900_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001927 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001928 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001929 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001930 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001931 .gpio = hauppauge_wintv_hvr_900_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001932 }, {
1933 .type = EM28XX_VMUX_SVIDEO,
1934 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001935 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001936 .gpio = hauppauge_wintv_hvr_900_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001937 } },
1938 },
Andrea.Amorosi76@gmail.com7ca7ef62010-02-09 17:53:38 -03001939 [EM2882_BOARD_DIKOM_DK300] = {
1940 .name = "Dikom DK300",
1941 .tuner_type = TUNER_XC2028,
1942 .tuner_gpio = default_tuner_gpio,
1943 .decoder = EM28XX_TVP5150,
1944 .mts_firmware = 1,
1945 .has_dvb = 1,
1946 .dvb_gpio = dikom_dk300_digital,
1947 .input = { {
1948 .type = EM28XX_VMUX_TELEVISION,
1949 .vmux = TVP5150_COMPOSITE0,
1950 .amux = EM28XX_AMUX_VIDEO,
1951 .gpio = default_analog,
1952 } },
1953 },
Robert Krakora6e7b9ea2009-01-18 21:59:34 -03001954 [EM2883_BOARD_KWORLD_HYBRID_330U] = {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001955 .name = "Kworld PlusTV HD Hybrid 330",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001956 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001957 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001958 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabbe2c6db2008-12-09 15:43:10 -03001959 .mts_firmware = 1,
1960 .has_dvb = 1,
Robert Krakora6e7b9ea2009-01-18 21:59:34 -03001961 .dvb_gpio = kworld_330u_digital,
1962 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ,
Nicola Soranzoa1a6ee72009-02-10 23:28:24 -03001963 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
1964 EM28XX_I2C_EEPROM_ON_BOARD |
1965 EM28XX_I2C_EEPROM_KEY_VALID,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001966 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001967 .type = EM28XX_VMUX_TELEVISION,
1968 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001969 .amux = EM28XX_AMUX_VIDEO,
Robert Krakora6e7b9ea2009-01-18 21:59:34 -03001970 .gpio = kworld_330u_analog,
1971 .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001972 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001973 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001974 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001975 .amux = EM28XX_AMUX_LINE_IN,
Robert Krakora6e7b9ea2009-01-18 21:59:34 -03001976 .gpio = kworld_330u_analog,
1977 .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001978 }, {
1979 .type = EM28XX_VMUX_SVIDEO,
1980 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001981 .amux = EM28XX_AMUX_LINE_IN,
Robert Krakora6e7b9ea2009-01-18 21:59:34 -03001982 .gpio = kworld_330u_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001983 } },
1984 },
Mauro Carvalho Chehabee281b82008-07-27 16:58:04 -03001985 [EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU] = {
Vitaly Woold3603342008-07-27 14:10:11 -03001986 .name = "Compro VideoMate ForYou/Stereo",
Vitaly Woold3603342008-07-27 14:10:11 -03001987 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03001988 .tvaudio_addr = 0xb0,
Vitaly Woold3603342008-07-27 14:10:11 -03001989 .tda9887_conf = TDA9887_PRESENT,
1990 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabdf7fa092009-02-25 09:06:13 -03001991 .adecoder = EM28XX_TVAUDIO,
Vitaly Wool2bd1d9e2009-03-04 08:27:52 -03001992 .mute_gpio = compro_mute_gpio,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001993 .input = { {
Vitaly Woold3603342008-07-27 14:10:11 -03001994 .type = EM28XX_VMUX_TELEVISION,
1995 .vmux = TVP5150_COMPOSITE0,
Vitaly Wool2bd1d9e2009-03-04 08:27:52 -03001996 .amux = EM28XX_AMUX_VIDEO,
1997 .gpio = compro_unmute_tv_gpio,
Vitaly Woold3603342008-07-27 14:10:11 -03001998 }, {
1999 .type = EM28XX_VMUX_SVIDEO,
2000 .vmux = TVP5150_SVIDEO,
2001 .amux = EM28XX_AMUX_LINE_IN,
Vitaly Wool2bd1d9e2009-03-04 08:27:52 -03002002 .gpio = compro_unmute_svid_gpio,
Vitaly Woold3603342008-07-27 14:10:11 -03002003 } },
2004 },
Mauro Carvalho Chehab0bf4f6c2009-02-11 14:13:20 -03002005 [EM2860_BOARD_KAIOMY_TVNPC_U2] = {
2006 .name = "Kaiomy TVnPC U2",
2007 .vchannels = 3,
2008 .tuner_type = TUNER_XC2028,
2009 .tuner_addr = 0x61,
2010 .mts_firmware = 1,
2011 .decoder = EM28XX_TVP5150,
2012 .tuner_gpio = default_tuner_gpio,
Mauro Carvalho Chehab02858ee2010-04-02 20:01:00 -03002013 .ir_codes = RC_MAP_KAIOMY,
Mauro Carvalho Chehab0bf4f6c2009-02-11 14:13:20 -03002014 .input = { {
2015 .type = EM28XX_VMUX_TELEVISION,
2016 .vmux = TVP5150_COMPOSITE0,
2017 .amux = EM28XX_AMUX_VIDEO,
2018
2019 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02002020 .type = EM28XX_VMUX_COMPOSITE,
Mauro Carvalho Chehab0bf4f6c2009-02-11 14:13:20 -03002021 .vmux = TVP5150_COMPOSITE1,
2022 .amux = EM28XX_AMUX_LINE_IN,
2023 }, {
2024 .type = EM28XX_VMUX_SVIDEO,
2025 .vmux = TVP5150_SVIDEO,
2026 .amux = EM28XX_AMUX_LINE_IN,
2027 } },
2028 .radio = {
2029 .type = EM28XX_RADIO,
2030 .amux = EM28XX_AMUX_LINE_IN,
2031 }
Mauro Carvalho Chehab56ee3802009-02-11 14:18:36 -03002032 },
2033 [EM2860_BOARD_EASYCAP] = {
2034 .name = "Easy Cap Capture DC-60",
2035 .vchannels = 2,
2036 .tuner_type = TUNER_ABSENT,
2037 .decoder = EM28XX_SAA711X,
2038 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02002039 .type = EM28XX_VMUX_COMPOSITE,
Mauro Carvalho Chehab56ee3802009-02-11 14:18:36 -03002040 .vmux = SAA7115_COMPOSITE0,
2041 .amux = EM28XX_AMUX_LINE_IN,
2042 }, {
2043 .type = EM28XX_VMUX_SVIDEO,
2044 .vmux = SAA7115_SVIDEO3,
2045 .amux = EM28XX_AMUX_LINE_IN,
2046 } },
2047 },
Indika Katugampalaf74a61e32009-02-11 11:13:05 -03002048 [EM2820_BOARD_IODATA_GVMVP_SZ] = {
2049 .name = "IO-DATA GV-MVP/SZ",
2050 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
2051 .tuner_gpio = default_tuner_gpio,
2052 .tda9887_conf = TDA9887_PRESENT,
2053 .decoder = EM28XX_TVP5150,
2054 .input = { {
2055 .type = EM28XX_VMUX_TELEVISION,
2056 .vmux = TVP5150_COMPOSITE0,
2057 .amux = EM28XX_AMUX_VIDEO,
2058 }, { /* Composite has not been tested yet */
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02002059 .type = EM28XX_VMUX_COMPOSITE,
Indika Katugampalaf74a61e32009-02-11 11:13:05 -03002060 .vmux = TVP5150_COMPOSITE1,
2061 .amux = EM28XX_AMUX_VIDEO,
2062 }, { /* S-video has not been tested yet */
2063 .type = EM28XX_VMUX_SVIDEO,
2064 .vmux = TVP5150_SVIDEO,
2065 .amux = EM28XX_AMUX_VIDEO,
2066 } },
2067 },
Mauro Carvalho Chehab4557af92009-05-23 09:58:52 -03002068 [EM2860_BOARD_TERRATEC_GRABBY] = {
2069 .name = "Terratec Grabby",
2070 .vchannels = 2,
2071 .tuner_type = TUNER_ABSENT,
2072 .decoder = EM28XX_SAA711X,
2073 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ,
2074 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02002075 .type = EM28XX_VMUX_COMPOSITE,
Mauro Carvalho Chehab4557af92009-05-23 09:58:52 -03002076 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehaba3fa9042010-10-25 17:51:15 -03002077 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab4557af92009-05-23 09:58:52 -03002078 }, {
2079 .type = EM28XX_VMUX_SVIDEO,
2080 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehaba3fa9042010-10-25 17:51:15 -03002081 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab4557af92009-05-23 09:58:52 -03002082 } },
Matthieu Rogezdd837fb2016-02-28 08:26:21 -03002083 .buttons = std_snapshot_button,
Matthieu Rogez565e37d2016-02-28 08:26:22 -03002084 .leds = terratec_grabby_leds,
Mauro Carvalho Chehab4557af92009-05-23 09:58:52 -03002085 },
Mauro Carvalho Chehab766ed642009-05-24 00:46:01 -03002086 [EM2860_BOARD_TERRATEC_AV350] = {
2087 .name = "Terratec AV350",
2088 .vchannels = 2,
2089 .tuner_type = TUNER_ABSENT,
2090 .decoder = EM28XX_TVP5150,
2091 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ,
2092 .mute_gpio = terratec_av350_mute_gpio,
2093 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02002094 .type = EM28XX_VMUX_COMPOSITE,
Mauro Carvalho Chehab766ed642009-05-24 00:46:01 -03002095 .vmux = TVP5150_COMPOSITE1,
2096 .amux = EM28XX_AUDIO_SRC_LINE,
Jean Delvare1df8e982009-05-13 16:48:07 -03002097 .gpio = terratec_av350_unmute_gpio,
Mauro Carvalho Chehab766ed642009-05-24 00:46:01 -03002098
2099 }, {
2100 .type = EM28XX_VMUX_SVIDEO,
2101 .vmux = TVP5150_SVIDEO,
2102 .amux = EM28XX_AUDIO_SRC_LINE,
Jean Delvare1df8e982009-05-13 16:48:07 -03002103 .gpio = terratec_av350_unmute_gpio,
Mauro Carvalho Chehab766ed642009-05-24 00:46:01 -03002104 } },
2105 },
Adrian Taylor8298f2f2010-10-20 07:55:33 -03002106
2107 [EM2860_BOARD_ELGATO_VIDEO_CAPTURE] = {
2108 .name = "Elgato Video Capture",
2109 .decoder = EM28XX_SAA711X,
2110 .tuner_type = TUNER_ABSENT, /* Capture only device */
2111 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02002112 .type = EM28XX_VMUX_COMPOSITE,
Adrian Taylor8298f2f2010-10-20 07:55:33 -03002113 .vmux = SAA7115_COMPOSITE0,
2114 .amux = EM28XX_AMUX_LINE_IN,
2115 }, {
2116 .type = EM28XX_VMUX_SVIDEO,
2117 .vmux = SAA7115_SVIDEO3,
2118 .amux = EM28XX_AMUX_LINE_IN,
2119 } },
2120 },
2121
Devin Heitmueller19859222009-06-19 00:33:54 -03002122 [EM2882_BOARD_EVGA_INDTUBE] = {
2123 .name = "Evga inDtube",
2124 .tuner_type = TUNER_XC2028,
2125 .tuner_gpio = default_tuner_gpio,
2126 .decoder = EM28XX_TVP5150,
Devin Heitmuellera4c47302009-06-20 21:34:42 -03002127 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, /* NEC IR */
Devin Heitmueller19859222009-06-19 00:33:54 -03002128 .mts_firmware = 1,
2129 .has_dvb = 1,
2130 .dvb_gpio = evga_indtube_digital,
Mauro Carvalho Chehab02858ee2010-04-02 20:01:00 -03002131 .ir_codes = RC_MAP_EVGA_INDTUBE,
Devin Heitmueller19859222009-06-19 00:33:54 -03002132 .input = { {
2133 .type = EM28XX_VMUX_TELEVISION,
2134 .vmux = TVP5150_COMPOSITE0,
2135 .amux = EM28XX_AMUX_VIDEO,
2136 .gpio = evga_indtube_analog,
2137 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02002138 .type = EM28XX_VMUX_COMPOSITE,
Devin Heitmueller19859222009-06-19 00:33:54 -03002139 .vmux = TVP5150_COMPOSITE1,
2140 .amux = EM28XX_AMUX_LINE_IN,
2141 .gpio = evga_indtube_analog,
2142 }, {
2143 .type = EM28XX_VMUX_SVIDEO,
2144 .vmux = TVP5150_SVIDEO,
2145 .amux = EM28XX_AMUX_LINE_IN,
2146 .gpio = evga_indtube_analog,
2147 } },
2148 },
Antti Palosaari285eb1a2009-09-15 14:42:13 -03002149 /* eb1a:2868 Empia EM2870 + Philips CU1216L NIM (Philips TDA10023 +
2150 Infineon TUA6034) */
2151 [EM2870_BOARD_REDDO_DVB_C_USB_BOX] = {
2152 .name = "Reddo DVB-C USB TV Box",
2153 .tuner_type = TUNER_ABSENT,
Antti Palosaari28f4ddd12009-10-04 12:59:35 -03002154 .tuner_gpio = reddo_dvb_c_usb_box,
Antti Palosaari285eb1a2009-09-15 14:42:13 -03002155 .has_dvb = 1,
Antti Palosaari285eb1a2009-09-15 14:42:13 -03002156 },
Jarod Wilson7e48b302010-03-07 17:55:43 -03002157 /* 1b80:a340 - Empia EM2870, NXP TDA18271HD and LG DT3304, sold
2158 * initially as the KWorld PlusTV 340U, then as the UB435-Q.
2159 * Early variants have a TDA18271HD/C1, later ones a TDA18271HD/C2 */
2160 [EM2870_BOARD_KWORLD_A340] = {
2161 .name = "KWorld PlusTV 340U or UB435-Q (ATSC)",
2162 .tuner_type = TUNER_ABSENT, /* Digital-only TDA18271HD */
2163 .has_dvb = 1,
2164 .dvb_gpio = kworld_a340_digital,
2165 .tuner_gpio = default_tuner_gpio,
2166 },
Antti Palosaari460312e2011-05-25 17:03:50 -03002167 /* 2013:024f PCTV nanoStick T2 290e.
Antti Palosaarid6a5f922011-04-07 16:34:44 -03002168 * Empia EM28174, Sony CXD2820R and NXP TDA18271HD/C2 */
2169 [EM28174_BOARD_PCTV_290E] = {
Antti Palosaari460312e2011-05-25 17:03:50 -03002170 .name = "PCTV nanoStick T2 290e",
Mauro Carvalho Chehab3aa2b3b2013-03-05 06:55:27 -03002171 .def_i2c_bus = 1,
2172 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | EM28XX_I2C_FREQ_100_KHZ,
Antti Palosaarid6a5f922011-04-07 16:34:44 -03002173 .tuner_type = TUNER_ABSENT,
2174 .tuner_gpio = pctv_290e,
2175 .has_dvb = 1,
Antti Palosaariff7b9292011-05-25 17:00:35 -03002176 .ir_codes = RC_MAP_PINNACLE_PCTV_HD,
Antti Palosaarid6a5f922011-04-07 16:34:44 -03002177 },
Antti Palosaari36588712011-08-01 01:15:30 -03002178 /* 2013:024f PCTV DVB-S2 Stick 460e
2179 * Empia EM28174, NXP TDA10071, Conexant CX24118A and Allegro A8293 */
2180 [EM28174_BOARD_PCTV_460E] = {
Mauro Carvalho Chehab3aa2b3b2013-03-05 06:55:27 -03002181 .def_i2c_bus = 1,
2182 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | EM28XX_I2C_FREQ_400_KHZ,
Antti Palosaari36588712011-08-01 01:15:30 -03002183 .name = "PCTV DVB-S2 Stick (460e)",
2184 .tuner_type = TUNER_ABSENT,
2185 .tuner_gpio = pctv_460e,
2186 .has_dvb = 1,
2187 .ir_codes = RC_MAP_PINNACLE_PCTV_HD,
2188 },
Gareth Williams4d28d3d2011-12-24 05:47:29 -03002189 /* eb1a:5006 Honestech VIDBOX NW03
2190 * Empia EM2860, Philips SAA7113, Empia EMP202, No Tuner */
2191 [EM2860_BOARD_HT_VIDBOX_NW03] = {
2192 .name = "Honestech Vidbox NW03",
2193 .tuner_type = TUNER_ABSENT,
2194 .decoder = EM28XX_SAA711X,
2195 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02002196 .type = EM28XX_VMUX_COMPOSITE,
Gareth Williams4d28d3d2011-12-24 05:47:29 -03002197 .vmux = SAA7115_COMPOSITE0,
2198 .amux = EM28XX_AMUX_LINE_IN,
2199 }, {
2200 .type = EM28XX_VMUX_SVIDEO,
2201 .vmux = SAA7115_SVIDEO3, /* S-VIDEO needs confirming */
2202 .amux = EM28XX_AMUX_LINE_IN,
2203 } },
2204 },
Antti Palosaari35530852012-03-18 18:09:01 -03002205 /* 1b80:e425 MaxMedia UB425-TC
2206 * Empia EM2874B + Micronas DRX 3913KA2 + NXP TDA18271HDC2 */
2207 [EM2874_BOARD_MAXMEDIA_UB425_TC] = {
2208 .name = "MaxMedia UB425-TC",
2209 .tuner_type = TUNER_ABSENT,
2210 .tuner_gpio = maxmedia_ub425_tc,
2211 .has_dvb = 1,
Antti Palosaari831378d2013-04-12 13:59:03 -03002212 .ir_codes = RC_MAP_REDDO,
Mauro Carvalho Chehab3aa2b3b2013-03-05 06:55:27 -03002213 .def_i2c_bus = 1,
2214 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
Antti Palosaari35530852012-03-18 18:09:01 -03002215 EM28XX_I2C_FREQ_400_KHZ,
2216 },
Ivan Kalvachevfa5527c2012-03-19 20:09:55 -03002217 /* 2304:0242 PCTV QuatroStick (510e)
2218 * Empia EM2884 + Micronas DRX 3926K + NXP TDA18271HDC2 */
2219 [EM2884_BOARD_PCTV_510E] = {
2220 .name = "PCTV QuatroStick (510e)",
2221 .tuner_type = TUNER_ABSENT,
2222 .tuner_gpio = pctv_510e,
2223 .has_dvb = 1,
2224 .ir_codes = RC_MAP_PINNACLE_PCTV_HD,
Mauro Carvalho Chehab3aa2b3b2013-03-05 06:55:27 -03002225 .def_i2c_bus = 1,
2226 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
Ivan Kalvachevfa5527c2012-03-19 20:09:55 -03002227 EM28XX_I2C_FREQ_400_KHZ,
2228 },
Antti Palosaaric247d7b2012-03-19 11:48:19 -03002229 /* 2013:0251 PCTV QuatroStick nano (520e)
2230 * Empia EM2884 + Micronas DRX 3926K + NXP TDA18271HDC2 */
2231 [EM2884_BOARD_PCTV_520E] = {
2232 .name = "PCTV QuatroStick nano (520e)",
2233 .tuner_type = TUNER_ABSENT,
2234 .tuner_gpio = pctv_520e,
2235 .has_dvb = 1,
2236 .ir_codes = RC_MAP_PINNACLE_PCTV_HD,
Mauro Carvalho Chehab3aa2b3b2013-03-05 06:55:27 -03002237 .def_i2c_bus = 1,
2238 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
Antti Palosaaric247d7b2012-03-19 11:48:19 -03002239 EM28XX_I2C_FREQ_400_KHZ,
2240 },
Martin Blumenstingl89040132012-10-04 14:22:54 -03002241 [EM2884_BOARD_TERRATEC_HTC_USB_XS] = {
2242 .name = "Terratec Cinergy HTC USB XS",
2243 .has_dvb = 1,
2244 .ir_codes = RC_MAP_NEC_TERRATEC_CINERGY_XS,
2245 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab3aa2b3b2013-03-05 06:55:27 -03002246 .def_i2c_bus = 1,
2247 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
Martin Blumenstingl89040132012-10-04 14:22:54 -03002248 EM28XX_I2C_FREQ_400_KHZ,
2249 },
Jakob Haufe7c1dfdb2013-04-13 11:03:37 -03002250 /* 1b80:e1cc Delock 61959
2251 * Empia EM2874B + Micronas DRX 3913KA2 + NXP TDA18271HDC2
Mauro Carvalho Chehabce679432013-12-22 13:13:41 -03002252 * mostly the same as MaxMedia UB-425-TC but different remote */
Jakob Haufe7c1dfdb2013-04-13 11:03:37 -03002253 [EM2874_BOARD_DELOCK_61959] = {
2254 .name = "Delock 61959",
2255 .tuner_type = TUNER_ABSENT,
2256 .tuner_gpio = maxmedia_ub425_tc,
2257 .has_dvb = 1,
2258 .ir_codes = RC_MAP_DELOCK_61959,
2259 .def_i2c_bus = 1,
2260 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
2261 EM28XX_I2C_FREQ_400_KHZ,
2262 },
Jean-Francois Thibert6dbea9f2013-10-09 11:18:05 -03002263 /*
2264 * 1b80:e346 KWorld USB ATSC TV Stick UB435-Q V2
2265 * Empia EM2874B + LG DT3305 + NXP TDA18271HDC2
2266 */
2267 [EM2874_BOARD_KWORLD_UB435Q_V2] = {
2268 .name = "KWorld USB ATSC TV Stick UB435-Q V2",
2269 .tuner_type = TUNER_ABSENT,
2270 .has_dvb = 1,
2271 .dvb_gpio = kworld_a340_digital,
2272 .tuner_gpio = default_tuner_gpio,
2273 .def_i2c_bus = 1,
2274 },
Mauro Carvalho Chehab02bc1f52014-03-03 16:28:39 -03002275 /*
2276 * 1b80:e34c KWorld USB ATSC TV Stick UB435-Q V3
2277 * Empia EM2874B + LG DT3305 + NXP TDA18271HDC2
2278 */
2279 [EM2874_BOARD_KWORLD_UB435Q_V3] = {
2280 .name = "KWorld USB ATSC TV Stick UB435-Q V3",
2281 .tuner_type = TUNER_ABSENT,
2282 .has_dvb = 1,
2283 .tuner_gpio = kworld_ub435q_v3_digital,
2284 .def_i2c_bus = 1,
2285 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
2286 EM28XX_I2C_FREQ_100_KHZ,
Mauro Carvalho Chehab59432be2014-03-04 12:34:34 -03002287 .leds = kworld_ub435q_v3_leds,
Mauro Carvalho Chehab02bc1f52014-03-03 16:28:39 -03002288 },
Devin Heitmueller38b2df92012-08-13 21:18:02 -03002289 [EM2874_BOARD_PCTV_HD_MINI_80E] = {
2290 .name = "Pinnacle PCTV HD Mini",
2291 .tuner_type = TUNER_ABSENT,
2292 .has_dvb = 1,
2293 .dvb_gpio = em2874_pctv_80e_digital,
2294 .decoder = EM28XX_NODECODER,
Mauro Carvalho Chehab959505b2014-01-19 07:15:11 -03002295 .ir_codes = RC_MAP_PINNACLE_PCTV_HD,
Mauro Carvalho Chehab88e4fcd2014-03-04 20:49:07 -03002296 .leds = pctv_80e_leds,
Devin Heitmueller38b2df92012-08-13 21:18:02 -03002297 },
Frank Schaefer0c37e732013-12-01 18:06:57 -03002298 /* 1ae7:9003/9004 SpeedLink Vicious And Devine Laplace webcam
2299 * Empia EM2765 + OmniVision OV2640 */
2300 [EM2765_BOARD_SPEEDLINK_VAD_LAPLACE] = {
2301 .name = "SpeedLink Vicious And Devine Laplace webcam",
2302 .xclk = EM28XX_XCLK_FREQUENCY_24MHZ,
2303 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
2304 EM28XX_I2C_FREQ_100_KHZ,
2305 .def_i2c_bus = 1,
2306 .tuner_type = TUNER_ABSENT,
2307 .is_webcam = 1,
2308 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02002309 .type = EM28XX_VMUX_COMPOSITE,
Frank Schaefer0c37e732013-12-01 18:06:57 -03002310 .amux = EM28XX_AMUX_VIDEO,
2311 .gpio = speedlink_vad_laplace_reg_seq,
2312 } },
2313 .buttons = speedlink_vad_laplace_buttons,
2314 .leds = speedlink_vad_laplace_leds,
2315 },
Antti Palosaariec573362013-02-25 09:01:13 -03002316 /* 2013:0258 PCTV DVB-S2 Stick (461e)
2317 * Empia EM28178, Montage M88DS3103, Montage M88TS2022, Allegro A8293 */
2318 [EM28178_BOARD_PCTV_461E] = {
2319 .def_i2c_bus = 1,
2320 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | EM28XX_I2C_FREQ_400_KHZ,
2321 .name = "PCTV DVB-S2 Stick (461e)",
2322 .tuner_type = TUNER_ABSENT,
2323 .tuner_gpio = pctv_461e,
2324 .has_dvb = 1,
2325 .ir_codes = RC_MAP_PINNACLE_PCTV_HD,
2326 },
Antti Palosaari19229242014-04-10 22:11:27 -03002327 /* 2013:025f PCTV tripleStick (292e).
2328 * Empia EM28178, Silicon Labs Si2168, Silicon Labs Si2157 */
2329 [EM28178_BOARD_PCTV_292E] = {
2330 .name = "PCTV tripleStick (292e)",
2331 .def_i2c_bus = 1,
2332 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | EM28XX_I2C_FREQ_400_KHZ,
2333 .tuner_type = TUNER_ABSENT,
2334 .tuner_gpio = pctv_292e,
2335 .has_dvb = 1,
2336 .ir_codes = RC_MAP_PINNACLE_PCTV_HD,
2337 },
Witold Krecickieace9722014-10-19 19:25:59 -03002338 [EM2861_BOARD_LEADTEK_VC100] = {
2339 .name = "Leadtek VC100",
2340 .tuner_type = TUNER_ABSENT, /* Capture only device */
2341 .decoder = EM28XX_TVP5150,
2342 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02002343 .type = EM28XX_VMUX_COMPOSITE,
Witold Krecickieace9722014-10-19 19:25:59 -03002344 .vmux = TVP5150_COMPOSITE1,
2345 .amux = EM28XX_AMUX_LINE_IN,
2346 }, {
2347 .type = EM28XX_VMUX_SVIDEO,
2348 .vmux = TVP5150_SVIDEO,
2349 .amux = EM28XX_AMUX_LINE_IN,
2350 } },
2351 },
Olli Salonenfc30dd762014-11-24 03:57:34 -03002352 /* eb1a:8179 Terratec Cinergy T2 Stick HD.
2353 * Empia EM28178, Silicon Labs Si2168, Silicon Labs Si2146 */
2354 [EM28178_BOARD_TERRATEC_T2_STICK_HD] = {
2355 .name = "Terratec Cinergy T2 Stick HD",
2356 .def_i2c_bus = 1,
2357 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | EM28XX_I2C_FREQ_400_KHZ,
2358 .tuner_type = TUNER_ABSENT,
2359 .tuner_gpio = terratec_t2_stick_hd,
2360 .has_dvb = 1,
2361 .ir_codes = RC_MAP_TERRATEC_SLIM_2,
2362 },
Satoshi Nagahamaab4d1452016-05-06 16:35:05 -03002363
2364 /*
2365 * 3275:0085 PLEX PX-BCUD.
2366 * Empia EM28178, TOSHIBA TC90532XBG, Sharp QM1D1C0042
2367 */
2368 [EM28178_BOARD_PLEX_PX_BCUD] = {
2369 .name = "PLEX PX-BCUD",
2370 .xclk = EM28XX_XCLK_FREQUENCY_4_3MHZ,
2371 .def_i2c_bus = 1,
2372 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE,
2373 .tuner_type = TUNER_ABSENT,
2374 .tuner_gpio = plex_px_bcud,
2375 .has_dvb = 1,
2376 },
Olli Salonen11a2a942016-04-04 12:12:52 -03002377 /*
2378 * 2040:0265 Hauppauge WinTV-dualHD (DVB version).
2379 * Empia EM28274, 2x Silicon Labs Si2168, 2x Silicon Labs Si2157
2380 */
2381 [EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB] = {
2382 .name = "Hauppauge WinTV-dualHD DVB",
2383 .def_i2c_bus = 1,
2384 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
2385 EM28XX_I2C_FREQ_400_KHZ,
2386 .tuner_type = TUNER_ABSENT,
2387 .tuner_gpio = hauppauge_dualhd_dvb,
2388 .has_dvb = 1,
2389 .ir_codes = RC_MAP_HAUPPAUGE,
2390 .leds = hauppauge_dualhd_leds,
2391 },
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08002392};
Mauro Carvalho Chehab01c28192013-12-22 13:27:02 -03002393EXPORT_SYMBOL_GPL(em28xx_boards);
2394
Hans Verkuil4a9e5122014-08-21 16:43:03 -03002395static const unsigned int em28xx_bcount = ARRAY_SIZE(em28xx_boards);
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08002396
2397/* table of devices that work with this driver */
Nicola Soranzoa1a6ee72009-02-10 23:28:24 -03002398struct usb_device_id em28xx_id_table[] = {
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03002399 { USB_DEVICE(0xeb1a, 0x2750),
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002400 .driver_info = EM2750_BOARD_UNKNOWN },
2401 { USB_DEVICE(0xeb1a, 0x2751),
2402 .driver_info = EM2750_BOARD_UNKNOWN },
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03002403 { USB_DEVICE(0xeb1a, 0x2800),
2404 .driver_info = EM2800_BOARD_UNKNOWN },
Mauro Carvalho Chehab9b4e8452009-08-07 12:08:02 -03002405 { USB_DEVICE(0xeb1a, 0x2710),
2406 .driver_info = EM2820_BOARD_UNKNOWN },
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03002407 { USB_DEVICE(0xeb1a, 0x2820),
2408 .driver_info = EM2820_BOARD_UNKNOWN },
2409 { USB_DEVICE(0xeb1a, 0x2821),
Devin Heitmuellerc665f4d2008-12-16 23:35:23 -03002410 .driver_info = EM2820_BOARD_UNKNOWN },
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03002411 { USB_DEVICE(0xeb1a, 0x2860),
2412 .driver_info = EM2820_BOARD_UNKNOWN },
2413 { USB_DEVICE(0xeb1a, 0x2861),
2414 .driver_info = EM2820_BOARD_UNKNOWN },
Devin Heitmuellerf91cb652009-09-30 22:44:19 -03002415 { USB_DEVICE(0xeb1a, 0x2862),
2416 .driver_info = EM2820_BOARD_UNKNOWN },
Devin Heitmueller443fed92010-03-19 23:53:12 -03002417 { USB_DEVICE(0xeb1a, 0x2863),
2418 .driver_info = EM2820_BOARD_UNKNOWN },
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03002419 { USB_DEVICE(0xeb1a, 0x2870),
2420 .driver_info = EM2820_BOARD_UNKNOWN },
2421 { USB_DEVICE(0xeb1a, 0x2881),
2422 .driver_info = EM2820_BOARD_UNKNOWN },
2423 { USB_DEVICE(0xeb1a, 0x2883),
2424 .driver_info = EM2820_BOARD_UNKNOWN },
Antti Palosaari285eb1a2009-09-15 14:42:13 -03002425 { USB_DEVICE(0xeb1a, 0x2868),
2426 .driver_info = EM2820_BOARD_UNKNOWN },
Mauro Carvalho Chehabca3dfd62010-09-10 17:29:14 -03002427 { USB_DEVICE(0xeb1a, 0x2875),
2428 .driver_info = EM2820_BOARD_UNKNOWN },
Hans Verkuile22eca72014-05-27 04:12:19 -03002429 { USB_DEVICE(0xeb1a, 0x2885), /* MSI Digivox Trio */
2430 .driver_info = EM2884_BOARD_TERRATEC_H5 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002431 { USB_DEVICE(0xeb1a, 0xe300),
2432 .driver_info = EM2861_BOARD_KWORLD_PVRTV_300U },
Mauro Carvalho Chehab0bf4f6c2009-02-11 14:13:20 -03002433 { USB_DEVICE(0xeb1a, 0xe303),
2434 .driver_info = EM2860_BOARD_KAIOMY_TVNPC_U2 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002435 { USB_DEVICE(0xeb1a, 0xe305),
2436 .driver_info = EM2880_BOARD_KWORLD_DVB_305U },
2437 { USB_DEVICE(0xeb1a, 0xe310),
2438 .driver_info = EM2880_BOARD_MSI_DIGIVOX_AD },
Franklin Mengd7de5d82009-06-06 17:05:02 -03002439 { USB_DEVICE(0xeb1a, 0xa313),
2440 .driver_info = EM2882_BOARD_KWORLD_ATSC_315U },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002441 { USB_DEVICE(0xeb1a, 0xa316),
Robert Krakora6e7b9ea2009-01-18 21:59:34 -03002442 .driver_info = EM2883_BOARD_KWORLD_HYBRID_330U },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002443 { USB_DEVICE(0xeb1a, 0xe320),
2444 .driver_info = EM2880_BOARD_MSI_DIGIVOX_AD_II },
2445 { USB_DEVICE(0xeb1a, 0xe323),
2446 .driver_info = EM2882_BOARD_KWORLD_VS_DVBT },
2447 { USB_DEVICE(0xeb1a, 0xe350),
2448 .driver_info = EM2870_BOARD_KWORLD_350U },
2449 { USB_DEVICE(0xeb1a, 0xe355),
2450 .driver_info = EM2870_BOARD_KWORLD_355U },
2451 { USB_DEVICE(0xeb1a, 0x2801),
2452 .driver_info = EM2800_BOARD_GRABBEEX_USB2800 },
2453 { USB_DEVICE(0xeb1a, 0xe357),
2454 .driver_info = EM2870_BOARD_KWORLD_355U },
Aivar Päkk1985f6f2011-12-11 18:15:00 -03002455 { USB_DEVICE(0xeb1a, 0xe359),
2456 .driver_info = EM2870_BOARD_KWORLD_355U },
Douglas Schilling Landgrafac40d9e2009-02-25 16:55:48 -03002457 { USB_DEVICE(0x1b80, 0xe302),
2458 .driver_info = EM2820_BOARD_PINNACLE_DVC_90 }, /* Kaiser Baas Video to DVD maker */
Douglas Schilling Landgrafea476892009-09-06 18:41:59 -03002459 { USB_DEVICE(0x1b80, 0xe304),
2460 .driver_info = EM2820_BOARD_PINNACLE_DVC_90 }, /* Kworld DVD Maker 2 */
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03002461 { USB_DEVICE(0x0ccd, 0x0036),
2462 .driver_info = EM2820_BOARD_TERRATEC_CINERGY_250 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002463 { USB_DEVICE(0x0ccd, 0x004c),
2464 .driver_info = EM2880_BOARD_TERRATEC_HYBRID_XS_FR },
2465 { USB_DEVICE(0x0ccd, 0x004f),
2466 .driver_info = EM2860_BOARD_TERRATEC_HYBRID_XS },
2467 { USB_DEVICE(0x0ccd, 0x005e),
2468 .driver_info = EM2882_BOARD_TERRATEC_HYBRID_XS },
2469 { USB_DEVICE(0x0ccd, 0x0042),
Philippe Bourdin91245442010-10-31 09:57:58 -03002470 .driver_info = EM2882_BOARD_TERRATEC_HYBRID_XS },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002471 { USB_DEVICE(0x0ccd, 0x0043),
Alberto Mardegan8c473112015-10-27 17:24:14 -02002472 .driver_info = EM2870_BOARD_TERRATEC_XS_MT2060 },
Holger Nelson6c3b9062011-12-23 23:15:32 -03002473 { USB_DEVICE(0x0ccd, 0x008e), /* Cinergy HTC USB XS Rev. 1 */
Martin Blumenstingl89040132012-10-04 14:22:54 -03002474 .driver_info = EM2884_BOARD_TERRATEC_HTC_USB_XS },
Holger Nelson6c3b9062011-12-23 23:15:32 -03002475 { USB_DEVICE(0x0ccd, 0x00ac), /* Cinergy HTC USB XS Rev. 2 */
Martin Blumenstingl89040132012-10-04 14:22:54 -03002476 .driver_info = EM2884_BOARD_TERRATEC_HTC_USB_XS },
Mauro Carvalho Chehab4e145342011-11-16 14:38:28 -02002477 { USB_DEVICE(0x0ccd, 0x10a2), /* H5 Rev. 1 */
Mauro Carvalho Chehabfec528b2011-07-03 21:05:06 -03002478 .driver_info = EM2884_BOARD_TERRATEC_H5 },
Mauro Carvalho Chehab4e145342011-11-16 14:38:28 -02002479 { USB_DEVICE(0x0ccd, 0x10ad), /* H5 Rev. 2 */
Mauro Carvalho Chehab33ba28e2011-07-14 21:48:00 -03002480 .driver_info = EM2884_BOARD_TERRATEC_H5 },
Roland Scheidegger676fa7d2013-02-08 21:08:55 -03002481 { USB_DEVICE(0x0ccd, 0x10b6), /* H5 Rev. 3 */
2482 .driver_info = EM2884_BOARD_TERRATEC_H5 },
Mauro Carvalho Chehab766ed642009-05-24 00:46:01 -03002483 { USB_DEVICE(0x0ccd, 0x0084),
2484 .driver_info = EM2860_BOARD_TERRATEC_AV350 },
Mauro Carvalho Chehab4557af92009-05-23 09:58:52 -03002485 { USB_DEVICE(0x0ccd, 0x0096),
2486 .driver_info = EM2860_BOARD_TERRATEC_GRABBY },
Tekaefabaaf2011-10-14 05:40:29 -03002487 { USB_DEVICE(0x0ccd, 0x10AF),
2488 .driver_info = EM2860_BOARD_TERRATEC_GRABBY },
Andreas Oberrittera1ed02e2011-11-16 11:06:50 -03002489 { USB_DEVICE(0x0ccd, 0x00b2),
2490 .driver_info = EM2884_BOARD_CINERGY_HTC_STICK },
Gilles Risch1fe0fbd2015-03-01 17:11:05 -03002491 { USB_DEVICE(0x0fd9, 0x0018),
2492 .driver_info = EM2884_BOARD_ELGATO_EYETV_HYBRID_2008 },
Adrian Taylor8298f2f2010-10-20 07:55:33 -03002493 { USB_DEVICE(0x0fd9, 0x0033),
Gilles Risch1fe0fbd2015-03-01 17:11:05 -03002494 .driver_info = EM2860_BOARD_ELGATO_VIDEO_CAPTURE },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002495 { USB_DEVICE(0x185b, 0x2870),
2496 .driver_info = EM2870_BOARD_COMPRO_VIDEOMATE },
Vitaly Woold3603342008-07-27 14:10:11 -03002497 { USB_DEVICE(0x185b, 0x2041),
Mauro Carvalho Chehabee281b82008-07-27 16:58:04 -03002498 .driver_info = EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU },
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03002499 { USB_DEVICE(0x2040, 0x4200),
2500 .driver_info = EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 },
Mauro Carvalho Chehab15b9bec2008-01-13 12:02:20 -03002501 { USB_DEVICE(0x2040, 0x4201),
2502 .driver_info = EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 },
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03002503 { USB_DEVICE(0x2040, 0x6500),
2504 .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900 },
Luc Saillard427d20c2008-01-30 17:23:00 -03002505 { USB_DEVICE(0x2040, 0x6502),
Devin Heitmueller17d9d552008-06-08 10:22:03 -03002506 .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2 },
Michael Krufky74ee0512008-05-01 18:02:30 -03002507 { USB_DEVICE(0x2040, 0x6513), /* HCW HVR-980 */
Mauro Carvalho Chehab10ac6602008-07-27 14:58:58 -03002508 .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 },
Michael Krufky74ee0512008-05-01 18:02:30 -03002509 { USB_DEVICE(0x2040, 0x6517), /* HP HVR-950 */
Mauro Carvalho Chehab10ac6602008-07-27 14:58:58 -03002510 .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 },
Michael Krufky74ee0512008-05-01 18:02:30 -03002511 { USB_DEVICE(0x2040, 0x651b), /* RP HVR-950 */
Mauro Carvalho Chehab10ac6602008-07-27 14:58:58 -03002512 .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 },
Douglas Schilling Landgraff89bc322008-12-01 21:01:04 -03002513 { USB_DEVICE(0x2040, 0x651f),
2514 .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850 },
Olli Salonen11a2a942016-04-04 12:12:52 -03002515 { USB_DEVICE(0x2040, 0x0265),
2516 .driver_info = EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB },
Devin Heitmuellere14b3652008-07-26 11:04:33 -03002517 { USB_DEVICE(0x0438, 0xb002),
2518 .driver_info = EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002519 { USB_DEVICE(0x2001, 0xf112),
2520 .driver_info = EM2820_BOARD_DLINK_USB_TV },
2521 { USB_DEVICE(0x2304, 0x0207),
2522 .driver_info = EM2820_BOARD_PINNACLE_DVC_90 },
2523 { USB_DEVICE(0x2304, 0x0208),
2524 .driver_info = EM2820_BOARD_PINNACLE_USB_2 },
2525 { USB_DEVICE(0x2304, 0x021a),
2526 .driver_info = EM2820_BOARD_PINNACLE_DVC_90 },
2527 { USB_DEVICE(0x2304, 0x0226),
Devin Heitmueller09bc1942011-03-13 02:07:54 -03002528 .driver_info = EM2882_BOARD_PINNACLE_HYBRID_PRO_330E },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002529 { USB_DEVICE(0x2304, 0x0227),
2530 .driver_info = EM2880_BOARD_PINNACLE_PCTV_HD_PRO },
Devin Heitmueller38b2df92012-08-13 21:18:02 -03002531 { USB_DEVICE(0x2304, 0x023f),
2532 .driver_info = EM2874_BOARD_PCTV_HD_MINI_80E },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002533 { USB_DEVICE(0x0413, 0x6023),
2534 .driver_info = EM2800_BOARD_LEADTEK_WINFAST_USBII },
Don Kramer74e07f32012-01-02 16:15:44 -03002535 { USB_DEVICE(0x093b, 0xa003),
2536 .driver_info = EM2820_BOARD_PINNACLE_DVC_90 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002537 { USB_DEVICE(0x093b, 0xa005),
2538 .driver_info = EM2861_BOARD_PLEXTOR_PX_TV100U },
Indika Katugampalaf74a61e32009-02-11 11:13:05 -03002539 { USB_DEVICE(0x04bb, 0x0515),
2540 .driver_info = EM2820_BOARD_IODATA_GVMVP_SZ },
Zhenyu Wang7c8b5672009-07-05 10:51:21 -03002541 { USB_DEVICE(0xeb1a, 0x50a6),
2542 .driver_info = EM2860_BOARD_GADMEI_UTV330 },
Jarod Wilson7e48b302010-03-07 17:55:43 -03002543 { USB_DEVICE(0x1b80, 0xa340),
2544 .driver_info = EM2870_BOARD_KWORLD_A340 },
Jean-Francois Thibert6dbea9f2013-10-09 11:18:05 -03002545 { USB_DEVICE(0x1b80, 0xe346),
2546 .driver_info = EM2874_BOARD_KWORLD_UB435Q_V2 },
Mauro Carvalho Chehab02bc1f52014-03-03 16:28:39 -03002547 { USB_DEVICE(0x1b80, 0xe34c),
2548 .driver_info = EM2874_BOARD_KWORLD_UB435Q_V3 },
Antti Palosaarid6a5f922011-04-07 16:34:44 -03002549 { USB_DEVICE(0x2013, 0x024f),
2550 .driver_info = EM28174_BOARD_PCTV_290E },
Antti Palosaari36588712011-08-01 01:15:30 -03002551 { USB_DEVICE(0x2013, 0x024c),
2552 .driver_info = EM28174_BOARD_PCTV_460E },
Eddi De Pieri82e7dbb2011-11-19 11:37:14 -03002553 { USB_DEVICE(0x2040, 0x1605),
2554 .driver_info = EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C },
Mauro Carvalho Chehab4159d012013-02-28 10:35:56 -03002555 { USB_DEVICE(0x1b80, 0xe755),
2556 .driver_info = EM2884_BOARD_C3TECH_DIGITAL_DUO },
Gareth Williams4d28d3d2011-12-24 05:47:29 -03002557 { USB_DEVICE(0xeb1a, 0x5006),
2558 .driver_info = EM2860_BOARD_HT_VIDBOX_NW03 },
Mario Ceresa2f786042012-01-06 16:00:12 -03002559 { USB_DEVICE(0x1b80, 0xe309), /* Sveon STV40 */
2560 .driver_info = EM2860_BOARD_EASYCAP },
Antti Palosaari35530852012-03-18 18:09:01 -03002561 { USB_DEVICE(0x1b80, 0xe425),
2562 .driver_info = EM2874_BOARD_MAXMEDIA_UB425_TC },
Ivan Kalvachevfa5527c2012-03-19 20:09:55 -03002563 { USB_DEVICE(0x2304, 0x0242),
2564 .driver_info = EM2884_BOARD_PCTV_510E },
Antti Palosaaric247d7b2012-03-19 11:48:19 -03002565 { USB_DEVICE(0x2013, 0x0251),
2566 .driver_info = EM2884_BOARD_PCTV_520E },
Jakob Haufe7c1dfdb2013-04-13 11:03:37 -03002567 { USB_DEVICE(0x1b80, 0xe1cc),
2568 .driver_info = EM2874_BOARD_DELOCK_61959 },
Frank Schaefer0c37e732013-12-01 18:06:57 -03002569 { USB_DEVICE(0x1ae7, 0x9003),
2570 .driver_info = EM2765_BOARD_SPEEDLINK_VAD_LAPLACE },
2571 { USB_DEVICE(0x1ae7, 0x9004),
2572 .driver_info = EM2765_BOARD_SPEEDLINK_VAD_LAPLACE },
Antti Palosaariec573362013-02-25 09:01:13 -03002573 { USB_DEVICE(0x2013, 0x0258),
2574 .driver_info = EM28178_BOARD_PCTV_461E },
Antti Palosaari19229242014-04-10 22:11:27 -03002575 { USB_DEVICE(0x2013, 0x025f),
2576 .driver_info = EM28178_BOARD_PCTV_292E },
Arno Bauernöppel1efc2172015-11-15 19:24:10 -02002577 { USB_DEVICE(0x2040, 0x0264), /* Hauppauge WinTV-soloHD */
2578 .driver_info = EM28178_BOARD_PCTV_292E },
Witold Krecickieace9722014-10-19 19:25:59 -03002579 { USB_DEVICE(0x0413, 0x6f07),
2580 .driver_info = EM2861_BOARD_LEADTEK_VC100 },
Olli Salonenfc30dd762014-11-24 03:57:34 -03002581 { USB_DEVICE(0xeb1a, 0x8179),
2582 .driver_info = EM28178_BOARD_TERRATEC_T2_STICK_HD },
Satoshi Nagahamaab4d1452016-05-06 16:35:05 -03002583 { USB_DEVICE(0x3275, 0x0085),
2584 .driver_info = EM28178_BOARD_PLEX_PX_BCUD },
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08002585 { },
2586};
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03002587MODULE_DEVICE_TABLE(usb, em28xx_id_table);
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08002588
Mauro Carvalho Chehab102a0b02008-04-17 21:40:45 -03002589/*
Mauro Carvalho Chehab102a0b02008-04-17 21:40:45 -03002590 * EEPROM hash table for devices with generic USB IDs
2591 */
Nicola Soranzoa1a6ee72009-02-10 23:28:24 -03002592static struct em28xx_hash_table em28xx_eeprom_hash[] = {
Mauro Carvalho Chehabea4fd562007-11-03 21:21:57 -03002593 /* P/N: SA 60002070465 Tuner: TVF7533-MF */
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03002594 {0x6ce05a8f, EM2820_BOARD_PROLINK_PLAYTV_USB2, TUNER_YMEC_TVF_5533MF},
Douglas Schilling Landgraf1e1addd2008-12-27 21:38:14 -03002595 {0x72cc5a8b, EM2820_BOARD_PROLINK_PLAYTV_BOX4_USB2, TUNER_YMEC_TVF_5533MF},
Darron Broadda3808e2008-09-30 02:46:41 -03002596 {0x966a0441, EM2880_BOARD_KWORLD_DVB_310U, TUNER_XC2028},
Douglas Schilling Landgrafa35c87c2009-08-06 12:52:11 -03002597 {0x166a0441, EM2880_BOARD_EMPIRE_DUAL_TV, TUNER_XC2028},
Devin Heitmueller19859222009-06-19 00:33:54 -03002598 {0xcee44a99, EM2882_BOARD_EVGA_INDTUBE, TUNER_XC2028},
Devin Heitmuellerd5b3ba92009-07-08 21:51:35 -03002599 {0xb8846b20, EM2881_BOARD_PINNACLE_HYBRID_PRO, TUNER_XC2028},
Antti Palosaari285eb1a2009-09-15 14:42:13 -03002600 {0x63f653bd, EM2870_BOARD_REDDO_DVB_C_USB_BOX, TUNER_ABSENT},
Andrea.Amorosi76@gmail.com7ca7ef62010-02-09 17:53:38 -03002601 {0x4e913442, EM2882_BOARD_DIKOM_DK300, TUNER_XC2028},
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002602};
2603
Mauro Carvalho Chehabd2ba0552007-11-04 08:32:42 -03002604/* I2C devicelist hash table for devices with generic USB IDs */
Sascha Sommerfad7b952007-11-04 08:06:48 -03002605static struct em28xx_hash_table em28xx_i2c_hash[] = {
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03002606 {0xb06a32c3, EM2800_BOARD_TERRATEC_CINERGY_200, TUNER_LG_PAL_NEW_TAPC},
2607 {0xf51200e3, EM2800_BOARD_VGEAR_POCKETTV, TUNER_LG_PAL_NEW_TAPC},
Devin Heitmueller3ed58ba2009-05-27 23:27:26 -03002608 {0x1ba50080, EM2860_BOARD_SAA711X_REFERENCE_DESIGN, TUNER_ABSENT},
Devin Heitmueller443fed92010-03-19 23:53:12 -03002609 {0x77800080, EM2860_BOARD_TVP5150_REFERENCE_DESIGN, TUNER_ABSENT},
Douglas Schilling Landgraff7fe3e62009-01-19 09:31:55 -03002610 {0xc51200e3, EM2820_BOARD_GADMEI_TVR200, TUNER_LG_PAL_NEW_TAPC},
Mauro Carvalho Chehab6d888a62009-08-30 13:05:56 -03002611 {0x4ba50080, EM2861_BOARD_GADMEI_UTV330PLUS, TUNER_TNF_5335MF},
Mauro Carvalho Chehabebaefdb2011-06-01 10:16:25 -03002612 {0x6b800080, EM2874_BOARD_LEADERSHIP_ISDBT, TUNER_ABSENT},
Sascha Sommerfad7b952007-11-04 08:06:48 -03002613};
Mauro Carvalho Chehabfdf1bc92014-11-28 08:34:15 -03002614
Frank Schaefer87b52432013-03-03 15:37:40 -03002615/* NOTE: introduce a separate hash table for devices with 16 bit eeproms */
Sascha Sommerfad7b952007-11-04 08:06:48 -03002616
Michael Krufkyd7cba042008-09-12 13:31:45 -03002617int em28xx_tuner_callback(void *ptr, int component, int command, int arg)
Mauro Carvalho Chehabee6e3a82008-04-17 21:37:31 -03002618{
Hans Verkuilbc3d2922013-03-22 09:54:00 -03002619 struct em28xx_i2c_bus *i2c_bus = ptr;
2620 struct em28xx *dev = i2c_bus->dev;
Mauro Carvalho Chehab102a0b02008-04-17 21:40:45 -03002621 int rc = 0;
Mauro Carvalho Chehabee6e3a82008-04-17 21:37:31 -03002622
Eddi De Pieri82e7dbb2011-11-19 11:37:14 -03002623 if (dev->tuner_type != TUNER_XC2028 && dev->tuner_type != TUNER_XC5000)
Mauro Carvalho Chehabee6e3a82008-04-17 21:37:31 -03002624 return 0;
2625
Eddi De Pieri82e7dbb2011-11-19 11:37:14 -03002626 if (command != XC2028_TUNER_RESET && command != XC5000_TUNER_RESET)
Mauro Carvalho Chehabee6e3a82008-04-17 21:37:31 -03002627 return 0;
2628
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03002629 rc = em28xx_gpio_set(dev, dev->board.tuner_gpio);
Mauro Carvalho Chehabee6e3a82008-04-17 21:37:31 -03002630
Mauro Carvalho Chehabee6e3a82008-04-17 21:37:31 -03002631 return rc;
2632}
2633EXPORT_SYMBOL_GPL(em28xx_tuner_callback);
2634
Nicola Soranzoa1a6ee72009-02-10 23:28:24 -03002635static inline void em28xx_set_model(struct em28xx *dev)
Mauro Carvalho Chehabee6e3a82008-04-17 21:37:31 -03002636{
Ezequiel Garciae0f6e4d2012-09-26 06:25:12 -03002637 dev->board = em28xx_boards[dev->model];
Devin Heitmuellered14e1c2008-12-29 22:27:30 -03002638
2639 /* Those are the default values for the majority of boards
2640 Use those values if not specified otherwise at boards entry
2641 */
2642 if (!dev->board.xclk)
2643 dev->board.xclk = EM28XX_XCLK_IR_RC5_MODE |
2644 EM28XX_XCLK_FREQUENCY_12MHZ;
2645
2646 if (!dev->board.i2c_speed)
2647 dev->board.i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
2648 EM28XX_I2C_FREQ_100_KHZ;
Mauro Carvalho Chehab3aa2b3b2013-03-05 06:55:27 -03002649
Mauro Carvalho Chehabaab31252013-03-05 06:55:28 -03002650 /* Should be initialized early, for I2C to work */
2651 dev->def_i2c_bus = dev->board.def_i2c_bus;
Mauro Carvalho Chehabee6e3a82008-04-17 21:37:31 -03002652}
2653
Matthieu Rogez0899f622016-03-04 18:33:08 -03002654/* Wait until AC97_RESET reports the expected value reliably before proceeding.
2655 * We also check that two unrelated registers accesses don't return the same
2656 * value to avoid premature return.
2657 * This procedure helps ensuring AC97 register accesses are reliable.
2658 */
2659static int em28xx_wait_until_ac97_features_equals(struct em28xx *dev,
2660 int expected_feat)
2661{
2662 unsigned long timeout = jiffies + msecs_to_jiffies(2000);
2663 int feat, powerdown;
2664
2665 while (time_is_after_jiffies(timeout)) {
2666 feat = em28xx_read_ac97(dev, AC97_RESET);
2667 if (feat < 0)
2668 return feat;
2669
2670 powerdown = em28xx_read_ac97(dev, AC97_POWERDOWN);
2671 if (powerdown < 0)
2672 return powerdown;
2673
2674 if (feat == expected_feat && feat != powerdown)
2675 return 0;
2676
2677 msleep(50);
2678 }
2679
2680 em28xx_warn("AC97 registers access is not reliable !\n");
2681 return -ETIMEDOUT;
2682}
2683
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002684/* Since em28xx_pre_card_setup() requires a proper dev->model,
2685 * this won't work for boards with generic PCI IDs
2686 */
Ezequiel Garcia60332f02012-04-28 09:57:01 -03002687static void em28xx_pre_card_setup(struct em28xx *dev)
Markus Rechbergera94e95b2006-01-23 17:11:10 -02002688{
Devin Heitmuellered14e1c2008-12-29 22:27:30 -03002689 /* Set the initial XCLK and I2C clock values based on the board
2690 definition */
Mauro Carvalho Chehab505b6d02008-11-25 09:39:50 -03002691 em28xx_write_reg(dev, EM28XX_R0F_XCLK, dev->board.xclk & 0x7f);
Sascha Sommerca80cf62012-01-08 16:32:09 -03002692 if (!dev->board.is_em2800)
2693 em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, dev->board.i2c_speed);
Mauro Carvalho Chehaba2070c62008-11-25 07:05:06 -03002694 msleep(50);
2695
Markus Rechbergera94e95b2006-01-23 17:11:10 -02002696 /* request some modules */
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03002697 switch (dev->model) {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002698 case EM2861_BOARD_PLEXTOR_PX_TV100U:
Mauro Carvalho Chehab0a6e44d2009-07-29 01:39:12 -03002699 /* Sets the msp34xx I2S speed */
2700 dev->i2s_speed = 2048000;
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002701 break;
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002702 case EM2861_BOARD_KWORLD_PVRTV_300U:
2703 case EM2880_BOARD_KWORLD_DVB_305U:
Frank Schaeferc074fc42013-06-03 14:12:03 -03002704 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0x6d);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002705 msleep(10);
Frank Schaeferc074fc42013-06-03 14:12:03 -03002706 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0x7d);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002707 msleep(10);
2708 break;
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002709 case EM2870_BOARD_COMPRO_VIDEOMATE:
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002710 /* TODO: someone can do some cleanup here...
2711 not everything's needed */
Devin Heitmueller6d676d82008-11-25 06:04:02 -03002712 em28xx_write_reg(dev, EM2880_R04_GPO, 0x00);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002713 msleep(10);
Devin Heitmueller6d676d82008-11-25 06:04:02 -03002714 em28xx_write_reg(dev, EM2880_R04_GPO, 0x01);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002715 msleep(10);
Frank Schaeferc074fc42013-06-03 14:12:03 -03002716 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfd);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002717 mdelay(70);
Frank Schaeferc074fc42013-06-03 14:12:03 -03002718 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfc);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002719 mdelay(70);
Frank Schaeferc074fc42013-06-03 14:12:03 -03002720 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xdc);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002721 mdelay(70);
Frank Schaeferc074fc42013-06-03 14:12:03 -03002722 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfc);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002723 mdelay(70);
2724 break;
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002725 case EM2870_BOARD_TERRATEC_XS_MT2060:
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002726 /* this device needs some gpio writes to get the DVB-T
2727 demod work */
Frank Schaeferc074fc42013-06-03 14:12:03 -03002728 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfe);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002729 mdelay(70);
Frank Schaeferc074fc42013-06-03 14:12:03 -03002730 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xde);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002731 mdelay(70);
Frank Schaeferc074fc42013-06-03 14:12:03 -03002732 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfe);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002733 mdelay(70);
2734 break;
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002735 case EM2870_BOARD_PINNACLE_PCTV_DVB:
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002736 /* this device needs some gpio writes to get the
2737 DVB-T demod work */
Frank Schaeferc074fc42013-06-03 14:12:03 -03002738 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfe);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002739 mdelay(70);
Frank Schaeferc074fc42013-06-03 14:12:03 -03002740 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xde);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002741 mdelay(70);
Frank Schaeferc074fc42013-06-03 14:12:03 -03002742 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfe);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002743 mdelay(70);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002744 break;
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002745 case EM2820_BOARD_GADMEI_UTV310:
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002746 case EM2820_BOARD_MSI_VOX_USB_2:
Mauro Carvalho Chehaba2070c62008-11-25 07:05:06 -03002747 /* enables audio for that devices */
Frank Schaeferc074fc42013-06-03 14:12:03 -03002748 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfd);
Mauro Carvalho Chehab102a0b02008-04-17 21:40:45 -03002749 break;
Mauro Carvalho Chehab0bf4f6c2009-02-11 14:13:20 -03002750
Franklin Mengd7de5d82009-06-06 17:05:02 -03002751 case EM2882_BOARD_KWORLD_ATSC_315U:
Frank Schaeferc074fc42013-06-03 14:12:03 -03002752 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xff);
Franklin Mengd7de5d82009-06-06 17:05:02 -03002753 msleep(10);
Frank Schaeferc074fc42013-06-03 14:12:03 -03002754 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfe);
Franklin Mengd7de5d82009-06-06 17:05:02 -03002755 msleep(10);
2756 em28xx_write_reg(dev, EM2880_R04_GPO, 0x00);
2757 msleep(10);
2758 em28xx_write_reg(dev, EM2880_R04_GPO, 0x08);
2759 msleep(10);
2760 break;
2761
Mauro Carvalho Chehab0bf4f6c2009-02-11 14:13:20 -03002762 case EM2860_BOARD_KAIOMY_TVNPC_U2:
2763 em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x07", 1);
2764 em28xx_write_regs(dev, EM28XX_R06_I2C_CLK, "\x40", 1);
2765 em28xx_write_regs(dev, 0x0d, "\x42", 1);
2766 em28xx_write_regs(dev, 0x08, "\xfd", 1);
2767 msleep(10);
2768 em28xx_write_regs(dev, 0x08, "\xff", 1);
2769 msleep(10);
2770 em28xx_write_regs(dev, 0x08, "\x7f", 1);
2771 msleep(10);
2772 em28xx_write_regs(dev, 0x08, "\x6b", 1);
2773
2774 break;
Mauro Carvalho Chehab56ee3802009-02-11 14:18:36 -03002775 case EM2860_BOARD_EASYCAP:
2776 em28xx_write_regs(dev, 0x08, "\xf8", 1);
2777 break;
2778
Indika Katugampalaf74a61e32009-02-11 11:13:05 -03002779 case EM2820_BOARD_IODATA_GVMVP_SZ:
Frank Schaeferc074fc42013-06-03 14:12:03 -03002780 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xff);
Indika Katugampalaf74a61e32009-02-11 11:13:05 -03002781 msleep(70);
Frank Schaeferc074fc42013-06-03 14:12:03 -03002782 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xf7);
Indika Katugampalaf74a61e32009-02-11 11:13:05 -03002783 msleep(10);
Frank Schaeferc074fc42013-06-03 14:12:03 -03002784 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfe);
Indika Katugampalaf74a61e32009-02-11 11:13:05 -03002785 msleep(70);
Frank Schaeferc074fc42013-06-03 14:12:03 -03002786 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfd);
Indika Katugampalaf74a61e32009-02-11 11:13:05 -03002787 msleep(70);
2788 break;
Matthieu Rogez0899f622016-03-04 18:33:08 -03002789
2790 case EM2860_BOARD_TERRATEC_GRABBY:
2791 /* HACK?: Ensure AC97 register reading is reliable before
2792 * proceeding. In practice, this will wait about 1.6 seconds.
2793 */
2794 em28xx_wait_until_ac97_features_equals(dev, 0x6a90);
2795 break;
Mauro Carvalho Chehab102a0b02008-04-17 21:40:45 -03002796 }
Mauro Carvalho Chehabc67ec532008-04-17 21:48:00 -03002797
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03002798 em28xx_gpio_set(dev, dev->board.tuner_gpio);
Mauro Carvalho Chehabc67ec532008-04-17 21:48:00 -03002799 em28xx_set_mode(dev, EM28XX_ANALOG_MODE);
2800
2801 /* Unlock device */
Mauro Carvalho Chehab2fe3e2e2008-11-27 09:10:40 -03002802 em28xx_set_mode(dev, EM28XX_SUSPEND);
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002803}
2804
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002805static int em28xx_hint_board(struct em28xx *dev)
2806{
2807 int i;
2808
Frank Schaefer2d466e12013-03-27 17:06:28 -03002809 if (dev->board.is_webcam) {
2810 if (dev->em28xx_sensor == EM28XX_MT9V011) {
2811 dev->model = EM2820_BOARD_SILVERCREST_WEBCAM;
2812 } else if (dev->em28xx_sensor == EM28XX_MT9M001 ||
2813 dev->em28xx_sensor == EM28XX_MT9M111) {
2814 dev->model = EM2750_BOARD_UNKNOWN;
2815 }
2816 /* FIXME: IMPROVE ! */
2817
2818 return 0;
2819 }
2820
Mauro Carvalho Chehabd2ba0552007-11-04 08:32:42 -03002821 /* HINT method: EEPROM
2822 *
2823 * This method works only for boards with eeprom.
2824 * Uses a hash of all eeprom bytes. The hash should be
2825 * unique for a vendor/tuner pair.
2826 * There are a high chance that tuners for different
2827 * video standards produce different hashes.
2828 */
2829 for (i = 0; i < ARRAY_SIZE(em28xx_eeprom_hash); i++) {
2830 if (dev->hash == em28xx_eeprom_hash[i].hash) {
2831 dev->model = em28xx_eeprom_hash[i].model;
2832 dev->tuner_type = em28xx_eeprom_hash[i].tuner;
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002833
2834 em28xx_errdev("Your board has no unique USB ID.\n");
Mauro Carvalho Chehab5ccb1972016-10-12 07:05:48 -03002835 em28xx_errdev("A hint were successfully done, based on eeprom hash.\n");
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002836 em28xx_errdev("This method is not 100%% failproof.\n");
Mauro Carvalho Chehab5ccb1972016-10-12 07:05:48 -03002837 em28xx_errdev("If the board were missdetected, please email this log to:\n");
2838 em28xx_errdev("\tV4L Mailing List <linux-media@vger.kernel.org>\n");
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002839 em28xx_errdev("Board detected as %s\n",
2840 em28xx_boards[dev->model].name);
2841
2842 return 0;
2843 }
2844 }
Sascha Sommerfad7b952007-11-04 08:06:48 -03002845
Mauro Carvalho Chehabd2ba0552007-11-04 08:32:42 -03002846 /* HINT method: I2C attached devices
2847 *
2848 * This method works for all boards.
2849 * Uses a hash of i2c scanned devices.
2850 * Devices with the same i2c attached chips will
2851 * be considered equal.
2852 * This method is less precise than the eeprom one.
2853 */
2854
Sascha Sommerfad7b952007-11-04 08:06:48 -03002855 /* user did not request i2c scanning => do it now */
2856 if (!dev->i2c_hash)
Mauro Carvalho Chehabaab31252013-03-05 06:55:28 -03002857 em28xx_do_i2c_scan(dev, dev->def_i2c_bus);
Sascha Sommerfad7b952007-11-04 08:06:48 -03002858
2859 for (i = 0; i < ARRAY_SIZE(em28xx_i2c_hash); i++) {
2860 if (dev->i2c_hash == em28xx_i2c_hash[i].hash) {
2861 dev->model = em28xx_i2c_hash[i].model;
2862 dev->tuner_type = em28xx_i2c_hash[i].tuner;
2863 em28xx_errdev("Your board has no unique USB ID.\n");
Mauro Carvalho Chehab5ccb1972016-10-12 07:05:48 -03002864 em28xx_errdev("A hint were successfully done, based on i2c devicelist hash.\n");
Sascha Sommerfad7b952007-11-04 08:06:48 -03002865 em28xx_errdev("This method is not 100%% failproof.\n");
Mauro Carvalho Chehab5ccb1972016-10-12 07:05:48 -03002866 em28xx_errdev("If the board were missdetected, please email this log to:\n");
2867 em28xx_errdev("\tV4L Mailing List <linux-media@vger.kernel.org>\n");
Sascha Sommerfad7b952007-11-04 08:06:48 -03002868 em28xx_errdev("Board detected as %s\n",
2869 em28xx_boards[dev->model].name);
2870
2871 return 0;
2872 }
2873 }
2874
Mauro Carvalho Chehab5ccb1972016-10-12 07:05:48 -03002875 em28xx_errdev("Your board has no unique USB ID and thus need a hint to be detected.\n");
2876 em28xx_errdev("You may try to use card=<n> insmod option to workaround that.\n");
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002877 em28xx_errdev("Please send an email with this log to:\n");
Alexey Klimov51caf912009-01-25 12:53:09 -03002878 em28xx_errdev("\tV4L Mailing List <linux-media@vger.kernel.org>\n");
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002879 em28xx_errdev("Board eeprom hash is 0x%08lx\n", dev->hash);
Sascha Sommerfad7b952007-11-04 08:06:48 -03002880 em28xx_errdev("Board i2c devicelist hash is 0x%08lx\n", dev->i2c_hash);
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002881
Mauro Carvalho Chehab5ccb1972016-10-12 07:05:48 -03002882 em28xx_errdev("Here is a list of valid choices for the card=<n> insmod option:\n");
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002883 for (i = 0; i < em28xx_bcount; i++) {
2884 em28xx_errdev(" card=%d -> %s\n",
Mauro Carvalho Chehabfdf1bc92014-11-28 08:34:15 -03002885 i, em28xx_boards[i].name);
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002886 }
2887 return -1;
Mauro Carvalho Chehab882876b2007-10-29 11:33:18 -03002888}
2889
Ezequiel Garcia60332f02012-04-28 09:57:01 -03002890static void em28xx_card_setup(struct em28xx *dev)
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08002891{
Mauro Carvalho Chehab3d3215c2009-08-10 10:29:27 -03002892 /*
2893 * If the device can be a webcam, seek for a sensor.
2894 * If sensor is not found, then it isn't a webcam.
2895 */
2896 if (dev->board.is_webcam) {
Frank Schaeferb3944c82013-03-27 17:06:30 -03002897 if (em28xx_detect_sensor(dev) < 0)
Mauro Carvalho Chehab3d3215c2009-08-10 10:29:27 -03002898 dev->board.is_webcam = 0;
Mauro Carvalho Chehabca3dfd62010-09-10 17:29:14 -03002899 }
2900
Frank Schaefer2d466e12013-03-27 17:06:28 -03002901 switch (dev->model) {
2902 case EM2750_BOARD_UNKNOWN:
2903 case EM2820_BOARD_UNKNOWN:
2904 case EM2800_BOARD_UNKNOWN:
Mauro Carvalho Chehabca3dfd62010-09-10 17:29:14 -03002905 /*
2906 * The K-WORLD DVB-T 310U is detected as an MSI Digivox AD.
2907 *
2908 * This occurs because they share identical USB vendor and
2909 * product IDs.
2910 *
2911 * What we do here is look up the EEPROM hash of the K-WORLD
2912 * and if it is found then we decide that we do not have
2913 * a DIGIVOX and reset the device to the K-WORLD instead.
2914 *
2915 * This solution is only valid if they do not share eeprom
2916 * hash identities which has not been determined as yet.
2917 */
2918 if (em28xx_hint_board(dev) < 0)
2919 em28xx_errdev("Board not discovered\n");
2920 else {
2921 em28xx_set_model(dev);
2922 em28xx_pre_card_setup(dev);
2923 }
2924 break;
Frank Schaefer2d466e12013-03-27 17:06:28 -03002925 default:
2926 em28xx_set_model(dev);
Mauro Carvalho Chehabca3dfd62010-09-10 17:29:14 -03002927 }
Mauro Carvalho Chehab3d3215c2009-08-10 10:29:27 -03002928
2929 em28xx_info("Identified as %s (card=%d)\n",
2930 dev->board.name, dev->model);
Mauro Carvalho Chehabf8b60302007-11-05 08:42:55 -03002931
2932 dev->tuner_type = em28xx_boards[dev->model].tuner_type;
2933
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08002934 /* request some modules */
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002935 switch (dev->model) {
2936 case EM2820_BOARD_HAUPPAUGE_WINTV_USB_2:
Mauro Carvalho Chehab98ae1272007-11-05 09:30:39 -03002937 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900:
Devin Heitmueller17d9d552008-06-08 10:22:03 -03002938 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2:
Douglas Schilling Landgraff89bc322008-12-01 21:01:04 -03002939 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850:
Mauro Carvalho Chehab10ac6602008-07-27 14:58:58 -03002940 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950:
Frank Schaefera6166012013-03-03 15:37:44 -03002941 case EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C:
Olli Salonen11a2a942016-04-04 12:12:52 -03002942 case EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB:
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002943 {
2944 struct tveeprom tv;
Frank Schaefera2179682013-03-03 15:37:42 -03002945
2946 if (dev->eedata == NULL)
2947 break;
Mauro Carvalho Chehabac07bb72009-09-08 14:04:41 -03002948#if defined(CONFIG_MODULES) && defined(MODULE)
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002949 request_module("tveeprom");
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08002950#endif
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002951 /* Call first TVeeprom */
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08002952
Mauro Carvalho Chehabc7a45e52013-03-05 06:55:26 -03002953 dev->i2c_client[dev->def_i2c_bus].addr = 0xa0 >> 1;
2954 tveeprom_hauppauge_analog(&dev->i2c_client[dev->def_i2c_bus], &tv, dev->eedata);
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08002955
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002956 dev->tuner_type = tv.tuner_type;
Mauro Carvalho Chehabed086312008-01-24 06:59:20 -03002957
Hans Verkuil33001012013-05-29 06:59:45 -03002958 if (tv.audio_processor == TVEEPROM_AUDPROC_MSP) {
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002959 dev->i2s_speed = 2048000;
Mauro Carvalho Chehab505b6d02008-11-25 09:39:50 -03002960 dev->board.has_msp34xx = 1;
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002961 }
2962 break;
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08002963 }
Franklin Mengd7de5d82009-06-06 17:05:02 -03002964 case EM2882_BOARD_KWORLD_ATSC_315U:
2965 em28xx_write_reg(dev, 0x0d, 0x42);
2966 msleep(10);
Frank Schaeferc074fc42013-06-03 14:12:03 -03002967 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfd);
Franklin Mengd7de5d82009-06-06 17:05:02 -03002968 msleep(10);
2969 break;
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002970 case EM2820_BOARD_KWORLD_PVRTV2800RF:
2971 /* GPIO enables sound on KWORLD PVR TV 2800RF */
Frank Schaeferc074fc42013-06-03 14:12:03 -03002972 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xf9);
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002973 break;
2974 case EM2820_BOARD_UNKNOWN:
2975 case EM2800_BOARD_UNKNOWN:
Darron Broadda3808e2008-09-30 02:46:41 -03002976 /*
2977 * The K-WORLD DVB-T 310U is detected as an MSI Digivox AD.
2978 *
2979 * This occurs because they share identical USB vendor and
2980 * product IDs.
2981 *
2982 * What we do here is look up the EEPROM hash of the K-WORLD
2983 * and if it is found then we decide that we do not have
2984 * a DIGIVOX and reset the device to the K-WORLD instead.
2985 *
2986 * This solution is only valid if they do not share eeprom
2987 * hash identities which has not been determined as yet.
2988 */
2989 case EM2880_BOARD_MSI_DIGIVOX_AD:
Mauro Carvalho Chehabf8b60302007-11-05 08:42:55 -03002990 if (!em28xx_hint_board(dev))
2991 em28xx_set_model(dev);
Devin Heitmuellercdf7bfa2009-06-19 00:20:28 -03002992
2993 /* In cases where we had to use a board hint, the call to
2994 em28xx_set_mode() in em28xx_pre_card_setup() was a no-op,
2995 so make the call now so the analog GPIOs are set properly
2996 before probing the i2c bus. */
Devin Heitmueller5343e442009-07-15 00:35:47 -03002997 em28xx_gpio_set(dev, dev->board.tuner_gpio);
Devin Heitmuellercdf7bfa2009-06-19 00:20:28 -03002998 em28xx_set_mode(dev, EM28XX_ANALOG_MODE);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002999 break;
Andrea.Amorosi76@gmail.com7ca7ef62010-02-09 17:53:38 -03003000
Frank Schaefera2179682013-03-03 15:37:42 -03003001 /*
Andrea.Amorosi76@gmail.com7ca7ef62010-02-09 17:53:38 -03003002 * The Dikom DK300 is detected as an Kworld VS-DVB-T 323UR.
3003 *
3004 * This occurs because they share identical USB vendor and
3005 * product IDs.
3006 *
3007 * What we do here is look up the EEPROM hash of the Dikom
3008 * and if it is found then we decide that we do not have
3009 * a Kworld and reset the device to the Dikom instead.
3010 *
3011 * This solution is only valid if they do not share eeprom
3012 * hash identities which has not been determined as yet.
3013 */
3014 case EM2882_BOARD_KWORLD_VS_DVBT:
3015 if (!em28xx_hint_board(dev))
3016 em28xx_set_model(dev);
3017
3018 /* In cases where we had to use a board hint, the call to
3019 em28xx_set_mode() in em28xx_pre_card_setup() was a no-op,
3020 so make the call now so the analog GPIOs are set properly
3021 before probing the i2c bus. */
3022 em28xx_gpio_set(dev, dev->board.tuner_gpio);
3023 em28xx_set_mode(dev, EM28XX_ANALOG_MODE);
3024 break;
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03003025 }
3026
Mauro Carvalho Chehab505b6d02008-11-25 09:39:50 -03003027 if (dev->board.valid == EM28XX_BOARD_NOT_VALIDATED) {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03003028 em28xx_errdev("\n\n");
Mauro Carvalho Chehab5ccb1972016-10-12 07:05:48 -03003029 em28xx_errdev("The support for this board weren't valid yet.\n");
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03003030 em28xx_errdev("Please send a report of having this working\n");
Mauro Carvalho Chehab5ccb1972016-10-12 07:05:48 -03003031 em28xx_errdev("not to V4L mailing list (and/or to other addresses)\n\n");
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03003032 }
3033
Frank Schaefera2179682013-03-03 15:37:42 -03003034 /* Free eeprom data memory */
3035 kfree(dev->eedata);
3036 dev->eedata = NULL;
3037
Mauro Carvalho Chehabf8b60302007-11-05 08:42:55 -03003038 /* Allow override tuner type by a module parameter */
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03003039 if (tuner >= 0)
3040 dev->tuner_type = tuner;
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08003041}
Mauro Carvalho Chehabc8644052008-11-25 13:10:14 -03003042
Mauro Carvalho Chehabee972072014-01-12 11:08:22 -03003043void em28xx_setup_xc3028(struct em28xx *dev, struct xc2028_ctrl *ctl)
3044{
3045 memset(ctl, 0, sizeof(*ctl));
3046
3047 ctl->fname = XC2028_DEFAULT_FIRMWARE;
3048 ctl->max_len = 64;
3049 ctl->mts = em28xx_boards[dev->model].mts_firmware;
3050
3051 switch (dev->model) {
3052 case EM2880_BOARD_EMPIRE_DUAL_TV:
3053 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900:
3054 case EM2882_BOARD_TERRATEC_HYBRID_XS:
3055 ctl->demod = XC3028_FE_ZARLINK456;
3056 break;
3057 case EM2880_BOARD_TERRATEC_HYBRID_XS:
3058 case EM2880_BOARD_TERRATEC_HYBRID_XS_FR:
3059 case EM2881_BOARD_PINNACLE_HYBRID_PRO:
3060 ctl->demod = XC3028_FE_ZARLINK456;
3061 break;
3062 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2:
3063 case EM2882_BOARD_PINNACLE_HYBRID_PRO_330E:
3064 ctl->demod = XC3028_FE_DEFAULT;
3065 break;
3066 case EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600:
3067 ctl->demod = XC3028_FE_DEFAULT;
3068 ctl->fname = XC3028L_DEFAULT_FIRMWARE;
3069 break;
3070 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850:
3071 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950:
3072 case EM2880_BOARD_PINNACLE_PCTV_HD_PRO:
3073 /* FIXME: Better to specify the needed IF */
3074 ctl->demod = XC3028_FE_DEFAULT;
3075 break;
3076 case EM2883_BOARD_KWORLD_HYBRID_330U:
3077 case EM2882_BOARD_DIKOM_DK300:
3078 case EM2882_BOARD_KWORLD_VS_DVBT:
3079 ctl->demod = XC3028_FE_CHINA;
3080 ctl->fname = XC2028_DEFAULT_FIRMWARE;
3081 break;
3082 case EM2882_BOARD_EVGA_INDTUBE:
3083 ctl->demod = XC3028_FE_CHINA;
3084 ctl->fname = XC3028L_DEFAULT_FIRMWARE;
3085 break;
3086 default:
3087 ctl->demod = XC3028_FE_OREN538;
3088 }
3089}
3090EXPORT_SYMBOL_GPL(em28xx_setup_xc3028);
3091
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003092static void request_module_async(struct work_struct *work)
3093{
3094 struct em28xx *dev = container_of(work,
3095 struct em28xx, request_module_wk);
3096
Mauro Carvalho Chehab6ae5e062012-10-02 15:35:27 -03003097 /*
3098 * The em28xx extensions can be modules or builtin. If the
3099 * modules are already loaded or are built in, those extensions
3100 * can be initialised right now. Otherwise, the module init
3101 * code will do it.
3102 */
Mauro Carvalho Chehabe63fa182014-01-06 05:50:07 -03003103
3104 /*
3105 * Devicdes with an audio-only interface also have a V4L/DVB/RC
3106 * interface. Don't register extensions twice on those devices.
3107 */
3108 if (dev->is_audio_only) {
3109#if defined(CONFIG_MODULES) && defined(MODULE)
3110 request_module("em28xx-alsa");
3111#endif
3112 return;
3113 }
3114
Mauro Carvalho Chehab6ae5e062012-10-02 15:35:27 -03003115 em28xx_init_extension(dev);
3116
3117#if defined(CONFIG_MODULES) && defined(MODULE)
Mauro Carvalho Chehab01c28192013-12-22 13:27:02 -03003118 if (dev->has_video)
3119 request_module("em28xx-v4l");
Frank Schaeferc5874202014-09-13 05:52:20 -03003120 if (dev->usb_audio_type == EM28XX_USB_AUDIO_CLASS)
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003121 request_module("snd-usb-audio");
Frank Schaeferc5874202014-09-13 05:52:20 -03003122 else if (dev->usb_audio_type == EM28XX_USB_AUDIO_VENDOR)
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003123 request_module("em28xx-alsa");
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003124 if (dev->board.has_dvb)
3125 request_module("em28xx-dvb");
Frank Schaeferf52226092013-12-01 18:06:52 -03003126 if (dev->board.buttons ||
Frank Schaefer2b64cbd2013-04-11 15:56:01 -03003127 ((dev->board.ir_codes || dev->board.has_ir_i2c) && !disable_ir))
Ezequiel Garcíaf4d4e762012-03-26 09:13:35 -03003128 request_module("em28xx-rc");
Mauro Carvalho Chehab6ae5e062012-10-02 15:35:27 -03003129#endif /* CONFIG_MODULES */
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003130}
3131
3132static void request_modules(struct em28xx *dev)
3133{
3134 INIT_WORK(&dev->request_module_wk, request_module_async);
3135 schedule_work(&dev->request_module_wk);
3136}
Tejun Heo707bcf32010-12-24 16:14:20 +01003137
3138static void flush_request_modules(struct em28xx *dev)
3139{
Linus Torvalds0b8e74c2012-10-07 17:49:05 +09003140 flush_work(&dev->request_module_wk);
Tejun Heo707bcf32010-12-24 16:14:20 +01003141}
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003142
Mauro Carvalho Chehab37ecc7b2016-01-27 07:07:24 -02003143static int em28xx_media_device_init(struct em28xx *dev,
3144 struct usb_device *udev)
3145{
3146#ifdef CONFIG_MEDIA_CONTROLLER
3147 struct media_device *mdev;
3148
Mauro Carvalho Chehab6cf5dad2016-02-22 12:10:49 -03003149 mdev = kzalloc(sizeof(*mdev), GFP_KERNEL);
Mauro Carvalho Chehab37ecc7b2016-01-27 07:07:24 -02003150 if (!mdev)
3151 return -ENOMEM;
3152
Mauro Carvalho Chehab6cf5dad2016-02-22 12:10:49 -03003153 if (udev->product)
3154 media_device_usb_init(mdev, udev, udev->product);
3155 else if (udev->manufacturer)
3156 media_device_usb_init(mdev, udev, udev->manufacturer);
3157 else
3158 media_device_usb_init(mdev, udev, dev->name);
3159
Mauro Carvalho Chehab37ecc7b2016-01-27 07:07:24 -02003160 dev->media_dev = mdev;
3161#endif
3162 return 0;
3163}
3164
3165static void em28xx_unregister_media_device(struct em28xx *dev)
3166{
3167
3168#ifdef CONFIG_MEDIA_CONTROLLER
3169 if (dev->media_dev) {
3170 media_device_unregister(dev->media_dev);
3171 media_device_cleanup(dev->media_dev);
3172 kfree(dev->media_dev);
3173 dev->media_dev = NULL;
3174 }
3175#endif
3176}
3177
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003178/*
Chris Rankind7222e72011-09-24 11:02:32 -03003179 * em28xx_release_resources()
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003180 * unregisters the v4l2,i2c and usb devices
Chris Rankind7222e72011-09-24 11:02:32 -03003181 * called when the device gets disconnected or at module unload
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003182*/
Mauro Carvalho Chehab47677e52014-03-05 11:21:07 -03003183static void em28xx_release_resources(struct em28xx *dev)
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003184{
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003185 /*FIXME: I2C IR should be disconnected */
3186
Frank Schaefer5a620c72014-01-12 13:24:24 -03003187 mutex_lock(&dev->lock);
3188
Mauro Carvalho Chehab37ecc7b2016-01-27 07:07:24 -02003189 em28xx_unregister_media_device(dev);
3190
Mauro Carvalho Chehabaab31252013-03-05 06:55:28 -03003191 if (dev->def_i2c_bus)
3192 em28xx_i2c_unregister(dev, 1);
3193 em28xx_i2c_unregister(dev, 0);
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03003194
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003195 usb_put_dev(dev->udev);
3196
3197 /* Mark device as unused */
Mauro Carvalho Chehabc3aed262014-01-14 17:35:15 -03003198 clear_bit(dev->devno, em28xx_devused);
Frank Schaefer5a620c72014-01-12 13:24:24 -03003199
3200 mutex_unlock(&dev->lock);
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003201};
Mauro Carvalho Chehab47677e52014-03-05 11:21:07 -03003202
3203/**
3204 * em28xx_free_device() - Free em28xx device
3205 *
3206 * @ref: struct kref for em28xx device
3207 *
3208 * This is called when all extensions and em28xx core unregisters a device
3209 */
3210void em28xx_free_device(struct kref *ref)
3211{
3212 struct em28xx *dev = kref_to_dev(ref);
3213
3214 em28xx_info("Freeing device\n");
3215
3216 if (!dev->disconnected)
3217 em28xx_release_resources(dev);
3218
3219 kfree(dev->alt_max_pkt_size_isoc);
3220 kfree(dev);
3221}
3222EXPORT_SYMBOL_GPL(em28xx_free_device);
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003223
3224/*
3225 * em28xx_init_dev()
3226 * allocates and inits the device structs, registers i2c bus and v4l device
3227 */
Thomas Petazzoni622c2fc2012-01-07 10:18:45 -03003228static int em28xx_init_dev(struct em28xx *dev, struct usb_device *udev,
Mauro Carvalho Chehab36fa6742009-04-05 08:02:15 -03003229 struct usb_interface *interface,
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003230 int minor)
3231{
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003232 int retval;
Mauro Carvalho Chehaba3efa1c2012-12-23 16:32:03 -02003233 static const char *default_chip_name = "em28xx";
3234 const char *chip_name = default_chip_name;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003235
3236 dev->udev = udev;
3237 mutex_init(&dev->ctrl_urb_lock);
3238 spin_lock_init(&dev->slock);
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003239
3240 dev->em28xx_write_regs = em28xx_write_regs;
3241 dev->em28xx_read_reg = em28xx_read_reg;
3242 dev->em28xx_read_reg_req_len = em28xx_read_reg_req_len;
3243 dev->em28xx_write_regs_req = em28xx_write_regs_req;
3244 dev->em28xx_read_reg_req = em28xx_read_reg_req;
3245 dev->board.is_em2800 = em28xx_boards[dev->model].is_em2800;
3246
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003247 em28xx_set_model(dev);
3248
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003249 dev->wait_after_write = 5;
3250
3251 /* Based on the Chip ID, set the device configuration */
3252 retval = em28xx_read_reg(dev, EM28XX_R0A_CHIPID);
3253 if (retval > 0) {
3254 dev->chip_id = retval;
3255
3256 switch (dev->chip_id) {
Mauro Carvalho Chehabf57b17c32009-11-12 11:21:05 -03003257 case CHIP_ID_EM2800:
Mauro Carvalho Chehaba3efa1c2012-12-23 16:32:03 -02003258 chip_name = "em2800";
Mauro Carvalho Chehabf57b17c32009-11-12 11:21:05 -03003259 break;
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003260 case CHIP_ID_EM2710:
Mauro Carvalho Chehaba3efa1c2012-12-23 16:32:03 -02003261 chip_name = "em2710";
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003262 break;
3263 case CHIP_ID_EM2750:
Mauro Carvalho Chehaba3efa1c2012-12-23 16:32:03 -02003264 chip_name = "em2750";
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003265 break;
Frank Schaefer736a3202013-03-26 13:38:37 -03003266 case CHIP_ID_EM2765:
3267 chip_name = "em2765";
3268 dev->wait_after_write = 0;
3269 dev->is_em25xx = 1;
3270 dev->eeprom_addrwidth_16bit = 1;
3271 break;
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003272 case CHIP_ID_EM2820:
Mauro Carvalho Chehaba3efa1c2012-12-23 16:32:03 -02003273 chip_name = "em2710/2820";
Frank Schaefer1552fb32013-04-19 17:09:46 -03003274 if (le16_to_cpu(dev->udev->descriptor.idVendor)
3275 == 0xeb1a) {
Frank Schaefer61ff5d62013-04-11 15:56:47 -03003276 __le16 idProd = dev->udev->descriptor.idProduct;
Mauro Carvalho Chehabfdf1bc92014-11-28 08:34:15 -03003277
Frank Schaefer61ff5d62013-04-11 15:56:47 -03003278 if (le16_to_cpu(idProd) == 0x2710)
3279 chip_name = "em2710";
3280 else if (le16_to_cpu(idProd) == 0x2820)
3281 chip_name = "em2820";
3282 }
3283 /* NOTE: the em2820 is used in webcams, too ! */
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003284 break;
3285 case CHIP_ID_EM2840:
Mauro Carvalho Chehaba3efa1c2012-12-23 16:32:03 -02003286 chip_name = "em2840";
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003287 break;
3288 case CHIP_ID_EM2860:
Mauro Carvalho Chehaba3efa1c2012-12-23 16:32:03 -02003289 chip_name = "em2860";
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003290 break;
3291 case CHIP_ID_EM2870:
Mauro Carvalho Chehaba3efa1c2012-12-23 16:32:03 -02003292 chip_name = "em2870";
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003293 dev->wait_after_write = 0;
3294 break;
3295 case CHIP_ID_EM2874:
Mauro Carvalho Chehaba3efa1c2012-12-23 16:32:03 -02003296 chip_name = "em2874";
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003297 dev->wait_after_write = 0;
Frank Schaefer87b52432013-03-03 15:37:40 -03003298 dev->eeprom_addrwidth_16bit = 1;
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003299 break;
Antti Palosaaribc022692011-04-07 16:04:48 -03003300 case CHIP_ID_EM28174:
Mauro Carvalho Chehaba3efa1c2012-12-23 16:32:03 -02003301 chip_name = "em28174";
Antti Palosaaribc022692011-04-07 16:04:48 -03003302 dev->wait_after_write = 0;
Frank Schaefer87b52432013-03-03 15:37:40 -03003303 dev->eeprom_addrwidth_16bit = 1;
Antti Palosaaribc022692011-04-07 16:04:48 -03003304 break;
Antti Palosaari9f1d0bd2013-02-25 08:19:04 -03003305 case CHIP_ID_EM28178:
3306 chip_name = "em28178";
3307 dev->wait_after_write = 0;
3308 dev->eeprom_addrwidth_16bit = 1;
3309 break;
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003310 case CHIP_ID_EM2883:
Mauro Carvalho Chehaba3efa1c2012-12-23 16:32:03 -02003311 chip_name = "em2882/3";
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003312 dev->wait_after_write = 0;
3313 break;
Mauro Carvalho Chehabfec528b2011-07-03 21:05:06 -03003314 case CHIP_ID_EM2884:
Mauro Carvalho Chehaba3efa1c2012-12-23 16:32:03 -02003315 chip_name = "em2884";
Mauro Carvalho Chehabfec528b2011-07-03 21:05:06 -03003316 dev->wait_after_write = 0;
Frank Schaefer87b52432013-03-03 15:37:40 -03003317 dev->eeprom_addrwidth_16bit = 1;
Mauro Carvalho Chehabfec528b2011-07-03 21:05:06 -03003318 break;
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003319 default:
Mauro Carvalho Chehaba3efa1c2012-12-23 16:32:03 -02003320 printk(KERN_INFO DRIVER_NAME
3321 ": unknown em28xx chip ID (%d)\n", dev->chip_id);
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003322 }
3323 }
3324
Mauro Carvalho Chehaba3efa1c2012-12-23 16:32:03 -02003325 if (chip_name != default_chip_name)
3326 printk(KERN_INFO DRIVER_NAME
3327 ": chip ID is %s\n", chip_name);
3328
3329 /*
3330 * For em2820/em2710, the name may change latter, after checking
3331 * if the device has a sensor (so, it is em2710) or not.
3332 */
3333 snprintf(dev->name, sizeof(dev->name), "%s #%d", chip_name, dev->devno);
3334
Mauro Carvalho Chehab37ecc7b2016-01-27 07:07:24 -02003335 em28xx_media_device_init(dev, udev);
3336
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003337 if (dev->is_audio_only) {
Chris Rankin6c03e382011-08-20 08:28:17 -03003338 retval = em28xx_audio_setup(dev);
3339 if (retval)
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003340 return -ENODEV;
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003341 em28xx_init_extension(dev);
3342
3343 return 0;
3344 }
3345
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003346 em28xx_pre_card_setup(dev);
3347
3348 if (!dev->board.is_em2800) {
Mauro Carvalho Chehabca3dfd62010-09-10 17:29:14 -03003349 /* Resets I2C speed */
Sascha Sommer0903bb52012-01-08 16:19:30 -03003350 retval = em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, dev->board.i2c_speed);
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003351 if (retval < 0) {
Mauro Carvalho Chehab5ccb1972016-10-12 07:05:48 -03003352 em28xx_errdev("%s: em28xx_write_reg failed! retval [%d]\n",
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003353 __func__, retval);
3354 return retval;
3355 }
3356 }
3357
Mauro Carvalho Chehabaab31252013-03-05 06:55:28 -03003358 rt_mutex_init(&dev->i2c_bus_lock);
3359
3360 /* register i2c bus 0 */
Frank Schaefera3ea4bf2013-03-26 13:38:36 -03003361 if (dev->board.is_em2800)
3362 retval = em28xx_i2c_register(dev, 0, EM28XX_I2C_ALGO_EM2800);
3363 else
3364 retval = em28xx_i2c_register(dev, 0, EM28XX_I2C_ALGO_EM28XX);
Chris Rankin6c03e382011-08-20 08:28:17 -03003365 if (retval < 0) {
Mauro Carvalho Chehabaab31252013-03-05 06:55:28 -03003366 em28xx_errdev("%s: em28xx_i2c_register bus 0 - error [%d]!\n",
Mauro Carvalho Chehabfdf1bc92014-11-28 08:34:15 -03003367 __func__, retval);
Mauro Carvalho Chehabb64f8e92013-12-22 13:16:49 -03003368 return retval;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003369 }
3370
Frank Schaefera3ea4bf2013-03-26 13:38:36 -03003371 /* register i2c bus 1 */
Mauro Carvalho Chehabaab31252013-03-05 06:55:28 -03003372 if (dev->def_i2c_bus) {
Frank Schaefer736a3202013-03-26 13:38:37 -03003373 if (dev->is_em25xx)
3374 retval = em28xx_i2c_register(dev, 1,
Mauro Carvalho Chehabfdf1bc92014-11-28 08:34:15 -03003375 EM28XX_I2C_ALGO_EM25XX_BUS_B);
Frank Schaefer736a3202013-03-26 13:38:37 -03003376 else
3377 retval = em28xx_i2c_register(dev, 1,
Mauro Carvalho Chehabfdf1bc92014-11-28 08:34:15 -03003378 EM28XX_I2C_ALGO_EM28XX);
Mauro Carvalho Chehabaab31252013-03-05 06:55:28 -03003379 if (retval < 0) {
3380 em28xx_errdev("%s: em28xx_i2c_register bus 1 - error [%d]!\n",
Mauro Carvalho Chehabfdf1bc92014-11-28 08:34:15 -03003381 __func__, retval);
Mauro Carvalho Chehab1f0ee652014-01-05 08:43:40 -03003382
3383 em28xx_i2c_unregister(dev, 0);
3384
Mauro Carvalho Chehabb64f8e92013-12-22 13:16:49 -03003385 return retval;
Mauro Carvalho Chehabaab31252013-03-05 06:55:28 -03003386 }
3387 }
3388
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003389 /* Do board specific init and eeprom reading */
3390 em28xx_card_setup(dev);
3391
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003392 return 0;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003393}
3394
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003395/* high bandwidth multiplier, as encoded in highspeed endpoint descriptors */
3396#define hb_mult(wMaxPacketSize) (1 + (((wMaxPacketSize) >> 11) & 0x03))
3397
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003398/*
3399 * em28xx_usb_probe()
3400 * checks for supported devices
3401 */
3402static int em28xx_usb_probe(struct usb_interface *interface,
3403 const struct usb_device_id *id)
3404{
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003405 struct usb_device *udev;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003406 struct em28xx *dev = NULL;
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03003407 int retval;
Frank Schaeferc5874202014-09-13 05:52:20 -03003408 bool has_vendor_audio = false, has_video = false, has_dvb = false;
Mauro Carvalho Chehab8b2aea72012-12-23 13:25:38 -02003409 int i, nr, try_bulk;
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003410 const int ifnum = interface->altsetting[0].desc.bInterfaceNumber;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003411 char *speed;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003412
3413 udev = usb_get_dev(interface_to_usbdev(interface));
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003414
3415 /* Check to see next free device and mark as used */
Chris Rankin38b61eb2011-08-20 08:21:03 -03003416 do {
Mauro Carvalho Chehabc3aed262014-01-14 17:35:15 -03003417 nr = find_first_zero_bit(em28xx_devused, EM28XX_MAXBOARDS);
Chris Rankin38b61eb2011-08-20 08:21:03 -03003418 if (nr >= EM28XX_MAXBOARDS) {
3419 /* No free device slots */
Mauro Carvalho Chehab5ccb1972016-10-12 07:05:48 -03003420 printk(DRIVER_NAME
3421 ": Supports only %i em28xx boards.\n",
Mauro Carvalho Chehabfdf1bc92014-11-28 08:34:15 -03003422 EM28XX_MAXBOARDS);
Chris Rankin38b61eb2011-08-20 08:21:03 -03003423 retval = -ENOMEM;
3424 goto err_no_slot;
3425 }
Mauro Carvalho Chehabc3aed262014-01-14 17:35:15 -03003426 } while (test_and_set_bit(nr, em28xx_devused));
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003427
3428 /* Don't register audio interfaces */
3429 if (interface->altsetting[0].desc.bInterfaceClass == USB_CLASS_AUDIO) {
Mauro Carvalho Chehab5ccb1972016-10-12 07:05:48 -03003430 em28xx_err(DRIVER_NAME
3431 " audio device (%04x:%04x): interface %i, class %i\n",
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003432 le16_to_cpu(udev->descriptor.idVendor),
3433 le16_to_cpu(udev->descriptor.idProduct),
3434 ifnum,
3435 interface->altsetting[0].desc.bInterfaceClass);
3436
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03003437 retval = -ENODEV;
3438 goto err;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003439 }
3440
Holger Nelson8ab33622011-12-28 18:55:41 -03003441 /* allocate memory for our device state and initialize it */
3442 dev = kzalloc(sizeof(*dev), GFP_KERNEL);
3443 if (dev == NULL) {
3444 em28xx_err(DRIVER_NAME ": out of memory!\n");
3445 retval = -ENOMEM;
3446 goto err;
3447 }
3448
3449 /* compute alternate max packet sizes */
Frank Schaefer0cf544a2012-11-08 14:11:49 -03003450 dev->alt_max_pkt_size_isoc =
3451 kmalloc(sizeof(dev->alt_max_pkt_size_isoc[0]) *
Holger Nelson8ab33622011-12-28 18:55:41 -03003452 interface->num_altsetting, GFP_KERNEL);
Frank Schaefer0cf544a2012-11-08 14:11:49 -03003453 if (dev->alt_max_pkt_size_isoc == NULL) {
Holger Nelson8ab33622011-12-28 18:55:41 -03003454 em28xx_errdev("out of memory!\n");
3455 kfree(dev);
3456 retval = -ENOMEM;
3457 goto err;
3458 }
3459
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003460 /* Get endpoints */
3461 for (i = 0; i < interface->num_altsetting; i++) {
3462 int ep;
3463
3464 for (ep = 0; ep < interface->altsetting[i].desc.bNumEndpoints; ep++) {
Holger Nelson8ab33622011-12-28 18:55:41 -03003465 const struct usb_endpoint_descriptor *e;
3466 int sizedescr, size;
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003467
Holger Nelson8ab33622011-12-28 18:55:41 -03003468 e = &interface->altsetting[i].endpoint[ep].desc;
3469
3470 sizedescr = le16_to_cpu(e->wMaxPacketSize);
3471 size = sizedescr & 0x7ff;
3472
3473 if (udev->speed == USB_SPEED_HIGH)
3474 size = size * hb_mult(sizedescr);
3475
Frank Schaeferc647a912012-11-08 14:11:52 -03003476 if (usb_endpoint_dir_in(e)) {
Holger Nelson8ab33622011-12-28 18:55:41 -03003477 switch (e->bEndpointAddress) {
Frank Schaeferc647a912012-11-08 14:11:52 -03003478 case 0x82:
Holger Nelson8ab33622011-12-28 18:55:41 -03003479 has_video = true;
Frank Schaeferc647a912012-11-08 14:11:52 -03003480 if (usb_endpoint_xfer_isoc(e)) {
3481 dev->analog_ep_isoc =
3482 e->bEndpointAddress;
3483 dev->alt_max_pkt_size_isoc[i] = size;
3484 } else if (usb_endpoint_xfer_bulk(e)) {
3485 dev->analog_ep_bulk =
3486 e->bEndpointAddress;
3487 }
Holger Nelson8ab33622011-12-28 18:55:41 -03003488 break;
Frank Schaeferc647a912012-11-08 14:11:52 -03003489 case 0x83:
3490 if (usb_endpoint_xfer_isoc(e)) {
Frank Schaeferc5874202014-09-13 05:52:20 -03003491 has_vendor_audio = true;
Frank Schaeferc647a912012-11-08 14:11:52 -03003492 } else {
3493 printk(KERN_INFO DRIVER_NAME
Mauro Carvalho Chehab5ccb1972016-10-12 07:05:48 -03003494 ": error: skipping audio endpoint 0x83, because it uses bulk transfers !\n");
Frank Schaeferc647a912012-11-08 14:11:52 -03003495 }
3496 break;
3497 case 0x84:
3498 if (has_video &&
3499 (usb_endpoint_xfer_bulk(e))) {
3500 dev->analog_ep_bulk =
3501 e->bEndpointAddress;
3502 } else {
Frank Schaeferc647a912012-11-08 14:11:52 -03003503 if (usb_endpoint_xfer_isoc(e)) {
Frank Schaeferc647a912012-11-08 14:11:52 -03003504 if (size > dev->dvb_max_pkt_size_isoc) {
Frank Schaefer72cc9ba2013-03-27 16:07:41 -03003505 has_dvb = true; /* see NOTE (~) */
Frank Schaeferb3404a82013-04-08 13:06:59 -03003506 dev->dvb_ep_isoc = e->bEndpointAddress;
Frank Schaeferc647a912012-11-08 14:11:52 -03003507 dev->dvb_max_pkt_size_isoc = size;
3508 dev->dvb_alt_isoc = i;
3509 }
3510 } else {
Frank Schaefer72cc9ba2013-03-27 16:07:41 -03003511 has_dvb = true;
Frank Schaeferc647a912012-11-08 14:11:52 -03003512 dev->dvb_ep_bulk = e->bEndpointAddress;
3513 }
Holger Nelson8ab33622011-12-28 18:55:41 -03003514 }
3515 break;
3516 }
3517 }
Frank Schaeferc647a912012-11-08 14:11:52 -03003518 /* NOTE:
3519 * Old logic with support for isoc transfers only was:
3520 * 0x82 isoc => analog
3521 * 0x83 isoc => audio
3522 * 0x84 isoc => digital
3523 *
3524 * New logic with support for bulk transfers
3525 * 0x82 isoc => analog
3526 * 0x82 bulk => analog
3527 * 0x83 isoc* => audio
3528 * 0x84 isoc => digital
3529 * 0x84 bulk => analog or digital**
3530 * (*: audio should always be isoc)
3531 * (**: analog, if ep 0x82 is isoc, otherwise digital)
3532 *
3533 * The new logic preserves backwards compatibility and
3534 * reflects the endpoint configurations we have seen
3535 * so far. But there might be devices for which this
3536 * logic is not sufficient...
3537 */
Frank Schaefer72cc9ba2013-03-27 16:07:41 -03003538 /*
3539 * NOTE (~): some manufacturers (e.g. Terratec) disable
3540 * endpoints by setting wMaxPacketSize to 0 bytes for
3541 * all alt settings. So far, we've seen this for
3542 * DVB isoc endpoints only.
3543 */
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003544 }
3545 }
3546
Frank Schaeferc5874202014-09-13 05:52:20 -03003547 if (!(has_vendor_audio || has_video || has_dvb)) {
Holger Nelson8ab33622011-12-28 18:55:41 -03003548 retval = -ENODEV;
3549 goto err_free;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003550 }
3551
3552 switch (udev->speed) {
3553 case USB_SPEED_LOW:
3554 speed = "1.5";
3555 break;
3556 case USB_SPEED_UNKNOWN:
3557 case USB_SPEED_FULL:
3558 speed = "12";
3559 break;
3560 case USB_SPEED_HIGH:
3561 speed = "480";
3562 break;
3563 default:
3564 speed = "unknown";
3565 }
3566
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003567 printk(KERN_INFO DRIVER_NAME
Mauro Carvalho Chehab5ccb1972016-10-12 07:05:48 -03003568 ": New device %s %s @ %s Mbps (%04x:%04x, interface %d, class %d)\n",
Ezequiel García401a5822012-03-13 10:27:09 -03003569 udev->manufacturer ? udev->manufacturer : "",
3570 udev->product ? udev->product : "",
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003571 speed,
3572 le16_to_cpu(udev->descriptor.idVendor),
3573 le16_to_cpu(udev->descriptor.idProduct),
3574 ifnum,
3575 interface->altsetting->desc.bInterfaceNumber);
3576
Devin Heitmueller64a00b42009-05-27 23:23:37 -03003577 /*
3578 * Make sure we have 480 Mbps of bandwidth, otherwise things like
3579 * video stream wouldn't likely work, since 12 Mbps is generally
3580 * not enough even for most Digital TV streams.
3581 */
Devin Heitmuellere2a1b792009-05-27 23:44:10 -03003582 if (udev->speed != USB_SPEED_HIGH && disable_usb_speed_check == 0) {
Devin Heitmueller64a00b42009-05-27 23:23:37 -03003583 printk(DRIVER_NAME ": Device initialization failed.\n");
Mauro Carvalho Chehab5ccb1972016-10-12 07:05:48 -03003584 printk(DRIVER_NAME ": Device must be connected to a high-speed USB 2.0 port.\n");
Devin Heitmueller64a00b42009-05-27 23:23:37 -03003585 retval = -ENODEV;
Holger Nelson8ab33622011-12-28 18:55:41 -03003586 goto err_free;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003587 }
3588
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003589 dev->devno = nr;
3590 dev->model = id->driver_info;
3591 dev->alt = -1;
Frank Schaeferc5874202014-09-13 05:52:20 -03003592 dev->is_audio_only = has_vendor_audio && !(has_video || has_dvb);
Mauro Carvalho Chehab01c28192013-12-22 13:27:02 -03003593 dev->has_video = has_video;
Frank Schaefer961717b2014-01-13 19:02:06 -03003594 dev->ifnum = ifnum;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003595
Frank Schaeferc5874202014-09-13 05:52:20 -03003596 if (has_vendor_audio) {
3597 printk(KERN_INFO DRIVER_NAME ": Audio interface %i found %s\n",
3598 ifnum, "(Vendor Class)");
3599 dev->usb_audio_type = EM28XX_USB_AUDIO_VENDOR;
3600 }
3601 /* Checks if audio is provided by a USB Audio Class interface */
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003602 for (i = 0; i < udev->config->desc.bNumInterfaces; i++) {
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003603 struct usb_interface *uif = udev->config->interface[i];
Mauro Carvalho Chehabfdf1bc92014-11-28 08:34:15 -03003604
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003605 if (uif->altsetting[0].desc.bInterfaceClass == USB_CLASS_AUDIO) {
Frank Schaeferc5874202014-09-13 05:52:20 -03003606 if (has_vendor_audio)
3607 em28xx_err("em28xx: device seems to have vendor AND usb audio class interfaces !\n"
3608 "\t\tThe vendor interface will be ignored. Please contact the developers <linux-media@vger.kernel.org>\n");
3609 dev->usb_audio_type = EM28XX_USB_AUDIO_CLASS;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003610 break;
3611 }
3612 }
3613
Mauro Carvalho Chehabaa514962012-12-23 13:15:47 -02003614 if (has_video)
3615 printk(KERN_INFO DRIVER_NAME
3616 ": Video interface %i found:%s%s\n",
3617 ifnum,
3618 dev->analog_ep_bulk ? " bulk" : "",
3619 dev->analog_ep_isoc ? " isoc" : "");
3620 if (has_dvb)
3621 printk(KERN_INFO DRIVER_NAME
3622 ": DVB interface %i found:%s%s\n",
3623 ifnum,
3624 dev->dvb_ep_bulk ? " bulk" : "",
3625 dev->dvb_ep_isoc ? " isoc" : "");
3626
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003627 dev->num_alt = interface->num_altsetting;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003628
Mauro Carvalho Chehabd3e4ea02012-10-27 16:29:20 -03003629 if ((unsigned)card[nr] < em28xx_bcount)
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003630 dev->model = card[nr];
3631
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003632 /* save our data pointer in this interface device */
3633 usb_set_intfdata(interface, dev);
3634
Mauro Carvalho Chehab22580f72016-01-29 12:53:56 -02003635 /* allocate device struct and check if the device is a webcam */
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003636 mutex_init(&dev->lock);
Thomas Petazzoni622c2fc2012-01-07 10:18:45 -03003637 retval = em28xx_init_dev(dev, udev, interface, nr);
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003638 if (retval) {
Mauro Carvalho Chehab01c28192013-12-22 13:27:02 -03003639 goto err_free;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003640 }
3641
Frank Schaefer7e5d74e2012-12-26 15:12:37 -03003642 if (usb_xfer_mode < 0) {
Mauro Carvalho Chehab8b2aea72012-12-23 13:25:38 -02003643 if (dev->board.is_webcam)
3644 try_bulk = 1;
3645 else
3646 try_bulk = 0;
3647 } else {
Frank Schaefer7e5d74e2012-12-26 15:12:37 -03003648 try_bulk = usb_xfer_mode > 0;
Mauro Carvalho Chehab8b2aea72012-12-23 13:25:38 -02003649 }
3650
Mauro Carvalho Chehab22580f72016-01-29 12:53:56 -02003651 /* Disable V4L2 if the device doesn't have a decoder */
3652 if (has_video &&
3653 dev->board.decoder == EM28XX_NODECODER && !dev->board.is_webcam) {
3654 printk(DRIVER_NAME
3655 ": Currently, V4L2 is not supported on this model\n");
3656 has_video = false;
3657 dev->has_video = false;
3658 }
3659
Mauro Carvalho Chehab8b2aea72012-12-23 13:25:38 -02003660 /* Select USB transfer types to use */
3661 if (has_video) {
Frank Schaefer58697782014-03-22 10:00:59 -03003662 if (!dev->analog_ep_isoc || (try_bulk && dev->analog_ep_bulk))
3663 dev->analog_xfer_bulk = 1;
3664 em28xx_info("analog set to %s mode.\n",
3665 dev->analog_xfer_bulk ? "bulk" : "isoc");
Mauro Carvalho Chehab8b2aea72012-12-23 13:25:38 -02003666 }
Gianluca Gennari86d38d12012-02-13 13:59:22 -03003667 if (has_dvb) {
Frank Schaefer58697782014-03-22 10:00:59 -03003668 if (!dev->dvb_ep_isoc || (try_bulk && dev->dvb_ep_bulk))
3669 dev->dvb_xfer_bulk = 1;
Mauro Carvalho Chehab8b2aea72012-12-23 13:25:38 -02003670 em28xx_info("dvb set to %s mode.\n",
3671 dev->dvb_xfer_bulk ? "bulk" : "isoc");
Gianluca Gennari86d38d12012-02-13 13:59:22 -03003672 }
3673
Mauro Carvalho Chehab47677e52014-03-05 11:21:07 -03003674 kref_init(&dev->ref);
3675
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003676 request_modules(dev);
3677
Mauro Carvalho Chehab37ecc7b2016-01-27 07:07:24 -02003678 /*
3679 * Do it at the end, to reduce dynamic configuration changes during
3680 * the device init. Yet, as request_modules() can be async, the
3681 * topology will likely change after the load of the em28xx subdrivers.
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003682 */
Mauro Carvalho Chehab37ecc7b2016-01-27 07:07:24 -02003683#ifdef CONFIG_MEDIA_CONTROLLER
3684 retval = media_device_register(dev->media_dev);
3685#endif
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003686
3687 return 0;
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03003688
Holger Nelson8ab33622011-12-28 18:55:41 -03003689err_free:
Frank Schaefer0cf544a2012-11-08 14:11:49 -03003690 kfree(dev->alt_max_pkt_size_isoc);
Holger Nelson8ab33622011-12-28 18:55:41 -03003691 kfree(dev);
3692
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03003693err:
Mauro Carvalho Chehabc3aed262014-01-14 17:35:15 -03003694 clear_bit(nr, em28xx_devused);
Chris Rankin38b61eb2011-08-20 08:21:03 -03003695
3696err_no_slot:
3697 usb_put_dev(udev);
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03003698 return retval;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003699}
3700
3701/*
3702 * em28xx_usb_disconnect()
Chris Rankind7222e72011-09-24 11:02:32 -03003703 * called when the device gets disconnected
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003704 * video device will be unregistered on v4l2_close in case it is still open
3705 */
3706static void em28xx_usb_disconnect(struct usb_interface *interface)
3707{
3708 struct em28xx *dev;
3709
3710 dev = usb_get_intfdata(interface);
3711 usb_set_intfdata(interface, NULL);
3712
3713 if (!dev)
3714 return;
3715
Frank Schaefer05fe2172012-12-27 19:02:44 -03003716 dev->disconnected = 1;
3717
Mauro Carvalho Chehab6582af42014-01-12 22:44:23 -03003718 em28xx_info("Disconnecting %s\n", dev->name);
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003719
Tejun Heo707bcf32010-12-24 16:14:20 +01003720 flush_request_modules(dev);
3721
Frank Schaefer05fe2172012-12-27 19:02:44 -03003722 em28xx_close_extension(dev);
Mauro Carvalho Chehab54a2a842013-12-27 13:01:04 -03003723
Frank Schaefer5a620c72014-01-12 13:24:24 -03003724 em28xx_release_resources(dev);
Mauro Carvalho Chehab47677e52014-03-05 11:21:07 -03003725 kref_put(&dev->ref, em28xx_free_device);
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003726}
3727
Shuah Khancd701c82014-02-21 21:50:18 -03003728static int em28xx_usb_suspend(struct usb_interface *interface,
Mauro Carvalho Chehabfdf1bc92014-11-28 08:34:15 -03003729 pm_message_t message)
Shuah Khancd701c82014-02-21 21:50:18 -03003730{
3731 struct em28xx *dev;
3732
3733 dev = usb_get_intfdata(interface);
3734 if (!dev)
3735 return 0;
3736 em28xx_suspend_extension(dev);
3737 return 0;
3738}
3739
3740static int em28xx_usb_resume(struct usb_interface *interface)
3741{
3742 struct em28xx *dev;
3743
3744 dev = usb_get_intfdata(interface);
3745 if (!dev)
3746 return 0;
3747 em28xx_resume_extension(dev);
3748 return 0;
3749}
3750
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003751static struct usb_driver em28xx_usb_driver = {
3752 .name = "em28xx",
3753 .probe = em28xx_usb_probe,
3754 .disconnect = em28xx_usb_disconnect,
Shuah Khancd701c82014-02-21 21:50:18 -03003755 .suspend = em28xx_usb_suspend,
3756 .resume = em28xx_usb_resume,
Mauro Carvalho Chehab214635f2014-09-26 06:53:15 -03003757 .reset_resume = em28xx_usb_resume,
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003758 .id_table = em28xx_id_table,
3759};
3760
Greg Kroah-Hartmanecb3b2b2011-11-18 09:46:12 -08003761module_usb_driver(em28xx_usb_driver);