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