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 | |
Mauro Carvalho Chehab | 791a08f | 2009-07-03 15:36:18 -0300 | [diff] [blame] | 61 | #define MT9V011_VERSION 0x8243 |
| 62 | |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 63 | /* Bitmask marking allocated devices from 0 to EM28XX_MAXBOARDS */ |
| 64 | static unsigned long em28xx_devused; |
| 65 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 66 | struct em28xx_hash_table { |
| 67 | unsigned long hash; |
| 68 | unsigned int model; |
| 69 | unsigned int tuner; |
| 70 | }; |
| 71 | |
Mauro Carvalho Chehab | 0ec202d | 2008-11-25 13:16:13 -0300 | [diff] [blame] | 72 | /* |
| 73 | * Reset sequences for analog/digital modes |
| 74 | */ |
| 75 | |
| 76 | /* Reset for the most [analog] boards */ |
| 77 | static struct em28xx_reg_seq default_analog[] = { |
| 78 | {EM28XX_R08_GPIO, 0x6d, ~EM_GPIO_4, 10}, |
| 79 | { -1, -1, -1, -1}, |
| 80 | }; |
| 81 | |
| 82 | /* Reset for the most [digital] boards */ |
| 83 | static struct em28xx_reg_seq default_digital[] = { |
| 84 | {EM28XX_R08_GPIO, 0x6e, ~EM_GPIO_4, 10}, |
| 85 | { -1, -1, -1, -1}, |
| 86 | }; |
| 87 | |
| 88 | /* Board Hauppauge WinTV HVR 900 analog */ |
| 89 | static struct em28xx_reg_seq hauppauge_wintv_hvr_900_analog[] = { |
| 90 | {EM28XX_R08_GPIO, 0x2d, ~EM_GPIO_4, 10}, |
| 91 | {0x05, 0xff, 0x10, 10}, |
| 92 | { -1, -1, -1, -1}, |
| 93 | }; |
| 94 | |
| 95 | /* Board Hauppauge WinTV HVR 900 digital */ |
| 96 | static struct em28xx_reg_seq hauppauge_wintv_hvr_900_digital[] = { |
| 97 | {EM28XX_R08_GPIO, 0x2e, ~EM_GPIO_4, 10}, |
| 98 | {EM2880_R04_GPO, 0x04, 0x0f, 10}, |
| 99 | {EM2880_R04_GPO, 0x0c, 0x0f, 10}, |
| 100 | { -1, -1, -1, -1}, |
| 101 | }; |
| 102 | |
| 103 | /* Boards - EM2880 MSI DIGIVOX AD and EM2880_BOARD_MSI_DIGIVOX_AD_II */ |
| 104 | static struct em28xx_reg_seq em2880_msi_digivox_ad_analog[] = { |
| 105 | {EM28XX_R08_GPIO, 0x69, ~EM_GPIO_4, 10}, |
| 106 | { -1, -1, -1, -1}, |
| 107 | }; |
| 108 | |
| 109 | /* 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] | 110 | |
| 111 | /* Board - EM2870 Kworld 355u |
| 112 | Analog - No input analog */ |
Mauro Carvalho Chehab | 0ec202d | 2008-11-25 13:16:13 -0300 | [diff] [blame] | 113 | |
Franklin Meng | d7de5d8 | 2009-06-06 17:05:02 -0300 | [diff] [blame] | 114 | /* Board - EM2882 Kworld 315U digital */ |
| 115 | static struct em28xx_reg_seq em2882_kworld_315u_digital[] = { |
| 116 | {EM28XX_R08_GPIO, 0xff, 0xff, 10}, |
| 117 | {EM28XX_R08_GPIO, 0xfe, 0xff, 10}, |
| 118 | {EM2880_R04_GPO, 0x04, 0xff, 10}, |
| 119 | {EM2880_R04_GPO, 0x0c, 0xff, 10}, |
| 120 | {EM28XX_R08_GPIO, 0x7e, 0xff, 10}, |
| 121 | { -1, -1, -1, -1}, |
| 122 | }; |
| 123 | |
| 124 | static struct em28xx_reg_seq em2882_kworld_315u_tuner_gpio[] = { |
| 125 | {EM2880_R04_GPO, 0x08, 0xff, 10}, |
| 126 | {EM2880_R04_GPO, 0x0c, 0xff, 10}, |
| 127 | {EM2880_R04_GPO, 0x08, 0xff, 10}, |
| 128 | {EM2880_R04_GPO, 0x0c, 0xff, 10}, |
| 129 | { -1, -1, -1, -1}, |
| 130 | }; |
| 131 | |
Robert Krakora | 6e7b9ea | 2009-01-18 21:59:34 -0300 | [diff] [blame] | 132 | static struct em28xx_reg_seq kworld_330u_analog[] = { |
| 133 | {EM28XX_R08_GPIO, 0x6d, ~EM_GPIO_4, 10}, |
| 134 | {EM2880_R04_GPO, 0x00, 0xff, 10}, |
| 135 | { -1, -1, -1, -1}, |
| 136 | }; |
| 137 | |
| 138 | static struct em28xx_reg_seq kworld_330u_digital[] = { |
| 139 | {EM28XX_R08_GPIO, 0x6e, ~EM_GPIO_4, 10}, |
| 140 | {EM2880_R04_GPO, 0x08, 0xff, 10}, |
| 141 | { -1, -1, -1, -1}, |
| 142 | }; |
| 143 | |
Devin Heitmueller | 1985922 | 2009-06-19 00:33:54 -0300 | [diff] [blame] | 144 | /* Evga inDtube |
| 145 | GPIO0 - Enable digital power (s5h1409) - low to enable |
| 146 | GPIO1 - Enable analog power (tvp5150/emp202) - low to enable |
| 147 | GPIO4 - xc3028 reset |
| 148 | GOP3 - s5h1409 reset |
| 149 | */ |
| 150 | static struct em28xx_reg_seq evga_indtube_analog[] = { |
| 151 | {EM28XX_R08_GPIO, 0x79, 0xff, 60}, |
| 152 | { -1, -1, -1, -1}, |
| 153 | }; |
| 154 | |
| 155 | static struct em28xx_reg_seq evga_indtube_digital[] = { |
| 156 | {EM28XX_R08_GPIO, 0x7a, 0xff, 1}, |
| 157 | {EM2880_R04_GPO, 0x04, 0xff, 10}, |
| 158 | {EM2880_R04_GPO, 0x0c, 0xff, 1}, |
| 159 | { -1, -1, -1, -1}, |
| 160 | }; |
| 161 | |
Mauro Carvalho Chehab | 0ec202d | 2008-11-25 13:16:13 -0300 | [diff] [blame] | 162 | /* Callback for the most boards */ |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 163 | static struct em28xx_reg_seq default_tuner_gpio[] = { |
Mauro Carvalho Chehab | 0ec202d | 2008-11-25 13:16:13 -0300 | [diff] [blame] | 164 | {EM28XX_R08_GPIO, EM_GPIO_4, EM_GPIO_4, 10}, |
| 165 | {EM28XX_R08_GPIO, 0, EM_GPIO_4, 10}, |
| 166 | {EM28XX_R08_GPIO, EM_GPIO_4, EM_GPIO_4, 10}, |
| 167 | { -1, -1, -1, -1}, |
| 168 | }; |
| 169 | |
Vitaly Wool | 2bd1d9e | 2009-03-04 08:27:52 -0300 | [diff] [blame] | 170 | /* Mute/unmute */ |
| 171 | static struct em28xx_reg_seq compro_unmute_tv_gpio[] = { |
| 172 | {EM28XX_R08_GPIO, 5, 7, 10}, |
| 173 | { -1, -1, -1, -1}, |
| 174 | }; |
| 175 | |
| 176 | static struct em28xx_reg_seq compro_unmute_svid_gpio[] = { |
| 177 | {EM28XX_R08_GPIO, 4, 7, 10}, |
| 178 | { -1, -1, -1, -1}, |
| 179 | }; |
| 180 | |
| 181 | static struct em28xx_reg_seq compro_mute_gpio[] = { |
| 182 | {EM28XX_R08_GPIO, 6, 7, 10}, |
| 183 | { -1, -1, -1, -1}, |
| 184 | }; |
| 185 | |
Mauro Carvalho Chehab | 766ed64 | 2009-05-24 00:46:01 -0300 | [diff] [blame] | 186 | /* Terratec AV350 */ |
| 187 | static struct em28xx_reg_seq terratec_av350_mute_gpio[] = { |
| 188 | {EM28XX_R08_GPIO, 0xff, 0x7f, 10}, |
| 189 | { -1, -1, -1, -1}, |
| 190 | }; |
| 191 | |
| 192 | static struct em28xx_reg_seq terratec_av350_unmute_gpio[] = { |
| 193 | {EM28XX_R08_GPIO, 0xff, 0xff, 10}, |
| 194 | { -1, -1, -1, -1}, |
| 195 | }; |
Mauro Carvalho Chehab | 02e7804 | 2009-06-29 11:35:05 -0300 | [diff] [blame] | 196 | |
| 197 | static struct em28xx_reg_seq silvercrest_reg_seq[] = { |
| 198 | {EM28XX_R08_GPIO, 0xff, 0xff, 10}, |
| 199 | {EM28XX_R08_GPIO, 0x01, 0xf7, 10}, |
| 200 | { -1, -1, -1, -1}, |
| 201 | }; |
| 202 | |
Mauro Carvalho Chehab | 0ec202d | 2008-11-25 13:16:13 -0300 | [diff] [blame] | 203 | /* |
| 204 | * Board definitions |
| 205 | */ |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 206 | struct em28xx_board em28xx_boards[] = { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 207 | [EM2750_BOARD_UNKNOWN] = { |
| 208 | .name = "Unknown EM2750/EM2751 webcam grabber", |
Mauro Carvalho Chehab | a2070c6 | 2008-11-25 07:05:06 -0300 | [diff] [blame] | 209 | .xclk = EM28XX_XCLK_FREQUENCY_48MHZ, |
Mauro Carvalho Chehab | 1c67e76 | 2008-11-27 07:46:59 -0300 | [diff] [blame] | 210 | .tuner_type = TUNER_ABSENT, /* This is a webcam */ |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 211 | .input = { { |
| 212 | .type = EM28XX_VMUX_COMPOSITE1, |
| 213 | .vmux = 0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 214 | .amux = EM28XX_AMUX_VIDEO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 215 | } }, |
| 216 | }, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 217 | [EM2800_BOARD_UNKNOWN] = { |
| 218 | .name = "Unknown EM2800 video grabber", |
| 219 | .is_em2800 = 1, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 220 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 221 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | 1c67e76 | 2008-11-27 07:46:59 -0300 | [diff] [blame] | 222 | .tuner_type = TUNER_ABSENT, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 223 | .input = { { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 224 | .type = EM28XX_VMUX_COMPOSITE1, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 225 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 226 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 227 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 228 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 229 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 230 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 231 | } }, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 232 | }, |
| 233 | [EM2820_BOARD_UNKNOWN] = { |
Mauro Carvalho Chehab | a2070c6 | 2008-11-25 07:05:06 -0300 | [diff] [blame] | 234 | .name = "Unknown EM2750/28xx video grabber", |
| 235 | .tuner_type = TUNER_ABSENT, |
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 | 1c67e76 | 2008-11-27 07:46:59 -0300 | [diff] [blame] | 242 | .tuner_type = TUNER_ABSENT, /* This is a webcam */ |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 243 | .input = { { |
| 244 | .type = EM28XX_VMUX_COMPOSITE1, |
| 245 | .vmux = 0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 246 | .amux = EM28XX_AMUX_VIDEO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 247 | } }, |
| 248 | }, |
Markus Rechberger | 4d17d08 | 2006-02-07 06:25:39 -0200 | [diff] [blame] | 249 | [EM2820_BOARD_KWORLD_PVRTV2800RF] = { |
Markus Rechberger | 33ccaa3 | 2006-02-07 06:25:41 -0200 | [diff] [blame] | 250 | .name = "Kworld PVR TV 2800 RF", |
Mauro Carvalho Chehab | ed08631 | 2008-01-24 06:59:20 -0300 | [diff] [blame] | 251 | .tuner_type = TUNER_TEMIC_PAL, |
Markus Rechberger | 4d17d08 | 2006-02-07 06:25:39 -0200 | [diff] [blame] | 252 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 253 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 254 | .input = { { |
Markus Rechberger | 4d17d08 | 2006-02-07 06:25:39 -0200 | [diff] [blame] | 255 | .type = EM28XX_VMUX_COMPOSITE1, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 256 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 257 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 258 | }, { |
Markus Rechberger | 4d17d08 | 2006-02-07 06:25:39 -0200 | [diff] [blame] | 259 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 260 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 261 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 262 | } }, |
Markus Rechberger | 4d17d08 | 2006-02-07 06:25:39 -0200 | [diff] [blame] | 263 | }, |
Douglas Schilling Landgraf | f7fe3e6 | 2009-01-19 09:31:55 -0300 | [diff] [blame] | 264 | [EM2820_BOARD_GADMEI_TVR200] = { |
| 265 | .name = "Gadmei TVR200", |
| 266 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
| 267 | .tda9887_conf = TDA9887_PRESENT, |
| 268 | .decoder = EM28XX_SAA711X, |
| 269 | .input = { { |
| 270 | .type = EM28XX_VMUX_TELEVISION, |
| 271 | .vmux = SAA7115_COMPOSITE2, |
| 272 | .amux = EM28XX_AMUX_LINE_IN, |
| 273 | }, { |
| 274 | .type = EM28XX_VMUX_COMPOSITE1, |
| 275 | .vmux = SAA7115_COMPOSITE0, |
| 276 | .amux = EM28XX_AMUX_LINE_IN, |
| 277 | }, { |
| 278 | .type = EM28XX_VMUX_SVIDEO, |
| 279 | .vmux = SAA7115_SVIDEO3, |
| 280 | .amux = EM28XX_AMUX_LINE_IN, |
| 281 | } }, |
| 282 | }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 283 | [EM2820_BOARD_TERRATEC_CINERGY_250] = { |
| 284 | .name = "Terratec Cinergy 250 USB", |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 285 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
| 286 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 287 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 288 | .input = { { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 289 | .type = EM28XX_VMUX_TELEVISION, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 290 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 291 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 292 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 293 | .type = EM28XX_VMUX_COMPOSITE1, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 294 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 295 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 296 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 297 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 298 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 299 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 300 | } }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 301 | }, |
| 302 | [EM2820_BOARD_PINNACLE_USB_2] = { |
| 303 | .name = "Pinnacle PCTV USB 2", |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 304 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
| 305 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 306 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 307 | .input = { { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 308 | .type = EM28XX_VMUX_TELEVISION, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 309 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 310 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 311 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 312 | .type = EM28XX_VMUX_COMPOSITE1, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 313 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 314 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 315 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 316 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 317 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 318 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 319 | } }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 320 | }, |
| 321 | [EM2820_BOARD_HAUPPAUGE_WINTV_USB_2] = { |
| 322 | .name = "Hauppauge WinTV USB 2", |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 323 | .tuner_type = TUNER_PHILIPS_FM1236_MK3, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 324 | .tda9887_conf = TDA9887_PRESENT | |
Nicola Soranzo | a1a6ee7 | 2009-02-10 23:28:24 -0300 | [diff] [blame] | 325 | TDA9887_PORT1_ACTIVE | |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 326 | TDA9887_PORT2_ACTIVE, |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 327 | .decoder = EM28XX_TVP5150, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 328 | .has_msp34xx = 1, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 329 | .input = { { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 330 | .type = EM28XX_VMUX_TELEVISION, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 331 | .vmux = TVP5150_COMPOSITE0, |
Hans Verkuil | 2474ed4 | 2006-03-19 12:35:57 -0300 | [diff] [blame] | 332 | .amux = MSP_INPUT_DEFAULT, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 333 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 334 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 335 | .vmux = TVP5150_SVIDEO, |
Hans Verkuil | 0715172 | 2006-04-01 18:03:23 -0300 | [diff] [blame] | 336 | .amux = MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1, |
| 337 | MSP_DSP_IN_SCART, MSP_DSP_IN_SCART), |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 338 | } }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 339 | }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 340 | [EM2820_BOARD_DLINK_USB_TV] = { |
| 341 | .name = "D-Link DUB-T210 TV Tuner", |
| 342 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 343 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
| 344 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 345 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 346 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 347 | .type = EM28XX_VMUX_TELEVISION, |
| 348 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 349 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 350 | }, { |
| 351 | .type = EM28XX_VMUX_COMPOSITE1, |
| 352 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 353 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 354 | }, { |
| 355 | .type = EM28XX_VMUX_SVIDEO, |
| 356 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 357 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 358 | } }, |
| 359 | }, |
| 360 | [EM2820_BOARD_HERCULES_SMART_TV_USB2] = { |
| 361 | .name = "Hercules Smart TV USB 2.0", |
| 362 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 363 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
| 364 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 365 | .decoder = EM28XX_SAA711X, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 366 | .input = { { |
| 367 | .type = EM28XX_VMUX_TELEVISION, |
| 368 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 369 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 370 | }, { |
| 371 | .type = EM28XX_VMUX_COMPOSITE1, |
| 372 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 373 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 374 | }, { |
| 375 | .type = EM28XX_VMUX_SVIDEO, |
| 376 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 377 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 378 | } }, |
| 379 | }, |
| 380 | [EM2820_BOARD_PINNACLE_USB_2_FM1216ME] = { |
| 381 | .name = "Pinnacle PCTV USB 2 (Philips FM1216ME)", |
| 382 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 383 | .tuner_type = TUNER_PHILIPS_FM1216ME_MK3, |
| 384 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 385 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 386 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 387 | .type = EM28XX_VMUX_TELEVISION, |
| 388 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 389 | .amux = EM28XX_AMUX_VIDEO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 390 | }, { |
| 391 | .type = EM28XX_VMUX_COMPOSITE1, |
| 392 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 393 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 394 | }, { |
| 395 | .type = EM28XX_VMUX_SVIDEO, |
| 396 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 397 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 398 | } }, |
| 399 | }, |
| 400 | [EM2820_BOARD_GADMEI_UTV310] = { |
| 401 | .name = "Gadmei UTV310", |
| 402 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 403 | .tuner_type = TUNER_TNF_5335MF, |
| 404 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 405 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 406 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 407 | .type = EM28XX_VMUX_TELEVISION, |
| 408 | .vmux = SAA7115_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 409 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 410 | }, { |
| 411 | .type = EM28XX_VMUX_COMPOSITE1, |
| 412 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 413 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 414 | }, { |
| 415 | .type = EM28XX_VMUX_SVIDEO, |
| 416 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 417 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 418 | } }, |
| 419 | }, |
| 420 | [EM2820_BOARD_LEADTEK_WINFAST_USBII_DELUXE] = { |
| 421 | .name = "Leadtek Winfast USB II Deluxe", |
| 422 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 423 | .tuner_type = TUNER_PHILIPS_FM1216ME_MK3, |
| 424 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 425 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 426 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 427 | .type = EM28XX_VMUX_TELEVISION, |
Mauro Carvalho Chehab | a5942b5 | 2008-11-27 07:44:00 -0300 | [diff] [blame] | 428 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 429 | .amux = EM28XX_AMUX_VIDEO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 430 | }, { |
| 431 | .type = EM28XX_VMUX_COMPOSITE1, |
Mauro Carvalho Chehab | a5942b5 | 2008-11-27 07:44:00 -0300 | [diff] [blame] | 432 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 433 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 434 | }, { |
| 435 | .type = EM28XX_VMUX_SVIDEO, |
Mauro Carvalho Chehab | a5942b5 | 2008-11-27 07:44:00 -0300 | [diff] [blame] | 436 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 437 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 438 | } }, |
| 439 | }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 440 | [EM2820_BOARD_VIDEOLOGY_20K14XUSB] = { |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 441 | .name = "Videology 20K14XUSB USB2.0", |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 442 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Mauro Carvalho Chehab | 1c67e76 | 2008-11-27 07:46:59 -0300 | [diff] [blame] | 443 | .tuner_type = TUNER_ABSENT, /* This is a webcam */ |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 444 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 445 | .type = EM28XX_VMUX_COMPOSITE1, |
| 446 | .vmux = 0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 447 | .amux = EM28XX_AMUX_VIDEO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 448 | } }, |
| 449 | }, |
Mauro Carvalho Chehab | 02e7804 | 2009-06-29 11:35:05 -0300 | [diff] [blame] | 450 | [EM2820_BOARD_SILVERCREST_WEBCAM] = { |
| 451 | .name = "Silvercrest Webcam 1.3mpix", |
| 452 | .tuner_type = TUNER_ABSENT, |
Mauro Carvalho Chehab | c43221d | 2009-07-12 10:23:23 -0300 | [diff] [blame^] | 453 | .is_webcam = 1, |
Mauro Carvalho Chehab | 02e7804 | 2009-06-29 11:35:05 -0300 | [diff] [blame] | 454 | .decoder = EM28XX_MT9V011, |
| 455 | .input = { { |
| 456 | .type = EM28XX_VMUX_COMPOSITE1, |
| 457 | .vmux = 0, |
| 458 | .amux = EM28XX_AMUX_VIDEO, |
| 459 | .gpio = silvercrest_reg_seq, |
| 460 | } }, |
| 461 | }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 462 | [EM2821_BOARD_SUPERCOMP_USB_2] = { |
| 463 | .name = "Supercomp USB 2.0 TV", |
| 464 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 465 | .tuner_type = TUNER_PHILIPS_FM1236_MK3, |
| 466 | .tda9887_conf = TDA9887_PRESENT | |
| 467 | TDA9887_PORT1_ACTIVE | |
| 468 | TDA9887_PORT2_ACTIVE, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 469 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 470 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 471 | .type = EM28XX_VMUX_TELEVISION, |
| 472 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 473 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 474 | }, { |
| 475 | .type = EM28XX_VMUX_COMPOSITE1, |
| 476 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 477 | .amux = EM28XX_AMUX_VIDEO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 478 | }, { |
| 479 | .type = EM28XX_VMUX_SVIDEO, |
| 480 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 481 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 482 | } }, |
| 483 | }, |
| 484 | [EM2821_BOARD_USBGEAR_VD204] = { |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 485 | .name = "Usbgear VD204v9", |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 486 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Mauro Carvalho Chehab | 1c67e76 | 2008-11-27 07:46:59 -0300 | [diff] [blame] | 487 | .tuner_type = TUNER_ABSENT, /* Capture only device */ |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 488 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 489 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 490 | .type = EM28XX_VMUX_COMPOSITE1, |
| 491 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 492 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 493 | }, { |
| 494 | .type = EM28XX_VMUX_SVIDEO, |
| 495 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 496 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 497 | } }, |
| 498 | }, |
| 499 | [EM2860_BOARD_NETGMBH_CAM] = { |
| 500 | /* Beijing Huaqi Information Digital Technology Co., Ltd */ |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 501 | .name = "NetGMBH Cam", |
| 502 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Mauro Carvalho Chehab | 1c67e76 | 2008-11-27 07:46:59 -0300 | [diff] [blame] | 503 | .tuner_type = TUNER_ABSENT, /* This is a webcam */ |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 504 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 505 | .type = EM28XX_VMUX_COMPOSITE1, |
| 506 | .vmux = 0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 507 | .amux = EM28XX_AMUX_VIDEO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 508 | } }, |
| 509 | }, |
| 510 | [EM2860_BOARD_TYPHOON_DVD_MAKER] = { |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 511 | .name = "Typhoon DVD Maker", |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 512 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | 1c67e76 | 2008-11-27 07:46:59 -0300 | [diff] [blame] | 513 | .tuner_type = TUNER_ABSENT, /* Capture only device */ |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 514 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 515 | .type = EM28XX_VMUX_COMPOSITE1, |
| 516 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 517 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 518 | }, { |
| 519 | .type = EM28XX_VMUX_SVIDEO, |
| 520 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 521 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 522 | } }, |
| 523 | }, |
| 524 | [EM2860_BOARD_GADMEI_UTV330] = { |
| 525 | .name = "Gadmei UTV330", |
| 526 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 527 | .tuner_type = TUNER_TNF_5335MF, |
| 528 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 529 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 530 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 531 | .type = EM28XX_VMUX_TELEVISION, |
| 532 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 533 | .amux = EM28XX_AMUX_VIDEO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 534 | }, { |
| 535 | .type = EM28XX_VMUX_COMPOSITE1, |
| 536 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 537 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 538 | }, { |
| 539 | .type = EM28XX_VMUX_SVIDEO, |
| 540 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 541 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 542 | } }, |
| 543 | }, |
| 544 | [EM2860_BOARD_TERRATEC_HYBRID_XS] = { |
| 545 | .name = "Terratec Cinergy A Hybrid XS", |
| 546 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 547 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 548 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 549 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 550 | |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 551 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 552 | .type = EM28XX_VMUX_TELEVISION, |
| 553 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 554 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 555 | .gpio = hauppauge_wintv_hvr_900_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 556 | }, { |
| 557 | .type = EM28XX_VMUX_COMPOSITE1, |
| 558 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 559 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 560 | .gpio = hauppauge_wintv_hvr_900_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 561 | }, { |
| 562 | .type = EM28XX_VMUX_SVIDEO, |
| 563 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 564 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 565 | .gpio = hauppauge_wintv_hvr_900_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 566 | } }, |
| 567 | }, |
| 568 | [EM2861_BOARD_KWORLD_PVRTV_300U] = { |
| 569 | .name = "KWorld PVRTV 300U", |
| 570 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 571 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 572 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 573 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 574 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 575 | .type = EM28XX_VMUX_TELEVISION, |
| 576 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 577 | .amux = EM28XX_AMUX_VIDEO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 578 | }, { |
| 579 | .type = EM28XX_VMUX_COMPOSITE1, |
| 580 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 581 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 582 | }, { |
| 583 | .type = EM28XX_VMUX_SVIDEO, |
| 584 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 585 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 586 | } }, |
| 587 | }, |
| 588 | [EM2861_BOARD_YAKUMO_MOVIE_MIXER] = { |
| 589 | .name = "Yakumo MovieMixer", |
Nicola Soranzo | a1a6ee7 | 2009-02-10 23:28:24 -0300 | [diff] [blame] | 590 | .tuner_type = TUNER_ABSENT, /* Capture only device */ |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 591 | .decoder = EM28XX_TVP5150, |
| 592 | .input = { { |
| 593 | .type = EM28XX_VMUX_TELEVISION, |
| 594 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 595 | .amux = EM28XX_AMUX_VIDEO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 596 | }, { |
| 597 | .type = EM28XX_VMUX_COMPOSITE1, |
| 598 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 599 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 600 | }, { |
| 601 | .type = EM28XX_VMUX_SVIDEO, |
| 602 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 603 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 604 | } }, |
| 605 | }, |
| 606 | [EM2861_BOARD_PLEXTOR_PX_TV100U] = { |
| 607 | .name = "Plextor ConvertX PX-TV100U", |
| 608 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 609 | .tuner_type = TUNER_TNF_5335MF, |
| 610 | .tda9887_conf = TDA9887_PRESENT, |
| 611 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 612 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 613 | .type = EM28XX_VMUX_TELEVISION, |
| 614 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 615 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 616 | }, { |
| 617 | .type = EM28XX_VMUX_COMPOSITE1, |
| 618 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 619 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 620 | }, { |
| 621 | .type = EM28XX_VMUX_SVIDEO, |
| 622 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 623 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 624 | } }, |
| 625 | }, |
Mauro Carvalho Chehab | 1c67e76 | 2008-11-27 07:46:59 -0300 | [diff] [blame] | 626 | |
| 627 | /* Those boards with em2870 are DVB Only*/ |
| 628 | |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 629 | [EM2870_BOARD_TERRATEC_XS] = { |
| 630 | .name = "Terratec Cinergy T XS", |
| 631 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
| 632 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 633 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 634 | }, |
| 635 | [EM2870_BOARD_TERRATEC_XS_MT2060] = { |
| 636 | .name = "Terratec Cinergy T XS (MT2060)", |
| 637 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
| 638 | .tuner_type = TUNER_ABSENT, /* MT2060 */ |
| 639 | }, |
| 640 | [EM2870_BOARD_KWORLD_350U] = { |
| 641 | .name = "Kworld 350 U DVB-T", |
| 642 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
| 643 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 644 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 645 | }, |
| 646 | [EM2870_BOARD_KWORLD_355U] = { |
| 647 | .name = "Kworld 355 U DVB-T", |
| 648 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
| 649 | }, |
| 650 | [EM2870_BOARD_PINNACLE_PCTV_DVB] = { |
| 651 | .name = "Pinnacle PCTV DVB-T", |
| 652 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
| 653 | .tuner_type = TUNER_ABSENT, /* MT2060 */ |
Mauro Carvalho Chehab | a2070c6 | 2008-11-25 07:05:06 -0300 | [diff] [blame] | 654 | /* djh - I have serious doubts this is right... */ |
| 655 | .xclk = EM28XX_XCLK_IR_RC5_MODE | |
| 656 | EM28XX_XCLK_FREQUENCY_10MHZ, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 657 | }, |
| 658 | [EM2870_BOARD_COMPRO_VIDEOMATE] = { |
| 659 | .name = "Compro, VideoMate U3", |
| 660 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
| 661 | .tuner_type = TUNER_ABSENT, /* MT2060 */ |
| 662 | }, |
Mauro Carvalho Chehab | 1c67e76 | 2008-11-27 07:46:59 -0300 | [diff] [blame] | 663 | |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 664 | [EM2880_BOARD_TERRATEC_HYBRID_XS_FR] = { |
| 665 | .name = "Terratec Hybrid XS Secam", |
| 666 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 667 | .has_msp34xx = 1, |
| 668 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 669 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 670 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 671 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 672 | .type = EM28XX_VMUX_TELEVISION, |
| 673 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 674 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 675 | .gpio = default_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 676 | }, { |
| 677 | .type = EM28XX_VMUX_COMPOSITE1, |
| 678 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 679 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 680 | .gpio = default_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 681 | }, { |
| 682 | .type = EM28XX_VMUX_SVIDEO, |
| 683 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 684 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 685 | .gpio = default_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 686 | } }, |
| 687 | }, |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 688 | [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900] = { |
Aidan Thornton | 122d158 | 2007-11-20 15:25:08 -0300 | [diff] [blame] | 689 | .name = "Hauppauge WinTV HVR 900", |
Aidan Thornton | 122d158 | 2007-11-20 15:25:08 -0300 | [diff] [blame] | 690 | .tda9887_conf = TDA9887_PRESENT, |
| 691 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 692 | .tuner_gpio = default_tuner_gpio, |
Mauro Carvalho Chehab | 5add9a6 | 2007-11-22 12:08:53 -0300 | [diff] [blame] | 693 | .mts_firmware = 1, |
Mauro Carvalho Chehab | a2070c6 | 2008-11-25 07:05:06 -0300 | [diff] [blame] | 694 | .has_dvb = 1, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 695 | .dvb_gpio = hauppauge_wintv_hvr_900_digital, |
Devin Heitmueller | 62cfc34 | 2009-03-22 22:58:46 -0300 | [diff] [blame] | 696 | .ir_codes = ir_codes_hauppauge_new, |
Aidan Thornton | 122d158 | 2007-11-20 15:25:08 -0300 | [diff] [blame] | 697 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 698 | .input = { { |
Aidan Thornton | 122d158 | 2007-11-20 15:25:08 -0300 | [diff] [blame] | 699 | .type = EM28XX_VMUX_TELEVISION, |
| 700 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 701 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 702 | .gpio = hauppauge_wintv_hvr_900_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 703 | }, { |
Aidan Thornton | 122d158 | 2007-11-20 15:25:08 -0300 | [diff] [blame] | 704 | .type = EM28XX_VMUX_COMPOSITE1, |
| 705 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 706 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 707 | .gpio = hauppauge_wintv_hvr_900_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 708 | }, { |
Aidan Thornton | 122d158 | 2007-11-20 15:25:08 -0300 | [diff] [blame] | 709 | .type = EM28XX_VMUX_SVIDEO, |
| 710 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 711 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 712 | .gpio = hauppauge_wintv_hvr_900_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 713 | } }, |
Aidan Thornton | 122d158 | 2007-11-20 15:25:08 -0300 | [diff] [blame] | 714 | }, |
Devin Heitmueller | 17d9d55 | 2008-06-08 10:22:03 -0300 | [diff] [blame] | 715 | [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2] = { |
| 716 | .name = "Hauppauge WinTV HVR 900 (R2)", |
Devin Heitmueller | 17d9d55 | 2008-06-08 10:22:03 -0300 | [diff] [blame] | 717 | .tda9887_conf = TDA9887_PRESENT, |
| 718 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 719 | .tuner_gpio = default_tuner_gpio, |
Devin Heitmueller | 17d9d55 | 2008-06-08 10:22:03 -0300 | [diff] [blame] | 720 | .mts_firmware = 1, |
Devin Heitmueller | 62cfc34 | 2009-03-22 22:58:46 -0300 | [diff] [blame] | 721 | .ir_codes = ir_codes_hauppauge_new, |
Devin Heitmueller | 17d9d55 | 2008-06-08 10:22:03 -0300 | [diff] [blame] | 722 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 723 | .input = { { |
Devin Heitmueller | 17d9d55 | 2008-06-08 10:22:03 -0300 | [diff] [blame] | 724 | .type = EM28XX_VMUX_TELEVISION, |
| 725 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 726 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 727 | .gpio = hauppauge_wintv_hvr_900_analog, |
Devin Heitmueller | 17d9d55 | 2008-06-08 10:22:03 -0300 | [diff] [blame] | 728 | }, { |
| 729 | .type = EM28XX_VMUX_COMPOSITE1, |
| 730 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | a5942b5 | 2008-11-27 07:44:00 -0300 | [diff] [blame] | 731 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 732 | .gpio = hauppauge_wintv_hvr_900_analog, |
Devin Heitmueller | 17d9d55 | 2008-06-08 10:22:03 -0300 | [diff] [blame] | 733 | }, { |
| 734 | .type = EM28XX_VMUX_SVIDEO, |
| 735 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 736 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 737 | .gpio = hauppauge_wintv_hvr_900_analog, |
Devin Heitmueller | 17d9d55 | 2008-06-08 10:22:03 -0300 | [diff] [blame] | 738 | } }, |
| 739 | }, |
Douglas Schilling Landgraf | f89bc32 | 2008-12-01 21:01:04 -0300 | [diff] [blame] | 740 | [EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850] = { |
| 741 | .name = "Hauppauge WinTV HVR 850", |
| 742 | .tuner_type = TUNER_XC2028, |
| 743 | .tuner_gpio = default_tuner_gpio, |
| 744 | .mts_firmware = 1, |
| 745 | .has_dvb = 1, |
| 746 | .dvb_gpio = hauppauge_wintv_hvr_900_digital, |
| 747 | .ir_codes = ir_codes_hauppauge_new, |
| 748 | .decoder = EM28XX_TVP5150, |
| 749 | .input = { { |
| 750 | .type = EM28XX_VMUX_TELEVISION, |
| 751 | .vmux = TVP5150_COMPOSITE0, |
| 752 | .amux = EM28XX_AMUX_VIDEO, |
| 753 | .gpio = hauppauge_wintv_hvr_900_analog, |
| 754 | }, { |
| 755 | .type = EM28XX_VMUX_COMPOSITE1, |
| 756 | .vmux = TVP5150_COMPOSITE1, |
| 757 | .amux = EM28XX_AMUX_LINE_IN, |
| 758 | .gpio = hauppauge_wintv_hvr_900_analog, |
| 759 | }, { |
| 760 | .type = EM28XX_VMUX_SVIDEO, |
| 761 | .vmux = TVP5150_SVIDEO, |
| 762 | .amux = EM28XX_AMUX_LINE_IN, |
| 763 | .gpio = hauppauge_wintv_hvr_900_analog, |
| 764 | } }, |
| 765 | }, |
Mauro Carvalho Chehab | 10ac660 | 2008-07-27 14:58:58 -0300 | [diff] [blame] | 766 | [EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950] = { |
Mauro Carvalho Chehab | 3abee53 | 2008-01-05 17:01:41 -0300 | [diff] [blame] | 767 | .name = "Hauppauge WinTV HVR 950", |
Mauro Carvalho Chehab | 3abee53 | 2008-01-05 17:01:41 -0300 | [diff] [blame] | 768 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 769 | .tuner_gpio = default_tuner_gpio, |
Mauro Carvalho Chehab | 3abee53 | 2008-01-05 17:01:41 -0300 | [diff] [blame] | 770 | .mts_firmware = 1, |
Mauro Carvalho Chehab | 227ad4a | 2008-04-17 21:37:40 -0300 | [diff] [blame] | 771 | .has_dvb = 1, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 772 | .dvb_gpio = hauppauge_wintv_hvr_900_digital, |
Devin Heitmueller | 4b92253 | 2008-11-13 03:15:55 -0300 | [diff] [blame] | 773 | .ir_codes = ir_codes_hauppauge_new, |
Mauro Carvalho Chehab | 3abee53 | 2008-01-05 17:01:41 -0300 | [diff] [blame] | 774 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 775 | .input = { { |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 776 | .type = EM28XX_VMUX_TELEVISION, |
| 777 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 778 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 779 | .gpio = hauppauge_wintv_hvr_900_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 780 | }, { |
Mauro Carvalho Chehab | 7d070e2 | 2007-11-01 21:52:58 -0300 | [diff] [blame] | 781 | .type = EM28XX_VMUX_COMPOSITE1, |
| 782 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 783 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 784 | .gpio = hauppauge_wintv_hvr_900_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 785 | }, { |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 786 | .type = EM28XX_VMUX_SVIDEO, |
| 787 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 788 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 789 | .gpio = hauppauge_wintv_hvr_900_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 790 | } }, |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 791 | }, |
Devin Heitmueller | 4fd305b | 2008-06-04 13:43:46 -0300 | [diff] [blame] | 792 | [EM2880_BOARD_PINNACLE_PCTV_HD_PRO] = { |
| 793 | .name = "Pinnacle PCTV HD Pro Stick", |
Devin Heitmueller | 4fd305b | 2008-06-04 13:43:46 -0300 | [diff] [blame] | 794 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 795 | .tuner_gpio = default_tuner_gpio, |
Devin Heitmueller | 4fd305b | 2008-06-04 13:43:46 -0300 | [diff] [blame] | 796 | .mts_firmware = 1, |
Devin Heitmueller | 4fd305b | 2008-06-04 13:43:46 -0300 | [diff] [blame] | 797 | .has_dvb = 1, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 798 | .dvb_gpio = hauppauge_wintv_hvr_900_digital, |
Devin Heitmueller | 4b92253 | 2008-11-13 03:15:55 -0300 | [diff] [blame] | 799 | .ir_codes = ir_codes_pinnacle_pctv_hd, |
Devin Heitmueller | 4fd305b | 2008-06-04 13:43:46 -0300 | [diff] [blame] | 800 | .decoder = EM28XX_TVP5150, |
| 801 | .input = { { |
| 802 | .type = EM28XX_VMUX_TELEVISION, |
| 803 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 804 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 805 | .gpio = hauppauge_wintv_hvr_900_analog, |
Devin Heitmueller | 4fd305b | 2008-06-04 13:43:46 -0300 | [diff] [blame] | 806 | }, { |
| 807 | .type = EM28XX_VMUX_COMPOSITE1, |
| 808 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 809 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 810 | .gpio = hauppauge_wintv_hvr_900_analog, |
Devin Heitmueller | 4fd305b | 2008-06-04 13:43:46 -0300 | [diff] [blame] | 811 | }, { |
| 812 | .type = EM28XX_VMUX_SVIDEO, |
| 813 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 814 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 815 | .gpio = hauppauge_wintv_hvr_900_analog, |
Devin Heitmueller | 4fd305b | 2008-06-04 13:43:46 -0300 | [diff] [blame] | 816 | } }, |
| 817 | }, |
Devin Heitmueller | e14b365 | 2008-07-26 11:04:33 -0300 | [diff] [blame] | 818 | [EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600] = { |
| 819 | .name = "AMD ATI TV Wonder HD 600", |
Devin Heitmueller | e14b365 | 2008-07-26 11:04:33 -0300 | [diff] [blame] | 820 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 821 | .tuner_gpio = default_tuner_gpio, |
Devin Heitmueller | e14b365 | 2008-07-26 11:04:33 -0300 | [diff] [blame] | 822 | .mts_firmware = 1, |
Devin Heitmueller | e14b365 | 2008-07-26 11:04:33 -0300 | [diff] [blame] | 823 | .has_dvb = 1, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 824 | .dvb_gpio = hauppauge_wintv_hvr_900_digital, |
Devin Heitmueller | 60245e8 | 2008-11-16 08:03:53 -0300 | [diff] [blame] | 825 | .ir_codes = ir_codes_ati_tv_wonder_hd_600, |
Devin Heitmueller | e14b365 | 2008-07-26 11:04:33 -0300 | [diff] [blame] | 826 | .decoder = EM28XX_TVP5150, |
| 827 | .input = { { |
| 828 | .type = EM28XX_VMUX_TELEVISION, |
| 829 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 830 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 831 | .gpio = hauppauge_wintv_hvr_900_analog, |
Devin Heitmueller | e14b365 | 2008-07-26 11:04:33 -0300 | [diff] [blame] | 832 | }, { |
| 833 | .type = EM28XX_VMUX_COMPOSITE1, |
| 834 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 835 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 836 | .gpio = hauppauge_wintv_hvr_900_analog, |
Devin Heitmueller | e14b365 | 2008-07-26 11:04:33 -0300 | [diff] [blame] | 837 | }, { |
| 838 | .type = EM28XX_VMUX_SVIDEO, |
| 839 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 840 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 841 | .gpio = hauppauge_wintv_hvr_900_analog, |
Devin Heitmueller | e14b365 | 2008-07-26 11:04:33 -0300 | [diff] [blame] | 842 | } }, |
| 843 | }, |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 844 | [EM2880_BOARD_TERRATEC_HYBRID_XS] = { |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 845 | .name = "Terratec Hybrid XS", |
| 846 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 847 | .tuner_gpio = default_tuner_gpio, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 848 | .decoder = EM28XX_TVP5150, |
reinhard schwab | 655b840 | 2008-07-26 10:47:00 -0300 | [diff] [blame] | 849 | .has_dvb = 1, |
Devin Heitmueller | f797608 | 2009-06-22 22:32:32 -0300 | [diff] [blame] | 850 | .dvb_gpio = default_digital, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 851 | .input = { { |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 852 | .type = EM28XX_VMUX_TELEVISION, |
| 853 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 854 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 855 | .gpio = default_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 856 | }, { |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 857 | .type = EM28XX_VMUX_COMPOSITE1, |
| 858 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 859 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 860 | .gpio = default_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 861 | }, { |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 862 | .type = EM28XX_VMUX_SVIDEO, |
| 863 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 864 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 865 | .gpio = default_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 866 | } }, |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 867 | }, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 868 | /* maybe there's a reason behind it why Terratec sells the Hybrid XS |
| 869 | as Prodigy XS with a different PID, let's keep it separated for now |
| 870 | maybe we'll need it lateron */ |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 871 | [EM2880_BOARD_TERRATEC_PRODIGY_XS] = { |
| 872 | .name = "Terratec Prodigy XS", |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 873 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 874 | .tuner_gpio = default_tuner_gpio, |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 875 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 876 | .input = { { |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 877 | .type = EM28XX_VMUX_TELEVISION, |
| 878 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 879 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 880 | .gpio = hauppauge_wintv_hvr_900_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 881 | }, { |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 882 | .type = EM28XX_VMUX_COMPOSITE1, |
| 883 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 884 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 885 | .gpio = hauppauge_wintv_hvr_900_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 886 | }, { |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 887 | .type = EM28XX_VMUX_SVIDEO, |
| 888 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 889 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 890 | .gpio = hauppauge_wintv_hvr_900_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 891 | } }, |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 892 | }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 893 | [EM2820_BOARD_MSI_VOX_USB_2] = { |
Mauro Carvalho Chehab | c8793b0 | 2008-01-13 15:42:17 -0300 | [diff] [blame] | 894 | .name = "MSI VOX USB 2.0", |
Mauro Carvalho Chehab | c8793b0 | 2008-01-13 15:42:17 -0300 | [diff] [blame] | 895 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
| 896 | .tda9887_conf = TDA9887_PRESENT | |
| 897 | TDA9887_PORT1_ACTIVE | |
| 898 | TDA9887_PORT2_ACTIVE, |
Mauro Carvalho Chehab | c8793b0 | 2008-01-13 15:42:17 -0300 | [diff] [blame] | 899 | .max_range_640_480 = 1, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 900 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | c8793b0 | 2008-01-13 15:42:17 -0300 | [diff] [blame] | 901 | .input = { { |
| 902 | .type = EM28XX_VMUX_TELEVISION, |
| 903 | .vmux = SAA7115_COMPOSITE4, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 904 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 905 | }, { |
Mauro Carvalho Chehab | c8793b0 | 2008-01-13 15:42:17 -0300 | [diff] [blame] | 906 | .type = EM28XX_VMUX_COMPOSITE1, |
| 907 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 908 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 909 | }, { |
Mauro Carvalho Chehab | c8793b0 | 2008-01-13 15:42:17 -0300 | [diff] [blame] | 910 | .type = EM28XX_VMUX_SVIDEO, |
| 911 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 912 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 913 | } }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 914 | }, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 915 | [EM2800_BOARD_TERRATEC_CINERGY_200] = { |
| 916 | .name = "Terratec Cinergy 200 USB", |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 917 | .is_em2800 = 1, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 918 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
| 919 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 920 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 921 | .input = { { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 922 | .type = EM28XX_VMUX_TELEVISION, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 923 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 924 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 925 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 926 | .type = EM28XX_VMUX_COMPOSITE1, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 927 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 928 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 929 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 930 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 931 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 932 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 933 | } }, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 934 | }, |
Aron Szabo | 59d07f1 | 2008-07-27 13:47:52 -0300 | [diff] [blame] | 935 | [EM2800_BOARD_GRABBEEX_USB2800] = { |
Nicola Soranzo | a1a6ee7 | 2009-02-10 23:28:24 -0300 | [diff] [blame] | 936 | .name = "eMPIA Technology, Inc. GrabBeeX+ Video Encoder", |
| 937 | .is_em2800 = 1, |
| 938 | .decoder = EM28XX_SAA711X, |
| 939 | .tuner_type = TUNER_ABSENT, /* capture only board */ |
| 940 | .input = { { |
Aron Szabo | 59d07f1 | 2008-07-27 13:47:52 -0300 | [diff] [blame] | 941 | .type = EM28XX_VMUX_COMPOSITE1, |
| 942 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 943 | .amux = EM28XX_AMUX_LINE_IN, |
Aron Szabo | 59d07f1 | 2008-07-27 13:47:52 -0300 | [diff] [blame] | 944 | }, { |
| 945 | .type = EM28XX_VMUX_SVIDEO, |
| 946 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 947 | .amux = EM28XX_AMUX_LINE_IN, |
Aron Szabo | 59d07f1 | 2008-07-27 13:47:52 -0300 | [diff] [blame] | 948 | } }, |
| 949 | }, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 950 | [EM2800_BOARD_LEADTEK_WINFAST_USBII] = { |
| 951 | .name = "Leadtek Winfast USB II", |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 952 | .is_em2800 = 1, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 953 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
| 954 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 955 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 956 | .input = { { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 957 | .type = EM28XX_VMUX_TELEVISION, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 958 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 959 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 960 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 961 | .type = EM28XX_VMUX_COMPOSITE1, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 962 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 963 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 964 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 965 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 966 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 967 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 968 | } }, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 969 | }, |
| 970 | [EM2800_BOARD_KWORLD_USB2800] = { |
| 971 | .name = "Kworld USB2800", |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 972 | .is_em2800 = 1, |
Michael Krufky | ab8b870 | 2008-04-22 14:46:05 -0300 | [diff] [blame] | 973 | .tuner_type = TUNER_PHILIPS_FCV1236D, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 974 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 975 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 976 | .input = { { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 977 | .type = EM28XX_VMUX_TELEVISION, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 978 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 979 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 980 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 981 | .type = EM28XX_VMUX_COMPOSITE1, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 982 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 983 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 984 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 985 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 986 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 987 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 988 | } }, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 989 | }, |
Mauro Carvalho Chehab | 45632c4 | 2005-11-08 21:38:15 -0800 | [diff] [blame] | 990 | [EM2820_BOARD_PINNACLE_DVC_90] = { |
Douglas Schilling Landgraf | ac40d9e | 2009-02-25 16:55:48 -0300 | [diff] [blame] | 991 | .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] | 992 | .tuner_type = TUNER_ABSENT, /* capture only board */ |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 993 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 994 | .input = { { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 995 | .type = EM28XX_VMUX_COMPOSITE1, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 996 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 997 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 998 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 999 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 1000 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1001 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1002 | } }, |
Mauro Carvalho Chehab | 45632c4 | 2005-11-08 21:38:15 -0800 | [diff] [blame] | 1003 | }, |
Sascha Sommer | 4362559 | 2007-11-03 15:05:07 -0300 | [diff] [blame] | 1004 | [EM2800_BOARD_VGEAR_POCKETTV] = { |
| 1005 | .name = "V-Gear PocketTV", |
| 1006 | .is_em2800 = 1, |
Sascha Sommer | 4362559 | 2007-11-03 15:05:07 -0300 | [diff] [blame] | 1007 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
| 1008 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 1009 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1010 | .input = { { |
Sascha Sommer | 4362559 | 2007-11-03 15:05:07 -0300 | [diff] [blame] | 1011 | .type = EM28XX_VMUX_TELEVISION, |
| 1012 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1013 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1014 | }, { |
Sascha Sommer | 4362559 | 2007-11-03 15:05:07 -0300 | [diff] [blame] | 1015 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1016 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1017 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1018 | }, { |
Sascha Sommer | 4362559 | 2007-11-03 15:05:07 -0300 | [diff] [blame] | 1019 | .type = EM28XX_VMUX_SVIDEO, |
| 1020 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1021 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1022 | } }, |
Sascha Sommer | 4362559 | 2007-11-03 15:05:07 -0300 | [diff] [blame] | 1023 | }, |
Douglas Schilling Landgraf | 1e1addd | 2008-12-27 21:38:14 -0300 | [diff] [blame] | 1024 | [EM2820_BOARD_PROLINK_PLAYTV_BOX4_USB2] = { |
| 1025 | .name = "Pixelview PlayTV Box 4 USB 2.0", |
| 1026 | .tda9887_conf = TDA9887_PRESENT, |
| 1027 | .tuner_type = TUNER_YMEC_TVF_5533MF, |
| 1028 | .decoder = EM28XX_SAA711X, |
| 1029 | .input = { { |
| 1030 | .type = EM28XX_VMUX_TELEVISION, |
| 1031 | .vmux = SAA7115_COMPOSITE2, |
| 1032 | .amux = EM28XX_AMUX_VIDEO, |
| 1033 | .aout = EM28XX_AOUT_MONO | /* I2S */ |
| 1034 | EM28XX_AOUT_MASTER, /* Line out pin */ |
| 1035 | }, { |
| 1036 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1037 | .vmux = SAA7115_COMPOSITE0, |
| 1038 | .amux = EM28XX_AMUX_LINE_IN, |
| 1039 | }, { |
| 1040 | .type = EM28XX_VMUX_SVIDEO, |
| 1041 | .vmux = SAA7115_SVIDEO3, |
| 1042 | .amux = EM28XX_AMUX_LINE_IN, |
| 1043 | } }, |
| 1044 | }, |
Mauro Carvalho Chehab | ea4fd56 | 2007-11-03 21:21:57 -0300 | [diff] [blame] | 1045 | [EM2820_BOARD_PROLINK_PLAYTV_USB2] = { |
Douglas Schilling Landgraf | 1f372a9 | 2009-02-25 16:54:31 -0300 | [diff] [blame] | 1046 | .name = "SIIG AVTuner-PVR / Pixelview Prolink PlayTV USB 2.0", |
Douglas Schilling Landgraf | 5609cfd | 2008-12-27 21:39:35 -0300 | [diff] [blame] | 1047 | .has_snapshot_button = 1, |
Mauro Carvalho Chehab | ea4fd56 | 2007-11-03 21:21:57 -0300 | [diff] [blame] | 1048 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ed08631 | 2008-01-24 06:59:20 -0300 | [diff] [blame] | 1049 | .tuner_type = TUNER_YMEC_TVF_5533MF, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 1050 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1051 | .input = { { |
Mauro Carvalho Chehab | ea4fd56 | 2007-11-03 21:21:57 -0300 | [diff] [blame] | 1052 | .type = EM28XX_VMUX_TELEVISION, |
| 1053 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 30e4ac7 | 2008-11-20 13:43:05 -0300 | [diff] [blame] | 1054 | .amux = EM28XX_AMUX_VIDEO, |
| 1055 | .aout = EM28XX_AOUT_MONO | /* I2S */ |
| 1056 | EM28XX_AOUT_MASTER, /* Line out pin */ |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1057 | }, { |
Mauro Carvalho Chehab | ea4fd56 | 2007-11-03 21:21:57 -0300 | [diff] [blame] | 1058 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1059 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 7463dda | 2008-02-05 22:29:26 -0300 | [diff] [blame] | 1060 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1061 | }, { |
Mauro Carvalho Chehab | ea4fd56 | 2007-11-03 21:21:57 -0300 | [diff] [blame] | 1062 | .type = EM28XX_VMUX_SVIDEO, |
| 1063 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 7463dda | 2008-02-05 22:29:26 -0300 | [diff] [blame] | 1064 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1065 | } }, |
Mauro Carvalho Chehab | ea4fd56 | 2007-11-03 21:21:57 -0300 | [diff] [blame] | 1066 | }, |
Devin Heitmueller | 3ed58ba | 2009-05-27 23:27:26 -0300 | [diff] [blame] | 1067 | [EM2860_BOARD_SAA711X_REFERENCE_DESIGN] = { |
| 1068 | .name = "EM2860/SAA711X Reference Design", |
Devin Heitmueller | a9fc52b | 2008-06-28 08:57:06 -0300 | [diff] [blame] | 1069 | .has_snapshot_button = 1, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1070 | .tuner_type = TUNER_ABSENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 1071 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1072 | .input = { { |
Devin Heitmueller | a9fc52b | 2008-06-28 08:57:06 -0300 | [diff] [blame] | 1073 | .type = EM28XX_VMUX_SVIDEO, |
| 1074 | .vmux = SAA7115_SVIDEO3, |
Devin Heitmueller | 3ed58ba | 2009-05-27 23:27:26 -0300 | [diff] [blame] | 1075 | }, { |
| 1076 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1077 | .vmux = SAA7115_COMPOSITE0, |
Devin Heitmueller | a9fc52b | 2008-06-28 08:57:06 -0300 | [diff] [blame] | 1078 | } }, |
| 1079 | }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1080 | [EM2880_BOARD_MSI_DIGIVOX_AD] = { |
| 1081 | .name = "MSI DigiVox A/D", |
| 1082 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1083 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1084 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1085 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1086 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1087 | .type = EM28XX_VMUX_TELEVISION, |
| 1088 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1089 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1090 | .gpio = em2880_msi_digivox_ad_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1091 | }, { |
| 1092 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1093 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1094 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1095 | .gpio = em2880_msi_digivox_ad_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1096 | }, { |
| 1097 | .type = EM28XX_VMUX_SVIDEO, |
| 1098 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1099 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1100 | .gpio = em2880_msi_digivox_ad_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1101 | } }, |
| 1102 | }, |
| 1103 | [EM2880_BOARD_MSI_DIGIVOX_AD_II] = { |
| 1104 | .name = "MSI DigiVox A/D II", |
| 1105 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1106 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1107 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1108 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1109 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1110 | .type = EM28XX_VMUX_TELEVISION, |
| 1111 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1112 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1113 | .gpio = em2880_msi_digivox_ad_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1114 | }, { |
| 1115 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1116 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1117 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1118 | .gpio = em2880_msi_digivox_ad_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1119 | }, { |
| 1120 | .type = EM28XX_VMUX_SVIDEO, |
| 1121 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1122 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1123 | .gpio = em2880_msi_digivox_ad_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1124 | } }, |
| 1125 | }, |
| 1126 | [EM2880_BOARD_KWORLD_DVB_305U] = { |
| 1127 | .name = "KWorld DVB-T 305U", |
| 1128 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1129 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1130 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1131 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1132 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1133 | .type = EM28XX_VMUX_TELEVISION, |
| 1134 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1135 | .amux = EM28XX_AMUX_VIDEO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1136 | }, { |
| 1137 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1138 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1139 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1140 | }, { |
| 1141 | .type = EM28XX_VMUX_SVIDEO, |
| 1142 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1143 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1144 | } }, |
| 1145 | }, |
| 1146 | [EM2880_BOARD_KWORLD_DVB_310U] = { |
| 1147 | .name = "KWorld DVB-T 310U", |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1148 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1149 | .tuner_gpio = default_tuner_gpio, |
Darron Broad | da3808e | 2008-09-30 02:46:41 -0300 | [diff] [blame] | 1150 | .has_dvb = 1, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1151 | .dvb_gpio = default_digital, |
Darron Broad | da3808e | 2008-09-30 02:46:41 -0300 | [diff] [blame] | 1152 | .mts_firmware = 1, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1153 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1154 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1155 | .type = EM28XX_VMUX_TELEVISION, |
| 1156 | .vmux = TVP5150_COMPOSITE0, |
Darron Broad | da3808e | 2008-09-30 02:46:41 -0300 | [diff] [blame] | 1157 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1158 | .gpio = default_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1159 | }, { |
| 1160 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1161 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | a42aa19 | 2008-11-19 11:08:53 -0300 | [diff] [blame] | 1162 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1163 | .gpio = default_analog, |
Darron Broad | da3808e | 2008-09-30 02:46:41 -0300 | [diff] [blame] | 1164 | }, { /* S-video has not been tested yet */ |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1165 | .type = EM28XX_VMUX_SVIDEO, |
| 1166 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | a42aa19 | 2008-11-19 11:08:53 -0300 | [diff] [blame] | 1167 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1168 | .gpio = default_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1169 | } }, |
| 1170 | }, |
Franklin Meng | d7de5d8 | 2009-06-06 17:05:02 -0300 | [diff] [blame] | 1171 | [EM2882_BOARD_KWORLD_ATSC_315U] = { |
| 1172 | .name = "KWorld ATSC 315U HDTV TV Box", |
| 1173 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
| 1174 | .tuner_type = TUNER_THOMSON_DTT761X, |
| 1175 | .tuner_gpio = em2882_kworld_315u_tuner_gpio, |
| 1176 | .tda9887_conf = TDA9887_PRESENT, |
| 1177 | .decoder = EM28XX_SAA711X, |
| 1178 | .has_dvb = 1, |
| 1179 | .dvb_gpio = em2882_kworld_315u_digital, |
| 1180 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, |
| 1181 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE, |
| 1182 | /* Analog mode - still not ready */ |
| 1183 | /*.input = { { |
| 1184 | .type = EM28XX_VMUX_TELEVISION, |
| 1185 | .vmux = SAA7115_COMPOSITE2, |
| 1186 | .amux = EM28XX_AMUX_VIDEO, |
| 1187 | .gpio = em2882_kworld_315u_analog, |
| 1188 | .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO, |
| 1189 | }, { |
| 1190 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1191 | .vmux = SAA7115_COMPOSITE0, |
| 1192 | .amux = EM28XX_AMUX_LINE_IN, |
| 1193 | .gpio = em2882_kworld_315u_analog1, |
| 1194 | .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO, |
| 1195 | }, { |
| 1196 | .type = EM28XX_VMUX_SVIDEO, |
| 1197 | .vmux = SAA7115_SVIDEO3, |
| 1198 | .amux = EM28XX_AMUX_LINE_IN, |
| 1199 | .gpio = em2882_kworld_315u_analog1, |
| 1200 | .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO, |
| 1201 | } }, */ |
| 1202 | }, |
Douglas Schilling Landgraf | e5db5d4 | 2009-04-09 18:24:34 -0300 | [diff] [blame] | 1203 | [EM2880_BOARD_EMPIRE_DUAL_TV] = { |
| 1204 | .name = "Empire dual TV", |
| 1205 | .tuner_type = TUNER_XC2028, |
| 1206 | .tuner_gpio = default_tuner_gpio, |
| 1207 | .has_dvb = 1, |
| 1208 | .dvb_gpio = default_digital, |
| 1209 | .mts_firmware = 1, |
| 1210 | .decoder = EM28XX_TVP5150, |
| 1211 | .input = { { |
| 1212 | .type = EM28XX_VMUX_TELEVISION, |
| 1213 | .vmux = TVP5150_COMPOSITE0, |
| 1214 | .amux = EM28XX_AMUX_VIDEO, |
| 1215 | .gpio = default_analog, |
| 1216 | }, { |
| 1217 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1218 | .vmux = TVP5150_COMPOSITE1, |
| 1219 | .amux = EM28XX_AMUX_LINE_IN, |
| 1220 | .gpio = default_analog, |
| 1221 | }, { |
| 1222 | .type = EM28XX_VMUX_SVIDEO, |
| 1223 | .vmux = TVP5150_SVIDEO, |
| 1224 | .amux = EM28XX_AMUX_LINE_IN, |
| 1225 | .gpio = default_analog, |
| 1226 | } }, |
| 1227 | }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1228 | [EM2881_BOARD_DNT_DA2_HYBRID] = { |
| 1229 | .name = "DNT DA2 Hybrid", |
| 1230 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1231 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1232 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1233 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1234 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1235 | .type = EM28XX_VMUX_TELEVISION, |
| 1236 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1237 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1238 | .gpio = default_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1239 | }, { |
| 1240 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1241 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1242 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1243 | .gpio = default_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1244 | }, { |
| 1245 | .type = EM28XX_VMUX_SVIDEO, |
| 1246 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1247 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1248 | .gpio = default_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1249 | } }, |
| 1250 | }, |
| 1251 | [EM2881_BOARD_PINNACLE_HYBRID_PRO] = { |
| 1252 | .name = "Pinnacle Hybrid Pro", |
| 1253 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1254 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1255 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1256 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1257 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1258 | .type = EM28XX_VMUX_TELEVISION, |
| 1259 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1260 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1261 | .gpio = default_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1262 | }, { |
| 1263 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1264 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1265 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1266 | .gpio = default_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1267 | }, { |
| 1268 | .type = EM28XX_VMUX_SVIDEO, |
| 1269 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1270 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1271 | .gpio = default_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1272 | } }, |
| 1273 | }, |
| 1274 | [EM2882_BOARD_PINNACLE_HYBRID_PRO] = { |
| 1275 | .name = "Pinnacle Hybrid Pro (2)", |
| 1276 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1277 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1278 | .tuner_gpio = default_tuner_gpio, |
Eugeniy Meshcheryakov | a674a3b | 2008-08-01 08:23:41 -0300 | [diff] [blame] | 1279 | .mts_firmware = 1, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1280 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1281 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1282 | .type = EM28XX_VMUX_TELEVISION, |
| 1283 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1284 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1285 | .gpio = hauppauge_wintv_hvr_900_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1286 | }, { |
| 1287 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1288 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1289 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1290 | .gpio = hauppauge_wintv_hvr_900_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1291 | }, { |
| 1292 | .type = EM28XX_VMUX_SVIDEO, |
| 1293 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1294 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1295 | .gpio = hauppauge_wintv_hvr_900_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1296 | } }, |
| 1297 | }, |
| 1298 | [EM2882_BOARD_KWORLD_VS_DVBT] = { |
| 1299 | .name = "Kworld VS-DVB-T 323UR", |
| 1300 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1301 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1302 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1303 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1304 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1305 | .type = EM28XX_VMUX_TELEVISION, |
| 1306 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1307 | .amux = EM28XX_AMUX_VIDEO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1308 | }, { |
| 1309 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1310 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1311 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1312 | }, { |
| 1313 | .type = EM28XX_VMUX_SVIDEO, |
| 1314 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1315 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1316 | } }, |
| 1317 | }, |
| 1318 | [EM2882_BOARD_TERRATEC_HYBRID_XS] = { |
| 1319 | .name = "Terratec Hybrid XS (em2882)", |
| 1320 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1321 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1322 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1323 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1324 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1325 | .type = EM28XX_VMUX_TELEVISION, |
| 1326 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1327 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1328 | .gpio = hauppauge_wintv_hvr_900_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1329 | }, { |
| 1330 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1331 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1332 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1333 | .gpio = hauppauge_wintv_hvr_900_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1334 | }, { |
| 1335 | .type = EM28XX_VMUX_SVIDEO, |
| 1336 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1337 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1338 | .gpio = hauppauge_wintv_hvr_900_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1339 | } }, |
| 1340 | }, |
Robert Krakora | 6e7b9ea | 2009-01-18 21:59:34 -0300 | [diff] [blame] | 1341 | [EM2883_BOARD_KWORLD_HYBRID_330U] = { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1342 | .name = "Kworld PlusTV HD Hybrid 330", |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1343 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1344 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1345 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | be2c6db | 2008-12-09 15:43:10 -0300 | [diff] [blame] | 1346 | .mts_firmware = 1, |
| 1347 | .has_dvb = 1, |
Robert Krakora | 6e7b9ea | 2009-01-18 21:59:34 -0300 | [diff] [blame] | 1348 | .dvb_gpio = kworld_330u_digital, |
| 1349 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, |
Nicola Soranzo | a1a6ee7 | 2009-02-10 23:28:24 -0300 | [diff] [blame] | 1350 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | |
| 1351 | EM28XX_I2C_EEPROM_ON_BOARD | |
| 1352 | EM28XX_I2C_EEPROM_KEY_VALID, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1353 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1354 | .type = EM28XX_VMUX_TELEVISION, |
| 1355 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1356 | .amux = EM28XX_AMUX_VIDEO, |
Robert Krakora | 6e7b9ea | 2009-01-18 21:59:34 -0300 | [diff] [blame] | 1357 | .gpio = kworld_330u_analog, |
| 1358 | .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1359 | }, { |
| 1360 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1361 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1362 | .amux = EM28XX_AMUX_LINE_IN, |
Robert Krakora | 6e7b9ea | 2009-01-18 21:59:34 -0300 | [diff] [blame] | 1363 | .gpio = kworld_330u_analog, |
| 1364 | .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1365 | }, { |
| 1366 | .type = EM28XX_VMUX_SVIDEO, |
| 1367 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1368 | .amux = EM28XX_AMUX_LINE_IN, |
Robert Krakora | 6e7b9ea | 2009-01-18 21:59:34 -0300 | [diff] [blame] | 1369 | .gpio = kworld_330u_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1370 | } }, |
| 1371 | }, |
Mauro Carvalho Chehab | ee281b8 | 2008-07-27 16:58:04 -0300 | [diff] [blame] | 1372 | [EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU] = { |
Vitaly Wool | d360334 | 2008-07-27 14:10:11 -0300 | [diff] [blame] | 1373 | .name = "Compro VideoMate ForYou/Stereo", |
Vitaly Wool | d360334 | 2008-07-27 14:10:11 -0300 | [diff] [blame] | 1374 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 1375 | .tvaudio_addr = 0xb0, |
Vitaly Wool | d360334 | 2008-07-27 14:10:11 -0300 | [diff] [blame] | 1376 | .tda9887_conf = TDA9887_PRESENT, |
| 1377 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | df7fa09 | 2009-02-25 09:06:13 -0300 | [diff] [blame] | 1378 | .adecoder = EM28XX_TVAUDIO, |
Vitaly Wool | 2bd1d9e | 2009-03-04 08:27:52 -0300 | [diff] [blame] | 1379 | .mute_gpio = compro_mute_gpio, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1380 | .input = { { |
Vitaly Wool | d360334 | 2008-07-27 14:10:11 -0300 | [diff] [blame] | 1381 | .type = EM28XX_VMUX_TELEVISION, |
| 1382 | .vmux = TVP5150_COMPOSITE0, |
Vitaly Wool | 2bd1d9e | 2009-03-04 08:27:52 -0300 | [diff] [blame] | 1383 | .amux = EM28XX_AMUX_VIDEO, |
| 1384 | .gpio = compro_unmute_tv_gpio, |
Vitaly Wool | d360334 | 2008-07-27 14:10:11 -0300 | [diff] [blame] | 1385 | }, { |
| 1386 | .type = EM28XX_VMUX_SVIDEO, |
| 1387 | .vmux = TVP5150_SVIDEO, |
| 1388 | .amux = EM28XX_AMUX_LINE_IN, |
Vitaly Wool | 2bd1d9e | 2009-03-04 08:27:52 -0300 | [diff] [blame] | 1389 | .gpio = compro_unmute_svid_gpio, |
Vitaly Wool | d360334 | 2008-07-27 14:10:11 -0300 | [diff] [blame] | 1390 | } }, |
| 1391 | }, |
Mauro Carvalho Chehab | 0bf4f6c | 2009-02-11 14:13:20 -0300 | [diff] [blame] | 1392 | [EM2860_BOARD_KAIOMY_TVNPC_U2] = { |
| 1393 | .name = "Kaiomy TVnPC U2", |
| 1394 | .vchannels = 3, |
| 1395 | .tuner_type = TUNER_XC2028, |
| 1396 | .tuner_addr = 0x61, |
| 1397 | .mts_firmware = 1, |
| 1398 | .decoder = EM28XX_TVP5150, |
| 1399 | .tuner_gpio = default_tuner_gpio, |
Mauro Carvalho Chehab | 9fc2c5e | 2009-02-11 14:15:14 -0300 | [diff] [blame] | 1400 | .ir_codes = ir_codes_kaiomy, |
Mauro Carvalho Chehab | 0bf4f6c | 2009-02-11 14:13:20 -0300 | [diff] [blame] | 1401 | .input = { { |
| 1402 | .type = EM28XX_VMUX_TELEVISION, |
| 1403 | .vmux = TVP5150_COMPOSITE0, |
| 1404 | .amux = EM28XX_AMUX_VIDEO, |
| 1405 | |
| 1406 | }, { |
| 1407 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1408 | .vmux = TVP5150_COMPOSITE1, |
| 1409 | .amux = EM28XX_AMUX_LINE_IN, |
| 1410 | }, { |
| 1411 | .type = EM28XX_VMUX_SVIDEO, |
| 1412 | .vmux = TVP5150_SVIDEO, |
| 1413 | .amux = EM28XX_AMUX_LINE_IN, |
| 1414 | } }, |
| 1415 | .radio = { |
| 1416 | .type = EM28XX_RADIO, |
| 1417 | .amux = EM28XX_AMUX_LINE_IN, |
| 1418 | } |
Mauro Carvalho Chehab | 56ee380 | 2009-02-11 14:18:36 -0300 | [diff] [blame] | 1419 | }, |
| 1420 | [EM2860_BOARD_EASYCAP] = { |
| 1421 | .name = "Easy Cap Capture DC-60", |
| 1422 | .vchannels = 2, |
| 1423 | .tuner_type = TUNER_ABSENT, |
| 1424 | .decoder = EM28XX_SAA711X, |
| 1425 | .input = { { |
| 1426 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1427 | .vmux = SAA7115_COMPOSITE0, |
| 1428 | .amux = EM28XX_AMUX_LINE_IN, |
| 1429 | }, { |
| 1430 | .type = EM28XX_VMUX_SVIDEO, |
| 1431 | .vmux = SAA7115_SVIDEO3, |
| 1432 | .amux = EM28XX_AMUX_LINE_IN, |
| 1433 | } }, |
| 1434 | }, |
Indika Katugampala | f74a61e3 | 2009-02-11 11:13:05 -0300 | [diff] [blame] | 1435 | [EM2820_BOARD_IODATA_GVMVP_SZ] = { |
| 1436 | .name = "IO-DATA GV-MVP/SZ", |
| 1437 | .tuner_type = TUNER_PHILIPS_FM1236_MK3, |
| 1438 | .tuner_gpio = default_tuner_gpio, |
| 1439 | .tda9887_conf = TDA9887_PRESENT, |
| 1440 | .decoder = EM28XX_TVP5150, |
| 1441 | .input = { { |
| 1442 | .type = EM28XX_VMUX_TELEVISION, |
| 1443 | .vmux = TVP5150_COMPOSITE0, |
| 1444 | .amux = EM28XX_AMUX_VIDEO, |
| 1445 | }, { /* Composite has not been tested yet */ |
| 1446 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1447 | .vmux = TVP5150_COMPOSITE1, |
| 1448 | .amux = EM28XX_AMUX_VIDEO, |
| 1449 | }, { /* S-video has not been tested yet */ |
| 1450 | .type = EM28XX_VMUX_SVIDEO, |
| 1451 | .vmux = TVP5150_SVIDEO, |
| 1452 | .amux = EM28XX_AMUX_VIDEO, |
| 1453 | } }, |
| 1454 | }, |
Mauro Carvalho Chehab | 4557af9 | 2009-05-23 09:58:52 -0300 | [diff] [blame] | 1455 | [EM2860_BOARD_TERRATEC_GRABBY] = { |
| 1456 | .name = "Terratec Grabby", |
| 1457 | .vchannels = 2, |
| 1458 | .tuner_type = TUNER_ABSENT, |
| 1459 | .decoder = EM28XX_SAA711X, |
| 1460 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, |
| 1461 | .input = { { |
| 1462 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1463 | .vmux = SAA7115_COMPOSITE0, |
| 1464 | .amux = EM28XX_AMUX_VIDEO2, |
| 1465 | }, { |
| 1466 | .type = EM28XX_VMUX_SVIDEO, |
| 1467 | .vmux = SAA7115_SVIDEO3, |
| 1468 | .amux = EM28XX_AMUX_VIDEO2, |
| 1469 | } }, |
| 1470 | }, |
Mauro Carvalho Chehab | 766ed64 | 2009-05-24 00:46:01 -0300 | [diff] [blame] | 1471 | [EM2860_BOARD_TERRATEC_AV350] = { |
| 1472 | .name = "Terratec AV350", |
| 1473 | .vchannels = 2, |
| 1474 | .tuner_type = TUNER_ABSENT, |
| 1475 | .decoder = EM28XX_TVP5150, |
| 1476 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, |
| 1477 | .mute_gpio = terratec_av350_mute_gpio, |
| 1478 | .input = { { |
| 1479 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1480 | .vmux = TVP5150_COMPOSITE1, |
| 1481 | .amux = EM28XX_AUDIO_SRC_LINE, |
Jean Delvare | 1df8e98 | 2009-05-13 16:48:07 -0300 | [diff] [blame] | 1482 | .gpio = terratec_av350_unmute_gpio, |
Mauro Carvalho Chehab | 766ed64 | 2009-05-24 00:46:01 -0300 | [diff] [blame] | 1483 | |
| 1484 | }, { |
| 1485 | .type = EM28XX_VMUX_SVIDEO, |
| 1486 | .vmux = TVP5150_SVIDEO, |
| 1487 | .amux = EM28XX_AUDIO_SRC_LINE, |
Jean Delvare | 1df8e98 | 2009-05-13 16:48:07 -0300 | [diff] [blame] | 1488 | .gpio = terratec_av350_unmute_gpio, |
Mauro Carvalho Chehab | 766ed64 | 2009-05-24 00:46:01 -0300 | [diff] [blame] | 1489 | } }, |
| 1490 | }, |
Devin Heitmueller | 1985922 | 2009-06-19 00:33:54 -0300 | [diff] [blame] | 1491 | [EM2882_BOARD_EVGA_INDTUBE] = { |
| 1492 | .name = "Evga inDtube", |
| 1493 | .tuner_type = TUNER_XC2028, |
| 1494 | .tuner_gpio = default_tuner_gpio, |
| 1495 | .decoder = EM28XX_TVP5150, |
Devin Heitmueller | a4c4730 | 2009-06-20 21:34:42 -0300 | [diff] [blame] | 1496 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, /* NEC IR */ |
Devin Heitmueller | 1985922 | 2009-06-19 00:33:54 -0300 | [diff] [blame] | 1497 | .mts_firmware = 1, |
| 1498 | .has_dvb = 1, |
| 1499 | .dvb_gpio = evga_indtube_digital, |
Devin Heitmueller | a4c4730 | 2009-06-20 21:34:42 -0300 | [diff] [blame] | 1500 | .ir_codes = ir_codes_evga_indtube, |
Devin Heitmueller | 1985922 | 2009-06-19 00:33:54 -0300 | [diff] [blame] | 1501 | .input = { { |
| 1502 | .type = EM28XX_VMUX_TELEVISION, |
| 1503 | .vmux = TVP5150_COMPOSITE0, |
| 1504 | .amux = EM28XX_AMUX_VIDEO, |
| 1505 | .gpio = evga_indtube_analog, |
| 1506 | }, { |
| 1507 | .type = EM28XX_VMUX_COMPOSITE1, |
| 1508 | .vmux = TVP5150_COMPOSITE1, |
| 1509 | .amux = EM28XX_AMUX_LINE_IN, |
| 1510 | .gpio = evga_indtube_analog, |
| 1511 | }, { |
| 1512 | .type = EM28XX_VMUX_SVIDEO, |
| 1513 | .vmux = TVP5150_SVIDEO, |
| 1514 | .amux = EM28XX_AMUX_LINE_IN, |
| 1515 | .gpio = evga_indtube_analog, |
| 1516 | } }, |
| 1517 | }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 1518 | }; |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 1519 | const unsigned int em28xx_bcount = ARRAY_SIZE(em28xx_boards); |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 1520 | |
| 1521 | /* table of devices that work with this driver */ |
Nicola Soranzo | a1a6ee7 | 2009-02-10 23:28:24 -0300 | [diff] [blame] | 1522 | struct usb_device_id em28xx_id_table[] = { |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1523 | { USB_DEVICE(0xeb1a, 0x2750), |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1524 | .driver_info = EM2750_BOARD_UNKNOWN }, |
| 1525 | { USB_DEVICE(0xeb1a, 0x2751), |
| 1526 | .driver_info = EM2750_BOARD_UNKNOWN }, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1527 | { USB_DEVICE(0xeb1a, 0x2800), |
| 1528 | .driver_info = EM2800_BOARD_UNKNOWN }, |
| 1529 | { USB_DEVICE(0xeb1a, 0x2820), |
| 1530 | .driver_info = EM2820_BOARD_UNKNOWN }, |
| 1531 | { USB_DEVICE(0xeb1a, 0x2821), |
Devin Heitmueller | c665f4d | 2008-12-16 23:35:23 -0300 | [diff] [blame] | 1532 | .driver_info = EM2820_BOARD_UNKNOWN }, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1533 | { USB_DEVICE(0xeb1a, 0x2860), |
| 1534 | .driver_info = EM2820_BOARD_UNKNOWN }, |
| 1535 | { USB_DEVICE(0xeb1a, 0x2861), |
| 1536 | .driver_info = EM2820_BOARD_UNKNOWN }, |
| 1537 | { USB_DEVICE(0xeb1a, 0x2870), |
| 1538 | .driver_info = EM2820_BOARD_UNKNOWN }, |
| 1539 | { USB_DEVICE(0xeb1a, 0x2881), |
| 1540 | .driver_info = EM2820_BOARD_UNKNOWN }, |
| 1541 | { USB_DEVICE(0xeb1a, 0x2883), |
| 1542 | .driver_info = EM2820_BOARD_UNKNOWN }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1543 | { USB_DEVICE(0xeb1a, 0xe300), |
| 1544 | .driver_info = EM2861_BOARD_KWORLD_PVRTV_300U }, |
Mauro Carvalho Chehab | 0bf4f6c | 2009-02-11 14:13:20 -0300 | [diff] [blame] | 1545 | { USB_DEVICE(0xeb1a, 0xe303), |
| 1546 | .driver_info = EM2860_BOARD_KAIOMY_TVNPC_U2 }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1547 | { USB_DEVICE(0xeb1a, 0xe305), |
| 1548 | .driver_info = EM2880_BOARD_KWORLD_DVB_305U }, |
| 1549 | { USB_DEVICE(0xeb1a, 0xe310), |
| 1550 | .driver_info = EM2880_BOARD_MSI_DIGIVOX_AD }, |
Franklin Meng | d7de5d8 | 2009-06-06 17:05:02 -0300 | [diff] [blame] | 1551 | { USB_DEVICE(0xeb1a, 0xa313), |
| 1552 | .driver_info = EM2882_BOARD_KWORLD_ATSC_315U }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1553 | { USB_DEVICE(0xeb1a, 0xa316), |
Robert Krakora | 6e7b9ea | 2009-01-18 21:59:34 -0300 | [diff] [blame] | 1554 | .driver_info = EM2883_BOARD_KWORLD_HYBRID_330U }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1555 | { USB_DEVICE(0xeb1a, 0xe320), |
| 1556 | .driver_info = EM2880_BOARD_MSI_DIGIVOX_AD_II }, |
| 1557 | { USB_DEVICE(0xeb1a, 0xe323), |
| 1558 | .driver_info = EM2882_BOARD_KWORLD_VS_DVBT }, |
| 1559 | { USB_DEVICE(0xeb1a, 0xe350), |
| 1560 | .driver_info = EM2870_BOARD_KWORLD_350U }, |
| 1561 | { USB_DEVICE(0xeb1a, 0xe355), |
| 1562 | .driver_info = EM2870_BOARD_KWORLD_355U }, |
| 1563 | { USB_DEVICE(0xeb1a, 0x2801), |
| 1564 | .driver_info = EM2800_BOARD_GRABBEEX_USB2800 }, |
| 1565 | { USB_DEVICE(0xeb1a, 0xe357), |
| 1566 | .driver_info = EM2870_BOARD_KWORLD_355U }, |
Douglas Schilling Landgraf | ac40d9e | 2009-02-25 16:55:48 -0300 | [diff] [blame] | 1567 | { USB_DEVICE(0x1b80, 0xe302), |
| 1568 | .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] | 1569 | { USB_DEVICE(0x0ccd, 0x0036), |
| 1570 | .driver_info = EM2820_BOARD_TERRATEC_CINERGY_250 }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1571 | { USB_DEVICE(0x0ccd, 0x004c), |
| 1572 | .driver_info = EM2880_BOARD_TERRATEC_HYBRID_XS_FR }, |
| 1573 | { USB_DEVICE(0x0ccd, 0x004f), |
| 1574 | .driver_info = EM2860_BOARD_TERRATEC_HYBRID_XS }, |
| 1575 | { USB_DEVICE(0x0ccd, 0x005e), |
| 1576 | .driver_info = EM2882_BOARD_TERRATEC_HYBRID_XS }, |
| 1577 | { USB_DEVICE(0x0ccd, 0x0042), |
| 1578 | .driver_info = EM2880_BOARD_TERRATEC_HYBRID_XS }, |
| 1579 | { USB_DEVICE(0x0ccd, 0x0043), |
| 1580 | .driver_info = EM2870_BOARD_TERRATEC_XS }, |
| 1581 | { USB_DEVICE(0x0ccd, 0x0047), |
| 1582 | .driver_info = EM2880_BOARD_TERRATEC_PRODIGY_XS }, |
Mauro Carvalho Chehab | 766ed64 | 2009-05-24 00:46:01 -0300 | [diff] [blame] | 1583 | { USB_DEVICE(0x0ccd, 0x0084), |
| 1584 | .driver_info = EM2860_BOARD_TERRATEC_AV350 }, |
Mauro Carvalho Chehab | 4557af9 | 2009-05-23 09:58:52 -0300 | [diff] [blame] | 1585 | { USB_DEVICE(0x0ccd, 0x0096), |
| 1586 | .driver_info = EM2860_BOARD_TERRATEC_GRABBY }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1587 | { USB_DEVICE(0x185b, 0x2870), |
| 1588 | .driver_info = EM2870_BOARD_COMPRO_VIDEOMATE }, |
Vitaly Wool | d360334 | 2008-07-27 14:10:11 -0300 | [diff] [blame] | 1589 | { USB_DEVICE(0x185b, 0x2041), |
Mauro Carvalho Chehab | ee281b8 | 2008-07-27 16:58:04 -0300 | [diff] [blame] | 1590 | .driver_info = EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU }, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1591 | { USB_DEVICE(0x2040, 0x4200), |
| 1592 | .driver_info = EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 }, |
Mauro Carvalho Chehab | 15b9bec | 2008-01-13 12:02:20 -0300 | [diff] [blame] | 1593 | { USB_DEVICE(0x2040, 0x4201), |
| 1594 | .driver_info = EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 }, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1595 | { USB_DEVICE(0x2040, 0x6500), |
| 1596 | .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900 }, |
Luc Saillard | 427d20c | 2008-01-30 17:23:00 -0300 | [diff] [blame] | 1597 | { USB_DEVICE(0x2040, 0x6502), |
Devin Heitmueller | 17d9d55 | 2008-06-08 10:22:03 -0300 | [diff] [blame] | 1598 | .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2 }, |
Michael Krufky | 74ee051 | 2008-05-01 18:02:30 -0300 | [diff] [blame] | 1599 | { USB_DEVICE(0x2040, 0x6513), /* HCW HVR-980 */ |
Mauro Carvalho Chehab | 10ac660 | 2008-07-27 14:58:58 -0300 | [diff] [blame] | 1600 | .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 }, |
Michael Krufky | 74ee051 | 2008-05-01 18:02:30 -0300 | [diff] [blame] | 1601 | { USB_DEVICE(0x2040, 0x6517), /* HP HVR-950 */ |
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, 0x651b), /* RP HVR-950 */ |
Mauro Carvalho Chehab | 10ac660 | 2008-07-27 14:58:58 -0300 | [diff] [blame] | 1604 | .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 }, |
Douglas Schilling Landgraf | f89bc32 | 2008-12-01 21:01:04 -0300 | [diff] [blame] | 1605 | { USB_DEVICE(0x2040, 0x651f), |
| 1606 | .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850 }, |
Devin Heitmueller | e14b365 | 2008-07-26 11:04:33 -0300 | [diff] [blame] | 1607 | { USB_DEVICE(0x0438, 0xb002), |
| 1608 | .driver_info = EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600 }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1609 | { USB_DEVICE(0x2001, 0xf112), |
| 1610 | .driver_info = EM2820_BOARD_DLINK_USB_TV }, |
| 1611 | { USB_DEVICE(0x2304, 0x0207), |
| 1612 | .driver_info = EM2820_BOARD_PINNACLE_DVC_90 }, |
| 1613 | { USB_DEVICE(0x2304, 0x0208), |
| 1614 | .driver_info = EM2820_BOARD_PINNACLE_USB_2 }, |
| 1615 | { USB_DEVICE(0x2304, 0x021a), |
| 1616 | .driver_info = EM2820_BOARD_PINNACLE_DVC_90 }, |
| 1617 | { USB_DEVICE(0x2304, 0x0226), |
| 1618 | .driver_info = EM2882_BOARD_PINNACLE_HYBRID_PRO }, |
| 1619 | { USB_DEVICE(0x2304, 0x0227), |
| 1620 | .driver_info = EM2880_BOARD_PINNACLE_PCTV_HD_PRO }, |
| 1621 | { USB_DEVICE(0x0413, 0x6023), |
| 1622 | .driver_info = EM2800_BOARD_LEADTEK_WINFAST_USBII }, |
| 1623 | { USB_DEVICE(0x093b, 0xa005), |
| 1624 | .driver_info = EM2861_BOARD_PLEXTOR_PX_TV100U }, |
Indika Katugampala | f74a61e3 | 2009-02-11 11:13:05 -0300 | [diff] [blame] | 1625 | { USB_DEVICE(0x04bb, 0x0515), |
| 1626 | .driver_info = EM2820_BOARD_IODATA_GVMVP_SZ }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 1627 | { }, |
| 1628 | }; |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1629 | MODULE_DEVICE_TABLE(usb, em28xx_id_table); |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 1630 | |
Mauro Carvalho Chehab | 102a0b0 | 2008-04-17 21:40:45 -0300 | [diff] [blame] | 1631 | /* |
Mauro Carvalho Chehab | 102a0b0 | 2008-04-17 21:40:45 -0300 | [diff] [blame] | 1632 | * EEPROM hash table for devices with generic USB IDs |
| 1633 | */ |
Nicola Soranzo | a1a6ee7 | 2009-02-10 23:28:24 -0300 | [diff] [blame] | 1634 | static struct em28xx_hash_table em28xx_eeprom_hash[] = { |
Mauro Carvalho Chehab | ea4fd56 | 2007-11-03 21:21:57 -0300 | [diff] [blame] | 1635 | /* P/N: SA 60002070465 Tuner: TVF7533-MF */ |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1636 | {0x6ce05a8f, EM2820_BOARD_PROLINK_PLAYTV_USB2, TUNER_YMEC_TVF_5533MF}, |
Douglas Schilling Landgraf | 1e1addd | 2008-12-27 21:38:14 -0300 | [diff] [blame] | 1637 | {0x72cc5a8b, EM2820_BOARD_PROLINK_PLAYTV_BOX4_USB2, TUNER_YMEC_TVF_5533MF}, |
Darron Broad | da3808e | 2008-09-30 02:46:41 -0300 | [diff] [blame] | 1638 | {0x966a0441, EM2880_BOARD_KWORLD_DVB_310U, TUNER_XC2028}, |
Douglas Schilling Landgraf | e5db5d4 | 2009-04-09 18:24:34 -0300 | [diff] [blame] | 1639 | {0x9567eb1a, EM2880_BOARD_EMPIRE_DUAL_TV, TUNER_XC2028}, |
Devin Heitmueller | 1985922 | 2009-06-19 00:33:54 -0300 | [diff] [blame] | 1640 | {0xcee44a99, EM2882_BOARD_EVGA_INDTUBE, TUNER_XC2028}, |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 1641 | }; |
| 1642 | |
Mauro Carvalho Chehab | d2ba055 | 2007-11-04 08:32:42 -0300 | [diff] [blame] | 1643 | /* I2C devicelist hash table for devices with generic USB IDs */ |
Sascha Sommer | fad7b95 | 2007-11-04 08:06:48 -0300 | [diff] [blame] | 1644 | static struct em28xx_hash_table em28xx_i2c_hash[] = { |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1645 | {0xb06a32c3, EM2800_BOARD_TERRATEC_CINERGY_200, TUNER_LG_PAL_NEW_TAPC}, |
| 1646 | {0xf51200e3, EM2800_BOARD_VGEAR_POCKETTV, TUNER_LG_PAL_NEW_TAPC}, |
Devin Heitmueller | 3ed58ba | 2009-05-27 23:27:26 -0300 | [diff] [blame] | 1647 | {0x1ba50080, EM2860_BOARD_SAA711X_REFERENCE_DESIGN, TUNER_ABSENT}, |
Douglas Schilling Landgraf | f7fe3e6 | 2009-01-19 09:31:55 -0300 | [diff] [blame] | 1648 | {0xc51200e3, EM2820_BOARD_GADMEI_TVR200, TUNER_LG_PAL_NEW_TAPC}, |
Sascha Sommer | fad7b95 | 2007-11-04 08:06:48 -0300 | [diff] [blame] | 1649 | }; |
| 1650 | |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 1651 | /* I2C possible address to saa7115, tvp5150, msp3400, tvaudio */ |
| 1652 | static unsigned short saa711x_addrs[] = { |
| 1653 | 0x4a >> 1, 0x48 >> 1, /* SAA7111, SAA7111A and SAA7113 */ |
| 1654 | 0x42 >> 1, 0x40 >> 1, /* SAA7114, SAA7115 and SAA7118 */ |
| 1655 | I2C_CLIENT_END }; |
| 1656 | |
| 1657 | static unsigned short tvp5150_addrs[] = { |
| 1658 | 0xb8 >> 1, |
| 1659 | 0xba >> 1, |
| 1660 | I2C_CLIENT_END |
| 1661 | }; |
| 1662 | |
Mauro Carvalho Chehab | 02e7804 | 2009-06-29 11:35:05 -0300 | [diff] [blame] | 1663 | static unsigned short mt9v011_addrs[] = { |
| 1664 | 0xba >> 1, |
| 1665 | I2C_CLIENT_END |
| 1666 | }; |
| 1667 | |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 1668 | static unsigned short msp3400_addrs[] = { |
| 1669 | 0x80 >> 1, |
| 1670 | 0x88 >> 1, |
| 1671 | I2C_CLIENT_END |
| 1672 | }; |
| 1673 | |
Michael Krufky | d7cba04 | 2008-09-12 13:31:45 -0300 | [diff] [blame] | 1674 | 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] | 1675 | { |
Mauro Carvalho Chehab | 102a0b0 | 2008-04-17 21:40:45 -0300 | [diff] [blame] | 1676 | int rc = 0; |
Mauro Carvalho Chehab | ee6e3a8 | 2008-04-17 21:37:31 -0300 | [diff] [blame] | 1677 | struct em28xx *dev = ptr; |
Mauro Carvalho Chehab | ee6e3a8 | 2008-04-17 21:37:31 -0300 | [diff] [blame] | 1678 | |
| 1679 | if (dev->tuner_type != TUNER_XC2028) |
| 1680 | return 0; |
| 1681 | |
| 1682 | if (command != XC2028_TUNER_RESET) |
| 1683 | return 0; |
| 1684 | |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1685 | rc = em28xx_gpio_set(dev, dev->board.tuner_gpio); |
Mauro Carvalho Chehab | ee6e3a8 | 2008-04-17 21:37:31 -0300 | [diff] [blame] | 1686 | |
Mauro Carvalho Chehab | ee6e3a8 | 2008-04-17 21:37:31 -0300 | [diff] [blame] | 1687 | return rc; |
| 1688 | } |
| 1689 | EXPORT_SYMBOL_GPL(em28xx_tuner_callback); |
| 1690 | |
Nicola Soranzo | a1a6ee7 | 2009-02-10 23:28:24 -0300 | [diff] [blame] | 1691 | static inline void em28xx_set_model(struct em28xx *dev) |
Mauro Carvalho Chehab | ee6e3a8 | 2008-04-17 21:37:31 -0300 | [diff] [blame] | 1692 | { |
Mauro Carvalho Chehab | 505b6d0 | 2008-11-25 09:39:50 -0300 | [diff] [blame] | 1693 | memcpy(&dev->board, &em28xx_boards[dev->model], sizeof(dev->board)); |
Devin Heitmueller | ed14e1c | 2008-12-29 22:27:30 -0300 | [diff] [blame] | 1694 | |
| 1695 | /* Those are the default values for the majority of boards |
| 1696 | Use those values if not specified otherwise at boards entry |
| 1697 | */ |
| 1698 | if (!dev->board.xclk) |
| 1699 | dev->board.xclk = EM28XX_XCLK_IR_RC5_MODE | |
| 1700 | EM28XX_XCLK_FREQUENCY_12MHZ; |
| 1701 | |
| 1702 | if (!dev->board.i2c_speed) |
| 1703 | dev->board.i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | |
| 1704 | EM28XX_I2C_FREQ_100_KHZ; |
Mauro Carvalho Chehab | ee6e3a8 | 2008-04-17 21:37:31 -0300 | [diff] [blame] | 1705 | } |
| 1706 | |
Mauro Carvalho Chehab | 791a08f | 2009-07-03 15:36:18 -0300 | [diff] [blame] | 1707 | /* HINT method: webcam I2C chips |
| 1708 | * |
| 1709 | * This method work for webcams with Micron sensors |
| 1710 | */ |
| 1711 | static int em28xx_hint_sensor(struct em28xx *dev) |
| 1712 | { |
| 1713 | int rc; |
| 1714 | char *sensor_name; |
| 1715 | unsigned char cmd; |
| 1716 | __be16 version_be; |
| 1717 | u16 version; |
| 1718 | |
| 1719 | if (dev->model != EM2820_BOARD_UNKNOWN) |
| 1720 | return 0; |
| 1721 | |
| 1722 | dev->i2c_client.addr = 0xba >> 1; |
| 1723 | cmd = 0; |
| 1724 | i2c_master_send(&dev->i2c_client, &cmd, 1); |
| 1725 | rc = i2c_master_recv(&dev->i2c_client, (char *)&version_be, 2); |
| 1726 | if (rc != 2) |
| 1727 | return -EINVAL; |
| 1728 | |
| 1729 | version = be16_to_cpu(version_be); |
| 1730 | |
| 1731 | switch (version) { |
| 1732 | case MT9V011_VERSION: |
| 1733 | dev->model = EM2820_BOARD_SILVERCREST_WEBCAM; |
| 1734 | sensor_name = "mt9v011"; |
| 1735 | break; |
| 1736 | default: |
| 1737 | printk("Unknown Sensor 0x%04x\n", be16_to_cpu(version)); |
| 1738 | return -EINVAL; |
| 1739 | } |
| 1740 | |
| 1741 | em28xx_errdev("Sensor is %s, assuming that webcam is %s\n", |
| 1742 | sensor_name, em28xx_boards[dev->model].name); |
| 1743 | |
| 1744 | return 0; |
| 1745 | } |
| 1746 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 1747 | /* Since em28xx_pre_card_setup() requires a proper dev->model, |
| 1748 | * this won't work for boards with generic PCI IDs |
| 1749 | */ |
Markus Rechberger | a94e95b | 2006-01-23 17:11:10 -0200 | [diff] [blame] | 1750 | void em28xx_pre_card_setup(struct em28xx *dev) |
| 1751 | { |
Mauro Carvalho Chehab | 89b329e | 2008-04-17 21:42:14 -0300 | [diff] [blame] | 1752 | int rc; |
| 1753 | |
Mauro Carvalho Chehab | 1bee018 | 2008-11-25 10:06:21 -0300 | [diff] [blame] | 1754 | em28xx_set_model(dev); |
| 1755 | |
Mauro Carvalho Chehab | 8c23998 | 2008-11-28 23:46:43 -0300 | [diff] [blame] | 1756 | em28xx_info("Identified as %s (card=%d)\n", |
| 1757 | dev->board.name, dev->model); |
Mauro Carvalho Chehab | 1bee018 | 2008-11-25 10:06:21 -0300 | [diff] [blame] | 1758 | |
Devin Heitmueller | 6a1acc3 | 2008-11-12 02:05:06 -0300 | [diff] [blame] | 1759 | /* Set the default GPO/GPIO for legacy devices */ |
| 1760 | dev->reg_gpo_num = EM2880_R04_GPO; |
| 1761 | dev->reg_gpio_num = EM28XX_R08_GPIO; |
Mauro Carvalho Chehab | c67ec53 | 2008-04-17 21:48:00 -0300 | [diff] [blame] | 1762 | |
Mauro Carvalho Chehab | 89b329e | 2008-04-17 21:42:14 -0300 | [diff] [blame] | 1763 | dev->wait_after_write = 5; |
Devin Heitmueller | 6a1acc3 | 2008-11-12 02:05:06 -0300 | [diff] [blame] | 1764 | |
| 1765 | /* Based on the Chip ID, set the device configuration */ |
Mauro Carvalho Chehab | 41facaa | 2008-04-17 21:44:58 -0300 | [diff] [blame] | 1766 | rc = em28xx_read_reg(dev, EM28XX_R0A_CHIPID); |
Mauro Carvalho Chehab | 89b329e | 2008-04-17 21:42:14 -0300 | [diff] [blame] | 1767 | if (rc > 0) { |
Devin Heitmueller | 600bd7f | 2008-11-12 02:05:02 -0300 | [diff] [blame] | 1768 | dev->chip_id = rc; |
Mauro Carvalho Chehab | 1bee018 | 2008-11-25 10:06:21 -0300 | [diff] [blame] | 1769 | |
| 1770 | switch (dev->chip_id) { |
Devin Heitmueller | 67c96f6 | 2008-11-18 05:05:46 -0300 | [diff] [blame] | 1771 | case CHIP_ID_EM2750: |
| 1772 | em28xx_info("chip ID is em2750\n"); |
| 1773 | break; |
Mauro Carvalho Chehab | f09fb53 | 2008-11-16 10:40:21 -0300 | [diff] [blame] | 1774 | case CHIP_ID_EM2820: |
Mauro Carvalho Chehab | c43221d | 2009-07-12 10:23:23 -0300 | [diff] [blame^] | 1775 | if (dev->board.is_webcam) |
Mauro Carvalho Chehab | 02e7804 | 2009-06-29 11:35:05 -0300 | [diff] [blame] | 1776 | em28xx_info("chip is em2710\n"); |
| 1777 | else |
| 1778 | em28xx_info("chip ID is 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 | 02e7804 | 2009-06-29 11:35:05 -0300 | [diff] [blame] | 2265 | if (dev->board.decoder == EM28XX_MT9V011) |
| 2266 | v4l2_i2c_new_probed_subdev(&dev->v4l2_dev, &dev->i2c_adap, |
| 2267 | "mt9v011", "mt9v011", mt9v011_addrs); |
| 2268 | |
Mauro Carvalho Chehab | df7fa09 | 2009-02-25 09:06:13 -0300 | [diff] [blame] | 2269 | if (dev->board.adecoder == EM28XX_TVAUDIO) |
Hans Verkuil | e6574f2 | 2009-04-01 03:57:53 -0300 | [diff] [blame] | 2270 | v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, |
| 2271 | "tvaudio", "tvaudio", dev->board.tvaudio_addr); |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2272 | |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2273 | if (dev->board.tuner_type != TUNER_ABSENT) { |
| 2274 | int has_demod = (dev->tda9887_conf & TDA9887_PRESENT); |
Mauro Carvalho Chehab | a924a49 | 2008-11-12 08:41:29 -0300 | [diff] [blame] | 2275 | |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2276 | if (dev->board.radio.type) |
Hans Verkuil | e6574f2 | 2009-04-01 03:57:53 -0300 | [diff] [blame] | 2277 | v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, |
| 2278 | "tuner", "tuner", dev->board.radio_addr); |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2279 | |
| 2280 | if (has_demod) |
Hans Verkuil | e6574f2 | 2009-04-01 03:57:53 -0300 | [diff] [blame] | 2281 | v4l2_i2c_new_probed_subdev(&dev->v4l2_dev, |
| 2282 | &dev->i2c_adap, "tuner", "tuner", |
| 2283 | v4l2_i2c_tuner_addrs(ADDRS_DEMOD)); |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2284 | if (dev->tuner_addr == 0) { |
| 2285 | enum v4l2_i2c_tuner_type type = |
| 2286 | has_demod ? ADDRS_TV_WITH_DEMOD : ADDRS_TV; |
| 2287 | struct v4l2_subdev *sd; |
| 2288 | |
Hans Verkuil | e6574f2 | 2009-04-01 03:57:53 -0300 | [diff] [blame] | 2289 | sd = v4l2_i2c_new_probed_subdev(&dev->v4l2_dev, |
| 2290 | &dev->i2c_adap, "tuner", "tuner", |
| 2291 | v4l2_i2c_tuner_addrs(type)); |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2292 | |
| 2293 | if (sd) |
| 2294 | dev->tuner_addr = v4l2_i2c_subdev_addr(sd); |
| 2295 | } else { |
Hans Verkuil | e6574f2 | 2009-04-01 03:57:53 -0300 | [diff] [blame] | 2296 | v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, |
| 2297 | "tuner", "tuner", dev->tuner_addr); |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2298 | } |
| 2299 | } |
| 2300 | |
| 2301 | em28xx_tuner_setup(dev); |
Mauro Carvalho Chehab | a924a49 | 2008-11-12 08:41:29 -0300 | [diff] [blame] | 2302 | em28xx_ir_init(dev); |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 2303 | } |
Mauro Carvalho Chehab | c864405 | 2008-11-25 13:10:14 -0300 | [diff] [blame] | 2304 | |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2305 | |
| 2306 | #if defined(CONFIG_MODULES) && defined(MODULE) |
| 2307 | static void request_module_async(struct work_struct *work) |
| 2308 | { |
| 2309 | struct em28xx *dev = container_of(work, |
| 2310 | struct em28xx, request_module_wk); |
| 2311 | |
| 2312 | if (dev->has_audio_class) |
| 2313 | request_module("snd-usb-audio"); |
| 2314 | else if (dev->has_alsa_audio) |
| 2315 | request_module("em28xx-alsa"); |
| 2316 | |
| 2317 | if (dev->board.has_dvb) |
| 2318 | request_module("em28xx-dvb"); |
| 2319 | } |
| 2320 | |
| 2321 | static void request_modules(struct em28xx *dev) |
| 2322 | { |
| 2323 | INIT_WORK(&dev->request_module_wk, request_module_async); |
| 2324 | schedule_work(&dev->request_module_wk); |
| 2325 | } |
| 2326 | #else |
| 2327 | #define request_modules(dev) |
| 2328 | #endif /* CONFIG_MODULES */ |
| 2329 | |
| 2330 | /* |
| 2331 | * em28xx_realease_resources() |
| 2332 | * unregisters the v4l2,i2c and usb devices |
| 2333 | * called when the device gets disconected or at module unload |
| 2334 | */ |
| 2335 | void em28xx_release_resources(struct em28xx *dev) |
| 2336 | { |
| 2337 | if (dev->sbutton_input_dev) |
| 2338 | em28xx_deregister_snapshot_button(dev); |
| 2339 | |
| 2340 | if (dev->ir) |
| 2341 | em28xx_ir_fini(dev); |
| 2342 | |
| 2343 | /*FIXME: I2C IR should be disconnected */ |
| 2344 | |
| 2345 | em28xx_release_analog_resources(dev); |
| 2346 | |
| 2347 | em28xx_remove_from_devlist(dev); |
| 2348 | |
| 2349 | em28xx_i2c_unregister(dev); |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2350 | |
| 2351 | v4l2_device_unregister(&dev->v4l2_dev); |
| 2352 | |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2353 | usb_put_dev(dev->udev); |
| 2354 | |
| 2355 | /* Mark device as unused */ |
| 2356 | em28xx_devused &= ~(1 << dev->devno); |
| 2357 | }; |
| 2358 | |
| 2359 | /* |
| 2360 | * em28xx_init_dev() |
| 2361 | * allocates and inits the device structs, registers i2c bus and v4l device |
| 2362 | */ |
Mauro Carvalho Chehab | 26cdc76 | 2009-01-05 01:00:40 -0300 | [diff] [blame] | 2363 | 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] | 2364 | struct usb_interface *interface, |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2365 | int minor) |
| 2366 | { |
| 2367 | struct em28xx *dev = *devhandle; |
| 2368 | int retval = -ENOMEM; |
| 2369 | int errCode; |
| 2370 | |
| 2371 | dev->udev = udev; |
| 2372 | mutex_init(&dev->ctrl_urb_lock); |
| 2373 | spin_lock_init(&dev->slock); |
| 2374 | init_waitqueue_head(&dev->open); |
| 2375 | init_waitqueue_head(&dev->wait_frame); |
| 2376 | init_waitqueue_head(&dev->wait_stream); |
| 2377 | |
| 2378 | dev->em28xx_write_regs = em28xx_write_regs; |
| 2379 | dev->em28xx_read_reg = em28xx_read_reg; |
| 2380 | dev->em28xx_read_reg_req_len = em28xx_read_reg_req_len; |
| 2381 | dev->em28xx_write_regs_req = em28xx_write_regs_req; |
| 2382 | dev->em28xx_read_reg_req = em28xx_read_reg_req; |
| 2383 | dev->board.is_em2800 = em28xx_boards[dev->model].is_em2800; |
| 2384 | |
| 2385 | em28xx_pre_card_setup(dev); |
| 2386 | |
| 2387 | if (!dev->board.is_em2800) { |
| 2388 | /* Sets I2C speed to 100 KHz */ |
| 2389 | retval = em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, 0x40); |
| 2390 | if (retval < 0) { |
| 2391 | em28xx_errdev("%s: em28xx_write_regs_req failed!" |
| 2392 | " retval [%d]\n", |
| 2393 | __func__, retval); |
| 2394 | return retval; |
| 2395 | } |
| 2396 | } |
| 2397 | |
Mauro Carvalho Chehab | 36fa674 | 2009-04-05 08:02:15 -0300 | [diff] [blame] | 2398 | retval = v4l2_device_register(&interface->dev, &dev->v4l2_dev); |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2399 | if (retval < 0) { |
| 2400 | em28xx_errdev("Call to v4l2_device_register() failed!\n"); |
| 2401 | return retval; |
| 2402 | } |
| 2403 | |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2404 | /* register i2c bus */ |
| 2405 | errCode = em28xx_i2c_register(dev); |
| 2406 | if (errCode < 0) { |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2407 | v4l2_device_unregister(&dev->v4l2_dev); |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2408 | em28xx_errdev("%s: em28xx_i2c_register - errCode [%d]!\n", |
| 2409 | __func__, errCode); |
| 2410 | return errCode; |
| 2411 | } |
| 2412 | |
Mauro Carvalho Chehab | 791a08f | 2009-07-03 15:36:18 -0300 | [diff] [blame] | 2413 | em28xx_hint_sensor(dev); |
| 2414 | |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2415 | /* Do board specific init and eeprom reading */ |
| 2416 | em28xx_card_setup(dev); |
| 2417 | |
| 2418 | /* Configure audio */ |
| 2419 | errCode = em28xx_audio_setup(dev); |
| 2420 | if (errCode < 0) { |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2421 | v4l2_device_unregister(&dev->v4l2_dev); |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2422 | em28xx_errdev("%s: Error while setting audio - errCode [%d]!\n", |
| 2423 | __func__, errCode); |
| 2424 | } |
| 2425 | |
| 2426 | /* wake i2c devices */ |
| 2427 | em28xx_wake_i2c(dev); |
| 2428 | |
| 2429 | /* init video dma queues */ |
| 2430 | INIT_LIST_HEAD(&dev->vidq.active); |
| 2431 | INIT_LIST_HEAD(&dev->vidq.queued); |
| 2432 | |
| 2433 | |
| 2434 | if (dev->board.has_msp34xx) { |
| 2435 | /* Send a reset to other chips via gpio */ |
| 2436 | errCode = em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xf7); |
| 2437 | if (errCode < 0) { |
| 2438 | em28xx_errdev("%s: em28xx_write_regs_req - " |
| 2439 | "msp34xx(1) failed! errCode [%d]\n", |
| 2440 | __func__, errCode); |
| 2441 | return errCode; |
| 2442 | } |
| 2443 | msleep(3); |
| 2444 | |
| 2445 | errCode = em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xff); |
| 2446 | if (errCode < 0) { |
| 2447 | em28xx_errdev("%s: em28xx_write_regs_req - " |
| 2448 | "msp34xx(2) failed! errCode [%d]\n", |
| 2449 | __func__, errCode); |
| 2450 | return errCode; |
| 2451 | } |
| 2452 | msleep(3); |
| 2453 | } |
| 2454 | |
| 2455 | em28xx_add_into_devlist(dev); |
| 2456 | |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2457 | retval = em28xx_register_analog_devices(dev); |
| 2458 | if (retval < 0) { |
| 2459 | em28xx_release_resources(dev); |
| 2460 | goto fail_reg_devices; |
| 2461 | } |
| 2462 | |
| 2463 | em28xx_init_extension(dev); |
| 2464 | |
| 2465 | /* Save some power by putting tuner to sleep */ |
Hans Verkuil | 7c9fc9d | 2009-04-01 03:49:59 -0300 | [diff] [blame] | 2466 | v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_standby); |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2467 | |
| 2468 | return 0; |
| 2469 | |
| 2470 | fail_reg_devices: |
| 2471 | return retval; |
| 2472 | } |
| 2473 | |
| 2474 | /* |
| 2475 | * em28xx_usb_probe() |
| 2476 | * checks for supported devices |
| 2477 | */ |
| 2478 | static int em28xx_usb_probe(struct usb_interface *interface, |
| 2479 | const struct usb_device_id *id) |
| 2480 | { |
| 2481 | const struct usb_endpoint_descriptor *endpoint; |
| 2482 | struct usb_device *udev; |
| 2483 | struct usb_interface *uif; |
| 2484 | struct em28xx *dev = NULL; |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2485 | int retval; |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2486 | int i, nr, ifnum, isoc_pipe; |
| 2487 | char *speed; |
| 2488 | char descr[255] = ""; |
| 2489 | |
| 2490 | udev = usb_get_dev(interface_to_usbdev(interface)); |
| 2491 | ifnum = interface->altsetting[0].desc.bInterfaceNumber; |
| 2492 | |
| 2493 | /* Check to see next free device and mark as used */ |
| 2494 | nr = find_first_zero_bit(&em28xx_devused, EM28XX_MAXBOARDS); |
| 2495 | em28xx_devused |= 1<<nr; |
| 2496 | |
| 2497 | /* Don't register audio interfaces */ |
| 2498 | if (interface->altsetting[0].desc.bInterfaceClass == USB_CLASS_AUDIO) { |
| 2499 | em28xx_err(DRIVER_NAME " audio device (%04x:%04x): " |
| 2500 | "interface %i, class %i\n", |
| 2501 | le16_to_cpu(udev->descriptor.idVendor), |
| 2502 | le16_to_cpu(udev->descriptor.idProduct), |
| 2503 | ifnum, |
| 2504 | interface->altsetting[0].desc.bInterfaceClass); |
| 2505 | |
| 2506 | em28xx_devused &= ~(1<<nr); |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2507 | retval = -ENODEV; |
| 2508 | goto err; |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2509 | } |
| 2510 | |
| 2511 | endpoint = &interface->cur_altsetting->endpoint[0].desc; |
| 2512 | |
| 2513 | /* 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] | 2514 | if (usb_endpoint_xfer_isoc(endpoint) |
| 2515 | && |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2516 | (interface->altsetting[1].endpoint[0].desc.wMaxPacketSize == 940)) { |
| 2517 | /* It's a newer em2874/em2875 device */ |
| 2518 | isoc_pipe = 0; |
| 2519 | } else { |
| 2520 | int check_interface = 1; |
| 2521 | isoc_pipe = 1; |
| 2522 | endpoint = &interface->cur_altsetting->endpoint[1].desc; |
Julia Lawall | 2230c3c | 2009-01-03 16:53:10 -0300 | [diff] [blame] | 2523 | if (!usb_endpoint_xfer_isoc(endpoint)) |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2524 | check_interface = 0; |
| 2525 | |
Julia Lawall | 1341798 | 2008-12-29 21:49:22 -0300 | [diff] [blame] | 2526 | if (usb_endpoint_dir_out(endpoint)) |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2527 | check_interface = 0; |
| 2528 | |
| 2529 | if (!check_interface) { |
| 2530 | em28xx_err(DRIVER_NAME " video device (%04x:%04x): " |
| 2531 | "interface %i, class %i found.\n", |
| 2532 | le16_to_cpu(udev->descriptor.idVendor), |
| 2533 | le16_to_cpu(udev->descriptor.idProduct), |
| 2534 | ifnum, |
| 2535 | interface->altsetting[0].desc.bInterfaceClass); |
| 2536 | |
| 2537 | em28xx_err(DRIVER_NAME " This is an anciliary " |
| 2538 | "interface not used by the driver\n"); |
| 2539 | |
| 2540 | em28xx_devused &= ~(1<<nr); |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2541 | retval = -ENODEV; |
| 2542 | goto err; |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2543 | } |
| 2544 | } |
| 2545 | |
| 2546 | switch (udev->speed) { |
| 2547 | case USB_SPEED_LOW: |
| 2548 | speed = "1.5"; |
| 2549 | break; |
| 2550 | case USB_SPEED_UNKNOWN: |
| 2551 | case USB_SPEED_FULL: |
| 2552 | speed = "12"; |
| 2553 | break; |
| 2554 | case USB_SPEED_HIGH: |
| 2555 | speed = "480"; |
| 2556 | break; |
| 2557 | default: |
| 2558 | speed = "unknown"; |
| 2559 | } |
| 2560 | |
| 2561 | if (udev->manufacturer) |
| 2562 | strlcpy(descr, udev->manufacturer, sizeof(descr)); |
| 2563 | |
| 2564 | if (udev->product) { |
| 2565 | if (*descr) |
| 2566 | strlcat(descr, " ", sizeof(descr)); |
| 2567 | strlcat(descr, udev->product, sizeof(descr)); |
| 2568 | } |
| 2569 | if (*descr) |
| 2570 | strlcat(descr, " ", sizeof(descr)); |
| 2571 | |
| 2572 | printk(DRIVER_NAME ": New device %s@ %s Mbps " |
| 2573 | "(%04x:%04x, interface %d, class %d)\n", |
| 2574 | descr, |
| 2575 | speed, |
| 2576 | le16_to_cpu(udev->descriptor.idVendor), |
| 2577 | le16_to_cpu(udev->descriptor.idProduct), |
| 2578 | ifnum, |
| 2579 | interface->altsetting->desc.bInterfaceNumber); |
| 2580 | |
Devin Heitmueller | 64a00b4 | 2009-05-27 23:23:37 -0300 | [diff] [blame] | 2581 | /* |
| 2582 | * Make sure we have 480 Mbps of bandwidth, otherwise things like |
| 2583 | * video stream wouldn't likely work, since 12 Mbps is generally |
| 2584 | * not enough even for most Digital TV streams. |
| 2585 | */ |
Devin Heitmueller | e2a1b79 | 2009-05-27 23:44:10 -0300 | [diff] [blame] | 2586 | if (udev->speed != USB_SPEED_HIGH && disable_usb_speed_check == 0) { |
Devin Heitmueller | 64a00b4 | 2009-05-27 23:23:37 -0300 | [diff] [blame] | 2587 | printk(DRIVER_NAME ": Device initialization failed.\n"); |
| 2588 | printk(DRIVER_NAME ": Device must be connected to a high-speed" |
| 2589 | " USB 2.0 port.\n"); |
| 2590 | em28xx_devused &= ~(1<<nr); |
| 2591 | retval = -ENODEV; |
| 2592 | goto err; |
| 2593 | } |
| 2594 | |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2595 | if (nr >= EM28XX_MAXBOARDS) { |
| 2596 | printk(DRIVER_NAME ": Supports only %i em28xx boards.\n", |
| 2597 | EM28XX_MAXBOARDS); |
| 2598 | em28xx_devused &= ~(1<<nr); |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2599 | retval = -ENOMEM; |
| 2600 | goto err; |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2601 | } |
| 2602 | |
| 2603 | /* allocate memory for our device state and initialize it */ |
| 2604 | dev = kzalloc(sizeof(*dev), GFP_KERNEL); |
| 2605 | if (dev == NULL) { |
| 2606 | em28xx_err(DRIVER_NAME ": out of memory!\n"); |
| 2607 | em28xx_devused &= ~(1<<nr); |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2608 | retval = -ENOMEM; |
| 2609 | goto err; |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2610 | } |
| 2611 | |
| 2612 | snprintf(dev->name, 29, "em28xx #%d", nr); |
| 2613 | dev->devno = nr; |
| 2614 | dev->model = id->driver_info; |
| 2615 | dev->alt = -1; |
| 2616 | |
| 2617 | /* Checks if audio is provided by some interface */ |
| 2618 | for (i = 0; i < udev->config->desc.bNumInterfaces; i++) { |
| 2619 | uif = udev->config->interface[i]; |
| 2620 | if (uif->altsetting[0].desc.bInterfaceClass == USB_CLASS_AUDIO) { |
| 2621 | dev->has_audio_class = 1; |
| 2622 | break; |
| 2623 | } |
| 2624 | } |
| 2625 | |
| 2626 | /* compute alternate max packet sizes */ |
| 2627 | uif = udev->actconfig->interface[0]; |
| 2628 | |
| 2629 | dev->num_alt = uif->num_altsetting; |
| 2630 | dev->alt_max_pkt_size = kmalloc(32 * dev->num_alt, GFP_KERNEL); |
| 2631 | |
| 2632 | if (dev->alt_max_pkt_size == NULL) { |
| 2633 | em28xx_errdev("out of memory!\n"); |
| 2634 | em28xx_devused &= ~(1<<nr); |
| 2635 | kfree(dev); |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2636 | retval = -ENOMEM; |
| 2637 | goto err; |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2638 | } |
| 2639 | |
| 2640 | for (i = 0; i < dev->num_alt ; i++) { |
| 2641 | u16 tmp = le16_to_cpu(uif->altsetting[i].endpoint[isoc_pipe].desc.wMaxPacketSize); |
| 2642 | dev->alt_max_pkt_size[i] = |
| 2643 | (tmp & 0x07ff) * (((tmp & 0x1800) >> 11) + 1); |
| 2644 | } |
| 2645 | |
| 2646 | if ((card[nr] >= 0) && (card[nr] < em28xx_bcount)) |
| 2647 | dev->model = card[nr]; |
| 2648 | |
| 2649 | /* allocate device struct */ |
| 2650 | mutex_init(&dev->lock); |
| 2651 | mutex_lock(&dev->lock); |
Mauro Carvalho Chehab | 36fa674 | 2009-04-05 08:02:15 -0300 | [diff] [blame] | 2652 | retval = em28xx_init_dev(&dev, udev, interface, nr); |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2653 | if (retval) { |
| 2654 | em28xx_devused &= ~(1<<dev->devno); |
Jiri Slaby | 11b79ea | 2009-07-05 14:06:41 -0300 | [diff] [blame] | 2655 | mutex_unlock(&dev->lock); |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2656 | kfree(dev); |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2657 | goto err; |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2658 | } |
| 2659 | |
| 2660 | /* save our data pointer in this interface device */ |
| 2661 | usb_set_intfdata(interface, dev); |
| 2662 | |
| 2663 | request_modules(dev); |
| 2664 | |
| 2665 | /* Should be the last thing to do, to avoid newer udev's to |
| 2666 | open the device before fully initializing it |
| 2667 | */ |
| 2668 | mutex_unlock(&dev->lock); |
| 2669 | |
| 2670 | return 0; |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2671 | |
| 2672 | err: |
| 2673 | return retval; |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2674 | } |
| 2675 | |
| 2676 | /* |
| 2677 | * em28xx_usb_disconnect() |
| 2678 | * called when the device gets diconencted |
| 2679 | * video device will be unregistered on v4l2_close in case it is still open |
| 2680 | */ |
| 2681 | static void em28xx_usb_disconnect(struct usb_interface *interface) |
| 2682 | { |
| 2683 | struct em28xx *dev; |
| 2684 | |
| 2685 | dev = usb_get_intfdata(interface); |
| 2686 | usb_set_intfdata(interface, NULL); |
| 2687 | |
| 2688 | if (!dev) |
| 2689 | return; |
| 2690 | |
| 2691 | em28xx_info("disconnecting %s\n", dev->vdev->name); |
| 2692 | |
| 2693 | /* wait until all current v4l2 io is finished then deallocate |
| 2694 | resources */ |
| 2695 | mutex_lock(&dev->lock); |
| 2696 | |
| 2697 | wake_up_interruptible_all(&dev->open); |
| 2698 | |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 2699 | v4l2_device_disconnect(&dev->v4l2_dev); |
| 2700 | |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 2701 | if (dev->users) { |
| 2702 | em28xx_warn |
| 2703 | ("device /dev/video%d is open! Deregistration and memory " |
| 2704 | "deallocation are deferred on close.\n", |
| 2705 | dev->vdev->num); |
| 2706 | |
| 2707 | dev->state |= DEV_MISCONFIGURED; |
| 2708 | em28xx_uninit_isoc(dev); |
| 2709 | dev->state |= DEV_DISCONNECTED; |
| 2710 | wake_up_interruptible(&dev->wait_frame); |
| 2711 | wake_up_interruptible(&dev->wait_stream); |
| 2712 | } else { |
| 2713 | dev->state |= DEV_DISCONNECTED; |
| 2714 | em28xx_release_resources(dev); |
| 2715 | } |
| 2716 | |
| 2717 | em28xx_close_extension(dev); |
| 2718 | |
| 2719 | mutex_unlock(&dev->lock); |
| 2720 | |
| 2721 | if (!dev->users) { |
| 2722 | kfree(dev->alt_max_pkt_size); |
| 2723 | kfree(dev); |
| 2724 | } |
| 2725 | } |
| 2726 | |
| 2727 | static struct usb_driver em28xx_usb_driver = { |
| 2728 | .name = "em28xx", |
| 2729 | .probe = em28xx_usb_probe, |
| 2730 | .disconnect = em28xx_usb_disconnect, |
| 2731 | .id_table = em28xx_id_table, |
| 2732 | }; |
| 2733 | |
| 2734 | static int __init em28xx_module_init(void) |
| 2735 | { |
| 2736 | int result; |
| 2737 | |
| 2738 | /* register this driver with the USB subsystem */ |
| 2739 | result = usb_register(&em28xx_usb_driver); |
| 2740 | if (result) |
| 2741 | em28xx_err(DRIVER_NAME |
| 2742 | " usb_register failed. Error number %d.\n", result); |
| 2743 | |
| 2744 | printk(KERN_INFO DRIVER_NAME " driver loaded\n"); |
| 2745 | |
| 2746 | return result; |
| 2747 | } |
| 2748 | |
| 2749 | static void __exit em28xx_module_exit(void) |
| 2750 | { |
| 2751 | /* deregister this driver with the USB subsystem */ |
| 2752 | usb_deregister(&em28xx_usb_driver); |
| 2753 | } |
| 2754 | |
| 2755 | module_init(em28xx_module_init); |
| 2756 | module_exit(em28xx_module_exit); |