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