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