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