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