blob: c73cf2012bf56bce5a361445d700fbb4c869175c [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
Mauro Carvalho Chehab8314d402016-10-12 07:26:47 -030026#include "em28xx.h"
27
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -080028#include <linux/init.h>
29#include <linux/module.h>
Tejun Heo5a0e3ad2010-03-24 17:04:11 +090030#include <linux/slab.h>
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -080031#include <linux/delay.h>
32#include <linux/i2c.h>
33#include <linux/usb.h>
34#include <media/tuner.h>
Mauro Carvalho Chehabd647f0b2015-11-13 19:40:07 -020035#include <media/drv-intf/msp3400.h>
Mauro Carvalho Chehabb5dcee22015-11-10 12:01:44 -020036#include <media/i2c/saa7115.h>
Javier Martinez Canillasb802fb92016-02-05 17:09:56 -020037#include <dt-bindings/media/tvp5150.h>
Mauro Carvalho Chehabb5dcee22015-11-10 12:01:44 -020038#include <media/i2c/tvaudio.h>
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -030039#include <media/i2c-addr.h>
Mauro Carvalho Chehab1f6173e2005-11-08 21:37:16 -080040#include <media/tveeprom.h>
Mauro Carvalho Chehab9bb13a62006-01-09 15:25:37 -020041#include <media/v4l2-common.h>
Matthieu Rogez0899f622016-03-04 18:33:08 -030042#include <sound/ac97_codec.h>
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -080043
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -080044
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -030045#define DRIVER_NAME "em28xx"
46
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -030047static int tuner = -1;
48module_param(tuner, int, 0444);
49MODULE_PARM_DESC(tuner, "tuner type");
50
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -030051static unsigned int disable_ir;
52module_param(disable_ir, int, 0444);
53MODULE_PARM_DESC(disable_ir, "disable infrared remote support");
54
Devin Heitmuellere2a1b792009-05-27 23:44:10 -030055static unsigned int disable_usb_speed_check;
56module_param(disable_usb_speed_check, int, 0444);
57MODULE_PARM_DESC(disable_usb_speed_check,
58 "override min bandwidth requirement of 480M bps");
59
Devin Heitmuellerd3829fa2013-01-04 16:16:24 -030060static unsigned int card[] = {[0 ... (EM28XX_MAXBOARDS - 1)] = -1U };
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -030061module_param_array(card, int, NULL, 0444);
62MODULE_PARM_DESC(card, "card type");
63
Frank Schaefer7e5d74e2012-12-26 15:12:37 -030064static int usb_xfer_mode = -1;
65module_param(usb_xfer_mode, int, 0444);
66MODULE_PARM_DESC(usb_xfer_mode,
67 "USB transfer mode for frame data (-1 = auto, 0 = prefer isoc, 1 = prefer bulk)");
Frank Schaefer454fe922012-11-08 14:11:53 -030068
Chris Rankin38b61eb2011-08-20 08:21:03 -030069/* Bitmask marking allocated devices from 0 to EM28XX_MAXBOARDS - 1 */
Fengguang Wu9e8ca382014-01-15 18:50:26 -030070static DECLARE_BITMAP(em28xx_devused, EM28XX_MAXBOARDS);
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -030071
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -030072struct em28xx_hash_table {
73 unsigned long hash;
74 unsigned int model;
75 unsigned int tuner;
76};
77
Ezequiel Garcia60332f02012-04-28 09:57:01 -030078static void em28xx_pre_card_setup(struct em28xx *dev);
79
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -030080/*
81 * Reset sequences for analog/digital modes
82 */
83
84/* Reset for the most [analog] boards */
85static struct em28xx_reg_seq default_analog[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -030086 {EM2820_R08_GPIO_CTRL, 0x6d, ~EM_GPIO_4, 10},
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -030087 { -1, -1, -1, -1},
88};
89
90/* Reset for the most [digital] boards */
91static struct em28xx_reg_seq default_digital[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -030092 {EM2820_R08_GPIO_CTRL, 0x6e, ~EM_GPIO_4, 10},
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -030093 { -1, -1, -1, -1},
94};
95
96/* Board Hauppauge WinTV HVR 900 analog */
97static struct em28xx_reg_seq hauppauge_wintv_hvr_900_analog[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -030098 {EM2820_R08_GPIO_CTRL, 0x2d, ~EM_GPIO_4, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -030099 { 0x05, 0xff, 0x10, 10},
100 { -1, -1, -1, -1},
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -0300101};
102
103/* Board Hauppauge WinTV HVR 900 digital */
104static struct em28xx_reg_seq hauppauge_wintv_hvr_900_digital[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300105 {EM2820_R08_GPIO_CTRL, 0x2e, ~EM_GPIO_4, 10},
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -0300106 {EM2880_R04_GPO, 0x04, 0x0f, 10},
107 {EM2880_R04_GPO, 0x0c, 0x0f, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300108 { -1, -1, -1, -1},
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -0300109};
110
Devin Heitmueller7030f522011-03-13 02:04:53 -0300111/* Board Hauppauge WinTV HVR 900 (R2) digital */
112static struct em28xx_reg_seq hauppauge_wintv_hvr_900R2_digital[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300113 {EM2820_R08_GPIO_CTRL, 0x2e, ~EM_GPIO_4, 10},
Devin Heitmueller7030f522011-03-13 02:04:53 -0300114 {EM2880_R04_GPO, 0x0c, 0x0f, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300115 { -1, -1, -1, -1},
Devin Heitmueller7030f522011-03-13 02:04:53 -0300116};
117
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -0300118/* Boards - EM2880 MSI DIGIVOX AD and EM2880_BOARD_MSI_DIGIVOX_AD_II */
119static struct em28xx_reg_seq em2880_msi_digivox_ad_analog[] = {
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300120 {EM2820_R08_GPIO_CTRL, 0x69, ~EM_GPIO_4, 10},
121 { -1, -1, -1, -1},
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -0300122};
123
124/* Boards - EM2880 MSI DIGIVOX AD and EM2880_BOARD_MSI_DIGIVOX_AD_II */
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -0300125
126/* Board - EM2870 Kworld 355u
127 Analog - No input analog */
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -0300128
Franklin Mengd7de5d82009-06-06 17:05:02 -0300129/* Board - EM2882 Kworld 315U digital */
130static struct em28xx_reg_seq em2882_kworld_315u_digital[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300131 {EM2820_R08_GPIO_CTRL, 0xff, 0xff, 10},
132 {EM2820_R08_GPIO_CTRL, 0xfe, 0xff, 10},
Franklin Mengd7de5d82009-06-06 17:05:02 -0300133 {EM2880_R04_GPO, 0x04, 0xff, 10},
134 {EM2880_R04_GPO, 0x0c, 0xff, 10},
Frank Schaeferc074fc42013-06-03 14:12:03 -0300135 {EM2820_R08_GPIO_CTRL, 0x7e, 0xff, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300136 { -1, -1, -1, -1},
Franklin Mengd7de5d82009-06-06 17:05:02 -0300137};
138
139static struct em28xx_reg_seq em2882_kworld_315u_tuner_gpio[] = {
140 {EM2880_R04_GPO, 0x08, 0xff, 10},
141 {EM2880_R04_GPO, 0x0c, 0xff, 10},
142 {EM2880_R04_GPO, 0x08, 0xff, 10},
143 {EM2880_R04_GPO, 0x0c, 0xff, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300144 { -1, -1, -1, -1},
Franklin Mengd7de5d82009-06-06 17:05:02 -0300145};
146
Robert Krakora6e7b9ea2009-01-18 21:59:34 -0300147static struct em28xx_reg_seq kworld_330u_analog[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300148 {EM2820_R08_GPIO_CTRL, 0x6d, ~EM_GPIO_4, 10},
Robert Krakora6e7b9ea2009-01-18 21:59:34 -0300149 {EM2880_R04_GPO, 0x00, 0xff, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300150 { -1, -1, -1, -1},
Robert Krakora6e7b9ea2009-01-18 21:59:34 -0300151};
152
153static struct em28xx_reg_seq kworld_330u_digital[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300154 {EM2820_R08_GPIO_CTRL, 0x6e, ~EM_GPIO_4, 10},
Robert Krakora6e7b9ea2009-01-18 21:59:34 -0300155 {EM2880_R04_GPO, 0x08, 0xff, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300156 { -1, -1, -1, -1},
Robert Krakora6e7b9ea2009-01-18 21:59:34 -0300157};
158
Devin Heitmueller19859222009-06-19 00:33:54 -0300159/* Evga inDtube
160 GPIO0 - Enable digital power (s5h1409) - low to enable
161 GPIO1 - Enable analog power (tvp5150/emp202) - low to enable
162 GPIO4 - xc3028 reset
163 GOP3 - s5h1409 reset
164 */
165static struct em28xx_reg_seq evga_indtube_analog[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300166 {EM2820_R08_GPIO_CTRL, 0x79, 0xff, 60},
Devin Heitmueller19859222009-06-19 00:33:54 -0300167 { -1, -1, -1, -1},
168};
169
170static struct em28xx_reg_seq evga_indtube_digital[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300171 {EM2820_R08_GPIO_CTRL, 0x7a, 0xff, 1},
Devin Heitmueller19859222009-06-19 00:33:54 -0300172 {EM2880_R04_GPO, 0x04, 0xff, 10},
173 {EM2880_R04_GPO, 0x0c, 0xff, 1},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300174 { -1, -1, -1, -1},
Devin Heitmueller19859222009-06-19 00:33:54 -0300175};
176
Jarod Wilson7e48b302010-03-07 17:55:43 -0300177/*
Jean-Francois Thibert6dbea9f2013-10-09 11:18:05 -0300178 * KWorld PlusTV 340U, UB435-Q and UB435-Q V2 (ATSC) GPIOs map:
Jarod Wilson7e48b302010-03-07 17:55:43 -0300179 * EM_GPIO_0 - currently unknown
180 * EM_GPIO_1 - LED disable/enable (1 = off, 0 = on)
181 * EM_GPIO_2 - currently unknown
182 * EM_GPIO_3 - currently unknown
183 * EM_GPIO_4 - TDA18271HD/C1 tuner (1 = active, 0 = in reset)
184 * EM_GPIO_5 - LGDT3304 ATSC/QAM demod (1 = active, 0 = in reset)
185 * EM_GPIO_6 - currently unknown
186 * EM_GPIO_7 - currently unknown
187 */
188static struct em28xx_reg_seq kworld_a340_digital[] = {
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300189 {EM2820_R08_GPIO_CTRL, 0x6d, ~EM_GPIO_4, 10},
190 { -1, -1, -1, -1},
Jarod Wilson7e48b302010-03-07 17:55:43 -0300191};
192
Mauro Carvalho Chehab02bc1f52014-03-03 16:28:39 -0300193static struct em28xx_reg_seq kworld_ub435q_v3_digital[] = {
Mauro Carvalho Chehabfdf1bc92014-11-28 08:34:15 -0300194 {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 100},
195 {EM2874_R80_GPIO_P0_CTRL, 0xfe, 0xff, 100},
Mauro Carvalho Chehab02bc1f52014-03-03 16:28:39 -0300196 {EM2874_R80_GPIO_P0_CTRL, 0xbe, 0xff, 100},
197 {EM2874_R80_GPIO_P0_CTRL, 0xfe, 0xff, 100},
198 { -1, -1, -1, -1},
199};
200
Devin Heitmuellerd5b3ba92009-07-08 21:51:35 -0300201/* Pinnacle Hybrid Pro eb1a:2881 */
202static struct em28xx_reg_seq pinnacle_hybrid_pro_analog[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300203 {EM2820_R08_GPIO_CTRL, 0xfd, ~EM_GPIO_4, 10},
Devin Heitmuellerd5b3ba92009-07-08 21:51:35 -0300204 { -1, -1, -1, -1},
205};
206
207static struct em28xx_reg_seq pinnacle_hybrid_pro_digital[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300208 {EM2820_R08_GPIO_CTRL, 0x6e, ~EM_GPIO_4, 10},
Devin Heitmuellerd5b3ba92009-07-08 21:51:35 -0300209 {EM2880_R04_GPO, 0x04, 0xff, 100},/* zl10353 reset */
210 {EM2880_R04_GPO, 0x0c, 0xff, 1},
211 { -1, -1, -1, -1},
212};
213
Michel Garniercec4e6c2010-10-16 14:42:01 -0300214static struct em28xx_reg_seq terratec_cinergy_USB_XS_FR_analog[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300215 {EM2820_R08_GPIO_CTRL, 0x6d, ~EM_GPIO_4, 10},
Michel Garniercec4e6c2010-10-16 14:42:01 -0300216 {EM2880_R04_GPO, 0x00, 0xff, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300217 { -1, -1, -1, -1},
Michel Garniercec4e6c2010-10-16 14:42:01 -0300218};
219
220static struct em28xx_reg_seq terratec_cinergy_USB_XS_FR_digital[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300221 {EM2820_R08_GPIO_CTRL, 0x6e, ~EM_GPIO_4, 10},
Michel Garniercec4e6c2010-10-16 14:42:01 -0300222 {EM2880_R04_GPO, 0x08, 0xff, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300223 { -1, -1, -1, -1},
Michel Garniercec4e6c2010-10-16 14:42:01 -0300224};
225
Devin Heitmueller38b2df92012-08-13 21:18:02 -0300226/* PCTV HD Mini (80e) GPIOs
227 0-5: not used
228 6: demod reset, active low
229 7: LED on, active high */
230static struct em28xx_reg_seq em2874_pctv_80e_digital[] = {
231 {EM28XX_R06_I2C_CLK, 0x45, 0xff, 10}, /*400 KHz*/
Mauro Carvalho Chehab88e4fcd2014-03-04 20:49:07 -0300232 {EM2874_R80_GPIO_P0_CTRL, 0x00, 0xff, 100},/*Demod reset*/
233 {EM2874_R80_GPIO_P0_CTRL, 0x40, 0xff, 10},
Devin Heitmueller38b2df92012-08-13 21:18:02 -0300234 { -1, -1, -1, -1},
235};
236
Antti Palosaari285eb1a2009-09-15 14:42:13 -0300237/* eb1a:2868 Reddo DVB-C USB TV Box
238 GPIO4 - CU1216L NIM
239 Other GPIOs seems to be don't care. */
240static struct em28xx_reg_seq reddo_dvb_c_usb_box[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300241 {EM2820_R08_GPIO_CTRL, 0xfe, 0xff, 10},
242 {EM2820_R08_GPIO_CTRL, 0xde, 0xff, 10},
243 {EM2820_R08_GPIO_CTRL, 0xfe, 0xff, 10},
244 {EM2820_R08_GPIO_CTRL, 0xff, 0xff, 10},
245 {EM2820_R08_GPIO_CTRL, 0x7f, 0xff, 10},
246 {EM2820_R08_GPIO_CTRL, 0x6f, 0xff, 10},
247 {EM2820_R08_GPIO_CTRL, 0xff, 0xff, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300248 { -1, -1, -1, -1},
Antti Palosaari285eb1a2009-09-15 14:42:13 -0300249};
Devin Heitmuellerd5b3ba92009-07-08 21:51:35 -0300250
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -0300251/* Callback for the most boards */
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -0300252static struct em28xx_reg_seq default_tuner_gpio[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300253 {EM2820_R08_GPIO_CTRL, EM_GPIO_4, EM_GPIO_4, 10},
254 {EM2820_R08_GPIO_CTRL, 0, EM_GPIO_4, 10},
255 {EM2820_R08_GPIO_CTRL, EM_GPIO_4, EM_GPIO_4, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300256 { -1, -1, -1, -1},
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -0300257};
258
Vitaly Wool2bd1d9e2009-03-04 08:27:52 -0300259/* Mute/unmute */
260static struct em28xx_reg_seq compro_unmute_tv_gpio[] = {
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300261 {EM2820_R08_GPIO_CTRL, 5, 7, 10},
262 { -1, -1, -1, -1},
Vitaly Wool2bd1d9e2009-03-04 08:27:52 -0300263};
264
265static struct em28xx_reg_seq compro_unmute_svid_gpio[] = {
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300266 {EM2820_R08_GPIO_CTRL, 4, 7, 10},
267 { -1, -1, -1, -1},
Vitaly Wool2bd1d9e2009-03-04 08:27:52 -0300268};
269
270static struct em28xx_reg_seq compro_mute_gpio[] = {
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300271 {EM2820_R08_GPIO_CTRL, 6, 7, 10},
272 { -1, -1, -1, -1},
Vitaly Wool2bd1d9e2009-03-04 08:27:52 -0300273};
274
Mauro Carvalho Chehab766ed642009-05-24 00:46:01 -0300275/* Terratec AV350 */
276static struct em28xx_reg_seq terratec_av350_mute_gpio[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300277 {EM2820_R08_GPIO_CTRL, 0xff, 0x7f, 10},
Mauro Carvalho Chehab766ed642009-05-24 00:46:01 -0300278 { -1, -1, -1, -1},
279};
280
281static struct em28xx_reg_seq terratec_av350_unmute_gpio[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300282 {EM2820_R08_GPIO_CTRL, 0xff, 0xff, 10},
Mauro Carvalho Chehab766ed642009-05-24 00:46:01 -0300283 { -1, -1, -1, -1},
284};
Mauro Carvalho Chehab02e78042009-06-29 11:35:05 -0300285
286static struct em28xx_reg_seq silvercrest_reg_seq[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300287 {EM2820_R08_GPIO_CTRL, 0xff, 0xff, 10},
288 {EM2820_R08_GPIO_CTRL, 0x01, 0xf7, 10},
Mauro Carvalho Chehab02e78042009-06-29 11:35:05 -0300289 { -1, -1, -1, -1},
290};
291
Mauro Carvalho Chehab694a1012009-11-26 21:26:13 -0300292static struct em28xx_reg_seq vc211a_enable[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300293 {EM2820_R08_GPIO_CTRL, 0xff, 0x07, 10},
294 {EM2820_R08_GPIO_CTRL, 0xff, 0x0f, 10},
295 {EM2820_R08_GPIO_CTRL, 0xff, 0x0b, 10},
Mauro Carvalho Chehab694a1012009-11-26 21:26:13 -0300296 { -1, -1, -1, -1},
297};
298
Andrea.Amorosi76@gmail.com7ca7ef62010-02-09 17:53:38 -0300299static struct em28xx_reg_seq dikom_dk300_digital[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300300 {EM2820_R08_GPIO_CTRL, 0x6e, ~EM_GPIO_4, 10},
Andrea.Amorosi76@gmail.com7ca7ef62010-02-09 17:53:38 -0300301 {EM2880_R04_GPO, 0x08, 0xff, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300302 { -1, -1, -1, -1},
Andrea.Amorosi76@gmail.com7ca7ef62010-02-09 17:53:38 -0300303};
304
Mauro Carvalho Chehabca3dfd62010-09-10 17:29:14 -0300305/* Reset for the most [digital] boards */
306static struct em28xx_reg_seq leadership_digital[] = {
Frank Schaefer907d1092013-06-03 14:12:02 -0300307 {EM2874_R80_GPIO_P0_CTRL, 0x70, 0xff, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300308 { -1, -1, -1, -1},
Mauro Carvalho Chehabca3dfd62010-09-10 17:29:14 -0300309};
310
311static struct em28xx_reg_seq leadership_reset[] = {
Frank Schaefer907d1092013-06-03 14:12:02 -0300312 {EM2874_R80_GPIO_P0_CTRL, 0xf0, 0xff, 10},
313 {EM2874_R80_GPIO_P0_CTRL, 0xb0, 0xff, 10},
314 {EM2874_R80_GPIO_P0_CTRL, 0xf0, 0xff, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300315 { -1, -1, -1, -1},
Mauro Carvalho Chehabca3dfd62010-09-10 17:29:14 -0300316};
317
Antti Palosaari460312e2011-05-25 17:03:50 -0300318/* 2013:024f PCTV nanoStick T2 290e
Antti Palosaarid6a5f922011-04-07 16:34:44 -0300319 * GPIO_6 - demod reset
320 * GPIO_7 - LED
321 */
322static struct em28xx_reg_seq pctv_290e[] = {
Frank Schaefer907d1092013-06-03 14:12:02 -0300323 {EM2874_R80_GPIO_P0_CTRL, 0x00, 0xff, 80},
324 {EM2874_R80_GPIO_P0_CTRL, 0x40, 0xff, 80}, /* GPIO_6 = 1 */
325 {EM2874_R80_GPIO_P0_CTRL, 0xc0, 0xff, 80}, /* GPIO_7 = 1 */
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300326 { -1, -1, -1, -1},
Antti Palosaarid6a5f922011-04-07 16:34:44 -0300327};
Mauro Carvalho Chehabca3dfd62010-09-10 17:29:14 -0300328
Mauro Carvalho Chehabfec528b2011-07-03 21:05:06 -0300329#if 0
330static struct em28xx_reg_seq terratec_h5_gpio[] = {
Frank Schaeferc074fc42013-06-03 14:12:03 -0300331 {EM2820_R08_GPIO_CTRL, 0xff, 0xff, 10},
Frank Schaefer907d1092013-06-03 14:12:02 -0300332 {EM2874_R80_GPIO_P0_CTRL, 0xf6, 0xff, 100},
333 {EM2874_R80_GPIO_P0_CTRL, 0xf2, 0xff, 50},
334 {EM2874_R80_GPIO_P0_CTRL, 0xf6, 0xff, 50},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300335 { -1, -1, -1, -1},
Mauro Carvalho Chehabfec528b2011-07-03 21:05:06 -0300336};
337
338static struct em28xx_reg_seq terratec_h5_digital[] = {
Frank Schaefer907d1092013-06-03 14:12:02 -0300339 {EM2874_R80_GPIO_P0_CTRL, 0xf6, 0xff, 10},
340 {EM2874_R80_GPIO_P0_CTRL, 0xe6, 0xff, 100},
341 {EM2874_R80_GPIO_P0_CTRL, 0xa6, 0xff, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300342 { -1, -1, -1, -1},
Mauro Carvalho Chehabfec528b2011-07-03 21:05:06 -0300343};
344#endif
345
Antti Palosaari36588712011-08-01 01:15:30 -0300346/* 2013:024f PCTV DVB-S2 Stick 460e
347 * GPIO_0 - POWER_ON
348 * GPIO_1 - BOOST
349 * GPIO_2 - VUV_LNB (red LED)
350 * GPIO_3 - EXT_12V
351 * GPIO_4 - INT_DEM (DEMOD GPIO_0)
352 * GPIO_5 - INT_LNB
353 * GPIO_6 - RESET_DEM
354 * GPIO_7 - LED (green LED)
355 */
356static struct em28xx_reg_seq pctv_460e[] = {
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300357 {EM2874_R80_GPIO_P0_CTRL, 0x01, 0xff, 50},
358 { 0x0d, 0xff, 0xff, 50},
359 {EM2874_R80_GPIO_P0_CTRL, 0x41, 0xff, 50}, /* GPIO_6=1 */
360 { 0x0d, 0x42, 0xff, 50},
361 {EM2874_R80_GPIO_P0_CTRL, 0x61, 0xff, 50}, /* GPIO_5=1 */
362 { -1, -1, -1, -1},
Antti Palosaari36588712011-08-01 01:15:30 -0300363};
364
Mauro Carvalho Chehab4159d012013-02-28 10:35:56 -0300365static struct em28xx_reg_seq c3tech_digital_duo_digital[] = {
Frank Schaefer907d1092013-06-03 14:12:02 -0300366 {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 10},
367 {EM2874_R80_GPIO_P0_CTRL, 0xfd, 0xff, 10}, /* xc5000 reset */
368 {EM2874_R80_GPIO_P0_CTRL, 0xf9, 0xff, 35},
369 {EM2874_R80_GPIO_P0_CTRL, 0xfd, 0xff, 10},
370 {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 10},
371 {EM2874_R80_GPIO_P0_CTRL, 0xfe, 0xff, 10},
372 {EM2874_R80_GPIO_P0_CTRL, 0xbe, 0xff, 10},
373 {EM2874_R80_GPIO_P0_CTRL, 0xfe, 0xff, 20},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300374 { -1, -1, -1, -1},
Mauro Carvalho Chehab4159d012013-02-28 10:35:56 -0300375};
376
Antti Palosaariec573362013-02-25 09:01:13 -0300377/*
378 * 2013:0258 PCTV DVB-S2 Stick (461e)
379 * GPIO 0 = POWER_ON
380 * GPIO 1 = BOOST
381 * GPIO 2 = VUV_LNB (red LED)
382 * GPIO 3 = #EXT_12V
383 * GPIO 4 = INT_DEM
384 * GPIO 5 = INT_LNB
385 * GPIO 6 = #RESET_DEM
386 * GPIO 7 = P07_LED (green LED)
387 */
388static struct em28xx_reg_seq pctv_461e[] = {
389 {EM2874_R80_GPIO_P0_CTRL, 0x7f, 0xff, 0},
390 {0x0d, 0xff, 0xff, 0},
391 {EM2874_R80_GPIO_P0_CTRL, 0x3f, 0xff, 100}, /* reset demod */
392 {EM2874_R80_GPIO_P0_CTRL, 0x7f, 0xff, 200}, /* reset demod */
393 {0x0d, 0x42, 0xff, 0},
394 {EM2874_R80_GPIO_P0_CTRL, 0xeb, 0xff, 0},
395 {EM2874_R5F_TS_ENABLE, 0x84, 0x84, 0}, /* parallel? | null discard */
396 { -1, -1, -1, -1},
397};
398
Mauro Carvalho Chehab85032322011-11-24 15:01:45 -0200399#if 0
Eddi De Pieri82e7dbb2011-11-19 11:37:14 -0300400static struct em28xx_reg_seq hauppauge_930c_gpio[] = {
Frank Schaefer907d1092013-06-03 14:12:02 -0300401 {EM2874_R80_GPIO_P0_CTRL, 0x6f, 0xff, 10},
402 {EM2874_R80_GPIO_P0_CTRL, 0x4f, 0xff, 10}, /* xc5000 reset */
403 {EM2874_R80_GPIO_P0_CTRL, 0x6f, 0xff, 10},
404 {EM2874_R80_GPIO_P0_CTRL, 0x4f, 0xff, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300405 { -1, -1, -1, -1},
Eddi De Pieri82e7dbb2011-11-19 11:37:14 -0300406};
407
Eddi De Pieri82e7dbb2011-11-19 11:37:14 -0300408static struct em28xx_reg_seq hauppauge_930c_digital[] = {
Frank Schaefer907d1092013-06-03 14:12:02 -0300409 {EM2874_R80_GPIO_P0_CTRL, 0xf6, 0xff, 10},
410 {EM2874_R80_GPIO_P0_CTRL, 0xe6, 0xff, 100},
411 {EM2874_R80_GPIO_P0_CTRL, 0xa6, 0xff, 10},
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300412 { -1, -1, -1, -1},
Eddi De Pieri82e7dbb2011-11-19 11:37:14 -0300413};
414#endif
415
Antti Palosaari35530852012-03-18 18:09:01 -0300416/* 1b80:e425 MaxMedia UB425-TC
Jakob Haufe7c1dfdb2013-04-13 11:03:37 -0300417 * 1b80:e1cc Delock 61959
Antti Palosaari35530852012-03-18 18:09:01 -0300418 * GPIO_6 - demod reset, 0=active
419 * GPIO_7 - LED, 0=active
420 */
421static struct em28xx_reg_seq maxmedia_ub425_tc[] = {
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300422 {EM2874_R80_GPIO_P0_CTRL, 0x83, 0xff, 100},
423 {EM2874_R80_GPIO_P0_CTRL, 0xc3, 0xff, 100}, /* GPIO_6 = 1 */
424 {EM2874_R80_GPIO_P0_CTRL, 0x43, 0xff, 000}, /* GPIO_7 = 0 */
425 { -1, -1, -1, -1},
Antti Palosaari35530852012-03-18 18:09:01 -0300426};
427
Ivan Kalvachevfa5527c2012-03-19 20:09:55 -0300428/* 2304:0242 PCTV QuatroStick (510e)
429 * GPIO_2: decoder reset, 0=active
430 * GPIO_4: decoder suspend, 0=active
431 * GPIO_6: demod reset, 0=active
432 * GPIO_7: LED, 1=active
433 */
434static struct em28xx_reg_seq pctv_510e[] = {
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300435 {EM2874_R80_GPIO_P0_CTRL, 0x10, 0xff, 100},
436 {EM2874_R80_GPIO_P0_CTRL, 0x14, 0xff, 100}, /* GPIO_2 = 1 */
437 {EM2874_R80_GPIO_P0_CTRL, 0x54, 0xff, 050}, /* GPIO_6 = 1 */
438 { -1, -1, -1, -1},
Ivan Kalvachevfa5527c2012-03-19 20:09:55 -0300439};
440
Antti Palosaaric247d7b2012-03-19 11:48:19 -0300441/* 2013:0251 PCTV QuatroStick nano (520e)
442 * GPIO_2: decoder reset, 0=active
443 * GPIO_4: decoder suspend, 0=active
444 * GPIO_6: demod reset, 0=active
445 * GPIO_7: LED, 1=active
446 */
447static struct em28xx_reg_seq pctv_520e[] = {
Frank Schaeferb68cafc2013-10-10 14:36:30 -0300448 {EM2874_R80_GPIO_P0_CTRL, 0x10, 0xff, 100},
449 {EM2874_R80_GPIO_P0_CTRL, 0x14, 0xff, 100}, /* GPIO_2 = 1 */
450 {EM2874_R80_GPIO_P0_CTRL, 0x54, 0xff, 050}, /* GPIO_6 = 1 */
451 {EM2874_R80_GPIO_P0_CTRL, 0xd4, 0xff, 000}, /* GPIO_7 = 1 */
452 { -1, -1, -1, -1},
Antti Palosaaric247d7b2012-03-19 11:48:19 -0300453};
454
Frank Schaefer0c37e732013-12-01 18:06:57 -0300455/* 1ae7:9003/9004 SpeedLink Vicious And Devine Laplace webcam
456 * reg 0x80/0x84:
457 * GPIO_0: capturing LED, 0=on, 1=off
458 * GPIO_2: AV mute button, 0=pressed, 1=unpressed
459 * GPIO 3: illumination button, 0=pressed, 1=unpressed
460 * GPIO_6: illumination/flash LED, 0=on, 1=off
461 * reg 0x81/0x85:
462 * GPIO_7: snapshot button, 0=pressed, 1=unpressed
463 */
464static struct em28xx_reg_seq speedlink_vad_laplace_reg_seq[] = {
465 {EM2820_R08_GPIO_CTRL, 0xf7, 0xff, 10},
466 {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xb2, 10},
467 { -1, -1, -1, -1},
468};
469
Antti Palosaari19229242014-04-10 22:11:27 -0300470static struct em28xx_reg_seq pctv_292e[] = {
471 {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 0},
472 {0x0d, 0xff, 0xff, 950},
473 {EM2874_R80_GPIO_P0_CTRL, 0xbd, 0xff, 100},
474 {EM2874_R80_GPIO_P0_CTRL, 0xfd, 0xff, 410},
475 {EM2874_R80_GPIO_P0_CTRL, 0x7d, 0xff, 300},
476 {EM2874_R80_GPIO_P0_CTRL, 0x7c, 0xff, 60},
477 {0x0d, 0x42, 0xff, 50},
478 {EM2874_R5F_TS_ENABLE, 0x85, 0xff, 0},
479 {-1, -1, -1, -1},
480};
481
Olli Salonenfc30dd762014-11-24 03:57:34 -0300482static struct em28xx_reg_seq terratec_t2_stick_hd[] = {
483 {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 0},
484 {0x0d, 0xff, 0xff, 600},
485 {EM2874_R80_GPIO_P0_CTRL, 0xfc, 0xff, 10},
486 {EM2874_R80_GPIO_P0_CTRL, 0xbc, 0xff, 100},
487 {EM2874_R80_GPIO_P0_CTRL, 0xfc, 0xff, 100},
488 {EM2874_R80_GPIO_P0_CTRL, 0x00, 0xff, 300},
489 {EM2874_R80_GPIO_P0_CTRL, 0xf8, 0xff, 100},
490 {EM2874_R80_GPIO_P0_CTRL, 0xfc, 0xff, 300},
491 {0x0d, 0x42, 0xff, 1000},
492 {EM2874_R5F_TS_ENABLE, 0x85, 0xff, 0},
493 {-1, -1, -1, -1},
494};
495
Satoshi Nagahamaab4d1452016-05-06 16:35:05 -0300496static struct em28xx_reg_seq plex_px_bcud[] = {
497 {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 0},
498 {0x0d, 0xff, 0xff, 0},
499 {EM2874_R50_IR_CONFIG, 0x01, 0xff, 0},
500 {EM28XX_R06_I2C_CLK, 0x40, 0xff, 0},
501 {EM2874_R80_GPIO_P0_CTRL, 0xfd, 0xff, 100},
502 {EM28XX_R12_VINENABLE, 0x20, 0x20, 0},
503 {0x0d, 0x42, 0xff, 1000},
504 {EM2874_R80_GPIO_P0_CTRL, 0xfc, 0xff, 10},
505 {EM2874_R80_GPIO_P0_CTRL, 0xfd, 0xff, 10},
506 {0x73, 0xfd, 0xff, 100},
507 {-1, -1, -1, -1},
508};
509
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -0300510/*
Olli Salonen11a2a942016-04-04 12:12:52 -0300511 * 2040:0265 Hauppauge WinTV-dualHD DVB
512 * reg 0x80/0x84:
513 * GPIO_0: Yellow LED tuner 1, 0=on, 1=off
514 * GPIO_1: Green LED tuner 1, 0=on, 1=off
515 * GPIO_2: Yellow LED tuner 2, 0=on, 1=off
516 * GPIO_3: Green LED tuner 2, 0=on, 1=off
517 * GPIO_5: Reset #2, 0=active
518 * GPIO_6: Reset #1, 0=active
519 */
520static struct em28xx_reg_seq hauppauge_dualhd_dvb[] = {
521 {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 0},
522 {0x0d, 0xff, 0xff, 200},
523 {0x50, 0x04, 0xff, 300},
524 {EM2874_R80_GPIO_P0_CTRL, 0xbf, 0xff, 100}, /* demod 1 reset */
525 {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 100},
526 {EM2874_R80_GPIO_P0_CTRL, 0xdf, 0xff, 100}, /* demod 2 reset */
527 {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 100},
528 {EM2874_R5F_TS_ENABLE, 0x44, 0xff, 50},
529 {EM2874_R5D_TS1_PKT_SIZE, 0x05, 0xff, 50},
530 {EM2874_R5E_TS2_PKT_SIZE, 0x05, 0xff, 50},
531 {-1, -1, -1, -1},
532};
533
534/*
Frank Schaeferf52226092013-12-01 18:06:52 -0300535 * Button definitions
536 */
537static struct em28xx_button std_snapshot_button[] = {
538 {
539 .role = EM28XX_BUTTON_SNAPSHOT,
540 .reg_r = EM28XX_R0C_USBSUSP,
541 .reg_clearing = EM28XX_R0C_USBSUSP,
542 .mask = EM28XX_R0C_USBSUSP_SNAPSHOT,
543 .inverted = 0,
544 },
545 {-1, 0, 0, 0, 0},
546};
547
Frank Schaefer0c37e732013-12-01 18:06:57 -0300548static struct em28xx_button speedlink_vad_laplace_buttons[] = {
549 {
550 .role = EM28XX_BUTTON_SNAPSHOT,
551 .reg_r = EM2874_R85_GPIO_P1_STATE,
552 .mask = 0x80,
553 .inverted = 1,
554 },
555 {
556 .role = EM28XX_BUTTON_ILLUMINATION,
557 .reg_r = EM2874_R84_GPIO_P0_STATE,
558 .mask = 0x08,
559 .inverted = 1,
560 },
561 {-1, 0, 0, 0, 0},
562};
563
564/*
565 * LED definitions
566 */
567static struct em28xx_led speedlink_vad_laplace_leds[] = {
568 {
569 .role = EM28XX_LED_ANALOG_CAPTURING,
570 .gpio_reg = EM2874_R80_GPIO_P0_CTRL,
571 .gpio_mask = 0x01,
572 .inverted = 1,
573 },
574 {
575 .role = EM28XX_LED_ILLUMINATION,
576 .gpio_reg = EM2874_R80_GPIO_P0_CTRL,
577 .gpio_mask = 0x40,
578 .inverted = 1,
579 },
580 {-1, 0, 0, 0},
581};
582
Mauro Carvalho Chehab59432be2014-03-04 12:34:34 -0300583static struct em28xx_led kworld_ub435q_v3_leds[] = {
584 {
585 .role = EM28XX_LED_DIGITAL_CAPTURING,
586 .gpio_reg = EM2874_R80_GPIO_P0_CTRL,
587 .gpio_mask = 0x80,
588 .inverted = 1,
589 },
590 {-1, 0, 0, 0},
591};
592
Mauro Carvalho Chehab88e4fcd2014-03-04 20:49:07 -0300593static struct em28xx_led pctv_80e_leds[] = {
594 {
595 .role = EM28XX_LED_DIGITAL_CAPTURING,
596 .gpio_reg = EM2874_R80_GPIO_P0_CTRL,
597 .gpio_mask = 0x80,
598 .inverted = 0,
599 },
600 {-1, 0, 0, 0},
601};
602
Matthieu Rogez565e37d2016-02-28 08:26:22 -0300603static struct em28xx_led terratec_grabby_leds[] = {
604 {
605 .role = EM28XX_LED_ANALOG_CAPTURING,
606 .gpio_reg = EM2820_R08_GPIO_CTRL,
607 .gpio_mask = EM_GPIO_3,
608 .inverted = 1,
609 },
610 {-1, 0, 0, 0},
611};
612
Olli Salonen11a2a942016-04-04 12:12:52 -0300613static struct em28xx_led hauppauge_dualhd_leds[] = {
614 {
615 .role = EM28XX_LED_DIGITAL_CAPTURING,
616 .gpio_reg = EM2874_R80_GPIO_P0_CTRL,
617 .gpio_mask = EM_GPIO_1,
618 .inverted = 1,
619 },
620 {
621 .role = EM28XX_LED_DIGITAL_CAPTURING_TS2,
622 .gpio_reg = EM2874_R80_GPIO_P0_CTRL,
623 .gpio_mask = EM_GPIO_3,
624 .inverted = 1,
625 },
626 {-1, 0, 0, 0},
627};
628
Frank Schaeferf52226092013-12-01 18:06:52 -0300629/*
Mauro Carvalho Chehab0ec202d2008-11-25 13:16:13 -0300630 * Board definitions
631 */
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800632struct em28xx_board em28xx_boards[] = {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300633 [EM2750_BOARD_UNKNOWN] = {
Mauro Carvalho Chehab8b220792009-07-12 10:56:21 -0300634 .name = "EM2710/EM2750/EM2751 webcam grabber",
Mauro Carvalho Chehab3d3215c2009-08-10 10:29:27 -0300635 .xclk = EM28XX_XCLK_FREQUENCY_20MHZ,
Mauro Carvalho Chehab8a2e6992009-07-12 10:26:36 -0300636 .tuner_type = TUNER_ABSENT,
637 .is_webcam = 1,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300638 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200639 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300640 .vmux = 0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300641 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabb80fd2d2009-07-14 21:08:22 -0300642 .gpio = silvercrest_reg_seq,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300643 } },
644 },
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -0800645 [EM2800_BOARD_UNKNOWN] = {
646 .name = "Unknown EM2800 video grabber",
647 .is_em2800 = 1,
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -0800648 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300649 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehab1c67e762008-11-27 07:46:59 -0300650 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300651 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200652 .type = EM28XX_VMUX_COMPOSITE,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300653 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300654 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300655 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800656 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300657 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300658 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300659 } },
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -0800660 },
661 [EM2820_BOARD_UNKNOWN] = {
Mauro Carvalho Chehaba2070c62008-11-25 07:05:06 -0300662 .name = "Unknown EM2750/28xx video grabber",
663 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehabb04fb662009-07-13 01:28:21 -0300664 .is_webcam = 1, /* To enable sensor probe */
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -0800665 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300666 [EM2750_BOARD_DLCW_130] = {
667 /* Beijing Huaqi Information Digital Technology Co., Ltd */
668 .name = "Huaqi DLCW-130",
669 .valid = EM28XX_BOARD_NOT_VALIDATED,
Mauro Carvalho Chehaba2070c62008-11-25 07:05:06 -0300670 .xclk = EM28XX_XCLK_FREQUENCY_48MHZ,
Mauro Carvalho Chehab8a2e6992009-07-12 10:26:36 -0300671 .tuner_type = TUNER_ABSENT,
672 .is_webcam = 1,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300673 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200674 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300675 .vmux = 0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300676 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300677 } },
678 },
Markus Rechberger4d17d082006-02-07 06:25:39 -0200679 [EM2820_BOARD_KWORLD_PVRTV2800RF] = {
Markus Rechberger33ccaa32006-02-07 06:25:41 -0200680 .name = "Kworld PVR TV 2800 RF",
Mauro Carvalho Chehabed086312008-01-24 06:59:20 -0300681 .tuner_type = TUNER_TEMIC_PAL,
Markus Rechberger4d17d082006-02-07 06:25:39 -0200682 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300683 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300684 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200685 .type = EM28XX_VMUX_COMPOSITE,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300686 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300687 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300688 }, {
Markus Rechberger4d17d082006-02-07 06:25:39 -0200689 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300690 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300691 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300692 } },
Markus Rechberger4d17d082006-02-07 06:25:39 -0200693 },
Douglas Schilling Landgraff7fe3e62009-01-19 09:31:55 -0300694 [EM2820_BOARD_GADMEI_TVR200] = {
695 .name = "Gadmei TVR200",
696 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
697 .tda9887_conf = TDA9887_PRESENT,
698 .decoder = EM28XX_SAA711X,
699 .input = { {
700 .type = EM28XX_VMUX_TELEVISION,
701 .vmux = SAA7115_COMPOSITE2,
702 .amux = EM28XX_AMUX_LINE_IN,
703 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200704 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraff7fe3e62009-01-19 09:31:55 -0300705 .vmux = SAA7115_COMPOSITE0,
706 .amux = EM28XX_AMUX_LINE_IN,
707 }, {
708 .type = EM28XX_VMUX_SVIDEO,
709 .vmux = SAA7115_SVIDEO3,
710 .amux = EM28XX_AMUX_LINE_IN,
711 } },
712 },
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800713 [EM2820_BOARD_TERRATEC_CINERGY_250] = {
714 .name = "Terratec Cinergy 250 USB",
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800715 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
Mauro Carvalho Chehabac07bb72009-09-08 14:04:41 -0300716 .has_ir_i2c = 1,
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800717 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300718 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300719 .input = { {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800720 .type = EM28XX_VMUX_TELEVISION,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300721 .vmux = SAA7115_COMPOSITE2,
Frank Schaefer5e8d02b2013-01-05 08:44:09 -0300722 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300723 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200724 .type = EM28XX_VMUX_COMPOSITE,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300725 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300726 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300727 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800728 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300729 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300730 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300731 } },
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800732 },
733 [EM2820_BOARD_PINNACLE_USB_2] = {
734 .name = "Pinnacle PCTV USB 2",
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800735 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
Mauro Carvalho Chehabac07bb72009-09-08 14:04:41 -0300736 .has_ir_i2c = 1,
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800737 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300738 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300739 .input = { {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800740 .type = EM28XX_VMUX_TELEVISION,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300741 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300742 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300743 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200744 .type = EM28XX_VMUX_COMPOSITE,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300745 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300746 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300747 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800748 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300749 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300750 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300751 } },
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800752 },
753 [EM2820_BOARD_HAUPPAUGE_WINTV_USB_2] = {
754 .name = "Hauppauge WinTV USB 2",
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800755 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300756 .tda9887_conf = TDA9887_PRESENT |
Nicola Soranzoa1a6ee72009-02-10 23:28:24 -0300757 TDA9887_PORT1_ACTIVE |
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300758 TDA9887_PORT2_ACTIVE,
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800759 .decoder = EM28XX_TVP5150,
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800760 .has_msp34xx = 1,
Mauro Carvalho Chehabac07bb72009-09-08 14:04:41 -0300761 .has_ir_i2c = 1,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300762 .input = { {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800763 .type = EM28XX_VMUX_TELEVISION,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300764 .vmux = TVP5150_COMPOSITE0,
Hans Verkuil2474ed42006-03-19 12:35:57 -0300765 .amux = MSP_INPUT_DEFAULT,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300766 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800767 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300768 .vmux = TVP5150_SVIDEO,
Hans Verkuil07151722006-04-01 18:03:23 -0300769 .amux = MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1,
770 MSP_DSP_IN_SCART, MSP_DSP_IN_SCART),
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300771 } },
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800772 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300773 [EM2820_BOARD_DLINK_USB_TV] = {
774 .name = "D-Link DUB-T210 TV Tuner",
775 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300776 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
777 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300778 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300779 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300780 .type = EM28XX_VMUX_TELEVISION,
781 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300782 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300783 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200784 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300785 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300786 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300787 }, {
788 .type = EM28XX_VMUX_SVIDEO,
789 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300790 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300791 } },
792 },
793 [EM2820_BOARD_HERCULES_SMART_TV_USB2] = {
794 .name = "Hercules Smart TV USB 2.0",
795 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300796 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
797 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300798 .decoder = EM28XX_SAA711X,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300799 .input = { {
800 .type = EM28XX_VMUX_TELEVISION,
801 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300802 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300803 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200804 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300805 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300806 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300807 }, {
808 .type = EM28XX_VMUX_SVIDEO,
809 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300810 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300811 } },
812 },
813 [EM2820_BOARD_PINNACLE_USB_2_FM1216ME] = {
814 .name = "Pinnacle PCTV USB 2 (Philips FM1216ME)",
815 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300816 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
817 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300818 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300819 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300820 .type = EM28XX_VMUX_TELEVISION,
821 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300822 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300823 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200824 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300825 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300826 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300827 }, {
828 .type = EM28XX_VMUX_SVIDEO,
829 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300830 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300831 } },
832 },
833 [EM2820_BOARD_GADMEI_UTV310] = {
834 .name = "Gadmei UTV310",
835 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300836 .tuner_type = TUNER_TNF_5335MF,
837 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300838 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300839 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300840 .type = EM28XX_VMUX_TELEVISION,
841 .vmux = SAA7115_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300842 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300843 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200844 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300845 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300846 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300847 }, {
848 .type = EM28XX_VMUX_SVIDEO,
849 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300850 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300851 } },
852 },
853 [EM2820_BOARD_LEADTEK_WINFAST_USBII_DELUXE] = {
854 .name = "Leadtek Winfast USB II Deluxe",
855 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300856 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
Magnus Almca39d842009-11-13 05:48:24 -0300857 .has_ir_i2c = 1,
858 .tvaudio_addr = 0x58,
859 .tda9887_conf = TDA9887_PRESENT |
860 TDA9887_PORT2_ACTIVE |
861 TDA9887_QSS,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300862 .decoder = EM28XX_SAA711X,
Magnus Almca39d842009-11-13 05:48:24 -0300863 .adecoder = EM28XX_TVAUDIO,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300864 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300865 .type = EM28XX_VMUX_TELEVISION,
Magnus Almca39d842009-11-13 05:48:24 -0300866 .vmux = SAA7115_COMPOSITE4,
867 .amux = EM28XX_AMUX_AUX,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300868 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200869 .type = EM28XX_VMUX_COMPOSITE,
Magnus Almca39d842009-11-13 05:48:24 -0300870 .vmux = SAA7115_COMPOSITE5,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300871 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300872 }, {
873 .type = EM28XX_VMUX_SVIDEO,
Magnus Almca39d842009-11-13 05:48:24 -0300874 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300875 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300876 } },
Magnus Almca39d842009-11-13 05:48:24 -0300877 .radio = {
878 .type = EM28XX_RADIO,
879 .amux = EM28XX_AMUX_AUX,
880 }
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300881 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300882 [EM2820_BOARD_VIDEOLOGY_20K14XUSB] = {
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300883 .name = "Videology 20K14XUSB USB2.0",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300884 .valid = EM28XX_BOARD_NOT_VALIDATED,
Mauro Carvalho Chehab8a2e6992009-07-12 10:26:36 -0300885 .tuner_type = TUNER_ABSENT,
886 .is_webcam = 1,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300887 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200888 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300889 .vmux = 0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300890 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300891 } },
892 },
Mauro Carvalho Chehab02e78042009-06-29 11:35:05 -0300893 [EM2820_BOARD_SILVERCREST_WEBCAM] = {
894 .name = "Silvercrest Webcam 1.3mpix",
895 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehabc43221d2009-07-12 10:23:23 -0300896 .is_webcam = 1,
Mauro Carvalho Chehab02e78042009-06-29 11:35:05 -0300897 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200898 .type = EM28XX_VMUX_COMPOSITE,
Mauro Carvalho Chehab02e78042009-06-29 11:35:05 -0300899 .vmux = 0,
900 .amux = EM28XX_AMUX_VIDEO,
901 .gpio = silvercrest_reg_seq,
902 } },
903 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300904 [EM2821_BOARD_SUPERCOMP_USB_2] = {
905 .name = "Supercomp USB 2.0 TV",
906 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300907 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
908 .tda9887_conf = TDA9887_PRESENT |
909 TDA9887_PORT1_ACTIVE |
910 TDA9887_PORT2_ACTIVE,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300911 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300912 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300913 .type = EM28XX_VMUX_TELEVISION,
914 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300915 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300916 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200917 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300918 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300919 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300920 }, {
921 .type = EM28XX_VMUX_SVIDEO,
922 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300923 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300924 } },
925 },
926 [EM2821_BOARD_USBGEAR_VD204] = {
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300927 .name = "Usbgear VD204v9",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300928 .valid = EM28XX_BOARD_NOT_VALIDATED,
Mauro Carvalho Chehab1c67e762008-11-27 07:46:59 -0300929 .tuner_type = TUNER_ABSENT, /* Capture only device */
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300930 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300931 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200932 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300933 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300934 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300935 }, {
936 .type = EM28XX_VMUX_SVIDEO,
937 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300938 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300939 } },
940 },
941 [EM2860_BOARD_NETGMBH_CAM] = {
942 /* Beijing Huaqi Information Digital Technology Co., Ltd */
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300943 .name = "NetGMBH Cam",
944 .valid = EM28XX_BOARD_NOT_VALIDATED,
Mauro Carvalho Chehab8a2e6992009-07-12 10:26:36 -0300945 .tuner_type = TUNER_ABSENT,
946 .is_webcam = 1,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300947 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200948 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300949 .vmux = 0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300950 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300951 } },
952 },
953 [EM2860_BOARD_TYPHOON_DVD_MAKER] = {
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300954 .name = "Typhoon DVD Maker",
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300955 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehab1c67e762008-11-27 07:46:59 -0300956 .tuner_type = TUNER_ABSENT, /* Capture only device */
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300957 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200958 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300959 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300960 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300961 }, {
962 .type = EM28XX_VMUX_SVIDEO,
963 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300964 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300965 } },
966 },
967 [EM2860_BOARD_GADMEI_UTV330] = {
968 .name = "Gadmei UTV330",
969 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300970 .tuner_type = TUNER_TNF_5335MF,
971 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -0300972 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -0300973 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300974 .type = EM28XX_VMUX_TELEVISION,
975 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300976 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300977 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200978 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300979 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300980 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300981 }, {
982 .type = EM28XX_VMUX_SVIDEO,
983 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300984 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300985 } },
986 },
Mauro Carvalho Chehab6d888a62009-08-30 13:05:56 -0300987 [EM2861_BOARD_GADMEI_UTV330PLUS] = {
988 .name = "Gadmei UTV330+",
989 .tuner_type = TUNER_TNF_5335MF,
990 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehab02858ee2010-04-02 20:01:00 -0300991 .ir_codes = RC_MAP_GADMEI_RM008Z,
Mauro Carvalho Chehab6d888a62009-08-30 13:05:56 -0300992 .decoder = EM28XX_SAA711X,
993 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ,
994 .input = { {
995 .type = EM28XX_VMUX_TELEVISION,
996 .vmux = SAA7115_COMPOSITE2,
997 .amux = EM28XX_AMUX_VIDEO,
998 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -0200999 .type = EM28XX_VMUX_COMPOSITE,
Mauro Carvalho Chehab6d888a62009-08-30 13:05:56 -03001000 .vmux = SAA7115_COMPOSITE0,
1001 .amux = EM28XX_AMUX_LINE_IN,
1002 }, {
1003 .type = EM28XX_VMUX_SVIDEO,
1004 .vmux = SAA7115_SVIDEO3,
1005 .amux = EM28XX_AMUX_LINE_IN,
1006 } },
1007 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001008 [EM2860_BOARD_TERRATEC_HYBRID_XS] = {
1009 .name = "Terratec Cinergy A Hybrid XS",
1010 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001011 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001012 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001013 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001014
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001015 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001016 .type = EM28XX_VMUX_TELEVISION,
1017 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001018 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001019 .gpio = hauppauge_wintv_hvr_900_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001020 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001021 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001022 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001023 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001024 .gpio = hauppauge_wintv_hvr_900_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001025 }, {
1026 .type = EM28XX_VMUX_SVIDEO,
1027 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001028 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001029 .gpio = hauppauge_wintv_hvr_900_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001030 } },
1031 },
1032 [EM2861_BOARD_KWORLD_PVRTV_300U] = {
1033 .name = "KWorld PVRTV 300U",
1034 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001035 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001036 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001037 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001038 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001039 .type = EM28XX_VMUX_TELEVISION,
1040 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001041 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001042 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001043 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001044 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001045 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001046 }, {
1047 .type = EM28XX_VMUX_SVIDEO,
1048 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001049 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001050 } },
1051 },
1052 [EM2861_BOARD_YAKUMO_MOVIE_MIXER] = {
1053 .name = "Yakumo MovieMixer",
Nicola Soranzoa1a6ee72009-02-10 23:28:24 -03001054 .tuner_type = TUNER_ABSENT, /* Capture only device */
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001055 .decoder = EM28XX_TVP5150,
1056 .input = { {
1057 .type = EM28XX_VMUX_TELEVISION,
1058 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001059 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001060 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001061 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001062 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001063 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001064 }, {
1065 .type = EM28XX_VMUX_SVIDEO,
1066 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001067 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001068 } },
1069 },
Devin Heitmueller443fed92010-03-19 23:53:12 -03001070 [EM2860_BOARD_TVP5150_REFERENCE_DESIGN] = {
1071 .name = "EM2860/TVP5150 Reference Design",
1072 .tuner_type = TUNER_ABSENT, /* Capture only device */
1073 .decoder = EM28XX_TVP5150,
1074 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001075 .type = EM28XX_VMUX_COMPOSITE,
Devin Heitmueller443fed92010-03-19 23:53:12 -03001076 .vmux = TVP5150_COMPOSITE1,
1077 .amux = EM28XX_AMUX_LINE_IN,
1078 }, {
1079 .type = EM28XX_VMUX_SVIDEO,
1080 .vmux = TVP5150_SVIDEO,
1081 .amux = EM28XX_AMUX_LINE_IN,
1082 } },
1083 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001084 [EM2861_BOARD_PLEXTOR_PX_TV100U] = {
1085 .name = "Plextor ConvertX PX-TV100U",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001086 .tuner_type = TUNER_TNF_5335MF,
Mauro Carvalho Chehab0a6e44d2009-07-29 01:39:12 -03001087 .xclk = EM28XX_XCLK_I2S_MSB_TIMING |
1088 EM28XX_XCLK_FREQUENCY_12MHZ,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001089 .tda9887_conf = TDA9887_PRESENT,
1090 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehab0a6e44d2009-07-29 01:39:12 -03001091 .has_msp34xx = 1,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001092 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001093 .type = EM28XX_VMUX_TELEVISION,
1094 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001095 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab0a6e44d2009-07-29 01:39:12 -03001096 .gpio = pinnacle_hybrid_pro_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001097 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001098 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001099 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001100 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab0a6e44d2009-07-29 01:39:12 -03001101 .gpio = pinnacle_hybrid_pro_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001102 }, {
1103 .type = EM28XX_VMUX_SVIDEO,
1104 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001105 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab0a6e44d2009-07-29 01:39:12 -03001106 .gpio = pinnacle_hybrid_pro_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001107 } },
1108 },
Mauro Carvalho Chehab1c67e762008-11-27 07:46:59 -03001109
1110 /* Those boards with em2870 are DVB Only*/
1111
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001112 [EM2870_BOARD_TERRATEC_XS] = {
1113 .name = "Terratec Cinergy T XS",
1114 .valid = EM28XX_BOARD_NOT_VALIDATED,
1115 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001116 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001117 },
1118 [EM2870_BOARD_TERRATEC_XS_MT2060] = {
1119 .name = "Terratec Cinergy T XS (MT2060)",
Alberto Mardegan8c473112015-10-27 17:24:14 -02001120 .xclk = EM28XX_XCLK_IR_RC5_MODE |
1121 EM28XX_XCLK_FREQUENCY_12MHZ,
1122 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001123 .tuner_type = TUNER_ABSENT, /* MT2060 */
Alberto Mardegan8c473112015-10-27 17:24:14 -02001124 .has_dvb = 1,
1125 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001126 },
1127 [EM2870_BOARD_KWORLD_350U] = {
1128 .name = "Kworld 350 U DVB-T",
1129 .valid = EM28XX_BOARD_NOT_VALIDATED,
1130 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001131 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001132 },
1133 [EM2870_BOARD_KWORLD_355U] = {
1134 .name = "Kworld 355 U DVB-T",
1135 .valid = EM28XX_BOARD_NOT_VALIDATED,
Aivar Päkk1985f6f2011-12-11 18:15:00 -03001136 .tuner_type = TUNER_ABSENT,
1137 .tuner_gpio = default_tuner_gpio,
1138 .has_dvb = 1,
1139 .dvb_gpio = default_digital,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001140 },
1141 [EM2870_BOARD_PINNACLE_PCTV_DVB] = {
1142 .name = "Pinnacle PCTV DVB-T",
1143 .valid = EM28XX_BOARD_NOT_VALIDATED,
1144 .tuner_type = TUNER_ABSENT, /* MT2060 */
Mauro Carvalho Chehaba2070c62008-11-25 07:05:06 -03001145 /* djh - I have serious doubts this is right... */
1146 .xclk = EM28XX_XCLK_IR_RC5_MODE |
1147 EM28XX_XCLK_FREQUENCY_10MHZ,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001148 },
1149 [EM2870_BOARD_COMPRO_VIDEOMATE] = {
1150 .name = "Compro, VideoMate U3",
1151 .valid = EM28XX_BOARD_NOT_VALIDATED,
1152 .tuner_type = TUNER_ABSENT, /* MT2060 */
1153 },
Mauro Carvalho Chehab1c67e762008-11-27 07:46:59 -03001154
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001155 [EM2880_BOARD_TERRATEC_HYBRID_XS_FR] = {
1156 .name = "Terratec Hybrid XS Secam",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001157 .has_msp34xx = 1,
1158 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001159 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001160 .decoder = EM28XX_TVP5150,
Catimimi65638012010-02-18 18:06:32 -03001161 .has_dvb = 1,
Michel Garniercec4e6c2010-10-16 14:42:01 -03001162 .dvb_gpio = terratec_cinergy_USB_XS_FR_digital,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001163 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001164 .type = EM28XX_VMUX_TELEVISION,
1165 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001166 .amux = EM28XX_AMUX_VIDEO,
Michel Garniercec4e6c2010-10-16 14:42:01 -03001167 .gpio = terratec_cinergy_USB_XS_FR_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001168 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001169 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001170 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001171 .amux = EM28XX_AMUX_LINE_IN,
Michel Garniercec4e6c2010-10-16 14:42:01 -03001172 .gpio = terratec_cinergy_USB_XS_FR_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001173 }, {
1174 .type = EM28XX_VMUX_SVIDEO,
1175 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001176 .amux = EM28XX_AMUX_LINE_IN,
Michel Garniercec4e6c2010-10-16 14:42:01 -03001177 .gpio = terratec_cinergy_USB_XS_FR_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001178 } },
1179 },
Mauro Carvalho Chehabfec528b2011-07-03 21:05:06 -03001180 [EM2884_BOARD_TERRATEC_H5] = {
1181 .name = "Terratec Cinergy H5",
1182 .has_dvb = 1,
1183#if 0
1184 .tuner_type = TUNER_PHILIPS_TDA8290,
1185 .tuner_addr = 0x41,
1186 .dvb_gpio = terratec_h5_digital, /* FIXME: probably wrong */
1187 .tuner_gpio = terratec_h5_gpio,
Mauro Carvalho Chehabde724052011-11-20 11:23:24 -02001188#else
1189 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehabfec528b2011-07-03 21:05:06 -03001190#endif
Mauro Carvalho Chehab3aa2b3b2013-03-05 06:55:27 -03001191 .def_i2c_bus = 1,
1192 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
Mauro Carvalho Chehabfec528b2011-07-03 21:05:06 -03001193 EM28XX_I2C_FREQ_400_KHZ,
1194 },
Eddi De Pieri82e7dbb2011-11-19 11:37:14 -03001195 [EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C] = {
1196 .name = "Hauppauge WinTV HVR 930C",
1197 .has_dvb = 1,
Mauro Carvalho Chehabde724052011-11-20 11:23:24 -02001198#if 0 /* FIXME: Add analog support */
1199 .tuner_type = TUNER_XC5000,
1200 .tuner_addr = 0x41,
1201 .dvb_gpio = hauppauge_930c_digital,
Eddi De Pieri82e7dbb2011-11-19 11:37:14 -03001202 .tuner_gpio = hauppauge_930c_gpio,
Mauro Carvalho Chehabde724052011-11-20 11:23:24 -02001203#else
1204 .tuner_type = TUNER_ABSENT,
1205#endif
Mauro Carvalho Chehabdfbbf5d2011-11-20 12:16:25 -02001206 .ir_codes = RC_MAP_HAUPPAUGE,
Mauro Carvalho Chehab3aa2b3b2013-03-05 06:55:27 -03001207 .def_i2c_bus = 1,
1208 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
Eddi De Pieri82e7dbb2011-11-19 11:37:14 -03001209 EM28XX_I2C_FREQ_400_KHZ,
1210 },
Mauro Carvalho Chehab4159d012013-02-28 10:35:56 -03001211 [EM2884_BOARD_C3TECH_DIGITAL_DUO] = {
1212 .name = "C3 Tech Digital Duo HDTV/SDTV USB",
1213 .has_dvb = 1,
1214 /* FIXME: Add analog support - need a saa7136 driver */
1215 .tuner_type = TUNER_ABSENT, /* Digital-only TDA18271HD */
1216 .ir_codes = RC_MAP_EMPTY,
1217 .def_i2c_bus = 1,
1218 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE,
1219 .dvb_gpio = c3tech_digital_duo_digital,
1220 },
Andreas Oberrittera1ed02e2011-11-16 11:06:50 -03001221 [EM2884_BOARD_CINERGY_HTC_STICK] = {
1222 .name = "Terratec Cinergy HTC Stick",
1223 .has_dvb = 1,
Martin Blumenstinglc8dce002012-06-12 18:19:28 -03001224 .ir_codes = RC_MAP_NEC_TERRATEC_CINERGY_XS,
1225 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab3aa2b3b2013-03-05 06:55:27 -03001226 .def_i2c_bus = 1,
1227 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08001228 EM28XX_I2C_FREQ_400_KHZ,
1229 },
Gilles Risch1fe0fbd2015-03-01 17:11:05 -03001230 [EM2884_BOARD_ELGATO_EYETV_HYBRID_2008] = {
1231 .name = "Elgato EyeTV Hybrid 2008 INT",
1232 .has_dvb = 1,
1233 .ir_codes = RC_MAP_NEC_TERRATEC_CINERGY_XS,
1234 .tuner_type = TUNER_ABSENT,
1235 .def_i2c_bus = 1,
1236 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
1237 EM28XX_I2C_FREQ_400_KHZ,
1238 },
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001239 [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900] = {
Aidan Thornton122d1582007-11-20 15:25:08 -03001240 .name = "Hauppauge WinTV HVR 900",
Aidan Thornton122d1582007-11-20 15:25:08 -03001241 .tda9887_conf = TDA9887_PRESENT,
1242 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001243 .tuner_gpio = default_tuner_gpio,
Mauro Carvalho Chehab5add9a62007-11-22 12:08:53 -03001244 .mts_firmware = 1,
Mauro Carvalho Chehaba2070c62008-11-25 07:05:06 -03001245 .has_dvb = 1,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001246 .dvb_gpio = hauppauge_wintv_hvr_900_digital,
Mauro Carvalho Chehabaf86ce72011-01-24 12:18:48 -03001247 .ir_codes = RC_MAP_HAUPPAUGE,
Aidan Thornton122d1582007-11-20 15:25:08 -03001248 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001249 .input = { {
Aidan Thornton122d1582007-11-20 15:25:08 -03001250 .type = EM28XX_VMUX_TELEVISION,
1251 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001252 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001253 .gpio = hauppauge_wintv_hvr_900_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001254 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001255 .type = EM28XX_VMUX_COMPOSITE,
Aidan Thornton122d1582007-11-20 15:25:08 -03001256 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001257 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001258 .gpio = hauppauge_wintv_hvr_900_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001259 }, {
Aidan Thornton122d1582007-11-20 15:25:08 -03001260 .type = EM28XX_VMUX_SVIDEO,
1261 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001262 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001263 .gpio = hauppauge_wintv_hvr_900_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001264 } },
Aidan Thornton122d1582007-11-20 15:25:08 -03001265 },
Devin Heitmueller17d9d552008-06-08 10:22:03 -03001266 [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2] = {
1267 .name = "Hauppauge WinTV HVR 900 (R2)",
Devin Heitmueller17d9d552008-06-08 10:22:03 -03001268 .tda9887_conf = TDA9887_PRESENT,
1269 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001270 .tuner_gpio = default_tuner_gpio,
Devin Heitmueller17d9d552008-06-08 10:22:03 -03001271 .mts_firmware = 1,
Devin Heitmueller75e2b862011-03-13 02:01:02 -03001272 .has_dvb = 1,
Devin Heitmueller7030f522011-03-13 02:04:53 -03001273 .dvb_gpio = hauppauge_wintv_hvr_900R2_digital,
Mauro Carvalho Chehabaf86ce72011-01-24 12:18:48 -03001274 .ir_codes = RC_MAP_HAUPPAUGE,
Devin Heitmueller17d9d552008-06-08 10:22:03 -03001275 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001276 .input = { {
Devin Heitmueller17d9d552008-06-08 10:22:03 -03001277 .type = EM28XX_VMUX_TELEVISION,
1278 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001279 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001280 .gpio = hauppauge_wintv_hvr_900_analog,
Devin Heitmueller17d9d552008-06-08 10:22:03 -03001281 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001282 .type = EM28XX_VMUX_COMPOSITE,
Devin Heitmueller17d9d552008-06-08 10:22:03 -03001283 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehaba5942b52008-11-27 07:44:00 -03001284 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001285 .gpio = hauppauge_wintv_hvr_900_analog,
Devin Heitmueller17d9d552008-06-08 10:22:03 -03001286 }, {
1287 .type = EM28XX_VMUX_SVIDEO,
1288 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001289 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001290 .gpio = hauppauge_wintv_hvr_900_analog,
Devin Heitmueller17d9d552008-06-08 10:22:03 -03001291 } },
1292 },
Douglas Schilling Landgraff89bc322008-12-01 21:01:04 -03001293 [EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850] = {
1294 .name = "Hauppauge WinTV HVR 850",
1295 .tuner_type = TUNER_XC2028,
1296 .tuner_gpio = default_tuner_gpio,
1297 .mts_firmware = 1,
1298 .has_dvb = 1,
1299 .dvb_gpio = hauppauge_wintv_hvr_900_digital,
Mauro Carvalho Chehabaf86ce72011-01-24 12:18:48 -03001300 .ir_codes = RC_MAP_HAUPPAUGE,
Douglas Schilling Landgraff89bc322008-12-01 21:01:04 -03001301 .decoder = EM28XX_TVP5150,
1302 .input = { {
1303 .type = EM28XX_VMUX_TELEVISION,
1304 .vmux = TVP5150_COMPOSITE0,
1305 .amux = EM28XX_AMUX_VIDEO,
1306 .gpio = hauppauge_wintv_hvr_900_analog,
1307 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001308 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraff89bc322008-12-01 21:01:04 -03001309 .vmux = TVP5150_COMPOSITE1,
1310 .amux = EM28XX_AMUX_LINE_IN,
1311 .gpio = hauppauge_wintv_hvr_900_analog,
1312 }, {
1313 .type = EM28XX_VMUX_SVIDEO,
1314 .vmux = TVP5150_SVIDEO,
1315 .amux = EM28XX_AMUX_LINE_IN,
1316 .gpio = hauppauge_wintv_hvr_900_analog,
1317 } },
1318 },
Mauro Carvalho Chehab10ac6602008-07-27 14:58:58 -03001319 [EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950] = {
Mauro Carvalho Chehab3abee532008-01-05 17:01:41 -03001320 .name = "Hauppauge WinTV HVR 950",
Mauro Carvalho Chehab3abee532008-01-05 17:01:41 -03001321 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001322 .tuner_gpio = default_tuner_gpio,
Mauro Carvalho Chehab3abee532008-01-05 17:01:41 -03001323 .mts_firmware = 1,
Mauro Carvalho Chehab227ad4a2008-04-17 21:37:40 -03001324 .has_dvb = 1,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001325 .dvb_gpio = hauppauge_wintv_hvr_900_digital,
Mauro Carvalho Chehab15195d32011-01-24 12:18:47 -03001326 .ir_codes = RC_MAP_HAUPPAUGE,
Mauro Carvalho Chehab3abee532008-01-05 17:01:41 -03001327 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001328 .input = { {
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001329 .type = EM28XX_VMUX_TELEVISION,
1330 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001331 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001332 .gpio = hauppauge_wintv_hvr_900_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001333 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001334 .type = EM28XX_VMUX_COMPOSITE,
Mauro Carvalho Chehab7d070e22007-11-01 21:52:58 -03001335 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001336 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001337 .gpio = hauppauge_wintv_hvr_900_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001338 }, {
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001339 .type = EM28XX_VMUX_SVIDEO,
1340 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001341 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001342 .gpio = hauppauge_wintv_hvr_900_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001343 } },
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001344 },
Devin Heitmueller4fd305b2008-06-04 13:43:46 -03001345 [EM2880_BOARD_PINNACLE_PCTV_HD_PRO] = {
1346 .name = "Pinnacle PCTV HD Pro Stick",
Devin Heitmueller4fd305b2008-06-04 13:43:46 -03001347 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001348 .tuner_gpio = default_tuner_gpio,
Devin Heitmueller4fd305b2008-06-04 13:43:46 -03001349 .mts_firmware = 1,
Devin Heitmueller4fd305b2008-06-04 13:43:46 -03001350 .has_dvb = 1,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001351 .dvb_gpio = hauppauge_wintv_hvr_900_digital,
Mauro Carvalho Chehab02858ee2010-04-02 20:01:00 -03001352 .ir_codes = RC_MAP_PINNACLE_PCTV_HD,
Devin Heitmueller4fd305b2008-06-04 13:43:46 -03001353 .decoder = EM28XX_TVP5150,
1354 .input = { {
1355 .type = EM28XX_VMUX_TELEVISION,
1356 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001357 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001358 .gpio = hauppauge_wintv_hvr_900_analog,
Devin Heitmueller4fd305b2008-06-04 13:43:46 -03001359 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001360 .type = EM28XX_VMUX_COMPOSITE,
Devin Heitmueller4fd305b2008-06-04 13:43:46 -03001361 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001362 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001363 .gpio = hauppauge_wintv_hvr_900_analog,
Devin Heitmueller4fd305b2008-06-04 13:43:46 -03001364 }, {
1365 .type = EM28XX_VMUX_SVIDEO,
1366 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001367 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001368 .gpio = hauppauge_wintv_hvr_900_analog,
Devin Heitmueller4fd305b2008-06-04 13:43:46 -03001369 } },
1370 },
Devin Heitmuellere14b3652008-07-26 11:04:33 -03001371 [EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600] = {
1372 .name = "AMD ATI TV Wonder HD 600",
Devin Heitmuellere14b3652008-07-26 11:04:33 -03001373 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001374 .tuner_gpio = default_tuner_gpio,
Devin Heitmuellere14b3652008-07-26 11:04:33 -03001375 .mts_firmware = 1,
Devin Heitmuellere14b3652008-07-26 11:04:33 -03001376 .has_dvb = 1,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001377 .dvb_gpio = hauppauge_wintv_hvr_900_digital,
Mauro Carvalho Chehab02858ee2010-04-02 20:01:00 -03001378 .ir_codes = RC_MAP_ATI_TV_WONDER_HD_600,
Devin Heitmuellere14b3652008-07-26 11:04:33 -03001379 .decoder = EM28XX_TVP5150,
1380 .input = { {
1381 .type = EM28XX_VMUX_TELEVISION,
1382 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001383 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001384 .gpio = hauppauge_wintv_hvr_900_analog,
Devin Heitmuellere14b3652008-07-26 11:04:33 -03001385 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001386 .type = EM28XX_VMUX_COMPOSITE,
Devin Heitmuellere14b3652008-07-26 11:04:33 -03001387 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001388 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001389 .gpio = hauppauge_wintv_hvr_900_analog,
Devin Heitmuellere14b3652008-07-26 11:04:33 -03001390 }, {
1391 .type = EM28XX_VMUX_SVIDEO,
1392 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001393 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001394 .gpio = hauppauge_wintv_hvr_900_analog,
Devin Heitmuellere14b3652008-07-26 11:04:33 -03001395 } },
1396 },
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001397 [EM2880_BOARD_TERRATEC_HYBRID_XS] = {
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001398 .name = "Terratec Hybrid XS",
1399 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001400 .tuner_gpio = default_tuner_gpio,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001401 .decoder = EM28XX_TVP5150,
reinhard schwab655b8402008-07-26 10:47:00 -03001402 .has_dvb = 1,
Devin Heitmuellerf7976082009-06-22 22:32:32 -03001403 .dvb_gpio = default_digital,
Mauro Carvalho Chehab02858ee2010-04-02 20:01:00 -03001404 .ir_codes = RC_MAP_TERRATEC_CINERGY_XS,
Devin Heitmueller8cd9aae2009-08-03 23:56:51 -03001405 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, /* NEC IR */
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001406 .input = { {
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001407 .type = EM28XX_VMUX_TELEVISION,
1408 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001409 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001410 .gpio = default_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001411 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001412 .type = EM28XX_VMUX_COMPOSITE,
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001413 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001414 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001415 .gpio = default_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001416 }, {
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001417 .type = EM28XX_VMUX_SVIDEO,
1418 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001419 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001420 .gpio = default_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001421 } },
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001422 },
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001423 /* maybe there's a reason behind it why Terratec sells the Hybrid XS
1424 as Prodigy XS with a different PID, let's keep it separated for now
1425 maybe we'll need it lateron */
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001426 [EM2880_BOARD_TERRATEC_PRODIGY_XS] = {
1427 .name = "Terratec Prodigy XS",
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001428 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001429 .tuner_gpio = default_tuner_gpio,
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001430 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001431 .input = { {
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001432 .type = EM28XX_VMUX_TELEVISION,
1433 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001434 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001435 .gpio = hauppauge_wintv_hvr_900_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001436 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001437 .type = EM28XX_VMUX_COMPOSITE,
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001438 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001439 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001440 .gpio = hauppauge_wintv_hvr_900_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001441 }, {
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001442 .type = EM28XX_VMUX_SVIDEO,
1443 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001444 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001445 .gpio = hauppauge_wintv_hvr_900_analog,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001446 } },
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -03001447 },
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08001448 [EM2820_BOARD_MSI_VOX_USB_2] = {
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -03001449 .name = "MSI VOX USB 2.0",
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -03001450 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
1451 .tda9887_conf = TDA9887_PRESENT |
1452 TDA9887_PORT1_ACTIVE |
1453 TDA9887_PORT2_ACTIVE,
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -03001454 .max_range_640_480 = 1,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -03001455 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -03001456 .input = { {
1457 .type = EM28XX_VMUX_TELEVISION,
1458 .vmux = SAA7115_COMPOSITE4,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001459 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001460 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001461 .type = EM28XX_VMUX_COMPOSITE,
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -03001462 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001463 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001464 }, {
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -03001465 .type = EM28XX_VMUX_SVIDEO,
1466 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001467 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001468 } },
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08001469 },
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -08001470 [EM2800_BOARD_TERRATEC_CINERGY_200] = {
1471 .name = "Terratec Cinergy 200 USB",
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -08001472 .is_em2800 = 1,
Mauro Carvalho Chehabac07bb72009-09-08 14:04:41 -03001473 .has_ir_i2c = 1,
Sascha Sommer53b667e2012-01-08 16:41:22 -03001474 .tuner_type = TUNER_LG_TALN,
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -08001475 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -03001476 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001477 .input = { {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -08001478 .type = EM28XX_VMUX_TELEVISION,
Hans Verkuilc7c0b342006-04-02 13:35:00 -03001479 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001480 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001481 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001482 .type = EM28XX_VMUX_COMPOSITE,
Hans Verkuilc7c0b342006-04-02 13:35:00 -03001483 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001484 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001485 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -08001486 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -03001487 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001488 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001489 } },
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -08001490 },
Aron Szabo59d07f12008-07-27 13:47:52 -03001491 [EM2800_BOARD_GRABBEEX_USB2800] = {
Nicola Soranzoa1a6ee72009-02-10 23:28:24 -03001492 .name = "eMPIA Technology, Inc. GrabBeeX+ Video Encoder",
1493 .is_em2800 = 1,
1494 .decoder = EM28XX_SAA711X,
1495 .tuner_type = TUNER_ABSENT, /* capture only board */
1496 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001497 .type = EM28XX_VMUX_COMPOSITE,
Aron Szabo59d07f12008-07-27 13:47:52 -03001498 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001499 .amux = EM28XX_AMUX_LINE_IN,
Aron Szabo59d07f12008-07-27 13:47:52 -03001500 }, {
1501 .type = EM28XX_VMUX_SVIDEO,
1502 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001503 .amux = EM28XX_AMUX_LINE_IN,
Aron Szabo59d07f12008-07-27 13:47:52 -03001504 } },
1505 },
Mauro Carvalho Chehab694a1012009-11-26 21:26:13 -03001506 [EM2800_BOARD_VC211A] = {
1507 .name = "Actionmaster/LinXcel/Digitus VC211A",
1508 .is_em2800 = 1,
1509 .tuner_type = TUNER_ABSENT, /* Capture-only board */
1510 .decoder = EM28XX_SAA711X,
1511 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001512 .type = EM28XX_VMUX_COMPOSITE,
Mauro Carvalho Chehab694a1012009-11-26 21:26:13 -03001513 .vmux = SAA7115_COMPOSITE0,
1514 .amux = EM28XX_AMUX_LINE_IN,
1515 .gpio = vc211a_enable,
1516 }, {
1517 .type = EM28XX_VMUX_SVIDEO,
1518 .vmux = SAA7115_SVIDEO3,
1519 .amux = EM28XX_AMUX_LINE_IN,
1520 .gpio = vc211a_enable,
1521 } },
1522 },
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -08001523 [EM2800_BOARD_LEADTEK_WINFAST_USBII] = {
1524 .name = "Leadtek Winfast USB II",
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -08001525 .is_em2800 = 1,
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -08001526 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
1527 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -03001528 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001529 .input = { {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -08001530 .type = EM28XX_VMUX_TELEVISION,
Hans Verkuilc7c0b342006-04-02 13:35:00 -03001531 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001532 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001533 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001534 .type = EM28XX_VMUX_COMPOSITE,
Hans Verkuilc7c0b342006-04-02 13:35:00 -03001535 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001536 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001537 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -08001538 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -03001539 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001540 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001541 } },
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -08001542 },
1543 [EM2800_BOARD_KWORLD_USB2800] = {
1544 .name = "Kworld USB2800",
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -08001545 .is_em2800 = 1,
Michael Krufkyab8b8702008-04-22 14:46:05 -03001546 .tuner_type = TUNER_PHILIPS_FCV1236D,
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -08001547 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -03001548 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001549 .input = { {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -08001550 .type = EM28XX_VMUX_TELEVISION,
Hans Verkuilc7c0b342006-04-02 13:35:00 -03001551 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001552 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001553 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001554 .type = EM28XX_VMUX_COMPOSITE,
Hans Verkuilc7c0b342006-04-02 13:35:00 -03001555 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001556 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001557 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -08001558 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -03001559 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001560 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001561 } },
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -08001562 },
Mauro Carvalho Chehab45632c42005-11-08 21:38:15 -08001563 [EM2820_BOARD_PINNACLE_DVC_90] = {
Douglas Schilling Landgrafea476892009-09-06 18:41:59 -03001564 .name = "Pinnacle Dazzle DVC 90/100/101/107 / Kaiser Baas Video to DVD maker "
Don Kramer74e07f32012-01-02 16:15:44 -03001565 "/ Kworld DVD Maker 2 / Plextor ConvertX PX-AV100U",
Mauro Carvalho Chehab1c67e762008-11-27 07:46:59 -03001566 .tuner_type = TUNER_ABSENT, /* capture only board */
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -03001567 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001568 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001569 .type = EM28XX_VMUX_COMPOSITE,
Hans Verkuilc7c0b342006-04-02 13:35:00 -03001570 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001571 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001572 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -08001573 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -03001574 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001575 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001576 } },
Mauro Carvalho Chehab45632c42005-11-08 21:38:15 -08001577 },
Sascha Sommer43625592007-11-03 15:05:07 -03001578 [EM2800_BOARD_VGEAR_POCKETTV] = {
1579 .name = "V-Gear PocketTV",
1580 .is_em2800 = 1,
Sascha Sommer43625592007-11-03 15:05:07 -03001581 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
1582 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -03001583 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001584 .input = { {
Sascha Sommer43625592007-11-03 15:05:07 -03001585 .type = EM28XX_VMUX_TELEVISION,
1586 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001587 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001588 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001589 .type = EM28XX_VMUX_COMPOSITE,
Sascha Sommer43625592007-11-03 15:05:07 -03001590 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001591 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001592 }, {
Sascha Sommer43625592007-11-03 15:05:07 -03001593 .type = EM28XX_VMUX_SVIDEO,
1594 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001595 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001596 } },
Sascha Sommer43625592007-11-03 15:05:07 -03001597 },
Douglas Schilling Landgraf1e1addd2008-12-27 21:38:14 -03001598 [EM2820_BOARD_PROLINK_PLAYTV_BOX4_USB2] = {
1599 .name = "Pixelview PlayTV Box 4 USB 2.0",
1600 .tda9887_conf = TDA9887_PRESENT,
1601 .tuner_type = TUNER_YMEC_TVF_5533MF,
1602 .decoder = EM28XX_SAA711X,
1603 .input = { {
1604 .type = EM28XX_VMUX_TELEVISION,
1605 .vmux = SAA7115_COMPOSITE2,
1606 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabfdf1bc92014-11-28 08:34:15 -03001607 .aout = EM28XX_AOUT_MONO | /* I2S */
Douglas Schilling Landgraf1e1addd2008-12-27 21:38:14 -03001608 EM28XX_AOUT_MASTER, /* Line out pin */
1609 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001610 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf1e1addd2008-12-27 21:38:14 -03001611 .vmux = SAA7115_COMPOSITE0,
1612 .amux = EM28XX_AMUX_LINE_IN,
1613 }, {
1614 .type = EM28XX_VMUX_SVIDEO,
1615 .vmux = SAA7115_SVIDEO3,
1616 .amux = EM28XX_AMUX_LINE_IN,
1617 } },
1618 },
Mauro Carvalho Chehabea4fd562007-11-03 21:21:57 -03001619 [EM2820_BOARD_PROLINK_PLAYTV_USB2] = {
Douglas Schilling Landgraf1f372a92009-02-25 16:54:31 -03001620 .name = "SIIG AVTuner-PVR / Pixelview Prolink PlayTV USB 2.0",
Frank Schaeferf52226092013-12-01 18:06:52 -03001621 .buttons = std_snapshot_button,
Mauro Carvalho Chehabea4fd562007-11-03 21:21:57 -03001622 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabed086312008-01-24 06:59:20 -03001623 .tuner_type = TUNER_YMEC_TVF_5533MF,
Mauro Carvalho Chehab41a5e7e2016-01-29 10:11:57 -02001624 .tuner_addr = 0x60,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -03001625 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001626 .input = { {
Mauro Carvalho Chehabea4fd562007-11-03 21:21:57 -03001627 .type = EM28XX_VMUX_TELEVISION,
1628 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab30e4ac72008-11-20 13:43:05 -03001629 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabfdf1bc92014-11-28 08:34:15 -03001630 .aout = EM28XX_AOUT_MONO | /* I2S */
Mauro Carvalho Chehab30e4ac72008-11-20 13:43:05 -03001631 EM28XX_AOUT_MASTER, /* Line out pin */
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001632 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001633 .type = EM28XX_VMUX_COMPOSITE,
Mauro Carvalho Chehabea4fd562007-11-03 21:21:57 -03001634 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab7463dda2008-02-05 22:29:26 -03001635 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001636 }, {
Mauro Carvalho Chehabea4fd562007-11-03 21:21:57 -03001637 .type = EM28XX_VMUX_SVIDEO,
1638 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab7463dda2008-02-05 22:29:26 -03001639 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001640 } },
Mauro Carvalho Chehabea4fd562007-11-03 21:21:57 -03001641 },
Devin Heitmueller3ed58ba2009-05-27 23:27:26 -03001642 [EM2860_BOARD_SAA711X_REFERENCE_DESIGN] = {
1643 .name = "EM2860/SAA711X Reference Design",
Frank Schaeferf52226092013-12-01 18:06:52 -03001644 .buttons = std_snapshot_button,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001645 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehabec5de992008-11-25 09:43:29 -03001646 .decoder = EM28XX_SAA711X,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001647 .input = { {
Devin Heitmuellera9fc52b2008-06-28 08:57:06 -03001648 .type = EM28XX_VMUX_SVIDEO,
1649 .vmux = SAA7115_SVIDEO3,
Devin Heitmueller3ed58ba2009-05-27 23:27:26 -03001650 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001651 .type = EM28XX_VMUX_COMPOSITE,
Devin Heitmueller3ed58ba2009-05-27 23:27:26 -03001652 .vmux = SAA7115_COMPOSITE0,
Devin Heitmuellera9fc52b2008-06-28 08:57:06 -03001653 } },
1654 },
Mauro Carvalho Chehabca3dfd62010-09-10 17:29:14 -03001655
Mauro Carvalho Chehabebaefdb2011-06-01 10:16:25 -03001656 [EM2874_BOARD_LEADERSHIP_ISDBT] = {
Mauro Carvalho Chehab3aa2b3b2013-03-05 06:55:27 -03001657 .def_i2c_bus = 1,
1658 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
Mauro Carvalho Chehabca3dfd62010-09-10 17:29:14 -03001659 EM28XX_I2C_FREQ_100_KHZ,
1660 .xclk = EM28XX_XCLK_FREQUENCY_10MHZ,
1661 .name = "EM2874 Leadership ISDBT",
1662 .tuner_type = TUNER_ABSENT,
1663 .tuner_gpio = leadership_reset,
1664 .dvb_gpio = leadership_digital,
1665 .has_dvb = 1,
1666 },
1667
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001668 [EM2880_BOARD_MSI_DIGIVOX_AD] = {
1669 .name = "MSI DigiVox A/D",
1670 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001671 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001672 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001673 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001674 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001675 .type = EM28XX_VMUX_TELEVISION,
1676 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001677 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001678 .gpio = em2880_msi_digivox_ad_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001679 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001680 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001681 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001682 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001683 .gpio = em2880_msi_digivox_ad_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001684 }, {
1685 .type = EM28XX_VMUX_SVIDEO,
1686 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001687 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001688 .gpio = em2880_msi_digivox_ad_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001689 } },
1690 },
1691 [EM2880_BOARD_MSI_DIGIVOX_AD_II] = {
1692 .name = "MSI DigiVox A/D II",
1693 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001694 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001695 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001696 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001697 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001698 .type = EM28XX_VMUX_TELEVISION,
1699 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001700 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001701 .gpio = em2880_msi_digivox_ad_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001702 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001703 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001704 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001705 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001706 .gpio = em2880_msi_digivox_ad_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001707 }, {
1708 .type = EM28XX_VMUX_SVIDEO,
1709 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001710 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001711 .gpio = em2880_msi_digivox_ad_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001712 } },
1713 },
1714 [EM2880_BOARD_KWORLD_DVB_305U] = {
1715 .name = "KWorld DVB-T 305U",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001716 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001717 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001718 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001719 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001720 .type = EM28XX_VMUX_TELEVISION,
1721 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001722 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001723 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001724 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001725 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001726 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001727 }, {
1728 .type = EM28XX_VMUX_SVIDEO,
1729 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001730 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001731 } },
1732 },
1733 [EM2880_BOARD_KWORLD_DVB_310U] = {
1734 .name = "KWorld DVB-T 310U",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001735 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001736 .tuner_gpio = default_tuner_gpio,
Darron Broadda3808e2008-09-30 02:46:41 -03001737 .has_dvb = 1,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001738 .dvb_gpio = default_digital,
Darron Broadda3808e2008-09-30 02:46:41 -03001739 .mts_firmware = 1,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001740 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001741 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001742 .type = EM28XX_VMUX_TELEVISION,
1743 .vmux = TVP5150_COMPOSITE0,
Darron Broadda3808e2008-09-30 02:46:41 -03001744 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001745 .gpio = default_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001746 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001747 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001748 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehaba42aa192008-11-19 11:08:53 -03001749 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001750 .gpio = default_analog,
Darron Broadda3808e2008-09-30 02:46:41 -03001751 }, { /* S-video has not been tested yet */
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001752 .type = EM28XX_VMUX_SVIDEO,
1753 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehaba42aa192008-11-19 11:08:53 -03001754 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001755 .gpio = default_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001756 } },
1757 },
Franklin Mengd7de5d82009-06-06 17:05:02 -03001758 [EM2882_BOARD_KWORLD_ATSC_315U] = {
1759 .name = "KWorld ATSC 315U HDTV TV Box",
1760 .valid = EM28XX_BOARD_NOT_VALIDATED,
1761 .tuner_type = TUNER_THOMSON_DTT761X,
1762 .tuner_gpio = em2882_kworld_315u_tuner_gpio,
1763 .tda9887_conf = TDA9887_PRESENT,
1764 .decoder = EM28XX_SAA711X,
1765 .has_dvb = 1,
1766 .dvb_gpio = em2882_kworld_315u_digital,
Mauro Carvalho Chehab02858ee2010-04-02 20:01:00 -03001767 .ir_codes = RC_MAP_KWORLD_315U,
Franklin Mengd7de5d82009-06-06 17:05:02 -03001768 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ,
1769 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE,
1770 /* Analog mode - still not ready */
1771 /*.input = { {
1772 .type = EM28XX_VMUX_TELEVISION,
1773 .vmux = SAA7115_COMPOSITE2,
1774 .amux = EM28XX_AMUX_VIDEO,
1775 .gpio = em2882_kworld_315u_analog,
1776 .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO,
1777 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001778 .type = EM28XX_VMUX_COMPOSITE,
Franklin Mengd7de5d82009-06-06 17:05:02 -03001779 .vmux = SAA7115_COMPOSITE0,
1780 .amux = EM28XX_AMUX_LINE_IN,
1781 .gpio = em2882_kworld_315u_analog1,
1782 .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO,
1783 }, {
1784 .type = EM28XX_VMUX_SVIDEO,
1785 .vmux = SAA7115_SVIDEO3,
1786 .amux = EM28XX_AMUX_LINE_IN,
1787 .gpio = em2882_kworld_315u_analog1,
1788 .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO,
1789 } }, */
1790 },
Douglas Schilling Landgrafe5db5d42009-04-09 18:24:34 -03001791 [EM2880_BOARD_EMPIRE_DUAL_TV] = {
1792 .name = "Empire dual TV",
1793 .tuner_type = TUNER_XC2028,
1794 .tuner_gpio = default_tuner_gpio,
1795 .has_dvb = 1,
1796 .dvb_gpio = default_digital,
1797 .mts_firmware = 1,
1798 .decoder = EM28XX_TVP5150,
1799 .input = { {
1800 .type = EM28XX_VMUX_TELEVISION,
1801 .vmux = TVP5150_COMPOSITE0,
1802 .amux = EM28XX_AMUX_VIDEO,
1803 .gpio = default_analog,
1804 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001805 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgrafe5db5d42009-04-09 18:24:34 -03001806 .vmux = TVP5150_COMPOSITE1,
1807 .amux = EM28XX_AMUX_LINE_IN,
1808 .gpio = default_analog,
1809 }, {
1810 .type = EM28XX_VMUX_SVIDEO,
1811 .vmux = TVP5150_SVIDEO,
1812 .amux = EM28XX_AMUX_LINE_IN,
1813 .gpio = default_analog,
1814 } },
1815 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001816 [EM2881_BOARD_DNT_DA2_HYBRID] = {
1817 .name = "DNT DA2 Hybrid",
1818 .valid = EM28XX_BOARD_NOT_VALIDATED,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001819 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001820 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001821 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001822 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001823 .type = EM28XX_VMUX_TELEVISION,
1824 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001825 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001826 .gpio = default_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001827 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001828 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001829 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001830 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001831 .gpio = default_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001832 }, {
1833 .type = EM28XX_VMUX_SVIDEO,
1834 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001835 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001836 .gpio = default_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001837 } },
1838 },
1839 [EM2881_BOARD_PINNACLE_HYBRID_PRO] = {
1840 .name = "Pinnacle Hybrid Pro",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001841 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001842 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001843 .decoder = EM28XX_TVP5150,
Devin Heitmuellerd5b3ba92009-07-08 21:51:35 -03001844 .has_dvb = 1,
1845 .dvb_gpio = pinnacle_hybrid_pro_digital,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001846 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001847 .type = EM28XX_VMUX_TELEVISION,
1848 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001849 .amux = EM28XX_AMUX_VIDEO,
Devin Heitmuellerd5b3ba92009-07-08 21:51:35 -03001850 .gpio = pinnacle_hybrid_pro_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001851 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001852 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001853 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001854 .amux = EM28XX_AMUX_LINE_IN,
Devin Heitmuellerd5b3ba92009-07-08 21:51:35 -03001855 .gpio = pinnacle_hybrid_pro_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001856 }, {
1857 .type = EM28XX_VMUX_SVIDEO,
1858 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001859 .amux = EM28XX_AMUX_LINE_IN,
Devin Heitmuellerd5b3ba92009-07-08 21:51:35 -03001860 .gpio = pinnacle_hybrid_pro_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001861 } },
1862 },
Devin Heitmueller09bc1942011-03-13 02:07:54 -03001863 [EM2882_BOARD_PINNACLE_HYBRID_PRO_330E] = {
1864 .name = "Pinnacle Hybrid Pro (330e)",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001865 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001866 .tuner_gpio = default_tuner_gpio,
Eugeniy Meshcheryakova674a3b2008-08-01 08:23:41 -03001867 .mts_firmware = 1,
Devin Heitmuellerad9b4bb2011-03-13 02:09:59 -03001868 .has_dvb = 1,
1869 .dvb_gpio = hauppauge_wintv_hvr_900R2_digital,
Devin Heitmueller9b316d62011-03-13 02:18:34 -03001870 .ir_codes = RC_MAP_PINNACLE_PCTV_HD,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001871 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001872 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001873 .type = EM28XX_VMUX_TELEVISION,
1874 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001875 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001876 .gpio = hauppauge_wintv_hvr_900_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001877 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001878 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001879 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001880 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001881 .gpio = hauppauge_wintv_hvr_900_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001882 }, {
1883 .type = EM28XX_VMUX_SVIDEO,
1884 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001885 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001886 .gpio = hauppauge_wintv_hvr_900_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001887 } },
1888 },
1889 [EM2882_BOARD_KWORLD_VS_DVBT] = {
1890 .name = "Kworld VS-DVB-T 323UR",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001891 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001892 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001893 .decoder = EM28XX_TVP5150,
Antonio Larrosa811fab62010-03-04 22:19:48 -03001894 .mts_firmware = 1,
1895 .has_dvb = 1,
1896 .dvb_gpio = kworld_330u_digital,
1897 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, /* NEC IR */
Mauro Carvalho Chehab02858ee2010-04-02 20:01:00 -03001898 .ir_codes = RC_MAP_KWORLD_315U,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001899 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001900 .type = EM28XX_VMUX_TELEVISION,
1901 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001902 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001903 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001904 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001905 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001906 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001907 }, {
1908 .type = EM28XX_VMUX_SVIDEO,
1909 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001910 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001911 } },
1912 },
1913 [EM2882_BOARD_TERRATEC_HYBRID_XS] = {
Philippe Bourdin91245442010-10-31 09:57:58 -03001914 .name = "Terratec Cinnergy Hybrid T USB XS (em2882)",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001915 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001916 .tuner_gpio = default_tuner_gpio,
Uroš Vamplec994d02009-09-30 22:53:37 -03001917 .mts_firmware = 1,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001918 .decoder = EM28XX_TVP5150,
Uroš Vamplec994d02009-09-30 22:53:37 -03001919 .has_dvb = 1,
1920 .dvb_gpio = hauppauge_wintv_hvr_900_digital,
Mauro Carvalho Chehab02858ee2010-04-02 20:01:00 -03001921 .ir_codes = RC_MAP_TERRATEC_CINERGY_XS,
Uroš Vamplec994d02009-09-30 22:53:37 -03001922 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001923 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001924 .type = EM28XX_VMUX_TELEVISION,
1925 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001926 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001927 .gpio = hauppauge_wintv_hvr_900_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001928 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001929 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001930 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001931 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001932 .gpio = hauppauge_wintv_hvr_900_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001933 }, {
1934 .type = EM28XX_VMUX_SVIDEO,
1935 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001936 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab122b77e2008-11-27 07:42:26 -03001937 .gpio = hauppauge_wintv_hvr_900_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001938 } },
1939 },
Andrea.Amorosi76@gmail.com7ca7ef62010-02-09 17:53:38 -03001940 [EM2882_BOARD_DIKOM_DK300] = {
1941 .name = "Dikom DK300",
1942 .tuner_type = TUNER_XC2028,
1943 .tuner_gpio = default_tuner_gpio,
1944 .decoder = EM28XX_TVP5150,
1945 .mts_firmware = 1,
1946 .has_dvb = 1,
1947 .dvb_gpio = dikom_dk300_digital,
1948 .input = { {
1949 .type = EM28XX_VMUX_TELEVISION,
1950 .vmux = TVP5150_COMPOSITE0,
1951 .amux = EM28XX_AMUX_VIDEO,
1952 .gpio = default_analog,
1953 } },
1954 },
Robert Krakora6e7b9ea2009-01-18 21:59:34 -03001955 [EM2883_BOARD_KWORLD_HYBRID_330U] = {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001956 .name = "Kworld PlusTV HD Hybrid 330",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001957 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03001958 .tuner_gpio = default_tuner_gpio,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001959 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabbe2c6db2008-12-09 15:43:10 -03001960 .mts_firmware = 1,
1961 .has_dvb = 1,
Robert Krakora6e7b9ea2009-01-18 21:59:34 -03001962 .dvb_gpio = kworld_330u_digital,
1963 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ,
Nicola Soranzoa1a6ee72009-02-10 23:28:24 -03001964 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
1965 EM28XX_I2C_EEPROM_ON_BOARD |
1966 EM28XX_I2C_EEPROM_KEY_VALID,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001967 .input = { {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001968 .type = EM28XX_VMUX_TELEVISION,
1969 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001970 .amux = EM28XX_AMUX_VIDEO,
Robert Krakora6e7b9ea2009-01-18 21:59:34 -03001971 .gpio = kworld_330u_analog,
1972 .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001973 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02001974 .type = EM28XX_VMUX_COMPOSITE,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001975 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001976 .amux = EM28XX_AMUX_LINE_IN,
Robert Krakora6e7b9ea2009-01-18 21:59:34 -03001977 .gpio = kworld_330u_analog,
1978 .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001979 }, {
1980 .type = EM28XX_VMUX_SVIDEO,
1981 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001982 .amux = EM28XX_AMUX_LINE_IN,
Robert Krakora6e7b9ea2009-01-18 21:59:34 -03001983 .gpio = kworld_330u_analog,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001984 } },
1985 },
Mauro Carvalho Chehabee281b82008-07-27 16:58:04 -03001986 [EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU] = {
Vitaly Woold3603342008-07-27 14:10:11 -03001987 .name = "Compro VideoMate ForYou/Stereo",
Vitaly Woold3603342008-07-27 14:10:11 -03001988 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03001989 .tvaudio_addr = 0xb0,
Vitaly Woold3603342008-07-27 14:10:11 -03001990 .tda9887_conf = TDA9887_PRESENT,
1991 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabdf7fa092009-02-25 09:06:13 -03001992 .adecoder = EM28XX_TVAUDIO,
Vitaly Wool2bd1d9e2009-03-04 08:27:52 -03001993 .mute_gpio = compro_mute_gpio,
Mauro Carvalho Chehabd4d889e2008-11-25 09:10:25 -03001994 .input = { {
Vitaly Woold3603342008-07-27 14:10:11 -03001995 .type = EM28XX_VMUX_TELEVISION,
1996 .vmux = TVP5150_COMPOSITE0,
Vitaly Wool2bd1d9e2009-03-04 08:27:52 -03001997 .amux = EM28XX_AMUX_VIDEO,
1998 .gpio = compro_unmute_tv_gpio,
Vitaly Woold3603342008-07-27 14:10:11 -03001999 }, {
2000 .type = EM28XX_VMUX_SVIDEO,
2001 .vmux = TVP5150_SVIDEO,
2002 .amux = EM28XX_AMUX_LINE_IN,
Vitaly Wool2bd1d9e2009-03-04 08:27:52 -03002003 .gpio = compro_unmute_svid_gpio,
Vitaly Woold3603342008-07-27 14:10:11 -03002004 } },
2005 },
Mauro Carvalho Chehab0bf4f6c2009-02-11 14:13:20 -03002006 [EM2860_BOARD_KAIOMY_TVNPC_U2] = {
2007 .name = "Kaiomy TVnPC U2",
2008 .vchannels = 3,
2009 .tuner_type = TUNER_XC2028,
2010 .tuner_addr = 0x61,
2011 .mts_firmware = 1,
2012 .decoder = EM28XX_TVP5150,
2013 .tuner_gpio = default_tuner_gpio,
Mauro Carvalho Chehab02858ee2010-04-02 20:01:00 -03002014 .ir_codes = RC_MAP_KAIOMY,
Mauro Carvalho Chehab0bf4f6c2009-02-11 14:13:20 -03002015 .input = { {
2016 .type = EM28XX_VMUX_TELEVISION,
2017 .vmux = TVP5150_COMPOSITE0,
2018 .amux = EM28XX_AMUX_VIDEO,
2019
2020 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02002021 .type = EM28XX_VMUX_COMPOSITE,
Mauro Carvalho Chehab0bf4f6c2009-02-11 14:13:20 -03002022 .vmux = TVP5150_COMPOSITE1,
2023 .amux = EM28XX_AMUX_LINE_IN,
2024 }, {
2025 .type = EM28XX_VMUX_SVIDEO,
2026 .vmux = TVP5150_SVIDEO,
2027 .amux = EM28XX_AMUX_LINE_IN,
2028 } },
2029 .radio = {
2030 .type = EM28XX_RADIO,
2031 .amux = EM28XX_AMUX_LINE_IN,
2032 }
Mauro Carvalho Chehab56ee3802009-02-11 14:18:36 -03002033 },
2034 [EM2860_BOARD_EASYCAP] = {
2035 .name = "Easy Cap Capture DC-60",
2036 .vchannels = 2,
2037 .tuner_type = TUNER_ABSENT,
2038 .decoder = EM28XX_SAA711X,
2039 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02002040 .type = EM28XX_VMUX_COMPOSITE,
Mauro Carvalho Chehab56ee3802009-02-11 14:18:36 -03002041 .vmux = SAA7115_COMPOSITE0,
2042 .amux = EM28XX_AMUX_LINE_IN,
2043 }, {
2044 .type = EM28XX_VMUX_SVIDEO,
2045 .vmux = SAA7115_SVIDEO3,
2046 .amux = EM28XX_AMUX_LINE_IN,
2047 } },
2048 },
Indika Katugampalaf74a61e32009-02-11 11:13:05 -03002049 [EM2820_BOARD_IODATA_GVMVP_SZ] = {
2050 .name = "IO-DATA GV-MVP/SZ",
2051 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
2052 .tuner_gpio = default_tuner_gpio,
2053 .tda9887_conf = TDA9887_PRESENT,
2054 .decoder = EM28XX_TVP5150,
2055 .input = { {
2056 .type = EM28XX_VMUX_TELEVISION,
2057 .vmux = TVP5150_COMPOSITE0,
2058 .amux = EM28XX_AMUX_VIDEO,
2059 }, { /* Composite has not been tested yet */
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02002060 .type = EM28XX_VMUX_COMPOSITE,
Indika Katugampalaf74a61e32009-02-11 11:13:05 -03002061 .vmux = TVP5150_COMPOSITE1,
2062 .amux = EM28XX_AMUX_VIDEO,
2063 }, { /* S-video has not been tested yet */
2064 .type = EM28XX_VMUX_SVIDEO,
2065 .vmux = TVP5150_SVIDEO,
2066 .amux = EM28XX_AMUX_VIDEO,
2067 } },
2068 },
Mauro Carvalho Chehab4557af92009-05-23 09:58:52 -03002069 [EM2860_BOARD_TERRATEC_GRABBY] = {
2070 .name = "Terratec Grabby",
2071 .vchannels = 2,
2072 .tuner_type = TUNER_ABSENT,
2073 .decoder = EM28XX_SAA711X,
2074 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ,
2075 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02002076 .type = EM28XX_VMUX_COMPOSITE,
Mauro Carvalho Chehab4557af92009-05-23 09:58:52 -03002077 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehaba3fa9042010-10-25 17:51:15 -03002078 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab4557af92009-05-23 09:58:52 -03002079 }, {
2080 .type = EM28XX_VMUX_SVIDEO,
2081 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehaba3fa9042010-10-25 17:51:15 -03002082 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehab4557af92009-05-23 09:58:52 -03002083 } },
Matthieu Rogezdd837fb2016-02-28 08:26:21 -03002084 .buttons = std_snapshot_button,
Matthieu Rogez565e37d2016-02-28 08:26:22 -03002085 .leds = terratec_grabby_leds,
Mauro Carvalho Chehab4557af92009-05-23 09:58:52 -03002086 },
Mauro Carvalho Chehab766ed642009-05-24 00:46:01 -03002087 [EM2860_BOARD_TERRATEC_AV350] = {
2088 .name = "Terratec AV350",
2089 .vchannels = 2,
2090 .tuner_type = TUNER_ABSENT,
2091 .decoder = EM28XX_TVP5150,
2092 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ,
2093 .mute_gpio = terratec_av350_mute_gpio,
2094 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02002095 .type = EM28XX_VMUX_COMPOSITE,
Mauro Carvalho Chehab766ed642009-05-24 00:46:01 -03002096 .vmux = TVP5150_COMPOSITE1,
2097 .amux = EM28XX_AUDIO_SRC_LINE,
Jean Delvare1df8e982009-05-13 16:48:07 -03002098 .gpio = terratec_av350_unmute_gpio,
Mauro Carvalho Chehab766ed642009-05-24 00:46:01 -03002099
2100 }, {
2101 .type = EM28XX_VMUX_SVIDEO,
2102 .vmux = TVP5150_SVIDEO,
2103 .amux = EM28XX_AUDIO_SRC_LINE,
Jean Delvare1df8e982009-05-13 16:48:07 -03002104 .gpio = terratec_av350_unmute_gpio,
Mauro Carvalho Chehab766ed642009-05-24 00:46:01 -03002105 } },
2106 },
Adrian Taylor8298f2f2010-10-20 07:55:33 -03002107
2108 [EM2860_BOARD_ELGATO_VIDEO_CAPTURE] = {
2109 .name = "Elgato Video Capture",
2110 .decoder = EM28XX_SAA711X,
2111 .tuner_type = TUNER_ABSENT, /* Capture only device */
2112 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02002113 .type = EM28XX_VMUX_COMPOSITE,
Adrian Taylor8298f2f2010-10-20 07:55:33 -03002114 .vmux = SAA7115_COMPOSITE0,
2115 .amux = EM28XX_AMUX_LINE_IN,
2116 }, {
2117 .type = EM28XX_VMUX_SVIDEO,
2118 .vmux = SAA7115_SVIDEO3,
2119 .amux = EM28XX_AMUX_LINE_IN,
2120 } },
2121 },
2122
Devin Heitmueller19859222009-06-19 00:33:54 -03002123 [EM2882_BOARD_EVGA_INDTUBE] = {
2124 .name = "Evga inDtube",
2125 .tuner_type = TUNER_XC2028,
2126 .tuner_gpio = default_tuner_gpio,
2127 .decoder = EM28XX_TVP5150,
Devin Heitmuellera4c47302009-06-20 21:34:42 -03002128 .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, /* NEC IR */
Devin Heitmueller19859222009-06-19 00:33:54 -03002129 .mts_firmware = 1,
2130 .has_dvb = 1,
2131 .dvb_gpio = evga_indtube_digital,
Mauro Carvalho Chehab02858ee2010-04-02 20:01:00 -03002132 .ir_codes = RC_MAP_EVGA_INDTUBE,
Devin Heitmueller19859222009-06-19 00:33:54 -03002133 .input = { {
2134 .type = EM28XX_VMUX_TELEVISION,
2135 .vmux = TVP5150_COMPOSITE0,
2136 .amux = EM28XX_AMUX_VIDEO,
2137 .gpio = evga_indtube_analog,
2138 }, {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02002139 .type = EM28XX_VMUX_COMPOSITE,
Devin Heitmueller19859222009-06-19 00:33:54 -03002140 .vmux = TVP5150_COMPOSITE1,
2141 .amux = EM28XX_AMUX_LINE_IN,
2142 .gpio = evga_indtube_analog,
2143 }, {
2144 .type = EM28XX_VMUX_SVIDEO,
2145 .vmux = TVP5150_SVIDEO,
2146 .amux = EM28XX_AMUX_LINE_IN,
2147 .gpio = evga_indtube_analog,
2148 } },
2149 },
Antti Palosaari285eb1a2009-09-15 14:42:13 -03002150 /* eb1a:2868 Empia EM2870 + Philips CU1216L NIM (Philips TDA10023 +
2151 Infineon TUA6034) */
2152 [EM2870_BOARD_REDDO_DVB_C_USB_BOX] = {
2153 .name = "Reddo DVB-C USB TV Box",
2154 .tuner_type = TUNER_ABSENT,
Antti Palosaari28f4ddd12009-10-04 12:59:35 -03002155 .tuner_gpio = reddo_dvb_c_usb_box,
Antti Palosaari285eb1a2009-09-15 14:42:13 -03002156 .has_dvb = 1,
Antti Palosaari285eb1a2009-09-15 14:42:13 -03002157 },
Jarod Wilson7e48b302010-03-07 17:55:43 -03002158 /* 1b80:a340 - Empia EM2870, NXP TDA18271HD and LG DT3304, sold
2159 * initially as the KWorld PlusTV 340U, then as the UB435-Q.
2160 * Early variants have a TDA18271HD/C1, later ones a TDA18271HD/C2 */
2161 [EM2870_BOARD_KWORLD_A340] = {
2162 .name = "KWorld PlusTV 340U or UB435-Q (ATSC)",
2163 .tuner_type = TUNER_ABSENT, /* Digital-only TDA18271HD */
2164 .has_dvb = 1,
2165 .dvb_gpio = kworld_a340_digital,
2166 .tuner_gpio = default_tuner_gpio,
2167 },
Antti Palosaari460312e2011-05-25 17:03:50 -03002168 /* 2013:024f PCTV nanoStick T2 290e.
Antti Palosaarid6a5f922011-04-07 16:34:44 -03002169 * Empia EM28174, Sony CXD2820R and NXP TDA18271HD/C2 */
2170 [EM28174_BOARD_PCTV_290E] = {
Antti Palosaari460312e2011-05-25 17:03:50 -03002171 .name = "PCTV nanoStick T2 290e",
Mauro Carvalho Chehab3aa2b3b2013-03-05 06:55:27 -03002172 .def_i2c_bus = 1,
2173 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | EM28XX_I2C_FREQ_100_KHZ,
Antti Palosaarid6a5f922011-04-07 16:34:44 -03002174 .tuner_type = TUNER_ABSENT,
2175 .tuner_gpio = pctv_290e,
2176 .has_dvb = 1,
Antti Palosaariff7b9292011-05-25 17:00:35 -03002177 .ir_codes = RC_MAP_PINNACLE_PCTV_HD,
Antti Palosaarid6a5f922011-04-07 16:34:44 -03002178 },
Antti Palosaari36588712011-08-01 01:15:30 -03002179 /* 2013:024f PCTV DVB-S2 Stick 460e
2180 * Empia EM28174, NXP TDA10071, Conexant CX24118A and Allegro A8293 */
2181 [EM28174_BOARD_PCTV_460E] = {
Mauro Carvalho Chehab3aa2b3b2013-03-05 06:55:27 -03002182 .def_i2c_bus = 1,
2183 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | EM28XX_I2C_FREQ_400_KHZ,
Antti Palosaari36588712011-08-01 01:15:30 -03002184 .name = "PCTV DVB-S2 Stick (460e)",
2185 .tuner_type = TUNER_ABSENT,
2186 .tuner_gpio = pctv_460e,
2187 .has_dvb = 1,
2188 .ir_codes = RC_MAP_PINNACLE_PCTV_HD,
2189 },
Gareth Williams4d28d3d2011-12-24 05:47:29 -03002190 /* eb1a:5006 Honestech VIDBOX NW03
2191 * Empia EM2860, Philips SAA7113, Empia EMP202, No Tuner */
2192 [EM2860_BOARD_HT_VIDBOX_NW03] = {
2193 .name = "Honestech Vidbox NW03",
2194 .tuner_type = TUNER_ABSENT,
2195 .decoder = EM28XX_SAA711X,
2196 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02002197 .type = EM28XX_VMUX_COMPOSITE,
Gareth Williams4d28d3d2011-12-24 05:47:29 -03002198 .vmux = SAA7115_COMPOSITE0,
2199 .amux = EM28XX_AMUX_LINE_IN,
2200 }, {
2201 .type = EM28XX_VMUX_SVIDEO,
2202 .vmux = SAA7115_SVIDEO3, /* S-VIDEO needs confirming */
2203 .amux = EM28XX_AMUX_LINE_IN,
2204 } },
2205 },
Antti Palosaari35530852012-03-18 18:09:01 -03002206 /* 1b80:e425 MaxMedia UB425-TC
2207 * Empia EM2874B + Micronas DRX 3913KA2 + NXP TDA18271HDC2 */
2208 [EM2874_BOARD_MAXMEDIA_UB425_TC] = {
2209 .name = "MaxMedia UB425-TC",
2210 .tuner_type = TUNER_ABSENT,
2211 .tuner_gpio = maxmedia_ub425_tc,
2212 .has_dvb = 1,
Antti Palosaari831378d2013-04-12 13:59:03 -03002213 .ir_codes = RC_MAP_REDDO,
Mauro Carvalho Chehab3aa2b3b2013-03-05 06:55:27 -03002214 .def_i2c_bus = 1,
2215 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
Antti Palosaari35530852012-03-18 18:09:01 -03002216 EM28XX_I2C_FREQ_400_KHZ,
2217 },
Ivan Kalvachevfa5527c2012-03-19 20:09:55 -03002218 /* 2304:0242 PCTV QuatroStick (510e)
2219 * Empia EM2884 + Micronas DRX 3926K + NXP TDA18271HDC2 */
2220 [EM2884_BOARD_PCTV_510E] = {
2221 .name = "PCTV QuatroStick (510e)",
2222 .tuner_type = TUNER_ABSENT,
2223 .tuner_gpio = pctv_510e,
2224 .has_dvb = 1,
2225 .ir_codes = RC_MAP_PINNACLE_PCTV_HD,
Mauro Carvalho Chehab3aa2b3b2013-03-05 06:55:27 -03002226 .def_i2c_bus = 1,
2227 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
Ivan Kalvachevfa5527c2012-03-19 20:09:55 -03002228 EM28XX_I2C_FREQ_400_KHZ,
2229 },
Antti Palosaaric247d7b2012-03-19 11:48:19 -03002230 /* 2013:0251 PCTV QuatroStick nano (520e)
2231 * Empia EM2884 + Micronas DRX 3926K + NXP TDA18271HDC2 */
2232 [EM2884_BOARD_PCTV_520E] = {
2233 .name = "PCTV QuatroStick nano (520e)",
2234 .tuner_type = TUNER_ABSENT,
2235 .tuner_gpio = pctv_520e,
2236 .has_dvb = 1,
2237 .ir_codes = RC_MAP_PINNACLE_PCTV_HD,
Mauro Carvalho Chehab3aa2b3b2013-03-05 06:55:27 -03002238 .def_i2c_bus = 1,
2239 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
Antti Palosaaric247d7b2012-03-19 11:48:19 -03002240 EM28XX_I2C_FREQ_400_KHZ,
2241 },
Martin Blumenstingl89040132012-10-04 14:22:54 -03002242 [EM2884_BOARD_TERRATEC_HTC_USB_XS] = {
2243 .name = "Terratec Cinergy HTC USB XS",
2244 .has_dvb = 1,
2245 .ir_codes = RC_MAP_NEC_TERRATEC_CINERGY_XS,
2246 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab3aa2b3b2013-03-05 06:55:27 -03002247 .def_i2c_bus = 1,
2248 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
Martin Blumenstingl89040132012-10-04 14:22:54 -03002249 EM28XX_I2C_FREQ_400_KHZ,
2250 },
Jakob Haufe7c1dfdb2013-04-13 11:03:37 -03002251 /* 1b80:e1cc Delock 61959
2252 * Empia EM2874B + Micronas DRX 3913KA2 + NXP TDA18271HDC2
Mauro Carvalho Chehabce679432013-12-22 13:13:41 -03002253 * mostly the same as MaxMedia UB-425-TC but different remote */
Jakob Haufe7c1dfdb2013-04-13 11:03:37 -03002254 [EM2874_BOARD_DELOCK_61959] = {
2255 .name = "Delock 61959",
2256 .tuner_type = TUNER_ABSENT,
2257 .tuner_gpio = maxmedia_ub425_tc,
2258 .has_dvb = 1,
2259 .ir_codes = RC_MAP_DELOCK_61959,
2260 .def_i2c_bus = 1,
2261 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
2262 EM28XX_I2C_FREQ_400_KHZ,
2263 },
Jean-Francois Thibert6dbea9f2013-10-09 11:18:05 -03002264 /*
2265 * 1b80:e346 KWorld USB ATSC TV Stick UB435-Q V2
2266 * Empia EM2874B + LG DT3305 + NXP TDA18271HDC2
2267 */
2268 [EM2874_BOARD_KWORLD_UB435Q_V2] = {
2269 .name = "KWorld USB ATSC TV Stick UB435-Q V2",
2270 .tuner_type = TUNER_ABSENT,
2271 .has_dvb = 1,
2272 .dvb_gpio = kworld_a340_digital,
2273 .tuner_gpio = default_tuner_gpio,
2274 .def_i2c_bus = 1,
2275 },
Mauro Carvalho Chehab02bc1f52014-03-03 16:28:39 -03002276 /*
2277 * 1b80:e34c KWorld USB ATSC TV Stick UB435-Q V3
2278 * Empia EM2874B + LG DT3305 + NXP TDA18271HDC2
2279 */
2280 [EM2874_BOARD_KWORLD_UB435Q_V3] = {
2281 .name = "KWorld USB ATSC TV Stick UB435-Q V3",
2282 .tuner_type = TUNER_ABSENT,
2283 .has_dvb = 1,
2284 .tuner_gpio = kworld_ub435q_v3_digital,
2285 .def_i2c_bus = 1,
2286 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
2287 EM28XX_I2C_FREQ_100_KHZ,
Mauro Carvalho Chehab59432be2014-03-04 12:34:34 -03002288 .leds = kworld_ub435q_v3_leds,
Mauro Carvalho Chehab02bc1f52014-03-03 16:28:39 -03002289 },
Devin Heitmueller38b2df92012-08-13 21:18:02 -03002290 [EM2874_BOARD_PCTV_HD_MINI_80E] = {
2291 .name = "Pinnacle PCTV HD Mini",
2292 .tuner_type = TUNER_ABSENT,
2293 .has_dvb = 1,
2294 .dvb_gpio = em2874_pctv_80e_digital,
2295 .decoder = EM28XX_NODECODER,
Mauro Carvalho Chehab959505b2014-01-19 07:15:11 -03002296 .ir_codes = RC_MAP_PINNACLE_PCTV_HD,
Mauro Carvalho Chehab88e4fcd2014-03-04 20:49:07 -03002297 .leds = pctv_80e_leds,
Devin Heitmueller38b2df92012-08-13 21:18:02 -03002298 },
Frank Schaefer0c37e732013-12-01 18:06:57 -03002299 /* 1ae7:9003/9004 SpeedLink Vicious And Devine Laplace webcam
2300 * Empia EM2765 + OmniVision OV2640 */
2301 [EM2765_BOARD_SPEEDLINK_VAD_LAPLACE] = {
2302 .name = "SpeedLink Vicious And Devine Laplace webcam",
2303 .xclk = EM28XX_XCLK_FREQUENCY_24MHZ,
2304 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
2305 EM28XX_I2C_FREQ_100_KHZ,
2306 .def_i2c_bus = 1,
2307 .tuner_type = TUNER_ABSENT,
2308 .is_webcam = 1,
2309 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02002310 .type = EM28XX_VMUX_COMPOSITE,
Frank Schaefer0c37e732013-12-01 18:06:57 -03002311 .amux = EM28XX_AMUX_VIDEO,
2312 .gpio = speedlink_vad_laplace_reg_seq,
2313 } },
2314 .buttons = speedlink_vad_laplace_buttons,
2315 .leds = speedlink_vad_laplace_leds,
2316 },
Antti Palosaariec573362013-02-25 09:01:13 -03002317 /* 2013:0258 PCTV DVB-S2 Stick (461e)
2318 * Empia EM28178, Montage M88DS3103, Montage M88TS2022, Allegro A8293 */
2319 [EM28178_BOARD_PCTV_461E] = {
2320 .def_i2c_bus = 1,
2321 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | EM28XX_I2C_FREQ_400_KHZ,
2322 .name = "PCTV DVB-S2 Stick (461e)",
2323 .tuner_type = TUNER_ABSENT,
2324 .tuner_gpio = pctv_461e,
2325 .has_dvb = 1,
2326 .ir_codes = RC_MAP_PINNACLE_PCTV_HD,
2327 },
Antti Palosaari19229242014-04-10 22:11:27 -03002328 /* 2013:025f PCTV tripleStick (292e).
2329 * Empia EM28178, Silicon Labs Si2168, Silicon Labs Si2157 */
2330 [EM28178_BOARD_PCTV_292E] = {
2331 .name = "PCTV tripleStick (292e)",
2332 .def_i2c_bus = 1,
2333 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | EM28XX_I2C_FREQ_400_KHZ,
2334 .tuner_type = TUNER_ABSENT,
2335 .tuner_gpio = pctv_292e,
2336 .has_dvb = 1,
2337 .ir_codes = RC_MAP_PINNACLE_PCTV_HD,
2338 },
Witold Krecickieace9722014-10-19 19:25:59 -03002339 [EM2861_BOARD_LEADTEK_VC100] = {
2340 .name = "Leadtek VC100",
2341 .tuner_type = TUNER_ABSENT, /* Capture only device */
2342 .decoder = EM28XX_TVP5150,
2343 .input = { {
Mauro Carvalho Chehabd83a96a2016-01-27 09:24:29 -02002344 .type = EM28XX_VMUX_COMPOSITE,
Witold Krecickieace9722014-10-19 19:25:59 -03002345 .vmux = TVP5150_COMPOSITE1,
2346 .amux = EM28XX_AMUX_LINE_IN,
2347 }, {
2348 .type = EM28XX_VMUX_SVIDEO,
2349 .vmux = TVP5150_SVIDEO,
2350 .amux = EM28XX_AMUX_LINE_IN,
2351 } },
2352 },
Olli Salonenfc30dd762014-11-24 03:57:34 -03002353 /* eb1a:8179 Terratec Cinergy T2 Stick HD.
2354 * Empia EM28178, Silicon Labs Si2168, Silicon Labs Si2146 */
2355 [EM28178_BOARD_TERRATEC_T2_STICK_HD] = {
2356 .name = "Terratec Cinergy T2 Stick HD",
2357 .def_i2c_bus = 1,
2358 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | EM28XX_I2C_FREQ_400_KHZ,
2359 .tuner_type = TUNER_ABSENT,
2360 .tuner_gpio = terratec_t2_stick_hd,
2361 .has_dvb = 1,
2362 .ir_codes = RC_MAP_TERRATEC_SLIM_2,
2363 },
Satoshi Nagahamaab4d1452016-05-06 16:35:05 -03002364
2365 /*
2366 * 3275:0085 PLEX PX-BCUD.
2367 * Empia EM28178, TOSHIBA TC90532XBG, Sharp QM1D1C0042
2368 */
2369 [EM28178_BOARD_PLEX_PX_BCUD] = {
2370 .name = "PLEX PX-BCUD",
2371 .xclk = EM28XX_XCLK_FREQUENCY_4_3MHZ,
2372 .def_i2c_bus = 1,
2373 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE,
2374 .tuner_type = TUNER_ABSENT,
2375 .tuner_gpio = plex_px_bcud,
2376 .has_dvb = 1,
2377 },
Olli Salonen11a2a942016-04-04 12:12:52 -03002378 /*
2379 * 2040:0265 Hauppauge WinTV-dualHD (DVB version).
2380 * Empia EM28274, 2x Silicon Labs Si2168, 2x Silicon Labs Si2157
2381 */
2382 [EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB] = {
2383 .name = "Hauppauge WinTV-dualHD DVB",
2384 .def_i2c_bus = 1,
2385 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
2386 EM28XX_I2C_FREQ_400_KHZ,
2387 .tuner_type = TUNER_ABSENT,
2388 .tuner_gpio = hauppauge_dualhd_dvb,
2389 .has_dvb = 1,
2390 .ir_codes = RC_MAP_HAUPPAUGE,
2391 .leds = hauppauge_dualhd_leds,
2392 },
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08002393};
Mauro Carvalho Chehab01c28192013-12-22 13:27:02 -03002394EXPORT_SYMBOL_GPL(em28xx_boards);
2395
Hans Verkuil4a9e5122014-08-21 16:43:03 -03002396static const unsigned int em28xx_bcount = ARRAY_SIZE(em28xx_boards);
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08002397
2398/* table of devices that work with this driver */
Nicola Soranzoa1a6ee72009-02-10 23:28:24 -03002399struct usb_device_id em28xx_id_table[] = {
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03002400 { USB_DEVICE(0xeb1a, 0x2750),
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002401 .driver_info = EM2750_BOARD_UNKNOWN },
2402 { USB_DEVICE(0xeb1a, 0x2751),
2403 .driver_info = EM2750_BOARD_UNKNOWN },
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03002404 { USB_DEVICE(0xeb1a, 0x2800),
2405 .driver_info = EM2800_BOARD_UNKNOWN },
Mauro Carvalho Chehab9b4e8452009-08-07 12:08:02 -03002406 { USB_DEVICE(0xeb1a, 0x2710),
2407 .driver_info = EM2820_BOARD_UNKNOWN },
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03002408 { USB_DEVICE(0xeb1a, 0x2820),
2409 .driver_info = EM2820_BOARD_UNKNOWN },
2410 { USB_DEVICE(0xeb1a, 0x2821),
Devin Heitmuellerc665f4d2008-12-16 23:35:23 -03002411 .driver_info = EM2820_BOARD_UNKNOWN },
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03002412 { USB_DEVICE(0xeb1a, 0x2860),
2413 .driver_info = EM2820_BOARD_UNKNOWN },
2414 { USB_DEVICE(0xeb1a, 0x2861),
2415 .driver_info = EM2820_BOARD_UNKNOWN },
Devin Heitmuellerf91cb652009-09-30 22:44:19 -03002416 { USB_DEVICE(0xeb1a, 0x2862),
2417 .driver_info = EM2820_BOARD_UNKNOWN },
Devin Heitmueller443fed92010-03-19 23:53:12 -03002418 { USB_DEVICE(0xeb1a, 0x2863),
2419 .driver_info = EM2820_BOARD_UNKNOWN },
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03002420 { USB_DEVICE(0xeb1a, 0x2870),
2421 .driver_info = EM2820_BOARD_UNKNOWN },
2422 { USB_DEVICE(0xeb1a, 0x2881),
2423 .driver_info = EM2820_BOARD_UNKNOWN },
2424 { USB_DEVICE(0xeb1a, 0x2883),
2425 .driver_info = EM2820_BOARD_UNKNOWN },
Antti Palosaari285eb1a2009-09-15 14:42:13 -03002426 { USB_DEVICE(0xeb1a, 0x2868),
2427 .driver_info = EM2820_BOARD_UNKNOWN },
Mauro Carvalho Chehabca3dfd62010-09-10 17:29:14 -03002428 { USB_DEVICE(0xeb1a, 0x2875),
2429 .driver_info = EM2820_BOARD_UNKNOWN },
Hans Verkuile22eca72014-05-27 04:12:19 -03002430 { USB_DEVICE(0xeb1a, 0x2885), /* MSI Digivox Trio */
2431 .driver_info = EM2884_BOARD_TERRATEC_H5 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002432 { USB_DEVICE(0xeb1a, 0xe300),
2433 .driver_info = EM2861_BOARD_KWORLD_PVRTV_300U },
Mauro Carvalho Chehab0bf4f6c2009-02-11 14:13:20 -03002434 { USB_DEVICE(0xeb1a, 0xe303),
2435 .driver_info = EM2860_BOARD_KAIOMY_TVNPC_U2 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002436 { USB_DEVICE(0xeb1a, 0xe305),
2437 .driver_info = EM2880_BOARD_KWORLD_DVB_305U },
2438 { USB_DEVICE(0xeb1a, 0xe310),
2439 .driver_info = EM2880_BOARD_MSI_DIGIVOX_AD },
Franklin Mengd7de5d82009-06-06 17:05:02 -03002440 { USB_DEVICE(0xeb1a, 0xa313),
2441 .driver_info = EM2882_BOARD_KWORLD_ATSC_315U },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002442 { USB_DEVICE(0xeb1a, 0xa316),
Robert Krakora6e7b9ea2009-01-18 21:59:34 -03002443 .driver_info = EM2883_BOARD_KWORLD_HYBRID_330U },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002444 { USB_DEVICE(0xeb1a, 0xe320),
2445 .driver_info = EM2880_BOARD_MSI_DIGIVOX_AD_II },
2446 { USB_DEVICE(0xeb1a, 0xe323),
2447 .driver_info = EM2882_BOARD_KWORLD_VS_DVBT },
2448 { USB_DEVICE(0xeb1a, 0xe350),
2449 .driver_info = EM2870_BOARD_KWORLD_350U },
2450 { USB_DEVICE(0xeb1a, 0xe355),
2451 .driver_info = EM2870_BOARD_KWORLD_355U },
2452 { USB_DEVICE(0xeb1a, 0x2801),
2453 .driver_info = EM2800_BOARD_GRABBEEX_USB2800 },
2454 { USB_DEVICE(0xeb1a, 0xe357),
2455 .driver_info = EM2870_BOARD_KWORLD_355U },
Aivar Päkk1985f6f2011-12-11 18:15:00 -03002456 { USB_DEVICE(0xeb1a, 0xe359),
2457 .driver_info = EM2870_BOARD_KWORLD_355U },
Douglas Schilling Landgrafac40d9e2009-02-25 16:55:48 -03002458 { USB_DEVICE(0x1b80, 0xe302),
2459 .driver_info = EM2820_BOARD_PINNACLE_DVC_90 }, /* Kaiser Baas Video to DVD maker */
Douglas Schilling Landgrafea476892009-09-06 18:41:59 -03002460 { USB_DEVICE(0x1b80, 0xe304),
2461 .driver_info = EM2820_BOARD_PINNACLE_DVC_90 }, /* Kworld DVD Maker 2 */
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03002462 { USB_DEVICE(0x0ccd, 0x0036),
2463 .driver_info = EM2820_BOARD_TERRATEC_CINERGY_250 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002464 { USB_DEVICE(0x0ccd, 0x004c),
2465 .driver_info = EM2880_BOARD_TERRATEC_HYBRID_XS_FR },
2466 { USB_DEVICE(0x0ccd, 0x004f),
2467 .driver_info = EM2860_BOARD_TERRATEC_HYBRID_XS },
2468 { USB_DEVICE(0x0ccd, 0x005e),
2469 .driver_info = EM2882_BOARD_TERRATEC_HYBRID_XS },
2470 { USB_DEVICE(0x0ccd, 0x0042),
Philippe Bourdin91245442010-10-31 09:57:58 -03002471 .driver_info = EM2882_BOARD_TERRATEC_HYBRID_XS },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002472 { USB_DEVICE(0x0ccd, 0x0043),
Alberto Mardegan8c473112015-10-27 17:24:14 -02002473 .driver_info = EM2870_BOARD_TERRATEC_XS_MT2060 },
Holger Nelson6c3b9062011-12-23 23:15:32 -03002474 { USB_DEVICE(0x0ccd, 0x008e), /* Cinergy HTC USB XS Rev. 1 */
Martin Blumenstingl89040132012-10-04 14:22:54 -03002475 .driver_info = EM2884_BOARD_TERRATEC_HTC_USB_XS },
Holger Nelson6c3b9062011-12-23 23:15:32 -03002476 { USB_DEVICE(0x0ccd, 0x00ac), /* Cinergy HTC USB XS Rev. 2 */
Martin Blumenstingl89040132012-10-04 14:22:54 -03002477 .driver_info = EM2884_BOARD_TERRATEC_HTC_USB_XS },
Mauro Carvalho Chehab4e145342011-11-16 14:38:28 -02002478 { USB_DEVICE(0x0ccd, 0x10a2), /* H5 Rev. 1 */
Mauro Carvalho Chehabfec528b2011-07-03 21:05:06 -03002479 .driver_info = EM2884_BOARD_TERRATEC_H5 },
Mauro Carvalho Chehab4e145342011-11-16 14:38:28 -02002480 { USB_DEVICE(0x0ccd, 0x10ad), /* H5 Rev. 2 */
Mauro Carvalho Chehab33ba28e2011-07-14 21:48:00 -03002481 .driver_info = EM2884_BOARD_TERRATEC_H5 },
Roland Scheidegger676fa7d2013-02-08 21:08:55 -03002482 { USB_DEVICE(0x0ccd, 0x10b6), /* H5 Rev. 3 */
2483 .driver_info = EM2884_BOARD_TERRATEC_H5 },
Mauro Carvalho Chehab766ed642009-05-24 00:46:01 -03002484 { USB_DEVICE(0x0ccd, 0x0084),
2485 .driver_info = EM2860_BOARD_TERRATEC_AV350 },
Mauro Carvalho Chehab4557af92009-05-23 09:58:52 -03002486 { USB_DEVICE(0x0ccd, 0x0096),
2487 .driver_info = EM2860_BOARD_TERRATEC_GRABBY },
Tekaefabaaf2011-10-14 05:40:29 -03002488 { USB_DEVICE(0x0ccd, 0x10AF),
2489 .driver_info = EM2860_BOARD_TERRATEC_GRABBY },
Andreas Oberrittera1ed02e2011-11-16 11:06:50 -03002490 { USB_DEVICE(0x0ccd, 0x00b2),
2491 .driver_info = EM2884_BOARD_CINERGY_HTC_STICK },
Gilles Risch1fe0fbd2015-03-01 17:11:05 -03002492 { USB_DEVICE(0x0fd9, 0x0018),
2493 .driver_info = EM2884_BOARD_ELGATO_EYETV_HYBRID_2008 },
Adrian Taylor8298f2f2010-10-20 07:55:33 -03002494 { USB_DEVICE(0x0fd9, 0x0033),
Gilles Risch1fe0fbd2015-03-01 17:11:05 -03002495 .driver_info = EM2860_BOARD_ELGATO_VIDEO_CAPTURE },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002496 { USB_DEVICE(0x185b, 0x2870),
2497 .driver_info = EM2870_BOARD_COMPRO_VIDEOMATE },
Vitaly Woold3603342008-07-27 14:10:11 -03002498 { USB_DEVICE(0x185b, 0x2041),
Mauro Carvalho Chehabee281b82008-07-27 16:58:04 -03002499 .driver_info = EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU },
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03002500 { USB_DEVICE(0x2040, 0x4200),
2501 .driver_info = EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 },
Mauro Carvalho Chehab15b9bec2008-01-13 12:02:20 -03002502 { USB_DEVICE(0x2040, 0x4201),
2503 .driver_info = EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 },
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03002504 { USB_DEVICE(0x2040, 0x6500),
2505 .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900 },
Luc Saillard427d20c2008-01-30 17:23:00 -03002506 { USB_DEVICE(0x2040, 0x6502),
Devin Heitmueller17d9d552008-06-08 10:22:03 -03002507 .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2 },
Michael Krufky74ee0512008-05-01 18:02:30 -03002508 { USB_DEVICE(0x2040, 0x6513), /* HCW HVR-980 */
Mauro Carvalho Chehab10ac6602008-07-27 14:58:58 -03002509 .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 },
Michael Krufky74ee0512008-05-01 18:02:30 -03002510 { USB_DEVICE(0x2040, 0x6517), /* HP HVR-950 */
Mauro Carvalho Chehab10ac6602008-07-27 14:58:58 -03002511 .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 },
Michael Krufky74ee0512008-05-01 18:02:30 -03002512 { USB_DEVICE(0x2040, 0x651b), /* RP HVR-950 */
Mauro Carvalho Chehab10ac6602008-07-27 14:58:58 -03002513 .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 },
Douglas Schilling Landgraff89bc322008-12-01 21:01:04 -03002514 { USB_DEVICE(0x2040, 0x651f),
2515 .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850 },
Olli Salonen11a2a942016-04-04 12:12:52 -03002516 { USB_DEVICE(0x2040, 0x0265),
2517 .driver_info = EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB },
Devin Heitmuellere14b3652008-07-26 11:04:33 -03002518 { USB_DEVICE(0x0438, 0xb002),
2519 .driver_info = EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002520 { USB_DEVICE(0x2001, 0xf112),
2521 .driver_info = EM2820_BOARD_DLINK_USB_TV },
2522 { USB_DEVICE(0x2304, 0x0207),
2523 .driver_info = EM2820_BOARD_PINNACLE_DVC_90 },
2524 { USB_DEVICE(0x2304, 0x0208),
2525 .driver_info = EM2820_BOARD_PINNACLE_USB_2 },
2526 { USB_DEVICE(0x2304, 0x021a),
2527 .driver_info = EM2820_BOARD_PINNACLE_DVC_90 },
2528 { USB_DEVICE(0x2304, 0x0226),
Devin Heitmueller09bc1942011-03-13 02:07:54 -03002529 .driver_info = EM2882_BOARD_PINNACLE_HYBRID_PRO_330E },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002530 { USB_DEVICE(0x2304, 0x0227),
2531 .driver_info = EM2880_BOARD_PINNACLE_PCTV_HD_PRO },
Devin Heitmueller38b2df92012-08-13 21:18:02 -03002532 { USB_DEVICE(0x2304, 0x023f),
2533 .driver_info = EM2874_BOARD_PCTV_HD_MINI_80E },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002534 { USB_DEVICE(0x0413, 0x6023),
2535 .driver_info = EM2800_BOARD_LEADTEK_WINFAST_USBII },
Don Kramer74e07f32012-01-02 16:15:44 -03002536 { USB_DEVICE(0x093b, 0xa003),
2537 .driver_info = EM2820_BOARD_PINNACLE_DVC_90 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002538 { USB_DEVICE(0x093b, 0xa005),
2539 .driver_info = EM2861_BOARD_PLEXTOR_PX_TV100U },
Indika Katugampalaf74a61e32009-02-11 11:13:05 -03002540 { USB_DEVICE(0x04bb, 0x0515),
2541 .driver_info = EM2820_BOARD_IODATA_GVMVP_SZ },
Zhenyu Wang7c8b5672009-07-05 10:51:21 -03002542 { USB_DEVICE(0xeb1a, 0x50a6),
2543 .driver_info = EM2860_BOARD_GADMEI_UTV330 },
Jarod Wilson7e48b302010-03-07 17:55:43 -03002544 { USB_DEVICE(0x1b80, 0xa340),
2545 .driver_info = EM2870_BOARD_KWORLD_A340 },
Jean-Francois Thibert6dbea9f2013-10-09 11:18:05 -03002546 { USB_DEVICE(0x1b80, 0xe346),
2547 .driver_info = EM2874_BOARD_KWORLD_UB435Q_V2 },
Mauro Carvalho Chehab02bc1f52014-03-03 16:28:39 -03002548 { USB_DEVICE(0x1b80, 0xe34c),
2549 .driver_info = EM2874_BOARD_KWORLD_UB435Q_V3 },
Antti Palosaarid6a5f922011-04-07 16:34:44 -03002550 { USB_DEVICE(0x2013, 0x024f),
2551 .driver_info = EM28174_BOARD_PCTV_290E },
Antti Palosaari36588712011-08-01 01:15:30 -03002552 { USB_DEVICE(0x2013, 0x024c),
2553 .driver_info = EM28174_BOARD_PCTV_460E },
Eddi De Pieri82e7dbb2011-11-19 11:37:14 -03002554 { USB_DEVICE(0x2040, 0x1605),
2555 .driver_info = EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C },
Mauro Carvalho Chehab4159d012013-02-28 10:35:56 -03002556 { USB_DEVICE(0x1b80, 0xe755),
2557 .driver_info = EM2884_BOARD_C3TECH_DIGITAL_DUO },
Gareth Williams4d28d3d2011-12-24 05:47:29 -03002558 { USB_DEVICE(0xeb1a, 0x5006),
2559 .driver_info = EM2860_BOARD_HT_VIDBOX_NW03 },
Mario Ceresa2f786042012-01-06 16:00:12 -03002560 { USB_DEVICE(0x1b80, 0xe309), /* Sveon STV40 */
2561 .driver_info = EM2860_BOARD_EASYCAP },
Antti Palosaari35530852012-03-18 18:09:01 -03002562 { USB_DEVICE(0x1b80, 0xe425),
2563 .driver_info = EM2874_BOARD_MAXMEDIA_UB425_TC },
Ivan Kalvachevfa5527c2012-03-19 20:09:55 -03002564 { USB_DEVICE(0x2304, 0x0242),
2565 .driver_info = EM2884_BOARD_PCTV_510E },
Antti Palosaaric247d7b2012-03-19 11:48:19 -03002566 { USB_DEVICE(0x2013, 0x0251),
2567 .driver_info = EM2884_BOARD_PCTV_520E },
Jakob Haufe7c1dfdb2013-04-13 11:03:37 -03002568 { USB_DEVICE(0x1b80, 0xe1cc),
2569 .driver_info = EM2874_BOARD_DELOCK_61959 },
Frank Schaefer0c37e732013-12-01 18:06:57 -03002570 { USB_DEVICE(0x1ae7, 0x9003),
2571 .driver_info = EM2765_BOARD_SPEEDLINK_VAD_LAPLACE },
2572 { USB_DEVICE(0x1ae7, 0x9004),
2573 .driver_info = EM2765_BOARD_SPEEDLINK_VAD_LAPLACE },
Antti Palosaariec573362013-02-25 09:01:13 -03002574 { USB_DEVICE(0x2013, 0x0258),
2575 .driver_info = EM28178_BOARD_PCTV_461E },
Antti Palosaari19229242014-04-10 22:11:27 -03002576 { USB_DEVICE(0x2013, 0x025f),
2577 .driver_info = EM28178_BOARD_PCTV_292E },
Arno Bauernöppel1efc2172015-11-15 19:24:10 -02002578 { USB_DEVICE(0x2040, 0x0264), /* Hauppauge WinTV-soloHD */
2579 .driver_info = EM28178_BOARD_PCTV_292E },
Witold Krecickieace9722014-10-19 19:25:59 -03002580 { USB_DEVICE(0x0413, 0x6f07),
2581 .driver_info = EM2861_BOARD_LEADTEK_VC100 },
Olli Salonenfc30dd762014-11-24 03:57:34 -03002582 { USB_DEVICE(0xeb1a, 0x8179),
2583 .driver_info = EM28178_BOARD_TERRATEC_T2_STICK_HD },
Satoshi Nagahamaab4d1452016-05-06 16:35:05 -03002584 { USB_DEVICE(0x3275, 0x0085),
2585 .driver_info = EM28178_BOARD_PLEX_PX_BCUD },
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08002586 { },
2587};
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03002588MODULE_DEVICE_TABLE(usb, em28xx_id_table);
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08002589
Mauro Carvalho Chehab102a0b02008-04-17 21:40:45 -03002590/*
Mauro Carvalho Chehab102a0b02008-04-17 21:40:45 -03002591 * EEPROM hash table for devices with generic USB IDs
2592 */
Nicola Soranzoa1a6ee72009-02-10 23:28:24 -03002593static struct em28xx_hash_table em28xx_eeprom_hash[] = {
Mauro Carvalho Chehabea4fd562007-11-03 21:21:57 -03002594 /* P/N: SA 60002070465 Tuner: TVF7533-MF */
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03002595 {0x6ce05a8f, EM2820_BOARD_PROLINK_PLAYTV_USB2, TUNER_YMEC_TVF_5533MF},
Douglas Schilling Landgraf1e1addd2008-12-27 21:38:14 -03002596 {0x72cc5a8b, EM2820_BOARD_PROLINK_PLAYTV_BOX4_USB2, TUNER_YMEC_TVF_5533MF},
Darron Broadda3808e2008-09-30 02:46:41 -03002597 {0x966a0441, EM2880_BOARD_KWORLD_DVB_310U, TUNER_XC2028},
Douglas Schilling Landgrafa35c87c2009-08-06 12:52:11 -03002598 {0x166a0441, EM2880_BOARD_EMPIRE_DUAL_TV, TUNER_XC2028},
Devin Heitmueller19859222009-06-19 00:33:54 -03002599 {0xcee44a99, EM2882_BOARD_EVGA_INDTUBE, TUNER_XC2028},
Devin Heitmuellerd5b3ba92009-07-08 21:51:35 -03002600 {0xb8846b20, EM2881_BOARD_PINNACLE_HYBRID_PRO, TUNER_XC2028},
Antti Palosaari285eb1a2009-09-15 14:42:13 -03002601 {0x63f653bd, EM2870_BOARD_REDDO_DVB_C_USB_BOX, TUNER_ABSENT},
Andrea.Amorosi76@gmail.com7ca7ef62010-02-09 17:53:38 -03002602 {0x4e913442, EM2882_BOARD_DIKOM_DK300, TUNER_XC2028},
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002603};
2604
Mauro Carvalho Chehabd2ba0552007-11-04 08:32:42 -03002605/* I2C devicelist hash table for devices with generic USB IDs */
Sascha Sommerfad7b952007-11-04 08:06:48 -03002606static struct em28xx_hash_table em28xx_i2c_hash[] = {
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03002607 {0xb06a32c3, EM2800_BOARD_TERRATEC_CINERGY_200, TUNER_LG_PAL_NEW_TAPC},
2608 {0xf51200e3, EM2800_BOARD_VGEAR_POCKETTV, TUNER_LG_PAL_NEW_TAPC},
Devin Heitmueller3ed58ba2009-05-27 23:27:26 -03002609 {0x1ba50080, EM2860_BOARD_SAA711X_REFERENCE_DESIGN, TUNER_ABSENT},
Devin Heitmueller443fed92010-03-19 23:53:12 -03002610 {0x77800080, EM2860_BOARD_TVP5150_REFERENCE_DESIGN, TUNER_ABSENT},
Douglas Schilling Landgraff7fe3e62009-01-19 09:31:55 -03002611 {0xc51200e3, EM2820_BOARD_GADMEI_TVR200, TUNER_LG_PAL_NEW_TAPC},
Mauro Carvalho Chehab6d888a62009-08-30 13:05:56 -03002612 {0x4ba50080, EM2861_BOARD_GADMEI_UTV330PLUS, TUNER_TNF_5335MF},
Mauro Carvalho Chehabebaefdb2011-06-01 10:16:25 -03002613 {0x6b800080, EM2874_BOARD_LEADERSHIP_ISDBT, TUNER_ABSENT},
Sascha Sommerfad7b952007-11-04 08:06:48 -03002614};
Mauro Carvalho Chehabfdf1bc92014-11-28 08:34:15 -03002615
Frank Schaefer87b52432013-03-03 15:37:40 -03002616/* NOTE: introduce a separate hash table for devices with 16 bit eeproms */
Sascha Sommerfad7b952007-11-04 08:06:48 -03002617
Michael Krufkyd7cba042008-09-12 13:31:45 -03002618int em28xx_tuner_callback(void *ptr, int component, int command, int arg)
Mauro Carvalho Chehabee6e3a82008-04-17 21:37:31 -03002619{
Hans Verkuilbc3d2922013-03-22 09:54:00 -03002620 struct em28xx_i2c_bus *i2c_bus = ptr;
2621 struct em28xx *dev = i2c_bus->dev;
Mauro Carvalho Chehab102a0b02008-04-17 21:40:45 -03002622 int rc = 0;
Mauro Carvalho Chehabee6e3a82008-04-17 21:37:31 -03002623
Eddi De Pieri82e7dbb2011-11-19 11:37:14 -03002624 if (dev->tuner_type != TUNER_XC2028 && dev->tuner_type != TUNER_XC5000)
Mauro Carvalho Chehabee6e3a82008-04-17 21:37:31 -03002625 return 0;
2626
Eddi De Pieri82e7dbb2011-11-19 11:37:14 -03002627 if (command != XC2028_TUNER_RESET && command != XC5000_TUNER_RESET)
Mauro Carvalho Chehabee6e3a82008-04-17 21:37:31 -03002628 return 0;
2629
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03002630 rc = em28xx_gpio_set(dev, dev->board.tuner_gpio);
Mauro Carvalho Chehabee6e3a82008-04-17 21:37:31 -03002631
Mauro Carvalho Chehabee6e3a82008-04-17 21:37:31 -03002632 return rc;
2633}
2634EXPORT_SYMBOL_GPL(em28xx_tuner_callback);
2635
Nicola Soranzoa1a6ee72009-02-10 23:28:24 -03002636static inline void em28xx_set_model(struct em28xx *dev)
Mauro Carvalho Chehabee6e3a82008-04-17 21:37:31 -03002637{
Ezequiel Garciae0f6e4d2012-09-26 06:25:12 -03002638 dev->board = em28xx_boards[dev->model];
Devin Heitmuellered14e1c2008-12-29 22:27:30 -03002639
2640 /* Those are the default values for the majority of boards
2641 Use those values if not specified otherwise at boards entry
2642 */
2643 if (!dev->board.xclk)
2644 dev->board.xclk = EM28XX_XCLK_IR_RC5_MODE |
2645 EM28XX_XCLK_FREQUENCY_12MHZ;
2646
2647 if (!dev->board.i2c_speed)
2648 dev->board.i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
2649 EM28XX_I2C_FREQ_100_KHZ;
Mauro Carvalho Chehab3aa2b3b2013-03-05 06:55:27 -03002650
Mauro Carvalho Chehabaab31252013-03-05 06:55:28 -03002651 /* Should be initialized early, for I2C to work */
2652 dev->def_i2c_bus = dev->board.def_i2c_bus;
Mauro Carvalho Chehabee6e3a82008-04-17 21:37:31 -03002653}
2654
Matthieu Rogez0899f622016-03-04 18:33:08 -03002655/* Wait until AC97_RESET reports the expected value reliably before proceeding.
2656 * We also check that two unrelated registers accesses don't return the same
2657 * value to avoid premature return.
2658 * This procedure helps ensuring AC97 register accesses are reliable.
2659 */
2660static int em28xx_wait_until_ac97_features_equals(struct em28xx *dev,
2661 int expected_feat)
2662{
2663 unsigned long timeout = jiffies + msecs_to_jiffies(2000);
2664 int feat, powerdown;
2665
2666 while (time_is_after_jiffies(timeout)) {
2667 feat = em28xx_read_ac97(dev, AC97_RESET);
2668 if (feat < 0)
2669 return feat;
2670
2671 powerdown = em28xx_read_ac97(dev, AC97_POWERDOWN);
2672 if (powerdown < 0)
2673 return powerdown;
2674
2675 if (feat == expected_feat && feat != powerdown)
2676 return 0;
2677
2678 msleep(50);
2679 }
2680
Mauro Carvalho Chehab8314d402016-10-12 07:26:47 -03002681 pr_warn("AC97 registers access is not reliable !\n");
Matthieu Rogez0899f622016-03-04 18:33:08 -03002682 return -ETIMEDOUT;
2683}
2684
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002685/* Since em28xx_pre_card_setup() requires a proper dev->model,
2686 * this won't work for boards with generic PCI IDs
2687 */
Ezequiel Garcia60332f02012-04-28 09:57:01 -03002688static void em28xx_pre_card_setup(struct em28xx *dev)
Markus Rechbergera94e95b2006-01-23 17:11:10 -02002689{
Devin Heitmuellered14e1c2008-12-29 22:27:30 -03002690 /* Set the initial XCLK and I2C clock values based on the board
2691 definition */
Mauro Carvalho Chehab505b6d02008-11-25 09:39:50 -03002692 em28xx_write_reg(dev, EM28XX_R0F_XCLK, dev->board.xclk & 0x7f);
Sascha Sommerca80cf62012-01-08 16:32:09 -03002693 if (!dev->board.is_em2800)
2694 em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, dev->board.i2c_speed);
Mauro Carvalho Chehaba2070c62008-11-25 07:05:06 -03002695 msleep(50);
2696
Markus Rechbergera94e95b2006-01-23 17:11:10 -02002697 /* request some modules */
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03002698 switch (dev->model) {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002699 case EM2861_BOARD_PLEXTOR_PX_TV100U:
Mauro Carvalho Chehab0a6e44d2009-07-29 01:39:12 -03002700 /* Sets the msp34xx I2S speed */
2701 dev->i2s_speed = 2048000;
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002702 break;
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002703 case EM2861_BOARD_KWORLD_PVRTV_300U:
2704 case EM2880_BOARD_KWORLD_DVB_305U:
Frank Schaeferc074fc42013-06-03 14:12:03 -03002705 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0x6d);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002706 msleep(10);
Frank Schaeferc074fc42013-06-03 14:12:03 -03002707 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0x7d);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002708 msleep(10);
2709 break;
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002710 case EM2870_BOARD_COMPRO_VIDEOMATE:
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002711 /* TODO: someone can do some cleanup here...
2712 not everything's needed */
Devin Heitmueller6d676d82008-11-25 06:04:02 -03002713 em28xx_write_reg(dev, EM2880_R04_GPO, 0x00);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002714 msleep(10);
Devin Heitmueller6d676d82008-11-25 06:04:02 -03002715 em28xx_write_reg(dev, EM2880_R04_GPO, 0x01);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002716 msleep(10);
Frank Schaeferc074fc42013-06-03 14:12:03 -03002717 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfd);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002718 mdelay(70);
Frank Schaeferc074fc42013-06-03 14:12:03 -03002719 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfc);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002720 mdelay(70);
Frank Schaeferc074fc42013-06-03 14:12:03 -03002721 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xdc);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002722 mdelay(70);
Frank Schaeferc074fc42013-06-03 14:12:03 -03002723 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfc);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002724 mdelay(70);
2725 break;
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002726 case EM2870_BOARD_TERRATEC_XS_MT2060:
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002727 /* this device needs some gpio writes to get the DVB-T
2728 demod work */
Frank Schaeferc074fc42013-06-03 14:12:03 -03002729 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfe);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002730 mdelay(70);
Frank Schaeferc074fc42013-06-03 14:12:03 -03002731 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xde);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002732 mdelay(70);
Frank Schaeferc074fc42013-06-03 14:12:03 -03002733 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfe);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002734 mdelay(70);
2735 break;
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002736 case EM2870_BOARD_PINNACLE_PCTV_DVB:
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002737 /* this device needs some gpio writes to get the
2738 DVB-T demod work */
Frank Schaeferc074fc42013-06-03 14:12:03 -03002739 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfe);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002740 mdelay(70);
Frank Schaeferc074fc42013-06-03 14:12:03 -03002741 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xde);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002742 mdelay(70);
Frank Schaeferc074fc42013-06-03 14:12:03 -03002743 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfe);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002744 mdelay(70);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002745 break;
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002746 case EM2820_BOARD_GADMEI_UTV310:
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03002747 case EM2820_BOARD_MSI_VOX_USB_2:
Mauro Carvalho Chehaba2070c62008-11-25 07:05:06 -03002748 /* enables audio for that devices */
Frank Schaeferc074fc42013-06-03 14:12:03 -03002749 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfd);
Mauro Carvalho Chehab102a0b02008-04-17 21:40:45 -03002750 break;
Mauro Carvalho Chehab0bf4f6c2009-02-11 14:13:20 -03002751
Franklin Mengd7de5d82009-06-06 17:05:02 -03002752 case EM2882_BOARD_KWORLD_ATSC_315U:
Frank Schaeferc074fc42013-06-03 14:12:03 -03002753 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xff);
Franklin Mengd7de5d82009-06-06 17:05:02 -03002754 msleep(10);
Frank Schaeferc074fc42013-06-03 14:12:03 -03002755 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfe);
Franklin Mengd7de5d82009-06-06 17:05:02 -03002756 msleep(10);
2757 em28xx_write_reg(dev, EM2880_R04_GPO, 0x00);
2758 msleep(10);
2759 em28xx_write_reg(dev, EM2880_R04_GPO, 0x08);
2760 msleep(10);
2761 break;
2762
Mauro Carvalho Chehab0bf4f6c2009-02-11 14:13:20 -03002763 case EM2860_BOARD_KAIOMY_TVNPC_U2:
2764 em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x07", 1);
2765 em28xx_write_regs(dev, EM28XX_R06_I2C_CLK, "\x40", 1);
2766 em28xx_write_regs(dev, 0x0d, "\x42", 1);
2767 em28xx_write_regs(dev, 0x08, "\xfd", 1);
2768 msleep(10);
2769 em28xx_write_regs(dev, 0x08, "\xff", 1);
2770 msleep(10);
2771 em28xx_write_regs(dev, 0x08, "\x7f", 1);
2772 msleep(10);
2773 em28xx_write_regs(dev, 0x08, "\x6b", 1);
2774
2775 break;
Mauro Carvalho Chehab56ee3802009-02-11 14:18:36 -03002776 case EM2860_BOARD_EASYCAP:
2777 em28xx_write_regs(dev, 0x08, "\xf8", 1);
2778 break;
2779
Indika Katugampalaf74a61e32009-02-11 11:13:05 -03002780 case EM2820_BOARD_IODATA_GVMVP_SZ:
Frank Schaeferc074fc42013-06-03 14:12:03 -03002781 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xff);
Indika Katugampalaf74a61e32009-02-11 11:13:05 -03002782 msleep(70);
Frank Schaeferc074fc42013-06-03 14:12:03 -03002783 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xf7);
Indika Katugampalaf74a61e32009-02-11 11:13:05 -03002784 msleep(10);
Frank Schaeferc074fc42013-06-03 14:12:03 -03002785 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfe);
Indika Katugampalaf74a61e32009-02-11 11:13:05 -03002786 msleep(70);
Frank Schaeferc074fc42013-06-03 14:12:03 -03002787 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfd);
Indika Katugampalaf74a61e32009-02-11 11:13:05 -03002788 msleep(70);
2789 break;
Matthieu Rogez0899f622016-03-04 18:33:08 -03002790
2791 case EM2860_BOARD_TERRATEC_GRABBY:
2792 /* HACK?: Ensure AC97 register reading is reliable before
2793 * proceeding. In practice, this will wait about 1.6 seconds.
2794 */
2795 em28xx_wait_until_ac97_features_equals(dev, 0x6a90);
2796 break;
Mauro Carvalho Chehab102a0b02008-04-17 21:40:45 -03002797 }
Mauro Carvalho Chehabc67ec532008-04-17 21:48:00 -03002798
Mauro Carvalho Chehab017ab4b2008-11-27 09:21:55 -03002799 em28xx_gpio_set(dev, dev->board.tuner_gpio);
Mauro Carvalho Chehabc67ec532008-04-17 21:48:00 -03002800 em28xx_set_mode(dev, EM28XX_ANALOG_MODE);
2801
2802 /* Unlock device */
Mauro Carvalho Chehab2fe3e2e2008-11-27 09:10:40 -03002803 em28xx_set_mode(dev, EM28XX_SUSPEND);
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002804}
2805
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002806static int em28xx_hint_board(struct em28xx *dev)
2807{
2808 int i;
2809
Frank Schaefer2d466e12013-03-27 17:06:28 -03002810 if (dev->board.is_webcam) {
2811 if (dev->em28xx_sensor == EM28XX_MT9V011) {
2812 dev->model = EM2820_BOARD_SILVERCREST_WEBCAM;
2813 } else if (dev->em28xx_sensor == EM28XX_MT9M001 ||
2814 dev->em28xx_sensor == EM28XX_MT9M111) {
2815 dev->model = EM2750_BOARD_UNKNOWN;
2816 }
2817 /* FIXME: IMPROVE ! */
2818
2819 return 0;
2820 }
2821
Mauro Carvalho Chehabd2ba0552007-11-04 08:32:42 -03002822 /* HINT method: EEPROM
2823 *
2824 * This method works only for boards with eeprom.
2825 * Uses a hash of all eeprom bytes. The hash should be
2826 * unique for a vendor/tuner pair.
2827 * There are a high chance that tuners for different
2828 * video standards produce different hashes.
2829 */
2830 for (i = 0; i < ARRAY_SIZE(em28xx_eeprom_hash); i++) {
2831 if (dev->hash == em28xx_eeprom_hash[i].hash) {
2832 dev->model = em28xx_eeprom_hash[i].model;
2833 dev->tuner_type = em28xx_eeprom_hash[i].tuner;
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002834
Mauro Carvalho Chehab8314d402016-10-12 07:26:47 -03002835 pr_err("Your board has no unique USB ID.\n");
2836 pr_err("A hint were successfully done, based on eeprom hash.\n");
2837 pr_err("This method is not 100%% failproof.\n");
2838 pr_err("If the board were missdetected, please email this log to:\n");
2839 pr_err("\tV4L Mailing List <linux-media@vger.kernel.org>\n");
2840 pr_err("Board detected as %s\n",
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002841 em28xx_boards[dev->model].name);
2842
2843 return 0;
2844 }
2845 }
Sascha Sommerfad7b952007-11-04 08:06:48 -03002846
Mauro Carvalho Chehabd2ba0552007-11-04 08:32:42 -03002847 /* HINT method: I2C attached devices
2848 *
2849 * This method works for all boards.
2850 * Uses a hash of i2c scanned devices.
2851 * Devices with the same i2c attached chips will
2852 * be considered equal.
2853 * This method is less precise than the eeprom one.
2854 */
2855
Sascha Sommerfad7b952007-11-04 08:06:48 -03002856 /* user did not request i2c scanning => do it now */
2857 if (!dev->i2c_hash)
Mauro Carvalho Chehabaab31252013-03-05 06:55:28 -03002858 em28xx_do_i2c_scan(dev, dev->def_i2c_bus);
Sascha Sommerfad7b952007-11-04 08:06:48 -03002859
2860 for (i = 0; i < ARRAY_SIZE(em28xx_i2c_hash); i++) {
2861 if (dev->i2c_hash == em28xx_i2c_hash[i].hash) {
2862 dev->model = em28xx_i2c_hash[i].model;
2863 dev->tuner_type = em28xx_i2c_hash[i].tuner;
Mauro Carvalho Chehab8314d402016-10-12 07:26:47 -03002864 pr_err("Your board has no unique USB ID.\n");
2865 pr_err("A hint were successfully done, based on i2c devicelist hash.\n");
2866 pr_err("This method is not 100%% failproof.\n");
2867 pr_err("If the board were missdetected, please email this log to:\n");
2868 pr_err("\tV4L Mailing List <linux-media@vger.kernel.org>\n");
2869 pr_err("Board detected as %s\n",
Sascha Sommerfad7b952007-11-04 08:06:48 -03002870 em28xx_boards[dev->model].name);
2871
2872 return 0;
2873 }
2874 }
2875
Mauro Carvalho Chehab8314d402016-10-12 07:26:47 -03002876 pr_err("Your board has no unique USB ID and thus need a hint to be detected.\n");
2877 pr_err("You may try to use card=<n> insmod option to workaround that.\n");
2878 pr_err("Please send an email with this log to:\n");
2879 pr_err("\tV4L Mailing List <linux-media@vger.kernel.org>\n");
2880 pr_err("Board eeprom hash is 0x%08lx\n", dev->hash);
2881 pr_err("Board i2c devicelist hash is 0x%08lx\n", dev->i2c_hash);
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002882
Mauro Carvalho Chehab8314d402016-10-12 07:26:47 -03002883 pr_err("Here is a list of valid choices for the card=<n> insmod option:\n");
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002884 for (i = 0; i < em28xx_bcount; i++) {
Mauro Carvalho Chehab8314d402016-10-12 07:26:47 -03002885 pr_err(" card=%d -> %s\n",
Mauro Carvalho Chehabfdf1bc92014-11-28 08:34:15 -03002886 i, em28xx_boards[i].name);
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002887 }
2888 return -1;
Mauro Carvalho Chehab882876b2007-10-29 11:33:18 -03002889}
2890
Ezequiel Garcia60332f02012-04-28 09:57:01 -03002891static void em28xx_card_setup(struct em28xx *dev)
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08002892{
Mauro Carvalho Chehab3d3215c2009-08-10 10:29:27 -03002893 /*
2894 * If the device can be a webcam, seek for a sensor.
2895 * If sensor is not found, then it isn't a webcam.
2896 */
2897 if (dev->board.is_webcam) {
Frank Schaeferb3944c82013-03-27 17:06:30 -03002898 if (em28xx_detect_sensor(dev) < 0)
Mauro Carvalho Chehab3d3215c2009-08-10 10:29:27 -03002899 dev->board.is_webcam = 0;
Mauro Carvalho Chehabca3dfd62010-09-10 17:29:14 -03002900 }
2901
Frank Schaefer2d466e12013-03-27 17:06:28 -03002902 switch (dev->model) {
2903 case EM2750_BOARD_UNKNOWN:
2904 case EM2820_BOARD_UNKNOWN:
2905 case EM2800_BOARD_UNKNOWN:
Mauro Carvalho Chehabca3dfd62010-09-10 17:29:14 -03002906 /*
2907 * The K-WORLD DVB-T 310U is detected as an MSI Digivox AD.
2908 *
2909 * This occurs because they share identical USB vendor and
2910 * product IDs.
2911 *
2912 * What we do here is look up the EEPROM hash of the K-WORLD
2913 * and if it is found then we decide that we do not have
2914 * a DIGIVOX and reset the device to the K-WORLD instead.
2915 *
2916 * This solution is only valid if they do not share eeprom
2917 * hash identities which has not been determined as yet.
2918 */
2919 if (em28xx_hint_board(dev) < 0)
Mauro Carvalho Chehab8314d402016-10-12 07:26:47 -03002920 pr_err("Board not discovered\n");
Mauro Carvalho Chehabca3dfd62010-09-10 17:29:14 -03002921 else {
2922 em28xx_set_model(dev);
2923 em28xx_pre_card_setup(dev);
2924 }
2925 break;
Frank Schaefer2d466e12013-03-27 17:06:28 -03002926 default:
2927 em28xx_set_model(dev);
Mauro Carvalho Chehabca3dfd62010-09-10 17:29:14 -03002928 }
Mauro Carvalho Chehab3d3215c2009-08-10 10:29:27 -03002929
Mauro Carvalho Chehab8314d402016-10-12 07:26:47 -03002930 pr_info("Identified as %s (card=%d)\n",
Mauro Carvalho Chehab3d3215c2009-08-10 10:29:27 -03002931 dev->board.name, dev->model);
Mauro Carvalho Chehabf8b60302007-11-05 08:42:55 -03002932
2933 dev->tuner_type = em28xx_boards[dev->model].tuner_type;
2934
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08002935 /* request some modules */
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002936 switch (dev->model) {
2937 case EM2820_BOARD_HAUPPAUGE_WINTV_USB_2:
Mauro Carvalho Chehab98ae1272007-11-05 09:30:39 -03002938 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900:
Devin Heitmueller17d9d552008-06-08 10:22:03 -03002939 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2:
Douglas Schilling Landgraff89bc322008-12-01 21:01:04 -03002940 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850:
Mauro Carvalho Chehab10ac6602008-07-27 14:58:58 -03002941 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950:
Frank Schaefera6166012013-03-03 15:37:44 -03002942 case EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C:
Olli Salonen11a2a942016-04-04 12:12:52 -03002943 case EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB:
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002944 {
2945 struct tveeprom tv;
Frank Schaefera2179682013-03-03 15:37:42 -03002946
2947 if (dev->eedata == NULL)
2948 break;
Mauro Carvalho Chehabac07bb72009-09-08 14:04:41 -03002949#if defined(CONFIG_MODULES) && defined(MODULE)
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002950 request_module("tveeprom");
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08002951#endif
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002952 /* Call first TVeeprom */
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08002953
Mauro Carvalho Chehabc7a45e52013-03-05 06:55:26 -03002954 dev->i2c_client[dev->def_i2c_bus].addr = 0xa0 >> 1;
2955 tveeprom_hauppauge_analog(&dev->i2c_client[dev->def_i2c_bus], &tv, dev->eedata);
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08002956
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002957 dev->tuner_type = tv.tuner_type;
Mauro Carvalho Chehabed086312008-01-24 06:59:20 -03002958
Hans Verkuil33001012013-05-29 06:59:45 -03002959 if (tv.audio_processor == TVEEPROM_AUDPROC_MSP) {
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002960 dev->i2s_speed = 2048000;
Mauro Carvalho Chehab505b6d02008-11-25 09:39:50 -03002961 dev->board.has_msp34xx = 1;
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002962 }
2963 break;
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08002964 }
Franklin Mengd7de5d82009-06-06 17:05:02 -03002965 case EM2882_BOARD_KWORLD_ATSC_315U:
2966 em28xx_write_reg(dev, 0x0d, 0x42);
2967 msleep(10);
Frank Schaeferc074fc42013-06-03 14:12:03 -03002968 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfd);
Franklin Mengd7de5d82009-06-06 17:05:02 -03002969 msleep(10);
2970 break;
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002971 case EM2820_BOARD_KWORLD_PVRTV2800RF:
2972 /* GPIO enables sound on KWORLD PVR TV 2800RF */
Frank Schaeferc074fc42013-06-03 14:12:03 -03002973 em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xf9);
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03002974 break;
2975 case EM2820_BOARD_UNKNOWN:
2976 case EM2800_BOARD_UNKNOWN:
Darron Broadda3808e2008-09-30 02:46:41 -03002977 /*
2978 * The K-WORLD DVB-T 310U is detected as an MSI Digivox AD.
2979 *
2980 * This occurs because they share identical USB vendor and
2981 * product IDs.
2982 *
2983 * What we do here is look up the EEPROM hash of the K-WORLD
2984 * and if it is found then we decide that we do not have
2985 * a DIGIVOX and reset the device to the K-WORLD instead.
2986 *
2987 * This solution is only valid if they do not share eeprom
2988 * hash identities which has not been determined as yet.
2989 */
2990 case EM2880_BOARD_MSI_DIGIVOX_AD:
Mauro Carvalho Chehabf8b60302007-11-05 08:42:55 -03002991 if (!em28xx_hint_board(dev))
2992 em28xx_set_model(dev);
Devin Heitmuellercdf7bfa2009-06-19 00:20:28 -03002993
2994 /* In cases where we had to use a board hint, the call to
2995 em28xx_set_mode() in em28xx_pre_card_setup() was a no-op,
2996 so make the call now so the analog GPIOs are set properly
2997 before probing the i2c bus. */
Devin Heitmueller5343e442009-07-15 00:35:47 -03002998 em28xx_gpio_set(dev, dev->board.tuner_gpio);
Devin Heitmuellercdf7bfa2009-06-19 00:20:28 -03002999 em28xx_set_mode(dev, EM28XX_ANALOG_MODE);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03003000 break;
Andrea.Amorosi76@gmail.com7ca7ef62010-02-09 17:53:38 -03003001
Frank Schaefera2179682013-03-03 15:37:42 -03003002 /*
Andrea.Amorosi76@gmail.com7ca7ef62010-02-09 17:53:38 -03003003 * The Dikom DK300 is detected as an Kworld VS-DVB-T 323UR.
3004 *
3005 * This occurs because they share identical USB vendor and
3006 * product IDs.
3007 *
3008 * What we do here is look up the EEPROM hash of the Dikom
3009 * and if it is found then we decide that we do not have
3010 * a Kworld and reset the device to the Dikom instead.
3011 *
3012 * This solution is only valid if they do not share eeprom
3013 * hash identities which has not been determined as yet.
3014 */
3015 case EM2882_BOARD_KWORLD_VS_DVBT:
3016 if (!em28xx_hint_board(dev))
3017 em28xx_set_model(dev);
3018
3019 /* In cases where we had to use a board hint, the call to
3020 em28xx_set_mode() in em28xx_pre_card_setup() was a no-op,
3021 so make the call now so the analog GPIOs are set properly
3022 before probing the i2c bus. */
3023 em28xx_gpio_set(dev, dev->board.tuner_gpio);
3024 em28xx_set_mode(dev, EM28XX_ANALOG_MODE);
3025 break;
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03003026 }
3027
Mauro Carvalho Chehab505b6d02008-11-25 09:39:50 -03003028 if (dev->board.valid == EM28XX_BOARD_NOT_VALIDATED) {
Mauro Carvalho Chehab8314d402016-10-12 07:26:47 -03003029 pr_err("\n\n");
3030 pr_err("The support for this board weren't valid yet.\n");
3031 pr_err("Please send a report of having this working\n");
3032 pr_err("not to V4L mailing list (and/or to other addresses)\n\n");
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03003033 }
3034
Frank Schaefera2179682013-03-03 15:37:42 -03003035 /* Free eeprom data memory */
3036 kfree(dev->eedata);
3037 dev->eedata = NULL;
3038
Mauro Carvalho Chehabf8b60302007-11-05 08:42:55 -03003039 /* Allow override tuner type by a module parameter */
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03003040 if (tuner >= 0)
3041 dev->tuner_type = tuner;
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08003042}
Mauro Carvalho Chehabc8644052008-11-25 13:10:14 -03003043
Mauro Carvalho Chehabee972072014-01-12 11:08:22 -03003044void em28xx_setup_xc3028(struct em28xx *dev, struct xc2028_ctrl *ctl)
3045{
3046 memset(ctl, 0, sizeof(*ctl));
3047
3048 ctl->fname = XC2028_DEFAULT_FIRMWARE;
3049 ctl->max_len = 64;
3050 ctl->mts = em28xx_boards[dev->model].mts_firmware;
3051
3052 switch (dev->model) {
3053 case EM2880_BOARD_EMPIRE_DUAL_TV:
3054 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900:
3055 case EM2882_BOARD_TERRATEC_HYBRID_XS:
3056 ctl->demod = XC3028_FE_ZARLINK456;
3057 break;
3058 case EM2880_BOARD_TERRATEC_HYBRID_XS:
3059 case EM2880_BOARD_TERRATEC_HYBRID_XS_FR:
3060 case EM2881_BOARD_PINNACLE_HYBRID_PRO:
3061 ctl->demod = XC3028_FE_ZARLINK456;
3062 break;
3063 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2:
3064 case EM2882_BOARD_PINNACLE_HYBRID_PRO_330E:
3065 ctl->demod = XC3028_FE_DEFAULT;
3066 break;
3067 case EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600:
3068 ctl->demod = XC3028_FE_DEFAULT;
3069 ctl->fname = XC3028L_DEFAULT_FIRMWARE;
3070 break;
3071 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850:
3072 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950:
3073 case EM2880_BOARD_PINNACLE_PCTV_HD_PRO:
3074 /* FIXME: Better to specify the needed IF */
3075 ctl->demod = XC3028_FE_DEFAULT;
3076 break;
3077 case EM2883_BOARD_KWORLD_HYBRID_330U:
3078 case EM2882_BOARD_DIKOM_DK300:
3079 case EM2882_BOARD_KWORLD_VS_DVBT:
3080 ctl->demod = XC3028_FE_CHINA;
3081 ctl->fname = XC2028_DEFAULT_FIRMWARE;
3082 break;
3083 case EM2882_BOARD_EVGA_INDTUBE:
3084 ctl->demod = XC3028_FE_CHINA;
3085 ctl->fname = XC3028L_DEFAULT_FIRMWARE;
3086 break;
3087 default:
3088 ctl->demod = XC3028_FE_OREN538;
3089 }
3090}
3091EXPORT_SYMBOL_GPL(em28xx_setup_xc3028);
3092
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003093static void request_module_async(struct work_struct *work)
3094{
3095 struct em28xx *dev = container_of(work,
3096 struct em28xx, request_module_wk);
3097
Mauro Carvalho Chehab6ae5e062012-10-02 15:35:27 -03003098 /*
3099 * The em28xx extensions can be modules or builtin. If the
3100 * modules are already loaded or are built in, those extensions
3101 * can be initialised right now. Otherwise, the module init
3102 * code will do it.
3103 */
Mauro Carvalho Chehabe63fa182014-01-06 05:50:07 -03003104
3105 /*
3106 * Devicdes with an audio-only interface also have a V4L/DVB/RC
3107 * interface. Don't register extensions twice on those devices.
3108 */
3109 if (dev->is_audio_only) {
3110#if defined(CONFIG_MODULES) && defined(MODULE)
3111 request_module("em28xx-alsa");
3112#endif
3113 return;
3114 }
3115
Mauro Carvalho Chehab6ae5e062012-10-02 15:35:27 -03003116 em28xx_init_extension(dev);
3117
3118#if defined(CONFIG_MODULES) && defined(MODULE)
Mauro Carvalho Chehab01c28192013-12-22 13:27:02 -03003119 if (dev->has_video)
3120 request_module("em28xx-v4l");
Frank Schaeferc5874202014-09-13 05:52:20 -03003121 if (dev->usb_audio_type == EM28XX_USB_AUDIO_CLASS)
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003122 request_module("snd-usb-audio");
Frank Schaeferc5874202014-09-13 05:52:20 -03003123 else if (dev->usb_audio_type == EM28XX_USB_AUDIO_VENDOR)
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003124 request_module("em28xx-alsa");
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003125 if (dev->board.has_dvb)
3126 request_module("em28xx-dvb");
Frank Schaeferf52226092013-12-01 18:06:52 -03003127 if (dev->board.buttons ||
Frank Schaefer2b64cbd2013-04-11 15:56:01 -03003128 ((dev->board.ir_codes || dev->board.has_ir_i2c) && !disable_ir))
Ezequiel Garcíaf4d4e762012-03-26 09:13:35 -03003129 request_module("em28xx-rc");
Mauro Carvalho Chehab6ae5e062012-10-02 15:35:27 -03003130#endif /* CONFIG_MODULES */
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003131}
3132
3133static void request_modules(struct em28xx *dev)
3134{
3135 INIT_WORK(&dev->request_module_wk, request_module_async);
3136 schedule_work(&dev->request_module_wk);
3137}
Tejun Heo707bcf32010-12-24 16:14:20 +01003138
3139static void flush_request_modules(struct em28xx *dev)
3140{
Linus Torvalds0b8e74c2012-10-07 17:49:05 +09003141 flush_work(&dev->request_module_wk);
Tejun Heo707bcf32010-12-24 16:14:20 +01003142}
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003143
Mauro Carvalho Chehab37ecc7b2016-01-27 07:07:24 -02003144static int em28xx_media_device_init(struct em28xx *dev,
3145 struct usb_device *udev)
3146{
3147#ifdef CONFIG_MEDIA_CONTROLLER
3148 struct media_device *mdev;
3149
Mauro Carvalho Chehab6cf5dad2016-02-22 12:10:49 -03003150 mdev = kzalloc(sizeof(*mdev), GFP_KERNEL);
Mauro Carvalho Chehab37ecc7b2016-01-27 07:07:24 -02003151 if (!mdev)
3152 return -ENOMEM;
3153
Mauro Carvalho Chehab6cf5dad2016-02-22 12:10:49 -03003154 if (udev->product)
3155 media_device_usb_init(mdev, udev, udev->product);
3156 else if (udev->manufacturer)
3157 media_device_usb_init(mdev, udev, udev->manufacturer);
3158 else
3159 media_device_usb_init(mdev, udev, dev->name);
3160
Mauro Carvalho Chehab37ecc7b2016-01-27 07:07:24 -02003161 dev->media_dev = mdev;
3162#endif
3163 return 0;
3164}
3165
3166static void em28xx_unregister_media_device(struct em28xx *dev)
3167{
3168
3169#ifdef CONFIG_MEDIA_CONTROLLER
3170 if (dev->media_dev) {
3171 media_device_unregister(dev->media_dev);
3172 media_device_cleanup(dev->media_dev);
3173 kfree(dev->media_dev);
3174 dev->media_dev = NULL;
3175 }
3176#endif
3177}
3178
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003179/*
Chris Rankind7222e72011-09-24 11:02:32 -03003180 * em28xx_release_resources()
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003181 * unregisters the v4l2,i2c and usb devices
Chris Rankind7222e72011-09-24 11:02:32 -03003182 * called when the device gets disconnected or at module unload
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003183*/
Mauro Carvalho Chehab47677e52014-03-05 11:21:07 -03003184static void em28xx_release_resources(struct em28xx *dev)
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003185{
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003186 /*FIXME: I2C IR should be disconnected */
3187
Frank Schaefer5a620c72014-01-12 13:24:24 -03003188 mutex_lock(&dev->lock);
3189
Mauro Carvalho Chehab37ecc7b2016-01-27 07:07:24 -02003190 em28xx_unregister_media_device(dev);
3191
Mauro Carvalho Chehabaab31252013-03-05 06:55:28 -03003192 if (dev->def_i2c_bus)
3193 em28xx_i2c_unregister(dev, 1);
3194 em28xx_i2c_unregister(dev, 0);
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03003195
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003196 usb_put_dev(dev->udev);
3197
3198 /* Mark device as unused */
Mauro Carvalho Chehabc3aed262014-01-14 17:35:15 -03003199 clear_bit(dev->devno, em28xx_devused);
Frank Schaefer5a620c72014-01-12 13:24:24 -03003200
3201 mutex_unlock(&dev->lock);
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003202};
Mauro Carvalho Chehab47677e52014-03-05 11:21:07 -03003203
3204/**
3205 * em28xx_free_device() - Free em28xx device
3206 *
3207 * @ref: struct kref for em28xx device
3208 *
3209 * This is called when all extensions and em28xx core unregisters a device
3210 */
3211void em28xx_free_device(struct kref *ref)
3212{
3213 struct em28xx *dev = kref_to_dev(ref);
3214
Mauro Carvalho Chehab8314d402016-10-12 07:26:47 -03003215 pr_info("Freeing device\n");
Mauro Carvalho Chehab47677e52014-03-05 11:21:07 -03003216
3217 if (!dev->disconnected)
3218 em28xx_release_resources(dev);
3219
3220 kfree(dev->alt_max_pkt_size_isoc);
3221 kfree(dev);
3222}
3223EXPORT_SYMBOL_GPL(em28xx_free_device);
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003224
3225/*
3226 * em28xx_init_dev()
3227 * allocates and inits the device structs, registers i2c bus and v4l device
3228 */
Thomas Petazzoni622c2fc2012-01-07 10:18:45 -03003229static int em28xx_init_dev(struct em28xx *dev, struct usb_device *udev,
Mauro Carvalho Chehab36fa6742009-04-05 08:02:15 -03003230 struct usb_interface *interface,
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003231 int minor)
3232{
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003233 int retval;
Mauro Carvalho Chehaba3efa1c2012-12-23 16:32:03 -02003234 static const char *default_chip_name = "em28xx";
3235 const char *chip_name = default_chip_name;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003236
3237 dev->udev = udev;
3238 mutex_init(&dev->ctrl_urb_lock);
3239 spin_lock_init(&dev->slock);
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003240
3241 dev->em28xx_write_regs = em28xx_write_regs;
3242 dev->em28xx_read_reg = em28xx_read_reg;
3243 dev->em28xx_read_reg_req_len = em28xx_read_reg_req_len;
3244 dev->em28xx_write_regs_req = em28xx_write_regs_req;
3245 dev->em28xx_read_reg_req = em28xx_read_reg_req;
3246 dev->board.is_em2800 = em28xx_boards[dev->model].is_em2800;
3247
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003248 em28xx_set_model(dev);
3249
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003250 dev->wait_after_write = 5;
3251
3252 /* Based on the Chip ID, set the device configuration */
3253 retval = em28xx_read_reg(dev, EM28XX_R0A_CHIPID);
3254 if (retval > 0) {
3255 dev->chip_id = retval;
3256
3257 switch (dev->chip_id) {
Mauro Carvalho Chehabf57b17c32009-11-12 11:21:05 -03003258 case CHIP_ID_EM2800:
Mauro Carvalho Chehaba3efa1c2012-12-23 16:32:03 -02003259 chip_name = "em2800";
Mauro Carvalho Chehabf57b17c32009-11-12 11:21:05 -03003260 break;
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003261 case CHIP_ID_EM2710:
Mauro Carvalho Chehaba3efa1c2012-12-23 16:32:03 -02003262 chip_name = "em2710";
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003263 break;
3264 case CHIP_ID_EM2750:
Mauro Carvalho Chehaba3efa1c2012-12-23 16:32:03 -02003265 chip_name = "em2750";
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003266 break;
Frank Schaefer736a3202013-03-26 13:38:37 -03003267 case CHIP_ID_EM2765:
3268 chip_name = "em2765";
3269 dev->wait_after_write = 0;
3270 dev->is_em25xx = 1;
3271 dev->eeprom_addrwidth_16bit = 1;
3272 break;
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003273 case CHIP_ID_EM2820:
Mauro Carvalho Chehaba3efa1c2012-12-23 16:32:03 -02003274 chip_name = "em2710/2820";
Frank Schaefer1552fb32013-04-19 17:09:46 -03003275 if (le16_to_cpu(dev->udev->descriptor.idVendor)
3276 == 0xeb1a) {
Frank Schaefer61ff5d62013-04-11 15:56:47 -03003277 __le16 idProd = dev->udev->descriptor.idProduct;
Mauro Carvalho Chehabfdf1bc92014-11-28 08:34:15 -03003278
Frank Schaefer61ff5d62013-04-11 15:56:47 -03003279 if (le16_to_cpu(idProd) == 0x2710)
3280 chip_name = "em2710";
3281 else if (le16_to_cpu(idProd) == 0x2820)
3282 chip_name = "em2820";
3283 }
3284 /* NOTE: the em2820 is used in webcams, too ! */
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003285 break;
3286 case CHIP_ID_EM2840:
Mauro Carvalho Chehaba3efa1c2012-12-23 16:32:03 -02003287 chip_name = "em2840";
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003288 break;
3289 case CHIP_ID_EM2860:
Mauro Carvalho Chehaba3efa1c2012-12-23 16:32:03 -02003290 chip_name = "em2860";
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003291 break;
3292 case CHIP_ID_EM2870:
Mauro Carvalho Chehaba3efa1c2012-12-23 16:32:03 -02003293 chip_name = "em2870";
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003294 dev->wait_after_write = 0;
3295 break;
3296 case CHIP_ID_EM2874:
Mauro Carvalho Chehaba3efa1c2012-12-23 16:32:03 -02003297 chip_name = "em2874";
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003298 dev->wait_after_write = 0;
Frank Schaefer87b52432013-03-03 15:37:40 -03003299 dev->eeprom_addrwidth_16bit = 1;
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003300 break;
Antti Palosaaribc022692011-04-07 16:04:48 -03003301 case CHIP_ID_EM28174:
Mauro Carvalho Chehaba3efa1c2012-12-23 16:32:03 -02003302 chip_name = "em28174";
Antti Palosaaribc022692011-04-07 16:04:48 -03003303 dev->wait_after_write = 0;
Frank Schaefer87b52432013-03-03 15:37:40 -03003304 dev->eeprom_addrwidth_16bit = 1;
Antti Palosaaribc022692011-04-07 16:04:48 -03003305 break;
Antti Palosaari9f1d0bd2013-02-25 08:19:04 -03003306 case CHIP_ID_EM28178:
3307 chip_name = "em28178";
3308 dev->wait_after_write = 0;
3309 dev->eeprom_addrwidth_16bit = 1;
3310 break;
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003311 case CHIP_ID_EM2883:
Mauro Carvalho Chehaba3efa1c2012-12-23 16:32:03 -02003312 chip_name = "em2882/3";
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003313 dev->wait_after_write = 0;
3314 break;
Mauro Carvalho Chehabfec528b2011-07-03 21:05:06 -03003315 case CHIP_ID_EM2884:
Mauro Carvalho Chehaba3efa1c2012-12-23 16:32:03 -02003316 chip_name = "em2884";
Mauro Carvalho Chehabfec528b2011-07-03 21:05:06 -03003317 dev->wait_after_write = 0;
Frank Schaefer87b52432013-03-03 15:37:40 -03003318 dev->eeprom_addrwidth_16bit = 1;
Mauro Carvalho Chehabfec528b2011-07-03 21:05:06 -03003319 break;
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003320 default:
Mauro Carvalho Chehaba3efa1c2012-12-23 16:32:03 -02003321 printk(KERN_INFO DRIVER_NAME
3322 ": unknown em28xx chip ID (%d)\n", dev->chip_id);
Mauro Carvalho Chehabfcd20e32009-08-10 02:57:57 -03003323 }
3324 }
3325
Mauro Carvalho Chehaba3efa1c2012-12-23 16:32:03 -02003326 if (chip_name != default_chip_name)
3327 printk(KERN_INFO DRIVER_NAME
3328 ": chip ID is %s\n", chip_name);
3329
3330 /*
3331 * For em2820/em2710, the name may change latter, after checking
3332 * if the device has a sensor (so, it is em2710) or not.
3333 */
3334 snprintf(dev->name, sizeof(dev->name), "%s #%d", chip_name, dev->devno);
3335
Mauro Carvalho Chehab37ecc7b2016-01-27 07:07:24 -02003336 em28xx_media_device_init(dev, udev);
3337
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003338 if (dev->is_audio_only) {
Chris Rankin6c03e382011-08-20 08:28:17 -03003339 retval = em28xx_audio_setup(dev);
3340 if (retval)
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003341 return -ENODEV;
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003342 em28xx_init_extension(dev);
3343
3344 return 0;
3345 }
3346
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003347 em28xx_pre_card_setup(dev);
3348
3349 if (!dev->board.is_em2800) {
Mauro Carvalho Chehabca3dfd62010-09-10 17:29:14 -03003350 /* Resets I2C speed */
Sascha Sommer0903bb52012-01-08 16:19:30 -03003351 retval = em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, dev->board.i2c_speed);
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003352 if (retval < 0) {
Mauro Carvalho Chehab8314d402016-10-12 07:26:47 -03003353 pr_err("%s: em28xx_write_reg failed! retval [%d]\n",
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003354 __func__, retval);
3355 return retval;
3356 }
3357 }
3358
Mauro Carvalho Chehabaab31252013-03-05 06:55:28 -03003359 rt_mutex_init(&dev->i2c_bus_lock);
3360
3361 /* register i2c bus 0 */
Frank Schaefera3ea4bf2013-03-26 13:38:36 -03003362 if (dev->board.is_em2800)
3363 retval = em28xx_i2c_register(dev, 0, EM28XX_I2C_ALGO_EM2800);
3364 else
3365 retval = em28xx_i2c_register(dev, 0, EM28XX_I2C_ALGO_EM28XX);
Chris Rankin6c03e382011-08-20 08:28:17 -03003366 if (retval < 0) {
Mauro Carvalho Chehab8314d402016-10-12 07:26:47 -03003367 pr_err("%s: em28xx_i2c_register bus 0 - error [%d]!\n",
Mauro Carvalho Chehabfdf1bc92014-11-28 08:34:15 -03003368 __func__, retval);
Mauro Carvalho Chehabb64f8e92013-12-22 13:16:49 -03003369 return retval;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003370 }
3371
Frank Schaefera3ea4bf2013-03-26 13:38:36 -03003372 /* register i2c bus 1 */
Mauro Carvalho Chehabaab31252013-03-05 06:55:28 -03003373 if (dev->def_i2c_bus) {
Frank Schaefer736a3202013-03-26 13:38:37 -03003374 if (dev->is_em25xx)
3375 retval = em28xx_i2c_register(dev, 1,
Mauro Carvalho Chehabfdf1bc92014-11-28 08:34:15 -03003376 EM28XX_I2C_ALGO_EM25XX_BUS_B);
Frank Schaefer736a3202013-03-26 13:38:37 -03003377 else
3378 retval = em28xx_i2c_register(dev, 1,
Mauro Carvalho Chehabfdf1bc92014-11-28 08:34:15 -03003379 EM28XX_I2C_ALGO_EM28XX);
Mauro Carvalho Chehabaab31252013-03-05 06:55:28 -03003380 if (retval < 0) {
Mauro Carvalho Chehab8314d402016-10-12 07:26:47 -03003381 pr_err("%s: em28xx_i2c_register bus 1 - error [%d]!\n",
Mauro Carvalho Chehabfdf1bc92014-11-28 08:34:15 -03003382 __func__, retval);
Mauro Carvalho Chehab1f0ee652014-01-05 08:43:40 -03003383
3384 em28xx_i2c_unregister(dev, 0);
3385
Mauro Carvalho Chehabb64f8e92013-12-22 13:16:49 -03003386 return retval;
Mauro Carvalho Chehabaab31252013-03-05 06:55:28 -03003387 }
3388 }
3389
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003390 /* Do board specific init and eeprom reading */
3391 em28xx_card_setup(dev);
3392
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003393 return 0;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003394}
3395
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003396/* high bandwidth multiplier, as encoded in highspeed endpoint descriptors */
3397#define hb_mult(wMaxPacketSize) (1 + (((wMaxPacketSize) >> 11) & 0x03))
3398
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003399/*
3400 * em28xx_usb_probe()
3401 * checks for supported devices
3402 */
3403static int em28xx_usb_probe(struct usb_interface *interface,
3404 const struct usb_device_id *id)
3405{
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003406 struct usb_device *udev;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003407 struct em28xx *dev = NULL;
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03003408 int retval;
Frank Schaeferc5874202014-09-13 05:52:20 -03003409 bool has_vendor_audio = false, has_video = false, has_dvb = false;
Mauro Carvalho Chehab8b2aea72012-12-23 13:25:38 -02003410 int i, nr, try_bulk;
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003411 const int ifnum = interface->altsetting[0].desc.bInterfaceNumber;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003412 char *speed;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003413
3414 udev = usb_get_dev(interface_to_usbdev(interface));
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003415
3416 /* Check to see next free device and mark as used */
Chris Rankin38b61eb2011-08-20 08:21:03 -03003417 do {
Mauro Carvalho Chehabc3aed262014-01-14 17:35:15 -03003418 nr = find_first_zero_bit(em28xx_devused, EM28XX_MAXBOARDS);
Chris Rankin38b61eb2011-08-20 08:21:03 -03003419 if (nr >= EM28XX_MAXBOARDS) {
3420 /* No free device slots */
Mauro Carvalho Chehab5ccb1972016-10-12 07:05:48 -03003421 printk(DRIVER_NAME
3422 ": Supports only %i em28xx boards.\n",
Mauro Carvalho Chehabfdf1bc92014-11-28 08:34:15 -03003423 EM28XX_MAXBOARDS);
Chris Rankin38b61eb2011-08-20 08:21:03 -03003424 retval = -ENOMEM;
3425 goto err_no_slot;
3426 }
Mauro Carvalho Chehabc3aed262014-01-14 17:35:15 -03003427 } while (test_and_set_bit(nr, em28xx_devused));
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003428
3429 /* Don't register audio interfaces */
3430 if (interface->altsetting[0].desc.bInterfaceClass == USB_CLASS_AUDIO) {
Mauro Carvalho Chehab8314d402016-10-12 07:26:47 -03003431 pr_err(DRIVER_NAME
Mauro Carvalho Chehab5ccb1972016-10-12 07:05:48 -03003432 " audio device (%04x:%04x): interface %i, class %i\n",
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003433 le16_to_cpu(udev->descriptor.idVendor),
3434 le16_to_cpu(udev->descriptor.idProduct),
3435 ifnum,
3436 interface->altsetting[0].desc.bInterfaceClass);
3437
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03003438 retval = -ENODEV;
3439 goto err;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003440 }
3441
Holger Nelson8ab33622011-12-28 18:55:41 -03003442 /* allocate memory for our device state and initialize it */
3443 dev = kzalloc(sizeof(*dev), GFP_KERNEL);
3444 if (dev == NULL) {
Holger Nelson8ab33622011-12-28 18:55:41 -03003445 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 kfree(dev);
3455 retval = -ENOMEM;
3456 goto err;
3457 }
3458
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003459 /* Get endpoints */
3460 for (i = 0; i < interface->num_altsetting; i++) {
3461 int ep;
3462
3463 for (ep = 0; ep < interface->altsetting[i].desc.bNumEndpoints; ep++) {
Holger Nelson8ab33622011-12-28 18:55:41 -03003464 const struct usb_endpoint_descriptor *e;
3465 int sizedescr, size;
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003466
Holger Nelson8ab33622011-12-28 18:55:41 -03003467 e = &interface->altsetting[i].endpoint[ep].desc;
3468
3469 sizedescr = le16_to_cpu(e->wMaxPacketSize);
3470 size = sizedescr & 0x7ff;
3471
3472 if (udev->speed == USB_SPEED_HIGH)
3473 size = size * hb_mult(sizedescr);
3474
Frank Schaeferc647a912012-11-08 14:11:52 -03003475 if (usb_endpoint_dir_in(e)) {
Holger Nelson8ab33622011-12-28 18:55:41 -03003476 switch (e->bEndpointAddress) {
Frank Schaeferc647a912012-11-08 14:11:52 -03003477 case 0x82:
Holger Nelson8ab33622011-12-28 18:55:41 -03003478 has_video = true;
Frank Schaeferc647a912012-11-08 14:11:52 -03003479 if (usb_endpoint_xfer_isoc(e)) {
3480 dev->analog_ep_isoc =
3481 e->bEndpointAddress;
3482 dev->alt_max_pkt_size_isoc[i] = size;
3483 } else if (usb_endpoint_xfer_bulk(e)) {
3484 dev->analog_ep_bulk =
3485 e->bEndpointAddress;
3486 }
Holger Nelson8ab33622011-12-28 18:55:41 -03003487 break;
Frank Schaeferc647a912012-11-08 14:11:52 -03003488 case 0x83:
3489 if (usb_endpoint_xfer_isoc(e)) {
Frank Schaeferc5874202014-09-13 05:52:20 -03003490 has_vendor_audio = true;
Frank Schaeferc647a912012-11-08 14:11:52 -03003491 } else {
3492 printk(KERN_INFO DRIVER_NAME
Mauro Carvalho Chehab5ccb1972016-10-12 07:05:48 -03003493 ": error: skipping audio endpoint 0x83, because it uses bulk transfers !\n");
Frank Schaeferc647a912012-11-08 14:11:52 -03003494 }
3495 break;
3496 case 0x84:
3497 if (has_video &&
3498 (usb_endpoint_xfer_bulk(e))) {
3499 dev->analog_ep_bulk =
3500 e->bEndpointAddress;
3501 } else {
Frank Schaeferc647a912012-11-08 14:11:52 -03003502 if (usb_endpoint_xfer_isoc(e)) {
Frank Schaeferc647a912012-11-08 14:11:52 -03003503 if (size > dev->dvb_max_pkt_size_isoc) {
Frank Schaefer72cc9ba2013-03-27 16:07:41 -03003504 has_dvb = true; /* see NOTE (~) */
Frank Schaeferb3404a82013-04-08 13:06:59 -03003505 dev->dvb_ep_isoc = e->bEndpointAddress;
Frank Schaeferc647a912012-11-08 14:11:52 -03003506 dev->dvb_max_pkt_size_isoc = size;
3507 dev->dvb_alt_isoc = i;
3508 }
3509 } else {
Frank Schaefer72cc9ba2013-03-27 16:07:41 -03003510 has_dvb = true;
Frank Schaeferc647a912012-11-08 14:11:52 -03003511 dev->dvb_ep_bulk = e->bEndpointAddress;
3512 }
Holger Nelson8ab33622011-12-28 18:55:41 -03003513 }
3514 break;
3515 }
3516 }
Frank Schaeferc647a912012-11-08 14:11:52 -03003517 /* NOTE:
3518 * Old logic with support for isoc transfers only was:
3519 * 0x82 isoc => analog
3520 * 0x83 isoc => audio
3521 * 0x84 isoc => digital
3522 *
3523 * New logic with support for bulk transfers
3524 * 0x82 isoc => analog
3525 * 0x82 bulk => analog
3526 * 0x83 isoc* => audio
3527 * 0x84 isoc => digital
3528 * 0x84 bulk => analog or digital**
3529 * (*: audio should always be isoc)
3530 * (**: analog, if ep 0x82 is isoc, otherwise digital)
3531 *
3532 * The new logic preserves backwards compatibility and
3533 * reflects the endpoint configurations we have seen
3534 * so far. But there might be devices for which this
3535 * logic is not sufficient...
3536 */
Frank Schaefer72cc9ba2013-03-27 16:07:41 -03003537 /*
3538 * NOTE (~): some manufacturers (e.g. Terratec) disable
3539 * endpoints by setting wMaxPacketSize to 0 bytes for
3540 * all alt settings. So far, we've seen this for
3541 * DVB isoc endpoints only.
3542 */
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003543 }
3544 }
3545
Frank Schaeferc5874202014-09-13 05:52:20 -03003546 if (!(has_vendor_audio || has_video || has_dvb)) {
Holger Nelson8ab33622011-12-28 18:55:41 -03003547 retval = -ENODEV;
3548 goto err_free;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003549 }
3550
3551 switch (udev->speed) {
3552 case USB_SPEED_LOW:
3553 speed = "1.5";
3554 break;
3555 case USB_SPEED_UNKNOWN:
3556 case USB_SPEED_FULL:
3557 speed = "12";
3558 break;
3559 case USB_SPEED_HIGH:
3560 speed = "480";
3561 break;
3562 default:
3563 speed = "unknown";
3564 }
3565
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003566 printk(KERN_INFO DRIVER_NAME
Mauro Carvalho Chehab5ccb1972016-10-12 07:05:48 -03003567 ": New device %s %s @ %s Mbps (%04x:%04x, interface %d, class %d)\n",
Ezequiel García401a5822012-03-13 10:27:09 -03003568 udev->manufacturer ? udev->manufacturer : "",
3569 udev->product ? udev->product : "",
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003570 speed,
3571 le16_to_cpu(udev->descriptor.idVendor),
3572 le16_to_cpu(udev->descriptor.idProduct),
3573 ifnum,
3574 interface->altsetting->desc.bInterfaceNumber);
3575
Devin Heitmueller64a00b42009-05-27 23:23:37 -03003576 /*
3577 * Make sure we have 480 Mbps of bandwidth, otherwise things like
3578 * video stream wouldn't likely work, since 12 Mbps is generally
3579 * not enough even for most Digital TV streams.
3580 */
Devin Heitmuellere2a1b792009-05-27 23:44:10 -03003581 if (udev->speed != USB_SPEED_HIGH && disable_usb_speed_check == 0) {
Devin Heitmueller64a00b42009-05-27 23:23:37 -03003582 printk(DRIVER_NAME ": Device initialization failed.\n");
Mauro Carvalho Chehab5ccb1972016-10-12 07:05:48 -03003583 printk(DRIVER_NAME ": Device must be connected to a high-speed USB 2.0 port.\n");
Devin Heitmueller64a00b42009-05-27 23:23:37 -03003584 retval = -ENODEV;
Holger Nelson8ab33622011-12-28 18:55:41 -03003585 goto err_free;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003586 }
3587
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003588 dev->devno = nr;
3589 dev->model = id->driver_info;
3590 dev->alt = -1;
Frank Schaeferc5874202014-09-13 05:52:20 -03003591 dev->is_audio_only = has_vendor_audio && !(has_video || has_dvb);
Mauro Carvalho Chehab01c28192013-12-22 13:27:02 -03003592 dev->has_video = has_video;
Frank Schaefer961717b2014-01-13 19:02:06 -03003593 dev->ifnum = ifnum;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003594
Frank Schaeferc5874202014-09-13 05:52:20 -03003595 if (has_vendor_audio) {
3596 printk(KERN_INFO DRIVER_NAME ": Audio interface %i found %s\n",
3597 ifnum, "(Vendor Class)");
3598 dev->usb_audio_type = EM28XX_USB_AUDIO_VENDOR;
3599 }
3600 /* Checks if audio is provided by a USB Audio Class interface */
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003601 for (i = 0; i < udev->config->desc.bNumInterfaces; i++) {
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003602 struct usb_interface *uif = udev->config->interface[i];
Mauro Carvalho Chehabfdf1bc92014-11-28 08:34:15 -03003603
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003604 if (uif->altsetting[0].desc.bInterfaceClass == USB_CLASS_AUDIO) {
Frank Schaeferc5874202014-09-13 05:52:20 -03003605 if (has_vendor_audio)
Mauro Carvalho Chehab8314d402016-10-12 07:26:47 -03003606 pr_err("em28xx: device seems to have vendor AND usb audio class interfaces !\n"
Frank Schaeferc5874202014-09-13 05:52:20 -03003607 "\t\tThe vendor interface will be ignored. Please contact the developers <linux-media@vger.kernel.org>\n");
3608 dev->usb_audio_type = EM28XX_USB_AUDIO_CLASS;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003609 break;
3610 }
3611 }
3612
Mauro Carvalho Chehabaa514962012-12-23 13:15:47 -02003613 if (has_video)
3614 printk(KERN_INFO DRIVER_NAME
3615 ": Video interface %i found:%s%s\n",
3616 ifnum,
3617 dev->analog_ep_bulk ? " bulk" : "",
3618 dev->analog_ep_isoc ? " isoc" : "");
3619 if (has_dvb)
3620 printk(KERN_INFO DRIVER_NAME
3621 ": DVB interface %i found:%s%s\n",
3622 ifnum,
3623 dev->dvb_ep_bulk ? " bulk" : "",
3624 dev->dvb_ep_isoc ? " isoc" : "");
3625
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003626 dev->num_alt = interface->num_altsetting;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003627
Mauro Carvalho Chehabd3e4ea02012-10-27 16:29:20 -03003628 if ((unsigned)card[nr] < em28xx_bcount)
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003629 dev->model = card[nr];
3630
Mauro Carvalho Chehab4f83e7b2011-06-17 15:15:12 -03003631 /* save our data pointer in this interface device */
3632 usb_set_intfdata(interface, dev);
3633
Mauro Carvalho Chehab22580f72016-01-29 12:53:56 -02003634 /* allocate device struct and check if the device is a webcam */
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003635 mutex_init(&dev->lock);
Thomas Petazzoni622c2fc2012-01-07 10:18:45 -03003636 retval = em28xx_init_dev(dev, udev, interface, nr);
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003637 if (retval) {
Mauro Carvalho Chehab01c28192013-12-22 13:27:02 -03003638 goto err_free;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003639 }
3640
Frank Schaefer7e5d74e2012-12-26 15:12:37 -03003641 if (usb_xfer_mode < 0) {
Mauro Carvalho Chehab8b2aea72012-12-23 13:25:38 -02003642 if (dev->board.is_webcam)
3643 try_bulk = 1;
3644 else
3645 try_bulk = 0;
3646 } else {
Frank Schaefer7e5d74e2012-12-26 15:12:37 -03003647 try_bulk = usb_xfer_mode > 0;
Mauro Carvalho Chehab8b2aea72012-12-23 13:25:38 -02003648 }
3649
Mauro Carvalho Chehab22580f72016-01-29 12:53:56 -02003650 /* Disable V4L2 if the device doesn't have a decoder */
3651 if (has_video &&
3652 dev->board.decoder == EM28XX_NODECODER && !dev->board.is_webcam) {
3653 printk(DRIVER_NAME
3654 ": Currently, V4L2 is not supported on this model\n");
3655 has_video = false;
3656 dev->has_video = false;
3657 }
3658
Mauro Carvalho Chehab8b2aea72012-12-23 13:25:38 -02003659 /* Select USB transfer types to use */
3660 if (has_video) {
Frank Schaefer58697782014-03-22 10:00:59 -03003661 if (!dev->analog_ep_isoc || (try_bulk && dev->analog_ep_bulk))
3662 dev->analog_xfer_bulk = 1;
Mauro Carvalho Chehab8314d402016-10-12 07:26:47 -03003663 pr_info("analog set to %s mode.\n",
Frank Schaefer58697782014-03-22 10:00:59 -03003664 dev->analog_xfer_bulk ? "bulk" : "isoc");
Mauro Carvalho Chehab8b2aea72012-12-23 13:25:38 -02003665 }
Gianluca Gennari86d38d12012-02-13 13:59:22 -03003666 if (has_dvb) {
Frank Schaefer58697782014-03-22 10:00:59 -03003667 if (!dev->dvb_ep_isoc || (try_bulk && dev->dvb_ep_bulk))
3668 dev->dvb_xfer_bulk = 1;
Mauro Carvalho Chehab8314d402016-10-12 07:26:47 -03003669 pr_info("dvb set to %s mode.\n",
Mauro Carvalho Chehab8b2aea72012-12-23 13:25:38 -02003670 dev->dvb_xfer_bulk ? "bulk" : "isoc");
Gianluca Gennari86d38d12012-02-13 13:59:22 -03003671 }
3672
Mauro Carvalho Chehab47677e52014-03-05 11:21:07 -03003673 kref_init(&dev->ref);
3674
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003675 request_modules(dev);
3676
Mauro Carvalho Chehab37ecc7b2016-01-27 07:07:24 -02003677 /*
3678 * Do it at the end, to reduce dynamic configuration changes during
3679 * the device init. Yet, as request_modules() can be async, the
3680 * topology will likely change after the load of the em28xx subdrivers.
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003681 */
Mauro Carvalho Chehab37ecc7b2016-01-27 07:07:24 -02003682#ifdef CONFIG_MEDIA_CONTROLLER
3683 retval = media_device_register(dev->media_dev);
3684#endif
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003685
3686 return 0;
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03003687
Holger Nelson8ab33622011-12-28 18:55:41 -03003688err_free:
Frank Schaefer0cf544a2012-11-08 14:11:49 -03003689 kfree(dev->alt_max_pkt_size_isoc);
Holger Nelson8ab33622011-12-28 18:55:41 -03003690 kfree(dev);
3691
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03003692err:
Mauro Carvalho Chehabc3aed262014-01-14 17:35:15 -03003693 clear_bit(nr, em28xx_devused);
Chris Rankin38b61eb2011-08-20 08:21:03 -03003694
3695err_no_slot:
3696 usb_put_dev(udev);
Douglas Schilling Landgraff2cf2502009-03-31 17:10:58 -03003697 return retval;
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003698}
3699
3700/*
3701 * em28xx_usb_disconnect()
Chris Rankind7222e72011-09-24 11:02:32 -03003702 * called when the device gets disconnected
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003703 * video device will be unregistered on v4l2_close in case it is still open
3704 */
3705static void em28xx_usb_disconnect(struct usb_interface *interface)
3706{
3707 struct em28xx *dev;
3708
3709 dev = usb_get_intfdata(interface);
3710 usb_set_intfdata(interface, NULL);
3711
3712 if (!dev)
3713 return;
3714
Frank Schaefer05fe2172012-12-27 19:02:44 -03003715 dev->disconnected = 1;
3716
Mauro Carvalho Chehab8314d402016-10-12 07:26:47 -03003717 pr_info("Disconnecting %s\n", dev->name);
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003718
Tejun Heo707bcf32010-12-24 16:14:20 +01003719 flush_request_modules(dev);
3720
Frank Schaefer05fe2172012-12-27 19:02:44 -03003721 em28xx_close_extension(dev);
Mauro Carvalho Chehab54a2a842013-12-27 13:01:04 -03003722
Frank Schaefer5a620c72014-01-12 13:24:24 -03003723 em28xx_release_resources(dev);
Mauro Carvalho Chehab47677e52014-03-05 11:21:07 -03003724 kref_put(&dev->ref, em28xx_free_device);
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003725}
3726
Shuah Khancd701c82014-02-21 21:50:18 -03003727static int em28xx_usb_suspend(struct usb_interface *interface,
Mauro Carvalho Chehabfdf1bc92014-11-28 08:34:15 -03003728 pm_message_t message)
Shuah Khancd701c82014-02-21 21:50:18 -03003729{
3730 struct em28xx *dev;
3731
3732 dev = usb_get_intfdata(interface);
3733 if (!dev)
3734 return 0;
3735 em28xx_suspend_extension(dev);
3736 return 0;
3737}
3738
3739static int em28xx_usb_resume(struct usb_interface *interface)
3740{
3741 struct em28xx *dev;
3742
3743 dev = usb_get_intfdata(interface);
3744 if (!dev)
3745 return 0;
3746 em28xx_resume_extension(dev);
3747 return 0;
3748}
3749
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003750static struct usb_driver em28xx_usb_driver = {
3751 .name = "em28xx",
3752 .probe = em28xx_usb_probe,
3753 .disconnect = em28xx_usb_disconnect,
Shuah Khancd701c82014-02-21 21:50:18 -03003754 .suspend = em28xx_usb_suspend,
3755 .resume = em28xx_usb_resume,
Mauro Carvalho Chehab214635f2014-09-26 06:53:15 -03003756 .reset_resume = em28xx_usb_resume,
Mauro Carvalho Chehab1a23f812008-12-28 22:18:14 -03003757 .id_table = em28xx_id_table,
3758};
3759
Greg Kroah-Hartmanecb3b2b2011-11-18 09:46:12 -08003760module_usb_driver(em28xx_usb_driver);