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