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