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