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