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