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