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