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