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