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