blob: 68bbfdbbca1464babdd1b506803414e4391bb694 [file] [log] [blame]
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08001/*
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03002 em28xx-cards.c - driver for Empia EM2800/EM2820/2840 USB
3 video capture devices
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08004
Mauro Carvalho Chehabf7abcd32005-11-08 21:38:25 -08005 Copyright (C) 2005 Ludovico Cavedon <cavedon@sssup.it>
6 Markus Rechberger <mrechberger@gmail.com>
Mauro Carvalho Chehab2e7c6dc2006-04-03 07:53:40 -03007 Mauro Carvalho Chehab <mchehab@infradead.org>
Mauro Carvalho Chehabf7abcd32005-11-08 21:38:25 -08008 Sascha Sommer <saschasommer@freenet.de>
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08009
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 */
24
25#include <linux/init.h>
26#include <linux/module.h>
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -080027#include <linux/delay.h>
28#include <linux/i2c.h>
29#include <linux/usb.h>
30#include <media/tuner.h>
Hans Verkuil2474ed42006-03-19 12:35:57 -030031#include <media/msp3400.h>
Hans Verkuilc7c0b342006-04-02 13:35:00 -030032#include <media/saa7115.h>
33#include <media/tvp5150.h>
Mauro Carvalho Chehab1f6173e2005-11-08 21:37:16 -080034#include <media/tveeprom.h>
Mauro Carvalho Chehab9bb13a62006-01-09 15:25:37 -020035#include <media/v4l2-common.h>
Hans Verkuil38f9d302008-07-23 05:09:15 -030036#include <media/v4l2-chip-ident.h>
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -080037
Mauro Carvalho Chehabf7abcd32005-11-08 21:38:25 -080038#include "em28xx.h"
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -080039
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -030040static int tuner = -1;
41module_param(tuner, int, 0444);
42MODULE_PARM_DESC(tuner, "tuner type");
43
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -030044static unsigned int disable_ir;
45module_param(disable_ir, int, 0444);
46MODULE_PARM_DESC(disable_ir, "disable infrared remote support");
47
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -030048struct em28xx_hash_table {
49 unsigned long hash;
50 unsigned int model;
51 unsigned int tuner;
52};
53
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -080054struct em28xx_board em28xx_boards[] = {
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -030055 [EM2750_BOARD_UNKNOWN] = {
56 .name = "Unknown EM2750/EM2751 webcam grabber",
57 .vchannels = 1,
58 .input = { {
59 .type = EM28XX_VMUX_COMPOSITE1,
60 .vmux = 0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -030061 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -030062 } },
63 },
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -080064 [EM2800_BOARD_UNKNOWN] = {
65 .name = "Unknown EM2800 video grabber",
66 .is_em2800 = 1,
67 .vchannels = 2,
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -080068 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -080069 .decoder = EM28XX_SAA7113,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -030070 .input = { {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -080071 .type = EM28XX_VMUX_COMPOSITE1,
Hans Verkuilc7c0b342006-04-02 13:35:00 -030072 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -030073 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -030074 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -080075 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -030076 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -030077 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -030078 } },
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -080079 },
80 [EM2820_BOARD_UNKNOWN] = {
Mauro Carvalho Chehab3dbd85b2007-11-03 08:07:07 -030081 .name = "Unknown EM2750/28xx video grabber",
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -080082 .is_em2800 = 0,
Mauro Carvalho Chehabed086312008-01-24 06:59:20 -030083 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -080084 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -030085 [EM2750_BOARD_DLCW_130] = {
86 /* Beijing Huaqi Information Digital Technology Co., Ltd */
87 .name = "Huaqi DLCW-130",
88 .valid = EM28XX_BOARD_NOT_VALIDATED,
89 .vchannels = 1,
90 .input = { {
91 .type = EM28XX_VMUX_COMPOSITE1,
92 .vmux = 0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -030093 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -030094 } },
95 },
Markus Rechberger4d17d082006-02-07 06:25:39 -020096 [EM2820_BOARD_KWORLD_PVRTV2800RF] = {
Markus Rechberger33ccaa32006-02-07 06:25:41 -020097 .name = "Kworld PVR TV 2800 RF",
Markus Rechberger4d17d082006-02-07 06:25:39 -020098 .is_em2800 = 0,
99 .vchannels = 2,
Mauro Carvalho Chehabed086312008-01-24 06:59:20 -0300100 .tuner_type = TUNER_TEMIC_PAL,
Markus Rechberger4d17d082006-02-07 06:25:39 -0200101 .tda9887_conf = TDA9887_PRESENT,
Markus Rechberger4d17d082006-02-07 06:25:39 -0200102 .decoder = EM28XX_SAA7113,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300103 .input = { {
Markus Rechberger4d17d082006-02-07 06:25:39 -0200104 .type = EM28XX_VMUX_COMPOSITE1,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300105 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300106 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300107 }, {
Markus Rechberger4d17d082006-02-07 06:25:39 -0200108 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300109 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300110 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300111 } },
Markus Rechberger4d17d082006-02-07 06:25:39 -0200112 },
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800113 [EM2820_BOARD_TERRATEC_CINERGY_250] = {
114 .name = "Terratec Cinergy 250 USB",
115 .vchannels = 3,
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800116 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
117 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800118 .decoder = EM28XX_SAA7113,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300119 .input = { {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800120 .type = EM28XX_VMUX_TELEVISION,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300121 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300122 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300123 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800124 .type = EM28XX_VMUX_COMPOSITE1,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300125 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300126 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300127 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800128 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300129 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300130 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300131 } },
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800132 },
133 [EM2820_BOARD_PINNACLE_USB_2] = {
134 .name = "Pinnacle PCTV USB 2",
135 .vchannels = 3,
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800136 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
137 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800138 .decoder = EM28XX_SAA7113,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300139 .input = { {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800140 .type = EM28XX_VMUX_TELEVISION,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300141 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300142 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300143 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800144 .type = EM28XX_VMUX_COMPOSITE1,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300145 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300146 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300147 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800148 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300149 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300150 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300151 } },
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800152 },
153 [EM2820_BOARD_HAUPPAUGE_WINTV_USB_2] = {
154 .name = "Hauppauge WinTV USB 2",
155 .vchannels = 3,
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800156 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300157 .tda9887_conf = TDA9887_PRESENT |
158 TDA9887_PORT1_ACTIVE|
159 TDA9887_PORT2_ACTIVE,
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800160 .decoder = EM28XX_TVP5150,
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800161 .has_msp34xx = 1,
162 /*FIXME: S-Video not tested */
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300163 .input = { {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800164 .type = EM28XX_VMUX_TELEVISION,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300165 .vmux = TVP5150_COMPOSITE0,
Hans Verkuil2474ed42006-03-19 12:35:57 -0300166 .amux = MSP_INPUT_DEFAULT,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300167 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800168 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300169 .vmux = TVP5150_SVIDEO,
Hans Verkuil07151722006-04-01 18:03:23 -0300170 .amux = MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1,
171 MSP_DSP_IN_SCART, MSP_DSP_IN_SCART),
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300172 } },
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800173 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300174 [EM2820_BOARD_DLINK_USB_TV] = {
175 .name = "D-Link DUB-T210 TV Tuner",
176 .valid = EM28XX_BOARD_NOT_VALIDATED,
177 .vchannels = 3,
178 .is_em2800 = 0,
179 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
180 .tda9887_conf = TDA9887_PRESENT,
181 .decoder = EM28XX_SAA7113,
182 .input = { {
183 .type = EM28XX_VMUX_TELEVISION,
184 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300185 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300186 }, {
187 .type = EM28XX_VMUX_COMPOSITE1,
188 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300189 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300190 }, {
191 .type = EM28XX_VMUX_SVIDEO,
192 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300193 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300194 } },
195 },
196 [EM2820_BOARD_HERCULES_SMART_TV_USB2] = {
197 .name = "Hercules Smart TV USB 2.0",
198 .valid = EM28XX_BOARD_NOT_VALIDATED,
199 .vchannels = 3,
200 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
201 .tda9887_conf = TDA9887_PRESENT,
202 .decoder = EM28XX_SAA7113,
203 .input = { {
204 .type = EM28XX_VMUX_TELEVISION,
205 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300206 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300207 }, {
208 .type = EM28XX_VMUX_COMPOSITE1,
209 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300210 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300211 }, {
212 .type = EM28XX_VMUX_SVIDEO,
213 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300214 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300215 } },
216 },
217 [EM2820_BOARD_PINNACLE_USB_2_FM1216ME] = {
218 .name = "Pinnacle PCTV USB 2 (Philips FM1216ME)",
219 .valid = EM28XX_BOARD_NOT_VALIDATED,
220 .vchannels = 3,
221 .is_em2800 = 0,
222 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
223 .tda9887_conf = TDA9887_PRESENT,
224 .decoder = EM28XX_SAA7113,
225 .input = { {
226 .type = EM28XX_VMUX_TELEVISION,
227 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300228 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300229 }, {
230 .type = EM28XX_VMUX_COMPOSITE1,
231 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300232 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300233 }, {
234 .type = EM28XX_VMUX_SVIDEO,
235 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300236 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300237 } },
238 },
239 [EM2820_BOARD_GADMEI_UTV310] = {
240 .name = "Gadmei UTV310",
241 .valid = EM28XX_BOARD_NOT_VALIDATED,
242 .vchannels = 3,
243 .tuner_type = TUNER_TNF_5335MF,
244 .tda9887_conf = TDA9887_PRESENT,
245 .decoder = EM28XX_SAA7113,
246 .input = { {
247 .type = EM28XX_VMUX_TELEVISION,
248 .vmux = SAA7115_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300249 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300250 }, {
251 .type = EM28XX_VMUX_COMPOSITE1,
252 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300253 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300254 }, {
255 .type = EM28XX_VMUX_SVIDEO,
256 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300257 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300258 } },
259 },
260 [EM2820_BOARD_LEADTEK_WINFAST_USBII_DELUXE] = {
261 .name = "Leadtek Winfast USB II Deluxe",
262 .valid = EM28XX_BOARD_NOT_VALIDATED,
263 .vchannels = 3,
264 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
265 .tda9887_conf = TDA9887_PRESENT,
266 .decoder = EM28XX_SAA7114,
267 .input = { {
268 .type = EM28XX_VMUX_TELEVISION,
269 .vmux = 2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300270 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300271 }, {
272 .type = EM28XX_VMUX_COMPOSITE1,
273 .vmux = 0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300274 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300275 }, {
276 .type = EM28XX_VMUX_SVIDEO,
277 .vmux = 9,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300278 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300279 } },
280 },
281 [EM2820_BOARD_PINNACLE_DVC_100] = {
282 .name = "Pinnacle Dazzle DVC 100",
283 .valid = EM28XX_BOARD_NOT_VALIDATED,
284 .vchannels = 3,
285 .decoder = EM28XX_SAA7113,
286 .input = { {
287 .type = EM28XX_VMUX_COMPOSITE1,
288 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300289 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300290 }, {
291 .type = EM28XX_VMUX_SVIDEO,
292 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300293 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300294 } },
295 },
296 [EM2820_BOARD_VIDEOLOGY_20K14XUSB] = {
297 .name = "Videology 20K14XUSB USB2.0",
298 .valid = EM28XX_BOARD_NOT_VALIDATED,
299 .vchannels = 1,
300 .input = { {
301 .type = EM28XX_VMUX_COMPOSITE1,
302 .vmux = 0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300303 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300304 } },
305 },
306 [EM2821_BOARD_PROLINK_PLAYTV_USB2] = {
307 .name = "SIIG AVTuner-PVR/Prolink PlayTV USB 2.0",
308 .valid = EM28XX_BOARD_NOT_VALIDATED,
309 .vchannels = 3,
310 .is_em2800 = 0,
311 .tuner_type = TUNER_LG_PAL_NEW_TAPC, /* unknown? */
312 .tda9887_conf = TDA9887_PRESENT, /* unknown? */
313 .decoder = EM28XX_SAA7113,
314 .input = { {
315 .type = EM28XX_VMUX_TELEVISION,
316 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300317 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300318 }, {
319 .type = EM28XX_VMUX_COMPOSITE1,
320 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300321 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300322 }, {
323 .type = EM28XX_VMUX_SVIDEO,
324 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300325 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300326 } },
327 },
328 [EM2821_BOARD_SUPERCOMP_USB_2] = {
329 .name = "Supercomp USB 2.0 TV",
330 .valid = EM28XX_BOARD_NOT_VALIDATED,
331 .vchannels = 3,
332 .is_em2800 = 0,
333 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
334 .tda9887_conf = TDA9887_PRESENT |
335 TDA9887_PORT1_ACTIVE |
336 TDA9887_PORT2_ACTIVE,
337 .decoder = EM28XX_SAA7113,
338 .input = { {
339 .type = EM28XX_VMUX_TELEVISION,
340 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300341 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300342 }, {
343 .type = EM28XX_VMUX_COMPOSITE1,
344 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300345 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300346 }, {
347 .type = EM28XX_VMUX_SVIDEO,
348 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300349 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300350 } },
351 },
352 [EM2821_BOARD_USBGEAR_VD204] = {
353 .name = "Usbgear VD204v9",
354 .valid = EM28XX_BOARD_NOT_VALIDATED,
355 .vchannels = 2,
356 .decoder = EM28XX_SAA7113,
357 .input = { {
358 .type = EM28XX_VMUX_COMPOSITE1,
359 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300360 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300361 }, {
362 .type = EM28XX_VMUX_SVIDEO,
363 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300364 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300365 } },
366 },
367 [EM2860_BOARD_NETGMBH_CAM] = {
368 /* Beijing Huaqi Information Digital Technology Co., Ltd */
369 .name = "NetGMBH Cam",
370 .valid = EM28XX_BOARD_NOT_VALIDATED,
371 .vchannels = 1,
372 .input = { {
373 .type = EM28XX_VMUX_COMPOSITE1,
374 .vmux = 0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300375 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300376 } },
377 },
378 [EM2860_BOARD_TYPHOON_DVD_MAKER] = {
379 .name = "Typhoon DVD Maker",
380 .valid = EM28XX_BOARD_NOT_VALIDATED,
381 .vchannels = 2,
382 .decoder = EM28XX_SAA7113,
383 .input = { {
384 .type = EM28XX_VMUX_COMPOSITE1,
385 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300386 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300387 }, {
388 .type = EM28XX_VMUX_SVIDEO,
389 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300390 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300391 } },
392 },
393 [EM2860_BOARD_GADMEI_UTV330] = {
394 .name = "Gadmei UTV330",
395 .valid = EM28XX_BOARD_NOT_VALIDATED,
396 .vchannels = 3,
397 .tuner_type = TUNER_TNF_5335MF,
398 .tda9887_conf = TDA9887_PRESENT,
399 .decoder = EM28XX_SAA7113,
400 .input = { {
401 .type = EM28XX_VMUX_TELEVISION,
402 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300403 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300404 }, {
405 .type = EM28XX_VMUX_COMPOSITE1,
406 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300407 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300408 }, {
409 .type = EM28XX_VMUX_SVIDEO,
410 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300411 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300412 } },
413 },
414 [EM2860_BOARD_TERRATEC_HYBRID_XS] = {
415 .name = "Terratec Cinergy A Hybrid XS",
416 .valid = EM28XX_BOARD_NOT_VALIDATED,
417 .vchannels = 3,
418 .tuner_type = TUNER_XC2028,
419 .decoder = EM28XX_TVP5150,
420 .input = { {
421 .type = EM28XX_VMUX_TELEVISION,
422 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300423 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300424 }, {
425 .type = EM28XX_VMUX_COMPOSITE1,
426 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300427 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300428 }, {
429 .type = EM28XX_VMUX_SVIDEO,
430 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300431 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300432 } },
433 },
434 [EM2861_BOARD_KWORLD_PVRTV_300U] = {
435 .name = "KWorld PVRTV 300U",
436 .valid = EM28XX_BOARD_NOT_VALIDATED,
437 .vchannels = 3,
438 .tuner_type = TUNER_XC2028,
439 .decoder = EM28XX_TVP5150,
440 .input = { {
441 .type = EM28XX_VMUX_TELEVISION,
442 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300443 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300444 }, {
445 .type = EM28XX_VMUX_COMPOSITE1,
446 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300447 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300448 }, {
449 .type = EM28XX_VMUX_SVIDEO,
450 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300451 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300452 } },
453 },
454 [EM2861_BOARD_YAKUMO_MOVIE_MIXER] = {
455 .name = "Yakumo MovieMixer",
456 .valid = EM28XX_BOARD_NOT_VALIDATED,
457 .vchannels = 1,
458 .decoder = EM28XX_TVP5150,
459 .input = { {
460 .type = EM28XX_VMUX_TELEVISION,
461 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300462 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300463 }, {
464 .type = EM28XX_VMUX_COMPOSITE1,
465 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300466 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300467 }, {
468 .type = EM28XX_VMUX_SVIDEO,
469 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300470 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300471 } },
472 },
473 [EM2861_BOARD_PLEXTOR_PX_TV100U] = {
474 .name = "Plextor ConvertX PX-TV100U",
475 .valid = EM28XX_BOARD_NOT_VALIDATED,
476 .vchannels = 3,
477 .tuner_type = TUNER_TNF_5335MF,
478 .tda9887_conf = TDA9887_PRESENT,
479 .decoder = EM28XX_TVP5150,
480 .input = { {
481 .type = EM28XX_VMUX_TELEVISION,
482 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300483 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300484 }, {
485 .type = EM28XX_VMUX_COMPOSITE1,
486 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300487 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300488 }, {
489 .type = EM28XX_VMUX_SVIDEO,
490 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300491 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300492 } },
493 },
494 [EM2870_BOARD_TERRATEC_XS] = {
495 .name = "Terratec Cinergy T XS",
496 .valid = EM28XX_BOARD_NOT_VALIDATED,
497 .tuner_type = TUNER_XC2028,
498 },
499 [EM2870_BOARD_TERRATEC_XS_MT2060] = {
500 .name = "Terratec Cinergy T XS (MT2060)",
501 .valid = EM28XX_BOARD_NOT_VALIDATED,
502 .tuner_type = TUNER_ABSENT, /* MT2060 */
503 },
504 [EM2870_BOARD_KWORLD_350U] = {
505 .name = "Kworld 350 U DVB-T",
506 .valid = EM28XX_BOARD_NOT_VALIDATED,
507 .tuner_type = TUNER_XC2028,
508 },
509 [EM2870_BOARD_KWORLD_355U] = {
510 .name = "Kworld 355 U DVB-T",
511 .valid = EM28XX_BOARD_NOT_VALIDATED,
512 },
513 [EM2870_BOARD_PINNACLE_PCTV_DVB] = {
514 .name = "Pinnacle PCTV DVB-T",
515 .valid = EM28XX_BOARD_NOT_VALIDATED,
516 .tuner_type = TUNER_ABSENT, /* MT2060 */
517 },
518 [EM2870_BOARD_COMPRO_VIDEOMATE] = {
519 .name = "Compro, VideoMate U3",
520 .valid = EM28XX_BOARD_NOT_VALIDATED,
521 .tuner_type = TUNER_ABSENT, /* MT2060 */
522 },
523 [EM2880_BOARD_TERRATEC_HYBRID_XS_FR] = {
524 .name = "Terratec Hybrid XS Secam",
525 .valid = EM28XX_BOARD_NOT_VALIDATED,
526 .vchannels = 3,
527 .has_msp34xx = 1,
528 .tuner_type = TUNER_XC2028,
529 .decoder = EM28XX_TVP5150,
530 .input = { {
531 .type = EM28XX_VMUX_TELEVISION,
532 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300533 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300534 }, {
535 .type = EM28XX_VMUX_COMPOSITE1,
536 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300537 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300538 }, {
539 .type = EM28XX_VMUX_SVIDEO,
540 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300541 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300542 } },
543 },
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -0300544 [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900] = {
Aidan Thornton122d1582007-11-20 15:25:08 -0300545 .name = "Hauppauge WinTV HVR 900",
546 .vchannels = 3,
547 .tda9887_conf = TDA9887_PRESENT,
548 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab5add9a62007-11-22 12:08:53 -0300549 .mts_firmware = 1,
Devin Heitmuellerb38cc642008-06-09 14:59:05 -0300550 .has_dvb = 1,
Aidan Thornton122d1582007-11-20 15:25:08 -0300551 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300552 .input = { {
Aidan Thornton122d1582007-11-20 15:25:08 -0300553 .type = EM28XX_VMUX_TELEVISION,
554 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300555 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300556 }, {
Aidan Thornton122d1582007-11-20 15:25:08 -0300557 .type = EM28XX_VMUX_COMPOSITE1,
558 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300559 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300560 }, {
Aidan Thornton122d1582007-11-20 15:25:08 -0300561 .type = EM28XX_VMUX_SVIDEO,
562 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300563 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300564 } },
Aidan Thornton122d1582007-11-20 15:25:08 -0300565 },
Devin Heitmueller17d9d552008-06-08 10:22:03 -0300566 [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2] = {
567 .name = "Hauppauge WinTV HVR 900 (R2)",
568 .vchannels = 3,
569 .tda9887_conf = TDA9887_PRESENT,
570 .tuner_type = TUNER_XC2028,
571 .mts_firmware = 1,
572 .decoder = EM28XX_TVP5150,
573 .input = { {
574 .type = EM28XX_VMUX_TELEVISION,
575 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300576 .amux = EM28XX_AMUX_VIDEO,
Devin Heitmueller17d9d552008-06-08 10:22:03 -0300577 }, {
578 .type = EM28XX_VMUX_COMPOSITE1,
579 .vmux = TVP5150_COMPOSITE1,
Wiktor Grebladb98fb82008-09-28 01:37:48 -0300580 .amux = 3,
Devin Heitmueller17d9d552008-06-08 10:22:03 -0300581 }, {
582 .type = EM28XX_VMUX_SVIDEO,
583 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300584 .amux = EM28XX_AMUX_LINE_IN,
Devin Heitmueller17d9d552008-06-08 10:22:03 -0300585 } },
586 },
Mauro Carvalho Chehab10ac6602008-07-27 14:58:58 -0300587 [EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950] = {
Mauro Carvalho Chehab3abee532008-01-05 17:01:41 -0300588 .name = "Hauppauge WinTV HVR 950",
589 .vchannels = 3,
590 .tda9887_conf = TDA9887_PRESENT,
591 .tuner_type = TUNER_XC2028,
Mauro Carvalho Chehab3abee532008-01-05 17:01:41 -0300592 .mts_firmware = 1,
593 .has_12mhz_i2s = 1,
Mauro Carvalho Chehab227ad4a2008-04-17 21:37:40 -0300594 .has_dvb = 1,
Devin Heitmueller4b922532008-11-13 03:15:55 -0300595 .ir_codes = ir_codes_hauppauge_new,
Mauro Carvalho Chehab3abee532008-01-05 17:01:41 -0300596 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300597 .input = { {
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -0300598 .type = EM28XX_VMUX_TELEVISION,
599 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300600 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300601 }, {
Mauro Carvalho Chehab7d070e22007-11-01 21:52:58 -0300602 .type = EM28XX_VMUX_COMPOSITE1,
603 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300604 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300605 }, {
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -0300606 .type = EM28XX_VMUX_SVIDEO,
607 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300608 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300609 } },
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -0300610 },
Devin Heitmueller4fd305b2008-06-04 13:43:46 -0300611 [EM2880_BOARD_PINNACLE_PCTV_HD_PRO] = {
612 .name = "Pinnacle PCTV HD Pro Stick",
613 .vchannels = 3,
614 .tda9887_conf = TDA9887_PRESENT,
615 .tuner_type = TUNER_XC2028,
616 .mts_firmware = 1,
617 .has_12mhz_i2s = 1,
618 .has_dvb = 1,
Devin Heitmueller4b922532008-11-13 03:15:55 -0300619 .ir_codes = ir_codes_pinnacle_pctv_hd,
Devin Heitmueller4fd305b2008-06-04 13:43:46 -0300620 .decoder = EM28XX_TVP5150,
621 .input = { {
622 .type = EM28XX_VMUX_TELEVISION,
623 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300624 .amux = EM28XX_AMUX_VIDEO,
Devin Heitmueller4fd305b2008-06-04 13:43:46 -0300625 }, {
626 .type = EM28XX_VMUX_COMPOSITE1,
627 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300628 .amux = EM28XX_AMUX_LINE_IN,
Devin Heitmueller4fd305b2008-06-04 13:43:46 -0300629 }, {
630 .type = EM28XX_VMUX_SVIDEO,
631 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300632 .amux = EM28XX_AMUX_LINE_IN,
Devin Heitmueller4fd305b2008-06-04 13:43:46 -0300633 } },
634 },
Devin Heitmuellere14b3652008-07-26 11:04:33 -0300635 [EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600] = {
636 .name = "AMD ATI TV Wonder HD 600",
637 .vchannels = 3,
638 .tda9887_conf = TDA9887_PRESENT,
639 .tuner_type = TUNER_XC2028,
640 .mts_firmware = 1,
641 .has_12mhz_i2s = 1,
642 .has_dvb = 1,
Devin Heitmueller60245e82008-11-16 08:03:53 -0300643 .ir_codes = ir_codes_ati_tv_wonder_hd_600,
Devin Heitmuellere14b3652008-07-26 11:04:33 -0300644 .decoder = EM28XX_TVP5150,
645 .input = { {
646 .type = EM28XX_VMUX_TELEVISION,
647 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300648 .amux = EM28XX_AMUX_VIDEO,
Devin Heitmuellere14b3652008-07-26 11:04:33 -0300649 }, {
650 .type = EM28XX_VMUX_COMPOSITE1,
651 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300652 .amux = EM28XX_AMUX_LINE_IN,
Devin Heitmuellere14b3652008-07-26 11:04:33 -0300653 }, {
654 .type = EM28XX_VMUX_SVIDEO,
655 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300656 .amux = EM28XX_AMUX_LINE_IN,
Devin Heitmuellere14b3652008-07-26 11:04:33 -0300657 } },
658 },
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -0300659 [EM2880_BOARD_TERRATEC_HYBRID_XS] = {
660 .name = "Terratec Hybrid XS",
661 .vchannels = 3,
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -0300662 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -0300663 .tuner_type = TUNER_XC2028,
664 .decoder = EM28XX_TVP5150,
reinhard schwab655b8402008-07-26 10:47:00 -0300665 .has_dvb = 1,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300666 .input = { {
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -0300667 .type = EM28XX_VMUX_TELEVISION,
668 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300669 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300670 }, {
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -0300671 .type = EM28XX_VMUX_COMPOSITE1,
672 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300673 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300674 }, {
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -0300675 .type = EM28XX_VMUX_SVIDEO,
676 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300677 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300678 } },
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -0300679 },
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300680 /* maybe there's a reason behind it why Terratec sells the Hybrid XS
681 as Prodigy XS with a different PID, let's keep it separated for now
682 maybe we'll need it lateron */
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -0300683 [EM2880_BOARD_TERRATEC_PRODIGY_XS] = {
684 .name = "Terratec Prodigy XS",
685 .vchannels = 3,
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -0300686 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -0300687 .tuner_type = TUNER_XC2028,
688 .decoder = EM28XX_TVP5150,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300689 .input = { {
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -0300690 .type = EM28XX_VMUX_TELEVISION,
691 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300692 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300693 }, {
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -0300694 .type = EM28XX_VMUX_COMPOSITE1,
695 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300696 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300697 }, {
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -0300698 .type = EM28XX_VMUX_SVIDEO,
699 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300700 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300701 } },
Mauro Carvalho Chehab12466572007-10-24 11:08:20 -0300702 },
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800703 [EM2820_BOARD_MSI_VOX_USB_2] = {
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -0300704 .name = "MSI VOX USB 2.0",
705 .vchannels = 3,
706 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
707 .tda9887_conf = TDA9887_PRESENT |
708 TDA9887_PORT1_ACTIVE |
709 TDA9887_PORT2_ACTIVE,
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -0300710 .max_range_640_480 = 1,
711
712 .decoder = EM28XX_SAA7114,
713 .input = { {
714 .type = EM28XX_VMUX_TELEVISION,
715 .vmux = SAA7115_COMPOSITE4,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300716 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300717 }, {
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -0300718 .type = EM28XX_VMUX_COMPOSITE1,
719 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300720 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300721 }, {
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -0300722 .type = EM28XX_VMUX_SVIDEO,
723 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300724 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300725 } },
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -0800726 },
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -0800727 [EM2800_BOARD_TERRATEC_CINERGY_200] = {
728 .name = "Terratec Cinergy 200 USB",
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -0800729 .is_em2800 = 1,
730 .vchannels = 3,
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -0800731 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
732 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800733 .decoder = EM28XX_SAA7113,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300734 .input = { {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800735 .type = EM28XX_VMUX_TELEVISION,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300736 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300737 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300738 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800739 .type = EM28XX_VMUX_COMPOSITE1,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300740 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300741 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300742 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800743 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300744 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300745 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300746 } },
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -0800747 },
Aron Szabo59d07f12008-07-27 13:47:52 -0300748 [EM2800_BOARD_GRABBEEX_USB2800] = {
749 .name = "eMPIA Technology, Inc. GrabBeeX+ Video Encoder",
750 .is_em2800 = 1,
751 .vchannels = 2,
752 .decoder = EM28XX_SAA7113,
753 .input = { {
754 .type = EM28XX_VMUX_COMPOSITE1,
755 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300756 .amux = EM28XX_AMUX_LINE_IN,
Aron Szabo59d07f12008-07-27 13:47:52 -0300757 }, {
758 .type = EM28XX_VMUX_SVIDEO,
759 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300760 .amux = EM28XX_AMUX_LINE_IN,
Aron Szabo59d07f12008-07-27 13:47:52 -0300761 } },
762 },
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -0800763 [EM2800_BOARD_LEADTEK_WINFAST_USBII] = {
764 .name = "Leadtek Winfast USB II",
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -0800765 .is_em2800 = 1,
766 .vchannels = 3,
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -0800767 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
768 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800769 .decoder = EM28XX_SAA7113,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300770 .input = { {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800771 .type = EM28XX_VMUX_TELEVISION,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300772 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300773 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300774 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800775 .type = EM28XX_VMUX_COMPOSITE1,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300776 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300777 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300778 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800779 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300780 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300781 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300782 } },
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -0800783 },
784 [EM2800_BOARD_KWORLD_USB2800] = {
785 .name = "Kworld USB2800",
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -0800786 .is_em2800 = 1,
787 .vchannels = 3,
Michael Krufkyab8b8702008-04-22 14:46:05 -0300788 .tuner_type = TUNER_PHILIPS_FCV1236D,
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -0800789 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800790 .decoder = EM28XX_SAA7113,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300791 .input = { {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800792 .type = EM28XX_VMUX_TELEVISION,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300793 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300794 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300795 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800796 .type = EM28XX_VMUX_COMPOSITE1,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300797 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300798 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300799 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800800 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300801 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300802 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300803 } },
Mauro Carvalho Chehab596d92d2005-11-08 21:37:24 -0800804 },
Mauro Carvalho Chehab45632c42005-11-08 21:38:15 -0800805 [EM2820_BOARD_PINNACLE_DVC_90] = {
Aurelien Jarnoaec2aef2007-12-17 13:49:17 -0300806 .name = "Pinnacle Dazzle DVC 90/DVC 100",
Mauro Carvalho Chehab45632c42005-11-08 21:38:15 -0800807 .vchannels = 3,
Mauro Carvalho Chehabed086312008-01-24 06:59:20 -0300808 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800809 .decoder = EM28XX_SAA7113,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300810 .input = { {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800811 .type = EM28XX_VMUX_COMPOSITE1,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300812 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300813 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300814 }, {
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -0800815 .type = EM28XX_VMUX_SVIDEO,
Hans Verkuilc7c0b342006-04-02 13:35:00 -0300816 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300817 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300818 } },
Mauro Carvalho Chehab45632c42005-11-08 21:38:15 -0800819 },
Sascha Sommer43625592007-11-03 15:05:07 -0300820 [EM2800_BOARD_VGEAR_POCKETTV] = {
821 .name = "V-Gear PocketTV",
822 .is_em2800 = 1,
823 .vchannels = 3,
Sascha Sommer43625592007-11-03 15:05:07 -0300824 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
825 .tda9887_conf = TDA9887_PRESENT,
Sascha Sommer43625592007-11-03 15:05:07 -0300826 .decoder = EM28XX_SAA7113,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300827 .input = { {
Sascha Sommer43625592007-11-03 15:05:07 -0300828 .type = EM28XX_VMUX_TELEVISION,
829 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300830 .amux = EM28XX_AMUX_VIDEO,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300831 }, {
Sascha Sommer43625592007-11-03 15:05:07 -0300832 .type = EM28XX_VMUX_COMPOSITE1,
833 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300834 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300835 }, {
Sascha Sommer43625592007-11-03 15:05:07 -0300836 .type = EM28XX_VMUX_SVIDEO,
837 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300838 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300839 } },
Sascha Sommer43625592007-11-03 15:05:07 -0300840 },
Mauro Carvalho Chehabea4fd562007-11-03 21:21:57 -0300841 [EM2820_BOARD_PROLINK_PLAYTV_USB2] = {
842 .name = "Pixelview Prolink PlayTV USB 2.0",
843 .vchannels = 3,
844 .tda9887_conf = TDA9887_PRESENT,
Mauro Carvalho Chehabed086312008-01-24 06:59:20 -0300845 .tuner_type = TUNER_YMEC_TVF_5533MF,
Mauro Carvalho Chehabea4fd562007-11-03 21:21:57 -0300846 .decoder = EM28XX_SAA7113,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300847 .input = { {
Mauro Carvalho Chehabea4fd562007-11-03 21:21:57 -0300848 .type = EM28XX_VMUX_TELEVISION,
849 .vmux = SAA7115_COMPOSITE2,
Mauro Carvalho Chehab30e4ac72008-11-20 13:43:05 -0300850 .amux = EM28XX_AMUX_VIDEO,
851 .aout = EM28XX_AOUT_MONO | /* I2S */
852 EM28XX_AOUT_MASTER, /* Line out pin */
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300853 }, {
Mauro Carvalho Chehabea4fd562007-11-03 21:21:57 -0300854 .type = EM28XX_VMUX_COMPOSITE1,
855 .vmux = SAA7115_COMPOSITE0,
Mauro Carvalho Chehab7463dda2008-02-05 22:29:26 -0300856 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300857 }, {
Mauro Carvalho Chehabea4fd562007-11-03 21:21:57 -0300858 .type = EM28XX_VMUX_SVIDEO,
859 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab7463dda2008-02-05 22:29:26 -0300860 .amux = EM28XX_AMUX_LINE_IN,
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -0300861 } },
Mauro Carvalho Chehabea4fd562007-11-03 21:21:57 -0300862 },
Devin Heitmuellera9fc52b2008-06-28 08:57:06 -0300863 [EM2860_BOARD_POINTNIX_INTRAORAL_CAMERA] = {
864 .name = "PointNix Intra-Oral Camera",
865 .has_snapshot_button = 1,
866 .vchannels = 1,
867 .tda9887_conf = TDA9887_PRESENT,
868 .tuner_type = TUNER_ABSENT,
869 .decoder = EM28XX_SAA7113,
870 .input = { {
871 .type = EM28XX_VMUX_SVIDEO,
872 .vmux = SAA7115_SVIDEO3,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300873 .amux = EM28XX_AMUX_VIDEO,
Devin Heitmuellera9fc52b2008-06-28 08:57:06 -0300874 } },
875 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300876 [EM2880_BOARD_MSI_DIGIVOX_AD] = {
877 .name = "MSI DigiVox A/D",
878 .valid = EM28XX_BOARD_NOT_VALIDATED,
879 .vchannels = 3,
880 .tuner_type = TUNER_XC2028,
881 .decoder = EM28XX_TVP5150,
882 .input = { {
883 .type = EM28XX_VMUX_TELEVISION,
884 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300885 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300886 }, {
887 .type = EM28XX_VMUX_COMPOSITE1,
888 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300889 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300890 }, {
891 .type = EM28XX_VMUX_SVIDEO,
892 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300893 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300894 } },
895 },
896 [EM2880_BOARD_MSI_DIGIVOX_AD_II] = {
897 .name = "MSI DigiVox A/D II",
898 .valid = EM28XX_BOARD_NOT_VALIDATED,
899 .vchannels = 3,
900 .tuner_type = TUNER_XC2028,
901 .decoder = EM28XX_TVP5150,
902 .input = { {
903 .type = EM28XX_VMUX_TELEVISION,
904 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300905 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300906 }, {
907 .type = EM28XX_VMUX_COMPOSITE1,
908 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300909 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300910 }, {
911 .type = EM28XX_VMUX_SVIDEO,
912 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300913 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300914 } },
915 },
916 [EM2880_BOARD_KWORLD_DVB_305U] = {
917 .name = "KWorld DVB-T 305U",
918 .valid = EM28XX_BOARD_NOT_VALIDATED,
919 .vchannels = 3,
920 .tuner_type = TUNER_XC2028,
921 .decoder = EM28XX_TVP5150,
922 .input = { {
923 .type = EM28XX_VMUX_TELEVISION,
924 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300925 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300926 }, {
927 .type = EM28XX_VMUX_COMPOSITE1,
928 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300929 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300930 }, {
931 .type = EM28XX_VMUX_SVIDEO,
932 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300933 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300934 } },
935 },
936 [EM2880_BOARD_KWORLD_DVB_310U] = {
937 .name = "KWorld DVB-T 310U",
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300938 .vchannels = 3,
939 .tuner_type = TUNER_XC2028,
Darron Broadda3808e2008-09-30 02:46:41 -0300940 .has_dvb = 1,
941 .mts_firmware = 1,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300942 .decoder = EM28XX_TVP5150,
943 .input = { {
944 .type = EM28XX_VMUX_TELEVISION,
945 .vmux = TVP5150_COMPOSITE0,
Darron Broadda3808e2008-09-30 02:46:41 -0300946 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300947 }, {
948 .type = EM28XX_VMUX_COMPOSITE1,
949 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehaba42aa192008-11-19 11:08:53 -0300950 .amux = EM28XX_AMUX_LINE_IN,
Darron Broadda3808e2008-09-30 02:46:41 -0300951 }, { /* S-video has not been tested yet */
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300952 .type = EM28XX_VMUX_SVIDEO,
953 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehaba42aa192008-11-19 11:08:53 -0300954 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300955 } },
956 },
957 [EM2881_BOARD_DNT_DA2_HYBRID] = {
958 .name = "DNT DA2 Hybrid",
959 .valid = EM28XX_BOARD_NOT_VALIDATED,
960 .vchannels = 3,
961 .tuner_type = TUNER_XC2028,
962 .decoder = EM28XX_TVP5150,
963 .input = { {
964 .type = EM28XX_VMUX_TELEVISION,
965 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300966 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300967 }, {
968 .type = EM28XX_VMUX_COMPOSITE1,
969 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300970 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300971 }, {
972 .type = EM28XX_VMUX_SVIDEO,
973 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300974 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300975 } },
976 },
977 [EM2881_BOARD_PINNACLE_HYBRID_PRO] = {
978 .name = "Pinnacle Hybrid Pro",
979 .valid = EM28XX_BOARD_NOT_VALIDATED,
980 .vchannels = 3,
981 .tuner_type = TUNER_XC2028,
982 .decoder = EM28XX_TVP5150,
983 .input = { {
984 .type = EM28XX_VMUX_TELEVISION,
985 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300986 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300987 }, {
988 .type = EM28XX_VMUX_COMPOSITE1,
989 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300990 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300991 }, {
992 .type = EM28XX_VMUX_SVIDEO,
993 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -0300994 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -0300995 } },
996 },
997 [EM2882_BOARD_PINNACLE_HYBRID_PRO] = {
998 .name = "Pinnacle Hybrid Pro (2)",
999 .valid = EM28XX_BOARD_NOT_VALIDATED,
1000 .vchannels = 3,
1001 .tuner_type = TUNER_XC2028,
Eugeniy Meshcheryakova674a3b2008-08-01 08:23:41 -03001002 .mts_firmware = 1,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001003 .decoder = EM28XX_TVP5150,
1004 .input = { {
1005 .type = EM28XX_VMUX_TELEVISION,
1006 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001007 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001008 }, {
1009 .type = EM28XX_VMUX_COMPOSITE1,
1010 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001011 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001012 }, {
1013 .type = EM28XX_VMUX_SVIDEO,
1014 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001015 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001016 } },
1017 },
1018 [EM2882_BOARD_KWORLD_VS_DVBT] = {
1019 .name = "Kworld VS-DVB-T 323UR",
1020 .valid = EM28XX_BOARD_NOT_VALIDATED,
1021 .vchannels = 3,
1022 .tuner_type = TUNER_XC2028,
1023 .decoder = EM28XX_TVP5150,
1024 .input = { {
1025 .type = EM28XX_VMUX_TELEVISION,
1026 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001027 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001028 }, {
1029 .type = EM28XX_VMUX_COMPOSITE1,
1030 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001031 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001032 }, {
1033 .type = EM28XX_VMUX_SVIDEO,
1034 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001035 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001036 } },
1037 },
1038 [EM2882_BOARD_TERRATEC_HYBRID_XS] = {
1039 .name = "Terratec Hybrid XS (em2882)",
1040 .valid = EM28XX_BOARD_NOT_VALIDATED,
1041 .vchannels = 3,
1042 .tuner_type = TUNER_XC2028,
1043 .decoder = EM28XX_TVP5150,
1044 .input = { {
1045 .type = EM28XX_VMUX_TELEVISION,
1046 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001047 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001048 }, {
1049 .type = EM28XX_VMUX_COMPOSITE1,
1050 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001051 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001052 }, {
1053 .type = EM28XX_VMUX_SVIDEO,
1054 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001055 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001056 } },
1057 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001058 [EM2883_BOARD_KWORLD_HYBRID_A316] = {
1059 .name = "Kworld PlusTV HD Hybrid 330",
1060 .valid = EM28XX_BOARD_NOT_VALIDATED,
1061 .vchannels = 3,
1062 .is_em2800 = 0,
1063 .tuner_type = TUNER_XC2028,
1064 .decoder = EM28XX_TVP5150,
1065 .input = { {
1066 .type = EM28XX_VMUX_TELEVISION,
1067 .vmux = TVP5150_COMPOSITE0,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001068 .amux = EM28XX_AMUX_VIDEO,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001069 }, {
1070 .type = EM28XX_VMUX_COMPOSITE1,
1071 .vmux = TVP5150_COMPOSITE1,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001072 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001073 }, {
1074 .type = EM28XX_VMUX_SVIDEO,
1075 .vmux = TVP5150_SVIDEO,
Mauro Carvalho Chehab8a5caa62008-11-19 11:10:50 -03001076 .amux = EM28XX_AMUX_LINE_IN,
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001077 } },
1078 },
Mauro Carvalho Chehabee281b82008-07-27 16:58:04 -03001079 [EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU] = {
Vitaly Woold3603342008-07-27 14:10:11 -03001080 .name = "Compro VideoMate ForYou/Stereo",
1081 .vchannels = 2,
1082 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
1083 .tda9887_conf = TDA9887_PRESENT,
1084 .decoder = EM28XX_TVP5150,
1085 .input = { {
1086 .type = EM28XX_VMUX_TELEVISION,
1087 .vmux = TVP5150_COMPOSITE0,
1088 .amux = EM28XX_AMUX_LINE_IN,
1089 }, {
1090 .type = EM28XX_VMUX_SVIDEO,
1091 .vmux = TVP5150_SVIDEO,
1092 .amux = EM28XX_AMUX_LINE_IN,
1093 } },
1094 },
Devin Heitmueller864ec0b2008-11-12 02:05:28 -03001095 [EM2874_BOARD_PINNACLE_PCTV_80E] = {
1096 .name = "Pinnacle PCTV HD Mini",
1097 .vchannels = 0,
1098 .tuner_type = TUNER_ABSENT,
1099 .has_dvb = 1,
Devin Heitmueller4b922532008-11-13 03:15:55 -03001100 .ir_codes = ir_codes_pinnacle_pctv_hd,
Devin Heitmueller864ec0b2008-11-12 02:05:28 -03001101 .decoder = EM28XX_NODECODER,
1102#ifdef DJH_DEBUG
1103 .input = { {
1104 .type = EM28XX_VMUX_TELEVISION,
1105 .vmux = TVP5150_COMPOSITE0,
1106 .amux = EM28XX_AMUX_LINE_IN,
1107 } },
1108#endif
1109 },
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08001110};
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -08001111const unsigned int em28xx_bcount = ARRAY_SIZE(em28xx_boards);
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08001112
1113/* table of devices that work with this driver */
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -08001114struct usb_device_id em28xx_id_table [] = {
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001115 { USB_DEVICE(0xeb1a, 0x2750),
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001116 .driver_info = EM2750_BOARD_UNKNOWN },
1117 { USB_DEVICE(0xeb1a, 0x2751),
1118 .driver_info = EM2750_BOARD_UNKNOWN },
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001119 { USB_DEVICE(0xeb1a, 0x2800),
1120 .driver_info = EM2800_BOARD_UNKNOWN },
1121 { USB_DEVICE(0xeb1a, 0x2820),
1122 .driver_info = EM2820_BOARD_UNKNOWN },
1123 { USB_DEVICE(0xeb1a, 0x2821),
Douglas Schilling Landgrafa50f4a442008-09-08 03:23:55 -03001124 .driver_info = EM2820_BOARD_PROLINK_PLAYTV_USB2 },
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001125 { USB_DEVICE(0xeb1a, 0x2860),
1126 .driver_info = EM2820_BOARD_UNKNOWN },
1127 { USB_DEVICE(0xeb1a, 0x2861),
1128 .driver_info = EM2820_BOARD_UNKNOWN },
1129 { USB_DEVICE(0xeb1a, 0x2870),
1130 .driver_info = EM2820_BOARD_UNKNOWN },
1131 { USB_DEVICE(0xeb1a, 0x2881),
1132 .driver_info = EM2820_BOARD_UNKNOWN },
1133 { USB_DEVICE(0xeb1a, 0x2883),
1134 .driver_info = EM2820_BOARD_UNKNOWN },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001135 { USB_DEVICE(0xeb1a, 0xe300),
1136 .driver_info = EM2861_BOARD_KWORLD_PVRTV_300U },
1137 { USB_DEVICE(0xeb1a, 0xe305),
1138 .driver_info = EM2880_BOARD_KWORLD_DVB_305U },
1139 { USB_DEVICE(0xeb1a, 0xe310),
1140 .driver_info = EM2880_BOARD_MSI_DIGIVOX_AD },
1141 { USB_DEVICE(0xeb1a, 0xa316),
1142 .driver_info = EM2883_BOARD_KWORLD_HYBRID_A316 },
1143 { USB_DEVICE(0xeb1a, 0xe320),
1144 .driver_info = EM2880_BOARD_MSI_DIGIVOX_AD_II },
1145 { USB_DEVICE(0xeb1a, 0xe323),
1146 .driver_info = EM2882_BOARD_KWORLD_VS_DVBT },
1147 { USB_DEVICE(0xeb1a, 0xe350),
1148 .driver_info = EM2870_BOARD_KWORLD_350U },
1149 { USB_DEVICE(0xeb1a, 0xe355),
1150 .driver_info = EM2870_BOARD_KWORLD_355U },
1151 { USB_DEVICE(0xeb1a, 0x2801),
1152 .driver_info = EM2800_BOARD_GRABBEEX_USB2800 },
1153 { USB_DEVICE(0xeb1a, 0xe357),
1154 .driver_info = EM2870_BOARD_KWORLD_355U },
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001155 { USB_DEVICE(0x0ccd, 0x0036),
1156 .driver_info = EM2820_BOARD_TERRATEC_CINERGY_250 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001157 { USB_DEVICE(0x0ccd, 0x004c),
1158 .driver_info = EM2880_BOARD_TERRATEC_HYBRID_XS_FR },
1159 { USB_DEVICE(0x0ccd, 0x004f),
1160 .driver_info = EM2860_BOARD_TERRATEC_HYBRID_XS },
1161 { USB_DEVICE(0x0ccd, 0x005e),
1162 .driver_info = EM2882_BOARD_TERRATEC_HYBRID_XS },
1163 { USB_DEVICE(0x0ccd, 0x0042),
1164 .driver_info = EM2880_BOARD_TERRATEC_HYBRID_XS },
1165 { USB_DEVICE(0x0ccd, 0x0043),
1166 .driver_info = EM2870_BOARD_TERRATEC_XS },
1167 { USB_DEVICE(0x0ccd, 0x0047),
1168 .driver_info = EM2880_BOARD_TERRATEC_PRODIGY_XS },
1169 { USB_DEVICE(0x185b, 0x2870),
1170 .driver_info = EM2870_BOARD_COMPRO_VIDEOMATE },
Vitaly Woold3603342008-07-27 14:10:11 -03001171 { USB_DEVICE(0x185b, 0x2041),
Mauro Carvalho Chehabee281b82008-07-27 16:58:04 -03001172 .driver_info = EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU },
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001173 { USB_DEVICE(0x2040, 0x4200),
1174 .driver_info = EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 },
Mauro Carvalho Chehab15b9bec2008-01-13 12:02:20 -03001175 { USB_DEVICE(0x2040, 0x4201),
1176 .driver_info = EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 },
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001177 { USB_DEVICE(0x2040, 0x6500),
1178 .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900 },
Luc Saillard427d20c2008-01-30 17:23:00 -03001179 { USB_DEVICE(0x2040, 0x6502),
Devin Heitmueller17d9d552008-06-08 10:22:03 -03001180 .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2 },
Michael Krufky74ee0512008-05-01 18:02:30 -03001181 { USB_DEVICE(0x2040, 0x6513), /* HCW HVR-980 */
Mauro Carvalho Chehab10ac6602008-07-27 14:58:58 -03001182 .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 },
Michael Krufky74ee0512008-05-01 18:02:30 -03001183 { USB_DEVICE(0x2040, 0x6517), /* HP HVR-950 */
Mauro Carvalho Chehab10ac6602008-07-27 14:58:58 -03001184 .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 },
Michael Krufky74ee0512008-05-01 18:02:30 -03001185 { USB_DEVICE(0x2040, 0x651b), /* RP HVR-950 */
Mauro Carvalho Chehab10ac6602008-07-27 14:58:58 -03001186 .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 },
Michael Krufky74ee0512008-05-01 18:02:30 -03001187 { USB_DEVICE(0x2040, 0x651f), /* HCW HVR-850 */
Mauro Carvalho Chehab10ac6602008-07-27 14:58:58 -03001188 .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 },
Devin Heitmuellere14b3652008-07-26 11:04:33 -03001189 { USB_DEVICE(0x0438, 0xb002),
1190 .driver_info = EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600 },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001191 { USB_DEVICE(0x2001, 0xf112),
1192 .driver_info = EM2820_BOARD_DLINK_USB_TV },
1193 { USB_DEVICE(0x2304, 0x0207),
1194 .driver_info = EM2820_BOARD_PINNACLE_DVC_90 },
1195 { USB_DEVICE(0x2304, 0x0208),
1196 .driver_info = EM2820_BOARD_PINNACLE_USB_2 },
1197 { USB_DEVICE(0x2304, 0x021a),
1198 .driver_info = EM2820_BOARD_PINNACLE_DVC_90 },
1199 { USB_DEVICE(0x2304, 0x0226),
1200 .driver_info = EM2882_BOARD_PINNACLE_HYBRID_PRO },
1201 { USB_DEVICE(0x2304, 0x0227),
1202 .driver_info = EM2880_BOARD_PINNACLE_PCTV_HD_PRO },
Devin Heitmueller864ec0b2008-11-12 02:05:28 -03001203 { USB_DEVICE(0x2304, 0x023f),
1204 .driver_info = EM2874_BOARD_PINNACLE_PCTV_80E },
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001205 { USB_DEVICE(0x0413, 0x6023),
1206 .driver_info = EM2800_BOARD_LEADTEK_WINFAST_USBII },
1207 { USB_DEVICE(0x093b, 0xa005),
1208 .driver_info = EM2861_BOARD_PLEXTOR_PX_TV100U },
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08001209 { },
1210};
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001211MODULE_DEVICE_TABLE(usb, em28xx_id_table);
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08001212
Mauro Carvalho Chehab102a0b02008-04-17 21:40:45 -03001213/*
1214 * Reset sequences for analog/digital modes
1215 */
1216
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001217/* Reset for the most [analog] boards */
1218static struct em28xx_reg_seq default_analog[] = {
1219 {EM28XX_R08_GPIO, 0x6d, ~EM_GPIO_4, 10},
1220 { -1, -1, -1, -1},
1221};
1222
1223/* Reset for the most [digital] boards */
1224static struct em28xx_reg_seq default_digital[] = {
1225 {EM28XX_R08_GPIO, 0x6e, ~EM_GPIO_4, 10},
1226 { -1, -1, -1, -1},
1227};
1228
Mauro Carvalho Chehab102a0b02008-04-17 21:40:45 -03001229/* Board Hauppauge WinTV HVR 900 analog */
Mauro Carvalho Chehabe54318e2008-04-18 18:34:31 -03001230static struct em28xx_reg_seq hauppauge_wintv_hvr_900_analog[] = {
Mauro Carvalho Chehabc67ec532008-04-17 21:48:00 -03001231 {EM28XX_R08_GPIO, 0x2d, ~EM_GPIO_4, 10},
1232 {0x05, 0xff, 0x10, 10},
1233 { -1, -1, -1, -1},
Mauro Carvalho Chehab102a0b02008-04-17 21:40:45 -03001234};
Mauro Carvalho Chehabc67ec532008-04-17 21:48:00 -03001235
Mauro Carvalho Chehab102a0b02008-04-17 21:40:45 -03001236/* Board Hauppauge WinTV HVR 900 digital */
Mauro Carvalho Chehabe54318e2008-04-18 18:34:31 -03001237static struct em28xx_reg_seq hauppauge_wintv_hvr_900_digital[] = {
Mauro Carvalho Chehabc67ec532008-04-17 21:48:00 -03001238 {EM28XX_R08_GPIO, 0x2e, ~EM_GPIO_4, 10},
1239 {EM2880_R04_GPO, 0x04, 0x0f, 10},
1240 {EM2880_R04_GPO, 0x0c, 0x0f, 10},
1241 { -1, -1, -1, -1},
1242};
1243
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001244/* Boards - EM2880 MSI DIGIVOX AD and EM2880_BOARD_MSI_DIGIVOX_AD_II */
1245static struct em28xx_reg_seq em2880_msi_digivox_ad_analog[] = {
1246 {EM28XX_R08_GPIO, 0x69, ~EM_GPIO_4, 10},
1247 { -1, -1, -1, -1},
1248};
1249
1250/* Boards - EM2880 MSI DIGIVOX AD and EM2880_BOARD_MSI_DIGIVOX_AD_II */
1251static struct em28xx_reg_seq em2880_msi_digivox_ad_digital[] = {
1252 {EM28XX_R08_GPIO, 0x6a, ~EM_GPIO_4, 10},
1253 { -1, -1, -1, -1},
1254};
1255
1256/* Board - EM2870 Kworld 355u
1257 Analog - No input analog */
1258static struct em28xx_reg_seq em2870_kworld_355u_digital[] = {
1259 {EM2880_R04_GPO, 0x01, 0xff, 10},
1260 { -1, -1, -1, -1},
1261};
1262
1263/* Callback for the most boards */
1264static struct em28xx_reg_seq default_callback[] = {
Mauro Carvalho Chehabc67ec532008-04-17 21:48:00 -03001265 {EM28XX_R08_GPIO, EM_GPIO_4, EM_GPIO_4, 10},
1266 {EM28XX_R08_GPIO, 0, EM_GPIO_4, 10},
1267 {EM28XX_R08_GPIO, EM_GPIO_4, EM_GPIO_4, 10},
1268 { -1, -1, -1, -1},
Mauro Carvalho Chehab102a0b02008-04-17 21:40:45 -03001269};
1270
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001271/* Callback for EM2882 TERRATEC HYBRID XS */
1272static struct em28xx_reg_seq em2882_terratec_hybrid_xs_digital[] = {
1273 {EM28XX_R08_GPIO, 0x2e, 0xff, 6},
1274 {EM28XX_R08_GPIO, 0x3e, ~EM_GPIO_4, 6},
1275 {EM2880_R04_GPO, 0x04, 0xff, 10},
1276 {EM2880_R04_GPO, 0x0c, 0xff, 10},
1277 { -1, -1, -1, -1},
1278};
1279
Devin Heitmueller864ec0b2008-11-12 02:05:28 -03001280/* Pinnacle PCTV HD Mini (80e) GPIOs
1281 0-5: not used
1282 6: demod reset, active low
1283 7: LED on, active high */
1284static struct em28xx_reg_seq em2874_pinnacle_80e_digital[] = {
1285 {EM28XX_R06_I2C_CLK, 0x45, 0xff, 10}, /*400 KHz*/
1286 {EM2874_R80_GPIO, 0x80, 0xff, 100},/*Demod reset*/
1287 {EM2874_R80_GPIO, 0xc0, 0xff, 10},
1288 { -1, -1, -1, -1},
1289};
1290
Mauro Carvalho Chehab102a0b02008-04-17 21:40:45 -03001291/*
1292 * EEPROM hash table for devices with generic USB IDs
1293 */
Mauro Carvalho Chehabd2ba0552007-11-04 08:32:42 -03001294static struct em28xx_hash_table em28xx_eeprom_hash [] = {
Mauro Carvalho Chehabea4fd562007-11-03 21:21:57 -03001295 /* P/N: SA 60002070465 Tuner: TVF7533-MF */
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001296 {0x6ce05a8f, EM2820_BOARD_PROLINK_PLAYTV_USB2, TUNER_YMEC_TVF_5533MF},
Darron Broadda3808e2008-09-30 02:46:41 -03001297 {0x966a0441, EM2880_BOARD_KWORLD_DVB_310U, TUNER_XC2028},
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03001298};
1299
Mauro Carvalho Chehabd2ba0552007-11-04 08:32:42 -03001300/* I2C devicelist hash table for devices with generic USB IDs */
Sascha Sommerfad7b952007-11-04 08:06:48 -03001301static struct em28xx_hash_table em28xx_i2c_hash[] = {
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001302 {0xb06a32c3, EM2800_BOARD_TERRATEC_CINERGY_200, TUNER_LG_PAL_NEW_TAPC},
1303 {0xf51200e3, EM2800_BOARD_VGEAR_POCKETTV, TUNER_LG_PAL_NEW_TAPC},
Devin Heitmuellera9fc52b2008-06-28 08:57:06 -03001304 {0x1ba50080, EM2860_BOARD_POINTNIX_INTRAORAL_CAMERA, TUNER_ABSENT},
Sascha Sommerfad7b952007-11-04 08:06:48 -03001305};
1306
Michael Krufkyd7cba042008-09-12 13:31:45 -03001307int em28xx_tuner_callback(void *ptr, int component, int command, int arg)
Mauro Carvalho Chehabee6e3a82008-04-17 21:37:31 -03001308{
Mauro Carvalho Chehab102a0b02008-04-17 21:40:45 -03001309 int rc = 0;
Mauro Carvalho Chehabee6e3a82008-04-17 21:37:31 -03001310 struct em28xx *dev = ptr;
Mauro Carvalho Chehabee6e3a82008-04-17 21:37:31 -03001311
1312 if (dev->tuner_type != TUNER_XC2028)
1313 return 0;
1314
1315 if (command != XC2028_TUNER_RESET)
1316 return 0;
1317
1318 if (dev->mode == EM28XX_ANALOG_MODE)
Mauro Carvalho Chehabc67ec532008-04-17 21:48:00 -03001319 rc = em28xx_gpio_set(dev, dev->tun_analog_gpio);
Mauro Carvalho Chehabee6e3a82008-04-17 21:37:31 -03001320 else
Mauro Carvalho Chehabc67ec532008-04-17 21:48:00 -03001321 rc = em28xx_gpio_set(dev, dev->tun_digital_gpio);
Mauro Carvalho Chehabee6e3a82008-04-17 21:37:31 -03001322
Mauro Carvalho Chehabee6e3a82008-04-17 21:37:31 -03001323 return rc;
1324}
1325EXPORT_SYMBOL_GPL(em28xx_tuner_callback);
1326
1327static void em28xx_set_model(struct em28xx *dev)
1328{
1329 dev->is_em2800 = em28xx_boards[dev->model].is_em2800;
1330 dev->has_msp34xx = em28xx_boards[dev->model].has_msp34xx;
1331 dev->tda9887_conf = em28xx_boards[dev->model].tda9887_conf;
1332 dev->decoder = em28xx_boards[dev->model].decoder;
1333 dev->video_inputs = em28xx_boards[dev->model].vchannels;
1334 dev->has_12mhz_i2s = em28xx_boards[dev->model].has_12mhz_i2s;
1335 dev->max_range_640_480 = em28xx_boards[dev->model].max_range_640_480;
1336 dev->has_dvb = em28xx_boards[dev->model].has_dvb;
Devin Heitmuellera9fc52b2008-06-28 08:57:06 -03001337 dev->has_snapshot_button = em28xx_boards[dev->model].has_snapshot_button;
Devin Heitmueller4b922532008-11-13 03:15:55 -03001338 dev->ir_codes = em28xx_boards[dev->model].ir_codes;
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001339 dev->valid = em28xx_boards[dev->model].valid;
Mauro Carvalho Chehabee6e3a82008-04-17 21:37:31 -03001340}
1341
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03001342/* Since em28xx_pre_card_setup() requires a proper dev->model,
1343 * this won't work for boards with generic PCI IDs
1344 */
Markus Rechbergera94e95b2006-01-23 17:11:10 -02001345void em28xx_pre_card_setup(struct em28xx *dev)
1346{
Mauro Carvalho Chehab89b329e2008-04-17 21:42:14 -03001347 int rc;
1348
Devin Heitmueller6a1acc32008-11-12 02:05:06 -03001349 /* Set the default GPO/GPIO for legacy devices */
1350 dev->reg_gpo_num = EM2880_R04_GPO;
1351 dev->reg_gpio_num = EM28XX_R08_GPIO;
Mauro Carvalho Chehabc67ec532008-04-17 21:48:00 -03001352
Mauro Carvalho Chehab89b329e2008-04-17 21:42:14 -03001353 dev->wait_after_write = 5;
Devin Heitmueller6a1acc32008-11-12 02:05:06 -03001354
1355 /* Based on the Chip ID, set the device configuration */
Mauro Carvalho Chehab41facaa2008-04-17 21:44:58 -03001356 rc = em28xx_read_reg(dev, EM28XX_R0A_CHIPID);
Mauro Carvalho Chehab89b329e2008-04-17 21:42:14 -03001357 if (rc > 0) {
Devin Heitmueller600bd7f2008-11-12 02:05:02 -03001358 dev->chip_id = rc;
Mauro Carvalho Chehab89b329e2008-04-17 21:42:14 -03001359 switch (rc) {
Devin Heitmueller67c96f62008-11-18 05:05:46 -03001360 case CHIP_ID_EM2750:
1361 em28xx_info("chip ID is em2750\n");
1362 break;
Mauro Carvalho Chehabf09fb532008-11-16 10:40:21 -03001363 case CHIP_ID_EM2820:
1364 em28xx_info("chip ID is em2820\n");
1365 break;
1366 case CHIP_ID_EM2840:
1367 em28xx_info("chip ID is em2840\n");
1368 break;
Devin Heitmuellera8a1f8c2008-06-10 12:35:42 -03001369 case CHIP_ID_EM2860:
1370 em28xx_info("chip ID is em2860\n");
1371 break;
Devin Heitmueller5caeba02008-11-12 02:04:48 -03001372 case CHIP_ID_EM2874:
1373 em28xx_info("chip ID is em2874\n");
Devin Heitmueller6a1acc32008-11-12 02:05:06 -03001374 dev->reg_gpio_num = EM2874_R80_GPIO;
Devin Heitmueller5caeba02008-11-12 02:04:48 -03001375 dev->wait_after_write = 0;
1376 break;
Mauro Carvalho Chehab2ba890e2008-04-17 21:42:58 -03001377 case CHIP_ID_EM2883:
Mauro Carvalho Chehab89b329e2008-04-17 21:42:14 -03001378 em28xx_info("chip ID is em2882/em2883\n");
1379 dev->wait_after_write = 0;
1380 break;
1381 default:
1382 em28xx_info("em28xx chip ID = %d\n", rc);
1383 }
1384 }
Devin Heitmueller6a1acc32008-11-12 02:05:06 -03001385
1386 /* Prepopulate cached GPO register content */
1387 rc = em28xx_read_reg(dev, dev->reg_gpo_num);
1388 if (rc >= 0)
1389 dev->reg_gpo = rc;
1390
Mauro Carvalho Chehabee6e3a82008-04-17 21:37:31 -03001391 em28xx_set_model(dev);
1392
Markus Rechbergera94e95b2006-01-23 17:11:10 -02001393 /* request some modules */
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001394 switch (dev->model) {
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03001395 case EM2880_BOARD_TERRATEC_PRODIGY_XS:
1396 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900:
Devin Heitmueller17d9d552008-06-08 10:22:03 -03001397 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2:
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001398 case EM2860_BOARD_TERRATEC_HYBRID_XS:
Mauro Carvalho Chehab10ac6602008-07-27 14:58:58 -03001399 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950:
Devin Heitmueller4fd305b2008-06-04 13:43:46 -03001400 case EM2880_BOARD_PINNACLE_PCTV_HD_PRO:
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001401 case EM2882_BOARD_PINNACLE_HYBRID_PRO:
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001402 case EM2883_BOARD_KWORLD_HYBRID_A316:
Devin Heitmuellere14b3652008-07-26 11:04:33 -03001403 case EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600:
Mauro Carvalho Chehabc67ec532008-04-17 21:48:00 -03001404 em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x27", 1);
Devin Heitmueller23159a02008-11-20 09:53:05 -03001405 em28xx_write_reg(dev, EM28XX_R06_I2C_CLK,
1406 EM28XX_I2C_CLK_WAIT_ENABLE |
1407 EM28XX_I2C_FREQ_100_KHZ);
Mauro Carvalho Chehab102a0b02008-04-17 21:40:45 -03001408 msleep(50);
Markus Rechbergera94e95b2006-01-23 17:11:10 -02001409
Mauro Carvalho Chehabc67ec532008-04-17 21:48:00 -03001410 /* Sets GPO/GPIO sequences for this device */
1411 dev->analog_gpio = hauppauge_wintv_hvr_900_analog;
1412 dev->digital_gpio = hauppauge_wintv_hvr_900_digital;
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001413 dev->tun_analog_gpio = default_callback;
1414 dev->tun_digital_gpio = default_callback;
1415 break;
Mauro Carvalho Chehab102a0b02008-04-17 21:40:45 -03001416
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001417 case EM2882_BOARD_TERRATEC_HYBRID_XS:
1418 em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x27", 1);
Devin Heitmueller23159a02008-11-20 09:53:05 -03001419 em28xx_write_reg(dev, EM28XX_R06_I2C_CLK,
1420 EM28XX_I2C_CLK_WAIT_ENABLE |
1421 EM28XX_I2C_FREQ_100_KHZ);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001422 msleep(50);
1423
1424 /* should be added ir_codes here */
1425
1426 /* Sets GPO/GPIO sequences for this device */
1427 dev->analog_gpio = hauppauge_wintv_hvr_900_analog;
1428 dev->digital_gpio = hauppauge_wintv_hvr_900_digital;
1429 dev->tun_analog_gpio = default_callback;
1430 dev->tun_digital_gpio = em2882_terratec_hybrid_xs_digital;
1431 break;
1432
1433 case EM2880_BOARD_TERRATEC_HYBRID_XS_FR:
1434 case EM2880_BOARD_TERRATEC_HYBRID_XS:
1435 case EM2870_BOARD_TERRATEC_XS:
1436 case EM2881_BOARD_PINNACLE_HYBRID_PRO:
1437 case EM2880_BOARD_KWORLD_DVB_310U:
1438 case EM2870_BOARD_KWORLD_350U:
1439 case EM2881_BOARD_DNT_DA2_HYBRID:
1440 em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x27", 1);
Devin Heitmueller23159a02008-11-20 09:53:05 -03001441 em28xx_write_reg(dev, EM28XX_R06_I2C_CLK,
1442 EM28XX_I2C_CLK_WAIT_ENABLE |
1443 EM28XX_I2C_FREQ_100_KHZ);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001444 msleep(50);
1445
1446 /* NOTE: EM2881_DNT_DA2_HYBRID spend 140 msleep for digital
1447 and analog commands. If this commands doesn't work,
1448 add this timer. */
1449
1450 /* Sets GPO/GPIO sequences for this device */
1451 dev->analog_gpio = default_analog;
1452 dev->digital_gpio = default_digital;
1453 dev->tun_analog_gpio = default_callback;
1454 dev->tun_digital_gpio = default_callback;
1455 break;
1456
1457 case EM2880_BOARD_MSI_DIGIVOX_AD:
1458 case EM2880_BOARD_MSI_DIGIVOX_AD_II:
1459 em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x27", 1);
Devin Heitmueller23159a02008-11-20 09:53:05 -03001460 em28xx_write_reg(dev, EM28XX_R06_I2C_CLK,
1461 EM28XX_I2C_CLK_WAIT_ENABLE |
1462 EM28XX_I2C_FREQ_100_KHZ);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001463 msleep(50);
1464
1465 /* Sets GPO/GPIO sequences for this device */
1466 dev->analog_gpio = em2880_msi_digivox_ad_analog;
1467 dev->digital_gpio = em2880_msi_digivox_ad_digital;
1468 dev->tun_analog_gpio = default_callback;
1469 dev->tun_digital_gpio = default_callback;
1470 break;
1471
1472 case EM2750_BOARD_UNKNOWN:
1473 case EM2750_BOARD_DLCW_130:
1474 em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x0a", 1);
1475 break;
1476
1477 case EM2861_BOARD_PLEXTOR_PX_TV100U:
1478 em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x27", 1);
Devin Heitmueller23159a02008-11-20 09:53:05 -03001479 em28xx_write_reg(dev, EM28XX_R06_I2C_CLK,
1480 EM28XX_I2C_CLK_WAIT_ENABLE |
1481 EM28XX_I2C_FREQ_100_KHZ);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001482 /* FIXME guess */
1483 /* Turn on analog audio output */
1484 em28xx_write_regs_req(dev, 0x00, 0x08, "\xfd", 1);
1485 break;
1486
1487 case EM2861_BOARD_KWORLD_PVRTV_300U:
1488 case EM2880_BOARD_KWORLD_DVB_305U:
1489 em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x27", 1);
Devin Heitmueller23159a02008-11-20 09:53:05 -03001490 em28xx_write_reg(dev, EM28XX_R06_I2C_CLK,
1491 EM28XX_I2C_CLK_WAIT_ENABLE |
1492 EM28XX_I2C_FREQ_100_KHZ);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001493 msleep(10);
1494 em28xx_write_regs(dev, 0x08, "\x6d", 1);
1495 msleep(10);
1496 em28xx_write_regs(dev, 0x08, "\x7d", 1);
1497 msleep(10);
1498 break;
1499
1500 case EM2870_BOARD_KWORLD_355U:
1501 em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x27", 1);
Devin Heitmueller23159a02008-11-20 09:53:05 -03001502 em28xx_write_reg(dev, EM28XX_R06_I2C_CLK,
1503 EM28XX_I2C_CLK_WAIT_ENABLE |
1504 EM28XX_I2C_FREQ_100_KHZ);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001505 msleep(50);
1506
1507 /* Sets GPO/GPIO sequences for this device */
1508 dev->digital_gpio = em2870_kworld_355u_digital;
1509 break;
1510
1511 case EM2870_BOARD_COMPRO_VIDEOMATE:
1512 em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x27", 1);
Devin Heitmueller23159a02008-11-20 09:53:05 -03001513 em28xx_write_reg(dev, EM28XX_R06_I2C_CLK,
1514 EM28XX_I2C_CLK_WAIT_ENABLE |
1515 EM28XX_I2C_FREQ_100_KHZ);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001516 /* TODO: someone can do some cleanup here...
1517 not everything's needed */
1518 em28xx_write_regs(dev, 0x04, "\x00", 1);
1519 msleep(10);
1520 em28xx_write_regs(dev, 0x04, "\x01", 1);
1521 msleep(10);
1522 em28xx_write_regs(dev, 0x08, "\xfd", 1);
1523 mdelay(70);
1524 em28xx_write_regs(dev, 0x08, "\xfc", 1);
1525 mdelay(70);
1526 em28xx_write_regs(dev, 0x08, "\xdc", 1);
1527 mdelay(70);
1528 em28xx_write_regs(dev, 0x08, "\xfc", 1);
1529 mdelay(70);
1530 break;
1531
1532 case EM2870_BOARD_TERRATEC_XS_MT2060:
1533 em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x27", 1);
Devin Heitmueller23159a02008-11-20 09:53:05 -03001534 em28xx_write_reg(dev, EM28XX_R06_I2C_CLK,
1535 EM28XX_I2C_CLK_WAIT_ENABLE |
1536 EM28XX_I2C_FREQ_100_KHZ);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001537 /* this device needs some gpio writes to get the DVB-T
1538 demod work */
1539 em28xx_write_regs(dev, 0x08, "\xfe", 1);
1540 mdelay(70);
1541 em28xx_write_regs(dev, 0x08, "\xde", 1);
1542 mdelay(70);
1543 dev->em28xx_write_regs(dev, 0x08, "\xfe", 1);
1544 mdelay(70);
1545 break;
1546
1547 case EM2870_BOARD_PINNACLE_PCTV_DVB:
Devin Heitmueller23159a02008-11-20 09:53:05 -03001548 em28xx_write_reg(dev, EM28XX_R06_I2C_CLK,
1549 EM28XX_I2C_CLK_WAIT_ENABLE |
1550 EM28XX_I2C_FREQ_100_KHZ);
1551
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001552 /* this device needs some gpio writes to get the
1553 DVB-T demod work */
1554 em28xx_write_regs(dev, 0x08, "\xfe", 1);
1555 mdelay(70);
1556 em28xx_write_regs(dev, 0x08, "\xde", 1);
1557 mdelay(70);
1558 em28xx_write_regs(dev, 0x08, "\xfe", 1);
1559 mdelay(70);
1560 /* switch em2880 rc protocol */
1561 em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x22", 1);
1562 /* should be added ir_codes here */
1563 break;
1564
1565 case EM2820_BOARD_GADMEI_UTV310:
1566 em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x27", 1);
Devin Heitmueller23159a02008-11-20 09:53:05 -03001567 em28xx_write_reg(dev, EM28XX_R06_I2C_CLK,
1568 EM28XX_I2C_CLK_WAIT_ENABLE |
1569 EM28XX_I2C_FREQ_100_KHZ);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001570 /* Turn on analog audio output */
1571 em28xx_write_regs_req(dev, 0x00, 0x08, "\xfd", 1);
1572 break;
1573
1574 case EM2860_BOARD_GADMEI_UTV330:
1575 /* Turn on IR */
1576 em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x07", 1);
Devin Heitmueller23159a02008-11-20 09:53:05 -03001577 em28xx_write_reg(dev, EM28XX_R06_I2C_CLK,
1578 EM28XX_I2C_CLK_WAIT_ENABLE |
1579 EM28XX_I2C_FREQ_100_KHZ);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001580 /* should be added ir_codes here */
1581 break;
1582
1583 case EM2820_BOARD_MSI_VOX_USB_2:
1584 em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x27", 1);
Devin Heitmueller23159a02008-11-20 09:53:05 -03001585 em28xx_write_reg(dev, EM28XX_R06_I2C_CLK,
1586 EM28XX_I2C_CLK_WAIT_ENABLE |
1587 EM28XX_I2C_FREQ_100_KHZ);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001588 /* enables audio for that device */
1589 em28xx_write_regs_req(dev, 0x00, 0x08, "\xfd", 1);
Mauro Carvalho Chehab102a0b02008-04-17 21:40:45 -03001590 break;
Devin Heitmueller864ec0b2008-11-12 02:05:28 -03001591
1592 case EM2874_BOARD_PINNACLE_PCTV_80E:
Devin Heitmueller23159a02008-11-20 09:53:05 -03001593 /* Set 400 KHz clock and select secondary i2c bus */
1594 em28xx_write_reg(dev, EM28XX_R06_I2C_CLK,
1595 EM28XX_I2C_CLK_WAIT_ENABLE |
1596 EM2874_I2C_SECONDARY_BUS_SELECT |
1597 EM28XX_I2C_FREQ_400_KHZ);
Devin Heitmueller864ec0b2008-11-12 02:05:28 -03001598
1599 dev->digital_gpio = em2874_pinnacle_80e_digital;
1600 break;
Mauro Carvalho Chehab102a0b02008-04-17 21:40:45 -03001601 }
Mauro Carvalho Chehabc67ec532008-04-17 21:48:00 -03001602
1603 em28xx_gpio_set(dev, dev->tun_analog_gpio);
1604 em28xx_set_mode(dev, EM28XX_ANALOG_MODE);
1605
1606 /* Unlock device */
1607 em28xx_set_mode(dev, EM28XX_MODE_UNDEFINED);
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03001608}
1609
Mauro Carvalho Chehabe54318e2008-04-18 18:34:31 -03001610static void em28xx_setup_xc3028(struct em28xx *dev, struct xc2028_ctrl *ctl)
Mauro Carvalho Chehab3ca9c092008-04-17 21:37:53 -03001611{
1612 memset(ctl, 0, sizeof(*ctl));
1613
1614 ctl->fname = XC2028_DEFAULT_FIRMWARE;
1615 ctl->max_len = 64;
1616 ctl->mts = em28xx_boards[dev->model].mts_firmware;
1617
1618 switch (dev->model) {
Mauro Carvalho Chehabe77ebda2008-04-18 18:37:25 -03001619 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900:
1620 ctl->demod = XC3028_FE_ZARLINK456;
1621 break;
reinhard schwab655b8402008-07-26 10:47:00 -03001622 case EM2880_BOARD_TERRATEC_HYBRID_XS:
1623 ctl->demod = XC3028_FE_ZARLINK456;
1624 break;
Devin Heitmueller17d9d552008-06-08 10:22:03 -03001625 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2:
1626 /* djh - Not sure which demod we need here */
1627 ctl->demod = XC3028_FE_DEFAULT;
1628 break;
Devin Heitmueller5ea7fe42008-09-16 02:02:12 -03001629 case EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600:
1630 ctl->demod = XC3028_FE_DEFAULT;
1631 ctl->fname = XC3028L_DEFAULT_FIRMWARE;
1632 break;
Mauro Carvalho Chehab10ac6602008-07-27 14:58:58 -03001633 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950:
Devin Heitmueller4fd305b2008-06-04 13:43:46 -03001634 case EM2880_BOARD_PINNACLE_PCTV_HD_PRO:
Mauro Carvalho Chehabe77ebda2008-04-18 18:37:25 -03001635 /* FIXME: Better to specify the needed IF */
Devin Heitmuellerbdfbf952008-04-17 21:38:27 -03001636 ctl->demod = XC3028_FE_DEFAULT;
1637 break;
Mauro Carvalho Chehab3ca9c092008-04-17 21:37:53 -03001638 default:
1639 ctl->demod = XC3028_FE_OREN538;
1640 }
1641}
Mauro Carvalho Chehab3ca9c092008-04-17 21:37:53 -03001642
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001643static void em28xx_config_tuner(struct em28xx *dev)
Mauro Carvalho Chehab882876b2007-10-29 11:33:18 -03001644{
1645 struct v4l2_priv_tun_config xc2028_cfg;
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03001646 struct tuner_setup tun_setup;
1647 struct v4l2_frequency f;
Mauro Carvalho Chehab882876b2007-10-29 11:33:18 -03001648
Mauro Carvalho Chehabed086312008-01-24 06:59:20 -03001649 if (dev->tuner_type == TUNER_ABSENT)
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03001650 return;
Mauro Carvalho Chehab882876b2007-10-29 11:33:18 -03001651
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03001652 tun_setup.mode_mask = T_ANALOG_TV | T_RADIO;
1653 tun_setup.type = dev->tuner_type;
1654 tun_setup.addr = dev->tuner_addr;
1655 tun_setup.tuner_callback = em28xx_tuner_callback;
Mauro Carvalho Chehab882876b2007-10-29 11:33:18 -03001656
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03001657 em28xx_i2c_call_clients(dev, TUNER_SET_TYPE_ADDR, &tun_setup);
Mauro Carvalho Chehab882876b2007-10-29 11:33:18 -03001658
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03001659 if (dev->tuner_type == TUNER_XC2028) {
Mauro Carvalho Chehab3ca9c092008-04-17 21:37:53 -03001660 struct xc2028_ctrl ctl;
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03001661
Mauro Carvalho Chehab3ca9c092008-04-17 21:37:53 -03001662 em28xx_setup_xc3028(dev, &ctl);
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03001663
1664 xc2028_cfg.tuner = TUNER_XC2028;
1665 xc2028_cfg.priv = &ctl;
1666
1667 em28xx_i2c_call_clients(dev, TUNER_SET_CONFIG, &xc2028_cfg);
1668 }
1669
1670 /* configure tuner */
1671 f.tuner = 0;
1672 f.type = V4L2_TUNER_ANALOG_TV;
1673 f.frequency = 9076; /* just a magic number */
1674 dev->ctl_freq = f.frequency;
1675 em28xx_i2c_call_clients(dev, VIDIOC_S_FREQUENCY, &f);
1676}
1677
1678static int em28xx_hint_board(struct em28xx *dev)
1679{
1680 int i;
1681
Mauro Carvalho Chehabd2ba0552007-11-04 08:32:42 -03001682 /* HINT method: EEPROM
1683 *
1684 * This method works only for boards with eeprom.
1685 * Uses a hash of all eeprom bytes. The hash should be
1686 * unique for a vendor/tuner pair.
1687 * There are a high chance that tuners for different
1688 * video standards produce different hashes.
1689 */
1690 for (i = 0; i < ARRAY_SIZE(em28xx_eeprom_hash); i++) {
1691 if (dev->hash == em28xx_eeprom_hash[i].hash) {
1692 dev->model = em28xx_eeprom_hash[i].model;
1693 dev->tuner_type = em28xx_eeprom_hash[i].tuner;
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03001694
1695 em28xx_errdev("Your board has no unique USB ID.\n");
1696 em28xx_errdev("A hint were successfully done, "
1697 "based on eeprom hash.\n");
1698 em28xx_errdev("This method is not 100%% failproof.\n");
1699 em28xx_errdev("If the board were missdetected, "
1700 "please email this log to:\n");
1701 em28xx_errdev("\tV4L Mailing List "
1702 " <video4linux-list@redhat.com>\n");
1703 em28xx_errdev("Board detected as %s\n",
1704 em28xx_boards[dev->model].name);
1705
1706 return 0;
1707 }
1708 }
Sascha Sommerfad7b952007-11-04 08:06:48 -03001709
Mauro Carvalho Chehabd2ba0552007-11-04 08:32:42 -03001710 /* HINT method: I2C attached devices
1711 *
1712 * This method works for all boards.
1713 * Uses a hash of i2c scanned devices.
1714 * Devices with the same i2c attached chips will
1715 * be considered equal.
1716 * This method is less precise than the eeprom one.
1717 */
1718
Sascha Sommerfad7b952007-11-04 08:06:48 -03001719 /* user did not request i2c scanning => do it now */
1720 if (!dev->i2c_hash)
1721 em28xx_do_i2c_scan(dev);
1722
1723 for (i = 0; i < ARRAY_SIZE(em28xx_i2c_hash); i++) {
1724 if (dev->i2c_hash == em28xx_i2c_hash[i].hash) {
1725 dev->model = em28xx_i2c_hash[i].model;
1726 dev->tuner_type = em28xx_i2c_hash[i].tuner;
1727 em28xx_errdev("Your board has no unique USB ID.\n");
1728 em28xx_errdev("A hint were successfully done, "
1729 "based on i2c devicelist hash.\n");
1730 em28xx_errdev("This method is not 100%% failproof.\n");
1731 em28xx_errdev("If the board were missdetected, "
1732 "please email this log to:\n");
1733 em28xx_errdev("\tV4L Mailing List "
1734 " <video4linux-list@redhat.com>\n");
1735 em28xx_errdev("Board detected as %s\n",
1736 em28xx_boards[dev->model].name);
1737
1738 return 0;
1739 }
1740 }
1741
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03001742 em28xx_errdev("Your board has no unique USB ID and thus need a "
1743 "hint to be detected.\n");
1744 em28xx_errdev("You may try to use card=<n> insmod option to "
1745 "workaround that.\n");
1746 em28xx_errdev("Please send an email with this log to:\n");
1747 em28xx_errdev("\tV4L Mailing List <video4linux-list@redhat.com>\n");
1748 em28xx_errdev("Board eeprom hash is 0x%08lx\n", dev->hash);
Sascha Sommerfad7b952007-11-04 08:06:48 -03001749 em28xx_errdev("Board i2c devicelist hash is 0x%08lx\n", dev->i2c_hash);
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03001750
1751 em28xx_errdev("Here is a list of valid choices for the card=<n>"
1752 " insmod option:\n");
1753 for (i = 0; i < em28xx_bcount; i++) {
1754 em28xx_errdev(" card=%d -> %s\n",
1755 i, em28xx_boards[i].name);
1756 }
1757 return -1;
Mauro Carvalho Chehab882876b2007-10-29 11:33:18 -03001758}
1759
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -03001760/* ----------------------------------------------------------------------- */
1761void em28xx_set_ir(struct em28xx *dev, struct IR_i2c *ir)
1762{
1763 if (disable_ir) {
1764 ir->get_key = NULL;
1765 return ;
1766 }
1767
1768 /* detect & configure */
1769 switch (dev->model) {
1770 case (EM2800_BOARD_UNKNOWN):
1771 break;
1772 case (EM2820_BOARD_UNKNOWN):
1773 break;
1774 case (EM2800_BOARD_TERRATEC_CINERGY_200):
1775 case (EM2820_BOARD_TERRATEC_CINERGY_250):
1776 ir->ir_codes = ir_codes_em_terratec;
1777 ir->get_key = em28xx_get_key_terratec;
1778 snprintf(ir->c.name, sizeof(ir->c.name),
1779 "i2c IR (EM28XX Terratec)");
1780 break;
1781 case (EM2820_BOARD_PINNACLE_USB_2):
1782 ir->ir_codes = ir_codes_pinnacle_grey;
1783 ir->get_key = em28xx_get_key_pinnacle_usb_grey;
1784 snprintf(ir->c.name, sizeof(ir->c.name),
1785 "i2c IR (EM28XX Pinnacle PCTV)");
1786 break;
1787 case (EM2820_BOARD_HAUPPAUGE_WINTV_USB_2):
1788 ir->ir_codes = ir_codes_hauppauge_new;
1789 ir->get_key = em28xx_get_key_em_haup;
1790 snprintf(ir->c.name, sizeof(ir->c.name),
1791 "i2c IR (EM2840 Hauppauge)");
1792 break;
1793 case (EM2820_BOARD_MSI_VOX_USB_2):
1794 break;
1795 case (EM2800_BOARD_LEADTEK_WINFAST_USBII):
1796 break;
1797 case (EM2800_BOARD_KWORLD_USB2800):
1798 break;
Aron Szabo59d07f12008-07-27 13:47:52 -03001799 case (EM2800_BOARD_GRABBEEX_USB2800):
1800 break;
Mauro Carvalho Chehabc8793b02008-01-13 15:42:17 -03001801 }
1802}
1803
Mauro Carvalho Chehab3acf2802005-11-08 21:38:27 -08001804void em28xx_card_setup(struct em28xx *dev)
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08001805{
Mauro Carvalho Chehabf8b60302007-11-05 08:42:55 -03001806 em28xx_set_model(dev);
1807
1808 dev->tuner_type = em28xx_boards[dev->model].tuner_type;
Mauro Carvalho Chehab66767922008-11-16 08:05:06 -03001809 dev->tuner_addr = em28xx_boards[dev->model].tuner_addr;
Mauro Carvalho Chehabf8b60302007-11-05 08:42:55 -03001810
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08001811 /* request some modules */
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03001812 switch (dev->model) {
1813 case EM2820_BOARD_HAUPPAUGE_WINTV_USB_2:
Mauro Carvalho Chehab98ae1272007-11-05 09:30:39 -03001814 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900:
Devin Heitmueller17d9d552008-06-08 10:22:03 -03001815 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2:
Mauro Carvalho Chehab10ac6602008-07-27 14:58:58 -03001816 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950:
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03001817 {
1818 struct tveeprom tv;
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08001819#ifdef CONFIG_MODULES
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03001820 request_module("tveeprom");
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08001821#endif
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03001822 /* Call first TVeeprom */
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08001823
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03001824 dev->i2c_client.addr = 0xa0 >> 1;
1825 tveeprom_hauppauge_analog(&dev->i2c_client, &tv, dev->eedata);
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08001826
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03001827 dev->tuner_type = tv.tuner_type;
Mauro Carvalho Chehabed086312008-01-24 06:59:20 -03001828
Hans Verkuil38f9d302008-07-23 05:09:15 -03001829 if (tv.audio_processor == V4L2_IDENT_MSPX4XX) {
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03001830 dev->i2s_speed = 2048000;
1831 dev->has_msp34xx = 1;
1832 }
Mauro Carvalho Chehab98ae1272007-11-05 09:30:39 -03001833#ifdef CONFIG_MODULES
1834 if (tv.has_ir)
1835 request_module("ir-kbd-i2c");
1836#endif
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03001837 break;
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08001838 }
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03001839 case EM2820_BOARD_KWORLD_PVRTV2800RF:
1840 /* GPIO enables sound on KWORLD PVR TV 2800RF */
1841 em28xx_write_regs_req(dev, 0x00, 0x08, "\xf9", 1);
1842 break;
1843 case EM2820_BOARD_UNKNOWN:
1844 case EM2800_BOARD_UNKNOWN:
Darron Broadda3808e2008-09-30 02:46:41 -03001845 /*
1846 * The K-WORLD DVB-T 310U is detected as an MSI Digivox AD.
1847 *
1848 * This occurs because they share identical USB vendor and
1849 * product IDs.
1850 *
1851 * What we do here is look up the EEPROM hash of the K-WORLD
1852 * and if it is found then we decide that we do not have
1853 * a DIGIVOX and reset the device to the K-WORLD instead.
1854 *
1855 * This solution is only valid if they do not share eeprom
1856 * hash identities which has not been determined as yet.
1857 */
1858 case EM2880_BOARD_MSI_DIGIVOX_AD:
Mauro Carvalho Chehabf8b60302007-11-05 08:42:55 -03001859 if (!em28xx_hint_board(dev))
1860 em28xx_set_model(dev);
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001861 break;
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03001862 }
1863
Devin Heitmuellera9fc52b2008-06-28 08:57:06 -03001864 if (dev->has_snapshot_button)
1865 em28xx_register_snapshot_button(dev);
1866
Douglas Schilling Landgraf95b86a92008-07-27 14:03:32 -03001867 if (dev->valid == EM28XX_BOARD_NOT_VALIDATED) {
1868 em28xx_errdev("\n\n");
1869 em28xx_errdev("The support for this board weren't "
1870 "valid yet.\n");
1871 em28xx_errdev("Please send a report of having this working\n");
1872 em28xx_errdev("not to V4L mailing list (and/or to other "
1873 "addresses)\n\n");
1874 }
1875
Mauro Carvalho Chehabf8b60302007-11-05 08:42:55 -03001876 /* Allow override tuner type by a module parameter */
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03001877 if (tuner >= 0)
1878 dev->tuner_type = tuner;
1879
1880#ifdef CONFIG_MODULES
1881 /* request some modules */
1882 if (dev->has_msp34xx)
1883 request_module("msp3400");
1884 if (dev->decoder == EM28XX_SAA7113 || dev->decoder == EM28XX_SAA7114)
1885 request_module("saa7115");
1886 if (dev->decoder == EM28XX_TVP5150)
1887 request_module("tvp5150");
Mauro Carvalho Chehabed086312008-01-24 06:59:20 -03001888 if (dev->tuner_type != TUNER_ABSENT)
Mauro Carvalho Chehab03910cc2007-11-03 21:20:59 -03001889 request_module("tuner");
1890#endif
1891
Mauro Carvalho Chehabc23f5942007-11-23 14:22:14 -03001892 em28xx_config_tuner(dev);
Mauro Carvalho Chehaba924a492008-11-12 08:41:29 -03001893
1894 em28xx_ir_init(dev);
akpm@osdl.orga6c2ba22005-11-08 21:37:07 -08001895}