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