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