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