akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 1 | /* |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 2 | em28xx-cards.c - driver for Empia EM2800/EM2820/2840 USB |
| 3 | video capture devices |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 4 | |
Mauro Carvalho Chehab | f7abcd3 | 2005-11-08 21:38:25 -0800 | [diff] [blame] | 5 | Copyright (C) 2005 Ludovico Cavedon <cavedon@sssup.it> |
| 6 | Markus Rechberger <mrechberger@gmail.com> |
Mauro Carvalho Chehab | 2e7c6dc | 2006-04-03 07:53:40 -0300 | [diff] [blame] | 7 | Mauro Carvalho Chehab <mchehab@infradead.org> |
Mauro Carvalho Chehab | f7abcd3 | 2005-11-08 21:38:25 -0800 | [diff] [blame] | 8 | Sascha Sommer <saschasommer@freenet.de> |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 9 | |
| 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.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 27 | #include <linux/delay.h> |
| 28 | #include <linux/i2c.h> |
| 29 | #include <linux/usb.h> |
| 30 | #include <media/tuner.h> |
Hans Verkuil | 2474ed4 | 2006-03-19 12:35:57 -0300 | [diff] [blame] | 31 | #include <media/msp3400.h> |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 32 | #include <media/saa7115.h> |
| 33 | #include <media/tvp5150.h> |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 34 | #include <media/tvaudio.h> |
| 35 | #include <media/i2c-addr.h> |
Mauro Carvalho Chehab | 1f6173e | 2005-11-08 21:37:16 -0800 | [diff] [blame] | 36 | #include <media/tveeprom.h> |
Mauro Carvalho Chehab | 9bb13a6 | 2006-01-09 15:25:37 -0200 | [diff] [blame] | 37 | #include <media/v4l2-common.h> |
Hans Verkuil | 38f9d30 | 2008-07-23 05:09:15 -0300 | [diff] [blame] | 38 | #include <media/v4l2-chip-ident.h> |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 39 | |
Mauro Carvalho Chehab | f7abcd3 | 2005-11-08 21:38:25 -0800 | [diff] [blame] | 40 | #include "em28xx.h" |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 41 | |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 42 | #define DRIVER_NAME "em28xx" |
| 43 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 44 | static int tuner = -1; |
| 45 | module_param(tuner, int, 0444); |
| 46 | MODULE_PARM_DESC(tuner, "tuner type"); |
| 47 | |
Mauro Carvalho Chehab | c8793b0 | 2008-01-13 15:42:17 -0300 | [diff] [blame] | 48 | static unsigned int disable_ir; |
| 49 | module_param(disable_ir, int, 0444); |
| 50 | MODULE_PARM_DESC(disable_ir, "disable infrared remote support"); |
| 51 | |
Devin Heitmueller | e2a1b79 | 2009-05-27 23:44:10 -0300 | [diff] [blame] | 52 | static unsigned int disable_usb_speed_check; |
| 53 | module_param(disable_usb_speed_check, int, 0444); |
| 54 | MODULE_PARM_DESC(disable_usb_speed_check, |
| 55 | "override min bandwidth requirement of 480M bps"); |
| 56 | |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 57 | static unsigned int card[] = {[0 ... (EM28XX_MAXBOARDS - 1)] = UNSET }; |
| 58 | module_param_array(card, int, NULL, 0444); |
| 59 | MODULE_PARM_DESC(card, "card type"); |
| 60 | |
| 61 | /* Bitmask marking allocated devices from 0 to EM28XX_MAXBOARDS */ |
| 62 | static unsigned long em28xx_devused; |
| 63 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 64 | struct em28xx_hash_table { |
| 65 | unsigned long hash; |
| 66 | unsigned int model; |
| 67 | unsigned int tuner; |
| 68 | }; |
| 69 | |
Mauro Carvalho Chehab | 0ec202d | 2008-11-25 13:16:13 -0300 | [diff] [blame] | 70 | /* |
| 71 | * Reset sequences for analog/digital modes |
| 72 | */ |
| 73 | |
| 74 | /* Reset for the most [analog] boards */ |
| 75 | static struct em28xx_reg_seq default_analog[] = { |
| 76 | {EM28XX_R08_GPIO, 0x6d, ~EM_GPIO_4, 10}, |
| 77 | { -1, -1, -1, -1}, |
| 78 | }; |
| 79 | |
| 80 | /* Reset for the most [digital] boards */ |
| 81 | static struct em28xx_reg_seq default_digital[] = { |
| 82 | {EM28XX_R08_GPIO, 0x6e, ~EM_GPIO_4, 10}, |
| 83 | { -1, -1, -1, -1}, |
| 84 | }; |
| 85 | |
| 86 | /* Board Hauppauge WinTV HVR 900 analog */ |
| 87 | static struct em28xx_reg_seq hauppauge_wintv_hvr_900_analog[] = { |
| 88 | {EM28XX_R08_GPIO, 0x2d, ~EM_GPIO_4, 10}, |
| 89 | {0x05, 0xff, 0x10, 10}, |
| 90 | { -1, -1, -1, -1}, |
| 91 | }; |
| 92 | |
| 93 | /* Board Hauppauge WinTV HVR 900 digital */ |
| 94 | static struct em28xx_reg_seq hauppauge_wintv_hvr_900_digital[] = { |
| 95 | {EM28XX_R08_GPIO, 0x2e, ~EM_GPIO_4, 10}, |
| 96 | {EM2880_R04_GPO, 0x04, 0x0f, 10}, |
| 97 | {EM2880_R04_GPO, 0x0c, 0x0f, 10}, |
| 98 | { -1, -1, -1, -1}, |
| 99 | }; |
| 100 | |
| 101 | /* Boards - EM2880 MSI DIGIVOX AD and EM2880_BOARD_MSI_DIGIVOX_AD_II */ |
| 102 | static struct em28xx_reg_seq em2880_msi_digivox_ad_analog[] = { |
| 103 | {EM28XX_R08_GPIO, 0x69, ~EM_GPIO_4, 10}, |
| 104 | { -1, -1, -1, -1}, |
| 105 | }; |
| 106 | |
| 107 | /* Boards - EM2880 MSI DIGIVOX AD and EM2880_BOARD_MSI_DIGIVOX_AD_II */ |
Mauro Carvalho Chehab | 0ec202d | 2008-11-25 13:16:13 -0300 | [diff] [blame] | 108 | |
| 109 | /* Board - EM2870 Kworld 355u |
| 110 | Analog - No input analog */ |
Mauro Carvalho Chehab | 0ec202d | 2008-11-25 13:16:13 -0300 | [diff] [blame] | 111 | |
Franklin Meng | d7de5d8 | 2009-06-06 17:05:02 -0300 | [diff] [blame] | 112 | /* Board - EM2882 Kworld 315U digital */ |
| 113 | static struct em28xx_reg_seq em2882_kworld_315u_digital[] = { |
| 114 | {EM28XX_R08_GPIO, 0xff, 0xff, 10}, |
| 115 | {EM28XX_R08_GPIO, 0xfe, 0xff, 10}, |
| 116 | {EM2880_R04_GPO, 0x04, 0xff, 10}, |
| 117 | {EM2880_R04_GPO, 0x0c, 0xff, 10}, |
| 118 | {EM28XX_R08_GPIO, 0x7e, 0xff, 10}, |
| 119 | { -1, -1, -1, -1}, |
| 120 | }; |
| 121 | |
| 122 | static struct em28xx_reg_seq em2882_kworld_315u_tuner_gpio[] = { |
| 123 | {EM2880_R04_GPO, 0x08, 0xff, 10}, |
| 124 | {EM2880_R04_GPO, 0x0c, 0xff, 10}, |
| 125 | {EM2880_R04_GPO, 0x08, 0xff, 10}, |
| 126 | {EM2880_R04_GPO, 0x0c, 0xff, 10}, |
| 127 | { -1, -1, -1, -1}, |
| 128 | }; |
| 129 | |
Robert Krakora | 6e7b9ea | 2009-01-18 21:59:34 -0300 | [diff] [blame] | 130 | static struct em28xx_reg_seq kworld_330u_analog[] = { |
| 131 | {EM28XX_R08_GPIO, 0x6d, ~EM_GPIO_4, 10}, |
| 132 | {EM2880_R04_GPO, 0x00, 0xff, 10}, |
| 133 | { -1, -1, -1, -1}, |
| 134 | }; |
| 135 | |
| 136 | static struct em28xx_reg_seq kworld_330u_digital[] = { |
| 137 | {EM28XX_R08_GPIO, 0x6e, ~EM_GPIO_4, 10}, |
| 138 | {EM2880_R04_GPO, 0x08, 0xff, 10}, |
| 139 | { -1, -1, -1, -1}, |
| 140 | }; |
| 141 | |
Devin Heitmueller | 1985922 | 2009-06-19 00:33:54 -0300 | [diff] [blame] | 142 | /* Evga inDtube |
| 143 | GPIO0 - Enable digital power (s5h1409) - low to enable |
| 144 | GPIO1 - Enable analog power (tvp5150/emp202) - low to enable |
| 145 | GPIO4 - xc3028 reset |
| 146 | GOP3 - s5h1409 reset |
| 147 | */ |
| 148 | static struct em28xx_reg_seq evga_indtube_analog[] = { |
| 149 | {EM28XX_R08_GPIO, 0x79, 0xff, 60}, |
| 150 | { -1, -1, -1, -1}, |
| 151 | }; |
| 152 | |
| 153 | static struct em28xx_reg_seq evga_indtube_digital[] = { |
| 154 | {EM28XX_R08_GPIO, 0x7a, 0xff, 1}, |
| 155 | {EM2880_R04_GPO, 0x04, 0xff, 10}, |
| 156 | {EM2880_R04_GPO, 0x0c, 0xff, 1}, |
| 157 | { -1, -1, -1, -1}, |
| 158 | }; |
| 159 | |
Devin Heitmueller | d5b3ba9 | 2009-07-08 21:51:35 -0300 | [diff] [blame] | 160 | /* Pinnacle Hybrid Pro eb1a:2881 */ |
| 161 | static struct em28xx_reg_seq pinnacle_hybrid_pro_analog[] = { |
Devin Heitmueller | 4401044 | 2009-07-08 22:18:15 -0300 | [diff] [blame] | 162 | {EM28XX_R08_GPIO, 0xfd, ~EM_GPIO_4, 10}, |
Devin Heitmueller | d5b3ba9 | 2009-07-08 21:51:35 -0300 | [diff] [blame] | 163 | { -1, -1, -1, -1}, |
| 164 | }; |
| 165 | |
| 166 | static struct em28xx_reg_seq pinnacle_hybrid_pro_digital[] = { |
| 167 | {EM28XX_R08_GPIO, 0x6e, ~EM_GPIO_4, 10}, |
| 168 | {EM2880_R04_GPO, 0x04, 0xff, 100},/* zl10353 reset */ |
| 169 | {EM2880_R04_GPO, 0x0c, 0xff, 1}, |
| 170 | { -1, -1, -1, -1}, |
| 171 | }; |
| 172 | |
Antti Palosaari | 285eb1a | 2009-09-15 14:42:13 -0300 | [diff] [blame] | 173 | /* eb1a:2868 Reddo DVB-C USB TV Box |
| 174 | GPIO4 - CU1216L NIM |
| 175 | Other GPIOs seems to be don't care. */ |
| 176 | static struct em28xx_reg_seq reddo_dvb_c_usb_box[] = { |
| 177 | {EM28XX_R08_GPIO, 0xfe, 0xff, 10}, |
| 178 | {EM28XX_R08_GPIO, 0xde, 0xff, 10}, |
| 179 | {EM28XX_R08_GPIO, 0xfe, 0xff, 10}, |
| 180 | {EM28XX_R08_GPIO, 0xff, 0xff, 10}, |
| 181 | {EM28XX_R08_GPIO, 0x7f, 0xff, 10}, |
| 182 | {EM28XX_R08_GPIO, 0x6f, 0xff, 10}, |
| 183 | {EM28XX_R08_GPIO, 0xff, 0xff, 10}, |
| 184 | {-1, -1, -1, -1}, |
| 185 | }; |
Devin Heitmueller | d5b3ba9 | 2009-07-08 21:51:35 -0300 | [diff] [blame] | 186 | |
Mauro Carvalho Chehab | 0ec202d | 2008-11-25 13:16:13 -0300 | [diff] [blame] | 187 | /* Callback for the most boards */ |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 188 | static struct em28xx_reg_seq default_tuner_gpio[] = { |
Mauro Carvalho Chehab | 0ec202d | 2008-11-25 13:16:13 -0300 | [diff] [blame] | 189 | {EM28XX_R08_GPIO, EM_GPIO_4, EM_GPIO_4, 10}, |
| 190 | {EM28XX_R08_GPIO, 0, EM_GPIO_4, 10}, |
| 191 | {EM28XX_R08_GPIO, EM_GPIO_4, EM_GPIO_4, 10}, |
| 192 | { -1, -1, -1, -1}, |
| 193 | }; |
| 194 | |
Vitaly Wool | 2bd1d9eb | 2009-03-04 08:27:52 -0300 | [diff] [blame] | 195 | /* Mute/unmute */ |
| 196 | static struct em28xx_reg_seq compro_unmute_tv_gpio[] = { |
| 197 | {EM28XX_R08_GPIO, 5, 7, 10}, |
| 198 | { -1, -1, -1, -1}, |
| 199 | }; |
| 200 | |
| 201 | static struct em28xx_reg_seq compro_unmute_svid_gpio[] = { |
| 202 | {EM28XX_R08_GPIO, 4, 7, 10}, |
| 203 | { -1, -1, -1, -1}, |
| 204 | }; |
| 205 | |
| 206 | static struct em28xx_reg_seq compro_mute_gpio[] = { |
| 207 | {EM28XX_R08_GPIO, 6, 7, 10}, |
| 208 | { -1, -1, -1, -1}, |
| 209 | }; |
| 210 | |
Mauro Carvalho Chehab | 766ed64 | 2009-05-24 00:46:01 -0300 | [diff] [blame] | 211 | /* Terratec AV350 */ |
| 212 | static struct em28xx_reg_seq terratec_av350_mute_gpio[] = { |
| 213 | {EM28XX_R08_GPIO, 0xff, 0x7f, 10}, |
| 214 | { -1, -1, -1, -1}, |
| 215 | }; |
| 216 | |
| 217 | static struct em28xx_reg_seq terratec_av350_unmute_gpio[] = { |
| 218 | {EM28XX_R08_GPIO, 0xff, 0xff, 10}, |
| 219 | { -1, -1, -1, -1}, |
| 220 | }; |
Mauro Carvalho Chehab | 02e7804 | 2009-06-29 11:35:05 -0300 | [diff] [blame] | 221 | |
| 222 | static struct em28xx_reg_seq silvercrest_reg_seq[] = { |
| 223 | {EM28XX_R08_GPIO, 0xff, 0xff, 10}, |
| 224 | {EM28XX_R08_GPIO, 0x01, 0xf7, 10}, |
| 225 | { -1, -1, -1, -1}, |
| 226 | }; |
| 227 | |
Mauro Carvalho Chehab | 0ec202d | 2008-11-25 13:16:13 -0300 | [diff] [blame] | 228 | /* |
| 229 | * Board definitions |
| 230 | */ |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 231 | struct em28xx_board em28xx_boards[] = { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 232 | [EM2750_BOARD_UNKNOWN] = { |
Mauro Carvalho Chehab | 8b22079 | 2009-07-12 10:56:21 -0300 | [diff] [blame] | 233 | .name = "EM2710/EM2750/EM2751 webcam grabber", |
Mauro Carvalho Chehab | 3d3215c | 2009-08-10 10:29:27 -0300 | [diff] [blame] | 234 | .xclk = EM28XX_XCLK_FREQUENCY_20MHZ, |
Mauro Carvalho Chehab | 8a2e699 | 2009-07-12 10:26:36 -0300 | [diff] [blame] | 235 | .tuner_type = TUNER_ABSENT, |
| 236 | .is_webcam = 1, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 237 | .input = { { |
| 238 | .type = EM28XX_VMUX_COMPOSITE1, |
| 239 | .vmux = 0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 240 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | b80fd2d | 2009-07-14 21:08:22 -0300 | [diff] [blame] | 241 | .gpio = silvercrest_reg_seq, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 242 | } }, |
| 243 | }, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 244 | [EM2800_BOARD_UNKNOWN] = { |
| 245 | .name = "Unknown EM2800 video grabber", |
| 246 | .is_em2800 = 1, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 247 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 248 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | 1c67e76 | 2008-11-27 07:46:59 -0300 | [diff] [blame] | 249 | .tuner_type = TUNER_ABSENT, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 250 | .input = { { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 251 | .type = EM28XX_VMUX_COMPOSITE1, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 252 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 253 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 254 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 255 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 256 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 257 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 258 | } }, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 259 | }, |
| 260 | [EM2820_BOARD_UNKNOWN] = { |
Mauro Carvalho Chehab | a2070c6 | 2008-11-25 07:05:06 -0300 | [diff] [blame] | 261 | .name = "Unknown EM2750/28xx video grabber", |
| 262 | .tuner_type = TUNER_ABSENT, |
Mauro Carvalho Chehab | b04fb66 | 2009-07-13 01:28:21 -0300 | [diff] [blame] | 263 | .is_webcam = 1, /* To enable sensor probe */ |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 264 | }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 265 | [EM2750_BOARD_DLCW_130] = { |
| 266 | /* Beijing Huaqi Information Digital Technology Co., Ltd */ |
| 267 | .name = "Huaqi DLCW-130", |
| 268 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Mauro Carvalho Chehab | a2070c6 | 2008-11-25 07:05:06 -0300 | [diff] [blame] | 269 | .xclk = EM28XX_XCLK_FREQUENCY_48MHZ, |
Mauro Carvalho Chehab | 8a2e699 | 2009-07-12 10:26:36 -0300 | [diff] [blame] | 270 | .tuner_type = TUNER_ABSENT, |
| 271 | .is_webcam = 1, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 272 | .input = { { |
| 273 | .type = EM28XX_VMUX_COMPOSITE1, |
| 274 | .vmux = 0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 275 | .amux = EM28XX_AMUX_VIDEO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 276 | } }, |
| 277 | }, |
Markus Rechberger | 4d17d08 | 2006-02-07 06:25:39 -0200 | [diff] [blame] | 278 | [EM2820_BOARD_KWORLD_PVRTV2800RF] = { |
Markus Rechberger | 33ccaa3 | 2006-02-07 06:25:41 -0200 | [diff] [blame] | 279 | .name = "Kworld PVR TV 2800 RF", |
Mauro Carvalho Chehab | ed08631 | 2008-01-24 06:59:20 -0300 | [diff] [blame] | 280 | .tuner_type = TUNER_TEMIC_PAL, |
Markus Rechberger | 4d17d08 | 2006-02-07 06:25:39 -0200 | [diff] [blame] | 281 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 282 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 283 | .input = { { |
Markus Rechberger | 4d17d08 | 2006-02-07 06:25:39 -0200 | [diff] [blame] | 284 | .type = EM28XX_VMUX_COMPOSITE1, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 285 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 286 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 287 | }, { |
Markus Rechberger | 4d17d08 | 2006-02-07 06:25:39 -0200 | [diff] [blame] | 288 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 289 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 290 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 291 | } }, |
Markus Rechberger | 4d17d08 | 2006-02-07 06:25:39 -0200 | [diff] [blame] | 292 | }, |
Douglas Schilling Landgraf | f7fe3e6 | 2009-01-19 09:31:55 -0300 | [diff] [blame] | 293 | [EM2820_BOARD_GADMEI_TVR200] = { |
| 294 | .name = "Gadmei TVR200", |
| 295 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
| 296 | .tda9887_conf = TDA9887_PRESENT, |
| 297 | .decoder = EM28XX_SAA711X, |
| 298 | .input = { { |
| 299 | .type = EM28XX_VMUX_TELEVISION, |
| 300 | .vmux = SAA7115_COMPOSITE2, |
| 301 | .amux = EM28XX_AMUX_LINE_IN, |
| 302 | }, { |
| 303 | .type = EM28XX_VMUX_COMPOSITE1, |
| 304 | .vmux = SAA7115_COMPOSITE0, |
| 305 | .amux = EM28XX_AMUX_LINE_IN, |
| 306 | }, { |
| 307 | .type = EM28XX_VMUX_SVIDEO, |
| 308 | .vmux = SAA7115_SVIDEO3, |
| 309 | .amux = EM28XX_AMUX_LINE_IN, |
| 310 | } }, |
| 311 | }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 312 | [EM2820_BOARD_TERRATEC_CINERGY_250] = { |
| 313 | .name = "Terratec Cinergy 250 USB", |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 314 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
Mauro Carvalho Chehab | ac07bb7 | 2009-09-08 14:04:41 -0300 | [diff] [blame] | 315 | .has_ir_i2c = 1, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 316 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 317 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 318 | .input = { { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 319 | .type = EM28XX_VMUX_TELEVISION, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 320 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 321 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 322 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 323 | .type = EM28XX_VMUX_COMPOSITE1, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 324 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 325 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 326 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 327 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 328 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 329 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 330 | } }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 331 | }, |
| 332 | [EM2820_BOARD_PINNACLE_USB_2] = { |
| 333 | .name = "Pinnacle PCTV USB 2", |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 334 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
Mauro Carvalho Chehab | ac07bb7 | 2009-09-08 14:04:41 -0300 | [diff] [blame] | 335 | .has_ir_i2c = 1, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 336 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 337 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 338 | .input = { { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 339 | .type = EM28XX_VMUX_TELEVISION, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 340 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 341 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 342 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 343 | .type = EM28XX_VMUX_COMPOSITE1, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 344 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 345 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 346 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 347 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 348 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 349 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 350 | } }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 351 | }, |
| 352 | [EM2820_BOARD_HAUPPAUGE_WINTV_USB_2] = { |
| 353 | .name = "Hauppauge WinTV USB 2", |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 354 | .tuner_type = TUNER_PHILIPS_FM1236_MK3, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 355 | .tda9887_conf = TDA9887_PRESENT | |
Nicola Soranzo | a1a6ee7 | 2009-02-10 23:28:24 -0300 | [diff] [blame] | 356 | TDA9887_PORT1_ACTIVE | |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 357 | TDA9887_PORT2_ACTIVE, |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 358 | .decoder = EM28XX_TVP5150, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 359 | .has_msp34xx = 1, |
Mauro Carvalho Chehab | ac07bb7 | 2009-09-08 14:04:41 -0300 | [diff] [blame] | 360 | .has_ir_i2c = 1, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 361 | .input = { { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 362 | .type = EM28XX_VMUX_TELEVISION, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 363 | .vmux = TVP5150_COMPOSITE0, |
Hans Verkuil | 2474ed4 | 2006-03-19 12:35:57 -0300 | [diff] [blame] | 364 | .amux = MSP_INPUT_DEFAULT, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 365 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 366 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 367 | .vmux = TVP5150_SVIDEO, |
Hans Verkuil | 0715172 | 2006-04-01 18:03:23 -0300 | [diff] [blame] | 368 | .amux = MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1, |
| 369 | MSP_DSP_IN_SCART, MSP_DSP_IN_SCART), |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 370 | } }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 371 | }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 372 | [EM2820_BOARD_DLINK_USB_TV] = { |
| 373 | .name = "D-Link DUB-T210 TV Tuner", |
| 374 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 375 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
| 376 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 377 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 378 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 379 | .type = EM28XX_VMUX_TELEVISION, |
| 380 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 381 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 382 | }, { |
| 383 | .type = EM28XX_VMUX_COMPOSITE1, |
| 384 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 385 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 386 | }, { |
| 387 | .type = EM28XX_VMUX_SVIDEO, |
| 388 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 389 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 390 | } }, |
| 391 | }, |
| 392 | [EM2820_BOARD_HERCULES_SMART_TV_USB2] = { |
| 393 | .name = "Hercules Smart TV USB 2.0", |
| 394 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 395 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
| 396 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 397 | .decoder = EM28XX_SAA711X, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 398 | .input = { { |
| 399 | .type = EM28XX_VMUX_TELEVISION, |
| 400 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 401 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 402 | }, { |
| 403 | .type = EM28XX_VMUX_COMPOSITE1, |
| 404 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 405 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 406 | }, { |
| 407 | .type = EM28XX_VMUX_SVIDEO, |
| 408 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 409 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 410 | } }, |
| 411 | }, |
| 412 | [EM2820_BOARD_PINNACLE_USB_2_FM1216ME] = { |
| 413 | .name = "Pinnacle PCTV USB 2 (Philips FM1216ME)", |
| 414 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 415 | .tuner_type = TUNER_PHILIPS_FM1216ME_MK3, |
| 416 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 417 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 418 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 419 | .type = EM28XX_VMUX_TELEVISION, |
| 420 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 421 | .amux = EM28XX_AMUX_VIDEO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 422 | }, { |
| 423 | .type = EM28XX_VMUX_COMPOSITE1, |
| 424 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 425 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 426 | }, { |
| 427 | .type = EM28XX_VMUX_SVIDEO, |
| 428 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 429 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 430 | } }, |
| 431 | }, |
| 432 | [EM2820_BOARD_GADMEI_UTV310] = { |
| 433 | .name = "Gadmei UTV310", |
| 434 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 435 | .tuner_type = TUNER_TNF_5335MF, |
| 436 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 437 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 438 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 439 | .type = EM28XX_VMUX_TELEVISION, |
| 440 | .vmux = SAA7115_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 441 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 442 | }, { |
| 443 | .type = EM28XX_VMUX_COMPOSITE1, |
| 444 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 445 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 446 | }, { |
| 447 | .type = EM28XX_VMUX_SVIDEO, |
| 448 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 449 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 450 | } }, |
| 451 | }, |
| 452 | [EM2820_BOARD_LEADTEK_WINFAST_USBII_DELUXE] = { |
| 453 | .name = "Leadtek Winfast USB II Deluxe", |
| 454 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 455 | .tuner_type = TUNER_PHILIPS_FM1216ME_MK3, |
| 456 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 457 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 458 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 459 | .type = EM28XX_VMUX_TELEVISION, |
Mauro Carvalho Chehab | a5942b5 | 2008-11-27 07:44:00 -0300 | [diff] [blame] | 460 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 461 | .amux = EM28XX_AMUX_VIDEO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 462 | }, { |
| 463 | .type = EM28XX_VMUX_COMPOSITE1, |
Mauro Carvalho Chehab | a5942b5 | 2008-11-27 07:44:00 -0300 | [diff] [blame] | 464 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 465 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 466 | }, { |
| 467 | .type = EM28XX_VMUX_SVIDEO, |
Mauro Carvalho Chehab | a5942b5 | 2008-11-27 07:44:00 -0300 | [diff] [blame] | 468 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 469 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 470 | } }, |
| 471 | }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 472 | [EM2820_BOARD_VIDEOLOGY_20K14XUSB] = { |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 473 | .name = "Videology 20K14XUSB USB2.0", |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 474 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Mauro Carvalho Chehab | 8a2e699 | 2009-07-12 10:26:36 -0300 | [diff] [blame] | 475 | .tuner_type = TUNER_ABSENT, |
| 476 | .is_webcam = 1, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 477 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 478 | .type = EM28XX_VMUX_COMPOSITE1, |
| 479 | .vmux = 0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 480 | .amux = EM28XX_AMUX_VIDEO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 481 | } }, |
| 482 | }, |
Mauro Carvalho Chehab | 02e7804 | 2009-06-29 11:35:05 -0300 | [diff] [blame] | 483 | [EM2820_BOARD_SILVERCREST_WEBCAM] = { |
| 484 | .name = "Silvercrest Webcam 1.3mpix", |
| 485 | .tuner_type = TUNER_ABSENT, |
Mauro Carvalho Chehab | c43221d | 2009-07-12 10:23:23 -0300 | [diff] [blame] | 486 | .is_webcam = 1, |
Mauro Carvalho Chehab | 02e7804 | 2009-06-29 11:35:05 -0300 | [diff] [blame] | 487 | .input = { { |
| 488 | .type = EM28XX_VMUX_COMPOSITE1, |
| 489 | .vmux = 0, |
| 490 | .amux = EM28XX_AMUX_VIDEO, |
| 491 | .gpio = silvercrest_reg_seq, |
| 492 | } }, |
| 493 | }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 494 | [EM2821_BOARD_SUPERCOMP_USB_2] = { |
| 495 | .name = "Supercomp USB 2.0 TV", |
| 496 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 497 | .tuner_type = TUNER_PHILIPS_FM1236_MK3, |
| 498 | .tda9887_conf = TDA9887_PRESENT | |
| 499 | TDA9887_PORT1_ACTIVE | |
| 500 | TDA9887_PORT2_ACTIVE, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 501 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 502 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 503 | .type = EM28XX_VMUX_TELEVISION, |
| 504 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 505 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 506 | }, { |
| 507 | .type = EM28XX_VMUX_COMPOSITE1, |
| 508 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 509 | .amux = EM28XX_AMUX_VIDEO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 510 | }, { |
| 511 | .type = EM28XX_VMUX_SVIDEO, |
| 512 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 513 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 514 | } }, |
| 515 | }, |
| 516 | [EM2821_BOARD_USBGEAR_VD204] = { |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 517 | .name = "Usbgear VD204v9", |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 518 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Mauro Carvalho Chehab | 1c67e76 | 2008-11-27 07:46:59 -0300 | [diff] [blame] | 519 | .tuner_type = TUNER_ABSENT, /* Capture only device */ |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 520 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 521 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 522 | .type = EM28XX_VMUX_COMPOSITE1, |
| 523 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 524 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 525 | }, { |
| 526 | .type = EM28XX_VMUX_SVIDEO, |
| 527 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 528 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 529 | } }, |
| 530 | }, |
| 531 | [EM2860_BOARD_NETGMBH_CAM] = { |
| 532 | /* Beijing Huaqi Information Digital Technology Co., Ltd */ |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 533 | .name = "NetGMBH Cam", |
| 534 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Mauro Carvalho Chehab | 8a2e699 | 2009-07-12 10:26:36 -0300 | [diff] [blame] | 535 | .tuner_type = TUNER_ABSENT, |
| 536 | .is_webcam = 1, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 537 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 538 | .type = EM28XX_VMUX_COMPOSITE1, |
| 539 | .vmux = 0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 540 | .amux = EM28XX_AMUX_VIDEO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 541 | } }, |
| 542 | }, |
| 543 | [EM2860_BOARD_TYPHOON_DVD_MAKER] = { |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 544 | .name = "Typhoon DVD Maker", |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 545 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | 1c67e76 | 2008-11-27 07:46:59 -0300 | [diff] [blame] | 546 | .tuner_type = TUNER_ABSENT, /* Capture only device */ |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 547 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 548 | .type = EM28XX_VMUX_COMPOSITE1, |
| 549 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 550 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 551 | }, { |
| 552 | .type = EM28XX_VMUX_SVIDEO, |
| 553 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 554 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 555 | } }, |
| 556 | }, |
| 557 | [EM2860_BOARD_GADMEI_UTV330] = { |
| 558 | .name = "Gadmei UTV330", |
| 559 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 560 | .tuner_type = TUNER_TNF_5335MF, |
| 561 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 562 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 563 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 564 | .type = EM28XX_VMUX_TELEVISION, |
| 565 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 566 | .amux = EM28XX_AMUX_VIDEO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 567 | }, { |
| 568 | .type = EM28XX_VMUX_COMPOSITE1, |
| 569 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 570 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 571 | }, { |
| 572 | .type = EM28XX_VMUX_SVIDEO, |
| 573 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 574 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 575 | } }, |
| 576 | }, |
Mauro Carvalho Chehab | 6d888a6 | 2009-08-30 13:05:56 -0300 | [diff] [blame] | 577 | [EM2861_BOARD_GADMEI_UTV330PLUS] = { |
| 578 | .name = "Gadmei UTV330+", |
| 579 | .tuner_type = TUNER_TNF_5335MF, |
| 580 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | 715a223 | 2009-08-29 14:15:55 -0300 | [diff] [blame] | 581 | .ir_codes = &ir_codes_gadmei_rm008z_table, |
Mauro Carvalho Chehab | 6d888a6 | 2009-08-30 13:05:56 -0300 | [diff] [blame] | 582 | .decoder = EM28XX_SAA711X, |
| 583 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, |
| 584 | .input = { { |
| 585 | .type = EM28XX_VMUX_TELEVISION, |
| 586 | .vmux = SAA7115_COMPOSITE2, |
| 587 | .amux = EM28XX_AMUX_VIDEO, |
| 588 | }, { |
| 589 | .type = EM28XX_VMUX_COMPOSITE1, |
| 590 | .vmux = SAA7115_COMPOSITE0, |
| 591 | .amux = EM28XX_AMUX_LINE_IN, |
| 592 | }, { |
| 593 | .type = EM28XX_VMUX_SVIDEO, |
| 594 | .vmux = SAA7115_SVIDEO3, |
| 595 | .amux = EM28XX_AMUX_LINE_IN, |
| 596 | } }, |
| 597 | }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 598 | [EM2860_BOARD_TERRATEC_HYBRID_XS] = { |
| 599 | .name = "Terratec Cinergy A Hybrid XS", |
| 600 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 601 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 602 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 603 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 604 | |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 605 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 606 | .type = EM28XX_VMUX_TELEVISION, |
| 607 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 608 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 609 | .gpio = hauppauge_wintv_hvr_900_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 610 | }, { |
| 611 | .type = EM28XX_VMUX_COMPOSITE1, |
| 612 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 613 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 614 | .gpio = hauppauge_wintv_hvr_900_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 615 | }, { |
| 616 | .type = EM28XX_VMUX_SVIDEO, |
| 617 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 618 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 619 | .gpio = hauppauge_wintv_hvr_900_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 620 | } }, |
| 621 | }, |
| 622 | [EM2861_BOARD_KWORLD_PVRTV_300U] = { |
| 623 | .name = "KWorld PVRTV 300U", |
| 624 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 625 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 626 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 627 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 628 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 629 | .type = EM28XX_VMUX_TELEVISION, |
| 630 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 631 | .amux = EM28XX_AMUX_VIDEO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 632 | }, { |
| 633 | .type = EM28XX_VMUX_COMPOSITE1, |
| 634 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 635 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 636 | }, { |
| 637 | .type = EM28XX_VMUX_SVIDEO, |
| 638 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 639 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 640 | } }, |
| 641 | }, |
| 642 | [EM2861_BOARD_YAKUMO_MOVIE_MIXER] = { |
| 643 | .name = "Yakumo MovieMixer", |
Nicola Soranzo | a1a6ee7 | 2009-02-10 23:28:24 -0300 | [diff] [blame] | 644 | .tuner_type = TUNER_ABSENT, /* Capture only device */ |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 645 | .decoder = EM28XX_TVP5150, |
| 646 | .input = { { |
| 647 | .type = EM28XX_VMUX_TELEVISION, |
| 648 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 649 | .amux = EM28XX_AMUX_VIDEO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 650 | }, { |
| 651 | .type = EM28XX_VMUX_COMPOSITE1, |
| 652 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 653 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 654 | }, { |
| 655 | .type = EM28XX_VMUX_SVIDEO, |
| 656 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 657 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 658 | } }, |
| 659 | }, |
| 660 | [EM2861_BOARD_PLEXTOR_PX_TV100U] = { |
| 661 | .name = "Plextor ConvertX PX-TV100U", |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 662 | .tuner_type = TUNER_TNF_5335MF, |
Mauro Carvalho Chehab | 0a6e44d | 2009-07-29 01:39:12 -0300 | [diff] [blame] | 663 | .xclk = EM28XX_XCLK_I2S_MSB_TIMING | |
| 664 | EM28XX_XCLK_FREQUENCY_12MHZ, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 665 | .tda9887_conf = TDA9887_PRESENT, |
| 666 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | 0a6e44d | 2009-07-29 01:39:12 -0300 | [diff] [blame] | 667 | .has_msp34xx = 1, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 668 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 669 | .type = EM28XX_VMUX_TELEVISION, |
| 670 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 671 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 0a6e44d | 2009-07-29 01:39:12 -0300 | [diff] [blame] | 672 | .gpio = pinnacle_hybrid_pro_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 673 | }, { |
| 674 | .type = EM28XX_VMUX_COMPOSITE1, |
| 675 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 676 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 0a6e44d | 2009-07-29 01:39:12 -0300 | [diff] [blame] | 677 | .gpio = pinnacle_hybrid_pro_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 678 | }, { |
| 679 | .type = EM28XX_VMUX_SVIDEO, |
| 680 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 681 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 0a6e44d | 2009-07-29 01:39:12 -0300 | [diff] [blame] | 682 | .gpio = pinnacle_hybrid_pro_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 683 | } }, |
| 684 | }, |
Mauro Carvalho Chehab | 1c67e76 | 2008-11-27 07:46:59 -0300 | [diff] [blame] | 685 | |
| 686 | /* Those boards with em2870 are DVB Only*/ |
| 687 | |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 688 | [EM2870_BOARD_TERRATEC_XS] = { |
| 689 | .name = "Terratec Cinergy T XS", |
| 690 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
| 691 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 692 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 693 | }, |
| 694 | [EM2870_BOARD_TERRATEC_XS_MT2060] = { |
| 695 | .name = "Terratec Cinergy T XS (MT2060)", |
| 696 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
| 697 | .tuner_type = TUNER_ABSENT, /* MT2060 */ |
| 698 | }, |
| 699 | [EM2870_BOARD_KWORLD_350U] = { |
| 700 | .name = "Kworld 350 U DVB-T", |
| 701 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
| 702 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 703 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 704 | }, |
| 705 | [EM2870_BOARD_KWORLD_355U] = { |
| 706 | .name = "Kworld 355 U DVB-T", |
| 707 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
| 708 | }, |
| 709 | [EM2870_BOARD_PINNACLE_PCTV_DVB] = { |
| 710 | .name = "Pinnacle PCTV DVB-T", |
| 711 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
| 712 | .tuner_type = TUNER_ABSENT, /* MT2060 */ |
Mauro Carvalho Chehab | a2070c6 | 2008-11-25 07:05:06 -0300 | [diff] [blame] | 713 | /* djh - I have serious doubts this is right... */ |
| 714 | .xclk = EM28XX_XCLK_IR_RC5_MODE | |
| 715 | EM28XX_XCLK_FREQUENCY_10MHZ, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 716 | }, |
| 717 | [EM2870_BOARD_COMPRO_VIDEOMATE] = { |
| 718 | .name = "Compro, VideoMate U3", |
| 719 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
| 720 | .tuner_type = TUNER_ABSENT, /* MT2060 */ |
| 721 | }, |
Mauro Carvalho Chehab | 1c67e76 | 2008-11-27 07:46:59 -0300 | [diff] [blame] | 722 | |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 723 | [EM2880_BOARD_TERRATEC_HYBRID_XS_FR] = { |
| 724 | .name = "Terratec Hybrid XS Secam", |
| 725 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 726 | .has_msp34xx = 1, |
| 727 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 728 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 729 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 730 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 731 | .type = EM28XX_VMUX_TELEVISION, |
| 732 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 733 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 734 | .gpio = default_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 735 | }, { |
| 736 | .type = EM28XX_VMUX_COMPOSITE1, |
| 737 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 738 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 739 | .gpio = default_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 740 | }, { |
| 741 | .type = EM28XX_VMUX_SVIDEO, |
| 742 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 743 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 744 | .gpio = default_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 745 | } }, |
| 746 | }, |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 747 | [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900] = { |
Aidan Thornton | 122d158 | 2007-11-20 15:25:08 -0300 | [diff] [blame] | 748 | .name = "Hauppauge WinTV HVR 900", |
Aidan Thornton | 122d158 | 2007-11-20 15:25:08 -0300 | [diff] [blame] | 749 | .tda9887_conf = TDA9887_PRESENT, |
| 750 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 751 | .tuner_gpio = default_tuner_gpio, |
Mauro Carvalho Chehab | 5add9a6 | 2007-11-22 12:08:53 -0300 | [diff] [blame] | 752 | .mts_firmware = 1, |
Mauro Carvalho Chehab | a2070c6 | 2008-11-25 07:05:06 -0300 | [diff] [blame] | 753 | .has_dvb = 1, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 754 | .dvb_gpio = hauppauge_wintv_hvr_900_digital, |
Mauro Carvalho Chehab | 715a223 | 2009-08-29 14:15:55 -0300 | [diff] [blame] | 755 | .ir_codes = &ir_codes_hauppauge_new_table, |
Aidan Thornton | 122d158 | 2007-11-20 15:25:08 -0300 | [diff] [blame] | 756 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 757 | .input = { { |
Aidan Thornton | 122d158 | 2007-11-20 15:25:08 -0300 | [diff] [blame] | 758 | .type = EM28XX_VMUX_TELEVISION, |
| 759 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 760 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 761 | .gpio = hauppauge_wintv_hvr_900_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 762 | }, { |
Aidan Thornton | 122d158 | 2007-11-20 15:25:08 -0300 | [diff] [blame] | 763 | .type = EM28XX_VMUX_COMPOSITE1, |
| 764 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 765 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 766 | .gpio = hauppauge_wintv_hvr_900_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 767 | }, { |
Aidan Thornton | 122d158 | 2007-11-20 15:25:08 -0300 | [diff] [blame] | 768 | .type = EM28XX_VMUX_SVIDEO, |
| 769 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 770 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 771 | .gpio = hauppauge_wintv_hvr_900_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 772 | } }, |
Aidan Thornton | 122d158 | 2007-11-20 15:25:08 -0300 | [diff] [blame] | 773 | }, |
Devin Heitmueller | 17d9d55 | 2008-06-08 10:22:03 -0300 | [diff] [blame] | 774 | [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2] = { |
| 775 | .name = "Hauppauge WinTV HVR 900 (R2)", |
Devin Heitmueller | 17d9d55 | 2008-06-08 10:22:03 -0300 | [diff] [blame] | 776 | .tda9887_conf = TDA9887_PRESENT, |
| 777 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 778 | .tuner_gpio = default_tuner_gpio, |
Devin Heitmueller | 17d9d55 | 2008-06-08 10:22:03 -0300 | [diff] [blame] | 779 | .mts_firmware = 1, |
Mauro Carvalho Chehab | 715a223 | 2009-08-29 14:15:55 -0300 | [diff] [blame] | 780 | .ir_codes = &ir_codes_hauppauge_new_table, |
Devin Heitmueller | 17d9d55 | 2008-06-08 10:22:03 -0300 | [diff] [blame] | 781 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 782 | .input = { { |
Devin Heitmueller | 17d9d55 | 2008-06-08 10:22:03 -0300 | [diff] [blame] | 783 | .type = EM28XX_VMUX_TELEVISION, |
| 784 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 785 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 786 | .gpio = hauppauge_wintv_hvr_900_analog, |
Devin Heitmueller | 17d9d55 | 2008-06-08 10:22:03 -0300 | [diff] [blame] | 787 | }, { |
| 788 | .type = EM28XX_VMUX_COMPOSITE1, |
| 789 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | a5942b5 | 2008-11-27 07:44:00 -0300 | [diff] [blame] | 790 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 791 | .gpio = hauppauge_wintv_hvr_900_analog, |
Devin Heitmueller | 17d9d55 | 2008-06-08 10:22:03 -0300 | [diff] [blame] | 792 | }, { |
| 793 | .type = EM28XX_VMUX_SVIDEO, |
| 794 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 795 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 796 | .gpio = hauppauge_wintv_hvr_900_analog, |
Devin Heitmueller | 17d9d55 | 2008-06-08 10:22:03 -0300 | [diff] [blame] | 797 | } }, |
| 798 | }, |
Douglas Schilling Landgraf | f89bc32 | 2008-12-01 21:01:04 -0300 | [diff] [blame] | 799 | [EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850] = { |
| 800 | .name = "Hauppauge WinTV HVR 850", |
| 801 | .tuner_type = TUNER_XC2028, |
| 802 | .tuner_gpio = default_tuner_gpio, |
| 803 | .mts_firmware = 1, |
| 804 | .has_dvb = 1, |
| 805 | .dvb_gpio = hauppauge_wintv_hvr_900_digital, |
Mauro Carvalho Chehab | 715a223 | 2009-08-29 14:15:55 -0300 | [diff] [blame] | 806 | .ir_codes = &ir_codes_hauppauge_new_table, |
Douglas Schilling Landgraf | f89bc32 | 2008-12-01 21:01:04 -0300 | [diff] [blame] | 807 | .decoder = EM28XX_TVP5150, |
| 808 | .input = { { |
| 809 | .type = EM28XX_VMUX_TELEVISION, |
| 810 | .vmux = TVP5150_COMPOSITE0, |
| 811 | .amux = EM28XX_AMUX_VIDEO, |
| 812 | .gpio = hauppauge_wintv_hvr_900_analog, |
| 813 | }, { |
| 814 | .type = EM28XX_VMUX_COMPOSITE1, |
| 815 | .vmux = TVP5150_COMPOSITE1, |
| 816 | .amux = EM28XX_AMUX_LINE_IN, |
| 817 | .gpio = hauppauge_wintv_hvr_900_analog, |
| 818 | }, { |
| 819 | .type = EM28XX_VMUX_SVIDEO, |
| 820 | .vmux = TVP5150_SVIDEO, |
| 821 | .amux = EM28XX_AMUX_LINE_IN, |
| 822 | .gpio = hauppauge_wintv_hvr_900_analog, |
| 823 | } }, |
| 824 | }, |
Mauro Carvalho Chehab | 10ac660 | 2008-07-27 14:58:58 -0300 | [diff] [blame] | 825 | [EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950] = { |
Mauro Carvalho Chehab | 3abee53 | 2008-01-05 17:01:41 -0300 | [diff] [blame] | 826 | .name = "Hauppauge WinTV HVR 950", |
Mauro Carvalho Chehab | 3abee53 | 2008-01-05 17:01:41 -0300 | [diff] [blame] | 827 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 828 | .tuner_gpio = default_tuner_gpio, |
Mauro Carvalho Chehab | 3abee53 | 2008-01-05 17:01:41 -0300 | [diff] [blame] | 829 | .mts_firmware = 1, |
Mauro Carvalho Chehab | 227ad4a | 2008-04-17 21:37:40 -0300 | [diff] [blame] | 830 | .has_dvb = 1, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 831 | .dvb_gpio = hauppauge_wintv_hvr_900_digital, |
Mauro Carvalho Chehab | 715a223 | 2009-08-29 14:15:55 -0300 | [diff] [blame] | 832 | .ir_codes = &ir_codes_hauppauge_new_table, |
Mauro Carvalho Chehab | 3abee53 | 2008-01-05 17:01:41 -0300 | [diff] [blame] | 833 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 834 | .input = { { |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 835 | .type = EM28XX_VMUX_TELEVISION, |
| 836 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 837 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 838 | .gpio = hauppauge_wintv_hvr_900_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 839 | }, { |
Mauro Carvalho Chehab | 7d070e2 | 2007-11-01 21:52:58 -0300 | [diff] [blame] | 840 | .type = EM28XX_VMUX_COMPOSITE1, |
| 841 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 842 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 843 | .gpio = hauppauge_wintv_hvr_900_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 844 | }, { |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 845 | .type = EM28XX_VMUX_SVIDEO, |
| 846 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 847 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 848 | .gpio = hauppauge_wintv_hvr_900_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 849 | } }, |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 850 | }, |
Devin Heitmueller | 4fd305b | 2008-06-04 13:43:46 -0300 | [diff] [blame] | 851 | [EM2880_BOARD_PINNACLE_PCTV_HD_PRO] = { |
| 852 | .name = "Pinnacle PCTV HD Pro Stick", |
Devin Heitmueller | 4fd305b | 2008-06-04 13:43:46 -0300 | [diff] [blame] | 853 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 854 | .tuner_gpio = default_tuner_gpio, |
Devin Heitmueller | 4fd305b | 2008-06-04 13:43:46 -0300 | [diff] [blame] | 855 | .mts_firmware = 1, |
Devin Heitmueller | 4fd305b | 2008-06-04 13:43:46 -0300 | [diff] [blame] | 856 | .has_dvb = 1, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 857 | .dvb_gpio = hauppauge_wintv_hvr_900_digital, |
Mauro Carvalho Chehab | 715a223 | 2009-08-29 14:15:55 -0300 | [diff] [blame] | 858 | .ir_codes = &ir_codes_pinnacle_pctv_hd_table, |
Devin Heitmueller | 4fd305b | 2008-06-04 13:43:46 -0300 | [diff] [blame] | 859 | .decoder = EM28XX_TVP5150, |
| 860 | .input = { { |
| 861 | .type = EM28XX_VMUX_TELEVISION, |
| 862 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 863 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 864 | .gpio = hauppauge_wintv_hvr_900_analog, |
Devin Heitmueller | 4fd305b | 2008-06-04 13:43:46 -0300 | [diff] [blame] | 865 | }, { |
| 866 | .type = EM28XX_VMUX_COMPOSITE1, |
| 867 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 868 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 869 | .gpio = hauppauge_wintv_hvr_900_analog, |
Devin Heitmueller | 4fd305b | 2008-06-04 13:43:46 -0300 | [diff] [blame] | 870 | }, { |
| 871 | .type = EM28XX_VMUX_SVIDEO, |
| 872 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 873 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 874 | .gpio = hauppauge_wintv_hvr_900_analog, |
Devin Heitmueller | 4fd305b | 2008-06-04 13:43:46 -0300 | [diff] [blame] | 875 | } }, |
| 876 | }, |
Devin Heitmueller | e14b365 | 2008-07-26 11:04:33 -0300 | [diff] [blame] | 877 | [EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600] = { |
| 878 | .name = "AMD ATI TV Wonder HD 600", |
Devin Heitmueller | e14b365 | 2008-07-26 11:04:33 -0300 | [diff] [blame] | 879 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 880 | .tuner_gpio = default_tuner_gpio, |
Devin Heitmueller | e14b365 | 2008-07-26 11:04:33 -0300 | [diff] [blame] | 881 | .mts_firmware = 1, |
Devin Heitmueller | e14b365 | 2008-07-26 11:04:33 -0300 | [diff] [blame] | 882 | .has_dvb = 1, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 883 | .dvb_gpio = hauppauge_wintv_hvr_900_digital, |
Mauro Carvalho Chehab | 715a223 | 2009-08-29 14:15:55 -0300 | [diff] [blame] | 884 | .ir_codes = &ir_codes_ati_tv_wonder_hd_600_table, |
Devin Heitmueller | e14b365 | 2008-07-26 11:04:33 -0300 | [diff] [blame] | 885 | .decoder = EM28XX_TVP5150, |
| 886 | .input = { { |
| 887 | .type = EM28XX_VMUX_TELEVISION, |
| 888 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 889 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 890 | .gpio = hauppauge_wintv_hvr_900_analog, |
Devin Heitmueller | e14b365 | 2008-07-26 11:04:33 -0300 | [diff] [blame] | 891 | }, { |
| 892 | .type = EM28XX_VMUX_COMPOSITE1, |
| 893 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 894 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 895 | .gpio = hauppauge_wintv_hvr_900_analog, |
Devin Heitmueller | e14b365 | 2008-07-26 11:04:33 -0300 | [diff] [blame] | 896 | }, { |
| 897 | .type = EM28XX_VMUX_SVIDEO, |
| 898 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 899 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 900 | .gpio = hauppauge_wintv_hvr_900_analog, |
Devin Heitmueller | e14b365 | 2008-07-26 11:04:33 -0300 | [diff] [blame] | 901 | } }, |
| 902 | }, |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 903 | [EM2880_BOARD_TERRATEC_HYBRID_XS] = { |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 904 | .name = "Terratec Hybrid XS", |
| 905 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 906 | .tuner_gpio = default_tuner_gpio, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 907 | .decoder = EM28XX_TVP5150, |
reinhard schwab | 655b840 | 2008-07-26 10:47:00 -0300 | [diff] [blame] | 908 | .has_dvb = 1, |
Devin Heitmueller | f797608 | 2009-06-22 22:32:32 -0300 | [diff] [blame] | 909 | .dvb_gpio = default_digital, |
Mauro Carvalho Chehab | 715a223 | 2009-08-29 14:15:55 -0300 | [diff] [blame] | 910 | .ir_codes = &ir_codes_terratec_cinergy_xs_table, |
Devin Heitmueller | 8cd9aae | 2009-08-03 23:56:51 -0300 | [diff] [blame] | 911 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, /* NEC IR */ |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 912 | .input = { { |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 913 | .type = EM28XX_VMUX_TELEVISION, |
| 914 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 915 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 916 | .gpio = default_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 917 | }, { |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 918 | .type = EM28XX_VMUX_COMPOSITE1, |
| 919 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 920 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 921 | .gpio = default_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 922 | }, { |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 923 | .type = EM28XX_VMUX_SVIDEO, |
| 924 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 925 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 926 | .gpio = default_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 927 | } }, |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 928 | }, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 929 | /* maybe there's a reason behind it why Terratec sells the Hybrid XS |
| 930 | as Prodigy XS with a different PID, let's keep it separated for now |
| 931 | maybe we'll need it lateron */ |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 932 | [EM2880_BOARD_TERRATEC_PRODIGY_XS] = { |
| 933 | .name = "Terratec Prodigy XS", |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 934 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 935 | .tuner_gpio = default_tuner_gpio, |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 936 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 937 | .input = { { |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 938 | .type = EM28XX_VMUX_TELEVISION, |
| 939 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 940 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 941 | .gpio = hauppauge_wintv_hvr_900_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 942 | }, { |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 943 | .type = EM28XX_VMUX_COMPOSITE1, |
| 944 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 945 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 946 | .gpio = hauppauge_wintv_hvr_900_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 947 | }, { |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 948 | .type = EM28XX_VMUX_SVIDEO, |
| 949 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 950 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 951 | .gpio = hauppauge_wintv_hvr_900_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 952 | } }, |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 953 | }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 954 | [EM2820_BOARD_MSI_VOX_USB_2] = { |
Mauro Carvalho Chehab | c8793b0 | 2008-01-13 15:42:17 -0300 | [diff] [blame] | 955 | .name = "MSI VOX USB 2.0", |
Mauro Carvalho Chehab | c8793b0 | 2008-01-13 15:42:17 -0300 | [diff] [blame] | 956 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
| 957 | .tda9887_conf = TDA9887_PRESENT | |
| 958 | TDA9887_PORT1_ACTIVE | |
| 959 | TDA9887_PORT2_ACTIVE, |
Mauro Carvalho Chehab | c8793b0 | 2008-01-13 15:42:17 -0300 | [diff] [blame] | 960 | .max_range_640_480 = 1, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 961 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | c8793b0 | 2008-01-13 15:42:17 -0300 | [diff] [blame] | 962 | .input = { { |
| 963 | .type = EM28XX_VMUX_TELEVISION, |
| 964 | .vmux = SAA7115_COMPOSITE4, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 965 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 966 | }, { |
Mauro Carvalho Chehab | c8793b0 | 2008-01-13 15:42:17 -0300 | [diff] [blame] | 967 | .type = EM28XX_VMUX_COMPOSITE1, |
| 968 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 969 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 970 | }, { |
Mauro Carvalho Chehab | c8793b0 | 2008-01-13 15:42:17 -0300 | [diff] [blame] | 971 | .type = EM28XX_VMUX_SVIDEO, |
| 972 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 973 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 974 | } }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 975 | }, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 976 | [EM2800_BOARD_TERRATEC_CINERGY_200] = { |
| 977 | .name = "Terratec Cinergy 200 USB", |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 978 | .is_em2800 = 1, |
Mauro Carvalho Chehab | ac07bb7 | 2009-09-08 14:04:41 -0300 | [diff] [blame] | 979 | .has_ir_i2c = 1, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 980 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
| 981 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 982 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 983 | .input = { { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 984 | .type = EM28XX_VMUX_TELEVISION, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 985 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 986 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 987 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 988 | .type = EM28XX_VMUX_COMPOSITE1, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 989 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 990 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 991 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 992 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 993 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 994 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 995 | } }, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 996 | }, |
Aron Szabo | 59d07f1 | 2008-07-27 13:47:52 -0300 | [diff] [blame] | 997 | [EM2800_BOARD_GRABBEEX_USB2800] = { |
Nicola Soranzo | a1a6ee7 | 2009-02-10 23:28:24 -0300 | [diff] [blame] | 998 | .name = "eMPIA Technology, Inc. GrabBeeX+ Video Encoder", |
| 999 | .is_em2800 = 1, |
| 1000 | .decoder = EM28XX_SAA711X, |
| 1001 | .tuner_type = TUNER_ABSENT, /* capture only board */ |
| 1002 | .input = { { |
Aron Szabo | 59d07f1 | 2008-07-27 13:47:52 -0300 | [diff] [blame] | 1003 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1004 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1005 | .amux = EM28XX_AMUX_LINE_IN, |
Aron Szabo | 59d07f1 | 2008-07-27 13:47:52 -0300 | [diff] [blame] | 1006 | }, { |
| 1007 | .type = EM28XX_VMUX_SVIDEO, |
| 1008 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1009 | .amux = EM28XX_AMUX_LINE_IN, |
Aron Szabo | 59d07f1 | 2008-07-27 13:47:52 -0300 | [diff] [blame] | 1010 | } }, |
| 1011 | }, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 1012 | [EM2800_BOARD_LEADTEK_WINFAST_USBII] = { |
| 1013 | .name = "Leadtek Winfast USB II", |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 1014 | .is_em2800 = 1, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 1015 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
| 1016 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 1017 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1018 | .input = { { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 1019 | .type = EM28XX_VMUX_TELEVISION, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 1020 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1021 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1022 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 1023 | .type = EM28XX_VMUX_COMPOSITE1, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 1024 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1025 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1026 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 1027 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 1028 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1029 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1030 | } }, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 1031 | }, |
| 1032 | [EM2800_BOARD_KWORLD_USB2800] = { |
| 1033 | .name = "Kworld USB2800", |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 1034 | .is_em2800 = 1, |
Michael Krufky | ab8b870 | 2008-04-22 14:46:05 -0300 | [diff] [blame] | 1035 | .tuner_type = TUNER_PHILIPS_FCV1236D, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 1036 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 1037 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1038 | .input = { { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 1039 | .type = EM28XX_VMUX_TELEVISION, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 1040 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1041 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1042 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 1043 | .type = EM28XX_VMUX_COMPOSITE1, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 1044 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1045 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1046 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 1047 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 1048 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1049 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1050 | } }, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 1051 | }, |
Mauro Carvalho Chehab | 45632c4 | 2005-11-08 21:38:15 -0800 | [diff] [blame] | 1052 | [EM2820_BOARD_PINNACLE_DVC_90] = { |
Douglas Schilling Landgraf | ea47689 | 2009-09-06 18:41:59 -0300 | [diff] [blame] | 1053 | .name = "Pinnacle Dazzle DVC 90/100/101/107 / Kaiser Baas Video to DVD maker " |
| 1054 | "/ Kworld DVD Maker 2", |
Mauro Carvalho Chehab | 1c67e76 | 2008-11-27 07:46:59 -0300 | [diff] [blame] | 1055 | .tuner_type = TUNER_ABSENT, /* capture only board */ |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 1056 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1057 | .input = { { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 1058 | .type = EM28XX_VMUX_COMPOSITE1, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 1059 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1060 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1061 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 1062 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 1063 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1064 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1065 | } }, |
Mauro Carvalho Chehab | 45632c4 | 2005-11-08 21:38:15 -0800 | [diff] [blame] | 1066 | }, |
Sascha Sommer | 4362559 | 2007-11-03 15:05:07 -0300 | [diff] [blame] | 1067 | [EM2800_BOARD_VGEAR_POCKETTV] = { |
| 1068 | .name = "V-Gear PocketTV", |
| 1069 | .is_em2800 = 1, |
Sascha Sommer | 4362559 | 2007-11-03 15:05:07 -0300 | [diff] [blame] | 1070 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
| 1071 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 1072 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1073 | .input = { { |
Sascha Sommer | 4362559 | 2007-11-03 15:05:07 -0300 | [diff] [blame] | 1074 | .type = EM28XX_VMUX_TELEVISION, |
| 1075 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1076 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1077 | }, { |
Sascha Sommer | 4362559 | 2007-11-03 15:05:07 -0300 | [diff] [blame] | 1078 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1079 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1080 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1081 | }, { |
Sascha Sommer | 4362559 | 2007-11-03 15:05:07 -0300 | [diff] [blame] | 1082 | .type = EM28XX_VMUX_SVIDEO, |
| 1083 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1084 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1085 | } }, |
Sascha Sommer | 4362559 | 2007-11-03 15:05:07 -0300 | [diff] [blame] | 1086 | }, |
Douglas Schilling Landgraf | 1e1addd | 2008-12-27 21:38:14 -0300 | [diff] [blame] | 1087 | [EM2820_BOARD_PROLINK_PLAYTV_BOX4_USB2] = { |
| 1088 | .name = "Pixelview PlayTV Box 4 USB 2.0", |
| 1089 | .tda9887_conf = TDA9887_PRESENT, |
| 1090 | .tuner_type = TUNER_YMEC_TVF_5533MF, |
| 1091 | .decoder = EM28XX_SAA711X, |
| 1092 | .input = { { |
| 1093 | .type = EM28XX_VMUX_TELEVISION, |
| 1094 | .vmux = SAA7115_COMPOSITE2, |
| 1095 | .amux = EM28XX_AMUX_VIDEO, |
| 1096 | .aout = EM28XX_AOUT_MONO | /* I2S */ |
| 1097 | EM28XX_AOUT_MASTER, /* Line out pin */ |
| 1098 | }, { |
| 1099 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1100 | .vmux = SAA7115_COMPOSITE0, |
| 1101 | .amux = EM28XX_AMUX_LINE_IN, |
| 1102 | }, { |
| 1103 | .type = EM28XX_VMUX_SVIDEO, |
| 1104 | .vmux = SAA7115_SVIDEO3, |
| 1105 | .amux = EM28XX_AMUX_LINE_IN, |
| 1106 | } }, |
| 1107 | }, |
Mauro Carvalho Chehab | ea4fd56 | 2007-11-03 21:21:57 -0300 | [diff] [blame] | 1108 | [EM2820_BOARD_PROLINK_PLAYTV_USB2] = { |
Douglas Schilling Landgraf | 1f372a9 | 2009-02-25 16:54:31 -0300 | [diff] [blame] | 1109 | .name = "SIIG AVTuner-PVR / Pixelview Prolink PlayTV USB 2.0", |
Douglas Schilling Landgraf | 5609cfd | 2008-12-27 21:39:35 -0300 | [diff] [blame] | 1110 | .has_snapshot_button = 1, |
Mauro Carvalho Chehab | ea4fd56 | 2007-11-03 21:21:57 -0300 | [diff] [blame] | 1111 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ed08631 | 2008-01-24 06:59:20 -0300 | [diff] [blame] | 1112 | .tuner_type = TUNER_YMEC_TVF_5533MF, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 1113 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1114 | .input = { { |
Mauro Carvalho Chehab | ea4fd56 | 2007-11-03 21:21:57 -0300 | [diff] [blame] | 1115 | .type = EM28XX_VMUX_TELEVISION, |
| 1116 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 30e4ac7 | 2008-11-20 13:43:05 -0300 | [diff] [blame] | 1117 | .amux = EM28XX_AMUX_VIDEO, |
| 1118 | .aout = EM28XX_AOUT_MONO | /* I2S */ |
| 1119 | EM28XX_AOUT_MASTER, /* Line out pin */ |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1120 | }, { |
Mauro Carvalho Chehab | ea4fd56 | 2007-11-03 21:21:57 -0300 | [diff] [blame] | 1121 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1122 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 7463dda | 2008-02-05 22:29:26 -0300 | [diff] [blame] | 1123 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1124 | }, { |
Mauro Carvalho Chehab | ea4fd56 | 2007-11-03 21:21:57 -0300 | [diff] [blame] | 1125 | .type = EM28XX_VMUX_SVIDEO, |
| 1126 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 7463dda | 2008-02-05 22:29:26 -0300 | [diff] [blame] | 1127 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1128 | } }, |
Mauro Carvalho Chehab | ea4fd56 | 2007-11-03 21:21:57 -0300 | [diff] [blame] | 1129 | }, |
Devin Heitmueller | 3ed58ba | 2009-05-27 23:27:26 -0300 | [diff] [blame] | 1130 | [EM2860_BOARD_SAA711X_REFERENCE_DESIGN] = { |
| 1131 | .name = "EM2860/SAA711X Reference Design", |
Devin Heitmueller | a9fc52b | 2008-06-28 08:57:06 -0300 | [diff] [blame] | 1132 | .has_snapshot_button = 1, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1133 | .tuner_type = TUNER_ABSENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 1134 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1135 | .input = { { |
Devin Heitmueller | a9fc52b | 2008-06-28 08:57:06 -0300 | [diff] [blame] | 1136 | .type = EM28XX_VMUX_SVIDEO, |
| 1137 | .vmux = SAA7115_SVIDEO3, |
Devin Heitmueller | 3ed58ba | 2009-05-27 23:27:26 -0300 | [diff] [blame] | 1138 | }, { |
| 1139 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1140 | .vmux = SAA7115_COMPOSITE0, |
Devin Heitmueller | a9fc52b | 2008-06-28 08:57:06 -0300 | [diff] [blame] | 1141 | } }, |
| 1142 | }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1143 | [EM2880_BOARD_MSI_DIGIVOX_AD] = { |
| 1144 | .name = "MSI DigiVox A/D", |
| 1145 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1146 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1147 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1148 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1149 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1150 | .type = EM28XX_VMUX_TELEVISION, |
| 1151 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1152 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1153 | .gpio = em2880_msi_digivox_ad_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1154 | }, { |
| 1155 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1156 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1157 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1158 | .gpio = em2880_msi_digivox_ad_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1159 | }, { |
| 1160 | .type = EM28XX_VMUX_SVIDEO, |
| 1161 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1162 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1163 | .gpio = em2880_msi_digivox_ad_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1164 | } }, |
| 1165 | }, |
| 1166 | [EM2880_BOARD_MSI_DIGIVOX_AD_II] = { |
| 1167 | .name = "MSI DigiVox A/D II", |
| 1168 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1169 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1170 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1171 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1172 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1173 | .type = EM28XX_VMUX_TELEVISION, |
| 1174 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1175 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1176 | .gpio = em2880_msi_digivox_ad_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1177 | }, { |
| 1178 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1179 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1180 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1181 | .gpio = em2880_msi_digivox_ad_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1182 | }, { |
| 1183 | .type = EM28XX_VMUX_SVIDEO, |
| 1184 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1185 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1186 | .gpio = em2880_msi_digivox_ad_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1187 | } }, |
| 1188 | }, |
| 1189 | [EM2880_BOARD_KWORLD_DVB_305U] = { |
| 1190 | .name = "KWorld DVB-T 305U", |
| 1191 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1192 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1193 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1194 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1195 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1196 | .type = EM28XX_VMUX_TELEVISION, |
| 1197 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1198 | .amux = EM28XX_AMUX_VIDEO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1199 | }, { |
| 1200 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1201 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1202 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1203 | }, { |
| 1204 | .type = EM28XX_VMUX_SVIDEO, |
| 1205 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1206 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1207 | } }, |
| 1208 | }, |
| 1209 | [EM2880_BOARD_KWORLD_DVB_310U] = { |
| 1210 | .name = "KWorld DVB-T 310U", |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1211 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1212 | .tuner_gpio = default_tuner_gpio, |
Darron Broad | da3808e | 2008-09-30 02:46:41 -0300 | [diff] [blame] | 1213 | .has_dvb = 1, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1214 | .dvb_gpio = default_digital, |
Darron Broad | da3808e | 2008-09-30 02:46:41 -0300 | [diff] [blame] | 1215 | .mts_firmware = 1, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1216 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1217 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1218 | .type = EM28XX_VMUX_TELEVISION, |
| 1219 | .vmux = TVP5150_COMPOSITE0, |
Darron Broad | da3808e | 2008-09-30 02:46:41 -0300 | [diff] [blame] | 1220 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1221 | .gpio = default_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1222 | }, { |
| 1223 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1224 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | a42aa19 | 2008-11-19 11:08:53 -0300 | [diff] [blame] | 1225 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1226 | .gpio = default_analog, |
Darron Broad | da3808e | 2008-09-30 02:46:41 -0300 | [diff] [blame] | 1227 | }, { /* S-video has not been tested yet */ |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1228 | .type = EM28XX_VMUX_SVIDEO, |
| 1229 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | a42aa19 | 2008-11-19 11:08:53 -0300 | [diff] [blame] | 1230 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1231 | .gpio = default_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1232 | } }, |
| 1233 | }, |
Franklin Meng | d7de5d8 | 2009-06-06 17:05:02 -0300 | [diff] [blame] | 1234 | [EM2882_BOARD_KWORLD_ATSC_315U] = { |
| 1235 | .name = "KWorld ATSC 315U HDTV TV Box", |
| 1236 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
| 1237 | .tuner_type = TUNER_THOMSON_DTT761X, |
| 1238 | .tuner_gpio = em2882_kworld_315u_tuner_gpio, |
| 1239 | .tda9887_conf = TDA9887_PRESENT, |
| 1240 | .decoder = EM28XX_SAA711X, |
| 1241 | .has_dvb = 1, |
| 1242 | .dvb_gpio = em2882_kworld_315u_digital, |
| 1243 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, |
| 1244 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE, |
| 1245 | /* Analog mode - still not ready */ |
| 1246 | /*.input = { { |
| 1247 | .type = EM28XX_VMUX_TELEVISION, |
| 1248 | .vmux = SAA7115_COMPOSITE2, |
| 1249 | .amux = EM28XX_AMUX_VIDEO, |
| 1250 | .gpio = em2882_kworld_315u_analog, |
| 1251 | .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO, |
| 1252 | }, { |
| 1253 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1254 | .vmux = SAA7115_COMPOSITE0, |
| 1255 | .amux = EM28XX_AMUX_LINE_IN, |
| 1256 | .gpio = em2882_kworld_315u_analog1, |
| 1257 | .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO, |
| 1258 | }, { |
| 1259 | .type = EM28XX_VMUX_SVIDEO, |
| 1260 | .vmux = SAA7115_SVIDEO3, |
| 1261 | .amux = EM28XX_AMUX_LINE_IN, |
| 1262 | .gpio = em2882_kworld_315u_analog1, |
| 1263 | .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO, |
| 1264 | } }, */ |
| 1265 | }, |
Douglas Schilling Landgraf | e5db5d4 | 2009-04-09 18:24:34 -0300 | [diff] [blame] | 1266 | [EM2880_BOARD_EMPIRE_DUAL_TV] = { |
| 1267 | .name = "Empire dual TV", |
| 1268 | .tuner_type = TUNER_XC2028, |
| 1269 | .tuner_gpio = default_tuner_gpio, |
| 1270 | .has_dvb = 1, |
| 1271 | .dvb_gpio = default_digital, |
| 1272 | .mts_firmware = 1, |
| 1273 | .decoder = EM28XX_TVP5150, |
| 1274 | .input = { { |
| 1275 | .type = EM28XX_VMUX_TELEVISION, |
| 1276 | .vmux = TVP5150_COMPOSITE0, |
| 1277 | .amux = EM28XX_AMUX_VIDEO, |
| 1278 | .gpio = default_analog, |
| 1279 | }, { |
| 1280 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1281 | .vmux = TVP5150_COMPOSITE1, |
| 1282 | .amux = EM28XX_AMUX_LINE_IN, |
| 1283 | .gpio = default_analog, |
| 1284 | }, { |
| 1285 | .type = EM28XX_VMUX_SVIDEO, |
| 1286 | .vmux = TVP5150_SVIDEO, |
| 1287 | .amux = EM28XX_AMUX_LINE_IN, |
| 1288 | .gpio = default_analog, |
| 1289 | } }, |
| 1290 | }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1291 | [EM2881_BOARD_DNT_DA2_HYBRID] = { |
| 1292 | .name = "DNT DA2 Hybrid", |
| 1293 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1294 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1295 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1296 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1297 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1298 | .type = EM28XX_VMUX_TELEVISION, |
| 1299 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1300 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1301 | .gpio = default_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1302 | }, { |
| 1303 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1304 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1305 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1306 | .gpio = default_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1307 | }, { |
| 1308 | .type = EM28XX_VMUX_SVIDEO, |
| 1309 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1310 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1311 | .gpio = default_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1312 | } }, |
| 1313 | }, |
| 1314 | [EM2881_BOARD_PINNACLE_HYBRID_PRO] = { |
| 1315 | .name = "Pinnacle Hybrid Pro", |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1316 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1317 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1318 | .decoder = EM28XX_TVP5150, |
Devin Heitmueller | d5b3ba9 | 2009-07-08 21:51:35 -0300 | [diff] [blame] | 1319 | .has_dvb = 1, |
| 1320 | .dvb_gpio = pinnacle_hybrid_pro_digital, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1321 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1322 | .type = EM28XX_VMUX_TELEVISION, |
| 1323 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1324 | .amux = EM28XX_AMUX_VIDEO, |
Devin Heitmueller | d5b3ba9 | 2009-07-08 21:51:35 -0300 | [diff] [blame] | 1325 | .gpio = pinnacle_hybrid_pro_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1326 | }, { |
| 1327 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1328 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1329 | .amux = EM28XX_AMUX_LINE_IN, |
Devin Heitmueller | d5b3ba9 | 2009-07-08 21:51:35 -0300 | [diff] [blame] | 1330 | .gpio = pinnacle_hybrid_pro_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1331 | }, { |
| 1332 | .type = EM28XX_VMUX_SVIDEO, |
| 1333 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1334 | .amux = EM28XX_AMUX_LINE_IN, |
Devin Heitmueller | d5b3ba9 | 2009-07-08 21:51:35 -0300 | [diff] [blame] | 1335 | .gpio = pinnacle_hybrid_pro_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1336 | } }, |
| 1337 | }, |
| 1338 | [EM2882_BOARD_PINNACLE_HYBRID_PRO] = { |
| 1339 | .name = "Pinnacle Hybrid Pro (2)", |
| 1340 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1341 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1342 | .tuner_gpio = default_tuner_gpio, |
Eugeniy Meshcheryakov | a674a3b | 2008-08-01 08:23:41 -0300 | [diff] [blame] | 1343 | .mts_firmware = 1, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1344 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1345 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1346 | .type = EM28XX_VMUX_TELEVISION, |
| 1347 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1348 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1349 | .gpio = hauppauge_wintv_hvr_900_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1350 | }, { |
| 1351 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1352 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1353 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1354 | .gpio = hauppauge_wintv_hvr_900_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1355 | }, { |
| 1356 | .type = EM28XX_VMUX_SVIDEO, |
| 1357 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1358 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1359 | .gpio = hauppauge_wintv_hvr_900_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1360 | } }, |
| 1361 | }, |
| 1362 | [EM2882_BOARD_KWORLD_VS_DVBT] = { |
| 1363 | .name = "Kworld VS-DVB-T 323UR", |
| 1364 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1365 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1366 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1367 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1368 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1369 | .type = EM28XX_VMUX_TELEVISION, |
| 1370 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1371 | .amux = EM28XX_AMUX_VIDEO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1372 | }, { |
| 1373 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1374 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1375 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1376 | }, { |
| 1377 | .type = EM28XX_VMUX_SVIDEO, |
| 1378 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1379 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1380 | } }, |
| 1381 | }, |
| 1382 | [EM2882_BOARD_TERRATEC_HYBRID_XS] = { |
| 1383 | .name = "Terratec Hybrid XS (em2882)", |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1384 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1385 | .tuner_gpio = default_tuner_gpio, |
Uroš Vampl | ec994d0 | 2009-09-30 22:53:37 -0300 | [diff] [blame] | 1386 | .mts_firmware = 1, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1387 | .decoder = EM28XX_TVP5150, |
Uroš Vampl | ec994d0 | 2009-09-30 22:53:37 -0300 | [diff] [blame] | 1388 | .has_dvb = 1, |
| 1389 | .dvb_gpio = hauppauge_wintv_hvr_900_digital, |
| 1390 | .ir_codes = &ir_codes_terratec_cinergy_xs_table, |
| 1391 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1392 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1393 | .type = EM28XX_VMUX_TELEVISION, |
| 1394 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1395 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1396 | .gpio = hauppauge_wintv_hvr_900_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1397 | }, { |
| 1398 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1399 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1400 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1401 | .gpio = hauppauge_wintv_hvr_900_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1402 | }, { |
| 1403 | .type = EM28XX_VMUX_SVIDEO, |
| 1404 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1405 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1406 | .gpio = hauppauge_wintv_hvr_900_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1407 | } }, |
| 1408 | }, |
Robert Krakora | 6e7b9ea | 2009-01-18 21:59:34 -0300 | [diff] [blame] | 1409 | [EM2883_BOARD_KWORLD_HYBRID_330U] = { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1410 | .name = "Kworld PlusTV HD Hybrid 330", |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1411 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1412 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1413 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | be2c6db | 2008-12-09 15:43:10 -0300 | [diff] [blame] | 1414 | .mts_firmware = 1, |
| 1415 | .has_dvb = 1, |
Robert Krakora | 6e7b9ea | 2009-01-18 21:59:34 -0300 | [diff] [blame] | 1416 | .dvb_gpio = kworld_330u_digital, |
| 1417 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, |
Nicola Soranzo | a1a6ee7 | 2009-02-10 23:28:24 -0300 | [diff] [blame] | 1418 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | |
| 1419 | EM28XX_I2C_EEPROM_ON_BOARD | |
| 1420 | EM28XX_I2C_EEPROM_KEY_VALID, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1421 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1422 | .type = EM28XX_VMUX_TELEVISION, |
| 1423 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1424 | .amux = EM28XX_AMUX_VIDEO, |
Robert Krakora | 6e7b9ea | 2009-01-18 21:59:34 -0300 | [diff] [blame] | 1425 | .gpio = kworld_330u_analog, |
| 1426 | .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1427 | }, { |
| 1428 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1429 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1430 | .amux = EM28XX_AMUX_LINE_IN, |
Robert Krakora | 6e7b9ea | 2009-01-18 21:59:34 -0300 | [diff] [blame] | 1431 | .gpio = kworld_330u_analog, |
| 1432 | .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1433 | }, { |
| 1434 | .type = EM28XX_VMUX_SVIDEO, |
| 1435 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1436 | .amux = EM28XX_AMUX_LINE_IN, |
Robert Krakora | 6e7b9ea | 2009-01-18 21:59:34 -0300 | [diff] [blame] | 1437 | .gpio = kworld_330u_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1438 | } }, |
| 1439 | }, |
Mauro Carvalho Chehab | ee281b8 | 2008-07-27 16:58:04 -0300 | [diff] [blame] | 1440 | [EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU] = { |
Vitaly Wool | d360334 | 2008-07-27 14:10:11 -0300 | [diff] [blame] | 1441 | .name = "Compro VideoMate ForYou/Stereo", |
Vitaly Wool | d360334 | 2008-07-27 14:10:11 -0300 | [diff] [blame] | 1442 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 1443 | .tvaudio_addr = 0xb0, |
Vitaly Wool | d360334 | 2008-07-27 14:10:11 -0300 | [diff] [blame] | 1444 | .tda9887_conf = TDA9887_PRESENT, |
| 1445 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | df7fa09 | 2009-02-25 09:06:13 -0300 | [diff] [blame] | 1446 | .adecoder = EM28XX_TVAUDIO, |
Vitaly Wool | 2bd1d9eb | 2009-03-04 08:27:52 -0300 | [diff] [blame] | 1447 | .mute_gpio = compro_mute_gpio, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1448 | .input = { { |
Vitaly Wool | d360334 | 2008-07-27 14:10:11 -0300 | [diff] [blame] | 1449 | .type = EM28XX_VMUX_TELEVISION, |
| 1450 | .vmux = TVP5150_COMPOSITE0, |
Vitaly Wool | 2bd1d9eb | 2009-03-04 08:27:52 -0300 | [diff] [blame] | 1451 | .amux = EM28XX_AMUX_VIDEO, |
| 1452 | .gpio = compro_unmute_tv_gpio, |
Vitaly Wool | d360334 | 2008-07-27 14:10:11 -0300 | [diff] [blame] | 1453 | }, { |
| 1454 | .type = EM28XX_VMUX_SVIDEO, |
| 1455 | .vmux = TVP5150_SVIDEO, |
| 1456 | .amux = EM28XX_AMUX_LINE_IN, |
Vitaly Wool | 2bd1d9eb | 2009-03-04 08:27:52 -0300 | [diff] [blame] | 1457 | .gpio = compro_unmute_svid_gpio, |
Vitaly Wool | d360334 | 2008-07-27 14:10:11 -0300 | [diff] [blame] | 1458 | } }, |
| 1459 | }, |
Mauro Carvalho Chehab | 0bf4f6c | 2009-02-11 14:13:20 -0300 | [diff] [blame] | 1460 | [EM2860_BOARD_KAIOMY_TVNPC_U2] = { |
| 1461 | .name = "Kaiomy TVnPC U2", |
| 1462 | .vchannels = 3, |
| 1463 | .tuner_type = TUNER_XC2028, |
| 1464 | .tuner_addr = 0x61, |
| 1465 | .mts_firmware = 1, |
| 1466 | .decoder = EM28XX_TVP5150, |
| 1467 | .tuner_gpio = default_tuner_gpio, |
Mauro Carvalho Chehab | 715a223 | 2009-08-29 14:15:55 -0300 | [diff] [blame] | 1468 | .ir_codes = &ir_codes_kaiomy_table, |
Mauro Carvalho Chehab | 0bf4f6c | 2009-02-11 14:13:20 -0300 | [diff] [blame] | 1469 | .input = { { |
| 1470 | .type = EM28XX_VMUX_TELEVISION, |
| 1471 | .vmux = TVP5150_COMPOSITE0, |
| 1472 | .amux = EM28XX_AMUX_VIDEO, |
| 1473 | |
| 1474 | }, { |
| 1475 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1476 | .vmux = TVP5150_COMPOSITE1, |
| 1477 | .amux = EM28XX_AMUX_LINE_IN, |
| 1478 | }, { |
| 1479 | .type = EM28XX_VMUX_SVIDEO, |
| 1480 | .vmux = TVP5150_SVIDEO, |
| 1481 | .amux = EM28XX_AMUX_LINE_IN, |
| 1482 | } }, |
| 1483 | .radio = { |
| 1484 | .type = EM28XX_RADIO, |
| 1485 | .amux = EM28XX_AMUX_LINE_IN, |
| 1486 | } |
Mauro Carvalho Chehab | 56ee380 | 2009-02-11 14:18:36 -0300 | [diff] [blame] | 1487 | }, |
| 1488 | [EM2860_BOARD_EASYCAP] = { |
| 1489 | .name = "Easy Cap Capture DC-60", |
| 1490 | .vchannels = 2, |
| 1491 | .tuner_type = TUNER_ABSENT, |
| 1492 | .decoder = EM28XX_SAA711X, |
| 1493 | .input = { { |
| 1494 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1495 | .vmux = SAA7115_COMPOSITE0, |
| 1496 | .amux = EM28XX_AMUX_LINE_IN, |
| 1497 | }, { |
| 1498 | .type = EM28XX_VMUX_SVIDEO, |
| 1499 | .vmux = SAA7115_SVIDEO3, |
| 1500 | .amux = EM28XX_AMUX_LINE_IN, |
| 1501 | } }, |
| 1502 | }, |
Indika Katugampala | f74a61e3 | 2009-02-11 11:13:05 -0300 | [diff] [blame] | 1503 | [EM2820_BOARD_IODATA_GVMVP_SZ] = { |
| 1504 | .name = "IO-DATA GV-MVP/SZ", |
| 1505 | .tuner_type = TUNER_PHILIPS_FM1236_MK3, |
| 1506 | .tuner_gpio = default_tuner_gpio, |
| 1507 | .tda9887_conf = TDA9887_PRESENT, |
| 1508 | .decoder = EM28XX_TVP5150, |
| 1509 | .input = { { |
| 1510 | .type = EM28XX_VMUX_TELEVISION, |
| 1511 | .vmux = TVP5150_COMPOSITE0, |
| 1512 | .amux = EM28XX_AMUX_VIDEO, |
| 1513 | }, { /* Composite has not been tested yet */ |
| 1514 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1515 | .vmux = TVP5150_COMPOSITE1, |
| 1516 | .amux = EM28XX_AMUX_VIDEO, |
| 1517 | }, { /* S-video has not been tested yet */ |
| 1518 | .type = EM28XX_VMUX_SVIDEO, |
| 1519 | .vmux = TVP5150_SVIDEO, |
| 1520 | .amux = EM28XX_AMUX_VIDEO, |
| 1521 | } }, |
| 1522 | }, |
Mauro Carvalho Chehab | 4557af9 | 2009-05-23 09:58:52 -0300 | [diff] [blame] | 1523 | [EM2860_BOARD_TERRATEC_GRABBY] = { |
| 1524 | .name = "Terratec Grabby", |
| 1525 | .vchannels = 2, |
| 1526 | .tuner_type = TUNER_ABSENT, |
| 1527 | .decoder = EM28XX_SAA711X, |
| 1528 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, |
| 1529 | .input = { { |
| 1530 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1531 | .vmux = SAA7115_COMPOSITE0, |
| 1532 | .amux = EM28XX_AMUX_VIDEO2, |
| 1533 | }, { |
| 1534 | .type = EM28XX_VMUX_SVIDEO, |
| 1535 | .vmux = SAA7115_SVIDEO3, |
| 1536 | .amux = EM28XX_AMUX_VIDEO2, |
| 1537 | } }, |
| 1538 | }, |
Mauro Carvalho Chehab | 766ed64 | 2009-05-24 00:46:01 -0300 | [diff] [blame] | 1539 | [EM2860_BOARD_TERRATEC_AV350] = { |
| 1540 | .name = "Terratec AV350", |
| 1541 | .vchannels = 2, |
| 1542 | .tuner_type = TUNER_ABSENT, |
| 1543 | .decoder = EM28XX_TVP5150, |
| 1544 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, |
| 1545 | .mute_gpio = terratec_av350_mute_gpio, |
| 1546 | .input = { { |
| 1547 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1548 | .vmux = TVP5150_COMPOSITE1, |
| 1549 | .amux = EM28XX_AUDIO_SRC_LINE, |
Jean Delvare | 1df8e98 | 2009-05-13 16:48:07 -0300 | [diff] [blame] | 1550 | .gpio = terratec_av350_unmute_gpio, |
Mauro Carvalho Chehab | 766ed64 | 2009-05-24 00:46:01 -0300 | [diff] [blame] | 1551 | |
| 1552 | }, { |
| 1553 | .type = EM28XX_VMUX_SVIDEO, |
| 1554 | .vmux = TVP5150_SVIDEO, |
| 1555 | .amux = EM28XX_AUDIO_SRC_LINE, |
Jean Delvare | 1df8e98 | 2009-05-13 16:48:07 -0300 | [diff] [blame] | 1556 | .gpio = terratec_av350_unmute_gpio, |
Mauro Carvalho Chehab | 766ed64 | 2009-05-24 00:46:01 -0300 | [diff] [blame] | 1557 | } }, |
| 1558 | }, |
Devin Heitmueller | 1985922 | 2009-06-19 00:33:54 -0300 | [diff] [blame] | 1559 | [EM2882_BOARD_EVGA_INDTUBE] = { |
| 1560 | .name = "Evga inDtube", |
| 1561 | .tuner_type = TUNER_XC2028, |
| 1562 | .tuner_gpio = default_tuner_gpio, |
| 1563 | .decoder = EM28XX_TVP5150, |
Devin Heitmueller | a4c4730 | 2009-06-20 21:34:42 -0300 | [diff] [blame] | 1564 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, /* NEC IR */ |
Devin Heitmueller | 1985922 | 2009-06-19 00:33:54 -0300 | [diff] [blame] | 1565 | .mts_firmware = 1, |
| 1566 | .has_dvb = 1, |
| 1567 | .dvb_gpio = evga_indtube_digital, |
Mauro Carvalho Chehab | 715a223 | 2009-08-29 14:15:55 -0300 | [diff] [blame] | 1568 | .ir_codes = &ir_codes_evga_indtube_table, |
Devin Heitmueller | 1985922 | 2009-06-19 00:33:54 -0300 | [diff] [blame] | 1569 | .input = { { |
| 1570 | .type = EM28XX_VMUX_TELEVISION, |
| 1571 | .vmux = TVP5150_COMPOSITE0, |
| 1572 | .amux = EM28XX_AMUX_VIDEO, |
| 1573 | .gpio = evga_indtube_analog, |
| 1574 | }, { |
| 1575 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1576 | .vmux = TVP5150_COMPOSITE1, |
| 1577 | .amux = EM28XX_AMUX_LINE_IN, |
| 1578 | .gpio = evga_indtube_analog, |
| 1579 | }, { |
| 1580 | .type = EM28XX_VMUX_SVIDEO, |
| 1581 | .vmux = TVP5150_SVIDEO, |
| 1582 | .amux = EM28XX_AMUX_LINE_IN, |
| 1583 | .gpio = evga_indtube_analog, |
| 1584 | } }, |
| 1585 | }, |
Antti Palosaari | 285eb1a | 2009-09-15 14:42:13 -0300 | [diff] [blame] | 1586 | /* eb1a:2868 Empia EM2870 + Philips CU1216L NIM (Philips TDA10023 + |
| 1587 | Infineon TUA6034) */ |
| 1588 | [EM2870_BOARD_REDDO_DVB_C_USB_BOX] = { |
| 1589 | .name = "Reddo DVB-C USB TV Box", |
| 1590 | .tuner_type = TUNER_ABSENT, |
Antti Palosaari | 28f4ddd1 | 2009-10-04 12:59:35 -0300 | [diff] [blame] | 1591 | .tuner_gpio = reddo_dvb_c_usb_box, |
Antti Palosaari | 285eb1a | 2009-09-15 14:42:13 -0300 | [diff] [blame] | 1592 | .has_dvb = 1, |
Antti Palosaari | 285eb1a | 2009-09-15 14:42:13 -0300 | [diff] [blame] | 1593 | }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 1594 | }; |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 1595 | const unsigned int em28xx_bcount = ARRAY_SIZE(em28xx_boards); |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 1596 | |
| 1597 | /* table of devices that work with this driver */ |
Nicola Soranzo | a1a6ee7 | 2009-02-10 23:28:24 -0300 | [diff] [blame] | 1598 | struct usb_device_id em28xx_id_table[] = { |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1599 | { USB_DEVICE(0xeb1a, 0x2750), |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1600 | .driver_info = EM2750_BOARD_UNKNOWN }, |
| 1601 | { USB_DEVICE(0xeb1a, 0x2751), |
| 1602 | .driver_info = EM2750_BOARD_UNKNOWN }, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1603 | { USB_DEVICE(0xeb1a, 0x2800), |
| 1604 | .driver_info = EM2800_BOARD_UNKNOWN }, |
Mauro Carvalho Chehab | 9b4e845 | 2009-08-07 12:08:02 -0300 | [diff] [blame] | 1605 | { USB_DEVICE(0xeb1a, 0x2710), |
| 1606 | .driver_info = EM2820_BOARD_UNKNOWN }, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1607 | { USB_DEVICE(0xeb1a, 0x2820), |
| 1608 | .driver_info = EM2820_BOARD_UNKNOWN }, |
| 1609 | { USB_DEVICE(0xeb1a, 0x2821), |
Devin Heitmueller | c665f4d | 2008-12-16 23:35:23 -0300 | [diff] [blame] | 1610 | .driver_info = EM2820_BOARD_UNKNOWN }, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1611 | { USB_DEVICE(0xeb1a, 0x2860), |
| 1612 | .driver_info = EM2820_BOARD_UNKNOWN }, |
| 1613 | { USB_DEVICE(0xeb1a, 0x2861), |
| 1614 | .driver_info = EM2820_BOARD_UNKNOWN }, |
Devin Heitmueller | f91cb65 | 2009-09-30 22:44:19 -0300 | [diff] [blame] | 1615 | { USB_DEVICE(0xeb1a, 0x2862), |
| 1616 | .driver_info = EM2820_BOARD_UNKNOWN }, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1617 | { USB_DEVICE(0xeb1a, 0x2870), |
| 1618 | .driver_info = EM2820_BOARD_UNKNOWN }, |
| 1619 | { USB_DEVICE(0xeb1a, 0x2881), |
| 1620 | .driver_info = EM2820_BOARD_UNKNOWN }, |
| 1621 | { USB_DEVICE(0xeb1a, 0x2883), |
| 1622 | .driver_info = EM2820_BOARD_UNKNOWN }, |
Antti Palosaari | 285eb1a | 2009-09-15 14:42:13 -0300 | [diff] [blame] | 1623 | { USB_DEVICE(0xeb1a, 0x2868), |
| 1624 | .driver_info = EM2820_BOARD_UNKNOWN }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1625 | { USB_DEVICE(0xeb1a, 0xe300), |
| 1626 | .driver_info = EM2861_BOARD_KWORLD_PVRTV_300U }, |
Mauro Carvalho Chehab | 0bf4f6c | 2009-02-11 14:13:20 -0300 | [diff] [blame] | 1627 | { USB_DEVICE(0xeb1a, 0xe303), |
| 1628 | .driver_info = EM2860_BOARD_KAIOMY_TVNPC_U2 }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1629 | { USB_DEVICE(0xeb1a, 0xe305), |
| 1630 | .driver_info = EM2880_BOARD_KWORLD_DVB_305U }, |
| 1631 | { USB_DEVICE(0xeb1a, 0xe310), |
| 1632 | .driver_info = EM2880_BOARD_MSI_DIGIVOX_AD }, |
Franklin Meng | d7de5d8 | 2009-06-06 17:05:02 -0300 | [diff] [blame] | 1633 | { USB_DEVICE(0xeb1a, 0xa313), |
| 1634 | .driver_info = EM2882_BOARD_KWORLD_ATSC_315U }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1635 | { USB_DEVICE(0xeb1a, 0xa316), |
Robert Krakora | 6e7b9ea | 2009-01-18 21:59:34 -0300 | [diff] [blame] | 1636 | .driver_info = EM2883_BOARD_KWORLD_HYBRID_330U }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1637 | { USB_DEVICE(0xeb1a, 0xe320), |
| 1638 | .driver_info = EM2880_BOARD_MSI_DIGIVOX_AD_II }, |
| 1639 | { USB_DEVICE(0xeb1a, 0xe323), |
| 1640 | .driver_info = EM2882_BOARD_KWORLD_VS_DVBT }, |
| 1641 | { USB_DEVICE(0xeb1a, 0xe350), |
| 1642 | .driver_info = EM2870_BOARD_KWORLD_350U }, |
| 1643 | { USB_DEVICE(0xeb1a, 0xe355), |
| 1644 | .driver_info = EM2870_BOARD_KWORLD_355U }, |
| 1645 | { USB_DEVICE(0xeb1a, 0x2801), |
| 1646 | .driver_info = EM2800_BOARD_GRABBEEX_USB2800 }, |
| 1647 | { USB_DEVICE(0xeb1a, 0xe357), |
| 1648 | .driver_info = EM2870_BOARD_KWORLD_355U }, |
Douglas Schilling Landgraf | ac40d9e | 2009-02-25 16:55:48 -0300 | [diff] [blame] | 1649 | { USB_DEVICE(0x1b80, 0xe302), |
| 1650 | .driver_info = EM2820_BOARD_PINNACLE_DVC_90 }, /* Kaiser Baas Video to DVD maker */ |
Douglas Schilling Landgraf | ea47689 | 2009-09-06 18:41:59 -0300 | [diff] [blame] | 1651 | { USB_DEVICE(0x1b80, 0xe304), |
| 1652 | .driver_info = EM2820_BOARD_PINNACLE_DVC_90 }, /* Kworld DVD Maker 2 */ |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1653 | { USB_DEVICE(0x0ccd, 0x0036), |
| 1654 | .driver_info = EM2820_BOARD_TERRATEC_CINERGY_250 }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1655 | { USB_DEVICE(0x0ccd, 0x004c), |
| 1656 | .driver_info = EM2880_BOARD_TERRATEC_HYBRID_XS_FR }, |
| 1657 | { USB_DEVICE(0x0ccd, 0x004f), |
| 1658 | .driver_info = EM2860_BOARD_TERRATEC_HYBRID_XS }, |
| 1659 | { USB_DEVICE(0x0ccd, 0x005e), |
| 1660 | .driver_info = EM2882_BOARD_TERRATEC_HYBRID_XS }, |
| 1661 | { USB_DEVICE(0x0ccd, 0x0042), |
| 1662 | .driver_info = EM2880_BOARD_TERRATEC_HYBRID_XS }, |
| 1663 | { USB_DEVICE(0x0ccd, 0x0043), |
| 1664 | .driver_info = EM2870_BOARD_TERRATEC_XS }, |
| 1665 | { USB_DEVICE(0x0ccd, 0x0047), |
| 1666 | .driver_info = EM2880_BOARD_TERRATEC_PRODIGY_XS }, |
Mauro Carvalho Chehab | 766ed64 | 2009-05-24 00:46:01 -0300 | [diff] [blame] | 1667 | { USB_DEVICE(0x0ccd, 0x0084), |
| 1668 | .driver_info = EM2860_BOARD_TERRATEC_AV350 }, |
Mauro Carvalho Chehab | 4557af9 | 2009-05-23 09:58:52 -0300 | [diff] [blame] | 1669 | { USB_DEVICE(0x0ccd, 0x0096), |
| 1670 | .driver_info = EM2860_BOARD_TERRATEC_GRABBY }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1671 | { USB_DEVICE(0x185b, 0x2870), |
| 1672 | .driver_info = EM2870_BOARD_COMPRO_VIDEOMATE }, |
Vitaly Wool | d360334 | 2008-07-27 14:10:11 -0300 | [diff] [blame] | 1673 | { USB_DEVICE(0x185b, 0x2041), |
Mauro Carvalho Chehab | ee281b8 | 2008-07-27 16:58:04 -0300 | [diff] [blame] | 1674 | .driver_info = EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU }, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1675 | { USB_DEVICE(0x2040, 0x4200), |
| 1676 | .driver_info = EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 }, |
Mauro Carvalho Chehab | 15b9bec | 2008-01-13 12:02:20 -0300 | [diff] [blame] | 1677 | { USB_DEVICE(0x2040, 0x4201), |
| 1678 | .driver_info = EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 }, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1679 | { USB_DEVICE(0x2040, 0x6500), |
| 1680 | .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900 }, |
Luc Saillard | 427d20c | 2008-01-30 17:23:00 -0300 | [diff] [blame] | 1681 | { USB_DEVICE(0x2040, 0x6502), |
Devin Heitmueller | 17d9d55 | 2008-06-08 10:22:03 -0300 | [diff] [blame] | 1682 | .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2 }, |
Michael Krufky | 74ee051 | 2008-05-01 18:02:30 -0300 | [diff] [blame] | 1683 | { USB_DEVICE(0x2040, 0x6513), /* HCW HVR-980 */ |
Mauro Carvalho Chehab | 10ac660 | 2008-07-27 14:58:58 -0300 | [diff] [blame] | 1684 | .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 }, |
Michael Krufky | 74ee051 | 2008-05-01 18:02:30 -0300 | [diff] [blame] | 1685 | { USB_DEVICE(0x2040, 0x6517), /* HP HVR-950 */ |
Mauro Carvalho Chehab | 10ac660 | 2008-07-27 14:58:58 -0300 | [diff] [blame] | 1686 | .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 }, |
Michael Krufky | 74ee051 | 2008-05-01 18:02:30 -0300 | [diff] [blame] | 1687 | { USB_DEVICE(0x2040, 0x651b), /* RP HVR-950 */ |
Mauro Carvalho Chehab | 10ac660 | 2008-07-27 14:58:58 -0300 | [diff] [blame] | 1688 | .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 }, |
Douglas Schilling Landgraf | f89bc32 | 2008-12-01 21:01:04 -0300 | [diff] [blame] | 1689 | { USB_DEVICE(0x2040, 0x651f), |
| 1690 | .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850 }, |
Devin Heitmueller | e14b365 | 2008-07-26 11:04:33 -0300 | [diff] [blame] | 1691 | { USB_DEVICE(0x0438, 0xb002), |
| 1692 | .driver_info = EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600 }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1693 | { USB_DEVICE(0x2001, 0xf112), |
| 1694 | .driver_info = EM2820_BOARD_DLINK_USB_TV }, |
| 1695 | { USB_DEVICE(0x2304, 0x0207), |
| 1696 | .driver_info = EM2820_BOARD_PINNACLE_DVC_90 }, |
| 1697 | { USB_DEVICE(0x2304, 0x0208), |
| 1698 | .driver_info = EM2820_BOARD_PINNACLE_USB_2 }, |
| 1699 | { USB_DEVICE(0x2304, 0x021a), |
| 1700 | .driver_info = EM2820_BOARD_PINNACLE_DVC_90 }, |
| 1701 | { USB_DEVICE(0x2304, 0x0226), |
| 1702 | .driver_info = EM2882_BOARD_PINNACLE_HYBRID_PRO }, |
| 1703 | { USB_DEVICE(0x2304, 0x0227), |
| 1704 | .driver_info = EM2880_BOARD_PINNACLE_PCTV_HD_PRO }, |
| 1705 | { USB_DEVICE(0x0413, 0x6023), |
| 1706 | .driver_info = EM2800_BOARD_LEADTEK_WINFAST_USBII }, |
| 1707 | { USB_DEVICE(0x093b, 0xa005), |
| 1708 | .driver_info = EM2861_BOARD_PLEXTOR_PX_TV100U }, |
Indika Katugampala | f74a61e3 | 2009-02-11 11:13:05 -0300 | [diff] [blame] | 1709 | { USB_DEVICE(0x04bb, 0x0515), |
| 1710 | .driver_info = EM2820_BOARD_IODATA_GVMVP_SZ }, |
Zhenyu Wang | 7c8b567 | 2009-07-05 10:51:21 -0300 | [diff] [blame] | 1711 | { USB_DEVICE(0xeb1a, 0x50a6), |
| 1712 | .driver_info = EM2860_BOARD_GADMEI_UTV330 }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 1713 | { }, |
| 1714 | }; |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1715 | MODULE_DEVICE_TABLE(usb, em28xx_id_table); |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 1716 | |
Mauro Carvalho Chehab | 102a0b0 | 2008-04-17 21:40:45 -0300 | [diff] [blame] | 1717 | /* |
Mauro Carvalho Chehab | 102a0b0 | 2008-04-17 21:40:45 -0300 | [diff] [blame] | 1718 | * EEPROM hash table for devices with generic USB IDs |
| 1719 | */ |
Nicola Soranzo | a1a6ee7 | 2009-02-10 23:28:24 -0300 | [diff] [blame] | 1720 | static struct em28xx_hash_table em28xx_eeprom_hash[] = { |
Mauro Carvalho Chehab | ea4fd56 | 2007-11-03 21:21:57 -0300 | [diff] [blame] | 1721 | /* P/N: SA 60002070465 Tuner: TVF7533-MF */ |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1722 | {0x6ce05a8f, EM2820_BOARD_PROLINK_PLAYTV_USB2, TUNER_YMEC_TVF_5533MF}, |
Douglas Schilling Landgraf | 1e1addd | 2008-12-27 21:38:14 -0300 | [diff] [blame] | 1723 | {0x72cc5a8b, EM2820_BOARD_PROLINK_PLAYTV_BOX4_USB2, TUNER_YMEC_TVF_5533MF}, |
Darron Broad | da3808e | 2008-09-30 02:46:41 -0300 | [diff] [blame] | 1724 | {0x966a0441, EM2880_BOARD_KWORLD_DVB_310U, TUNER_XC2028}, |
Douglas Schilling Landgraf | a35c87c | 2009-08-06 12:52:11 -0300 | [diff] [blame] | 1725 | {0x166a0441, EM2880_BOARD_EMPIRE_DUAL_TV, TUNER_XC2028}, |
Devin Heitmueller | 1985922 | 2009-06-19 00:33:54 -0300 | [diff] [blame] | 1726 | {0xcee44a99, EM2882_BOARD_EVGA_INDTUBE, TUNER_XC2028}, |
Devin Heitmueller | d5b3ba9 | 2009-07-08 21:51:35 -0300 | [diff] [blame] | 1727 | {0xb8846b20, EM2881_BOARD_PINNACLE_HYBRID_PRO, TUNER_XC2028}, |
Antti Palosaari | 285eb1a | 2009-09-15 14:42:13 -0300 | [diff] [blame] | 1728 | {0x63f653bd, EM2870_BOARD_REDDO_DVB_C_USB_BOX, TUNER_ABSENT}, |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 1729 | }; |
| 1730 | |
Mauro Carvalho Chehab | d2ba055 | 2007-11-04 08:32:42 -0300 | [diff] [blame] | 1731 | /* I2C devicelist hash table for devices with generic USB IDs */ |
Sascha Sommer | fad7b95 | 2007-11-04 08:06:48 -0300 | [diff] [blame] | 1732 | static struct em28xx_hash_table em28xx_i2c_hash[] = { |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1733 | {0xb06a32c3, EM2800_BOARD_TERRATEC_CINERGY_200, TUNER_LG_PAL_NEW_TAPC}, |
| 1734 | {0xf51200e3, EM2800_BOARD_VGEAR_POCKETTV, TUNER_LG_PAL_NEW_TAPC}, |
Devin Heitmueller | 3ed58ba | 2009-05-27 23:27:26 -0300 | [diff] [blame] | 1735 | {0x1ba50080, EM2860_BOARD_SAA711X_REFERENCE_DESIGN, TUNER_ABSENT}, |
Douglas Schilling Landgraf | f7fe3e6 | 2009-01-19 09:31:55 -0300 | [diff] [blame] | 1736 | {0xc51200e3, EM2820_BOARD_GADMEI_TVR200, TUNER_LG_PAL_NEW_TAPC}, |
Mauro Carvalho Chehab | 6d888a6 | 2009-08-30 13:05:56 -0300 | [diff] [blame] | 1737 | {0x4ba50080, EM2861_BOARD_GADMEI_UTV330PLUS, TUNER_TNF_5335MF}, |
Sascha Sommer | fad7b95 | 2007-11-04 08:06:48 -0300 | [diff] [blame] | 1738 | }; |
| 1739 | |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 1740 | /* I2C possible address to saa7115, tvp5150, msp3400, tvaudio */ |
| 1741 | static unsigned short saa711x_addrs[] = { |
| 1742 | 0x4a >> 1, 0x48 >> 1, /* SAA7111, SAA7111A and SAA7113 */ |
| 1743 | 0x42 >> 1, 0x40 >> 1, /* SAA7114, SAA7115 and SAA7118 */ |
| 1744 | I2C_CLIENT_END }; |
| 1745 | |
| 1746 | static unsigned short tvp5150_addrs[] = { |
| 1747 | 0xb8 >> 1, |
| 1748 | 0xba >> 1, |
| 1749 | I2C_CLIENT_END |
| 1750 | }; |
| 1751 | |
Mauro Carvalho Chehab | 02e7804 | 2009-06-29 11:35:05 -0300 | [diff] [blame] | 1752 | static unsigned short mt9v011_addrs[] = { |
| 1753 | 0xba >> 1, |
| 1754 | I2C_CLIENT_END |
| 1755 | }; |
| 1756 | |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 1757 | static unsigned short msp3400_addrs[] = { |
| 1758 | 0x80 >> 1, |
| 1759 | 0x88 >> 1, |
| 1760 | I2C_CLIENT_END |
| 1761 | }; |
| 1762 | |
Michael Krufky | d7cba04 | 2008-09-12 13:31:45 -0300 | [diff] [blame] | 1763 | int em28xx_tuner_callback(void *ptr, int component, int command, int arg) |
Mauro Carvalho Chehab | ee6e3a8 | 2008-04-17 21:37:31 -0300 | [diff] [blame] | 1764 | { |
Mauro Carvalho Chehab | 102a0b0 | 2008-04-17 21:40:45 -0300 | [diff] [blame] | 1765 | int rc = 0; |
Mauro Carvalho Chehab | ee6e3a8 | 2008-04-17 21:37:31 -0300 | [diff] [blame] | 1766 | struct em28xx *dev = ptr; |
Mauro Carvalho Chehab | ee6e3a8 | 2008-04-17 21:37:31 -0300 | [diff] [blame] | 1767 | |
| 1768 | if (dev->tuner_type != TUNER_XC2028) |
| 1769 | return 0; |
| 1770 | |
| 1771 | if (command != XC2028_TUNER_RESET) |
| 1772 | return 0; |
| 1773 | |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1774 | rc = em28xx_gpio_set(dev, dev->board.tuner_gpio); |
Mauro Carvalho Chehab | ee6e3a8 | 2008-04-17 21:37:31 -0300 | [diff] [blame] | 1775 | |
Mauro Carvalho Chehab | ee6e3a8 | 2008-04-17 21:37:31 -0300 | [diff] [blame] | 1776 | return rc; |
| 1777 | } |
| 1778 | EXPORT_SYMBOL_GPL(em28xx_tuner_callback); |
| 1779 | |
Nicola Soranzo | a1a6ee7 | 2009-02-10 23:28:24 -0300 | [diff] [blame] | 1780 | static inline void em28xx_set_model(struct em28xx *dev) |
Mauro Carvalho Chehab | ee6e3a8 | 2008-04-17 21:37:31 -0300 | [diff] [blame] | 1781 | { |
Mauro Carvalho Chehab | 505b6d0 | 2008-11-25 09:39:50 -0300 | [diff] [blame] | 1782 | memcpy(&dev->board, &em28xx_boards[dev->model], sizeof(dev->board)); |
Devin Heitmueller | ed14e1c | 2008-12-29 22:27:30 -0300 | [diff] [blame] | 1783 | |
| 1784 | /* Those are the default values for the majority of boards |
| 1785 | Use those values if not specified otherwise at boards entry |
| 1786 | */ |
| 1787 | if (!dev->board.xclk) |
| 1788 | dev->board.xclk = EM28XX_XCLK_IR_RC5_MODE | |
| 1789 | EM28XX_XCLK_FREQUENCY_12MHZ; |
| 1790 | |
| 1791 | if (!dev->board.i2c_speed) |
| 1792 | dev->board.i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | |
| 1793 | EM28XX_I2C_FREQ_100_KHZ; |
Mauro Carvalho Chehab | ee6e3a8 | 2008-04-17 21:37:31 -0300 | [diff] [blame] | 1794 | } |
| 1795 | |
Mauro Carvalho Chehab | f2e26ae | 2009-08-12 20:21:44 -0300 | [diff] [blame] | 1796 | |
| 1797 | /* FIXME: Should be replaced by a proper mt9m111 driver */ |
| 1798 | static int em28xx_initialize_mt9m111(struct em28xx *dev) |
| 1799 | { |
| 1800 | int i; |
| 1801 | unsigned char regs[][3] = { |
| 1802 | { 0x0d, 0x00, 0x01, }, /* reset and use defaults */ |
| 1803 | { 0x0d, 0x00, 0x00, }, |
| 1804 | { 0x0a, 0x00, 0x21, }, |
| 1805 | { 0x21, 0x04, 0x00, }, /* full readout speed, no row/col skipping */ |
| 1806 | }; |
| 1807 | |
| 1808 | for (i = 0; i < ARRAY_SIZE(regs); i++) |
| 1809 | i2c_master_send(&dev->i2c_client, ®s[i][0], 3); |
| 1810 | |
| 1811 | return 0; |
| 1812 | } |
| 1813 | |
| 1814 | |
Mauro Carvalho Chehab | b80fd2d | 2009-07-14 21:08:22 -0300 | [diff] [blame] | 1815 | /* FIXME: Should be replaced by a proper mt9m001 driver */ |
| 1816 | static int em28xx_initialize_mt9m001(struct em28xx *dev) |
| 1817 | { |
| 1818 | int i; |
| 1819 | unsigned char regs[][3] = { |
| 1820 | { 0x0d, 0x00, 0x01, }, |
| 1821 | { 0x0d, 0x00, 0x00, }, |
| 1822 | { 0x04, 0x05, 0x00, }, /* hres = 1280 */ |
| 1823 | { 0x03, 0x04, 0x00, }, /* vres = 1024 */ |
| 1824 | { 0x20, 0x11, 0x00, }, |
| 1825 | { 0x06, 0x00, 0x10, }, |
| 1826 | { 0x2b, 0x00, 0x24, }, |
| 1827 | { 0x2e, 0x00, 0x24, }, |
| 1828 | { 0x35, 0x00, 0x24, }, |
| 1829 | { 0x2d, 0x00, 0x20, }, |
| 1830 | { 0x2c, 0x00, 0x20, }, |
| 1831 | { 0x09, 0x0a, 0xd4, }, |
| 1832 | { 0x35, 0x00, 0x57, }, |
| 1833 | }; |
| 1834 | |
| 1835 | for (i = 0; i < ARRAY_SIZE(regs); i++) |
| 1836 | i2c_master_send(&dev->i2c_client, ®s[i][0], 3); |
| 1837 | |
| 1838 | return 0; |
| 1839 | } |
| 1840 | |
Mauro Carvalho Chehab | 791a08f | 2009-07-03 15:36:18 -0300 | [diff] [blame] | 1841 | /* HINT method: webcam I2C chips |
| 1842 | * |
Mauro Carvalho Chehab | f2e26ae | 2009-08-12 20:21:44 -0300 | [diff] [blame] | 1843 | * This method works for webcams with Micron sensors |
Mauro Carvalho Chehab | 791a08f | 2009-07-03 15:36:18 -0300 | [diff] [blame] | 1844 | */ |
| 1845 | static int em28xx_hint_sensor(struct em28xx *dev) |
| 1846 | { |
| 1847 | int rc; |
| 1848 | char *sensor_name; |
| 1849 | unsigned char cmd; |
| 1850 | __be16 version_be; |
| 1851 | u16 version; |
| 1852 | |
Mauro Carvalho Chehab | 3d3215c | 2009-08-10 10:29:27 -0300 | [diff] [blame] | 1853 | /* Micron sensor detection */ |
Mauro Carvalho Chehab | 791a08f | 2009-07-03 15:36:18 -0300 | [diff] [blame] | 1854 | dev->i2c_client.addr = 0xba >> 1; |
| 1855 | cmd = 0; |
| 1856 | i2c_master_send(&dev->i2c_client, &cmd, 1); |
| 1857 | rc = i2c_master_recv(&dev->i2c_client, (char *)&version_be, 2); |
| 1858 | if (rc != 2) |
| 1859 | return -EINVAL; |
| 1860 | |
| 1861 | version = be16_to_cpu(version_be); |
Mauro Carvalho Chehab | 791a08f | 2009-07-03 15:36:18 -0300 | [diff] [blame] | 1862 | switch (version) { |
Mauro Carvalho Chehab | 296544e | 2009-07-27 08:24:29 -0300 | [diff] [blame] | 1863 | case 0x8232: /* mt9v011 640x480 1.3 Mpix sensor */ |
| 1864 | case 0x8243: /* mt9v011 rev B 640x480 1.3 Mpix sensor */ |
Mauro Carvalho Chehab | 791a08f | 2009-07-03 15:36:18 -0300 | [diff] [blame] | 1865 | dev->model = EM2820_BOARD_SILVERCREST_WEBCAM; |
Mauro Carvalho Chehab | 3d3215c | 2009-08-10 10:29:27 -0300 | [diff] [blame] | 1866 | em28xx_set_model(dev); |
| 1867 | |
Mauro Carvalho Chehab | 791a08f | 2009-07-03 15:36:18 -0300 | [diff] [blame] | 1868 | sensor_name = "mt9v011"; |
Mauro Carvalho Chehab | 527f09a | 2009-07-12 11:04:15 -0300 | [diff] [blame] | 1869 | dev->em28xx_sensor = EM28XX_MT9V011; |
Mauro Carvalho Chehab | 5569996 | 2009-07-13 20:15:02 -0300 | [diff] [blame] | 1870 | dev->sensor_xres = 640; |
| 1871 | dev->sensor_yres = 480; |
Mauro Carvalho Chehab | 3d3215c | 2009-08-10 10:29:27 -0300 | [diff] [blame] | 1872 | /* |
| 1873 | * FIXME: mt9v011 uses I2S speed as xtal clk - at least with |
| 1874 | * the Silvercrest cam I have here for testing - for higher |
| 1875 | * resolutions, a high clock cause horizontal artifacts, so we |
| 1876 | * need to use a lower xclk frequency. |
| 1877 | * Yet, it would be possible to adjust xclk depending on the |
| 1878 | * desired resolution, since this affects directly the |
| 1879 | * frame rate. |
| 1880 | */ |
| 1881 | dev->board.xclk = EM28XX_XCLK_FREQUENCY_4_3MHZ; |
| 1882 | dev->sensor_xtal = 4300000; |
Mauro Carvalho Chehab | 579d315 | 2009-07-14 12:33:25 -0300 | [diff] [blame] | 1883 | |
| 1884 | /* probably means GRGB 16 bit bayer */ |
| 1885 | dev->vinmode = 0x0d; |
| 1886 | dev->vinctl = 0x00; |
| 1887 | |
Mauro Carvalho Chehab | 791a08f | 2009-07-03 15:36:18 -0300 | [diff] [blame] | 1888 | break; |
Mauro Carvalho Chehab | f2e26ae | 2009-08-12 20:21:44 -0300 | [diff] [blame] | 1889 | |
| 1890 | case 0x143a: /* MT9M111 as found in the ECS G200 */ |
| 1891 | dev->model = EM2750_BOARD_UNKNOWN; |
| 1892 | em28xx_set_model(dev); |
| 1893 | |
| 1894 | sensor_name = "mt9m111"; |
| 1895 | dev->board.xclk = EM28XX_XCLK_FREQUENCY_48MHZ; |
| 1896 | dev->em28xx_sensor = EM28XX_MT9M111; |
| 1897 | em28xx_initialize_mt9m111(dev); |
| 1898 | dev->sensor_xres = 640; |
| 1899 | dev->sensor_yres = 512; |
| 1900 | |
| 1901 | dev->vinmode = 0x0a; |
| 1902 | dev->vinctl = 0x00; |
| 1903 | |
| 1904 | break; |
| 1905 | |
Mauro Carvalho Chehab | b80fd2d | 2009-07-14 21:08:22 -0300 | [diff] [blame] | 1906 | case 0x8431: |
| 1907 | dev->model = EM2750_BOARD_UNKNOWN; |
Mauro Carvalho Chehab | 3d3215c | 2009-08-10 10:29:27 -0300 | [diff] [blame] | 1908 | em28xx_set_model(dev); |
| 1909 | |
Mauro Carvalho Chehab | b80fd2d | 2009-07-14 21:08:22 -0300 | [diff] [blame] | 1910 | sensor_name = "mt9m001"; |
| 1911 | dev->em28xx_sensor = EM28XX_MT9M001; |
| 1912 | em28xx_initialize_mt9m001(dev); |
| 1913 | dev->sensor_xres = 1280; |
| 1914 | dev->sensor_yres = 1024; |
| 1915 | |
| 1916 | /* probably means BGGR 16 bit bayer */ |
| 1917 | dev->vinmode = 0x0c; |
| 1918 | dev->vinctl = 0x00; |
| 1919 | |
| 1920 | break; |
Mauro Carvalho Chehab | 791a08f | 2009-07-03 15:36:18 -0300 | [diff] [blame] | 1921 | default: |
Mauro Carvalho Chehab | f2e26ae | 2009-08-12 20:21:44 -0300 | [diff] [blame] | 1922 | printk("Unknown Micron Sensor 0x%04x\n", version); |
Mauro Carvalho Chehab | 791a08f | 2009-07-03 15:36:18 -0300 | [diff] [blame] | 1923 | return -EINVAL; |
| 1924 | } |
| 1925 | |
Mauro Carvalho Chehab | 3d3215c | 2009-08-10 10:29:27 -0300 | [diff] [blame] | 1926 | /* Setup webcam defaults */ |
| 1927 | em28xx_pre_card_setup(dev); |
| 1928 | |
Mauro Carvalho Chehab | 8b22079 | 2009-07-12 10:56:21 -0300 | [diff] [blame] | 1929 | em28xx_errdev("Sensor is %s, using model %s entry.\n", |
Mauro Carvalho Chehab | 791a08f | 2009-07-03 15:36:18 -0300 | [diff] [blame] | 1930 | sensor_name, em28xx_boards[dev->model].name); |
| 1931 | |
| 1932 | return 0; |
| 1933 | } |
| 1934 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 1935 | /* Since em28xx_pre_card_setup() requires a proper dev->model, |
| 1936 | * this won't work for boards with generic PCI IDs |
| 1937 | */ |
Markus Rechberger | a94e95b | 2006-01-23 17:11:10 -0200 | [diff] [blame] | 1938 | void em28xx_pre_card_setup(struct em28xx *dev) |
| 1939 | { |
Devin Heitmueller | ed14e1c | 2008-12-29 22:27:30 -0300 | [diff] [blame] | 1940 | /* Set the initial XCLK and I2C clock values based on the board |
| 1941 | definition */ |
Mauro Carvalho Chehab | 505b6d0 | 2008-11-25 09:39:50 -0300 | [diff] [blame] | 1942 | em28xx_write_reg(dev, EM28XX_R0F_XCLK, dev->board.xclk & 0x7f); |
| 1943 | em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, dev->board.i2c_speed); |
Mauro Carvalho Chehab | a2070c6 | 2008-11-25 07:05:06 -0300 | [diff] [blame] | 1944 | msleep(50); |
| 1945 | |
Markus Rechberger | a94e95b | 2006-01-23 17:11:10 -0200 | [diff] [blame] | 1946 | /* request some modules */ |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1947 | switch (dev->model) { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1948 | case EM2861_BOARD_PLEXTOR_PX_TV100U: |
Mauro Carvalho Chehab | 0a6e44d | 2009-07-29 01:39:12 -0300 | [diff] [blame] | 1949 | /* Sets the msp34xx I2S speed */ |
| 1950 | dev->i2s_speed = 2048000; |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1951 | break; |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1952 | case EM2861_BOARD_KWORLD_PVRTV_300U: |
| 1953 | case EM2880_BOARD_KWORLD_DVB_305U: |
Devin Heitmueller | 6d676d8 | 2008-11-25 06:04:02 -0300 | [diff] [blame] | 1954 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0x6d); |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1955 | msleep(10); |
Devin Heitmueller | 6d676d8 | 2008-11-25 06:04:02 -0300 | [diff] [blame] | 1956 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0x7d); |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1957 | msleep(10); |
| 1958 | break; |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1959 | case EM2870_BOARD_COMPRO_VIDEOMATE: |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1960 | /* TODO: someone can do some cleanup here... |
| 1961 | not everything's needed */ |
Devin Heitmueller | 6d676d8 | 2008-11-25 06:04:02 -0300 | [diff] [blame] | 1962 | em28xx_write_reg(dev, EM2880_R04_GPO, 0x00); |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1963 | msleep(10); |
Devin Heitmueller | 6d676d8 | 2008-11-25 06:04:02 -0300 | [diff] [blame] | 1964 | em28xx_write_reg(dev, EM2880_R04_GPO, 0x01); |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1965 | msleep(10); |
Devin Heitmueller | 6d676d8 | 2008-11-25 06:04:02 -0300 | [diff] [blame] | 1966 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfd); |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1967 | mdelay(70); |
Devin Heitmueller | 6d676d8 | 2008-11-25 06:04:02 -0300 | [diff] [blame] | 1968 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfc); |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1969 | mdelay(70); |
Devin Heitmueller | 6d676d8 | 2008-11-25 06:04:02 -0300 | [diff] [blame] | 1970 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xdc); |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1971 | mdelay(70); |
Devin Heitmueller | 6d676d8 | 2008-11-25 06:04:02 -0300 | [diff] [blame] | 1972 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfc); |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1973 | mdelay(70); |
| 1974 | break; |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1975 | case EM2870_BOARD_TERRATEC_XS_MT2060: |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1976 | /* this device needs some gpio writes to get the DVB-T |
| 1977 | demod work */ |
Devin Heitmueller | 6d676d8 | 2008-11-25 06:04:02 -0300 | [diff] [blame] | 1978 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfe); |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1979 | mdelay(70); |
Devin Heitmueller | 6d676d8 | 2008-11-25 06:04:02 -0300 | [diff] [blame] | 1980 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xde); |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1981 | mdelay(70); |
Devin Heitmueller | 6d676d8 | 2008-11-25 06:04:02 -0300 | [diff] [blame] | 1982 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfe); |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1983 | mdelay(70); |
| 1984 | break; |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1985 | case EM2870_BOARD_PINNACLE_PCTV_DVB: |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1986 | /* this device needs some gpio writes to get the |
| 1987 | DVB-T demod work */ |
Devin Heitmueller | 6d676d8 | 2008-11-25 06:04:02 -0300 | [diff] [blame] | 1988 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfe); |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1989 | mdelay(70); |
Devin Heitmueller | 6d676d8 | 2008-11-25 06:04:02 -0300 | [diff] [blame] | 1990 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xde); |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1991 | mdelay(70); |
Devin Heitmueller | 6d676d8 | 2008-11-25 06:04:02 -0300 | [diff] [blame] | 1992 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfe); |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1993 | mdelay(70); |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1994 | break; |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1995 | case EM2820_BOARD_GADMEI_UTV310: |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1996 | case EM2820_BOARD_MSI_VOX_USB_2: |
Mauro Carvalho Chehab | a2070c6 | 2008-11-25 07:05:06 -0300 | [diff] [blame] | 1997 | /* enables audio for that devices */ |
Devin Heitmueller | 6d676d8 | 2008-11-25 06:04:02 -0300 | [diff] [blame] | 1998 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfd); |
Mauro Carvalho Chehab | 102a0b0 | 2008-04-17 21:40:45 -0300 | [diff] [blame] | 1999 | break; |
Mauro Carvalho Chehab | 0bf4f6c | 2009-02-11 14:13:20 -0300 | [diff] [blame] | 2000 | |
Franklin Meng | d7de5d8 | 2009-06-06 17:05:02 -0300 | [diff] [blame] | 2001 | case EM2882_BOARD_KWORLD_ATSC_315U: |
| 2002 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xff); |
| 2003 | msleep(10); |
| 2004 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfe); |
| 2005 | msleep(10); |
| 2006 | em28xx_write_reg(dev, EM2880_R04_GPO, 0x00); |
| 2007 | msleep(10); |
| 2008 | em28xx_write_reg(dev, EM2880_R04_GPO, 0x08); |
| 2009 | msleep(10); |
| 2010 | break; |
| 2011 | |
Mauro Carvalho Chehab | 0bf4f6c | 2009-02-11 14:13:20 -0300 | [diff] [blame] | 2012 | case EM2860_BOARD_KAIOMY_TVNPC_U2: |
| 2013 | em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x07", 1); |
| 2014 | em28xx_write_regs(dev, EM28XX_R06_I2C_CLK, "\x40", 1); |
| 2015 | em28xx_write_regs(dev, 0x0d, "\x42", 1); |
| 2016 | em28xx_write_regs(dev, 0x08, "\xfd", 1); |
| 2017 | msleep(10); |
| 2018 | em28xx_write_regs(dev, 0x08, "\xff", 1); |
| 2019 | msleep(10); |
| 2020 | em28xx_write_regs(dev, 0x08, "\x7f", 1); |
| 2021 | msleep(10); |
| 2022 | em28xx_write_regs(dev, 0x08, "\x6b", 1); |
| 2023 | |
| 2024 | break; |
Mauro Carvalho Chehab | 56ee380 | 2009-02-11 14:18:36 -0300 | [diff] [blame] | 2025 | case EM2860_BOARD_EASYCAP: |
| 2026 | em28xx_write_regs(dev, 0x08, "\xf8", 1); |
| 2027 | break; |
| 2028 | |
Indika Katugampala | f74a61e3 | 2009-02-11 11:13:05 -0300 | [diff] [blame] | 2029 | case EM2820_BOARD_IODATA_GVMVP_SZ: |
| 2030 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xff); |
| 2031 | msleep(70); |
| 2032 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xf7); |
| 2033 | msleep(10); |
| 2034 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfe); |
| 2035 | msleep(70); |
| 2036 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfd); |
| 2037 | msleep(70); |
| 2038 | break; |
Mauro Carvalho Chehab | 102a0b0 | 2008-04-17 21:40:45 -0300 | [diff] [blame] | 2039 | } |
Mauro Carvalho Chehab | c67ec53 | 2008-04-17 21:48:00 -0300 | [diff] [blame] | 2040 | |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 2041 | em28xx_gpio_set(dev, dev->board.tuner_gpio); |
Mauro Carvalho Chehab | c67ec53 | 2008-04-17 21:48:00 -0300 | [diff] [blame] | 2042 | em28xx_set_mode(dev, EM28XX_ANALOG_MODE); |
| 2043 | |
| 2044 | /* Unlock device */ |
Mauro Carvalho Chehab | 2fe3e2e | 2008-11-27 09:10:40 -0300 | [diff] [blame] | 2045 | em28xx_set_mode(dev, EM28XX_SUSPEND); |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2046 | } |
| 2047 | |
Mauro Carvalho Chehab | e54318e | 2008-04-18 18:34:31 -0300 | [diff] [blame] | 2048 | static void em28xx_setup_xc3028(struct em28xx *dev, struct xc2028_ctrl *ctl) |
Mauro Carvalho Chehab | 3ca9c09 | 2008-04-17 21:37:53 -0300 | [diff] [blame] | 2049 | { |
| 2050 | memset(ctl, 0, sizeof(*ctl)); |
| 2051 | |
| 2052 | ctl->fname = XC2028_DEFAULT_FIRMWARE; |
| 2053 | ctl->max_len = 64; |
| 2054 | ctl->mts = em28xx_boards[dev->model].mts_firmware; |
| 2055 | |
| 2056 | switch (dev->model) { |
Douglas Schilling Landgraf | e5db5d4 | 2009-04-09 18:24:34 -0300 | [diff] [blame] | 2057 | case EM2880_BOARD_EMPIRE_DUAL_TV: |
Mauro Carvalho Chehab | e77ebda | 2008-04-18 18:37:25 -0300 | [diff] [blame] | 2058 | case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900: |
Uroš Vampl | ec994d0 | 2009-09-30 22:53:37 -0300 | [diff] [blame] | 2059 | case EM2882_BOARD_TERRATEC_HYBRID_XS: |
Mauro Carvalho Chehab | e77ebda | 2008-04-18 18:37:25 -0300 | [diff] [blame] | 2060 | ctl->demod = XC3028_FE_ZARLINK456; |
| 2061 | break; |
reinhard schwab | 655b840 | 2008-07-26 10:47:00 -0300 | [diff] [blame] | 2062 | case EM2880_BOARD_TERRATEC_HYBRID_XS: |
Devin Heitmueller | e16e5a3 | 2009-07-15 00:37:22 -0300 | [diff] [blame] | 2063 | case EM2881_BOARD_PINNACLE_HYBRID_PRO: |
reinhard schwab | 655b840 | 2008-07-26 10:47:00 -0300 | [diff] [blame] | 2064 | ctl->demod = XC3028_FE_ZARLINK456; |
| 2065 | break; |
Devin Heitmueller | 17d9d55 | 2008-06-08 10:22:03 -0300 | [diff] [blame] | 2066 | case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2: |
| 2067 | /* djh - Not sure which demod we need here */ |
| 2068 | ctl->demod = XC3028_FE_DEFAULT; |
| 2069 | break; |
Devin Heitmueller | 5ea7fe4 | 2008-09-16 02:02:12 -0300 | [diff] [blame] | 2070 | case EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600: |
| 2071 | ctl->demod = XC3028_FE_DEFAULT; |
| 2072 | ctl->fname = XC3028L_DEFAULT_FIRMWARE; |
| 2073 | break; |
Douglas Schilling Landgraf | f89bc32 | 2008-12-01 21:01:04 -0300 | [diff] [blame] | 2074 | case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850: |
Mauro Carvalho Chehab | 10ac660 | 2008-07-27 14:58:58 -0300 | [diff] [blame] | 2075 | case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950: |
Devin Heitmueller | 4fd305b | 2008-06-04 13:43:46 -0300 | [diff] [blame] | 2076 | case EM2880_BOARD_PINNACLE_PCTV_HD_PRO: |
Mauro Carvalho Chehab | e77ebda | 2008-04-18 18:37:25 -0300 | [diff] [blame] | 2077 | /* FIXME: Better to specify the needed IF */ |
Devin Heitmueller | bdfbf95 | 2008-04-17 21:38:27 -0300 | [diff] [blame] | 2078 | ctl->demod = XC3028_FE_DEFAULT; |
| 2079 | break; |
Robert Krakora | 6e7b9ea | 2009-01-18 21:59:34 -0300 | [diff] [blame] | 2080 | case EM2883_BOARD_KWORLD_HYBRID_330U: |
| 2081 | ctl->demod = XC3028_FE_CHINA; |
| 2082 | ctl->fname = XC2028_DEFAULT_FIRMWARE; |
| 2083 | break; |
Devin Heitmueller | 1985922 | 2009-06-19 00:33:54 -0300 | [diff] [blame] | 2084 | case EM2882_BOARD_EVGA_INDTUBE: |
| 2085 | ctl->demod = XC3028_FE_CHINA; |
| 2086 | ctl->fname = XC3028L_DEFAULT_FIRMWARE; |
| 2087 | break; |
Mauro Carvalho Chehab | 3ca9c09 | 2008-04-17 21:37:53 -0300 | [diff] [blame] | 2088 | default: |
| 2089 | ctl->demod = XC3028_FE_OREN538; |
| 2090 | } |
| 2091 | } |
Mauro Carvalho Chehab | 3ca9c09 | 2008-04-17 21:37:53 -0300 | [diff] [blame] | 2092 | |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2093 | static void em28xx_tuner_setup(struct em28xx *dev) |
Mauro Carvalho Chehab | 882876b | 2007-10-29 11:33:18 -0300 | [diff] [blame] | 2094 | { |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2095 | struct tuner_setup tun_setup; |
| 2096 | struct v4l2_frequency f; |
Mauro Carvalho Chehab | 882876b | 2007-10-29 11:33:18 -0300 | [diff] [blame] | 2097 | |
Mauro Carvalho Chehab | ed08631 | 2008-01-24 06:59:20 -0300 | [diff] [blame] | 2098 | if (dev->tuner_type == TUNER_ABSENT) |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2099 | return; |
Mauro Carvalho Chehab | 882876b | 2007-10-29 11:33:18 -0300 | [diff] [blame] | 2100 | |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2101 | memset(&tun_setup, 0, sizeof(tun_setup)); |
| 2102 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2103 | tun_setup.mode_mask = T_ANALOG_TV | T_RADIO; |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2104 | tun_setup.tuner_callback = em28xx_tuner_callback; |
Mauro Carvalho Chehab | 882876b | 2007-10-29 11:33:18 -0300 | [diff] [blame] | 2105 | |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2106 | if (dev->board.radio.type) { |
| 2107 | tun_setup.type = dev->board.radio.type; |
| 2108 | tun_setup.addr = dev->board.radio_addr; |
| 2109 | |
| 2110 | v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_type_addr, &tun_setup); |
| 2111 | } |
| 2112 | |
| 2113 | if ((dev->tuner_type != TUNER_ABSENT) && (dev->tuner_type)) { |
| 2114 | tun_setup.type = dev->tuner_type; |
| 2115 | tun_setup.addr = dev->tuner_addr; |
| 2116 | |
| 2117 | v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_type_addr, &tun_setup); |
| 2118 | } |
| 2119 | |
| 2120 | if (dev->tda9887_conf) { |
| 2121 | struct v4l2_priv_tun_config tda9887_cfg; |
| 2122 | |
| 2123 | tda9887_cfg.tuner = TUNER_TDA9887; |
| 2124 | tda9887_cfg.priv = &dev->tda9887_conf; |
| 2125 | |
| 2126 | v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_config, &tda9887_cfg); |
| 2127 | } |
Mauro Carvalho Chehab | 882876b | 2007-10-29 11:33:18 -0300 | [diff] [blame] | 2128 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2129 | if (dev->tuner_type == TUNER_XC2028) { |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2130 | struct v4l2_priv_tun_config xc2028_cfg; |
Mauro Carvalho Chehab | 3ca9c09 | 2008-04-17 21:37:53 -0300 | [diff] [blame] | 2131 | struct xc2028_ctrl ctl; |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2132 | |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2133 | memset(&xc2028_cfg, 0, sizeof(xc2028_cfg)); |
| 2134 | memset(&ctl, 0, sizeof(ctl)); |
| 2135 | |
Mauro Carvalho Chehab | 3ca9c09 | 2008-04-17 21:37:53 -0300 | [diff] [blame] | 2136 | em28xx_setup_xc3028(dev, &ctl); |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2137 | |
| 2138 | xc2028_cfg.tuner = TUNER_XC2028; |
| 2139 | xc2028_cfg.priv = &ctl; |
| 2140 | |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2141 | v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_config, &xc2028_cfg); |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2142 | } |
| 2143 | |
| 2144 | /* configure tuner */ |
| 2145 | f.tuner = 0; |
| 2146 | f.type = V4L2_TUNER_ANALOG_TV; |
| 2147 | f.frequency = 9076; /* just a magic number */ |
| 2148 | dev->ctl_freq = f.frequency; |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2149 | v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_frequency, &f); |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2150 | } |
| 2151 | |
| 2152 | static int em28xx_hint_board(struct em28xx *dev) |
| 2153 | { |
| 2154 | int i; |
| 2155 | |
Mauro Carvalho Chehab | d2ba055 | 2007-11-04 08:32:42 -0300 | [diff] [blame] | 2156 | /* HINT method: EEPROM |
| 2157 | * |
| 2158 | * This method works only for boards with eeprom. |
| 2159 | * Uses a hash of all eeprom bytes. The hash should be |
| 2160 | * unique for a vendor/tuner pair. |
| 2161 | * There are a high chance that tuners for different |
| 2162 | * video standards produce different hashes. |
| 2163 | */ |
| 2164 | for (i = 0; i < ARRAY_SIZE(em28xx_eeprom_hash); i++) { |
| 2165 | if (dev->hash == em28xx_eeprom_hash[i].hash) { |
| 2166 | dev->model = em28xx_eeprom_hash[i].model; |
| 2167 | dev->tuner_type = em28xx_eeprom_hash[i].tuner; |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2168 | |
| 2169 | em28xx_errdev("Your board has no unique USB ID.\n"); |
| 2170 | em28xx_errdev("A hint were successfully done, " |
| 2171 | "based on eeprom hash.\n"); |
| 2172 | em28xx_errdev("This method is not 100%% failproof.\n"); |
| 2173 | em28xx_errdev("If the board were missdetected, " |
| 2174 | "please email this log to:\n"); |
| 2175 | em28xx_errdev("\tV4L Mailing List " |
Alexey Klimov | 51caf91 | 2009-01-25 12:53:09 -0300 | [diff] [blame] | 2176 | " <linux-media@vger.kernel.org>\n"); |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2177 | em28xx_errdev("Board detected as %s\n", |
| 2178 | em28xx_boards[dev->model].name); |
| 2179 | |
| 2180 | return 0; |
| 2181 | } |
| 2182 | } |
Sascha Sommer | fad7b95 | 2007-11-04 08:06:48 -0300 | [diff] [blame] | 2183 | |
Mauro Carvalho Chehab | d2ba055 | 2007-11-04 08:32:42 -0300 | [diff] [blame] | 2184 | /* HINT method: I2C attached devices |
| 2185 | * |
| 2186 | * This method works for all boards. |
| 2187 | * Uses a hash of i2c scanned devices. |
| 2188 | * Devices with the same i2c attached chips will |
| 2189 | * be considered equal. |
| 2190 | * This method is less precise than the eeprom one. |
| 2191 | */ |
| 2192 | |
Sascha Sommer | fad7b95 | 2007-11-04 08:06:48 -0300 | [diff] [blame] | 2193 | /* user did not request i2c scanning => do it now */ |
| 2194 | if (!dev->i2c_hash) |
| 2195 | em28xx_do_i2c_scan(dev); |
| 2196 | |
| 2197 | for (i = 0; i < ARRAY_SIZE(em28xx_i2c_hash); i++) { |
| 2198 | if (dev->i2c_hash == em28xx_i2c_hash[i].hash) { |
| 2199 | dev->model = em28xx_i2c_hash[i].model; |
| 2200 | dev->tuner_type = em28xx_i2c_hash[i].tuner; |
| 2201 | em28xx_errdev("Your board has no unique USB ID.\n"); |
| 2202 | em28xx_errdev("A hint were successfully done, " |
| 2203 | "based on i2c devicelist hash.\n"); |
| 2204 | em28xx_errdev("This method is not 100%% failproof.\n"); |
| 2205 | em28xx_errdev("If the board were missdetected, " |
| 2206 | "please email this log to:\n"); |
| 2207 | em28xx_errdev("\tV4L Mailing List " |
Alexey Klimov | 51caf91 | 2009-01-25 12:53:09 -0300 | [diff] [blame] | 2208 | " <linux-media@vger.kernel.org>\n"); |
Sascha Sommer | fad7b95 | 2007-11-04 08:06:48 -0300 | [diff] [blame] | 2209 | em28xx_errdev("Board detected as %s\n", |
| 2210 | em28xx_boards[dev->model].name); |
| 2211 | |
| 2212 | return 0; |
| 2213 | } |
| 2214 | } |
| 2215 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2216 | em28xx_errdev("Your board has no unique USB ID and thus need a " |
| 2217 | "hint to be detected.\n"); |
| 2218 | em28xx_errdev("You may try to use card=<n> insmod option to " |
| 2219 | "workaround that.\n"); |
| 2220 | em28xx_errdev("Please send an email with this log to:\n"); |
Alexey Klimov | 51caf91 | 2009-01-25 12:53:09 -0300 | [diff] [blame] | 2221 | em28xx_errdev("\tV4L Mailing List <linux-media@vger.kernel.org>\n"); |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2222 | em28xx_errdev("Board eeprom hash is 0x%08lx\n", dev->hash); |
Sascha Sommer | fad7b95 | 2007-11-04 08:06:48 -0300 | [diff] [blame] | 2223 | em28xx_errdev("Board i2c devicelist hash is 0x%08lx\n", dev->i2c_hash); |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2224 | |
| 2225 | em28xx_errdev("Here is a list of valid choices for the card=<n>" |
| 2226 | " insmod option:\n"); |
| 2227 | for (i = 0; i < em28xx_bcount; i++) { |
| 2228 | em28xx_errdev(" card=%d -> %s\n", |
| 2229 | i, em28xx_boards[i].name); |
| 2230 | } |
| 2231 | return -1; |
Mauro Carvalho Chehab | 882876b | 2007-10-29 11:33:18 -0300 | [diff] [blame] | 2232 | } |
| 2233 | |
Mauro Carvalho Chehab | c8793b0 | 2008-01-13 15:42:17 -0300 | [diff] [blame] | 2234 | /* ----------------------------------------------------------------------- */ |
Jean Delvare | c668f32 | 2009-05-13 16:48:50 -0300 | [diff] [blame] | 2235 | void em28xx_register_i2c_ir(struct em28xx *dev) |
| 2236 | { |
Jean Delvare | 43e16ea | 2009-10-02 05:47:08 -0300 | [diff] [blame] | 2237 | struct i2c_board_info info; |
Jean Delvare | c668f32 | 2009-05-13 16:48:50 -0300 | [diff] [blame] | 2238 | const unsigned short addr_list[] = { |
| 2239 | 0x30, 0x47, I2C_CLIENT_END |
| 2240 | }; |
| 2241 | |
| 2242 | if (disable_ir) |
| 2243 | return; |
| 2244 | |
Jean Delvare | 43e16ea | 2009-10-02 05:47:08 -0300 | [diff] [blame] | 2245 | memset(&info, 0, sizeof(struct i2c_board_info)); |
Mauro Carvalho Chehab | d2ebd0f8 | 2009-09-07 02:16:47 -0300 | [diff] [blame] | 2246 | memset(&dev->init_data, 0, sizeof(dev->init_data)); |
Jean Delvare | 43e16ea | 2009-10-02 05:47:08 -0300 | [diff] [blame] | 2247 | strlcpy(info.type, "ir_video", I2C_NAME_SIZE); |
Jean Delvare | c668f32 | 2009-05-13 16:48:50 -0300 | [diff] [blame] | 2248 | |
Mauro Carvalho Chehab | c8793b0 | 2008-01-13 15:42:17 -0300 | [diff] [blame] | 2249 | /* detect & configure */ |
| 2250 | switch (dev->model) { |
Mauro Carvalho Chehab | 7e8e16c | 2009-09-08 14:07:05 -0300 | [diff] [blame] | 2251 | case EM2800_BOARD_TERRATEC_CINERGY_200: |
| 2252 | case EM2820_BOARD_TERRATEC_CINERGY_250: |
Mauro Carvalho Chehab | d2ebd0f8 | 2009-09-07 02:16:47 -0300 | [diff] [blame] | 2253 | dev->init_data.ir_codes = &ir_codes_em_terratec_table; |
| 2254 | dev->init_data.get_key = em28xx_get_key_terratec; |
| 2255 | dev->init_data.name = "i2c IR (EM28XX Terratec)"; |
Mauro Carvalho Chehab | c8793b0 | 2008-01-13 15:42:17 -0300 | [diff] [blame] | 2256 | break; |
Mauro Carvalho Chehab | 7e8e16c | 2009-09-08 14:07:05 -0300 | [diff] [blame] | 2257 | case EM2820_BOARD_PINNACLE_USB_2: |
Mauro Carvalho Chehab | d2ebd0f8 | 2009-09-07 02:16:47 -0300 | [diff] [blame] | 2258 | dev->init_data.ir_codes = &ir_codes_pinnacle_grey_table; |
| 2259 | dev->init_data.get_key = em28xx_get_key_pinnacle_usb_grey; |
| 2260 | dev->init_data.name = "i2c IR (EM28XX Pinnacle PCTV)"; |
Mauro Carvalho Chehab | c8793b0 | 2008-01-13 15:42:17 -0300 | [diff] [blame] | 2261 | break; |
Mauro Carvalho Chehab | 7e8e16c | 2009-09-08 14:07:05 -0300 | [diff] [blame] | 2262 | case EM2820_BOARD_HAUPPAUGE_WINTV_USB_2: |
Mauro Carvalho Chehab | d2ebd0f8 | 2009-09-07 02:16:47 -0300 | [diff] [blame] | 2263 | dev->init_data.ir_codes = &ir_codes_hauppauge_new_table; |
| 2264 | dev->init_data.get_key = em28xx_get_key_em_haup; |
| 2265 | dev->init_data.name = "i2c IR (EM2840 Hauppauge)"; |
Mauro Carvalho Chehab | c8793b0 | 2008-01-13 15:42:17 -0300 | [diff] [blame] | 2266 | break; |
Mauro Carvalho Chehab | c8793b0 | 2008-01-13 15:42:17 -0300 | [diff] [blame] | 2267 | } |
Jean Delvare | 4d7a2d6 | 2009-05-13 16:49:32 -0300 | [diff] [blame] | 2268 | |
Mauro Carvalho Chehab | d2ebd0f8 | 2009-09-07 02:16:47 -0300 | [diff] [blame] | 2269 | if (dev->init_data.name) |
Jean Delvare | 43e16ea | 2009-10-02 05:47:08 -0300 | [diff] [blame] | 2270 | info.platform_data = &dev->init_data; |
| 2271 | i2c_new_probed_device(&dev->i2c_adap, &info, addr_list); |
Mauro Carvalho Chehab | c8793b0 | 2008-01-13 15:42:17 -0300 | [diff] [blame] | 2272 | } |
| 2273 | |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 2274 | void em28xx_card_setup(struct em28xx *dev) |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 2275 | { |
Mauro Carvalho Chehab | 3d3215c | 2009-08-10 10:29:27 -0300 | [diff] [blame] | 2276 | /* |
| 2277 | * If the device can be a webcam, seek for a sensor. |
| 2278 | * If sensor is not found, then it isn't a webcam. |
| 2279 | */ |
| 2280 | if (dev->board.is_webcam) { |
| 2281 | if (em28xx_hint_sensor(dev) < 0) |
| 2282 | dev->board.is_webcam = 0; |
| 2283 | else |
| 2284 | dev->progressive = 1; |
| 2285 | } else |
| 2286 | em28xx_set_model(dev); |
| 2287 | |
| 2288 | em28xx_info("Identified as %s (card=%d)\n", |
| 2289 | dev->board.name, dev->model); |
Mauro Carvalho Chehab | f8b6030 | 2007-11-05 08:42:55 -0300 | [diff] [blame] | 2290 | |
| 2291 | dev->tuner_type = em28xx_boards[dev->model].tuner_type; |
Mauro Carvalho Chehab | 31e0530 | 2008-11-20 18:47:37 -0300 | [diff] [blame] | 2292 | if (em28xx_boards[dev->model].tuner_addr) |
| 2293 | dev->tuner_addr = em28xx_boards[dev->model].tuner_addr; |
Mauro Carvalho Chehab | f8b6030 | 2007-11-05 08:42:55 -0300 | [diff] [blame] | 2294 | |
Franklin Meng | ae3340c | 2009-06-06 16:34:01 -0300 | [diff] [blame] | 2295 | if (em28xx_boards[dev->model].tda9887_conf) |
| 2296 | dev->tda9887_conf = em28xx_boards[dev->model].tda9887_conf; |
| 2297 | |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 2298 | /* request some modules */ |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2299 | switch (dev->model) { |
| 2300 | case EM2820_BOARD_HAUPPAUGE_WINTV_USB_2: |
Mauro Carvalho Chehab | 98ae127 | 2007-11-05 09:30:39 -0300 | [diff] [blame] | 2301 | case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900: |
Devin Heitmueller | 17d9d55 | 2008-06-08 10:22:03 -0300 | [diff] [blame] | 2302 | case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2: |
Douglas Schilling Landgraf | f89bc32 | 2008-12-01 21:01:04 -0300 | [diff] [blame] | 2303 | case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850: |
Mauro Carvalho Chehab | 10ac660 | 2008-07-27 14:58:58 -0300 | [diff] [blame] | 2304 | case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950: |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2305 | { |
| 2306 | struct tveeprom tv; |
Mauro Carvalho Chehab | ac07bb7 | 2009-09-08 14:04:41 -0300 | [diff] [blame] | 2307 | #if defined(CONFIG_MODULES) && defined(MODULE) |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2308 | request_module("tveeprom"); |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 2309 | #endif |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2310 | /* Call first TVeeprom */ |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 2311 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2312 | dev->i2c_client.addr = 0xa0 >> 1; |
| 2313 | tveeprom_hauppauge_analog(&dev->i2c_client, &tv, dev->eedata); |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 2314 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2315 | dev->tuner_type = tv.tuner_type; |
Mauro Carvalho Chehab | ed08631 | 2008-01-24 06:59:20 -0300 | [diff] [blame] | 2316 | |
Hans Verkuil | 38f9d30 | 2008-07-23 05:09:15 -0300 | [diff] [blame] | 2317 | if (tv.audio_processor == V4L2_IDENT_MSPX4XX) { |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2318 | dev->i2s_speed = 2048000; |
Mauro Carvalho Chehab | 505b6d0 | 2008-11-25 09:39:50 -0300 | [diff] [blame] | 2319 | dev->board.has_msp34xx = 1; |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2320 | } |
| 2321 | break; |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 2322 | } |
Franklin Meng | d7de5d8 | 2009-06-06 17:05:02 -0300 | [diff] [blame] | 2323 | case EM2882_BOARD_KWORLD_ATSC_315U: |
| 2324 | em28xx_write_reg(dev, 0x0d, 0x42); |
| 2325 | msleep(10); |
| 2326 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfd); |
| 2327 | msleep(10); |
| 2328 | break; |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2329 | case EM2820_BOARD_KWORLD_PVRTV2800RF: |
| 2330 | /* GPIO enables sound on KWORLD PVR TV 2800RF */ |
Devin Heitmueller | 6d676d8 | 2008-11-25 06:04:02 -0300 | [diff] [blame] | 2331 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xf9); |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2332 | break; |
| 2333 | case EM2820_BOARD_UNKNOWN: |
| 2334 | case EM2800_BOARD_UNKNOWN: |
Darron Broad | da3808e | 2008-09-30 02:46:41 -0300 | [diff] [blame] | 2335 | /* |
| 2336 | * The K-WORLD DVB-T 310U is detected as an MSI Digivox AD. |
| 2337 | * |
| 2338 | * This occurs because they share identical USB vendor and |
| 2339 | * product IDs. |
| 2340 | * |
| 2341 | * What we do here is look up the EEPROM hash of the K-WORLD |
| 2342 | * and if it is found then we decide that we do not have |
| 2343 | * a DIGIVOX and reset the device to the K-WORLD instead. |
| 2344 | * |
| 2345 | * This solution is only valid if they do not share eeprom |
| 2346 | * hash identities which has not been determined as yet. |
| 2347 | */ |
| 2348 | case EM2880_BOARD_MSI_DIGIVOX_AD: |
Mauro Carvalho Chehab | f8b6030 | 2007-11-05 08:42:55 -0300 | [diff] [blame] | 2349 | if (!em28xx_hint_board(dev)) |
| 2350 | em28xx_set_model(dev); |
Devin Heitmueller | cdf7bfa | 2009-06-19 00:20:28 -0300 | [diff] [blame] | 2351 | |
| 2352 | /* In cases where we had to use a board hint, the call to |
| 2353 | em28xx_set_mode() in em28xx_pre_card_setup() was a no-op, |
| 2354 | so make the call now so the analog GPIOs are set properly |
| 2355 | before probing the i2c bus. */ |
Devin Heitmueller | 5343e44 | 2009-07-15 00:35:47 -0300 | [diff] [blame] | 2356 | em28xx_gpio_set(dev, dev->board.tuner_gpio); |
Devin Heitmueller | cdf7bfa | 2009-06-19 00:20:28 -0300 | [diff] [blame] | 2357 | em28xx_set_mode(dev, EM28XX_ANALOG_MODE); |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2358 | break; |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2359 | } |
| 2360 | |
Mauro Carvalho Chehab | ac07bb7 | 2009-09-08 14:04:41 -0300 | [diff] [blame] | 2361 | #if defined(CONFIG_MODULES) && defined(MODULE) |
| 2362 | if (dev->board.has_ir_i2c && !disable_ir) |
| 2363 | request_module("ir-kbd-i2c"); |
| 2364 | #endif |
Mauro Carvalho Chehab | 505b6d0 | 2008-11-25 09:39:50 -0300 | [diff] [blame] | 2365 | if (dev->board.has_snapshot_button) |
Devin Heitmueller | a9fc52b | 2008-06-28 08:57:06 -0300 | [diff] [blame] | 2366 | em28xx_register_snapshot_button(dev); |
| 2367 | |
Mauro Carvalho Chehab | 505b6d0 | 2008-11-25 09:39:50 -0300 | [diff] [blame] | 2368 | if (dev->board.valid == EM28XX_BOARD_NOT_VALIDATED) { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2369 | em28xx_errdev("\n\n"); |
| 2370 | em28xx_errdev("The support for this board weren't " |
| 2371 | "valid yet.\n"); |
| 2372 | em28xx_errdev("Please send a report of having this working\n"); |
| 2373 | em28xx_errdev("not to V4L mailing list (and/or to other " |
| 2374 | "addresses)\n\n"); |
| 2375 | } |
| 2376 | |
Mauro Carvalho Chehab | f8b6030 | 2007-11-05 08:42:55 -0300 | [diff] [blame] | 2377 | /* Allow override tuner type by a module parameter */ |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2378 | if (tuner >= 0) |
| 2379 | dev->tuner_type = tuner; |
| 2380 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2381 | /* request some modules */ |
Mauro Carvalho Chehab | 505b6d0 | 2008-11-25 09:39:50 -0300 | [diff] [blame] | 2382 | if (dev->board.has_msp34xx) |
Hans Verkuil | 53dacb1 | 2009-08-10 02:49:08 -0300 | [diff] [blame] | 2383 | v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, |
| 2384 | "msp3400", "msp3400", 0, msp3400_addrs); |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2385 | |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 2386 | if (dev->board.decoder == EM28XX_SAA711X) |
Hans Verkuil | 53dacb1 | 2009-08-10 02:49:08 -0300 | [diff] [blame] | 2387 | v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, |
| 2388 | "saa7115", "saa7115_auto", 0, saa711x_addrs); |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2389 | |
Mauro Carvalho Chehab | 505b6d0 | 2008-11-25 09:39:50 -0300 | [diff] [blame] | 2390 | if (dev->board.decoder == EM28XX_TVP5150) |
Hans Verkuil | 53dacb1 | 2009-08-10 02:49:08 -0300 | [diff] [blame] | 2391 | v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, |
| 2392 | "tvp5150", "tvp5150", 0, tvp5150_addrs); |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2393 | |
Mauro Carvalho Chehab | d36bb4e | 2009-07-14 03:18:39 -0300 | [diff] [blame] | 2394 | if (dev->em28xx_sensor == EM28XX_MT9V011) { |
| 2395 | struct v4l2_subdev *sd; |
| 2396 | |
Hans Verkuil | 53dacb1 | 2009-08-10 02:49:08 -0300 | [diff] [blame] | 2397 | sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, |
| 2398 | &dev->i2c_adap, "mt9v011", "mt9v011", 0, mt9v011_addrs); |
Mauro Carvalho Chehab | d36bb4e | 2009-07-14 03:18:39 -0300 | [diff] [blame] | 2399 | v4l2_subdev_call(sd, core, s_config, 0, &dev->sensor_xtal); |
| 2400 | } |
Mauro Carvalho Chehab | 02e7804 | 2009-06-29 11:35:05 -0300 | [diff] [blame] | 2401 | |
Mauro Carvalho Chehab | b80fd2d | 2009-07-14 21:08:22 -0300 | [diff] [blame] | 2402 | |
Mauro Carvalho Chehab | df7fa09 | 2009-02-25 09:06:13 -0300 | [diff] [blame] | 2403 | if (dev->board.adecoder == EM28XX_TVAUDIO) |
Hans Verkuil | e6574f2 | 2009-04-01 03:57:53 -0300 | [diff] [blame] | 2404 | v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, |
Hans Verkuil | 53dacb1 | 2009-08-10 02:49:08 -0300 | [diff] [blame] | 2405 | "tvaudio", "tvaudio", dev->board.tvaudio_addr, NULL); |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2406 | |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2407 | if (dev->board.tuner_type != TUNER_ABSENT) { |
| 2408 | int has_demod = (dev->tda9887_conf & TDA9887_PRESENT); |
Mauro Carvalho Chehab | a924a49 | 2008-11-12 08:41:29 -0300 | [diff] [blame] | 2409 | |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2410 | if (dev->board.radio.type) |
Hans Verkuil | e6574f2 | 2009-04-01 03:57:53 -0300 | [diff] [blame] | 2411 | v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, |
Hans Verkuil | 53dacb1 | 2009-08-10 02:49:08 -0300 | [diff] [blame] | 2412 | "tuner", "tuner", dev->board.radio_addr, NULL); |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2413 | |
| 2414 | if (has_demod) |
Hans Verkuil | 53dacb1 | 2009-08-10 02:49:08 -0300 | [diff] [blame] | 2415 | v4l2_i2c_new_subdev(&dev->v4l2_dev, |
Hans Verkuil | e6574f2 | 2009-04-01 03:57:53 -0300 | [diff] [blame] | 2416 | &dev->i2c_adap, "tuner", "tuner", |
Hans Verkuil | 53dacb1 | 2009-08-10 02:49:08 -0300 | [diff] [blame] | 2417 | 0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD)); |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2418 | if (dev->tuner_addr == 0) { |
| 2419 | enum v4l2_i2c_tuner_type type = |
| 2420 | has_demod ? ADDRS_TV_WITH_DEMOD : ADDRS_TV; |
| 2421 | struct v4l2_subdev *sd; |
| 2422 | |
Hans Verkuil | 53dacb1 | 2009-08-10 02:49:08 -0300 | [diff] [blame] | 2423 | sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, |
Hans Verkuil | e6574f2 | 2009-04-01 03:57:53 -0300 | [diff] [blame] | 2424 | &dev->i2c_adap, "tuner", "tuner", |
Hans Verkuil | 53dacb1 | 2009-08-10 02:49:08 -0300 | [diff] [blame] | 2425 | 0, v4l2_i2c_tuner_addrs(type)); |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2426 | |
| 2427 | if (sd) |
| 2428 | dev->tuner_addr = v4l2_i2c_subdev_addr(sd); |
| 2429 | } else { |
Hans Verkuil | e6574f2 | 2009-04-01 03:57:53 -0300 | [diff] [blame] | 2430 | v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, |
Hans Verkuil | 53dacb1 | 2009-08-10 02:49:08 -0300 | [diff] [blame] | 2431 | "tuner", "tuner", dev->tuner_addr, NULL); |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2432 | } |
| 2433 | } |
| 2434 | |
| 2435 | em28xx_tuner_setup(dev); |
Shine Liu | f4c5e80 | 2009-08-20 23:49:26 -0300 | [diff] [blame] | 2436 | |
| 2437 | if(!disable_ir) |
| 2438 | em28xx_ir_init(dev); |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 2439 | } |
Mauro Carvalho Chehab | c864405 | 2008-11-25 13:10:14 -0300 | [diff] [blame] | 2440 | |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2441 | |
| 2442 | #if defined(CONFIG_MODULES) && defined(MODULE) |
| 2443 | static void request_module_async(struct work_struct *work) |
| 2444 | { |
| 2445 | struct em28xx *dev = container_of(work, |
| 2446 | struct em28xx, request_module_wk); |
| 2447 | |
| 2448 | if (dev->has_audio_class) |
| 2449 | request_module("snd-usb-audio"); |
| 2450 | else if (dev->has_alsa_audio) |
| 2451 | request_module("em28xx-alsa"); |
| 2452 | |
| 2453 | if (dev->board.has_dvb) |
| 2454 | request_module("em28xx-dvb"); |
| 2455 | } |
| 2456 | |
| 2457 | static void request_modules(struct em28xx *dev) |
| 2458 | { |
| 2459 | INIT_WORK(&dev->request_module_wk, request_module_async); |
| 2460 | schedule_work(&dev->request_module_wk); |
| 2461 | } |
| 2462 | #else |
| 2463 | #define request_modules(dev) |
| 2464 | #endif /* CONFIG_MODULES */ |
| 2465 | |
| 2466 | /* |
| 2467 | * em28xx_realease_resources() |
| 2468 | * unregisters the v4l2,i2c and usb devices |
| 2469 | * called when the device gets disconected or at module unload |
| 2470 | */ |
| 2471 | void em28xx_release_resources(struct em28xx *dev) |
| 2472 | { |
| 2473 | if (dev->sbutton_input_dev) |
| 2474 | em28xx_deregister_snapshot_button(dev); |
| 2475 | |
| 2476 | if (dev->ir) |
| 2477 | em28xx_ir_fini(dev); |
| 2478 | |
| 2479 | /*FIXME: I2C IR should be disconnected */ |
| 2480 | |
| 2481 | em28xx_release_analog_resources(dev); |
| 2482 | |
| 2483 | em28xx_remove_from_devlist(dev); |
| 2484 | |
| 2485 | em28xx_i2c_unregister(dev); |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2486 | |
| 2487 | v4l2_device_unregister(&dev->v4l2_dev); |
| 2488 | |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2489 | usb_put_dev(dev->udev); |
| 2490 | |
| 2491 | /* Mark device as unused */ |
| 2492 | em28xx_devused &= ~(1 << dev->devno); |
| 2493 | }; |
| 2494 | |
| 2495 | /* |
| 2496 | * em28xx_init_dev() |
| 2497 | * allocates and inits the device structs, registers i2c bus and v4l device |
| 2498 | */ |
Mauro Carvalho Chehab | 26cdc76 | 2009-01-05 01:00:40 -0300 | [diff] [blame] | 2499 | static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev, |
Mauro Carvalho Chehab | 36fa674 | 2009-04-05 08:02:15 -0300 | [diff] [blame] | 2500 | struct usb_interface *interface, |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2501 | int minor) |
| 2502 | { |
| 2503 | struct em28xx *dev = *devhandle; |
Mauro Carvalho Chehab | fcd20e3 | 2009-08-10 02:57:57 -0300 | [diff] [blame] | 2504 | int retval; |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2505 | int errCode; |
| 2506 | |
| 2507 | dev->udev = udev; |
| 2508 | mutex_init(&dev->ctrl_urb_lock); |
| 2509 | spin_lock_init(&dev->slock); |
| 2510 | init_waitqueue_head(&dev->open); |
| 2511 | init_waitqueue_head(&dev->wait_frame); |
| 2512 | init_waitqueue_head(&dev->wait_stream); |
| 2513 | |
| 2514 | dev->em28xx_write_regs = em28xx_write_regs; |
| 2515 | dev->em28xx_read_reg = em28xx_read_reg; |
| 2516 | dev->em28xx_read_reg_req_len = em28xx_read_reg_req_len; |
| 2517 | dev->em28xx_write_regs_req = em28xx_write_regs_req; |
| 2518 | dev->em28xx_read_reg_req = em28xx_read_reg_req; |
| 2519 | dev->board.is_em2800 = em28xx_boards[dev->model].is_em2800; |
| 2520 | |
Mauro Carvalho Chehab | fcd20e3 | 2009-08-10 02:57:57 -0300 | [diff] [blame] | 2521 | em28xx_set_model(dev); |
| 2522 | |
| 2523 | /* Set the default GPO/GPIO for legacy devices */ |
| 2524 | dev->reg_gpo_num = EM2880_R04_GPO; |
| 2525 | dev->reg_gpio_num = EM28XX_R08_GPIO; |
| 2526 | |
| 2527 | dev->wait_after_write = 5; |
| 2528 | |
| 2529 | /* Based on the Chip ID, set the device configuration */ |
| 2530 | retval = em28xx_read_reg(dev, EM28XX_R0A_CHIPID); |
| 2531 | if (retval > 0) { |
| 2532 | dev->chip_id = retval; |
| 2533 | |
| 2534 | switch (dev->chip_id) { |
| 2535 | case CHIP_ID_EM2710: |
| 2536 | em28xx_info("chip ID is em2710\n"); |
| 2537 | break; |
| 2538 | case CHIP_ID_EM2750: |
| 2539 | em28xx_info("chip ID is em2750\n"); |
| 2540 | break; |
| 2541 | case CHIP_ID_EM2820: |
| 2542 | em28xx_info("chip ID is em2820 (or em2710)\n"); |
| 2543 | break; |
| 2544 | case CHIP_ID_EM2840: |
| 2545 | em28xx_info("chip ID is em2840\n"); |
| 2546 | break; |
| 2547 | case CHIP_ID_EM2860: |
| 2548 | em28xx_info("chip ID is em2860\n"); |
| 2549 | break; |
| 2550 | case CHIP_ID_EM2870: |
| 2551 | em28xx_info("chip ID is em2870\n"); |
| 2552 | dev->wait_after_write = 0; |
| 2553 | break; |
| 2554 | case CHIP_ID_EM2874: |
| 2555 | em28xx_info("chip ID is em2874\n"); |
| 2556 | dev->reg_gpio_num = EM2874_R80_GPIO; |
| 2557 | dev->wait_after_write = 0; |
| 2558 | break; |
| 2559 | case CHIP_ID_EM2883: |
| 2560 | em28xx_info("chip ID is em2882/em2883\n"); |
| 2561 | dev->wait_after_write = 0; |
| 2562 | break; |
| 2563 | default: |
| 2564 | em28xx_info("em28xx chip ID = %d\n", dev->chip_id); |
| 2565 | } |
| 2566 | } |
| 2567 | |
| 2568 | /* Prepopulate cached GPO register content */ |
| 2569 | retval = em28xx_read_reg(dev, dev->reg_gpo_num); |
| 2570 | if (retval >= 0) |
| 2571 | dev->reg_gpo = retval; |
| 2572 | |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2573 | em28xx_pre_card_setup(dev); |
| 2574 | |
| 2575 | if (!dev->board.is_em2800) { |
| 2576 | /* Sets I2C speed to 100 KHz */ |
| 2577 | retval = em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, 0x40); |
| 2578 | if (retval < 0) { |
| 2579 | em28xx_errdev("%s: em28xx_write_regs_req failed!" |
| 2580 | " retval [%d]\n", |
| 2581 | __func__, retval); |
| 2582 | return retval; |
| 2583 | } |
| 2584 | } |
| 2585 | |
Mauro Carvalho Chehab | 36fa674 | 2009-04-05 08:02:15 -0300 | [diff] [blame] | 2586 | retval = v4l2_device_register(&interface->dev, &dev->v4l2_dev); |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2587 | if (retval < 0) { |
| 2588 | em28xx_errdev("Call to v4l2_device_register() failed!\n"); |
| 2589 | return retval; |
| 2590 | } |
| 2591 | |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2592 | /* register i2c bus */ |
| 2593 | errCode = em28xx_i2c_register(dev); |
| 2594 | if (errCode < 0) { |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2595 | v4l2_device_unregister(&dev->v4l2_dev); |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2596 | em28xx_errdev("%s: em28xx_i2c_register - errCode [%d]!\n", |
| 2597 | __func__, errCode); |
| 2598 | return errCode; |
| 2599 | } |
| 2600 | |
Mauro Carvalho Chehab | b04fb66 | 2009-07-13 01:28:21 -0300 | [diff] [blame] | 2601 | /* |
Mauro Carvalho Chehab | 579d315 | 2009-07-14 12:33:25 -0300 | [diff] [blame] | 2602 | * Default format, used for tvp5150 or saa711x output formats |
| 2603 | */ |
| 2604 | dev->vinmode = 0x10; |
Devin Heitmueller | 206313d | 2009-08-31 23:23:03 -0300 | [diff] [blame] | 2605 | dev->vinctl = EM28XX_VINCTRL_INTERLACED | |
| 2606 | EM28XX_VINCTRL_CCIR656_ENABLE; |
Mauro Carvalho Chehab | 579d315 | 2009-07-14 12:33:25 -0300 | [diff] [blame] | 2607 | |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2608 | /* Do board specific init and eeprom reading */ |
| 2609 | em28xx_card_setup(dev); |
| 2610 | |
| 2611 | /* Configure audio */ |
| 2612 | errCode = em28xx_audio_setup(dev); |
| 2613 | if (errCode < 0) { |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2614 | v4l2_device_unregister(&dev->v4l2_dev); |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2615 | em28xx_errdev("%s: Error while setting audio - errCode [%d]!\n", |
| 2616 | __func__, errCode); |
| 2617 | } |
| 2618 | |
| 2619 | /* wake i2c devices */ |
| 2620 | em28xx_wake_i2c(dev); |
| 2621 | |
| 2622 | /* init video dma queues */ |
| 2623 | INIT_LIST_HEAD(&dev->vidq.active); |
| 2624 | INIT_LIST_HEAD(&dev->vidq.queued); |
Devin Heitmueller | 28abf083 | 2009-09-01 01:54:54 -0300 | [diff] [blame] | 2625 | INIT_LIST_HEAD(&dev->vbiq.active); |
| 2626 | INIT_LIST_HEAD(&dev->vbiq.queued); |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2627 | |
| 2628 | |
| 2629 | if (dev->board.has_msp34xx) { |
| 2630 | /* Send a reset to other chips via gpio */ |
| 2631 | errCode = em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xf7); |
| 2632 | if (errCode < 0) { |
| 2633 | em28xx_errdev("%s: em28xx_write_regs_req - " |
| 2634 | "msp34xx(1) failed! errCode [%d]\n", |
| 2635 | __func__, errCode); |
| 2636 | return errCode; |
| 2637 | } |
| 2638 | msleep(3); |
| 2639 | |
| 2640 | errCode = em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xff); |
| 2641 | if (errCode < 0) { |
| 2642 | em28xx_errdev("%s: em28xx_write_regs_req - " |
| 2643 | "msp34xx(2) failed! errCode [%d]\n", |
| 2644 | __func__, errCode); |
| 2645 | return errCode; |
| 2646 | } |
| 2647 | msleep(3); |
| 2648 | } |
| 2649 | |
| 2650 | em28xx_add_into_devlist(dev); |
| 2651 | |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2652 | retval = em28xx_register_analog_devices(dev); |
| 2653 | if (retval < 0) { |
| 2654 | em28xx_release_resources(dev); |
| 2655 | goto fail_reg_devices; |
| 2656 | } |
| 2657 | |
| 2658 | em28xx_init_extension(dev); |
| 2659 | |
| 2660 | /* Save some power by putting tuner to sleep */ |
Laurent Pinchart | 622b828 | 2009-10-05 10:48:17 -0300 | [diff] [blame] | 2661 | v4l2_device_call_all(&dev->v4l2_dev, 0, core, s_power, 0); |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2662 | |
| 2663 | return 0; |
| 2664 | |
| 2665 | fail_reg_devices: |
| 2666 | return retval; |
| 2667 | } |
| 2668 | |
| 2669 | /* |
| 2670 | * em28xx_usb_probe() |
| 2671 | * checks for supported devices |
| 2672 | */ |
| 2673 | static int em28xx_usb_probe(struct usb_interface *interface, |
| 2674 | const struct usb_device_id *id) |
| 2675 | { |
| 2676 | const struct usb_endpoint_descriptor *endpoint; |
| 2677 | struct usb_device *udev; |
| 2678 | struct usb_interface *uif; |
| 2679 | struct em28xx *dev = NULL; |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2680 | int retval; |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2681 | int i, nr, ifnum, isoc_pipe; |
| 2682 | char *speed; |
| 2683 | char descr[255] = ""; |
| 2684 | |
| 2685 | udev = usb_get_dev(interface_to_usbdev(interface)); |
| 2686 | ifnum = interface->altsetting[0].desc.bInterfaceNumber; |
| 2687 | |
| 2688 | /* Check to see next free device and mark as used */ |
| 2689 | nr = find_first_zero_bit(&em28xx_devused, EM28XX_MAXBOARDS); |
| 2690 | em28xx_devused |= 1<<nr; |
| 2691 | |
| 2692 | /* Don't register audio interfaces */ |
| 2693 | if (interface->altsetting[0].desc.bInterfaceClass == USB_CLASS_AUDIO) { |
| 2694 | em28xx_err(DRIVER_NAME " audio device (%04x:%04x): " |
| 2695 | "interface %i, class %i\n", |
| 2696 | le16_to_cpu(udev->descriptor.idVendor), |
| 2697 | le16_to_cpu(udev->descriptor.idProduct), |
| 2698 | ifnum, |
| 2699 | interface->altsetting[0].desc.bInterfaceClass); |
| 2700 | |
| 2701 | em28xx_devused &= ~(1<<nr); |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2702 | retval = -ENODEV; |
| 2703 | goto err; |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2704 | } |
| 2705 | |
| 2706 | endpoint = &interface->cur_altsetting->endpoint[0].desc; |
| 2707 | |
| 2708 | /* check if the device has the iso in endpoint at the correct place */ |
Julia Lawall | 1341798 | 2008-12-29 21:49:22 -0300 | [diff] [blame] | 2709 | if (usb_endpoint_xfer_isoc(endpoint) |
| 2710 | && |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2711 | (interface->altsetting[1].endpoint[0].desc.wMaxPacketSize == 940)) { |
| 2712 | /* It's a newer em2874/em2875 device */ |
| 2713 | isoc_pipe = 0; |
| 2714 | } else { |
| 2715 | int check_interface = 1; |
| 2716 | isoc_pipe = 1; |
| 2717 | endpoint = &interface->cur_altsetting->endpoint[1].desc; |
Julia Lawall | 2230c3c | 2009-01-03 16:53:10 -0300 | [diff] [blame] | 2718 | if (!usb_endpoint_xfer_isoc(endpoint)) |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2719 | check_interface = 0; |
| 2720 | |
Julia Lawall | 1341798 | 2008-12-29 21:49:22 -0300 | [diff] [blame] | 2721 | if (usb_endpoint_dir_out(endpoint)) |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2722 | check_interface = 0; |
| 2723 | |
| 2724 | if (!check_interface) { |
| 2725 | em28xx_err(DRIVER_NAME " video device (%04x:%04x): " |
| 2726 | "interface %i, class %i found.\n", |
| 2727 | le16_to_cpu(udev->descriptor.idVendor), |
| 2728 | le16_to_cpu(udev->descriptor.idProduct), |
| 2729 | ifnum, |
| 2730 | interface->altsetting[0].desc.bInterfaceClass); |
| 2731 | |
| 2732 | em28xx_err(DRIVER_NAME " This is an anciliary " |
| 2733 | "interface not used by the driver\n"); |
| 2734 | |
| 2735 | em28xx_devused &= ~(1<<nr); |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2736 | retval = -ENODEV; |
| 2737 | goto err; |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2738 | } |
| 2739 | } |
| 2740 | |
| 2741 | switch (udev->speed) { |
| 2742 | case USB_SPEED_LOW: |
| 2743 | speed = "1.5"; |
| 2744 | break; |
| 2745 | case USB_SPEED_UNKNOWN: |
| 2746 | case USB_SPEED_FULL: |
| 2747 | speed = "12"; |
| 2748 | break; |
| 2749 | case USB_SPEED_HIGH: |
| 2750 | speed = "480"; |
| 2751 | break; |
| 2752 | default: |
| 2753 | speed = "unknown"; |
| 2754 | } |
| 2755 | |
| 2756 | if (udev->manufacturer) |
| 2757 | strlcpy(descr, udev->manufacturer, sizeof(descr)); |
| 2758 | |
| 2759 | if (udev->product) { |
| 2760 | if (*descr) |
| 2761 | strlcat(descr, " ", sizeof(descr)); |
| 2762 | strlcat(descr, udev->product, sizeof(descr)); |
| 2763 | } |
| 2764 | if (*descr) |
| 2765 | strlcat(descr, " ", sizeof(descr)); |
| 2766 | |
| 2767 | printk(DRIVER_NAME ": New device %s@ %s Mbps " |
| 2768 | "(%04x:%04x, interface %d, class %d)\n", |
| 2769 | descr, |
| 2770 | speed, |
| 2771 | le16_to_cpu(udev->descriptor.idVendor), |
| 2772 | le16_to_cpu(udev->descriptor.idProduct), |
| 2773 | ifnum, |
| 2774 | interface->altsetting->desc.bInterfaceNumber); |
| 2775 | |
Devin Heitmueller | 64a00b4 | 2009-05-27 23:23:37 -0300 | [diff] [blame] | 2776 | /* |
| 2777 | * Make sure we have 480 Mbps of bandwidth, otherwise things like |
| 2778 | * video stream wouldn't likely work, since 12 Mbps is generally |
| 2779 | * not enough even for most Digital TV streams. |
| 2780 | */ |
Devin Heitmueller | e2a1b79 | 2009-05-27 23:44:10 -0300 | [diff] [blame] | 2781 | if (udev->speed != USB_SPEED_HIGH && disable_usb_speed_check == 0) { |
Devin Heitmueller | 64a00b4 | 2009-05-27 23:23:37 -0300 | [diff] [blame] | 2782 | printk(DRIVER_NAME ": Device initialization failed.\n"); |
| 2783 | printk(DRIVER_NAME ": Device must be connected to a high-speed" |
| 2784 | " USB 2.0 port.\n"); |
| 2785 | em28xx_devused &= ~(1<<nr); |
| 2786 | retval = -ENODEV; |
| 2787 | goto err; |
| 2788 | } |
| 2789 | |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2790 | if (nr >= EM28XX_MAXBOARDS) { |
| 2791 | printk(DRIVER_NAME ": Supports only %i em28xx boards.\n", |
| 2792 | EM28XX_MAXBOARDS); |
| 2793 | em28xx_devused &= ~(1<<nr); |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2794 | retval = -ENOMEM; |
| 2795 | goto err; |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2796 | } |
| 2797 | |
| 2798 | /* allocate memory for our device state and initialize it */ |
| 2799 | dev = kzalloc(sizeof(*dev), GFP_KERNEL); |
| 2800 | if (dev == NULL) { |
| 2801 | em28xx_err(DRIVER_NAME ": out of memory!\n"); |
| 2802 | em28xx_devused &= ~(1<<nr); |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2803 | retval = -ENOMEM; |
| 2804 | goto err; |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2805 | } |
| 2806 | |
| 2807 | snprintf(dev->name, 29, "em28xx #%d", nr); |
| 2808 | dev->devno = nr; |
| 2809 | dev->model = id->driver_info; |
| 2810 | dev->alt = -1; |
| 2811 | |
| 2812 | /* Checks if audio is provided by some interface */ |
| 2813 | for (i = 0; i < udev->config->desc.bNumInterfaces; i++) { |
| 2814 | uif = udev->config->interface[i]; |
| 2815 | if (uif->altsetting[0].desc.bInterfaceClass == USB_CLASS_AUDIO) { |
| 2816 | dev->has_audio_class = 1; |
| 2817 | break; |
| 2818 | } |
| 2819 | } |
| 2820 | |
| 2821 | /* compute alternate max packet sizes */ |
| 2822 | uif = udev->actconfig->interface[0]; |
| 2823 | |
| 2824 | dev->num_alt = uif->num_altsetting; |
| 2825 | dev->alt_max_pkt_size = kmalloc(32 * dev->num_alt, GFP_KERNEL); |
| 2826 | |
| 2827 | if (dev->alt_max_pkt_size == NULL) { |
| 2828 | em28xx_errdev("out of memory!\n"); |
| 2829 | em28xx_devused &= ~(1<<nr); |
| 2830 | kfree(dev); |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2831 | retval = -ENOMEM; |
| 2832 | goto err; |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2833 | } |
| 2834 | |
| 2835 | for (i = 0; i < dev->num_alt ; i++) { |
| 2836 | u16 tmp = le16_to_cpu(uif->altsetting[i].endpoint[isoc_pipe].desc.wMaxPacketSize); |
| 2837 | dev->alt_max_pkt_size[i] = |
| 2838 | (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1); |
| 2839 | } |
| 2840 | |
| 2841 | if ((card[nr] >= 0) && (card[nr] < em28xx_bcount)) |
| 2842 | dev->model = card[nr]; |
| 2843 | |
| 2844 | /* allocate device struct */ |
| 2845 | mutex_init(&dev->lock); |
| 2846 | mutex_lock(&dev->lock); |
Mauro Carvalho Chehab | 36fa674 | 2009-04-05 08:02:15 -0300 | [diff] [blame] | 2847 | retval = em28xx_init_dev(&dev, udev, interface, nr); |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2848 | if (retval) { |
| 2849 | em28xx_devused &= ~(1<<dev->devno); |
Jiri Slaby | 11b79ea | 2009-07-05 14:06:41 -0300 | [diff] [blame] | 2850 | mutex_unlock(&dev->lock); |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2851 | kfree(dev); |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2852 | goto err; |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2853 | } |
| 2854 | |
| 2855 | /* save our data pointer in this interface device */ |
| 2856 | usb_set_intfdata(interface, dev); |
| 2857 | |
| 2858 | request_modules(dev); |
| 2859 | |
| 2860 | /* Should be the last thing to do, to avoid newer udev's to |
| 2861 | open the device before fully initializing it |
| 2862 | */ |
| 2863 | mutex_unlock(&dev->lock); |
| 2864 | |
| 2865 | return 0; |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2866 | |
| 2867 | err: |
| 2868 | return retval; |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2869 | } |
| 2870 | |
| 2871 | /* |
| 2872 | * em28xx_usb_disconnect() |
| 2873 | * called when the device gets diconencted |
| 2874 | * video device will be unregistered on v4l2_close in case it is still open |
| 2875 | */ |
| 2876 | static void em28xx_usb_disconnect(struct usb_interface *interface) |
| 2877 | { |
| 2878 | struct em28xx *dev; |
| 2879 | |
| 2880 | dev = usb_get_intfdata(interface); |
| 2881 | usb_set_intfdata(interface, NULL); |
| 2882 | |
| 2883 | if (!dev) |
| 2884 | return; |
| 2885 | |
| 2886 | em28xx_info("disconnecting %s\n", dev->vdev->name); |
| 2887 | |
| 2888 | /* wait until all current v4l2 io is finished then deallocate |
| 2889 | resources */ |
| 2890 | mutex_lock(&dev->lock); |
| 2891 | |
| 2892 | wake_up_interruptible_all(&dev->open); |
| 2893 | |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2894 | v4l2_device_disconnect(&dev->v4l2_dev); |
| 2895 | |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2896 | if (dev->users) { |
| 2897 | em28xx_warn |
| 2898 | ("device /dev/video%d is open! Deregistration and memory " |
| 2899 | "deallocation are deferred on close.\n", |
| 2900 | dev->vdev->num); |
| 2901 | |
| 2902 | dev->state |= DEV_MISCONFIGURED; |
| 2903 | em28xx_uninit_isoc(dev); |
| 2904 | dev->state |= DEV_DISCONNECTED; |
| 2905 | wake_up_interruptible(&dev->wait_frame); |
| 2906 | wake_up_interruptible(&dev->wait_stream); |
| 2907 | } else { |
| 2908 | dev->state |= DEV_DISCONNECTED; |
| 2909 | em28xx_release_resources(dev); |
| 2910 | } |
| 2911 | |
| 2912 | em28xx_close_extension(dev); |
| 2913 | |
| 2914 | mutex_unlock(&dev->lock); |
| 2915 | |
| 2916 | if (!dev->users) { |
| 2917 | kfree(dev->alt_max_pkt_size); |
| 2918 | kfree(dev); |
| 2919 | } |
| 2920 | } |
| 2921 | |
| 2922 | static struct usb_driver em28xx_usb_driver = { |
| 2923 | .name = "em28xx", |
| 2924 | .probe = em28xx_usb_probe, |
| 2925 | .disconnect = em28xx_usb_disconnect, |
| 2926 | .id_table = em28xx_id_table, |
| 2927 | }; |
| 2928 | |
| 2929 | static int __init em28xx_module_init(void) |
| 2930 | { |
| 2931 | int result; |
| 2932 | |
| 2933 | /* register this driver with the USB subsystem */ |
| 2934 | result = usb_register(&em28xx_usb_driver); |
| 2935 | if (result) |
| 2936 | em28xx_err(DRIVER_NAME |
| 2937 | " usb_register failed. Error number %d.\n", result); |
| 2938 | |
| 2939 | printk(KERN_INFO DRIVER_NAME " driver loaded\n"); |
| 2940 | |
| 2941 | return result; |
| 2942 | } |
| 2943 | |
| 2944 | static void __exit em28xx_module_exit(void) |
| 2945 | { |
| 2946 | /* deregister this driver with the USB subsystem */ |
| 2947 | usb_deregister(&em28xx_usb_driver); |
| 2948 | } |
| 2949 | |
| 2950 | module_init(em28xx_module_init); |
| 2951 | module_exit(em28xx_module_exit); |