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