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