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> |
Frank Schaefer | c647a91 | 2012-11-08 14:11:52 -0300 | [diff] [blame] | 9 | Copyright (C) 2012 Frank Schäfer <fschaefer.oss@googlemail.com> |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 10 | |
| 11 | This program is free software; you can redistribute it and/or modify |
| 12 | it under the terms of the GNU General Public License as published by |
| 13 | the Free Software Foundation; either version 2 of the License, or |
| 14 | (at your option) any later version. |
| 15 | |
| 16 | This program is distributed in the hope that it will be useful, |
| 17 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 19 | GNU General Public License for more details. |
| 20 | |
| 21 | You should have received a copy of the GNU General Public License |
| 22 | along with this program; if not, write to the Free Software |
| 23 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 24 | */ |
| 25 | |
Mauro Carvalho Chehab | 8314d40 | 2016-10-12 07:26:47 -0300 | [diff] [blame] | 26 | #include "em28xx.h" |
| 27 | |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 28 | #include <linux/init.h> |
| 29 | #include <linux/module.h> |
Tejun Heo | 5a0e3ad | 2010-03-24 17:04:11 +0900 | [diff] [blame] | 30 | #include <linux/slab.h> |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 31 | #include <linux/delay.h> |
| 32 | #include <linux/i2c.h> |
| 33 | #include <linux/usb.h> |
| 34 | #include <media/tuner.h> |
Mauro Carvalho Chehab | d647f0b | 2015-11-13 19:40:07 -0200 | [diff] [blame] | 35 | #include <media/drv-intf/msp3400.h> |
Mauro Carvalho Chehab | b5dcee2 | 2015-11-10 12:01:44 -0200 | [diff] [blame] | 36 | #include <media/i2c/saa7115.h> |
Javier Martinez Canillas | b802fb9 | 2016-02-05 17:09:56 -0200 | [diff] [blame] | 37 | #include <dt-bindings/media/tvp5150.h> |
Mauro Carvalho Chehab | b5dcee2 | 2015-11-10 12:01:44 -0200 | [diff] [blame] | 38 | #include <media/i2c/tvaudio.h> |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 39 | #include <media/i2c-addr.h> |
Mauro Carvalho Chehab | 1f6173e | 2005-11-08 21:37:16 -0800 | [diff] [blame] | 40 | #include <media/tveeprom.h> |
Mauro Carvalho Chehab | 9bb13a6 | 2006-01-09 15:25:37 -0200 | [diff] [blame] | 41 | #include <media/v4l2-common.h> |
Matthieu Rogez | 0899f62 | 2016-03-04 18:33:08 -0300 | [diff] [blame] | 42 | #include <sound/ac97_codec.h> |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 43 | |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 44 | |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 45 | #define DRIVER_NAME "em28xx" |
| 46 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 47 | static int tuner = -1; |
| 48 | module_param(tuner, int, 0444); |
| 49 | MODULE_PARM_DESC(tuner, "tuner type"); |
| 50 | |
Mauro Carvalho Chehab | c8793b0 | 2008-01-13 15:42:17 -0300 | [diff] [blame] | 51 | static unsigned int disable_ir; |
| 52 | module_param(disable_ir, int, 0444); |
| 53 | MODULE_PARM_DESC(disable_ir, "disable infrared remote support"); |
| 54 | |
Devin Heitmueller | e2a1b79 | 2009-05-27 23:44:10 -0300 | [diff] [blame] | 55 | static unsigned int disable_usb_speed_check; |
| 56 | module_param(disable_usb_speed_check, int, 0444); |
| 57 | MODULE_PARM_DESC(disable_usb_speed_check, |
| 58 | "override min bandwidth requirement of 480M bps"); |
| 59 | |
Devin Heitmueller | d3829fa | 2013-01-04 16:16:24 -0300 | [diff] [blame] | 60 | static unsigned int card[] = {[0 ... (EM28XX_MAXBOARDS - 1)] = -1U }; |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 61 | module_param_array(card, int, NULL, 0444); |
| 62 | MODULE_PARM_DESC(card, "card type"); |
| 63 | |
Frank Schaefer | 7e5d74e | 2012-12-26 15:12:37 -0300 | [diff] [blame] | 64 | static int usb_xfer_mode = -1; |
| 65 | module_param(usb_xfer_mode, int, 0444); |
| 66 | MODULE_PARM_DESC(usb_xfer_mode, |
| 67 | "USB transfer mode for frame data (-1 = auto, 0 = prefer isoc, 1 = prefer bulk)"); |
Frank Schaefer | 454fe92 | 2012-11-08 14:11:53 -0300 | [diff] [blame] | 68 | |
Chris Rankin | 38b61eb | 2011-08-20 08:21:03 -0300 | [diff] [blame] | 69 | /* Bitmask marking allocated devices from 0 to EM28XX_MAXBOARDS - 1 */ |
Fengguang Wu | 9e8ca38 | 2014-01-15 18:50:26 -0300 | [diff] [blame] | 70 | static DECLARE_BITMAP(em28xx_devused, EM28XX_MAXBOARDS); |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 71 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 72 | struct em28xx_hash_table { |
| 73 | unsigned long hash; |
| 74 | unsigned int model; |
| 75 | unsigned int tuner; |
| 76 | }; |
| 77 | |
Ezequiel Garcia | 60332f0 | 2012-04-28 09:57:01 -0300 | [diff] [blame] | 78 | static void em28xx_pre_card_setup(struct em28xx *dev); |
| 79 | |
Mauro Carvalho Chehab | 0ec202d | 2008-11-25 13:16:13 -0300 | [diff] [blame] | 80 | /* |
| 81 | * Reset sequences for analog/digital modes |
| 82 | */ |
| 83 | |
| 84 | /* Reset for the most [analog] boards */ |
| 85 | static struct em28xx_reg_seq default_analog[] = { |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 86 | {EM2820_R08_GPIO_CTRL, 0x6d, ~EM_GPIO_4, 10}, |
Mauro Carvalho Chehab | 0ec202d | 2008-11-25 13:16:13 -0300 | [diff] [blame] | 87 | { -1, -1, -1, -1}, |
| 88 | }; |
| 89 | |
| 90 | /* Reset for the most [digital] boards */ |
| 91 | static struct em28xx_reg_seq default_digital[] = { |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 92 | {EM2820_R08_GPIO_CTRL, 0x6e, ~EM_GPIO_4, 10}, |
Mauro Carvalho Chehab | 0ec202d | 2008-11-25 13:16:13 -0300 | [diff] [blame] | 93 | { -1, -1, -1, -1}, |
| 94 | }; |
| 95 | |
| 96 | /* Board Hauppauge WinTV HVR 900 analog */ |
| 97 | static struct em28xx_reg_seq hauppauge_wintv_hvr_900_analog[] = { |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 98 | {EM2820_R08_GPIO_CTRL, 0x2d, ~EM_GPIO_4, 10}, |
Frank Schaefer | b68cafc | 2013-10-10 14:36:30 -0300 | [diff] [blame] | 99 | { 0x05, 0xff, 0x10, 10}, |
| 100 | { -1, -1, -1, -1}, |
Mauro Carvalho Chehab | 0ec202d | 2008-11-25 13:16:13 -0300 | [diff] [blame] | 101 | }; |
| 102 | |
| 103 | /* Board Hauppauge WinTV HVR 900 digital */ |
| 104 | static struct em28xx_reg_seq hauppauge_wintv_hvr_900_digital[] = { |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 105 | {EM2820_R08_GPIO_CTRL, 0x2e, ~EM_GPIO_4, 10}, |
Mauro Carvalho Chehab | 0ec202d | 2008-11-25 13:16:13 -0300 | [diff] [blame] | 106 | {EM2880_R04_GPO, 0x04, 0x0f, 10}, |
| 107 | {EM2880_R04_GPO, 0x0c, 0x0f, 10}, |
Frank Schaefer | b68cafc | 2013-10-10 14:36:30 -0300 | [diff] [blame] | 108 | { -1, -1, -1, -1}, |
Mauro Carvalho Chehab | 0ec202d | 2008-11-25 13:16:13 -0300 | [diff] [blame] | 109 | }; |
| 110 | |
Devin Heitmueller | 7030f52 | 2011-03-13 02:04:53 -0300 | [diff] [blame] | 111 | /* Board Hauppauge WinTV HVR 900 (R2) digital */ |
| 112 | static struct em28xx_reg_seq hauppauge_wintv_hvr_900R2_digital[] = { |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 113 | {EM2820_R08_GPIO_CTRL, 0x2e, ~EM_GPIO_4, 10}, |
Devin Heitmueller | 7030f52 | 2011-03-13 02:04:53 -0300 | [diff] [blame] | 114 | {EM2880_R04_GPO, 0x0c, 0x0f, 10}, |
Frank Schaefer | b68cafc | 2013-10-10 14:36:30 -0300 | [diff] [blame] | 115 | { -1, -1, -1, -1}, |
Devin Heitmueller | 7030f52 | 2011-03-13 02:04:53 -0300 | [diff] [blame] | 116 | }; |
| 117 | |
Mauro Carvalho Chehab | 0ec202d | 2008-11-25 13:16:13 -0300 | [diff] [blame] | 118 | /* Boards - EM2880 MSI DIGIVOX AD and EM2880_BOARD_MSI_DIGIVOX_AD_II */ |
| 119 | static struct em28xx_reg_seq em2880_msi_digivox_ad_analog[] = { |
Frank Schaefer | b68cafc | 2013-10-10 14:36:30 -0300 | [diff] [blame] | 120 | {EM2820_R08_GPIO_CTRL, 0x69, ~EM_GPIO_4, 10}, |
| 121 | { -1, -1, -1, -1}, |
Mauro Carvalho Chehab | 0ec202d | 2008-11-25 13:16:13 -0300 | [diff] [blame] | 122 | }; |
| 123 | |
| 124 | /* 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] | 125 | |
| 126 | /* Board - EM2870 Kworld 355u |
| 127 | Analog - No input analog */ |
Mauro Carvalho Chehab | 0ec202d | 2008-11-25 13:16:13 -0300 | [diff] [blame] | 128 | |
Franklin Meng | d7de5d8 | 2009-06-06 17:05:02 -0300 | [diff] [blame] | 129 | /* Board - EM2882 Kworld 315U digital */ |
| 130 | static struct em28xx_reg_seq em2882_kworld_315u_digital[] = { |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 131 | {EM2820_R08_GPIO_CTRL, 0xff, 0xff, 10}, |
| 132 | {EM2820_R08_GPIO_CTRL, 0xfe, 0xff, 10}, |
Franklin Meng | d7de5d8 | 2009-06-06 17:05:02 -0300 | [diff] [blame] | 133 | {EM2880_R04_GPO, 0x04, 0xff, 10}, |
| 134 | {EM2880_R04_GPO, 0x0c, 0xff, 10}, |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 135 | {EM2820_R08_GPIO_CTRL, 0x7e, 0xff, 10}, |
Frank Schaefer | b68cafc | 2013-10-10 14:36:30 -0300 | [diff] [blame] | 136 | { -1, -1, -1, -1}, |
Franklin Meng | d7de5d8 | 2009-06-06 17:05:02 -0300 | [diff] [blame] | 137 | }; |
| 138 | |
| 139 | static struct em28xx_reg_seq em2882_kworld_315u_tuner_gpio[] = { |
| 140 | {EM2880_R04_GPO, 0x08, 0xff, 10}, |
| 141 | {EM2880_R04_GPO, 0x0c, 0xff, 10}, |
| 142 | {EM2880_R04_GPO, 0x08, 0xff, 10}, |
| 143 | {EM2880_R04_GPO, 0x0c, 0xff, 10}, |
Frank Schaefer | b68cafc | 2013-10-10 14:36:30 -0300 | [diff] [blame] | 144 | { -1, -1, -1, -1}, |
Franklin Meng | d7de5d8 | 2009-06-06 17:05:02 -0300 | [diff] [blame] | 145 | }; |
| 146 | |
Robert Krakora | 6e7b9ea | 2009-01-18 21:59:34 -0300 | [diff] [blame] | 147 | static struct em28xx_reg_seq kworld_330u_analog[] = { |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 148 | {EM2820_R08_GPIO_CTRL, 0x6d, ~EM_GPIO_4, 10}, |
Robert Krakora | 6e7b9ea | 2009-01-18 21:59:34 -0300 | [diff] [blame] | 149 | {EM2880_R04_GPO, 0x00, 0xff, 10}, |
Frank Schaefer | b68cafc | 2013-10-10 14:36:30 -0300 | [diff] [blame] | 150 | { -1, -1, -1, -1}, |
Robert Krakora | 6e7b9ea | 2009-01-18 21:59:34 -0300 | [diff] [blame] | 151 | }; |
| 152 | |
| 153 | static struct em28xx_reg_seq kworld_330u_digital[] = { |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 154 | {EM2820_R08_GPIO_CTRL, 0x6e, ~EM_GPIO_4, 10}, |
Robert Krakora | 6e7b9ea | 2009-01-18 21:59:34 -0300 | [diff] [blame] | 155 | {EM2880_R04_GPO, 0x08, 0xff, 10}, |
Frank Schaefer | b68cafc | 2013-10-10 14:36:30 -0300 | [diff] [blame] | 156 | { -1, -1, -1, -1}, |
Robert Krakora | 6e7b9ea | 2009-01-18 21:59:34 -0300 | [diff] [blame] | 157 | }; |
| 158 | |
Devin Heitmueller | 1985922 | 2009-06-19 00:33:54 -0300 | [diff] [blame] | 159 | /* Evga inDtube |
| 160 | GPIO0 - Enable digital power (s5h1409) - low to enable |
| 161 | GPIO1 - Enable analog power (tvp5150/emp202) - low to enable |
| 162 | GPIO4 - xc3028 reset |
| 163 | GOP3 - s5h1409 reset |
| 164 | */ |
| 165 | static struct em28xx_reg_seq evga_indtube_analog[] = { |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 166 | {EM2820_R08_GPIO_CTRL, 0x79, 0xff, 60}, |
Devin Heitmueller | 1985922 | 2009-06-19 00:33:54 -0300 | [diff] [blame] | 167 | { -1, -1, -1, -1}, |
| 168 | }; |
| 169 | |
| 170 | static struct em28xx_reg_seq evga_indtube_digital[] = { |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 171 | {EM2820_R08_GPIO_CTRL, 0x7a, 0xff, 1}, |
Devin Heitmueller | 1985922 | 2009-06-19 00:33:54 -0300 | [diff] [blame] | 172 | {EM2880_R04_GPO, 0x04, 0xff, 10}, |
| 173 | {EM2880_R04_GPO, 0x0c, 0xff, 1}, |
Frank Schaefer | b68cafc | 2013-10-10 14:36:30 -0300 | [diff] [blame] | 174 | { -1, -1, -1, -1}, |
Devin Heitmueller | 1985922 | 2009-06-19 00:33:54 -0300 | [diff] [blame] | 175 | }; |
| 176 | |
Jarod Wilson | 7e48b30 | 2010-03-07 17:55:43 -0300 | [diff] [blame] | 177 | /* |
Jean-Francois Thibert | 6dbea9f | 2013-10-09 11:18:05 -0300 | [diff] [blame] | 178 | * KWorld PlusTV 340U, UB435-Q and UB435-Q V2 (ATSC) GPIOs map: |
Jarod Wilson | 7e48b30 | 2010-03-07 17:55:43 -0300 | [diff] [blame] | 179 | * EM_GPIO_0 - currently unknown |
| 180 | * EM_GPIO_1 - LED disable/enable (1 = off, 0 = on) |
| 181 | * EM_GPIO_2 - currently unknown |
| 182 | * EM_GPIO_3 - currently unknown |
| 183 | * EM_GPIO_4 - TDA18271HD/C1 tuner (1 = active, 0 = in reset) |
| 184 | * EM_GPIO_5 - LGDT3304 ATSC/QAM demod (1 = active, 0 = in reset) |
| 185 | * EM_GPIO_6 - currently unknown |
| 186 | * EM_GPIO_7 - currently unknown |
| 187 | */ |
| 188 | static struct em28xx_reg_seq kworld_a340_digital[] = { |
Frank Schaefer | b68cafc | 2013-10-10 14:36:30 -0300 | [diff] [blame] | 189 | {EM2820_R08_GPIO_CTRL, 0x6d, ~EM_GPIO_4, 10}, |
| 190 | { -1, -1, -1, -1}, |
Jarod Wilson | 7e48b30 | 2010-03-07 17:55:43 -0300 | [diff] [blame] | 191 | }; |
| 192 | |
Mauro Carvalho Chehab | 02bc1f5 | 2014-03-03 16:28:39 -0300 | [diff] [blame] | 193 | static struct em28xx_reg_seq kworld_ub435q_v3_digital[] = { |
Mauro Carvalho Chehab | fdf1bc9 | 2014-11-28 08:34:15 -0300 | [diff] [blame] | 194 | {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 100}, |
| 195 | {EM2874_R80_GPIO_P0_CTRL, 0xfe, 0xff, 100}, |
Mauro Carvalho Chehab | 02bc1f5 | 2014-03-03 16:28:39 -0300 | [diff] [blame] | 196 | {EM2874_R80_GPIO_P0_CTRL, 0xbe, 0xff, 100}, |
| 197 | {EM2874_R80_GPIO_P0_CTRL, 0xfe, 0xff, 100}, |
| 198 | { -1, -1, -1, -1}, |
| 199 | }; |
| 200 | |
Devin Heitmueller | d5b3ba9 | 2009-07-08 21:51:35 -0300 | [diff] [blame] | 201 | /* Pinnacle Hybrid Pro eb1a:2881 */ |
| 202 | static struct em28xx_reg_seq pinnacle_hybrid_pro_analog[] = { |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 203 | {EM2820_R08_GPIO_CTRL, 0xfd, ~EM_GPIO_4, 10}, |
Devin Heitmueller | d5b3ba9 | 2009-07-08 21:51:35 -0300 | [diff] [blame] | 204 | { -1, -1, -1, -1}, |
| 205 | }; |
| 206 | |
| 207 | static struct em28xx_reg_seq pinnacle_hybrid_pro_digital[] = { |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 208 | {EM2820_R08_GPIO_CTRL, 0x6e, ~EM_GPIO_4, 10}, |
Devin Heitmueller | d5b3ba9 | 2009-07-08 21:51:35 -0300 | [diff] [blame] | 209 | {EM2880_R04_GPO, 0x04, 0xff, 100},/* zl10353 reset */ |
| 210 | {EM2880_R04_GPO, 0x0c, 0xff, 1}, |
| 211 | { -1, -1, -1, -1}, |
| 212 | }; |
| 213 | |
Michel Garnier | cec4e6c | 2010-10-16 14:42:01 -0300 | [diff] [blame] | 214 | static struct em28xx_reg_seq terratec_cinergy_USB_XS_FR_analog[] = { |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 215 | {EM2820_R08_GPIO_CTRL, 0x6d, ~EM_GPIO_4, 10}, |
Michel Garnier | cec4e6c | 2010-10-16 14:42:01 -0300 | [diff] [blame] | 216 | {EM2880_R04_GPO, 0x00, 0xff, 10}, |
Frank Schaefer | b68cafc | 2013-10-10 14:36:30 -0300 | [diff] [blame] | 217 | { -1, -1, -1, -1}, |
Michel Garnier | cec4e6c | 2010-10-16 14:42:01 -0300 | [diff] [blame] | 218 | }; |
| 219 | |
| 220 | static struct em28xx_reg_seq terratec_cinergy_USB_XS_FR_digital[] = { |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 221 | {EM2820_R08_GPIO_CTRL, 0x6e, ~EM_GPIO_4, 10}, |
Michel Garnier | cec4e6c | 2010-10-16 14:42:01 -0300 | [diff] [blame] | 222 | {EM2880_R04_GPO, 0x08, 0xff, 10}, |
Frank Schaefer | b68cafc | 2013-10-10 14:36:30 -0300 | [diff] [blame] | 223 | { -1, -1, -1, -1}, |
Michel Garnier | cec4e6c | 2010-10-16 14:42:01 -0300 | [diff] [blame] | 224 | }; |
| 225 | |
Devin Heitmueller | 38b2df9 | 2012-08-13 21:18:02 -0300 | [diff] [blame] | 226 | /* PCTV HD Mini (80e) GPIOs |
| 227 | 0-5: not used |
| 228 | 6: demod reset, active low |
| 229 | 7: LED on, active high */ |
| 230 | static struct em28xx_reg_seq em2874_pctv_80e_digital[] = { |
| 231 | {EM28XX_R06_I2C_CLK, 0x45, 0xff, 10}, /*400 KHz*/ |
Mauro Carvalho Chehab | 88e4fcd | 2014-03-04 20:49:07 -0300 | [diff] [blame] | 232 | {EM2874_R80_GPIO_P0_CTRL, 0x00, 0xff, 100},/*Demod reset*/ |
| 233 | {EM2874_R80_GPIO_P0_CTRL, 0x40, 0xff, 10}, |
Devin Heitmueller | 38b2df9 | 2012-08-13 21:18:02 -0300 | [diff] [blame] | 234 | { -1, -1, -1, -1}, |
| 235 | }; |
| 236 | |
Antti Palosaari | 285eb1a | 2009-09-15 14:42:13 -0300 | [diff] [blame] | 237 | /* eb1a:2868 Reddo DVB-C USB TV Box |
| 238 | GPIO4 - CU1216L NIM |
| 239 | Other GPIOs seems to be don't care. */ |
| 240 | static struct em28xx_reg_seq reddo_dvb_c_usb_box[] = { |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 241 | {EM2820_R08_GPIO_CTRL, 0xfe, 0xff, 10}, |
| 242 | {EM2820_R08_GPIO_CTRL, 0xde, 0xff, 10}, |
| 243 | {EM2820_R08_GPIO_CTRL, 0xfe, 0xff, 10}, |
| 244 | {EM2820_R08_GPIO_CTRL, 0xff, 0xff, 10}, |
| 245 | {EM2820_R08_GPIO_CTRL, 0x7f, 0xff, 10}, |
| 246 | {EM2820_R08_GPIO_CTRL, 0x6f, 0xff, 10}, |
| 247 | {EM2820_R08_GPIO_CTRL, 0xff, 0xff, 10}, |
Frank Schaefer | b68cafc | 2013-10-10 14:36:30 -0300 | [diff] [blame] | 248 | { -1, -1, -1, -1}, |
Antti Palosaari | 285eb1a | 2009-09-15 14:42:13 -0300 | [diff] [blame] | 249 | }; |
Devin Heitmueller | d5b3ba9 | 2009-07-08 21:51:35 -0300 | [diff] [blame] | 250 | |
Mauro Carvalho Chehab | 0ec202d | 2008-11-25 13:16:13 -0300 | [diff] [blame] | 251 | /* Callback for the most boards */ |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 252 | static struct em28xx_reg_seq default_tuner_gpio[] = { |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 253 | {EM2820_R08_GPIO_CTRL, EM_GPIO_4, EM_GPIO_4, 10}, |
| 254 | {EM2820_R08_GPIO_CTRL, 0, EM_GPIO_4, 10}, |
| 255 | {EM2820_R08_GPIO_CTRL, EM_GPIO_4, EM_GPIO_4, 10}, |
Frank Schaefer | b68cafc | 2013-10-10 14:36:30 -0300 | [diff] [blame] | 256 | { -1, -1, -1, -1}, |
Mauro Carvalho Chehab | 0ec202d | 2008-11-25 13:16:13 -0300 | [diff] [blame] | 257 | }; |
| 258 | |
Vitaly Wool | 2bd1d9e | 2009-03-04 08:27:52 -0300 | [diff] [blame] | 259 | /* Mute/unmute */ |
| 260 | static struct em28xx_reg_seq compro_unmute_tv_gpio[] = { |
Frank Schaefer | b68cafc | 2013-10-10 14:36:30 -0300 | [diff] [blame] | 261 | {EM2820_R08_GPIO_CTRL, 5, 7, 10}, |
| 262 | { -1, -1, -1, -1}, |
Vitaly Wool | 2bd1d9e | 2009-03-04 08:27:52 -0300 | [diff] [blame] | 263 | }; |
| 264 | |
| 265 | static struct em28xx_reg_seq compro_unmute_svid_gpio[] = { |
Frank Schaefer | b68cafc | 2013-10-10 14:36:30 -0300 | [diff] [blame] | 266 | {EM2820_R08_GPIO_CTRL, 4, 7, 10}, |
| 267 | { -1, -1, -1, -1}, |
Vitaly Wool | 2bd1d9e | 2009-03-04 08:27:52 -0300 | [diff] [blame] | 268 | }; |
| 269 | |
| 270 | static struct em28xx_reg_seq compro_mute_gpio[] = { |
Frank Schaefer | b68cafc | 2013-10-10 14:36:30 -0300 | [diff] [blame] | 271 | {EM2820_R08_GPIO_CTRL, 6, 7, 10}, |
| 272 | { -1, -1, -1, -1}, |
Vitaly Wool | 2bd1d9e | 2009-03-04 08:27:52 -0300 | [diff] [blame] | 273 | }; |
| 274 | |
Mauro Carvalho Chehab | 766ed64 | 2009-05-24 00:46:01 -0300 | [diff] [blame] | 275 | /* Terratec AV350 */ |
| 276 | static struct em28xx_reg_seq terratec_av350_mute_gpio[] = { |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 277 | {EM2820_R08_GPIO_CTRL, 0xff, 0x7f, 10}, |
Mauro Carvalho Chehab | 766ed64 | 2009-05-24 00:46:01 -0300 | [diff] [blame] | 278 | { -1, -1, -1, -1}, |
| 279 | }; |
| 280 | |
| 281 | static struct em28xx_reg_seq terratec_av350_unmute_gpio[] = { |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 282 | {EM2820_R08_GPIO_CTRL, 0xff, 0xff, 10}, |
Mauro Carvalho Chehab | 766ed64 | 2009-05-24 00:46:01 -0300 | [diff] [blame] | 283 | { -1, -1, -1, -1}, |
| 284 | }; |
Mauro Carvalho Chehab | 02e7804 | 2009-06-29 11:35:05 -0300 | [diff] [blame] | 285 | |
| 286 | static struct em28xx_reg_seq silvercrest_reg_seq[] = { |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 287 | {EM2820_R08_GPIO_CTRL, 0xff, 0xff, 10}, |
| 288 | {EM2820_R08_GPIO_CTRL, 0x01, 0xf7, 10}, |
Mauro Carvalho Chehab | 02e7804 | 2009-06-29 11:35:05 -0300 | [diff] [blame] | 289 | { -1, -1, -1, -1}, |
| 290 | }; |
| 291 | |
Mauro Carvalho Chehab | 694a101 | 2009-11-26 21:26:13 -0300 | [diff] [blame] | 292 | static struct em28xx_reg_seq vc211a_enable[] = { |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 293 | {EM2820_R08_GPIO_CTRL, 0xff, 0x07, 10}, |
| 294 | {EM2820_R08_GPIO_CTRL, 0xff, 0x0f, 10}, |
| 295 | {EM2820_R08_GPIO_CTRL, 0xff, 0x0b, 10}, |
Mauro Carvalho Chehab | 694a101 | 2009-11-26 21:26:13 -0300 | [diff] [blame] | 296 | { -1, -1, -1, -1}, |
| 297 | }; |
| 298 | |
Andrea.Amorosi76@gmail.com | 7ca7ef6 | 2010-02-09 17:53:38 -0300 | [diff] [blame] | 299 | static struct em28xx_reg_seq dikom_dk300_digital[] = { |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 300 | {EM2820_R08_GPIO_CTRL, 0x6e, ~EM_GPIO_4, 10}, |
Andrea.Amorosi76@gmail.com | 7ca7ef6 | 2010-02-09 17:53:38 -0300 | [diff] [blame] | 301 | {EM2880_R04_GPO, 0x08, 0xff, 10}, |
Frank Schaefer | b68cafc | 2013-10-10 14:36:30 -0300 | [diff] [blame] | 302 | { -1, -1, -1, -1}, |
Andrea.Amorosi76@gmail.com | 7ca7ef6 | 2010-02-09 17:53:38 -0300 | [diff] [blame] | 303 | }; |
| 304 | |
Mauro Carvalho Chehab | ca3dfd6 | 2010-09-10 17:29:14 -0300 | [diff] [blame] | 305 | /* Reset for the most [digital] boards */ |
| 306 | static struct em28xx_reg_seq leadership_digital[] = { |
Frank Schaefer | 907d109 | 2013-06-03 14:12:02 -0300 | [diff] [blame] | 307 | {EM2874_R80_GPIO_P0_CTRL, 0x70, 0xff, 10}, |
Frank Schaefer | b68cafc | 2013-10-10 14:36:30 -0300 | [diff] [blame] | 308 | { -1, -1, -1, -1}, |
Mauro Carvalho Chehab | ca3dfd6 | 2010-09-10 17:29:14 -0300 | [diff] [blame] | 309 | }; |
| 310 | |
| 311 | static struct em28xx_reg_seq leadership_reset[] = { |
Frank Schaefer | 907d109 | 2013-06-03 14:12:02 -0300 | [diff] [blame] | 312 | {EM2874_R80_GPIO_P0_CTRL, 0xf0, 0xff, 10}, |
| 313 | {EM2874_R80_GPIO_P0_CTRL, 0xb0, 0xff, 10}, |
| 314 | {EM2874_R80_GPIO_P0_CTRL, 0xf0, 0xff, 10}, |
Frank Schaefer | b68cafc | 2013-10-10 14:36:30 -0300 | [diff] [blame] | 315 | { -1, -1, -1, -1}, |
Mauro Carvalho Chehab | ca3dfd6 | 2010-09-10 17:29:14 -0300 | [diff] [blame] | 316 | }; |
| 317 | |
Antti Palosaari | 460312e | 2011-05-25 17:03:50 -0300 | [diff] [blame] | 318 | /* 2013:024f PCTV nanoStick T2 290e |
Antti Palosaari | d6a5f92 | 2011-04-07 16:34:44 -0300 | [diff] [blame] | 319 | * GPIO_6 - demod reset |
| 320 | * GPIO_7 - LED |
| 321 | */ |
| 322 | static struct em28xx_reg_seq pctv_290e[] = { |
Frank Schaefer | 907d109 | 2013-06-03 14:12:02 -0300 | [diff] [blame] | 323 | {EM2874_R80_GPIO_P0_CTRL, 0x00, 0xff, 80}, |
| 324 | {EM2874_R80_GPIO_P0_CTRL, 0x40, 0xff, 80}, /* GPIO_6 = 1 */ |
| 325 | {EM2874_R80_GPIO_P0_CTRL, 0xc0, 0xff, 80}, /* GPIO_7 = 1 */ |
Frank Schaefer | b68cafc | 2013-10-10 14:36:30 -0300 | [diff] [blame] | 326 | { -1, -1, -1, -1}, |
Antti Palosaari | d6a5f92 | 2011-04-07 16:34:44 -0300 | [diff] [blame] | 327 | }; |
Mauro Carvalho Chehab | ca3dfd6 | 2010-09-10 17:29:14 -0300 | [diff] [blame] | 328 | |
Mauro Carvalho Chehab | fec528b | 2011-07-03 21:05:06 -0300 | [diff] [blame] | 329 | #if 0 |
| 330 | static struct em28xx_reg_seq terratec_h5_gpio[] = { |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 331 | {EM2820_R08_GPIO_CTRL, 0xff, 0xff, 10}, |
Frank Schaefer | 907d109 | 2013-06-03 14:12:02 -0300 | [diff] [blame] | 332 | {EM2874_R80_GPIO_P0_CTRL, 0xf6, 0xff, 100}, |
| 333 | {EM2874_R80_GPIO_P0_CTRL, 0xf2, 0xff, 50}, |
| 334 | {EM2874_R80_GPIO_P0_CTRL, 0xf6, 0xff, 50}, |
Frank Schaefer | b68cafc | 2013-10-10 14:36:30 -0300 | [diff] [blame] | 335 | { -1, -1, -1, -1}, |
Mauro Carvalho Chehab | fec528b | 2011-07-03 21:05:06 -0300 | [diff] [blame] | 336 | }; |
| 337 | |
| 338 | static struct em28xx_reg_seq terratec_h5_digital[] = { |
Frank Schaefer | 907d109 | 2013-06-03 14:12:02 -0300 | [diff] [blame] | 339 | {EM2874_R80_GPIO_P0_CTRL, 0xf6, 0xff, 10}, |
| 340 | {EM2874_R80_GPIO_P0_CTRL, 0xe6, 0xff, 100}, |
| 341 | {EM2874_R80_GPIO_P0_CTRL, 0xa6, 0xff, 10}, |
Frank Schaefer | b68cafc | 2013-10-10 14:36:30 -0300 | [diff] [blame] | 342 | { -1, -1, -1, -1}, |
Mauro Carvalho Chehab | fec528b | 2011-07-03 21:05:06 -0300 | [diff] [blame] | 343 | }; |
| 344 | #endif |
| 345 | |
Antti Palosaari | 3658871 | 2011-08-01 01:15:30 -0300 | [diff] [blame] | 346 | /* 2013:024f PCTV DVB-S2 Stick 460e |
| 347 | * GPIO_0 - POWER_ON |
| 348 | * GPIO_1 - BOOST |
| 349 | * GPIO_2 - VUV_LNB (red LED) |
| 350 | * GPIO_3 - EXT_12V |
| 351 | * GPIO_4 - INT_DEM (DEMOD GPIO_0) |
| 352 | * GPIO_5 - INT_LNB |
| 353 | * GPIO_6 - RESET_DEM |
| 354 | * GPIO_7 - LED (green LED) |
| 355 | */ |
| 356 | static struct em28xx_reg_seq pctv_460e[] = { |
Frank Schaefer | b68cafc | 2013-10-10 14:36:30 -0300 | [diff] [blame] | 357 | {EM2874_R80_GPIO_P0_CTRL, 0x01, 0xff, 50}, |
| 358 | { 0x0d, 0xff, 0xff, 50}, |
| 359 | {EM2874_R80_GPIO_P0_CTRL, 0x41, 0xff, 50}, /* GPIO_6=1 */ |
| 360 | { 0x0d, 0x42, 0xff, 50}, |
| 361 | {EM2874_R80_GPIO_P0_CTRL, 0x61, 0xff, 50}, /* GPIO_5=1 */ |
| 362 | { -1, -1, -1, -1}, |
Antti Palosaari | 3658871 | 2011-08-01 01:15:30 -0300 | [diff] [blame] | 363 | }; |
| 364 | |
Mauro Carvalho Chehab | 4159d01 | 2013-02-28 10:35:56 -0300 | [diff] [blame] | 365 | static struct em28xx_reg_seq c3tech_digital_duo_digital[] = { |
Frank Schaefer | 907d109 | 2013-06-03 14:12:02 -0300 | [diff] [blame] | 366 | {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 10}, |
| 367 | {EM2874_R80_GPIO_P0_CTRL, 0xfd, 0xff, 10}, /* xc5000 reset */ |
| 368 | {EM2874_R80_GPIO_P0_CTRL, 0xf9, 0xff, 35}, |
| 369 | {EM2874_R80_GPIO_P0_CTRL, 0xfd, 0xff, 10}, |
| 370 | {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 10}, |
| 371 | {EM2874_R80_GPIO_P0_CTRL, 0xfe, 0xff, 10}, |
| 372 | {EM2874_R80_GPIO_P0_CTRL, 0xbe, 0xff, 10}, |
| 373 | {EM2874_R80_GPIO_P0_CTRL, 0xfe, 0xff, 20}, |
Frank Schaefer | b68cafc | 2013-10-10 14:36:30 -0300 | [diff] [blame] | 374 | { -1, -1, -1, -1}, |
Mauro Carvalho Chehab | 4159d01 | 2013-02-28 10:35:56 -0300 | [diff] [blame] | 375 | }; |
| 376 | |
Antti Palosaari | ec57336 | 2013-02-25 09:01:13 -0300 | [diff] [blame] | 377 | /* |
| 378 | * 2013:0258 PCTV DVB-S2 Stick (461e) |
| 379 | * GPIO 0 = POWER_ON |
| 380 | * GPIO 1 = BOOST |
| 381 | * GPIO 2 = VUV_LNB (red LED) |
| 382 | * GPIO 3 = #EXT_12V |
| 383 | * GPIO 4 = INT_DEM |
| 384 | * GPIO 5 = INT_LNB |
| 385 | * GPIO 6 = #RESET_DEM |
| 386 | * GPIO 7 = P07_LED (green LED) |
| 387 | */ |
| 388 | static struct em28xx_reg_seq pctv_461e[] = { |
| 389 | {EM2874_R80_GPIO_P0_CTRL, 0x7f, 0xff, 0}, |
| 390 | {0x0d, 0xff, 0xff, 0}, |
| 391 | {EM2874_R80_GPIO_P0_CTRL, 0x3f, 0xff, 100}, /* reset demod */ |
| 392 | {EM2874_R80_GPIO_P0_CTRL, 0x7f, 0xff, 200}, /* reset demod */ |
| 393 | {0x0d, 0x42, 0xff, 0}, |
| 394 | {EM2874_R80_GPIO_P0_CTRL, 0xeb, 0xff, 0}, |
| 395 | {EM2874_R5F_TS_ENABLE, 0x84, 0x84, 0}, /* parallel? | null discard */ |
| 396 | { -1, -1, -1, -1}, |
| 397 | }; |
| 398 | |
Mauro Carvalho Chehab | 8503232 | 2011-11-24 15:01:45 -0200 | [diff] [blame] | 399 | #if 0 |
Eddi De Pieri | 82e7dbb | 2011-11-19 11:37:14 -0300 | [diff] [blame] | 400 | static struct em28xx_reg_seq hauppauge_930c_gpio[] = { |
Frank Schaefer | 907d109 | 2013-06-03 14:12:02 -0300 | [diff] [blame] | 401 | {EM2874_R80_GPIO_P0_CTRL, 0x6f, 0xff, 10}, |
| 402 | {EM2874_R80_GPIO_P0_CTRL, 0x4f, 0xff, 10}, /* xc5000 reset */ |
| 403 | {EM2874_R80_GPIO_P0_CTRL, 0x6f, 0xff, 10}, |
| 404 | {EM2874_R80_GPIO_P0_CTRL, 0x4f, 0xff, 10}, |
Frank Schaefer | b68cafc | 2013-10-10 14:36:30 -0300 | [diff] [blame] | 405 | { -1, -1, -1, -1}, |
Eddi De Pieri | 82e7dbb | 2011-11-19 11:37:14 -0300 | [diff] [blame] | 406 | }; |
| 407 | |
Eddi De Pieri | 82e7dbb | 2011-11-19 11:37:14 -0300 | [diff] [blame] | 408 | static struct em28xx_reg_seq hauppauge_930c_digital[] = { |
Frank Schaefer | 907d109 | 2013-06-03 14:12:02 -0300 | [diff] [blame] | 409 | {EM2874_R80_GPIO_P0_CTRL, 0xf6, 0xff, 10}, |
| 410 | {EM2874_R80_GPIO_P0_CTRL, 0xe6, 0xff, 100}, |
| 411 | {EM2874_R80_GPIO_P0_CTRL, 0xa6, 0xff, 10}, |
Frank Schaefer | b68cafc | 2013-10-10 14:36:30 -0300 | [diff] [blame] | 412 | { -1, -1, -1, -1}, |
Eddi De Pieri | 82e7dbb | 2011-11-19 11:37:14 -0300 | [diff] [blame] | 413 | }; |
| 414 | #endif |
| 415 | |
Antti Palosaari | 3553085 | 2012-03-18 18:09:01 -0300 | [diff] [blame] | 416 | /* 1b80:e425 MaxMedia UB425-TC |
Jakob Haufe | 7c1dfdb | 2013-04-13 11:03:37 -0300 | [diff] [blame] | 417 | * 1b80:e1cc Delock 61959 |
Antti Palosaari | 3553085 | 2012-03-18 18:09:01 -0300 | [diff] [blame] | 418 | * GPIO_6 - demod reset, 0=active |
| 419 | * GPIO_7 - LED, 0=active |
| 420 | */ |
| 421 | static struct em28xx_reg_seq maxmedia_ub425_tc[] = { |
Frank Schaefer | b68cafc | 2013-10-10 14:36:30 -0300 | [diff] [blame] | 422 | {EM2874_R80_GPIO_P0_CTRL, 0x83, 0xff, 100}, |
| 423 | {EM2874_R80_GPIO_P0_CTRL, 0xc3, 0xff, 100}, /* GPIO_6 = 1 */ |
| 424 | {EM2874_R80_GPIO_P0_CTRL, 0x43, 0xff, 000}, /* GPIO_7 = 0 */ |
| 425 | { -1, -1, -1, -1}, |
Antti Palosaari | 3553085 | 2012-03-18 18:09:01 -0300 | [diff] [blame] | 426 | }; |
| 427 | |
Ivan Kalvachev | fa5527c | 2012-03-19 20:09:55 -0300 | [diff] [blame] | 428 | /* 2304:0242 PCTV QuatroStick (510e) |
| 429 | * GPIO_2: decoder reset, 0=active |
| 430 | * GPIO_4: decoder suspend, 0=active |
| 431 | * GPIO_6: demod reset, 0=active |
| 432 | * GPIO_7: LED, 1=active |
| 433 | */ |
| 434 | static struct em28xx_reg_seq pctv_510e[] = { |
Frank Schaefer | b68cafc | 2013-10-10 14:36:30 -0300 | [diff] [blame] | 435 | {EM2874_R80_GPIO_P0_CTRL, 0x10, 0xff, 100}, |
| 436 | {EM2874_R80_GPIO_P0_CTRL, 0x14, 0xff, 100}, /* GPIO_2 = 1 */ |
| 437 | {EM2874_R80_GPIO_P0_CTRL, 0x54, 0xff, 050}, /* GPIO_6 = 1 */ |
| 438 | { -1, -1, -1, -1}, |
Ivan Kalvachev | fa5527c | 2012-03-19 20:09:55 -0300 | [diff] [blame] | 439 | }; |
| 440 | |
Antti Palosaari | c247d7b | 2012-03-19 11:48:19 -0300 | [diff] [blame] | 441 | /* 2013:0251 PCTV QuatroStick nano (520e) |
| 442 | * GPIO_2: decoder reset, 0=active |
| 443 | * GPIO_4: decoder suspend, 0=active |
| 444 | * GPIO_6: demod reset, 0=active |
| 445 | * GPIO_7: LED, 1=active |
| 446 | */ |
| 447 | static struct em28xx_reg_seq pctv_520e[] = { |
Frank Schaefer | b68cafc | 2013-10-10 14:36:30 -0300 | [diff] [blame] | 448 | {EM2874_R80_GPIO_P0_CTRL, 0x10, 0xff, 100}, |
| 449 | {EM2874_R80_GPIO_P0_CTRL, 0x14, 0xff, 100}, /* GPIO_2 = 1 */ |
| 450 | {EM2874_R80_GPIO_P0_CTRL, 0x54, 0xff, 050}, /* GPIO_6 = 1 */ |
| 451 | {EM2874_R80_GPIO_P0_CTRL, 0xd4, 0xff, 000}, /* GPIO_7 = 1 */ |
| 452 | { -1, -1, -1, -1}, |
Antti Palosaari | c247d7b | 2012-03-19 11:48:19 -0300 | [diff] [blame] | 453 | }; |
| 454 | |
Frank Schaefer | 0c37e73 | 2013-12-01 18:06:57 -0300 | [diff] [blame] | 455 | /* 1ae7:9003/9004 SpeedLink Vicious And Devine Laplace webcam |
| 456 | * reg 0x80/0x84: |
| 457 | * GPIO_0: capturing LED, 0=on, 1=off |
| 458 | * GPIO_2: AV mute button, 0=pressed, 1=unpressed |
| 459 | * GPIO 3: illumination button, 0=pressed, 1=unpressed |
| 460 | * GPIO_6: illumination/flash LED, 0=on, 1=off |
| 461 | * reg 0x81/0x85: |
| 462 | * GPIO_7: snapshot button, 0=pressed, 1=unpressed |
| 463 | */ |
| 464 | static struct em28xx_reg_seq speedlink_vad_laplace_reg_seq[] = { |
| 465 | {EM2820_R08_GPIO_CTRL, 0xf7, 0xff, 10}, |
| 466 | {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xb2, 10}, |
| 467 | { -1, -1, -1, -1}, |
| 468 | }; |
| 469 | |
Antti Palosaari | 1922924 | 2014-04-10 22:11:27 -0300 | [diff] [blame] | 470 | static struct em28xx_reg_seq pctv_292e[] = { |
| 471 | {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 0}, |
| 472 | {0x0d, 0xff, 0xff, 950}, |
| 473 | {EM2874_R80_GPIO_P0_CTRL, 0xbd, 0xff, 100}, |
| 474 | {EM2874_R80_GPIO_P0_CTRL, 0xfd, 0xff, 410}, |
| 475 | {EM2874_R80_GPIO_P0_CTRL, 0x7d, 0xff, 300}, |
| 476 | {EM2874_R80_GPIO_P0_CTRL, 0x7c, 0xff, 60}, |
| 477 | {0x0d, 0x42, 0xff, 50}, |
| 478 | {EM2874_R5F_TS_ENABLE, 0x85, 0xff, 0}, |
| 479 | {-1, -1, -1, -1}, |
| 480 | }; |
| 481 | |
Olli Salonen | fc30dd76 | 2014-11-24 03:57:34 -0300 | [diff] [blame] | 482 | static struct em28xx_reg_seq terratec_t2_stick_hd[] = { |
| 483 | {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 0}, |
| 484 | {0x0d, 0xff, 0xff, 600}, |
| 485 | {EM2874_R80_GPIO_P0_CTRL, 0xfc, 0xff, 10}, |
| 486 | {EM2874_R80_GPIO_P0_CTRL, 0xbc, 0xff, 100}, |
| 487 | {EM2874_R80_GPIO_P0_CTRL, 0xfc, 0xff, 100}, |
| 488 | {EM2874_R80_GPIO_P0_CTRL, 0x00, 0xff, 300}, |
| 489 | {EM2874_R80_GPIO_P0_CTRL, 0xf8, 0xff, 100}, |
| 490 | {EM2874_R80_GPIO_P0_CTRL, 0xfc, 0xff, 300}, |
| 491 | {0x0d, 0x42, 0xff, 1000}, |
| 492 | {EM2874_R5F_TS_ENABLE, 0x85, 0xff, 0}, |
| 493 | {-1, -1, -1, -1}, |
| 494 | }; |
| 495 | |
Satoshi Nagahama | ab4d145 | 2016-05-06 16:35:05 -0300 | [diff] [blame] | 496 | static struct em28xx_reg_seq plex_px_bcud[] = { |
| 497 | {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 0}, |
| 498 | {0x0d, 0xff, 0xff, 0}, |
| 499 | {EM2874_R50_IR_CONFIG, 0x01, 0xff, 0}, |
| 500 | {EM28XX_R06_I2C_CLK, 0x40, 0xff, 0}, |
| 501 | {EM2874_R80_GPIO_P0_CTRL, 0xfd, 0xff, 100}, |
| 502 | {EM28XX_R12_VINENABLE, 0x20, 0x20, 0}, |
| 503 | {0x0d, 0x42, 0xff, 1000}, |
| 504 | {EM2874_R80_GPIO_P0_CTRL, 0xfc, 0xff, 10}, |
| 505 | {EM2874_R80_GPIO_P0_CTRL, 0xfd, 0xff, 10}, |
| 506 | {0x73, 0xfd, 0xff, 100}, |
| 507 | {-1, -1, -1, -1}, |
| 508 | }; |
| 509 | |
Mauro Carvalho Chehab | 0ec202d | 2008-11-25 13:16:13 -0300 | [diff] [blame] | 510 | /* |
Olli Salonen | 11a2a94 | 2016-04-04 12:12:52 -0300 | [diff] [blame] | 511 | * 2040:0265 Hauppauge WinTV-dualHD DVB |
Kevin Cheng | 1586342 | 2017-01-10 01:14:29 -0200 | [diff] [blame] | 512 | * 2040:026d Hauppauge WinTV-dualHD ATSC/QAM |
Olli Salonen | 11a2a94 | 2016-04-04 12:12:52 -0300 | [diff] [blame] | 513 | * reg 0x80/0x84: |
| 514 | * GPIO_0: Yellow LED tuner 1, 0=on, 1=off |
| 515 | * GPIO_1: Green LED tuner 1, 0=on, 1=off |
| 516 | * GPIO_2: Yellow LED tuner 2, 0=on, 1=off |
| 517 | * GPIO_3: Green LED tuner 2, 0=on, 1=off |
| 518 | * GPIO_5: Reset #2, 0=active |
| 519 | * GPIO_6: Reset #1, 0=active |
| 520 | */ |
| 521 | static struct em28xx_reg_seq hauppauge_dualhd_dvb[] = { |
| 522 | {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 0}, |
| 523 | {0x0d, 0xff, 0xff, 200}, |
| 524 | {0x50, 0x04, 0xff, 300}, |
| 525 | {EM2874_R80_GPIO_P0_CTRL, 0xbf, 0xff, 100}, /* demod 1 reset */ |
| 526 | {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 100}, |
| 527 | {EM2874_R80_GPIO_P0_CTRL, 0xdf, 0xff, 100}, /* demod 2 reset */ |
| 528 | {EM2874_R80_GPIO_P0_CTRL, 0xff, 0xff, 100}, |
| 529 | {EM2874_R5F_TS_ENABLE, 0x44, 0xff, 50}, |
| 530 | {EM2874_R5D_TS1_PKT_SIZE, 0x05, 0xff, 50}, |
| 531 | {EM2874_R5E_TS2_PKT_SIZE, 0x05, 0xff, 50}, |
| 532 | {-1, -1, -1, -1}, |
| 533 | }; |
| 534 | |
| 535 | /* |
Frank Schaefer | f5222609 | 2013-12-01 18:06:52 -0300 | [diff] [blame] | 536 | * Button definitions |
| 537 | */ |
| 538 | static struct em28xx_button std_snapshot_button[] = { |
| 539 | { |
| 540 | .role = EM28XX_BUTTON_SNAPSHOT, |
| 541 | .reg_r = EM28XX_R0C_USBSUSP, |
| 542 | .reg_clearing = EM28XX_R0C_USBSUSP, |
| 543 | .mask = EM28XX_R0C_USBSUSP_SNAPSHOT, |
| 544 | .inverted = 0, |
| 545 | }, |
| 546 | {-1, 0, 0, 0, 0}, |
| 547 | }; |
| 548 | |
Frank Schaefer | 0c37e73 | 2013-12-01 18:06:57 -0300 | [diff] [blame] | 549 | static struct em28xx_button speedlink_vad_laplace_buttons[] = { |
| 550 | { |
| 551 | .role = EM28XX_BUTTON_SNAPSHOT, |
| 552 | .reg_r = EM2874_R85_GPIO_P1_STATE, |
| 553 | .mask = 0x80, |
| 554 | .inverted = 1, |
| 555 | }, |
| 556 | { |
| 557 | .role = EM28XX_BUTTON_ILLUMINATION, |
| 558 | .reg_r = EM2874_R84_GPIO_P0_STATE, |
| 559 | .mask = 0x08, |
| 560 | .inverted = 1, |
| 561 | }, |
| 562 | {-1, 0, 0, 0, 0}, |
| 563 | }; |
| 564 | |
| 565 | /* |
| 566 | * LED definitions |
| 567 | */ |
| 568 | static struct em28xx_led speedlink_vad_laplace_leds[] = { |
| 569 | { |
| 570 | .role = EM28XX_LED_ANALOG_CAPTURING, |
| 571 | .gpio_reg = EM2874_R80_GPIO_P0_CTRL, |
| 572 | .gpio_mask = 0x01, |
| 573 | .inverted = 1, |
| 574 | }, |
| 575 | { |
| 576 | .role = EM28XX_LED_ILLUMINATION, |
| 577 | .gpio_reg = EM2874_R80_GPIO_P0_CTRL, |
| 578 | .gpio_mask = 0x40, |
| 579 | .inverted = 1, |
| 580 | }, |
| 581 | {-1, 0, 0, 0}, |
| 582 | }; |
| 583 | |
Mauro Carvalho Chehab | 59432be | 2014-03-04 12:34:34 -0300 | [diff] [blame] | 584 | static struct em28xx_led kworld_ub435q_v3_leds[] = { |
| 585 | { |
| 586 | .role = EM28XX_LED_DIGITAL_CAPTURING, |
| 587 | .gpio_reg = EM2874_R80_GPIO_P0_CTRL, |
| 588 | .gpio_mask = 0x80, |
| 589 | .inverted = 1, |
| 590 | }, |
| 591 | {-1, 0, 0, 0}, |
| 592 | }; |
| 593 | |
Mauro Carvalho Chehab | 88e4fcd | 2014-03-04 20:49:07 -0300 | [diff] [blame] | 594 | static struct em28xx_led pctv_80e_leds[] = { |
| 595 | { |
| 596 | .role = EM28XX_LED_DIGITAL_CAPTURING, |
| 597 | .gpio_reg = EM2874_R80_GPIO_P0_CTRL, |
| 598 | .gpio_mask = 0x80, |
| 599 | .inverted = 0, |
| 600 | }, |
| 601 | {-1, 0, 0, 0}, |
| 602 | }; |
| 603 | |
Matthieu Rogez | 565e37d | 2016-02-28 08:26:22 -0300 | [diff] [blame] | 604 | static struct em28xx_led terratec_grabby_leds[] = { |
| 605 | { |
| 606 | .role = EM28XX_LED_ANALOG_CAPTURING, |
| 607 | .gpio_reg = EM2820_R08_GPIO_CTRL, |
| 608 | .gpio_mask = EM_GPIO_3, |
| 609 | .inverted = 1, |
| 610 | }, |
| 611 | {-1, 0, 0, 0}, |
| 612 | }; |
| 613 | |
Olli Salonen | 11a2a94 | 2016-04-04 12:12:52 -0300 | [diff] [blame] | 614 | static struct em28xx_led hauppauge_dualhd_leds[] = { |
| 615 | { |
| 616 | .role = EM28XX_LED_DIGITAL_CAPTURING, |
| 617 | .gpio_reg = EM2874_R80_GPIO_P0_CTRL, |
| 618 | .gpio_mask = EM_GPIO_1, |
| 619 | .inverted = 1, |
| 620 | }, |
| 621 | { |
| 622 | .role = EM28XX_LED_DIGITAL_CAPTURING_TS2, |
| 623 | .gpio_reg = EM2874_R80_GPIO_P0_CTRL, |
| 624 | .gpio_mask = EM_GPIO_3, |
| 625 | .inverted = 1, |
| 626 | }, |
| 627 | {-1, 0, 0, 0}, |
| 628 | }; |
| 629 | |
Frank Schaefer | f5222609 | 2013-12-01 18:06:52 -0300 | [diff] [blame] | 630 | /* |
Mauro Carvalho Chehab | 0ec202d | 2008-11-25 13:16:13 -0300 | [diff] [blame] | 631 | * Board definitions |
| 632 | */ |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 633 | struct em28xx_board em28xx_boards[] = { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 634 | [EM2750_BOARD_UNKNOWN] = { |
Mauro Carvalho Chehab | 8b22079 | 2009-07-12 10:56:21 -0300 | [diff] [blame] | 635 | .name = "EM2710/EM2750/EM2751 webcam grabber", |
Mauro Carvalho Chehab | 3d3215c | 2009-08-10 10:29:27 -0300 | [diff] [blame] | 636 | .xclk = EM28XX_XCLK_FREQUENCY_20MHZ, |
Mauro Carvalho Chehab | 8a2e699 | 2009-07-12 10:26:36 -0300 | [diff] [blame] | 637 | .tuner_type = TUNER_ABSENT, |
| 638 | .is_webcam = 1, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 639 | .input = { { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 640 | .type = EM28XX_VMUX_COMPOSITE, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 641 | .vmux = 0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 642 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | b80fd2d | 2009-07-14 21:08:22 -0300 | [diff] [blame] | 643 | .gpio = silvercrest_reg_seq, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 644 | } }, |
| 645 | }, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 646 | [EM2800_BOARD_UNKNOWN] = { |
| 647 | .name = "Unknown EM2800 video grabber", |
| 648 | .is_em2800 = 1, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 649 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 650 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | 1c67e76 | 2008-11-27 07:46:59 -0300 | [diff] [blame] | 651 | .tuner_type = TUNER_ABSENT, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 652 | .input = { { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 653 | .type = EM28XX_VMUX_COMPOSITE, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 654 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 655 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 656 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 657 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 658 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 659 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 660 | } }, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 661 | }, |
| 662 | [EM2820_BOARD_UNKNOWN] = { |
Mauro Carvalho Chehab | a2070c6 | 2008-11-25 07:05:06 -0300 | [diff] [blame] | 663 | .name = "Unknown EM2750/28xx video grabber", |
| 664 | .tuner_type = TUNER_ABSENT, |
Mauro Carvalho Chehab | b04fb66 | 2009-07-13 01:28:21 -0300 | [diff] [blame] | 665 | .is_webcam = 1, /* To enable sensor probe */ |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 666 | }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 667 | [EM2750_BOARD_DLCW_130] = { |
| 668 | /* Beijing Huaqi Information Digital Technology Co., Ltd */ |
| 669 | .name = "Huaqi DLCW-130", |
| 670 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Mauro Carvalho Chehab | a2070c6 | 2008-11-25 07:05:06 -0300 | [diff] [blame] | 671 | .xclk = EM28XX_XCLK_FREQUENCY_48MHZ, |
Mauro Carvalho Chehab | 8a2e699 | 2009-07-12 10:26:36 -0300 | [diff] [blame] | 672 | .tuner_type = TUNER_ABSENT, |
| 673 | .is_webcam = 1, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 674 | .input = { { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 675 | .type = EM28XX_VMUX_COMPOSITE, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 676 | .vmux = 0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 677 | .amux = EM28XX_AMUX_VIDEO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 678 | } }, |
| 679 | }, |
Markus Rechberger | 4d17d08 | 2006-02-07 06:25:39 -0200 | [diff] [blame] | 680 | [EM2820_BOARD_KWORLD_PVRTV2800RF] = { |
Markus Rechberger | 33ccaa3 | 2006-02-07 06:25:41 -0200 | [diff] [blame] | 681 | .name = "Kworld PVR TV 2800 RF", |
Mauro Carvalho Chehab | ed08631 | 2008-01-24 06:59:20 -0300 | [diff] [blame] | 682 | .tuner_type = TUNER_TEMIC_PAL, |
Markus Rechberger | 4d17d08 | 2006-02-07 06:25:39 -0200 | [diff] [blame] | 683 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 684 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 685 | .input = { { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 686 | .type = EM28XX_VMUX_COMPOSITE, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 687 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 688 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 689 | }, { |
Markus Rechberger | 4d17d08 | 2006-02-07 06:25:39 -0200 | [diff] [blame] | 690 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 691 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 692 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 693 | } }, |
Markus Rechberger | 4d17d08 | 2006-02-07 06:25:39 -0200 | [diff] [blame] | 694 | }, |
Douglas Schilling Landgraf | f7fe3e6 | 2009-01-19 09:31:55 -0300 | [diff] [blame] | 695 | [EM2820_BOARD_GADMEI_TVR200] = { |
| 696 | .name = "Gadmei TVR200", |
| 697 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
| 698 | .tda9887_conf = TDA9887_PRESENT, |
| 699 | .decoder = EM28XX_SAA711X, |
| 700 | .input = { { |
| 701 | .type = EM28XX_VMUX_TELEVISION, |
| 702 | .vmux = SAA7115_COMPOSITE2, |
| 703 | .amux = EM28XX_AMUX_LINE_IN, |
| 704 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 705 | .type = EM28XX_VMUX_COMPOSITE, |
Douglas Schilling Landgraf | f7fe3e6 | 2009-01-19 09:31:55 -0300 | [diff] [blame] | 706 | .vmux = SAA7115_COMPOSITE0, |
| 707 | .amux = EM28XX_AMUX_LINE_IN, |
| 708 | }, { |
| 709 | .type = EM28XX_VMUX_SVIDEO, |
| 710 | .vmux = SAA7115_SVIDEO3, |
| 711 | .amux = EM28XX_AMUX_LINE_IN, |
| 712 | } }, |
| 713 | }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 714 | [EM2820_BOARD_TERRATEC_CINERGY_250] = { |
| 715 | .name = "Terratec Cinergy 250 USB", |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 716 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
Mauro Carvalho Chehab | ac07bb7 | 2009-09-08 14:04:41 -0300 | [diff] [blame] | 717 | .has_ir_i2c = 1, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 718 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 719 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 720 | .input = { { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 721 | .type = EM28XX_VMUX_TELEVISION, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 722 | .vmux = SAA7115_COMPOSITE2, |
Frank Schaefer | 5e8d02b | 2013-01-05 08:44:09 -0300 | [diff] [blame] | 723 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 724 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 725 | .type = EM28XX_VMUX_COMPOSITE, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 726 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 727 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 728 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 729 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 730 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 731 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 732 | } }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 733 | }, |
| 734 | [EM2820_BOARD_PINNACLE_USB_2] = { |
| 735 | .name = "Pinnacle PCTV USB 2", |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 736 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
Mauro Carvalho Chehab | ac07bb7 | 2009-09-08 14:04:41 -0300 | [diff] [blame] | 737 | .has_ir_i2c = 1, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 738 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 739 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 740 | .input = { { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 741 | .type = EM28XX_VMUX_TELEVISION, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 742 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 743 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 744 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 745 | .type = EM28XX_VMUX_COMPOSITE, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 746 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 747 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 748 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 749 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 750 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 751 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 752 | } }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 753 | }, |
| 754 | [EM2820_BOARD_HAUPPAUGE_WINTV_USB_2] = { |
| 755 | .name = "Hauppauge WinTV USB 2", |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 756 | .tuner_type = TUNER_PHILIPS_FM1236_MK3, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 757 | .tda9887_conf = TDA9887_PRESENT | |
Nicola Soranzo | a1a6ee7 | 2009-02-10 23:28:24 -0300 | [diff] [blame] | 758 | TDA9887_PORT1_ACTIVE | |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 759 | TDA9887_PORT2_ACTIVE, |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 760 | .decoder = EM28XX_TVP5150, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 761 | .has_msp34xx = 1, |
Mauro Carvalho Chehab | ac07bb7 | 2009-09-08 14:04:41 -0300 | [diff] [blame] | 762 | .has_ir_i2c = 1, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 763 | .input = { { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 764 | .type = EM28XX_VMUX_TELEVISION, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 765 | .vmux = TVP5150_COMPOSITE0, |
Hans Verkuil | 2474ed4 | 2006-03-19 12:35:57 -0300 | [diff] [blame] | 766 | .amux = MSP_INPUT_DEFAULT, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 767 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 768 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 769 | .vmux = TVP5150_SVIDEO, |
Hans Verkuil | 0715172 | 2006-04-01 18:03:23 -0300 | [diff] [blame] | 770 | .amux = MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1, |
| 771 | MSP_DSP_IN_SCART, MSP_DSP_IN_SCART), |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 772 | } }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 773 | }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 774 | [EM2820_BOARD_DLINK_USB_TV] = { |
| 775 | .name = "D-Link DUB-T210 TV Tuner", |
| 776 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 777 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
| 778 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 779 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 780 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 781 | .type = EM28XX_VMUX_TELEVISION, |
| 782 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 783 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 784 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 785 | .type = EM28XX_VMUX_COMPOSITE, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 786 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 787 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 788 | }, { |
| 789 | .type = EM28XX_VMUX_SVIDEO, |
| 790 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 791 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 792 | } }, |
| 793 | }, |
| 794 | [EM2820_BOARD_HERCULES_SMART_TV_USB2] = { |
| 795 | .name = "Hercules Smart TV USB 2.0", |
| 796 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 797 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
| 798 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 799 | .decoder = EM28XX_SAA711X, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 800 | .input = { { |
| 801 | .type = EM28XX_VMUX_TELEVISION, |
| 802 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 803 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 804 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 805 | .type = EM28XX_VMUX_COMPOSITE, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 806 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 807 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 808 | }, { |
| 809 | .type = EM28XX_VMUX_SVIDEO, |
| 810 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 811 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 812 | } }, |
| 813 | }, |
| 814 | [EM2820_BOARD_PINNACLE_USB_2_FM1216ME] = { |
| 815 | .name = "Pinnacle PCTV USB 2 (Philips FM1216ME)", |
| 816 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 817 | .tuner_type = TUNER_PHILIPS_FM1216ME_MK3, |
| 818 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 819 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 820 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 821 | .type = EM28XX_VMUX_TELEVISION, |
| 822 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 823 | .amux = EM28XX_AMUX_VIDEO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 824 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 825 | .type = EM28XX_VMUX_COMPOSITE, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 826 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 827 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 828 | }, { |
| 829 | .type = EM28XX_VMUX_SVIDEO, |
| 830 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 831 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 832 | } }, |
| 833 | }, |
| 834 | [EM2820_BOARD_GADMEI_UTV310] = { |
| 835 | .name = "Gadmei UTV310", |
| 836 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 837 | .tuner_type = TUNER_TNF_5335MF, |
| 838 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 839 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 840 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 841 | .type = EM28XX_VMUX_TELEVISION, |
| 842 | .vmux = SAA7115_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 843 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 844 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 845 | .type = EM28XX_VMUX_COMPOSITE, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 846 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 847 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 848 | }, { |
| 849 | .type = EM28XX_VMUX_SVIDEO, |
| 850 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 851 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 852 | } }, |
| 853 | }, |
| 854 | [EM2820_BOARD_LEADTEK_WINFAST_USBII_DELUXE] = { |
| 855 | .name = "Leadtek Winfast USB II Deluxe", |
| 856 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 857 | .tuner_type = TUNER_PHILIPS_FM1216ME_MK3, |
Magnus Alm | ca39d84 | 2009-11-13 05:48:24 -0300 | [diff] [blame] | 858 | .has_ir_i2c = 1, |
| 859 | .tvaudio_addr = 0x58, |
| 860 | .tda9887_conf = TDA9887_PRESENT | |
| 861 | TDA9887_PORT2_ACTIVE | |
| 862 | TDA9887_QSS, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 863 | .decoder = EM28XX_SAA711X, |
Magnus Alm | ca39d84 | 2009-11-13 05:48:24 -0300 | [diff] [blame] | 864 | .adecoder = EM28XX_TVAUDIO, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 865 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 866 | .type = EM28XX_VMUX_TELEVISION, |
Magnus Alm | ca39d84 | 2009-11-13 05:48:24 -0300 | [diff] [blame] | 867 | .vmux = SAA7115_COMPOSITE4, |
| 868 | .amux = EM28XX_AMUX_AUX, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 869 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 870 | .type = EM28XX_VMUX_COMPOSITE, |
Magnus Alm | ca39d84 | 2009-11-13 05:48:24 -0300 | [diff] [blame] | 871 | .vmux = SAA7115_COMPOSITE5, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 872 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 873 | }, { |
| 874 | .type = EM28XX_VMUX_SVIDEO, |
Magnus Alm | ca39d84 | 2009-11-13 05:48:24 -0300 | [diff] [blame] | 875 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 876 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 877 | } }, |
Magnus Alm | ca39d84 | 2009-11-13 05:48:24 -0300 | [diff] [blame] | 878 | .radio = { |
| 879 | .type = EM28XX_RADIO, |
| 880 | .amux = EM28XX_AMUX_AUX, |
| 881 | } |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 882 | }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 883 | [EM2820_BOARD_VIDEOLOGY_20K14XUSB] = { |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 884 | .name = "Videology 20K14XUSB USB2.0", |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 885 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Mauro Carvalho Chehab | 8a2e699 | 2009-07-12 10:26:36 -0300 | [diff] [blame] | 886 | .tuner_type = TUNER_ABSENT, |
| 887 | .is_webcam = 1, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 888 | .input = { { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 889 | .type = EM28XX_VMUX_COMPOSITE, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 890 | .vmux = 0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 891 | .amux = EM28XX_AMUX_VIDEO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 892 | } }, |
| 893 | }, |
Mauro Carvalho Chehab | 02e7804 | 2009-06-29 11:35:05 -0300 | [diff] [blame] | 894 | [EM2820_BOARD_SILVERCREST_WEBCAM] = { |
| 895 | .name = "Silvercrest Webcam 1.3mpix", |
| 896 | .tuner_type = TUNER_ABSENT, |
Mauro Carvalho Chehab | c43221d | 2009-07-12 10:23:23 -0300 | [diff] [blame] | 897 | .is_webcam = 1, |
Mauro Carvalho Chehab | 02e7804 | 2009-06-29 11:35:05 -0300 | [diff] [blame] | 898 | .input = { { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 899 | .type = EM28XX_VMUX_COMPOSITE, |
Mauro Carvalho Chehab | 02e7804 | 2009-06-29 11:35:05 -0300 | [diff] [blame] | 900 | .vmux = 0, |
| 901 | .amux = EM28XX_AMUX_VIDEO, |
| 902 | .gpio = silvercrest_reg_seq, |
| 903 | } }, |
| 904 | }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 905 | [EM2821_BOARD_SUPERCOMP_USB_2] = { |
| 906 | .name = "Supercomp USB 2.0 TV", |
| 907 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 908 | .tuner_type = TUNER_PHILIPS_FM1236_MK3, |
| 909 | .tda9887_conf = TDA9887_PRESENT | |
| 910 | TDA9887_PORT1_ACTIVE | |
| 911 | TDA9887_PORT2_ACTIVE, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 912 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 913 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 914 | .type = EM28XX_VMUX_TELEVISION, |
| 915 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 916 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 917 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 918 | .type = EM28XX_VMUX_COMPOSITE, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 919 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 920 | .amux = EM28XX_AMUX_VIDEO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 921 | }, { |
| 922 | .type = EM28XX_VMUX_SVIDEO, |
| 923 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 924 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 925 | } }, |
| 926 | }, |
| 927 | [EM2821_BOARD_USBGEAR_VD204] = { |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 928 | .name = "Usbgear VD204v9", |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 929 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Mauro Carvalho Chehab | 1c67e76 | 2008-11-27 07:46:59 -0300 | [diff] [blame] | 930 | .tuner_type = TUNER_ABSENT, /* Capture only device */ |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 931 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 932 | .input = { { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 933 | .type = EM28XX_VMUX_COMPOSITE, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 934 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 935 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 936 | }, { |
| 937 | .type = EM28XX_VMUX_SVIDEO, |
| 938 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 939 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 940 | } }, |
| 941 | }, |
| 942 | [EM2860_BOARD_NETGMBH_CAM] = { |
| 943 | /* Beijing Huaqi Information Digital Technology Co., Ltd */ |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 944 | .name = "NetGMBH Cam", |
| 945 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Mauro Carvalho Chehab | 8a2e699 | 2009-07-12 10:26:36 -0300 | [diff] [blame] | 946 | .tuner_type = TUNER_ABSENT, |
| 947 | .is_webcam = 1, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 948 | .input = { { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 949 | .type = EM28XX_VMUX_COMPOSITE, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 950 | .vmux = 0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 951 | .amux = EM28XX_AMUX_VIDEO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 952 | } }, |
| 953 | }, |
| 954 | [EM2860_BOARD_TYPHOON_DVD_MAKER] = { |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 955 | .name = "Typhoon DVD Maker", |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 956 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | 1c67e76 | 2008-11-27 07:46:59 -0300 | [diff] [blame] | 957 | .tuner_type = TUNER_ABSENT, /* Capture only device */ |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 958 | .input = { { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 959 | .type = EM28XX_VMUX_COMPOSITE, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 960 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 961 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 962 | }, { |
| 963 | .type = EM28XX_VMUX_SVIDEO, |
| 964 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 965 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 966 | } }, |
| 967 | }, |
| 968 | [EM2860_BOARD_GADMEI_UTV330] = { |
| 969 | .name = "Gadmei UTV330", |
| 970 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 971 | .tuner_type = TUNER_TNF_5335MF, |
| 972 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 973 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 974 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 975 | .type = EM28XX_VMUX_TELEVISION, |
| 976 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 977 | .amux = EM28XX_AMUX_VIDEO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 978 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 979 | .type = EM28XX_VMUX_COMPOSITE, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 980 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 981 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 982 | }, { |
| 983 | .type = EM28XX_VMUX_SVIDEO, |
| 984 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 985 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 986 | } }, |
| 987 | }, |
Mauro Carvalho Chehab | 6d888a6 | 2009-08-30 13:05:56 -0300 | [diff] [blame] | 988 | [EM2861_BOARD_GADMEI_UTV330PLUS] = { |
| 989 | .name = "Gadmei UTV330+", |
| 990 | .tuner_type = TUNER_TNF_5335MF, |
| 991 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | 02858ee | 2010-04-02 20:01:00 -0300 | [diff] [blame] | 992 | .ir_codes = RC_MAP_GADMEI_RM008Z, |
Mauro Carvalho Chehab | 6d888a6 | 2009-08-30 13:05:56 -0300 | [diff] [blame] | 993 | .decoder = EM28XX_SAA711X, |
| 994 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, |
| 995 | .input = { { |
| 996 | .type = EM28XX_VMUX_TELEVISION, |
| 997 | .vmux = SAA7115_COMPOSITE2, |
| 998 | .amux = EM28XX_AMUX_VIDEO, |
| 999 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1000 | .type = EM28XX_VMUX_COMPOSITE, |
Mauro Carvalho Chehab | 6d888a6 | 2009-08-30 13:05:56 -0300 | [diff] [blame] | 1001 | .vmux = SAA7115_COMPOSITE0, |
| 1002 | .amux = EM28XX_AMUX_LINE_IN, |
| 1003 | }, { |
| 1004 | .type = EM28XX_VMUX_SVIDEO, |
| 1005 | .vmux = SAA7115_SVIDEO3, |
| 1006 | .amux = EM28XX_AMUX_LINE_IN, |
| 1007 | } }, |
| 1008 | }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1009 | [EM2860_BOARD_TERRATEC_HYBRID_XS] = { |
| 1010 | .name = "Terratec Cinergy A Hybrid XS", |
| 1011 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1012 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1013 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1014 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1015 | |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1016 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1017 | .type = EM28XX_VMUX_TELEVISION, |
| 1018 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1019 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1020 | .gpio = hauppauge_wintv_hvr_900_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1021 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1022 | .type = EM28XX_VMUX_COMPOSITE, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1023 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1024 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1025 | .gpio = hauppauge_wintv_hvr_900_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1026 | }, { |
| 1027 | .type = EM28XX_VMUX_SVIDEO, |
| 1028 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1029 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1030 | .gpio = hauppauge_wintv_hvr_900_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1031 | } }, |
| 1032 | }, |
| 1033 | [EM2861_BOARD_KWORLD_PVRTV_300U] = { |
| 1034 | .name = "KWorld PVRTV 300U", |
| 1035 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1036 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1037 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1038 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1039 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1040 | .type = EM28XX_VMUX_TELEVISION, |
| 1041 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1042 | .amux = EM28XX_AMUX_VIDEO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1043 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1044 | .type = EM28XX_VMUX_COMPOSITE, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1045 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1046 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1047 | }, { |
| 1048 | .type = EM28XX_VMUX_SVIDEO, |
| 1049 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1050 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1051 | } }, |
| 1052 | }, |
| 1053 | [EM2861_BOARD_YAKUMO_MOVIE_MIXER] = { |
| 1054 | .name = "Yakumo MovieMixer", |
Nicola Soranzo | a1a6ee7 | 2009-02-10 23:28:24 -0300 | [diff] [blame] | 1055 | .tuner_type = TUNER_ABSENT, /* Capture only device */ |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1056 | .decoder = EM28XX_TVP5150, |
| 1057 | .input = { { |
| 1058 | .type = EM28XX_VMUX_TELEVISION, |
| 1059 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1060 | .amux = EM28XX_AMUX_VIDEO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1061 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1062 | .type = EM28XX_VMUX_COMPOSITE, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1063 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1064 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1065 | }, { |
| 1066 | .type = EM28XX_VMUX_SVIDEO, |
| 1067 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1068 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1069 | } }, |
| 1070 | }, |
Devin Heitmueller | 443fed9 | 2010-03-19 23:53:12 -0300 | [diff] [blame] | 1071 | [EM2860_BOARD_TVP5150_REFERENCE_DESIGN] = { |
| 1072 | .name = "EM2860/TVP5150 Reference Design", |
| 1073 | .tuner_type = TUNER_ABSENT, /* Capture only device */ |
| 1074 | .decoder = EM28XX_TVP5150, |
| 1075 | .input = { { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1076 | .type = EM28XX_VMUX_COMPOSITE, |
Devin Heitmueller | 443fed9 | 2010-03-19 23:53:12 -0300 | [diff] [blame] | 1077 | .vmux = TVP5150_COMPOSITE1, |
| 1078 | .amux = EM28XX_AMUX_LINE_IN, |
| 1079 | }, { |
| 1080 | .type = EM28XX_VMUX_SVIDEO, |
| 1081 | .vmux = TVP5150_SVIDEO, |
| 1082 | .amux = EM28XX_AMUX_LINE_IN, |
| 1083 | } }, |
| 1084 | }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1085 | [EM2861_BOARD_PLEXTOR_PX_TV100U] = { |
| 1086 | .name = "Plextor ConvertX PX-TV100U", |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1087 | .tuner_type = TUNER_TNF_5335MF, |
Mauro Carvalho Chehab | 0a6e44d | 2009-07-29 01:39:12 -0300 | [diff] [blame] | 1088 | .xclk = EM28XX_XCLK_I2S_MSB_TIMING | |
| 1089 | EM28XX_XCLK_FREQUENCY_12MHZ, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1090 | .tda9887_conf = TDA9887_PRESENT, |
| 1091 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | 0a6e44d | 2009-07-29 01:39:12 -0300 | [diff] [blame] | 1092 | .has_msp34xx = 1, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1093 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1094 | .type = EM28XX_VMUX_TELEVISION, |
| 1095 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1096 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 0a6e44d | 2009-07-29 01:39:12 -0300 | [diff] [blame] | 1097 | .gpio = pinnacle_hybrid_pro_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1098 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1099 | .type = EM28XX_VMUX_COMPOSITE, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1100 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1101 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 0a6e44d | 2009-07-29 01:39:12 -0300 | [diff] [blame] | 1102 | .gpio = pinnacle_hybrid_pro_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1103 | }, { |
| 1104 | .type = EM28XX_VMUX_SVIDEO, |
| 1105 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1106 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 0a6e44d | 2009-07-29 01:39:12 -0300 | [diff] [blame] | 1107 | .gpio = pinnacle_hybrid_pro_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1108 | } }, |
| 1109 | }, |
Mauro Carvalho Chehab | 1c67e76 | 2008-11-27 07:46:59 -0300 | [diff] [blame] | 1110 | |
| 1111 | /* Those boards with em2870 are DVB Only*/ |
| 1112 | |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1113 | [EM2870_BOARD_TERRATEC_XS] = { |
| 1114 | .name = "Terratec Cinergy T XS", |
| 1115 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
| 1116 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1117 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1118 | }, |
| 1119 | [EM2870_BOARD_TERRATEC_XS_MT2060] = { |
| 1120 | .name = "Terratec Cinergy T XS (MT2060)", |
Alberto Mardegan | 8c47311 | 2015-10-27 17:24:14 -0200 | [diff] [blame] | 1121 | .xclk = EM28XX_XCLK_IR_RC5_MODE | |
| 1122 | EM28XX_XCLK_FREQUENCY_12MHZ, |
| 1123 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1124 | .tuner_type = TUNER_ABSENT, /* MT2060 */ |
Alberto Mardegan | 8c47311 | 2015-10-27 17:24:14 -0200 | [diff] [blame] | 1125 | .has_dvb = 1, |
| 1126 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1127 | }, |
| 1128 | [EM2870_BOARD_KWORLD_350U] = { |
| 1129 | .name = "Kworld 350 U DVB-T", |
| 1130 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
| 1131 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1132 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1133 | }, |
| 1134 | [EM2870_BOARD_KWORLD_355U] = { |
| 1135 | .name = "Kworld 355 U DVB-T", |
| 1136 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Aivar Päkk | 1985f6f | 2011-12-11 18:15:00 -0300 | [diff] [blame] | 1137 | .tuner_type = TUNER_ABSENT, |
| 1138 | .tuner_gpio = default_tuner_gpio, |
| 1139 | .has_dvb = 1, |
| 1140 | .dvb_gpio = default_digital, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1141 | }, |
| 1142 | [EM2870_BOARD_PINNACLE_PCTV_DVB] = { |
| 1143 | .name = "Pinnacle PCTV DVB-T", |
| 1144 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
| 1145 | .tuner_type = TUNER_ABSENT, /* MT2060 */ |
Mauro Carvalho Chehab | a2070c6 | 2008-11-25 07:05:06 -0300 | [diff] [blame] | 1146 | /* djh - I have serious doubts this is right... */ |
| 1147 | .xclk = EM28XX_XCLK_IR_RC5_MODE | |
| 1148 | EM28XX_XCLK_FREQUENCY_10MHZ, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1149 | }, |
| 1150 | [EM2870_BOARD_COMPRO_VIDEOMATE] = { |
| 1151 | .name = "Compro, VideoMate U3", |
| 1152 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
| 1153 | .tuner_type = TUNER_ABSENT, /* MT2060 */ |
| 1154 | }, |
Mauro Carvalho Chehab | 1c67e76 | 2008-11-27 07:46:59 -0300 | [diff] [blame] | 1155 | |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1156 | [EM2880_BOARD_TERRATEC_HYBRID_XS_FR] = { |
| 1157 | .name = "Terratec Hybrid XS Secam", |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1158 | .has_msp34xx = 1, |
| 1159 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1160 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1161 | .decoder = EM28XX_TVP5150, |
Catimimi | 6563801 | 2010-02-18 18:06:32 -0300 | [diff] [blame] | 1162 | .has_dvb = 1, |
Michel Garnier | cec4e6c | 2010-10-16 14:42:01 -0300 | [diff] [blame] | 1163 | .dvb_gpio = terratec_cinergy_USB_XS_FR_digital, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1164 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1165 | .type = EM28XX_VMUX_TELEVISION, |
| 1166 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1167 | .amux = EM28XX_AMUX_VIDEO, |
Michel Garnier | cec4e6c | 2010-10-16 14:42:01 -0300 | [diff] [blame] | 1168 | .gpio = terratec_cinergy_USB_XS_FR_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1169 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1170 | .type = EM28XX_VMUX_COMPOSITE, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1171 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1172 | .amux = EM28XX_AMUX_LINE_IN, |
Michel Garnier | cec4e6c | 2010-10-16 14:42:01 -0300 | [diff] [blame] | 1173 | .gpio = terratec_cinergy_USB_XS_FR_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1174 | }, { |
| 1175 | .type = EM28XX_VMUX_SVIDEO, |
| 1176 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1177 | .amux = EM28XX_AMUX_LINE_IN, |
Michel Garnier | cec4e6c | 2010-10-16 14:42:01 -0300 | [diff] [blame] | 1178 | .gpio = terratec_cinergy_USB_XS_FR_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1179 | } }, |
| 1180 | }, |
Mauro Carvalho Chehab | fec528b | 2011-07-03 21:05:06 -0300 | [diff] [blame] | 1181 | [EM2884_BOARD_TERRATEC_H5] = { |
| 1182 | .name = "Terratec Cinergy H5", |
| 1183 | .has_dvb = 1, |
| 1184 | #if 0 |
| 1185 | .tuner_type = TUNER_PHILIPS_TDA8290, |
| 1186 | .tuner_addr = 0x41, |
| 1187 | .dvb_gpio = terratec_h5_digital, /* FIXME: probably wrong */ |
| 1188 | .tuner_gpio = terratec_h5_gpio, |
Mauro Carvalho Chehab | de72405 | 2011-11-20 11:23:24 -0200 | [diff] [blame] | 1189 | #else |
| 1190 | .tuner_type = TUNER_ABSENT, |
Mauro Carvalho Chehab | fec528b | 2011-07-03 21:05:06 -0300 | [diff] [blame] | 1191 | #endif |
Mauro Carvalho Chehab | 3aa2b3b | 2013-03-05 06:55:27 -0300 | [diff] [blame] | 1192 | .def_i2c_bus = 1, |
| 1193 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | |
Mauro Carvalho Chehab | fec528b | 2011-07-03 21:05:06 -0300 | [diff] [blame] | 1194 | EM28XX_I2C_FREQ_400_KHZ, |
| 1195 | }, |
Eddi De Pieri | 82e7dbb | 2011-11-19 11:37:14 -0300 | [diff] [blame] | 1196 | [EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C] = { |
| 1197 | .name = "Hauppauge WinTV HVR 930C", |
| 1198 | .has_dvb = 1, |
Mauro Carvalho Chehab | de72405 | 2011-11-20 11:23:24 -0200 | [diff] [blame] | 1199 | #if 0 /* FIXME: Add analog support */ |
| 1200 | .tuner_type = TUNER_XC5000, |
| 1201 | .tuner_addr = 0x41, |
| 1202 | .dvb_gpio = hauppauge_930c_digital, |
Eddi De Pieri | 82e7dbb | 2011-11-19 11:37:14 -0300 | [diff] [blame] | 1203 | .tuner_gpio = hauppauge_930c_gpio, |
Mauro Carvalho Chehab | de72405 | 2011-11-20 11:23:24 -0200 | [diff] [blame] | 1204 | #else |
| 1205 | .tuner_type = TUNER_ABSENT, |
| 1206 | #endif |
Mauro Carvalho Chehab | dfbbf5d | 2011-11-20 12:16:25 -0200 | [diff] [blame] | 1207 | .ir_codes = RC_MAP_HAUPPAUGE, |
Mauro Carvalho Chehab | 3aa2b3b | 2013-03-05 06:55:27 -0300 | [diff] [blame] | 1208 | .def_i2c_bus = 1, |
| 1209 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | |
Eddi De Pieri | 82e7dbb | 2011-11-19 11:37:14 -0300 | [diff] [blame] | 1210 | EM28XX_I2C_FREQ_400_KHZ, |
| 1211 | }, |
Mauro Carvalho Chehab | 4159d01 | 2013-02-28 10:35:56 -0300 | [diff] [blame] | 1212 | [EM2884_BOARD_C3TECH_DIGITAL_DUO] = { |
| 1213 | .name = "C3 Tech Digital Duo HDTV/SDTV USB", |
| 1214 | .has_dvb = 1, |
| 1215 | /* FIXME: Add analog support - need a saa7136 driver */ |
| 1216 | .tuner_type = TUNER_ABSENT, /* Digital-only TDA18271HD */ |
| 1217 | .ir_codes = RC_MAP_EMPTY, |
| 1218 | .def_i2c_bus = 1, |
| 1219 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE, |
| 1220 | .dvb_gpio = c3tech_digital_duo_digital, |
| 1221 | }, |
Andreas Oberritter | a1ed02e | 2011-11-16 11:06:50 -0300 | [diff] [blame] | 1222 | [EM2884_BOARD_CINERGY_HTC_STICK] = { |
| 1223 | .name = "Terratec Cinergy HTC Stick", |
| 1224 | .has_dvb = 1, |
Martin Blumenstingl | c8dce00 | 2012-06-12 18:19:28 -0300 | [diff] [blame] | 1225 | .ir_codes = RC_MAP_NEC_TERRATEC_CINERGY_XS, |
| 1226 | .tuner_type = TUNER_ABSENT, |
Mauro Carvalho Chehab | 3aa2b3b | 2013-03-05 06:55:27 -0300 | [diff] [blame] | 1227 | .def_i2c_bus = 1, |
| 1228 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 1229 | EM28XX_I2C_FREQ_400_KHZ, |
| 1230 | }, |
Gilles Risch | 1fe0fbd | 2015-03-01 17:11:05 -0300 | [diff] [blame] | 1231 | [EM2884_BOARD_ELGATO_EYETV_HYBRID_2008] = { |
| 1232 | .name = "Elgato EyeTV Hybrid 2008 INT", |
| 1233 | .has_dvb = 1, |
| 1234 | .ir_codes = RC_MAP_NEC_TERRATEC_CINERGY_XS, |
| 1235 | .tuner_type = TUNER_ABSENT, |
| 1236 | .def_i2c_bus = 1, |
| 1237 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | |
| 1238 | EM28XX_I2C_FREQ_400_KHZ, |
| 1239 | }, |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 1240 | [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900] = { |
Aidan Thornton | 122d158 | 2007-11-20 15:25:08 -0300 | [diff] [blame] | 1241 | .name = "Hauppauge WinTV HVR 900", |
Aidan Thornton | 122d158 | 2007-11-20 15:25:08 -0300 | [diff] [blame] | 1242 | .tda9887_conf = TDA9887_PRESENT, |
| 1243 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1244 | .tuner_gpio = default_tuner_gpio, |
Mauro Carvalho Chehab | 5add9a6 | 2007-11-22 12:08:53 -0300 | [diff] [blame] | 1245 | .mts_firmware = 1, |
Mauro Carvalho Chehab | a2070c6 | 2008-11-25 07:05:06 -0300 | [diff] [blame] | 1246 | .has_dvb = 1, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1247 | .dvb_gpio = hauppauge_wintv_hvr_900_digital, |
Mauro Carvalho Chehab | af86ce7 | 2011-01-24 12:18:48 -0300 | [diff] [blame] | 1248 | .ir_codes = RC_MAP_HAUPPAUGE, |
Aidan Thornton | 122d158 | 2007-11-20 15:25:08 -0300 | [diff] [blame] | 1249 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1250 | .input = { { |
Aidan Thornton | 122d158 | 2007-11-20 15:25:08 -0300 | [diff] [blame] | 1251 | .type = EM28XX_VMUX_TELEVISION, |
| 1252 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1253 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1254 | .gpio = hauppauge_wintv_hvr_900_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1255 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1256 | .type = EM28XX_VMUX_COMPOSITE, |
Aidan Thornton | 122d158 | 2007-11-20 15:25:08 -0300 | [diff] [blame] | 1257 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1258 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1259 | .gpio = hauppauge_wintv_hvr_900_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1260 | }, { |
Aidan Thornton | 122d158 | 2007-11-20 15:25:08 -0300 | [diff] [blame] | 1261 | .type = EM28XX_VMUX_SVIDEO, |
| 1262 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1263 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1264 | .gpio = hauppauge_wintv_hvr_900_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1265 | } }, |
Aidan Thornton | 122d158 | 2007-11-20 15:25:08 -0300 | [diff] [blame] | 1266 | }, |
Devin Heitmueller | 17d9d55 | 2008-06-08 10:22:03 -0300 | [diff] [blame] | 1267 | [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2] = { |
| 1268 | .name = "Hauppauge WinTV HVR 900 (R2)", |
Devin Heitmueller | 17d9d55 | 2008-06-08 10:22:03 -0300 | [diff] [blame] | 1269 | .tda9887_conf = TDA9887_PRESENT, |
| 1270 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1271 | .tuner_gpio = default_tuner_gpio, |
Devin Heitmueller | 17d9d55 | 2008-06-08 10:22:03 -0300 | [diff] [blame] | 1272 | .mts_firmware = 1, |
Devin Heitmueller | 75e2b86 | 2011-03-13 02:01:02 -0300 | [diff] [blame] | 1273 | .has_dvb = 1, |
Devin Heitmueller | 7030f52 | 2011-03-13 02:04:53 -0300 | [diff] [blame] | 1274 | .dvb_gpio = hauppauge_wintv_hvr_900R2_digital, |
Mauro Carvalho Chehab | af86ce7 | 2011-01-24 12:18:48 -0300 | [diff] [blame] | 1275 | .ir_codes = RC_MAP_HAUPPAUGE, |
Devin Heitmueller | 17d9d55 | 2008-06-08 10:22:03 -0300 | [diff] [blame] | 1276 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1277 | .input = { { |
Devin Heitmueller | 17d9d55 | 2008-06-08 10:22:03 -0300 | [diff] [blame] | 1278 | .type = EM28XX_VMUX_TELEVISION, |
| 1279 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1280 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1281 | .gpio = hauppauge_wintv_hvr_900_analog, |
Devin Heitmueller | 17d9d55 | 2008-06-08 10:22:03 -0300 | [diff] [blame] | 1282 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1283 | .type = EM28XX_VMUX_COMPOSITE, |
Devin Heitmueller | 17d9d55 | 2008-06-08 10:22:03 -0300 | [diff] [blame] | 1284 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | a5942b5 | 2008-11-27 07:44:00 -0300 | [diff] [blame] | 1285 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1286 | .gpio = hauppauge_wintv_hvr_900_analog, |
Devin Heitmueller | 17d9d55 | 2008-06-08 10:22:03 -0300 | [diff] [blame] | 1287 | }, { |
| 1288 | .type = EM28XX_VMUX_SVIDEO, |
| 1289 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1290 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1291 | .gpio = hauppauge_wintv_hvr_900_analog, |
Devin Heitmueller | 17d9d55 | 2008-06-08 10:22:03 -0300 | [diff] [blame] | 1292 | } }, |
| 1293 | }, |
Douglas Schilling Landgraf | f89bc32 | 2008-12-01 21:01:04 -0300 | [diff] [blame] | 1294 | [EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850] = { |
| 1295 | .name = "Hauppauge WinTV HVR 850", |
| 1296 | .tuner_type = TUNER_XC2028, |
| 1297 | .tuner_gpio = default_tuner_gpio, |
| 1298 | .mts_firmware = 1, |
| 1299 | .has_dvb = 1, |
| 1300 | .dvb_gpio = hauppauge_wintv_hvr_900_digital, |
Mauro Carvalho Chehab | af86ce7 | 2011-01-24 12:18:48 -0300 | [diff] [blame] | 1301 | .ir_codes = RC_MAP_HAUPPAUGE, |
Douglas Schilling Landgraf | f89bc32 | 2008-12-01 21:01:04 -0300 | [diff] [blame] | 1302 | .decoder = EM28XX_TVP5150, |
| 1303 | .input = { { |
| 1304 | .type = EM28XX_VMUX_TELEVISION, |
| 1305 | .vmux = TVP5150_COMPOSITE0, |
| 1306 | .amux = EM28XX_AMUX_VIDEO, |
| 1307 | .gpio = hauppauge_wintv_hvr_900_analog, |
| 1308 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1309 | .type = EM28XX_VMUX_COMPOSITE, |
Douglas Schilling Landgraf | f89bc32 | 2008-12-01 21:01:04 -0300 | [diff] [blame] | 1310 | .vmux = TVP5150_COMPOSITE1, |
| 1311 | .amux = EM28XX_AMUX_LINE_IN, |
| 1312 | .gpio = hauppauge_wintv_hvr_900_analog, |
| 1313 | }, { |
| 1314 | .type = EM28XX_VMUX_SVIDEO, |
| 1315 | .vmux = TVP5150_SVIDEO, |
| 1316 | .amux = EM28XX_AMUX_LINE_IN, |
| 1317 | .gpio = hauppauge_wintv_hvr_900_analog, |
| 1318 | } }, |
| 1319 | }, |
Mauro Carvalho Chehab | 10ac660 | 2008-07-27 14:58:58 -0300 | [diff] [blame] | 1320 | [EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950] = { |
Mauro Carvalho Chehab | 3abee53 | 2008-01-05 17:01:41 -0300 | [diff] [blame] | 1321 | .name = "Hauppauge WinTV HVR 950", |
Mauro Carvalho Chehab | 3abee53 | 2008-01-05 17:01:41 -0300 | [diff] [blame] | 1322 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1323 | .tuner_gpio = default_tuner_gpio, |
Mauro Carvalho Chehab | 3abee53 | 2008-01-05 17:01:41 -0300 | [diff] [blame] | 1324 | .mts_firmware = 1, |
Mauro Carvalho Chehab | 227ad4a | 2008-04-17 21:37:40 -0300 | [diff] [blame] | 1325 | .has_dvb = 1, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1326 | .dvb_gpio = hauppauge_wintv_hvr_900_digital, |
Mauro Carvalho Chehab | 15195d3 | 2011-01-24 12:18:47 -0300 | [diff] [blame] | 1327 | .ir_codes = RC_MAP_HAUPPAUGE, |
Mauro Carvalho Chehab | 3abee53 | 2008-01-05 17:01:41 -0300 | [diff] [blame] | 1328 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1329 | .input = { { |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 1330 | .type = EM28XX_VMUX_TELEVISION, |
| 1331 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1332 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1333 | .gpio = hauppauge_wintv_hvr_900_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1334 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1335 | .type = EM28XX_VMUX_COMPOSITE, |
Mauro Carvalho Chehab | 7d070e2 | 2007-11-01 21:52:58 -0300 | [diff] [blame] | 1336 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1337 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1338 | .gpio = hauppauge_wintv_hvr_900_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1339 | }, { |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 1340 | .type = EM28XX_VMUX_SVIDEO, |
| 1341 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1342 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1343 | .gpio = hauppauge_wintv_hvr_900_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1344 | } }, |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 1345 | }, |
Devin Heitmueller | 4fd305b | 2008-06-04 13:43:46 -0300 | [diff] [blame] | 1346 | [EM2880_BOARD_PINNACLE_PCTV_HD_PRO] = { |
| 1347 | .name = "Pinnacle PCTV HD Pro Stick", |
Devin Heitmueller | 4fd305b | 2008-06-04 13:43:46 -0300 | [diff] [blame] | 1348 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1349 | .tuner_gpio = default_tuner_gpio, |
Devin Heitmueller | 4fd305b | 2008-06-04 13:43:46 -0300 | [diff] [blame] | 1350 | .mts_firmware = 1, |
Devin Heitmueller | 4fd305b | 2008-06-04 13:43:46 -0300 | [diff] [blame] | 1351 | .has_dvb = 1, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1352 | .dvb_gpio = hauppauge_wintv_hvr_900_digital, |
Mauro Carvalho Chehab | 02858ee | 2010-04-02 20:01:00 -0300 | [diff] [blame] | 1353 | .ir_codes = RC_MAP_PINNACLE_PCTV_HD, |
Devin Heitmueller | 4fd305b | 2008-06-04 13:43:46 -0300 | [diff] [blame] | 1354 | .decoder = EM28XX_TVP5150, |
| 1355 | .input = { { |
| 1356 | .type = EM28XX_VMUX_TELEVISION, |
| 1357 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1358 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1359 | .gpio = hauppauge_wintv_hvr_900_analog, |
Devin Heitmueller | 4fd305b | 2008-06-04 13:43:46 -0300 | [diff] [blame] | 1360 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1361 | .type = EM28XX_VMUX_COMPOSITE, |
Devin Heitmueller | 4fd305b | 2008-06-04 13:43:46 -0300 | [diff] [blame] | 1362 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1363 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1364 | .gpio = hauppauge_wintv_hvr_900_analog, |
Devin Heitmueller | 4fd305b | 2008-06-04 13:43:46 -0300 | [diff] [blame] | 1365 | }, { |
| 1366 | .type = EM28XX_VMUX_SVIDEO, |
| 1367 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1368 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1369 | .gpio = hauppauge_wintv_hvr_900_analog, |
Devin Heitmueller | 4fd305b | 2008-06-04 13:43:46 -0300 | [diff] [blame] | 1370 | } }, |
| 1371 | }, |
Devin Heitmueller | e14b365 | 2008-07-26 11:04:33 -0300 | [diff] [blame] | 1372 | [EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600] = { |
| 1373 | .name = "AMD ATI TV Wonder HD 600", |
Devin Heitmueller | e14b365 | 2008-07-26 11:04:33 -0300 | [diff] [blame] | 1374 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1375 | .tuner_gpio = default_tuner_gpio, |
Devin Heitmueller | e14b365 | 2008-07-26 11:04:33 -0300 | [diff] [blame] | 1376 | .mts_firmware = 1, |
Devin Heitmueller | e14b365 | 2008-07-26 11:04:33 -0300 | [diff] [blame] | 1377 | .has_dvb = 1, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1378 | .dvb_gpio = hauppauge_wintv_hvr_900_digital, |
Mauro Carvalho Chehab | 02858ee | 2010-04-02 20:01:00 -0300 | [diff] [blame] | 1379 | .ir_codes = RC_MAP_ATI_TV_WONDER_HD_600, |
Devin Heitmueller | e14b365 | 2008-07-26 11:04:33 -0300 | [diff] [blame] | 1380 | .decoder = EM28XX_TVP5150, |
| 1381 | .input = { { |
| 1382 | .type = EM28XX_VMUX_TELEVISION, |
| 1383 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1384 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1385 | .gpio = hauppauge_wintv_hvr_900_analog, |
Devin Heitmueller | e14b365 | 2008-07-26 11:04:33 -0300 | [diff] [blame] | 1386 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1387 | .type = EM28XX_VMUX_COMPOSITE, |
Devin Heitmueller | e14b365 | 2008-07-26 11:04:33 -0300 | [diff] [blame] | 1388 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1389 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1390 | .gpio = hauppauge_wintv_hvr_900_analog, |
Devin Heitmueller | e14b365 | 2008-07-26 11:04:33 -0300 | [diff] [blame] | 1391 | }, { |
| 1392 | .type = EM28XX_VMUX_SVIDEO, |
| 1393 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1394 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1395 | .gpio = hauppauge_wintv_hvr_900_analog, |
Devin Heitmueller | e14b365 | 2008-07-26 11:04:33 -0300 | [diff] [blame] | 1396 | } }, |
| 1397 | }, |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 1398 | [EM2880_BOARD_TERRATEC_HYBRID_XS] = { |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1399 | .name = "Terratec Hybrid XS", |
| 1400 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1401 | .tuner_gpio = default_tuner_gpio, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1402 | .decoder = EM28XX_TVP5150, |
reinhard schwab | 655b840 | 2008-07-26 10:47:00 -0300 | [diff] [blame] | 1403 | .has_dvb = 1, |
Devin Heitmueller | f797608 | 2009-06-22 22:32:32 -0300 | [diff] [blame] | 1404 | .dvb_gpio = default_digital, |
Mauro Carvalho Chehab | 02858ee | 2010-04-02 20:01:00 -0300 | [diff] [blame] | 1405 | .ir_codes = RC_MAP_TERRATEC_CINERGY_XS, |
Devin Heitmueller | 8cd9aae | 2009-08-03 23:56:51 -0300 | [diff] [blame] | 1406 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, /* NEC IR */ |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1407 | .input = { { |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 1408 | .type = EM28XX_VMUX_TELEVISION, |
| 1409 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1410 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1411 | .gpio = default_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1412 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1413 | .type = EM28XX_VMUX_COMPOSITE, |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 1414 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1415 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1416 | .gpio = default_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1417 | }, { |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 1418 | .type = EM28XX_VMUX_SVIDEO, |
| 1419 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1420 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1421 | .gpio = default_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1422 | } }, |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 1423 | }, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1424 | /* maybe there's a reason behind it why Terratec sells the Hybrid XS |
| 1425 | as Prodigy XS with a different PID, let's keep it separated for now |
| 1426 | maybe we'll need it lateron */ |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 1427 | [EM2880_BOARD_TERRATEC_PRODIGY_XS] = { |
| 1428 | .name = "Terratec Prodigy XS", |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 1429 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1430 | .tuner_gpio = default_tuner_gpio, |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 1431 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1432 | .input = { { |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 1433 | .type = EM28XX_VMUX_TELEVISION, |
| 1434 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1435 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1436 | .gpio = hauppauge_wintv_hvr_900_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1437 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1438 | .type = EM28XX_VMUX_COMPOSITE, |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 1439 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1440 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1441 | .gpio = hauppauge_wintv_hvr_900_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1442 | }, { |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 1443 | .type = EM28XX_VMUX_SVIDEO, |
| 1444 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1445 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1446 | .gpio = hauppauge_wintv_hvr_900_analog, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1447 | } }, |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 1448 | }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 1449 | [EM2820_BOARD_MSI_VOX_USB_2] = { |
Mauro Carvalho Chehab | c8793b0 | 2008-01-13 15:42:17 -0300 | [diff] [blame] | 1450 | .name = "MSI VOX USB 2.0", |
Mauro Carvalho Chehab | c8793b0 | 2008-01-13 15:42:17 -0300 | [diff] [blame] | 1451 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
| 1452 | .tda9887_conf = TDA9887_PRESENT | |
| 1453 | TDA9887_PORT1_ACTIVE | |
| 1454 | TDA9887_PORT2_ACTIVE, |
Mauro Carvalho Chehab | c8793b0 | 2008-01-13 15:42:17 -0300 | [diff] [blame] | 1455 | .max_range_640_480 = 1, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 1456 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | c8793b0 | 2008-01-13 15:42:17 -0300 | [diff] [blame] | 1457 | .input = { { |
| 1458 | .type = EM28XX_VMUX_TELEVISION, |
| 1459 | .vmux = SAA7115_COMPOSITE4, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1460 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1461 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1462 | .type = EM28XX_VMUX_COMPOSITE, |
Mauro Carvalho Chehab | c8793b0 | 2008-01-13 15:42:17 -0300 | [diff] [blame] | 1463 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1464 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1465 | }, { |
Mauro Carvalho Chehab | c8793b0 | 2008-01-13 15:42:17 -0300 | [diff] [blame] | 1466 | .type = EM28XX_VMUX_SVIDEO, |
| 1467 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1468 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1469 | } }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 1470 | }, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 1471 | [EM2800_BOARD_TERRATEC_CINERGY_200] = { |
| 1472 | .name = "Terratec Cinergy 200 USB", |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 1473 | .is_em2800 = 1, |
Mauro Carvalho Chehab | ac07bb7 | 2009-09-08 14:04:41 -0300 | [diff] [blame] | 1474 | .has_ir_i2c = 1, |
Sascha Sommer | 53b667e | 2012-01-08 16:41:22 -0300 | [diff] [blame] | 1475 | .tuner_type = TUNER_LG_TALN, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 1476 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 1477 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1478 | .input = { { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 1479 | .type = EM28XX_VMUX_TELEVISION, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 1480 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1481 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1482 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1483 | .type = EM28XX_VMUX_COMPOSITE, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 1484 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1485 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1486 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 1487 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 1488 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1489 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1490 | } }, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 1491 | }, |
Aron Szabo | 59d07f1 | 2008-07-27 13:47:52 -0300 | [diff] [blame] | 1492 | [EM2800_BOARD_GRABBEEX_USB2800] = { |
Nicola Soranzo | a1a6ee7 | 2009-02-10 23:28:24 -0300 | [diff] [blame] | 1493 | .name = "eMPIA Technology, Inc. GrabBeeX+ Video Encoder", |
| 1494 | .is_em2800 = 1, |
| 1495 | .decoder = EM28XX_SAA711X, |
| 1496 | .tuner_type = TUNER_ABSENT, /* capture only board */ |
| 1497 | .input = { { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1498 | .type = EM28XX_VMUX_COMPOSITE, |
Aron Szabo | 59d07f1 | 2008-07-27 13:47:52 -0300 | [diff] [blame] | 1499 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1500 | .amux = EM28XX_AMUX_LINE_IN, |
Aron Szabo | 59d07f1 | 2008-07-27 13:47:52 -0300 | [diff] [blame] | 1501 | }, { |
| 1502 | .type = EM28XX_VMUX_SVIDEO, |
| 1503 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1504 | .amux = EM28XX_AMUX_LINE_IN, |
Aron Szabo | 59d07f1 | 2008-07-27 13:47:52 -0300 | [diff] [blame] | 1505 | } }, |
| 1506 | }, |
Mauro Carvalho Chehab | 694a101 | 2009-11-26 21:26:13 -0300 | [diff] [blame] | 1507 | [EM2800_BOARD_VC211A] = { |
| 1508 | .name = "Actionmaster/LinXcel/Digitus VC211A", |
| 1509 | .is_em2800 = 1, |
| 1510 | .tuner_type = TUNER_ABSENT, /* Capture-only board */ |
| 1511 | .decoder = EM28XX_SAA711X, |
| 1512 | .input = { { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1513 | .type = EM28XX_VMUX_COMPOSITE, |
Mauro Carvalho Chehab | 694a101 | 2009-11-26 21:26:13 -0300 | [diff] [blame] | 1514 | .vmux = SAA7115_COMPOSITE0, |
| 1515 | .amux = EM28XX_AMUX_LINE_IN, |
| 1516 | .gpio = vc211a_enable, |
| 1517 | }, { |
| 1518 | .type = EM28XX_VMUX_SVIDEO, |
| 1519 | .vmux = SAA7115_SVIDEO3, |
| 1520 | .amux = EM28XX_AMUX_LINE_IN, |
| 1521 | .gpio = vc211a_enable, |
| 1522 | } }, |
| 1523 | }, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 1524 | [EM2800_BOARD_LEADTEK_WINFAST_USBII] = { |
| 1525 | .name = "Leadtek Winfast USB II", |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 1526 | .is_em2800 = 1, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 1527 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
| 1528 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 1529 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1530 | .input = { { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 1531 | .type = EM28XX_VMUX_TELEVISION, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 1532 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1533 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1534 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1535 | .type = EM28XX_VMUX_COMPOSITE, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 1536 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1537 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1538 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 1539 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 1540 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1541 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1542 | } }, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 1543 | }, |
| 1544 | [EM2800_BOARD_KWORLD_USB2800] = { |
| 1545 | .name = "Kworld USB2800", |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 1546 | .is_em2800 = 1, |
Michael Krufky | ab8b870 | 2008-04-22 14:46:05 -0300 | [diff] [blame] | 1547 | .tuner_type = TUNER_PHILIPS_FCV1236D, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 1548 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 1549 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1550 | .input = { { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 1551 | .type = EM28XX_VMUX_TELEVISION, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 1552 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1553 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1554 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1555 | .type = EM28XX_VMUX_COMPOSITE, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 1556 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1557 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1558 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 1559 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 1560 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1561 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1562 | } }, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 1563 | }, |
Mauro Carvalho Chehab | 45632c4 | 2005-11-08 21:38:15 -0800 | [diff] [blame] | 1564 | [EM2820_BOARD_PINNACLE_DVC_90] = { |
Mauro Carvalho Chehab | c558d13 | 2016-10-18 17:44:15 -0200 | [diff] [blame] | 1565 | .name = "Pinnacle Dazzle DVC 90/100/101/107 / Kaiser Baas Video to DVD maker / Kworld DVD Maker 2 / Plextor ConvertX PX-AV100U", |
Mauro Carvalho Chehab | 1c67e76 | 2008-11-27 07:46:59 -0300 | [diff] [blame] | 1566 | .tuner_type = TUNER_ABSENT, /* capture only board */ |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 1567 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1568 | .input = { { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1569 | .type = EM28XX_VMUX_COMPOSITE, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 1570 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1571 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1572 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 1573 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 1574 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1575 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1576 | } }, |
Mauro Carvalho Chehab | 45632c4 | 2005-11-08 21:38:15 -0800 | [diff] [blame] | 1577 | }, |
Sascha Sommer | 4362559 | 2007-11-03 15:05:07 -0300 | [diff] [blame] | 1578 | [EM2800_BOARD_VGEAR_POCKETTV] = { |
| 1579 | .name = "V-Gear PocketTV", |
| 1580 | .is_em2800 = 1, |
Sascha Sommer | 4362559 | 2007-11-03 15:05:07 -0300 | [diff] [blame] | 1581 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
| 1582 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 1583 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1584 | .input = { { |
Sascha Sommer | 4362559 | 2007-11-03 15:05:07 -0300 | [diff] [blame] | 1585 | .type = EM28XX_VMUX_TELEVISION, |
| 1586 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1587 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1588 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1589 | .type = EM28XX_VMUX_COMPOSITE, |
Sascha Sommer | 4362559 | 2007-11-03 15:05:07 -0300 | [diff] [blame] | 1590 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1591 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1592 | }, { |
Sascha Sommer | 4362559 | 2007-11-03 15:05:07 -0300 | [diff] [blame] | 1593 | .type = EM28XX_VMUX_SVIDEO, |
| 1594 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1595 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1596 | } }, |
Sascha Sommer | 4362559 | 2007-11-03 15:05:07 -0300 | [diff] [blame] | 1597 | }, |
Douglas Schilling Landgraf | 1e1addd | 2008-12-27 21:38:14 -0300 | [diff] [blame] | 1598 | [EM2820_BOARD_PROLINK_PLAYTV_BOX4_USB2] = { |
| 1599 | .name = "Pixelview PlayTV Box 4 USB 2.0", |
| 1600 | .tda9887_conf = TDA9887_PRESENT, |
| 1601 | .tuner_type = TUNER_YMEC_TVF_5533MF, |
| 1602 | .decoder = EM28XX_SAA711X, |
| 1603 | .input = { { |
| 1604 | .type = EM28XX_VMUX_TELEVISION, |
| 1605 | .vmux = SAA7115_COMPOSITE2, |
| 1606 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | fdf1bc9 | 2014-11-28 08:34:15 -0300 | [diff] [blame] | 1607 | .aout = EM28XX_AOUT_MONO | /* I2S */ |
Douglas Schilling Landgraf | 1e1addd | 2008-12-27 21:38:14 -0300 | [diff] [blame] | 1608 | EM28XX_AOUT_MASTER, /* Line out pin */ |
| 1609 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1610 | .type = EM28XX_VMUX_COMPOSITE, |
Douglas Schilling Landgraf | 1e1addd | 2008-12-27 21:38:14 -0300 | [diff] [blame] | 1611 | .vmux = SAA7115_COMPOSITE0, |
| 1612 | .amux = EM28XX_AMUX_LINE_IN, |
| 1613 | }, { |
| 1614 | .type = EM28XX_VMUX_SVIDEO, |
| 1615 | .vmux = SAA7115_SVIDEO3, |
| 1616 | .amux = EM28XX_AMUX_LINE_IN, |
| 1617 | } }, |
| 1618 | }, |
Mauro Carvalho Chehab | ea4fd56 | 2007-11-03 21:21:57 -0300 | [diff] [blame] | 1619 | [EM2820_BOARD_PROLINK_PLAYTV_USB2] = { |
Douglas Schilling Landgraf | 1f372a9 | 2009-02-25 16:54:31 -0300 | [diff] [blame] | 1620 | .name = "SIIG AVTuner-PVR / Pixelview Prolink PlayTV USB 2.0", |
Frank Schaefer | f5222609 | 2013-12-01 18:06:52 -0300 | [diff] [blame] | 1621 | .buttons = std_snapshot_button, |
Mauro Carvalho Chehab | ea4fd56 | 2007-11-03 21:21:57 -0300 | [diff] [blame] | 1622 | .tda9887_conf = TDA9887_PRESENT, |
Mauro Carvalho Chehab | ed08631 | 2008-01-24 06:59:20 -0300 | [diff] [blame] | 1623 | .tuner_type = TUNER_YMEC_TVF_5533MF, |
Mauro Carvalho Chehab | 41a5e7e | 2016-01-29 10:11:57 -0200 | [diff] [blame] | 1624 | .tuner_addr = 0x60, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 1625 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1626 | .input = { { |
Mauro Carvalho Chehab | ea4fd56 | 2007-11-03 21:21:57 -0300 | [diff] [blame] | 1627 | .type = EM28XX_VMUX_TELEVISION, |
| 1628 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 30e4ac7 | 2008-11-20 13:43:05 -0300 | [diff] [blame] | 1629 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | fdf1bc9 | 2014-11-28 08:34:15 -0300 | [diff] [blame] | 1630 | .aout = EM28XX_AOUT_MONO | /* I2S */ |
Mauro Carvalho Chehab | 30e4ac7 | 2008-11-20 13:43:05 -0300 | [diff] [blame] | 1631 | EM28XX_AOUT_MASTER, /* Line out pin */ |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1632 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1633 | .type = EM28XX_VMUX_COMPOSITE, |
Mauro Carvalho Chehab | ea4fd56 | 2007-11-03 21:21:57 -0300 | [diff] [blame] | 1634 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 7463dda | 2008-02-05 22:29:26 -0300 | [diff] [blame] | 1635 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1636 | }, { |
Mauro Carvalho Chehab | ea4fd56 | 2007-11-03 21:21:57 -0300 | [diff] [blame] | 1637 | .type = EM28XX_VMUX_SVIDEO, |
| 1638 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 7463dda | 2008-02-05 22:29:26 -0300 | [diff] [blame] | 1639 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 1640 | } }, |
Mauro Carvalho Chehab | ea4fd56 | 2007-11-03 21:21:57 -0300 | [diff] [blame] | 1641 | }, |
Devin Heitmueller | 3ed58ba | 2009-05-27 23:27:26 -0300 | [diff] [blame] | 1642 | [EM2860_BOARD_SAA711X_REFERENCE_DESIGN] = { |
| 1643 | .name = "EM2860/SAA711X Reference Design", |
Frank Schaefer | f5222609 | 2013-12-01 18:06:52 -0300 | [diff] [blame] | 1644 | .buttons = std_snapshot_button, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1645 | .tuner_type = TUNER_ABSENT, |
Mauro Carvalho Chehab | ec5de99 | 2008-11-25 09:43:29 -0300 | [diff] [blame] | 1646 | .decoder = EM28XX_SAA711X, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1647 | .input = { { |
Devin Heitmueller | a9fc52b | 2008-06-28 08:57:06 -0300 | [diff] [blame] | 1648 | .type = EM28XX_VMUX_SVIDEO, |
| 1649 | .vmux = SAA7115_SVIDEO3, |
Devin Heitmueller | 3ed58ba | 2009-05-27 23:27:26 -0300 | [diff] [blame] | 1650 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1651 | .type = EM28XX_VMUX_COMPOSITE, |
Devin Heitmueller | 3ed58ba | 2009-05-27 23:27:26 -0300 | [diff] [blame] | 1652 | .vmux = SAA7115_COMPOSITE0, |
Devin Heitmueller | a9fc52b | 2008-06-28 08:57:06 -0300 | [diff] [blame] | 1653 | } }, |
| 1654 | }, |
Mauro Carvalho Chehab | ca3dfd6 | 2010-09-10 17:29:14 -0300 | [diff] [blame] | 1655 | |
Mauro Carvalho Chehab | ebaefdb | 2011-06-01 10:16:25 -0300 | [diff] [blame] | 1656 | [EM2874_BOARD_LEADERSHIP_ISDBT] = { |
Mauro Carvalho Chehab | 3aa2b3b | 2013-03-05 06:55:27 -0300 | [diff] [blame] | 1657 | .def_i2c_bus = 1, |
| 1658 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | |
Mauro Carvalho Chehab | ca3dfd6 | 2010-09-10 17:29:14 -0300 | [diff] [blame] | 1659 | EM28XX_I2C_FREQ_100_KHZ, |
| 1660 | .xclk = EM28XX_XCLK_FREQUENCY_10MHZ, |
| 1661 | .name = "EM2874 Leadership ISDBT", |
| 1662 | .tuner_type = TUNER_ABSENT, |
| 1663 | .tuner_gpio = leadership_reset, |
| 1664 | .dvb_gpio = leadership_digital, |
| 1665 | .has_dvb = 1, |
| 1666 | }, |
| 1667 | |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1668 | [EM2880_BOARD_MSI_DIGIVOX_AD] = { |
| 1669 | .name = "MSI DigiVox A/D", |
| 1670 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1671 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1672 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1673 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1674 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1675 | .type = EM28XX_VMUX_TELEVISION, |
| 1676 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1677 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1678 | .gpio = em2880_msi_digivox_ad_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1679 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1680 | .type = EM28XX_VMUX_COMPOSITE, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1681 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1682 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1683 | .gpio = em2880_msi_digivox_ad_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1684 | }, { |
| 1685 | .type = EM28XX_VMUX_SVIDEO, |
| 1686 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1687 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1688 | .gpio = em2880_msi_digivox_ad_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1689 | } }, |
| 1690 | }, |
| 1691 | [EM2880_BOARD_MSI_DIGIVOX_AD_II] = { |
| 1692 | .name = "MSI DigiVox A/D II", |
| 1693 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1694 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1695 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1696 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1697 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1698 | .type = EM28XX_VMUX_TELEVISION, |
| 1699 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1700 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1701 | .gpio = em2880_msi_digivox_ad_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1702 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1703 | .type = EM28XX_VMUX_COMPOSITE, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1704 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1705 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1706 | .gpio = em2880_msi_digivox_ad_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1707 | }, { |
| 1708 | .type = EM28XX_VMUX_SVIDEO, |
| 1709 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1710 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1711 | .gpio = em2880_msi_digivox_ad_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1712 | } }, |
| 1713 | }, |
| 1714 | [EM2880_BOARD_KWORLD_DVB_305U] = { |
| 1715 | .name = "KWorld DVB-T 305U", |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1716 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1717 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1718 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1719 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1720 | .type = EM28XX_VMUX_TELEVISION, |
| 1721 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1722 | .amux = EM28XX_AMUX_VIDEO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1723 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1724 | .type = EM28XX_VMUX_COMPOSITE, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1725 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1726 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1727 | }, { |
| 1728 | .type = EM28XX_VMUX_SVIDEO, |
| 1729 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1730 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1731 | } }, |
| 1732 | }, |
| 1733 | [EM2880_BOARD_KWORLD_DVB_310U] = { |
| 1734 | .name = "KWorld DVB-T 310U", |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1735 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1736 | .tuner_gpio = default_tuner_gpio, |
Darron Broad | da3808e | 2008-09-30 02:46:41 -0300 | [diff] [blame] | 1737 | .has_dvb = 1, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1738 | .dvb_gpio = default_digital, |
Darron Broad | da3808e | 2008-09-30 02:46:41 -0300 | [diff] [blame] | 1739 | .mts_firmware = 1, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1740 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1741 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1742 | .type = EM28XX_VMUX_TELEVISION, |
| 1743 | .vmux = TVP5150_COMPOSITE0, |
Darron Broad | da3808e | 2008-09-30 02:46:41 -0300 | [diff] [blame] | 1744 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1745 | .gpio = default_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1746 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1747 | .type = EM28XX_VMUX_COMPOSITE, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1748 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | a42aa19 | 2008-11-19 11:08:53 -0300 | [diff] [blame] | 1749 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1750 | .gpio = default_analog, |
Darron Broad | da3808e | 2008-09-30 02:46:41 -0300 | [diff] [blame] | 1751 | }, { /* S-video has not been tested yet */ |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1752 | .type = EM28XX_VMUX_SVIDEO, |
| 1753 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | a42aa19 | 2008-11-19 11:08:53 -0300 | [diff] [blame] | 1754 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1755 | .gpio = default_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1756 | } }, |
| 1757 | }, |
Franklin Meng | d7de5d8 | 2009-06-06 17:05:02 -0300 | [diff] [blame] | 1758 | [EM2882_BOARD_KWORLD_ATSC_315U] = { |
| 1759 | .name = "KWorld ATSC 315U HDTV TV Box", |
| 1760 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
| 1761 | .tuner_type = TUNER_THOMSON_DTT761X, |
| 1762 | .tuner_gpio = em2882_kworld_315u_tuner_gpio, |
| 1763 | .tda9887_conf = TDA9887_PRESENT, |
| 1764 | .decoder = EM28XX_SAA711X, |
| 1765 | .has_dvb = 1, |
| 1766 | .dvb_gpio = em2882_kworld_315u_digital, |
Mauro Carvalho Chehab | 02858ee | 2010-04-02 20:01:00 -0300 | [diff] [blame] | 1767 | .ir_codes = RC_MAP_KWORLD_315U, |
Franklin Meng | d7de5d8 | 2009-06-06 17:05:02 -0300 | [diff] [blame] | 1768 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, |
| 1769 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE, |
| 1770 | /* Analog mode - still not ready */ |
| 1771 | /*.input = { { |
| 1772 | .type = EM28XX_VMUX_TELEVISION, |
| 1773 | .vmux = SAA7115_COMPOSITE2, |
| 1774 | .amux = EM28XX_AMUX_VIDEO, |
| 1775 | .gpio = em2882_kworld_315u_analog, |
| 1776 | .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO, |
| 1777 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1778 | .type = EM28XX_VMUX_COMPOSITE, |
Franklin Meng | d7de5d8 | 2009-06-06 17:05:02 -0300 | [diff] [blame] | 1779 | .vmux = SAA7115_COMPOSITE0, |
| 1780 | .amux = EM28XX_AMUX_LINE_IN, |
| 1781 | .gpio = em2882_kworld_315u_analog1, |
| 1782 | .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO, |
| 1783 | }, { |
| 1784 | .type = EM28XX_VMUX_SVIDEO, |
| 1785 | .vmux = SAA7115_SVIDEO3, |
| 1786 | .amux = EM28XX_AMUX_LINE_IN, |
| 1787 | .gpio = em2882_kworld_315u_analog1, |
| 1788 | .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO, |
| 1789 | } }, */ |
| 1790 | }, |
Douglas Schilling Landgraf | e5db5d4 | 2009-04-09 18:24:34 -0300 | [diff] [blame] | 1791 | [EM2880_BOARD_EMPIRE_DUAL_TV] = { |
| 1792 | .name = "Empire dual TV", |
| 1793 | .tuner_type = TUNER_XC2028, |
| 1794 | .tuner_gpio = default_tuner_gpio, |
| 1795 | .has_dvb = 1, |
| 1796 | .dvb_gpio = default_digital, |
| 1797 | .mts_firmware = 1, |
| 1798 | .decoder = EM28XX_TVP5150, |
| 1799 | .input = { { |
| 1800 | .type = EM28XX_VMUX_TELEVISION, |
| 1801 | .vmux = TVP5150_COMPOSITE0, |
| 1802 | .amux = EM28XX_AMUX_VIDEO, |
| 1803 | .gpio = default_analog, |
| 1804 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1805 | .type = EM28XX_VMUX_COMPOSITE, |
Douglas Schilling Landgraf | e5db5d4 | 2009-04-09 18:24:34 -0300 | [diff] [blame] | 1806 | .vmux = TVP5150_COMPOSITE1, |
| 1807 | .amux = EM28XX_AMUX_LINE_IN, |
| 1808 | .gpio = default_analog, |
| 1809 | }, { |
| 1810 | .type = EM28XX_VMUX_SVIDEO, |
| 1811 | .vmux = TVP5150_SVIDEO, |
| 1812 | .amux = EM28XX_AMUX_LINE_IN, |
| 1813 | .gpio = default_analog, |
| 1814 | } }, |
| 1815 | }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1816 | [EM2881_BOARD_DNT_DA2_HYBRID] = { |
| 1817 | .name = "DNT DA2 Hybrid", |
| 1818 | .valid = EM28XX_BOARD_NOT_VALIDATED, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1819 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1820 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1821 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1822 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1823 | .type = EM28XX_VMUX_TELEVISION, |
| 1824 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1825 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1826 | .gpio = default_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1827 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1828 | .type = EM28XX_VMUX_COMPOSITE, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1829 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1830 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1831 | .gpio = default_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1832 | }, { |
| 1833 | .type = EM28XX_VMUX_SVIDEO, |
| 1834 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1835 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1836 | .gpio = default_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1837 | } }, |
| 1838 | }, |
| 1839 | [EM2881_BOARD_PINNACLE_HYBRID_PRO] = { |
| 1840 | .name = "Pinnacle Hybrid Pro", |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1841 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1842 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1843 | .decoder = EM28XX_TVP5150, |
Devin Heitmueller | d5b3ba9 | 2009-07-08 21:51:35 -0300 | [diff] [blame] | 1844 | .has_dvb = 1, |
| 1845 | .dvb_gpio = pinnacle_hybrid_pro_digital, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1846 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1847 | .type = EM28XX_VMUX_TELEVISION, |
| 1848 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1849 | .amux = EM28XX_AMUX_VIDEO, |
Devin Heitmueller | d5b3ba9 | 2009-07-08 21:51:35 -0300 | [diff] [blame] | 1850 | .gpio = pinnacle_hybrid_pro_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1851 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1852 | .type = EM28XX_VMUX_COMPOSITE, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1853 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1854 | .amux = EM28XX_AMUX_LINE_IN, |
Devin Heitmueller | d5b3ba9 | 2009-07-08 21:51:35 -0300 | [diff] [blame] | 1855 | .gpio = pinnacle_hybrid_pro_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1856 | }, { |
| 1857 | .type = EM28XX_VMUX_SVIDEO, |
| 1858 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1859 | .amux = EM28XX_AMUX_LINE_IN, |
Devin Heitmueller | d5b3ba9 | 2009-07-08 21:51:35 -0300 | [diff] [blame] | 1860 | .gpio = pinnacle_hybrid_pro_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1861 | } }, |
| 1862 | }, |
Devin Heitmueller | 09bc194 | 2011-03-13 02:07:54 -0300 | [diff] [blame] | 1863 | [EM2882_BOARD_PINNACLE_HYBRID_PRO_330E] = { |
| 1864 | .name = "Pinnacle Hybrid Pro (330e)", |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1865 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1866 | .tuner_gpio = default_tuner_gpio, |
Eugeniy Meshcheryakov | a674a3b | 2008-08-01 08:23:41 -0300 | [diff] [blame] | 1867 | .mts_firmware = 1, |
Devin Heitmueller | ad9b4bb | 2011-03-13 02:09:59 -0300 | [diff] [blame] | 1868 | .has_dvb = 1, |
| 1869 | .dvb_gpio = hauppauge_wintv_hvr_900R2_digital, |
Devin Heitmueller | 9b316d6 | 2011-03-13 02:18:34 -0300 | [diff] [blame] | 1870 | .ir_codes = RC_MAP_PINNACLE_PCTV_HD, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1871 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1872 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1873 | .type = EM28XX_VMUX_TELEVISION, |
| 1874 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1875 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1876 | .gpio = hauppauge_wintv_hvr_900_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1877 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1878 | .type = EM28XX_VMUX_COMPOSITE, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1879 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1880 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1881 | .gpio = hauppauge_wintv_hvr_900_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1882 | }, { |
| 1883 | .type = EM28XX_VMUX_SVIDEO, |
| 1884 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1885 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1886 | .gpio = hauppauge_wintv_hvr_900_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1887 | } }, |
| 1888 | }, |
| 1889 | [EM2882_BOARD_KWORLD_VS_DVBT] = { |
| 1890 | .name = "Kworld VS-DVB-T 323UR", |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1891 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1892 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1893 | .decoder = EM28XX_TVP5150, |
Antonio Larrosa | 811fab6 | 2010-03-04 22:19:48 -0300 | [diff] [blame] | 1894 | .mts_firmware = 1, |
| 1895 | .has_dvb = 1, |
| 1896 | .dvb_gpio = kworld_330u_digital, |
| 1897 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, /* NEC IR */ |
Mauro Carvalho Chehab | 02858ee | 2010-04-02 20:01:00 -0300 | [diff] [blame] | 1898 | .ir_codes = RC_MAP_KWORLD_315U, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1899 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1900 | .type = EM28XX_VMUX_TELEVISION, |
| 1901 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1902 | .amux = EM28XX_AMUX_VIDEO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1903 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1904 | .type = EM28XX_VMUX_COMPOSITE, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1905 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1906 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1907 | }, { |
| 1908 | .type = EM28XX_VMUX_SVIDEO, |
| 1909 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1910 | .amux = EM28XX_AMUX_LINE_IN, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1911 | } }, |
| 1912 | }, |
| 1913 | [EM2882_BOARD_TERRATEC_HYBRID_XS] = { |
Philippe Bourdin | 9124544 | 2010-10-31 09:57:58 -0300 | [diff] [blame] | 1914 | .name = "Terratec Cinnergy Hybrid T USB XS (em2882)", |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1915 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1916 | .tuner_gpio = default_tuner_gpio, |
Uroš Vampl | ec994d0 | 2009-09-30 22:53:37 -0300 | [diff] [blame] | 1917 | .mts_firmware = 1, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1918 | .decoder = EM28XX_TVP5150, |
Uroš Vampl | ec994d0 | 2009-09-30 22:53:37 -0300 | [diff] [blame] | 1919 | .has_dvb = 1, |
| 1920 | .dvb_gpio = hauppauge_wintv_hvr_900_digital, |
Mauro Carvalho Chehab | 02858ee | 2010-04-02 20:01:00 -0300 | [diff] [blame] | 1921 | .ir_codes = RC_MAP_TERRATEC_CINERGY_XS, |
Uroš Vampl | ec994d0 | 2009-09-30 22:53:37 -0300 | [diff] [blame] | 1922 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1923 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1924 | .type = EM28XX_VMUX_TELEVISION, |
| 1925 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1926 | .amux = EM28XX_AMUX_VIDEO, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1927 | .gpio = hauppauge_wintv_hvr_900_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1928 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1929 | .type = EM28XX_VMUX_COMPOSITE, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1930 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1931 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1932 | .gpio = hauppauge_wintv_hvr_900_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1933 | }, { |
| 1934 | .type = EM28XX_VMUX_SVIDEO, |
| 1935 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1936 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 122b77e | 2008-11-27 07:42:26 -0300 | [diff] [blame] | 1937 | .gpio = hauppauge_wintv_hvr_900_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1938 | } }, |
| 1939 | }, |
Andrea.Amorosi76@gmail.com | 7ca7ef6 | 2010-02-09 17:53:38 -0300 | [diff] [blame] | 1940 | [EM2882_BOARD_DIKOM_DK300] = { |
| 1941 | .name = "Dikom DK300", |
| 1942 | .tuner_type = TUNER_XC2028, |
| 1943 | .tuner_gpio = default_tuner_gpio, |
| 1944 | .decoder = EM28XX_TVP5150, |
| 1945 | .mts_firmware = 1, |
| 1946 | .has_dvb = 1, |
| 1947 | .dvb_gpio = dikom_dk300_digital, |
| 1948 | .input = { { |
| 1949 | .type = EM28XX_VMUX_TELEVISION, |
| 1950 | .vmux = TVP5150_COMPOSITE0, |
| 1951 | .amux = EM28XX_AMUX_VIDEO, |
| 1952 | .gpio = default_analog, |
| 1953 | } }, |
| 1954 | }, |
Robert Krakora | 6e7b9ea | 2009-01-18 21:59:34 -0300 | [diff] [blame] | 1955 | [EM2883_BOARD_KWORLD_HYBRID_330U] = { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1956 | .name = "Kworld PlusTV HD Hybrid 330", |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1957 | .tuner_type = TUNER_XC2028, |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 1958 | .tuner_gpio = default_tuner_gpio, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1959 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | be2c6db | 2008-12-09 15:43:10 -0300 | [diff] [blame] | 1960 | .mts_firmware = 1, |
| 1961 | .has_dvb = 1, |
Robert Krakora | 6e7b9ea | 2009-01-18 21:59:34 -0300 | [diff] [blame] | 1962 | .dvb_gpio = kworld_330u_digital, |
| 1963 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, |
Nicola Soranzo | a1a6ee7 | 2009-02-10 23:28:24 -0300 | [diff] [blame] | 1964 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | |
| 1965 | EM28XX_I2C_EEPROM_ON_BOARD | |
| 1966 | EM28XX_I2C_EEPROM_KEY_VALID, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1967 | .input = { { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1968 | .type = EM28XX_VMUX_TELEVISION, |
| 1969 | .vmux = TVP5150_COMPOSITE0, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1970 | .amux = EM28XX_AMUX_VIDEO, |
Robert Krakora | 6e7b9ea | 2009-01-18 21:59:34 -0300 | [diff] [blame] | 1971 | .gpio = kworld_330u_analog, |
| 1972 | .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1973 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 1974 | .type = EM28XX_VMUX_COMPOSITE, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1975 | .vmux = TVP5150_COMPOSITE1, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1976 | .amux = EM28XX_AMUX_LINE_IN, |
Robert Krakora | 6e7b9ea | 2009-01-18 21:59:34 -0300 | [diff] [blame] | 1977 | .gpio = kworld_330u_analog, |
| 1978 | .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1979 | }, { |
| 1980 | .type = EM28XX_VMUX_SVIDEO, |
| 1981 | .vmux = TVP5150_SVIDEO, |
Mauro Carvalho Chehab | 8a5caa6 | 2008-11-19 11:10:50 -0300 | [diff] [blame] | 1982 | .amux = EM28XX_AMUX_LINE_IN, |
Robert Krakora | 6e7b9ea | 2009-01-18 21:59:34 -0300 | [diff] [blame] | 1983 | .gpio = kworld_330u_analog, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 1984 | } }, |
| 1985 | }, |
Mauro Carvalho Chehab | ee281b8 | 2008-07-27 16:58:04 -0300 | [diff] [blame] | 1986 | [EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU] = { |
Vitaly Wool | d360334 | 2008-07-27 14:10:11 -0300 | [diff] [blame] | 1987 | .name = "Compro VideoMate ForYou/Stereo", |
Vitaly Wool | d360334 | 2008-07-27 14:10:11 -0300 | [diff] [blame] | 1988 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 1989 | .tvaudio_addr = 0xb0, |
Vitaly Wool | d360334 | 2008-07-27 14:10:11 -0300 | [diff] [blame] | 1990 | .tda9887_conf = TDA9887_PRESENT, |
| 1991 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | df7fa09 | 2009-02-25 09:06:13 -0300 | [diff] [blame] | 1992 | .adecoder = EM28XX_TVAUDIO, |
Vitaly Wool | 2bd1d9e | 2009-03-04 08:27:52 -0300 | [diff] [blame] | 1993 | .mute_gpio = compro_mute_gpio, |
Mauro Carvalho Chehab | d4d889e | 2008-11-25 09:10:25 -0300 | [diff] [blame] | 1994 | .input = { { |
Vitaly Wool | d360334 | 2008-07-27 14:10:11 -0300 | [diff] [blame] | 1995 | .type = EM28XX_VMUX_TELEVISION, |
| 1996 | .vmux = TVP5150_COMPOSITE0, |
Vitaly Wool | 2bd1d9e | 2009-03-04 08:27:52 -0300 | [diff] [blame] | 1997 | .amux = EM28XX_AMUX_VIDEO, |
| 1998 | .gpio = compro_unmute_tv_gpio, |
Vitaly Wool | d360334 | 2008-07-27 14:10:11 -0300 | [diff] [blame] | 1999 | }, { |
| 2000 | .type = EM28XX_VMUX_SVIDEO, |
| 2001 | .vmux = TVP5150_SVIDEO, |
| 2002 | .amux = EM28XX_AMUX_LINE_IN, |
Vitaly Wool | 2bd1d9e | 2009-03-04 08:27:52 -0300 | [diff] [blame] | 2003 | .gpio = compro_unmute_svid_gpio, |
Vitaly Wool | d360334 | 2008-07-27 14:10:11 -0300 | [diff] [blame] | 2004 | } }, |
| 2005 | }, |
Mauro Carvalho Chehab | 0bf4f6c | 2009-02-11 14:13:20 -0300 | [diff] [blame] | 2006 | [EM2860_BOARD_KAIOMY_TVNPC_U2] = { |
| 2007 | .name = "Kaiomy TVnPC U2", |
| 2008 | .vchannels = 3, |
| 2009 | .tuner_type = TUNER_XC2028, |
| 2010 | .tuner_addr = 0x61, |
| 2011 | .mts_firmware = 1, |
| 2012 | .decoder = EM28XX_TVP5150, |
| 2013 | .tuner_gpio = default_tuner_gpio, |
Mauro Carvalho Chehab | 02858ee | 2010-04-02 20:01:00 -0300 | [diff] [blame] | 2014 | .ir_codes = RC_MAP_KAIOMY, |
Mauro Carvalho Chehab | 0bf4f6c | 2009-02-11 14:13:20 -0300 | [diff] [blame] | 2015 | .input = { { |
| 2016 | .type = EM28XX_VMUX_TELEVISION, |
| 2017 | .vmux = TVP5150_COMPOSITE0, |
| 2018 | .amux = EM28XX_AMUX_VIDEO, |
| 2019 | |
| 2020 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 2021 | .type = EM28XX_VMUX_COMPOSITE, |
Mauro Carvalho Chehab | 0bf4f6c | 2009-02-11 14:13:20 -0300 | [diff] [blame] | 2022 | .vmux = TVP5150_COMPOSITE1, |
| 2023 | .amux = EM28XX_AMUX_LINE_IN, |
| 2024 | }, { |
| 2025 | .type = EM28XX_VMUX_SVIDEO, |
| 2026 | .vmux = TVP5150_SVIDEO, |
| 2027 | .amux = EM28XX_AMUX_LINE_IN, |
| 2028 | } }, |
| 2029 | .radio = { |
| 2030 | .type = EM28XX_RADIO, |
| 2031 | .amux = EM28XX_AMUX_LINE_IN, |
| 2032 | } |
Mauro Carvalho Chehab | 56ee380 | 2009-02-11 14:18:36 -0300 | [diff] [blame] | 2033 | }, |
| 2034 | [EM2860_BOARD_EASYCAP] = { |
| 2035 | .name = "Easy Cap Capture DC-60", |
| 2036 | .vchannels = 2, |
| 2037 | .tuner_type = TUNER_ABSENT, |
| 2038 | .decoder = EM28XX_SAA711X, |
| 2039 | .input = { { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 2040 | .type = EM28XX_VMUX_COMPOSITE, |
Mauro Carvalho Chehab | 56ee380 | 2009-02-11 14:18:36 -0300 | [diff] [blame] | 2041 | .vmux = SAA7115_COMPOSITE0, |
| 2042 | .amux = EM28XX_AMUX_LINE_IN, |
| 2043 | }, { |
| 2044 | .type = EM28XX_VMUX_SVIDEO, |
| 2045 | .vmux = SAA7115_SVIDEO3, |
| 2046 | .amux = EM28XX_AMUX_LINE_IN, |
| 2047 | } }, |
| 2048 | }, |
Indika Katugampala | f74a61e3 | 2009-02-11 11:13:05 -0300 | [diff] [blame] | 2049 | [EM2820_BOARD_IODATA_GVMVP_SZ] = { |
| 2050 | .name = "IO-DATA GV-MVP/SZ", |
| 2051 | .tuner_type = TUNER_PHILIPS_FM1236_MK3, |
| 2052 | .tuner_gpio = default_tuner_gpio, |
| 2053 | .tda9887_conf = TDA9887_PRESENT, |
| 2054 | .decoder = EM28XX_TVP5150, |
| 2055 | .input = { { |
| 2056 | .type = EM28XX_VMUX_TELEVISION, |
| 2057 | .vmux = TVP5150_COMPOSITE0, |
| 2058 | .amux = EM28XX_AMUX_VIDEO, |
| 2059 | }, { /* Composite has not been tested yet */ |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 2060 | .type = EM28XX_VMUX_COMPOSITE, |
Indika Katugampala | f74a61e3 | 2009-02-11 11:13:05 -0300 | [diff] [blame] | 2061 | .vmux = TVP5150_COMPOSITE1, |
| 2062 | .amux = EM28XX_AMUX_VIDEO, |
| 2063 | }, { /* S-video has not been tested yet */ |
| 2064 | .type = EM28XX_VMUX_SVIDEO, |
| 2065 | .vmux = TVP5150_SVIDEO, |
| 2066 | .amux = EM28XX_AMUX_VIDEO, |
| 2067 | } }, |
| 2068 | }, |
Mauro Carvalho Chehab | 4557af9 | 2009-05-23 09:58:52 -0300 | [diff] [blame] | 2069 | [EM2860_BOARD_TERRATEC_GRABBY] = { |
| 2070 | .name = "Terratec Grabby", |
| 2071 | .vchannels = 2, |
| 2072 | .tuner_type = TUNER_ABSENT, |
| 2073 | .decoder = EM28XX_SAA711X, |
| 2074 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, |
| 2075 | .input = { { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 2076 | .type = EM28XX_VMUX_COMPOSITE, |
Mauro Carvalho Chehab | 4557af9 | 2009-05-23 09:58:52 -0300 | [diff] [blame] | 2077 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | a3fa904 | 2010-10-25 17:51:15 -0300 | [diff] [blame] | 2078 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 4557af9 | 2009-05-23 09:58:52 -0300 | [diff] [blame] | 2079 | }, { |
| 2080 | .type = EM28XX_VMUX_SVIDEO, |
| 2081 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | a3fa904 | 2010-10-25 17:51:15 -0300 | [diff] [blame] | 2082 | .amux = EM28XX_AMUX_LINE_IN, |
Mauro Carvalho Chehab | 4557af9 | 2009-05-23 09:58:52 -0300 | [diff] [blame] | 2083 | } }, |
Matthieu Rogez | dd837fb | 2016-02-28 08:26:21 -0300 | [diff] [blame] | 2084 | .buttons = std_snapshot_button, |
Matthieu Rogez | 565e37d | 2016-02-28 08:26:22 -0300 | [diff] [blame] | 2085 | .leds = terratec_grabby_leds, |
Mauro Carvalho Chehab | 4557af9 | 2009-05-23 09:58:52 -0300 | [diff] [blame] | 2086 | }, |
Mauro Carvalho Chehab | 766ed64 | 2009-05-24 00:46:01 -0300 | [diff] [blame] | 2087 | [EM2860_BOARD_TERRATEC_AV350] = { |
| 2088 | .name = "Terratec AV350", |
| 2089 | .vchannels = 2, |
| 2090 | .tuner_type = TUNER_ABSENT, |
| 2091 | .decoder = EM28XX_TVP5150, |
| 2092 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, |
| 2093 | .mute_gpio = terratec_av350_mute_gpio, |
| 2094 | .input = { { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 2095 | .type = EM28XX_VMUX_COMPOSITE, |
Mauro Carvalho Chehab | 766ed64 | 2009-05-24 00:46:01 -0300 | [diff] [blame] | 2096 | .vmux = TVP5150_COMPOSITE1, |
| 2097 | .amux = EM28XX_AUDIO_SRC_LINE, |
Jean Delvare | 1df8e98 | 2009-05-13 16:48:07 -0300 | [diff] [blame] | 2098 | .gpio = terratec_av350_unmute_gpio, |
Mauro Carvalho Chehab | 766ed64 | 2009-05-24 00:46:01 -0300 | [diff] [blame] | 2099 | |
| 2100 | }, { |
| 2101 | .type = EM28XX_VMUX_SVIDEO, |
| 2102 | .vmux = TVP5150_SVIDEO, |
| 2103 | .amux = EM28XX_AUDIO_SRC_LINE, |
Jean Delvare | 1df8e98 | 2009-05-13 16:48:07 -0300 | [diff] [blame] | 2104 | .gpio = terratec_av350_unmute_gpio, |
Mauro Carvalho Chehab | 766ed64 | 2009-05-24 00:46:01 -0300 | [diff] [blame] | 2105 | } }, |
| 2106 | }, |
Adrian Taylor | 8298f2f | 2010-10-20 07:55:33 -0300 | [diff] [blame] | 2107 | |
| 2108 | [EM2860_BOARD_ELGATO_VIDEO_CAPTURE] = { |
| 2109 | .name = "Elgato Video Capture", |
| 2110 | .decoder = EM28XX_SAA711X, |
| 2111 | .tuner_type = TUNER_ABSENT, /* Capture only device */ |
| 2112 | .input = { { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 2113 | .type = EM28XX_VMUX_COMPOSITE, |
Adrian Taylor | 8298f2f | 2010-10-20 07:55:33 -0300 | [diff] [blame] | 2114 | .vmux = SAA7115_COMPOSITE0, |
| 2115 | .amux = EM28XX_AMUX_LINE_IN, |
| 2116 | }, { |
| 2117 | .type = EM28XX_VMUX_SVIDEO, |
| 2118 | .vmux = SAA7115_SVIDEO3, |
| 2119 | .amux = EM28XX_AMUX_LINE_IN, |
| 2120 | } }, |
| 2121 | }, |
| 2122 | |
Devin Heitmueller | 1985922 | 2009-06-19 00:33:54 -0300 | [diff] [blame] | 2123 | [EM2882_BOARD_EVGA_INDTUBE] = { |
| 2124 | .name = "Evga inDtube", |
| 2125 | .tuner_type = TUNER_XC2028, |
| 2126 | .tuner_gpio = default_tuner_gpio, |
| 2127 | .decoder = EM28XX_TVP5150, |
Devin Heitmueller | a4c4730 | 2009-06-20 21:34:42 -0300 | [diff] [blame] | 2128 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, /* NEC IR */ |
Devin Heitmueller | 1985922 | 2009-06-19 00:33:54 -0300 | [diff] [blame] | 2129 | .mts_firmware = 1, |
| 2130 | .has_dvb = 1, |
| 2131 | .dvb_gpio = evga_indtube_digital, |
Mauro Carvalho Chehab | 02858ee | 2010-04-02 20:01:00 -0300 | [diff] [blame] | 2132 | .ir_codes = RC_MAP_EVGA_INDTUBE, |
Devin Heitmueller | 1985922 | 2009-06-19 00:33:54 -0300 | [diff] [blame] | 2133 | .input = { { |
| 2134 | .type = EM28XX_VMUX_TELEVISION, |
| 2135 | .vmux = TVP5150_COMPOSITE0, |
| 2136 | .amux = EM28XX_AMUX_VIDEO, |
| 2137 | .gpio = evga_indtube_analog, |
| 2138 | }, { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 2139 | .type = EM28XX_VMUX_COMPOSITE, |
Devin Heitmueller | 1985922 | 2009-06-19 00:33:54 -0300 | [diff] [blame] | 2140 | .vmux = TVP5150_COMPOSITE1, |
| 2141 | .amux = EM28XX_AMUX_LINE_IN, |
| 2142 | .gpio = evga_indtube_analog, |
| 2143 | }, { |
| 2144 | .type = EM28XX_VMUX_SVIDEO, |
| 2145 | .vmux = TVP5150_SVIDEO, |
| 2146 | .amux = EM28XX_AMUX_LINE_IN, |
| 2147 | .gpio = evga_indtube_analog, |
| 2148 | } }, |
| 2149 | }, |
Antti Palosaari | 285eb1a | 2009-09-15 14:42:13 -0300 | [diff] [blame] | 2150 | /* eb1a:2868 Empia EM2870 + Philips CU1216L NIM (Philips TDA10023 + |
| 2151 | Infineon TUA6034) */ |
| 2152 | [EM2870_BOARD_REDDO_DVB_C_USB_BOX] = { |
| 2153 | .name = "Reddo DVB-C USB TV Box", |
| 2154 | .tuner_type = TUNER_ABSENT, |
Antti Palosaari | 28f4ddd1 | 2009-10-04 12:59:35 -0300 | [diff] [blame] | 2155 | .tuner_gpio = reddo_dvb_c_usb_box, |
Antti Palosaari | 285eb1a | 2009-09-15 14:42:13 -0300 | [diff] [blame] | 2156 | .has_dvb = 1, |
Antti Palosaari | 285eb1a | 2009-09-15 14:42:13 -0300 | [diff] [blame] | 2157 | }, |
Jarod Wilson | 7e48b30 | 2010-03-07 17:55:43 -0300 | [diff] [blame] | 2158 | /* 1b80:a340 - Empia EM2870, NXP TDA18271HD and LG DT3304, sold |
| 2159 | * initially as the KWorld PlusTV 340U, then as the UB435-Q. |
| 2160 | * Early variants have a TDA18271HD/C1, later ones a TDA18271HD/C2 */ |
| 2161 | [EM2870_BOARD_KWORLD_A340] = { |
| 2162 | .name = "KWorld PlusTV 340U or UB435-Q (ATSC)", |
| 2163 | .tuner_type = TUNER_ABSENT, /* Digital-only TDA18271HD */ |
| 2164 | .has_dvb = 1, |
| 2165 | .dvb_gpio = kworld_a340_digital, |
| 2166 | .tuner_gpio = default_tuner_gpio, |
| 2167 | }, |
Antti Palosaari | 460312e | 2011-05-25 17:03:50 -0300 | [diff] [blame] | 2168 | /* 2013:024f PCTV nanoStick T2 290e. |
Antti Palosaari | d6a5f92 | 2011-04-07 16:34:44 -0300 | [diff] [blame] | 2169 | * Empia EM28174, Sony CXD2820R and NXP TDA18271HD/C2 */ |
| 2170 | [EM28174_BOARD_PCTV_290E] = { |
Antti Palosaari | 460312e | 2011-05-25 17:03:50 -0300 | [diff] [blame] | 2171 | .name = "PCTV nanoStick T2 290e", |
Mauro Carvalho Chehab | 3aa2b3b | 2013-03-05 06:55:27 -0300 | [diff] [blame] | 2172 | .def_i2c_bus = 1, |
| 2173 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | EM28XX_I2C_FREQ_100_KHZ, |
Antti Palosaari | d6a5f92 | 2011-04-07 16:34:44 -0300 | [diff] [blame] | 2174 | .tuner_type = TUNER_ABSENT, |
| 2175 | .tuner_gpio = pctv_290e, |
| 2176 | .has_dvb = 1, |
Antti Palosaari | ff7b929 | 2011-05-25 17:00:35 -0300 | [diff] [blame] | 2177 | .ir_codes = RC_MAP_PINNACLE_PCTV_HD, |
Antti Palosaari | d6a5f92 | 2011-04-07 16:34:44 -0300 | [diff] [blame] | 2178 | }, |
Antti Palosaari | 3658871 | 2011-08-01 01:15:30 -0300 | [diff] [blame] | 2179 | /* 2013:024f PCTV DVB-S2 Stick 460e |
| 2180 | * Empia EM28174, NXP TDA10071, Conexant CX24118A and Allegro A8293 */ |
| 2181 | [EM28174_BOARD_PCTV_460E] = { |
Mauro Carvalho Chehab | 3aa2b3b | 2013-03-05 06:55:27 -0300 | [diff] [blame] | 2182 | .def_i2c_bus = 1, |
| 2183 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | EM28XX_I2C_FREQ_400_KHZ, |
Antti Palosaari | 3658871 | 2011-08-01 01:15:30 -0300 | [diff] [blame] | 2184 | .name = "PCTV DVB-S2 Stick (460e)", |
| 2185 | .tuner_type = TUNER_ABSENT, |
| 2186 | .tuner_gpio = pctv_460e, |
| 2187 | .has_dvb = 1, |
| 2188 | .ir_codes = RC_MAP_PINNACLE_PCTV_HD, |
| 2189 | }, |
Gareth Williams | 4d28d3d | 2011-12-24 05:47:29 -0300 | [diff] [blame] | 2190 | /* eb1a:5006 Honestech VIDBOX NW03 |
| 2191 | * Empia EM2860, Philips SAA7113, Empia EMP202, No Tuner */ |
| 2192 | [EM2860_BOARD_HT_VIDBOX_NW03] = { |
| 2193 | .name = "Honestech Vidbox NW03", |
| 2194 | .tuner_type = TUNER_ABSENT, |
| 2195 | .decoder = EM28XX_SAA711X, |
| 2196 | .input = { { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 2197 | .type = EM28XX_VMUX_COMPOSITE, |
Gareth Williams | 4d28d3d | 2011-12-24 05:47:29 -0300 | [diff] [blame] | 2198 | .vmux = SAA7115_COMPOSITE0, |
| 2199 | .amux = EM28XX_AMUX_LINE_IN, |
| 2200 | }, { |
| 2201 | .type = EM28XX_VMUX_SVIDEO, |
| 2202 | .vmux = SAA7115_SVIDEO3, /* S-VIDEO needs confirming */ |
| 2203 | .amux = EM28XX_AMUX_LINE_IN, |
| 2204 | } }, |
| 2205 | }, |
Antti Palosaari | 3553085 | 2012-03-18 18:09:01 -0300 | [diff] [blame] | 2206 | /* 1b80:e425 MaxMedia UB425-TC |
| 2207 | * Empia EM2874B + Micronas DRX 3913KA2 + NXP TDA18271HDC2 */ |
| 2208 | [EM2874_BOARD_MAXMEDIA_UB425_TC] = { |
| 2209 | .name = "MaxMedia UB425-TC", |
| 2210 | .tuner_type = TUNER_ABSENT, |
| 2211 | .tuner_gpio = maxmedia_ub425_tc, |
| 2212 | .has_dvb = 1, |
Antti Palosaari | 831378d | 2013-04-12 13:59:03 -0300 | [diff] [blame] | 2213 | .ir_codes = RC_MAP_REDDO, |
Mauro Carvalho Chehab | 3aa2b3b | 2013-03-05 06:55:27 -0300 | [diff] [blame] | 2214 | .def_i2c_bus = 1, |
| 2215 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | |
Antti Palosaari | 3553085 | 2012-03-18 18:09:01 -0300 | [diff] [blame] | 2216 | EM28XX_I2C_FREQ_400_KHZ, |
| 2217 | }, |
Ivan Kalvachev | fa5527c | 2012-03-19 20:09:55 -0300 | [diff] [blame] | 2218 | /* 2304:0242 PCTV QuatroStick (510e) |
| 2219 | * Empia EM2884 + Micronas DRX 3926K + NXP TDA18271HDC2 */ |
| 2220 | [EM2884_BOARD_PCTV_510E] = { |
| 2221 | .name = "PCTV QuatroStick (510e)", |
| 2222 | .tuner_type = TUNER_ABSENT, |
| 2223 | .tuner_gpio = pctv_510e, |
| 2224 | .has_dvb = 1, |
| 2225 | .ir_codes = RC_MAP_PINNACLE_PCTV_HD, |
Mauro Carvalho Chehab | 3aa2b3b | 2013-03-05 06:55:27 -0300 | [diff] [blame] | 2226 | .def_i2c_bus = 1, |
| 2227 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | |
Ivan Kalvachev | fa5527c | 2012-03-19 20:09:55 -0300 | [diff] [blame] | 2228 | EM28XX_I2C_FREQ_400_KHZ, |
| 2229 | }, |
Antti Palosaari | c247d7b | 2012-03-19 11:48:19 -0300 | [diff] [blame] | 2230 | /* 2013:0251 PCTV QuatroStick nano (520e) |
| 2231 | * Empia EM2884 + Micronas DRX 3926K + NXP TDA18271HDC2 */ |
| 2232 | [EM2884_BOARD_PCTV_520E] = { |
| 2233 | .name = "PCTV QuatroStick nano (520e)", |
| 2234 | .tuner_type = TUNER_ABSENT, |
| 2235 | .tuner_gpio = pctv_520e, |
| 2236 | .has_dvb = 1, |
| 2237 | .ir_codes = RC_MAP_PINNACLE_PCTV_HD, |
Mauro Carvalho Chehab | 3aa2b3b | 2013-03-05 06:55:27 -0300 | [diff] [blame] | 2238 | .def_i2c_bus = 1, |
| 2239 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | |
Antti Palosaari | c247d7b | 2012-03-19 11:48:19 -0300 | [diff] [blame] | 2240 | EM28XX_I2C_FREQ_400_KHZ, |
| 2241 | }, |
Martin Blumenstingl | 8904013 | 2012-10-04 14:22:54 -0300 | [diff] [blame] | 2242 | [EM2884_BOARD_TERRATEC_HTC_USB_XS] = { |
| 2243 | .name = "Terratec Cinergy HTC USB XS", |
| 2244 | .has_dvb = 1, |
| 2245 | .ir_codes = RC_MAP_NEC_TERRATEC_CINERGY_XS, |
| 2246 | .tuner_type = TUNER_ABSENT, |
Mauro Carvalho Chehab | 3aa2b3b | 2013-03-05 06:55:27 -0300 | [diff] [blame] | 2247 | .def_i2c_bus = 1, |
| 2248 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | |
Martin Blumenstingl | 8904013 | 2012-10-04 14:22:54 -0300 | [diff] [blame] | 2249 | EM28XX_I2C_FREQ_400_KHZ, |
| 2250 | }, |
Jakob Haufe | 7c1dfdb | 2013-04-13 11:03:37 -0300 | [diff] [blame] | 2251 | /* 1b80:e1cc Delock 61959 |
| 2252 | * Empia EM2874B + Micronas DRX 3913KA2 + NXP TDA18271HDC2 |
Mauro Carvalho Chehab | ce67943 | 2013-12-22 13:13:41 -0300 | [diff] [blame] | 2253 | * mostly the same as MaxMedia UB-425-TC but different remote */ |
Jakob Haufe | 7c1dfdb | 2013-04-13 11:03:37 -0300 | [diff] [blame] | 2254 | [EM2874_BOARD_DELOCK_61959] = { |
| 2255 | .name = "Delock 61959", |
| 2256 | .tuner_type = TUNER_ABSENT, |
| 2257 | .tuner_gpio = maxmedia_ub425_tc, |
| 2258 | .has_dvb = 1, |
| 2259 | .ir_codes = RC_MAP_DELOCK_61959, |
| 2260 | .def_i2c_bus = 1, |
| 2261 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | |
| 2262 | EM28XX_I2C_FREQ_400_KHZ, |
| 2263 | }, |
Jean-Francois Thibert | 6dbea9f | 2013-10-09 11:18:05 -0300 | [diff] [blame] | 2264 | /* |
| 2265 | * 1b80:e346 KWorld USB ATSC TV Stick UB435-Q V2 |
| 2266 | * Empia EM2874B + LG DT3305 + NXP TDA18271HDC2 |
| 2267 | */ |
| 2268 | [EM2874_BOARD_KWORLD_UB435Q_V2] = { |
| 2269 | .name = "KWorld USB ATSC TV Stick UB435-Q V2", |
| 2270 | .tuner_type = TUNER_ABSENT, |
| 2271 | .has_dvb = 1, |
| 2272 | .dvb_gpio = kworld_a340_digital, |
| 2273 | .tuner_gpio = default_tuner_gpio, |
| 2274 | .def_i2c_bus = 1, |
| 2275 | }, |
Mauro Carvalho Chehab | 02bc1f5 | 2014-03-03 16:28:39 -0300 | [diff] [blame] | 2276 | /* |
| 2277 | * 1b80:e34c KWorld USB ATSC TV Stick UB435-Q V3 |
| 2278 | * Empia EM2874B + LG DT3305 + NXP TDA18271HDC2 |
| 2279 | */ |
| 2280 | [EM2874_BOARD_KWORLD_UB435Q_V3] = { |
| 2281 | .name = "KWorld USB ATSC TV Stick UB435-Q V3", |
| 2282 | .tuner_type = TUNER_ABSENT, |
| 2283 | .has_dvb = 1, |
| 2284 | .tuner_gpio = kworld_ub435q_v3_digital, |
| 2285 | .def_i2c_bus = 1, |
| 2286 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | |
| 2287 | EM28XX_I2C_FREQ_100_KHZ, |
Mauro Carvalho Chehab | 59432be | 2014-03-04 12:34:34 -0300 | [diff] [blame] | 2288 | .leds = kworld_ub435q_v3_leds, |
Mauro Carvalho Chehab | 02bc1f5 | 2014-03-03 16:28:39 -0300 | [diff] [blame] | 2289 | }, |
Devin Heitmueller | 38b2df9 | 2012-08-13 21:18:02 -0300 | [diff] [blame] | 2290 | [EM2874_BOARD_PCTV_HD_MINI_80E] = { |
| 2291 | .name = "Pinnacle PCTV HD Mini", |
| 2292 | .tuner_type = TUNER_ABSENT, |
| 2293 | .has_dvb = 1, |
| 2294 | .dvb_gpio = em2874_pctv_80e_digital, |
| 2295 | .decoder = EM28XX_NODECODER, |
Mauro Carvalho Chehab | 959505b | 2014-01-19 07:15:11 -0300 | [diff] [blame] | 2296 | .ir_codes = RC_MAP_PINNACLE_PCTV_HD, |
Mauro Carvalho Chehab | 88e4fcd | 2014-03-04 20:49:07 -0300 | [diff] [blame] | 2297 | .leds = pctv_80e_leds, |
Devin Heitmueller | 38b2df9 | 2012-08-13 21:18:02 -0300 | [diff] [blame] | 2298 | }, |
Frank Schaefer | 0c37e73 | 2013-12-01 18:06:57 -0300 | [diff] [blame] | 2299 | /* 1ae7:9003/9004 SpeedLink Vicious And Devine Laplace webcam |
| 2300 | * Empia EM2765 + OmniVision OV2640 */ |
| 2301 | [EM2765_BOARD_SPEEDLINK_VAD_LAPLACE] = { |
| 2302 | .name = "SpeedLink Vicious And Devine Laplace webcam", |
| 2303 | .xclk = EM28XX_XCLK_FREQUENCY_24MHZ, |
| 2304 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | |
| 2305 | EM28XX_I2C_FREQ_100_KHZ, |
| 2306 | .def_i2c_bus = 1, |
| 2307 | .tuner_type = TUNER_ABSENT, |
| 2308 | .is_webcam = 1, |
| 2309 | .input = { { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 2310 | .type = EM28XX_VMUX_COMPOSITE, |
Frank Schaefer | 0c37e73 | 2013-12-01 18:06:57 -0300 | [diff] [blame] | 2311 | .amux = EM28XX_AMUX_VIDEO, |
| 2312 | .gpio = speedlink_vad_laplace_reg_seq, |
| 2313 | } }, |
| 2314 | .buttons = speedlink_vad_laplace_buttons, |
| 2315 | .leds = speedlink_vad_laplace_leds, |
| 2316 | }, |
Antti Palosaari | ec57336 | 2013-02-25 09:01:13 -0300 | [diff] [blame] | 2317 | /* 2013:0258 PCTV DVB-S2 Stick (461e) |
| 2318 | * Empia EM28178, Montage M88DS3103, Montage M88TS2022, Allegro A8293 */ |
| 2319 | [EM28178_BOARD_PCTV_461E] = { |
| 2320 | .def_i2c_bus = 1, |
| 2321 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | EM28XX_I2C_FREQ_400_KHZ, |
| 2322 | .name = "PCTV DVB-S2 Stick (461e)", |
| 2323 | .tuner_type = TUNER_ABSENT, |
| 2324 | .tuner_gpio = pctv_461e, |
| 2325 | .has_dvb = 1, |
| 2326 | .ir_codes = RC_MAP_PINNACLE_PCTV_HD, |
| 2327 | }, |
Antti Palosaari | 1922924 | 2014-04-10 22:11:27 -0300 | [diff] [blame] | 2328 | /* 2013:025f PCTV tripleStick (292e). |
| 2329 | * Empia EM28178, Silicon Labs Si2168, Silicon Labs Si2157 */ |
| 2330 | [EM28178_BOARD_PCTV_292E] = { |
| 2331 | .name = "PCTV tripleStick (292e)", |
| 2332 | .def_i2c_bus = 1, |
| 2333 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | EM28XX_I2C_FREQ_400_KHZ, |
| 2334 | .tuner_type = TUNER_ABSENT, |
| 2335 | .tuner_gpio = pctv_292e, |
| 2336 | .has_dvb = 1, |
| 2337 | .ir_codes = RC_MAP_PINNACLE_PCTV_HD, |
| 2338 | }, |
Witold Krecicki | eace972 | 2014-10-19 19:25:59 -0300 | [diff] [blame] | 2339 | [EM2861_BOARD_LEADTEK_VC100] = { |
| 2340 | .name = "Leadtek VC100", |
| 2341 | .tuner_type = TUNER_ABSENT, /* Capture only device */ |
| 2342 | .decoder = EM28XX_TVP5150, |
| 2343 | .input = { { |
Mauro Carvalho Chehab | d83a96a | 2016-01-27 09:24:29 -0200 | [diff] [blame] | 2344 | .type = EM28XX_VMUX_COMPOSITE, |
Witold Krecicki | eace972 | 2014-10-19 19:25:59 -0300 | [diff] [blame] | 2345 | .vmux = TVP5150_COMPOSITE1, |
| 2346 | .amux = EM28XX_AMUX_LINE_IN, |
| 2347 | }, { |
| 2348 | .type = EM28XX_VMUX_SVIDEO, |
| 2349 | .vmux = TVP5150_SVIDEO, |
| 2350 | .amux = EM28XX_AMUX_LINE_IN, |
| 2351 | } }, |
| 2352 | }, |
Olli Salonen | fc30dd76 | 2014-11-24 03:57:34 -0300 | [diff] [blame] | 2353 | /* eb1a:8179 Terratec Cinergy T2 Stick HD. |
| 2354 | * Empia EM28178, Silicon Labs Si2168, Silicon Labs Si2146 */ |
| 2355 | [EM28178_BOARD_TERRATEC_T2_STICK_HD] = { |
| 2356 | .name = "Terratec Cinergy T2 Stick HD", |
| 2357 | .def_i2c_bus = 1, |
| 2358 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | EM28XX_I2C_FREQ_400_KHZ, |
| 2359 | .tuner_type = TUNER_ABSENT, |
| 2360 | .tuner_gpio = terratec_t2_stick_hd, |
| 2361 | .has_dvb = 1, |
| 2362 | .ir_codes = RC_MAP_TERRATEC_SLIM_2, |
| 2363 | }, |
Satoshi Nagahama | ab4d145 | 2016-05-06 16:35:05 -0300 | [diff] [blame] | 2364 | |
| 2365 | /* |
| 2366 | * 3275:0085 PLEX PX-BCUD. |
| 2367 | * Empia EM28178, TOSHIBA TC90532XBG, Sharp QM1D1C0042 |
| 2368 | */ |
| 2369 | [EM28178_BOARD_PLEX_PX_BCUD] = { |
| 2370 | .name = "PLEX PX-BCUD", |
| 2371 | .xclk = EM28XX_XCLK_FREQUENCY_4_3MHZ, |
| 2372 | .def_i2c_bus = 1, |
| 2373 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE, |
| 2374 | .tuner_type = TUNER_ABSENT, |
| 2375 | .tuner_gpio = plex_px_bcud, |
| 2376 | .has_dvb = 1, |
| 2377 | }, |
Olli Salonen | 11a2a94 | 2016-04-04 12:12:52 -0300 | [diff] [blame] | 2378 | /* |
| 2379 | * 2040:0265 Hauppauge WinTV-dualHD (DVB version). |
| 2380 | * Empia EM28274, 2x Silicon Labs Si2168, 2x Silicon Labs Si2157 |
| 2381 | */ |
| 2382 | [EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB] = { |
| 2383 | .name = "Hauppauge WinTV-dualHD DVB", |
| 2384 | .def_i2c_bus = 1, |
| 2385 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | |
| 2386 | EM28XX_I2C_FREQ_400_KHZ, |
| 2387 | .tuner_type = TUNER_ABSENT, |
| 2388 | .tuner_gpio = hauppauge_dualhd_dvb, |
| 2389 | .has_dvb = 1, |
| 2390 | .ir_codes = RC_MAP_HAUPPAUGE, |
| 2391 | .leds = hauppauge_dualhd_leds, |
| 2392 | }, |
Kevin Cheng | 1586342 | 2017-01-10 01:14:29 -0200 | [diff] [blame] | 2393 | /* |
| 2394 | * 2040:026d Hauppauge WinTV-dualHD (model 01595 - ATSC/QAM). |
| 2395 | * Empia EM28274, 2x LG LGDT3306A, 2x Silicon Labs Si2157 |
| 2396 | */ |
| 2397 | [EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_01595] = { |
| 2398 | .name = "Hauppauge WinTV-dualHD 01595 ATSC/QAM", |
| 2399 | .def_i2c_bus = 1, |
| 2400 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | |
| 2401 | EM28XX_I2C_FREQ_400_KHZ, |
| 2402 | .tuner_type = TUNER_ABSENT, |
| 2403 | .tuner_gpio = hauppauge_dualhd_dvb, |
| 2404 | .has_dvb = 1, |
| 2405 | .ir_codes = RC_MAP_HAUPPAUGE, |
| 2406 | .leds = hauppauge_dualhd_leds, |
| 2407 | }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 2408 | }; |
Mauro Carvalho Chehab | 01c2819 | 2013-12-22 13:27:02 -0300 | [diff] [blame] | 2409 | EXPORT_SYMBOL_GPL(em28xx_boards); |
| 2410 | |
Hans Verkuil | 4a9e512 | 2014-08-21 16:43:03 -0300 | [diff] [blame] | 2411 | static const unsigned int em28xx_bcount = ARRAY_SIZE(em28xx_boards); |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 2412 | |
| 2413 | /* table of devices that work with this driver */ |
Nicola Soranzo | a1a6ee7 | 2009-02-10 23:28:24 -0300 | [diff] [blame] | 2414 | struct usb_device_id em28xx_id_table[] = { |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 2415 | { USB_DEVICE(0xeb1a, 0x2750), |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2416 | .driver_info = EM2750_BOARD_UNKNOWN }, |
| 2417 | { USB_DEVICE(0xeb1a, 0x2751), |
| 2418 | .driver_info = EM2750_BOARD_UNKNOWN }, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 2419 | { USB_DEVICE(0xeb1a, 0x2800), |
| 2420 | .driver_info = EM2800_BOARD_UNKNOWN }, |
Mauro Carvalho Chehab | 9b4e845 | 2009-08-07 12:08:02 -0300 | [diff] [blame] | 2421 | { USB_DEVICE(0xeb1a, 0x2710), |
| 2422 | .driver_info = EM2820_BOARD_UNKNOWN }, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 2423 | { USB_DEVICE(0xeb1a, 0x2820), |
| 2424 | .driver_info = EM2820_BOARD_UNKNOWN }, |
| 2425 | { USB_DEVICE(0xeb1a, 0x2821), |
Devin Heitmueller | c665f4d | 2008-12-16 23:35:23 -0300 | [diff] [blame] | 2426 | .driver_info = EM2820_BOARD_UNKNOWN }, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 2427 | { USB_DEVICE(0xeb1a, 0x2860), |
| 2428 | .driver_info = EM2820_BOARD_UNKNOWN }, |
| 2429 | { USB_DEVICE(0xeb1a, 0x2861), |
| 2430 | .driver_info = EM2820_BOARD_UNKNOWN }, |
Devin Heitmueller | f91cb65 | 2009-09-30 22:44:19 -0300 | [diff] [blame] | 2431 | { USB_DEVICE(0xeb1a, 0x2862), |
| 2432 | .driver_info = EM2820_BOARD_UNKNOWN }, |
Devin Heitmueller | 443fed9 | 2010-03-19 23:53:12 -0300 | [diff] [blame] | 2433 | { USB_DEVICE(0xeb1a, 0x2863), |
| 2434 | .driver_info = EM2820_BOARD_UNKNOWN }, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 2435 | { USB_DEVICE(0xeb1a, 0x2870), |
| 2436 | .driver_info = EM2820_BOARD_UNKNOWN }, |
| 2437 | { USB_DEVICE(0xeb1a, 0x2881), |
| 2438 | .driver_info = EM2820_BOARD_UNKNOWN }, |
| 2439 | { USB_DEVICE(0xeb1a, 0x2883), |
| 2440 | .driver_info = EM2820_BOARD_UNKNOWN }, |
Antti Palosaari | 285eb1a | 2009-09-15 14:42:13 -0300 | [diff] [blame] | 2441 | { USB_DEVICE(0xeb1a, 0x2868), |
| 2442 | .driver_info = EM2820_BOARD_UNKNOWN }, |
Mauro Carvalho Chehab | ca3dfd6 | 2010-09-10 17:29:14 -0300 | [diff] [blame] | 2443 | { USB_DEVICE(0xeb1a, 0x2875), |
| 2444 | .driver_info = EM2820_BOARD_UNKNOWN }, |
Hans Verkuil | e22eca7 | 2014-05-27 04:12:19 -0300 | [diff] [blame] | 2445 | { USB_DEVICE(0xeb1a, 0x2885), /* MSI Digivox Trio */ |
| 2446 | .driver_info = EM2884_BOARD_TERRATEC_H5 }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2447 | { USB_DEVICE(0xeb1a, 0xe300), |
| 2448 | .driver_info = EM2861_BOARD_KWORLD_PVRTV_300U }, |
Mauro Carvalho Chehab | 0bf4f6c | 2009-02-11 14:13:20 -0300 | [diff] [blame] | 2449 | { USB_DEVICE(0xeb1a, 0xe303), |
| 2450 | .driver_info = EM2860_BOARD_KAIOMY_TVNPC_U2 }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2451 | { USB_DEVICE(0xeb1a, 0xe305), |
| 2452 | .driver_info = EM2880_BOARD_KWORLD_DVB_305U }, |
| 2453 | { USB_DEVICE(0xeb1a, 0xe310), |
| 2454 | .driver_info = EM2880_BOARD_MSI_DIGIVOX_AD }, |
Franklin Meng | d7de5d8 | 2009-06-06 17:05:02 -0300 | [diff] [blame] | 2455 | { USB_DEVICE(0xeb1a, 0xa313), |
| 2456 | .driver_info = EM2882_BOARD_KWORLD_ATSC_315U }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2457 | { USB_DEVICE(0xeb1a, 0xa316), |
Robert Krakora | 6e7b9ea | 2009-01-18 21:59:34 -0300 | [diff] [blame] | 2458 | .driver_info = EM2883_BOARD_KWORLD_HYBRID_330U }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2459 | { USB_DEVICE(0xeb1a, 0xe320), |
| 2460 | .driver_info = EM2880_BOARD_MSI_DIGIVOX_AD_II }, |
| 2461 | { USB_DEVICE(0xeb1a, 0xe323), |
| 2462 | .driver_info = EM2882_BOARD_KWORLD_VS_DVBT }, |
| 2463 | { USB_DEVICE(0xeb1a, 0xe350), |
| 2464 | .driver_info = EM2870_BOARD_KWORLD_350U }, |
| 2465 | { USB_DEVICE(0xeb1a, 0xe355), |
| 2466 | .driver_info = EM2870_BOARD_KWORLD_355U }, |
| 2467 | { USB_DEVICE(0xeb1a, 0x2801), |
| 2468 | .driver_info = EM2800_BOARD_GRABBEEX_USB2800 }, |
| 2469 | { USB_DEVICE(0xeb1a, 0xe357), |
| 2470 | .driver_info = EM2870_BOARD_KWORLD_355U }, |
Aivar Päkk | 1985f6f | 2011-12-11 18:15:00 -0300 | [diff] [blame] | 2471 | { USB_DEVICE(0xeb1a, 0xe359), |
| 2472 | .driver_info = EM2870_BOARD_KWORLD_355U }, |
Douglas Schilling Landgraf | ac40d9e | 2009-02-25 16:55:48 -0300 | [diff] [blame] | 2473 | { USB_DEVICE(0x1b80, 0xe302), |
| 2474 | .driver_info = EM2820_BOARD_PINNACLE_DVC_90 }, /* Kaiser Baas Video to DVD maker */ |
Douglas Schilling Landgraf | ea47689 | 2009-09-06 18:41:59 -0300 | [diff] [blame] | 2475 | { USB_DEVICE(0x1b80, 0xe304), |
| 2476 | .driver_info = EM2820_BOARD_PINNACLE_DVC_90 }, /* Kworld DVD Maker 2 */ |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 2477 | { USB_DEVICE(0x0ccd, 0x0036), |
| 2478 | .driver_info = EM2820_BOARD_TERRATEC_CINERGY_250 }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2479 | { USB_DEVICE(0x0ccd, 0x004c), |
| 2480 | .driver_info = EM2880_BOARD_TERRATEC_HYBRID_XS_FR }, |
| 2481 | { USB_DEVICE(0x0ccd, 0x004f), |
| 2482 | .driver_info = EM2860_BOARD_TERRATEC_HYBRID_XS }, |
| 2483 | { USB_DEVICE(0x0ccd, 0x005e), |
| 2484 | .driver_info = EM2882_BOARD_TERRATEC_HYBRID_XS }, |
| 2485 | { USB_DEVICE(0x0ccd, 0x0042), |
Philippe Bourdin | 9124544 | 2010-10-31 09:57:58 -0300 | [diff] [blame] | 2486 | .driver_info = EM2882_BOARD_TERRATEC_HYBRID_XS }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2487 | { USB_DEVICE(0x0ccd, 0x0043), |
Alberto Mardegan | 8c47311 | 2015-10-27 17:24:14 -0200 | [diff] [blame] | 2488 | .driver_info = EM2870_BOARD_TERRATEC_XS_MT2060 }, |
Holger Nelson | 6c3b906 | 2011-12-23 23:15:32 -0300 | [diff] [blame] | 2489 | { USB_DEVICE(0x0ccd, 0x008e), /* Cinergy HTC USB XS Rev. 1 */ |
Martin Blumenstingl | 8904013 | 2012-10-04 14:22:54 -0300 | [diff] [blame] | 2490 | .driver_info = EM2884_BOARD_TERRATEC_HTC_USB_XS }, |
Holger Nelson | 6c3b906 | 2011-12-23 23:15:32 -0300 | [diff] [blame] | 2491 | { USB_DEVICE(0x0ccd, 0x00ac), /* Cinergy HTC USB XS Rev. 2 */ |
Martin Blumenstingl | 8904013 | 2012-10-04 14:22:54 -0300 | [diff] [blame] | 2492 | .driver_info = EM2884_BOARD_TERRATEC_HTC_USB_XS }, |
Mauro Carvalho Chehab | 4e14534 | 2011-11-16 14:38:28 -0200 | [diff] [blame] | 2493 | { USB_DEVICE(0x0ccd, 0x10a2), /* H5 Rev. 1 */ |
Mauro Carvalho Chehab | fec528b | 2011-07-03 21:05:06 -0300 | [diff] [blame] | 2494 | .driver_info = EM2884_BOARD_TERRATEC_H5 }, |
Mauro Carvalho Chehab | 4e14534 | 2011-11-16 14:38:28 -0200 | [diff] [blame] | 2495 | { USB_DEVICE(0x0ccd, 0x10ad), /* H5 Rev. 2 */ |
Mauro Carvalho Chehab | 33ba28e | 2011-07-14 21:48:00 -0300 | [diff] [blame] | 2496 | .driver_info = EM2884_BOARD_TERRATEC_H5 }, |
Roland Scheidegger | 676fa7d | 2013-02-08 21:08:55 -0300 | [diff] [blame] | 2497 | { USB_DEVICE(0x0ccd, 0x10b6), /* H5 Rev. 3 */ |
| 2498 | .driver_info = EM2884_BOARD_TERRATEC_H5 }, |
Mauro Carvalho Chehab | 766ed64 | 2009-05-24 00:46:01 -0300 | [diff] [blame] | 2499 | { USB_DEVICE(0x0ccd, 0x0084), |
| 2500 | .driver_info = EM2860_BOARD_TERRATEC_AV350 }, |
Mauro Carvalho Chehab | 4557af9 | 2009-05-23 09:58:52 -0300 | [diff] [blame] | 2501 | { USB_DEVICE(0x0ccd, 0x0096), |
| 2502 | .driver_info = EM2860_BOARD_TERRATEC_GRABBY }, |
Teka | efabaaf | 2011-10-14 05:40:29 -0300 | [diff] [blame] | 2503 | { USB_DEVICE(0x0ccd, 0x10AF), |
| 2504 | .driver_info = EM2860_BOARD_TERRATEC_GRABBY }, |
Andreas Oberritter | a1ed02e | 2011-11-16 11:06:50 -0300 | [diff] [blame] | 2505 | { USB_DEVICE(0x0ccd, 0x00b2), |
| 2506 | .driver_info = EM2884_BOARD_CINERGY_HTC_STICK }, |
Gilles Risch | 1fe0fbd | 2015-03-01 17:11:05 -0300 | [diff] [blame] | 2507 | { USB_DEVICE(0x0fd9, 0x0018), |
| 2508 | .driver_info = EM2884_BOARD_ELGATO_EYETV_HYBRID_2008 }, |
Adrian Taylor | 8298f2f | 2010-10-20 07:55:33 -0300 | [diff] [blame] | 2509 | { USB_DEVICE(0x0fd9, 0x0033), |
Gilles Risch | 1fe0fbd | 2015-03-01 17:11:05 -0300 | [diff] [blame] | 2510 | .driver_info = EM2860_BOARD_ELGATO_VIDEO_CAPTURE }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2511 | { USB_DEVICE(0x185b, 0x2870), |
| 2512 | .driver_info = EM2870_BOARD_COMPRO_VIDEOMATE }, |
Vitaly Wool | d360334 | 2008-07-27 14:10:11 -0300 | [diff] [blame] | 2513 | { USB_DEVICE(0x185b, 0x2041), |
Mauro Carvalho Chehab | ee281b8 | 2008-07-27 16:58:04 -0300 | [diff] [blame] | 2514 | .driver_info = EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU }, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 2515 | { USB_DEVICE(0x2040, 0x4200), |
| 2516 | .driver_info = EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 }, |
Mauro Carvalho Chehab | 15b9bec | 2008-01-13 12:02:20 -0300 | [diff] [blame] | 2517 | { USB_DEVICE(0x2040, 0x4201), |
| 2518 | .driver_info = EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 }, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 2519 | { USB_DEVICE(0x2040, 0x6500), |
| 2520 | .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900 }, |
Luc Saillard | 427d20c | 2008-01-30 17:23:00 -0300 | [diff] [blame] | 2521 | { USB_DEVICE(0x2040, 0x6502), |
Devin Heitmueller | 17d9d55 | 2008-06-08 10:22:03 -0300 | [diff] [blame] | 2522 | .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2 }, |
Michael Krufky | 74ee051 | 2008-05-01 18:02:30 -0300 | [diff] [blame] | 2523 | { USB_DEVICE(0x2040, 0x6513), /* HCW HVR-980 */ |
Mauro Carvalho Chehab | 10ac660 | 2008-07-27 14:58:58 -0300 | [diff] [blame] | 2524 | .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 }, |
Michael Krufky | 74ee051 | 2008-05-01 18:02:30 -0300 | [diff] [blame] | 2525 | { USB_DEVICE(0x2040, 0x6517), /* HP HVR-950 */ |
Mauro Carvalho Chehab | 10ac660 | 2008-07-27 14:58:58 -0300 | [diff] [blame] | 2526 | .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 }, |
Michael Krufky | 74ee051 | 2008-05-01 18:02:30 -0300 | [diff] [blame] | 2527 | { USB_DEVICE(0x2040, 0x651b), /* RP HVR-950 */ |
Mauro Carvalho Chehab | 10ac660 | 2008-07-27 14:58:58 -0300 | [diff] [blame] | 2528 | .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 }, |
Douglas Schilling Landgraf | f89bc32 | 2008-12-01 21:01:04 -0300 | [diff] [blame] | 2529 | { USB_DEVICE(0x2040, 0x651f), |
| 2530 | .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850 }, |
Olli Salonen | 11a2a94 | 2016-04-04 12:12:52 -0300 | [diff] [blame] | 2531 | { USB_DEVICE(0x2040, 0x0265), |
| 2532 | .driver_info = EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB }, |
Kevin Cheng | 1586342 | 2017-01-10 01:14:29 -0200 | [diff] [blame] | 2533 | { USB_DEVICE(0x2040, 0x026d), |
| 2534 | .driver_info = EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_01595 }, |
Devin Heitmueller | e14b365 | 2008-07-26 11:04:33 -0300 | [diff] [blame] | 2535 | { USB_DEVICE(0x0438, 0xb002), |
| 2536 | .driver_info = EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600 }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2537 | { USB_DEVICE(0x2001, 0xf112), |
| 2538 | .driver_info = EM2820_BOARD_DLINK_USB_TV }, |
| 2539 | { USB_DEVICE(0x2304, 0x0207), |
| 2540 | .driver_info = EM2820_BOARD_PINNACLE_DVC_90 }, |
| 2541 | { USB_DEVICE(0x2304, 0x0208), |
| 2542 | .driver_info = EM2820_BOARD_PINNACLE_USB_2 }, |
| 2543 | { USB_DEVICE(0x2304, 0x021a), |
| 2544 | .driver_info = EM2820_BOARD_PINNACLE_DVC_90 }, |
| 2545 | { USB_DEVICE(0x2304, 0x0226), |
Devin Heitmueller | 09bc194 | 2011-03-13 02:07:54 -0300 | [diff] [blame] | 2546 | .driver_info = EM2882_BOARD_PINNACLE_HYBRID_PRO_330E }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2547 | { USB_DEVICE(0x2304, 0x0227), |
| 2548 | .driver_info = EM2880_BOARD_PINNACLE_PCTV_HD_PRO }, |
Devin Heitmueller | 38b2df9 | 2012-08-13 21:18:02 -0300 | [diff] [blame] | 2549 | { USB_DEVICE(0x2304, 0x023f), |
| 2550 | .driver_info = EM2874_BOARD_PCTV_HD_MINI_80E }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2551 | { USB_DEVICE(0x0413, 0x6023), |
| 2552 | .driver_info = EM2800_BOARD_LEADTEK_WINFAST_USBII }, |
Don Kramer | 74e07f3 | 2012-01-02 16:15:44 -0300 | [diff] [blame] | 2553 | { USB_DEVICE(0x093b, 0xa003), |
| 2554 | .driver_info = EM2820_BOARD_PINNACLE_DVC_90 }, |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2555 | { USB_DEVICE(0x093b, 0xa005), |
| 2556 | .driver_info = EM2861_BOARD_PLEXTOR_PX_TV100U }, |
Indika Katugampala | f74a61e3 | 2009-02-11 11:13:05 -0300 | [diff] [blame] | 2557 | { USB_DEVICE(0x04bb, 0x0515), |
| 2558 | .driver_info = EM2820_BOARD_IODATA_GVMVP_SZ }, |
Zhenyu Wang | 7c8b567 | 2009-07-05 10:51:21 -0300 | [diff] [blame] | 2559 | { USB_DEVICE(0xeb1a, 0x50a6), |
| 2560 | .driver_info = EM2860_BOARD_GADMEI_UTV330 }, |
Jarod Wilson | 7e48b30 | 2010-03-07 17:55:43 -0300 | [diff] [blame] | 2561 | { USB_DEVICE(0x1b80, 0xa340), |
| 2562 | .driver_info = EM2870_BOARD_KWORLD_A340 }, |
Jean-Francois Thibert | 6dbea9f | 2013-10-09 11:18:05 -0300 | [diff] [blame] | 2563 | { USB_DEVICE(0x1b80, 0xe346), |
| 2564 | .driver_info = EM2874_BOARD_KWORLD_UB435Q_V2 }, |
Mauro Carvalho Chehab | 02bc1f5 | 2014-03-03 16:28:39 -0300 | [diff] [blame] | 2565 | { USB_DEVICE(0x1b80, 0xe34c), |
| 2566 | .driver_info = EM2874_BOARD_KWORLD_UB435Q_V3 }, |
Antti Palosaari | d6a5f92 | 2011-04-07 16:34:44 -0300 | [diff] [blame] | 2567 | { USB_DEVICE(0x2013, 0x024f), |
| 2568 | .driver_info = EM28174_BOARD_PCTV_290E }, |
Antti Palosaari | 3658871 | 2011-08-01 01:15:30 -0300 | [diff] [blame] | 2569 | { USB_DEVICE(0x2013, 0x024c), |
| 2570 | .driver_info = EM28174_BOARD_PCTV_460E }, |
Eddi De Pieri | 82e7dbb | 2011-11-19 11:37:14 -0300 | [diff] [blame] | 2571 | { USB_DEVICE(0x2040, 0x1605), |
| 2572 | .driver_info = EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C }, |
Mauro Carvalho Chehab | 4159d01 | 2013-02-28 10:35:56 -0300 | [diff] [blame] | 2573 | { USB_DEVICE(0x1b80, 0xe755), |
| 2574 | .driver_info = EM2884_BOARD_C3TECH_DIGITAL_DUO }, |
Gareth Williams | 4d28d3d | 2011-12-24 05:47:29 -0300 | [diff] [blame] | 2575 | { USB_DEVICE(0xeb1a, 0x5006), |
| 2576 | .driver_info = EM2860_BOARD_HT_VIDBOX_NW03 }, |
Mario Ceresa | 2f78604 | 2012-01-06 16:00:12 -0300 | [diff] [blame] | 2577 | { USB_DEVICE(0x1b80, 0xe309), /* Sveon STV40 */ |
| 2578 | .driver_info = EM2860_BOARD_EASYCAP }, |
Antti Palosaari | 3553085 | 2012-03-18 18:09:01 -0300 | [diff] [blame] | 2579 | { USB_DEVICE(0x1b80, 0xe425), |
| 2580 | .driver_info = EM2874_BOARD_MAXMEDIA_UB425_TC }, |
Ivan Kalvachev | fa5527c | 2012-03-19 20:09:55 -0300 | [diff] [blame] | 2581 | { USB_DEVICE(0x2304, 0x0242), |
| 2582 | .driver_info = EM2884_BOARD_PCTV_510E }, |
Antti Palosaari | c247d7b | 2012-03-19 11:48:19 -0300 | [diff] [blame] | 2583 | { USB_DEVICE(0x2013, 0x0251), |
| 2584 | .driver_info = EM2884_BOARD_PCTV_520E }, |
Jakob Haufe | 7c1dfdb | 2013-04-13 11:03:37 -0300 | [diff] [blame] | 2585 | { USB_DEVICE(0x1b80, 0xe1cc), |
| 2586 | .driver_info = EM2874_BOARD_DELOCK_61959 }, |
Frank Schaefer | 0c37e73 | 2013-12-01 18:06:57 -0300 | [diff] [blame] | 2587 | { USB_DEVICE(0x1ae7, 0x9003), |
| 2588 | .driver_info = EM2765_BOARD_SPEEDLINK_VAD_LAPLACE }, |
| 2589 | { USB_DEVICE(0x1ae7, 0x9004), |
| 2590 | .driver_info = EM2765_BOARD_SPEEDLINK_VAD_LAPLACE }, |
Antti Palosaari | ec57336 | 2013-02-25 09:01:13 -0300 | [diff] [blame] | 2591 | { USB_DEVICE(0x2013, 0x0258), |
| 2592 | .driver_info = EM28178_BOARD_PCTV_461E }, |
Antti Palosaari | 1922924 | 2014-04-10 22:11:27 -0300 | [diff] [blame] | 2593 | { USB_DEVICE(0x2013, 0x025f), |
| 2594 | .driver_info = EM28178_BOARD_PCTV_292E }, |
Arno Bauernöppel | 1efc217 | 2015-11-15 19:24:10 -0200 | [diff] [blame] | 2595 | { USB_DEVICE(0x2040, 0x0264), /* Hauppauge WinTV-soloHD */ |
| 2596 | .driver_info = EM28178_BOARD_PCTV_292E }, |
Witold Krecicki | eace972 | 2014-10-19 19:25:59 -0300 | [diff] [blame] | 2597 | { USB_DEVICE(0x0413, 0x6f07), |
| 2598 | .driver_info = EM2861_BOARD_LEADTEK_VC100 }, |
Olli Salonen | fc30dd76 | 2014-11-24 03:57:34 -0300 | [diff] [blame] | 2599 | { USB_DEVICE(0xeb1a, 0x8179), |
| 2600 | .driver_info = EM28178_BOARD_TERRATEC_T2_STICK_HD }, |
Satoshi Nagahama | ab4d145 | 2016-05-06 16:35:05 -0300 | [diff] [blame] | 2601 | { USB_DEVICE(0x3275, 0x0085), |
| 2602 | .driver_info = EM28178_BOARD_PLEX_PX_BCUD }, |
Alexandre-Xavier Labonté-Lamoureux | 1c13f7a | 2017-02-25 05:03:38 -0300 | [diff] [blame] | 2603 | { USB_DEVICE(0xeb1a, 0x5051), /* Ion Video 2 PC MKII / Startech svid2usb23 / Raygo R12-41373 */ |
| 2604 | .driver_info = EM2860_BOARD_TVP5150_REFERENCE_DESIGN }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 2605 | { }, |
| 2606 | }; |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 2607 | MODULE_DEVICE_TABLE(usb, em28xx_id_table); |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 2608 | |
Mauro Carvalho Chehab | 102a0b0 | 2008-04-17 21:40:45 -0300 | [diff] [blame] | 2609 | /* |
Mauro Carvalho Chehab | 102a0b0 | 2008-04-17 21:40:45 -0300 | [diff] [blame] | 2610 | * EEPROM hash table for devices with generic USB IDs |
| 2611 | */ |
Nicola Soranzo | a1a6ee7 | 2009-02-10 23:28:24 -0300 | [diff] [blame] | 2612 | static struct em28xx_hash_table em28xx_eeprom_hash[] = { |
Mauro Carvalho Chehab | ea4fd56 | 2007-11-03 21:21:57 -0300 | [diff] [blame] | 2613 | /* P/N: SA 60002070465 Tuner: TVF7533-MF */ |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 2614 | {0x6ce05a8f, EM2820_BOARD_PROLINK_PLAYTV_USB2, TUNER_YMEC_TVF_5533MF}, |
Douglas Schilling Landgraf | 1e1addd | 2008-12-27 21:38:14 -0300 | [diff] [blame] | 2615 | {0x72cc5a8b, EM2820_BOARD_PROLINK_PLAYTV_BOX4_USB2, TUNER_YMEC_TVF_5533MF}, |
Darron Broad | da3808e | 2008-09-30 02:46:41 -0300 | [diff] [blame] | 2616 | {0x966a0441, EM2880_BOARD_KWORLD_DVB_310U, TUNER_XC2028}, |
Douglas Schilling Landgraf | a35c87c | 2009-08-06 12:52:11 -0300 | [diff] [blame] | 2617 | {0x166a0441, EM2880_BOARD_EMPIRE_DUAL_TV, TUNER_XC2028}, |
Devin Heitmueller | 1985922 | 2009-06-19 00:33:54 -0300 | [diff] [blame] | 2618 | {0xcee44a99, EM2882_BOARD_EVGA_INDTUBE, TUNER_XC2028}, |
Devin Heitmueller | d5b3ba9 | 2009-07-08 21:51:35 -0300 | [diff] [blame] | 2619 | {0xb8846b20, EM2881_BOARD_PINNACLE_HYBRID_PRO, TUNER_XC2028}, |
Antti Palosaari | 285eb1a | 2009-09-15 14:42:13 -0300 | [diff] [blame] | 2620 | {0x63f653bd, EM2870_BOARD_REDDO_DVB_C_USB_BOX, TUNER_ABSENT}, |
Andrea.Amorosi76@gmail.com | 7ca7ef6 | 2010-02-09 17:53:38 -0300 | [diff] [blame] | 2621 | {0x4e913442, EM2882_BOARD_DIKOM_DK300, TUNER_XC2028}, |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2622 | }; |
| 2623 | |
Mauro Carvalho Chehab | d2ba055 | 2007-11-04 08:32:42 -0300 | [diff] [blame] | 2624 | /* I2C devicelist hash table for devices with generic USB IDs */ |
Sascha Sommer | fad7b95 | 2007-11-04 08:06:48 -0300 | [diff] [blame] | 2625 | static struct em28xx_hash_table em28xx_i2c_hash[] = { |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 2626 | {0xb06a32c3, EM2800_BOARD_TERRATEC_CINERGY_200, TUNER_LG_PAL_NEW_TAPC}, |
| 2627 | {0xf51200e3, EM2800_BOARD_VGEAR_POCKETTV, TUNER_LG_PAL_NEW_TAPC}, |
Devin Heitmueller | 3ed58ba | 2009-05-27 23:27:26 -0300 | [diff] [blame] | 2628 | {0x1ba50080, EM2860_BOARD_SAA711X_REFERENCE_DESIGN, TUNER_ABSENT}, |
Devin Heitmueller | 443fed9 | 2010-03-19 23:53:12 -0300 | [diff] [blame] | 2629 | {0x77800080, EM2860_BOARD_TVP5150_REFERENCE_DESIGN, TUNER_ABSENT}, |
Douglas Schilling Landgraf | f7fe3e6 | 2009-01-19 09:31:55 -0300 | [diff] [blame] | 2630 | {0xc51200e3, EM2820_BOARD_GADMEI_TVR200, TUNER_LG_PAL_NEW_TAPC}, |
Mauro Carvalho Chehab | 6d888a6 | 2009-08-30 13:05:56 -0300 | [diff] [blame] | 2631 | {0x4ba50080, EM2861_BOARD_GADMEI_UTV330PLUS, TUNER_TNF_5335MF}, |
Mauro Carvalho Chehab | ebaefdb | 2011-06-01 10:16:25 -0300 | [diff] [blame] | 2632 | {0x6b800080, EM2874_BOARD_LEADERSHIP_ISDBT, TUNER_ABSENT}, |
Sascha Sommer | fad7b95 | 2007-11-04 08:06:48 -0300 | [diff] [blame] | 2633 | }; |
Mauro Carvalho Chehab | fdf1bc9 | 2014-11-28 08:34:15 -0300 | [diff] [blame] | 2634 | |
Frank Schaefer | 87b5243 | 2013-03-03 15:37:40 -0300 | [diff] [blame] | 2635 | /* NOTE: introduce a separate hash table for devices with 16 bit eeproms */ |
Sascha Sommer | fad7b95 | 2007-11-04 08:06:48 -0300 | [diff] [blame] | 2636 | |
Michael Krufky | d7cba04 | 2008-09-12 13:31:45 -0300 | [diff] [blame] | 2637 | 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] | 2638 | { |
Hans Verkuil | bc3d292 | 2013-03-22 09:54:00 -0300 | [diff] [blame] | 2639 | struct em28xx_i2c_bus *i2c_bus = ptr; |
| 2640 | struct em28xx *dev = i2c_bus->dev; |
Mauro Carvalho Chehab | 102a0b0 | 2008-04-17 21:40:45 -0300 | [diff] [blame] | 2641 | int rc = 0; |
Mauro Carvalho Chehab | ee6e3a8 | 2008-04-17 21:37:31 -0300 | [diff] [blame] | 2642 | |
Eddi De Pieri | 82e7dbb | 2011-11-19 11:37:14 -0300 | [diff] [blame] | 2643 | if (dev->tuner_type != TUNER_XC2028 && dev->tuner_type != TUNER_XC5000) |
Mauro Carvalho Chehab | ee6e3a8 | 2008-04-17 21:37:31 -0300 | [diff] [blame] | 2644 | return 0; |
| 2645 | |
Eddi De Pieri | 82e7dbb | 2011-11-19 11:37:14 -0300 | [diff] [blame] | 2646 | if (command != XC2028_TUNER_RESET && command != XC5000_TUNER_RESET) |
Mauro Carvalho Chehab | ee6e3a8 | 2008-04-17 21:37:31 -0300 | [diff] [blame] | 2647 | return 0; |
| 2648 | |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 2649 | rc = em28xx_gpio_set(dev, dev->board.tuner_gpio); |
Mauro Carvalho Chehab | ee6e3a8 | 2008-04-17 21:37:31 -0300 | [diff] [blame] | 2650 | |
Mauro Carvalho Chehab | ee6e3a8 | 2008-04-17 21:37:31 -0300 | [diff] [blame] | 2651 | return rc; |
| 2652 | } |
| 2653 | EXPORT_SYMBOL_GPL(em28xx_tuner_callback); |
| 2654 | |
Nicola Soranzo | a1a6ee7 | 2009-02-10 23:28:24 -0300 | [diff] [blame] | 2655 | static inline void em28xx_set_model(struct em28xx *dev) |
Mauro Carvalho Chehab | ee6e3a8 | 2008-04-17 21:37:31 -0300 | [diff] [blame] | 2656 | { |
Ezequiel Garcia | e0f6e4d | 2012-09-26 06:25:12 -0300 | [diff] [blame] | 2657 | dev->board = em28xx_boards[dev->model]; |
Devin Heitmueller | ed14e1c | 2008-12-29 22:27:30 -0300 | [diff] [blame] | 2658 | |
| 2659 | /* Those are the default values for the majority of boards |
| 2660 | Use those values if not specified otherwise at boards entry |
| 2661 | */ |
| 2662 | if (!dev->board.xclk) |
| 2663 | dev->board.xclk = EM28XX_XCLK_IR_RC5_MODE | |
| 2664 | EM28XX_XCLK_FREQUENCY_12MHZ; |
| 2665 | |
| 2666 | if (!dev->board.i2c_speed) |
| 2667 | dev->board.i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | |
| 2668 | EM28XX_I2C_FREQ_100_KHZ; |
Mauro Carvalho Chehab | 3aa2b3b | 2013-03-05 06:55:27 -0300 | [diff] [blame] | 2669 | |
Mauro Carvalho Chehab | aab3125 | 2013-03-05 06:55:28 -0300 | [diff] [blame] | 2670 | /* Should be initialized early, for I2C to work */ |
| 2671 | dev->def_i2c_bus = dev->board.def_i2c_bus; |
Mauro Carvalho Chehab | ee6e3a8 | 2008-04-17 21:37:31 -0300 | [diff] [blame] | 2672 | } |
| 2673 | |
Matthieu Rogez | 0899f62 | 2016-03-04 18:33:08 -0300 | [diff] [blame] | 2674 | /* Wait until AC97_RESET reports the expected value reliably before proceeding. |
| 2675 | * We also check that two unrelated registers accesses don't return the same |
| 2676 | * value to avoid premature return. |
| 2677 | * This procedure helps ensuring AC97 register accesses are reliable. |
| 2678 | */ |
| 2679 | static int em28xx_wait_until_ac97_features_equals(struct em28xx *dev, |
| 2680 | int expected_feat) |
| 2681 | { |
| 2682 | unsigned long timeout = jiffies + msecs_to_jiffies(2000); |
| 2683 | int feat, powerdown; |
| 2684 | |
| 2685 | while (time_is_after_jiffies(timeout)) { |
| 2686 | feat = em28xx_read_ac97(dev, AC97_RESET); |
| 2687 | if (feat < 0) |
| 2688 | return feat; |
| 2689 | |
| 2690 | powerdown = em28xx_read_ac97(dev, AC97_POWERDOWN); |
| 2691 | if (powerdown < 0) |
| 2692 | return powerdown; |
| 2693 | |
| 2694 | if (feat == expected_feat && feat != powerdown) |
| 2695 | return 0; |
| 2696 | |
| 2697 | msleep(50); |
| 2698 | } |
| 2699 | |
Mauro Carvalho Chehab | 29b05e2 | 2016-12-07 13:48:10 -0200 | [diff] [blame] | 2700 | dev_warn(&dev->intf->dev, "AC97 registers access is not reliable !\n"); |
Matthieu Rogez | 0899f62 | 2016-03-04 18:33:08 -0300 | [diff] [blame] | 2701 | return -ETIMEDOUT; |
| 2702 | } |
| 2703 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2704 | /* Since em28xx_pre_card_setup() requires a proper dev->model, |
| 2705 | * this won't work for boards with generic PCI IDs |
| 2706 | */ |
Ezequiel Garcia | 60332f0 | 2012-04-28 09:57:01 -0300 | [diff] [blame] | 2707 | static void em28xx_pre_card_setup(struct em28xx *dev) |
Markus Rechberger | a94e95b | 2006-01-23 17:11:10 -0200 | [diff] [blame] | 2708 | { |
Devin Heitmueller | ed14e1c | 2008-12-29 22:27:30 -0300 | [diff] [blame] | 2709 | /* Set the initial XCLK and I2C clock values based on the board |
| 2710 | definition */ |
Mauro Carvalho Chehab | 505b6d0 | 2008-11-25 09:39:50 -0300 | [diff] [blame] | 2711 | em28xx_write_reg(dev, EM28XX_R0F_XCLK, dev->board.xclk & 0x7f); |
Sascha Sommer | ca80cf6 | 2012-01-08 16:32:09 -0300 | [diff] [blame] | 2712 | if (!dev->board.is_em2800) |
| 2713 | 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] | 2714 | msleep(50); |
| 2715 | |
Markus Rechberger | a94e95b | 2006-01-23 17:11:10 -0200 | [diff] [blame] | 2716 | /* request some modules */ |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 2717 | switch (dev->model) { |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2718 | case EM2861_BOARD_PLEXTOR_PX_TV100U: |
Mauro Carvalho Chehab | 0a6e44d | 2009-07-29 01:39:12 -0300 | [diff] [blame] | 2719 | /* Sets the msp34xx I2S speed */ |
| 2720 | dev->i2s_speed = 2048000; |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2721 | break; |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2722 | case EM2861_BOARD_KWORLD_PVRTV_300U: |
| 2723 | case EM2880_BOARD_KWORLD_DVB_305U: |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 2724 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0x6d); |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2725 | msleep(10); |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 2726 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0x7d); |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2727 | msleep(10); |
| 2728 | break; |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2729 | case EM2870_BOARD_COMPRO_VIDEOMATE: |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2730 | /* TODO: someone can do some cleanup here... |
| 2731 | not everything's needed */ |
Devin Heitmueller | 6d676d8 | 2008-11-25 06:04:02 -0300 | [diff] [blame] | 2732 | em28xx_write_reg(dev, EM2880_R04_GPO, 0x00); |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2733 | msleep(10); |
Devin Heitmueller | 6d676d8 | 2008-11-25 06:04:02 -0300 | [diff] [blame] | 2734 | em28xx_write_reg(dev, EM2880_R04_GPO, 0x01); |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2735 | msleep(10); |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 2736 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfd); |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2737 | mdelay(70); |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 2738 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfc); |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2739 | mdelay(70); |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 2740 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xdc); |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2741 | mdelay(70); |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 2742 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfc); |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2743 | mdelay(70); |
| 2744 | break; |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2745 | case EM2870_BOARD_TERRATEC_XS_MT2060: |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2746 | /* this device needs some gpio writes to get the DVB-T |
| 2747 | demod work */ |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 2748 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfe); |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2749 | mdelay(70); |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 2750 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xde); |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2751 | mdelay(70); |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 2752 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfe); |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2753 | mdelay(70); |
| 2754 | break; |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2755 | case EM2870_BOARD_PINNACLE_PCTV_DVB: |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2756 | /* this device needs some gpio writes to get the |
| 2757 | DVB-T demod work */ |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 2758 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfe); |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2759 | mdelay(70); |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 2760 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xde); |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2761 | mdelay(70); |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 2762 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfe); |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2763 | mdelay(70); |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2764 | break; |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2765 | case EM2820_BOARD_GADMEI_UTV310: |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 2766 | case EM2820_BOARD_MSI_VOX_USB_2: |
Mauro Carvalho Chehab | a2070c6 | 2008-11-25 07:05:06 -0300 | [diff] [blame] | 2767 | /* enables audio for that devices */ |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 2768 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfd); |
Mauro Carvalho Chehab | 102a0b0 | 2008-04-17 21:40:45 -0300 | [diff] [blame] | 2769 | break; |
Mauro Carvalho Chehab | 0bf4f6c | 2009-02-11 14:13:20 -0300 | [diff] [blame] | 2770 | |
Franklin Meng | d7de5d8 | 2009-06-06 17:05:02 -0300 | [diff] [blame] | 2771 | case EM2882_BOARD_KWORLD_ATSC_315U: |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 2772 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xff); |
Franklin Meng | d7de5d8 | 2009-06-06 17:05:02 -0300 | [diff] [blame] | 2773 | msleep(10); |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 2774 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfe); |
Franklin Meng | d7de5d8 | 2009-06-06 17:05:02 -0300 | [diff] [blame] | 2775 | msleep(10); |
| 2776 | em28xx_write_reg(dev, EM2880_R04_GPO, 0x00); |
| 2777 | msleep(10); |
| 2778 | em28xx_write_reg(dev, EM2880_R04_GPO, 0x08); |
| 2779 | msleep(10); |
| 2780 | break; |
| 2781 | |
Mauro Carvalho Chehab | 0bf4f6c | 2009-02-11 14:13:20 -0300 | [diff] [blame] | 2782 | case EM2860_BOARD_KAIOMY_TVNPC_U2: |
| 2783 | em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x07", 1); |
| 2784 | em28xx_write_regs(dev, EM28XX_R06_I2C_CLK, "\x40", 1); |
| 2785 | em28xx_write_regs(dev, 0x0d, "\x42", 1); |
| 2786 | em28xx_write_regs(dev, 0x08, "\xfd", 1); |
| 2787 | msleep(10); |
| 2788 | em28xx_write_regs(dev, 0x08, "\xff", 1); |
| 2789 | msleep(10); |
| 2790 | em28xx_write_regs(dev, 0x08, "\x7f", 1); |
| 2791 | msleep(10); |
| 2792 | em28xx_write_regs(dev, 0x08, "\x6b", 1); |
| 2793 | |
| 2794 | break; |
Mauro Carvalho Chehab | 56ee380 | 2009-02-11 14:18:36 -0300 | [diff] [blame] | 2795 | case EM2860_BOARD_EASYCAP: |
| 2796 | em28xx_write_regs(dev, 0x08, "\xf8", 1); |
| 2797 | break; |
| 2798 | |
Indika Katugampala | f74a61e3 | 2009-02-11 11:13:05 -0300 | [diff] [blame] | 2799 | case EM2820_BOARD_IODATA_GVMVP_SZ: |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 2800 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xff); |
Indika Katugampala | f74a61e3 | 2009-02-11 11:13:05 -0300 | [diff] [blame] | 2801 | msleep(70); |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 2802 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xf7); |
Indika Katugampala | f74a61e3 | 2009-02-11 11:13:05 -0300 | [diff] [blame] | 2803 | msleep(10); |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 2804 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfe); |
Indika Katugampala | f74a61e3 | 2009-02-11 11:13:05 -0300 | [diff] [blame] | 2805 | msleep(70); |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 2806 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfd); |
Indika Katugampala | f74a61e3 | 2009-02-11 11:13:05 -0300 | [diff] [blame] | 2807 | msleep(70); |
| 2808 | break; |
Matthieu Rogez | 0899f62 | 2016-03-04 18:33:08 -0300 | [diff] [blame] | 2809 | |
| 2810 | case EM2860_BOARD_TERRATEC_GRABBY: |
| 2811 | /* HACK?: Ensure AC97 register reading is reliable before |
| 2812 | * proceeding. In practice, this will wait about 1.6 seconds. |
| 2813 | */ |
| 2814 | em28xx_wait_until_ac97_features_equals(dev, 0x6a90); |
| 2815 | break; |
Mauro Carvalho Chehab | 102a0b0 | 2008-04-17 21:40:45 -0300 | [diff] [blame] | 2816 | } |
Mauro Carvalho Chehab | c67ec53 | 2008-04-17 21:48:00 -0300 | [diff] [blame] | 2817 | |
Mauro Carvalho Chehab | 017ab4b | 2008-11-27 09:21:55 -0300 | [diff] [blame] | 2818 | em28xx_gpio_set(dev, dev->board.tuner_gpio); |
Mauro Carvalho Chehab | c67ec53 | 2008-04-17 21:48:00 -0300 | [diff] [blame] | 2819 | em28xx_set_mode(dev, EM28XX_ANALOG_MODE); |
| 2820 | |
| 2821 | /* Unlock device */ |
Mauro Carvalho Chehab | 2fe3e2e | 2008-11-27 09:10:40 -0300 | [diff] [blame] | 2822 | em28xx_set_mode(dev, EM28XX_SUSPEND); |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2823 | } |
| 2824 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2825 | static int em28xx_hint_board(struct em28xx *dev) |
| 2826 | { |
| 2827 | int i; |
| 2828 | |
Frank Schaefer | 2d466e1 | 2013-03-27 17:06:28 -0300 | [diff] [blame] | 2829 | if (dev->board.is_webcam) { |
| 2830 | if (dev->em28xx_sensor == EM28XX_MT9V011) { |
| 2831 | dev->model = EM2820_BOARD_SILVERCREST_WEBCAM; |
| 2832 | } else if (dev->em28xx_sensor == EM28XX_MT9M001 || |
| 2833 | dev->em28xx_sensor == EM28XX_MT9M111) { |
| 2834 | dev->model = EM2750_BOARD_UNKNOWN; |
| 2835 | } |
| 2836 | /* FIXME: IMPROVE ! */ |
| 2837 | |
| 2838 | return 0; |
| 2839 | } |
| 2840 | |
Mauro Carvalho Chehab | d2ba055 | 2007-11-04 08:32:42 -0300 | [diff] [blame] | 2841 | /* HINT method: EEPROM |
| 2842 | * |
| 2843 | * This method works only for boards with eeprom. |
| 2844 | * Uses a hash of all eeprom bytes. The hash should be |
| 2845 | * unique for a vendor/tuner pair. |
| 2846 | * There are a high chance that tuners for different |
| 2847 | * video standards produce different hashes. |
| 2848 | */ |
| 2849 | for (i = 0; i < ARRAY_SIZE(em28xx_eeprom_hash); i++) { |
| 2850 | if (dev->hash == em28xx_eeprom_hash[i].hash) { |
| 2851 | dev->model = em28xx_eeprom_hash[i].model; |
| 2852 | dev->tuner_type = em28xx_eeprom_hash[i].tuner; |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2853 | |
Mauro Carvalho Chehab | 29b05e2 | 2016-12-07 13:48:10 -0200 | [diff] [blame] | 2854 | dev_err(&dev->intf->dev, |
Mauro Carvalho Chehab | ce8591f | 2016-10-20 08:42:03 -0200 | [diff] [blame] | 2855 | "Your board has no unique USB ID.\n" |
| 2856 | "A hint were successfully done, based on eeprom hash.\n" |
| 2857 | "This method is not 100%% failproof.\n" |
Colin Ian King | 1656df3 | 2017-05-22 05:13:25 -0300 | [diff] [blame^] | 2858 | "If the board were misdetected, please email this log to:\n" |
Mauro Carvalho Chehab | ce8591f | 2016-10-20 08:42:03 -0200 | [diff] [blame] | 2859 | "\tV4L Mailing List <linux-media@vger.kernel.org>\n" |
| 2860 | "Board detected as %s\n", |
Mauro Carvalho Chehab | 2a96f60 | 2016-10-12 07:32:23 -0300 | [diff] [blame] | 2861 | em28xx_boards[dev->model].name); |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2862 | |
| 2863 | return 0; |
| 2864 | } |
| 2865 | } |
Sascha Sommer | fad7b95 | 2007-11-04 08:06:48 -0300 | [diff] [blame] | 2866 | |
Mauro Carvalho Chehab | d2ba055 | 2007-11-04 08:32:42 -0300 | [diff] [blame] | 2867 | /* HINT method: I2C attached devices |
| 2868 | * |
| 2869 | * This method works for all boards. |
| 2870 | * Uses a hash of i2c scanned devices. |
| 2871 | * Devices with the same i2c attached chips will |
| 2872 | * be considered equal. |
| 2873 | * This method is less precise than the eeprom one. |
| 2874 | */ |
| 2875 | |
Sascha Sommer | fad7b95 | 2007-11-04 08:06:48 -0300 | [diff] [blame] | 2876 | /* user did not request i2c scanning => do it now */ |
| 2877 | if (!dev->i2c_hash) |
Mauro Carvalho Chehab | aab3125 | 2013-03-05 06:55:28 -0300 | [diff] [blame] | 2878 | em28xx_do_i2c_scan(dev, dev->def_i2c_bus); |
Sascha Sommer | fad7b95 | 2007-11-04 08:06:48 -0300 | [diff] [blame] | 2879 | |
| 2880 | for (i = 0; i < ARRAY_SIZE(em28xx_i2c_hash); i++) { |
| 2881 | if (dev->i2c_hash == em28xx_i2c_hash[i].hash) { |
| 2882 | dev->model = em28xx_i2c_hash[i].model; |
| 2883 | dev->tuner_type = em28xx_i2c_hash[i].tuner; |
Mauro Carvalho Chehab | 29b05e2 | 2016-12-07 13:48:10 -0200 | [diff] [blame] | 2884 | dev_err(&dev->intf->dev, |
Mauro Carvalho Chehab | ce8591f | 2016-10-20 08:42:03 -0200 | [diff] [blame] | 2885 | "Your board has no unique USB ID.\n" |
| 2886 | "A hint were successfully done, based on i2c devicelist hash.\n" |
| 2887 | "This method is not 100%% failproof.\n" |
Colin Ian King | 1656df3 | 2017-05-22 05:13:25 -0300 | [diff] [blame^] | 2888 | "If the board were misdetected, please email this log to:\n" |
Mauro Carvalho Chehab | ce8591f | 2016-10-20 08:42:03 -0200 | [diff] [blame] | 2889 | "\tV4L Mailing List <linux-media@vger.kernel.org>\n" |
| 2890 | "Board detected as %s\n", |
| 2891 | em28xx_boards[dev->model].name); |
Sascha Sommer | fad7b95 | 2007-11-04 08:06:48 -0300 | [diff] [blame] | 2892 | |
| 2893 | return 0; |
| 2894 | } |
| 2895 | } |
| 2896 | |
Mauro Carvalho Chehab | 29b05e2 | 2016-12-07 13:48:10 -0200 | [diff] [blame] | 2897 | dev_err(&dev->intf->dev, |
Mauro Carvalho Chehab | ce8591f | 2016-10-20 08:42:03 -0200 | [diff] [blame] | 2898 | "Your board has no unique USB ID and thus need a hint to be detected.\n" |
| 2899 | "You may try to use card=<n> insmod option to workaround that.\n" |
| 2900 | "Please send an email with this log to:\n" |
| 2901 | "\tV4L Mailing List <linux-media@vger.kernel.org>\n" |
| 2902 | "Board eeprom hash is 0x%08lx\n" |
| 2903 | "Board i2c devicelist hash is 0x%08lx\n", |
| 2904 | dev->hash, dev->i2c_hash); |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2905 | |
Mauro Carvalho Chehab | 29b05e2 | 2016-12-07 13:48:10 -0200 | [diff] [blame] | 2906 | dev_err(&dev->intf->dev, |
Mauro Carvalho Chehab | ce8591f | 2016-10-20 08:42:03 -0200 | [diff] [blame] | 2907 | "Here is a list of valid choices for the card=<n> insmod option:\n"); |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2908 | for (i = 0; i < em28xx_bcount; i++) { |
Mauro Carvalho Chehab | 29b05e2 | 2016-12-07 13:48:10 -0200 | [diff] [blame] | 2909 | dev_err(&dev->intf->dev, |
Mauro Carvalho Chehab | ce8591f | 2016-10-20 08:42:03 -0200 | [diff] [blame] | 2910 | " card=%d -> %s\n", i, em28xx_boards[i].name); |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2911 | } |
| 2912 | return -1; |
Mauro Carvalho Chehab | 882876b | 2007-10-29 11:33:18 -0300 | [diff] [blame] | 2913 | } |
| 2914 | |
Ezequiel Garcia | 60332f0 | 2012-04-28 09:57:01 -0300 | [diff] [blame] | 2915 | static void em28xx_card_setup(struct em28xx *dev) |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 2916 | { |
Mauro Carvalho Chehab | 3d3215c | 2009-08-10 10:29:27 -0300 | [diff] [blame] | 2917 | /* |
| 2918 | * If the device can be a webcam, seek for a sensor. |
| 2919 | * If sensor is not found, then it isn't a webcam. |
| 2920 | */ |
| 2921 | if (dev->board.is_webcam) { |
Frank Schaefer | 85316cf | 2017-04-15 07:05:02 -0300 | [diff] [blame] | 2922 | em28xx_detect_sensor(dev); |
| 2923 | if (dev->em28xx_sensor == EM28XX_NOSENSOR) |
| 2924 | /* NOTE: error/unknown sensor/no sensor */ |
Mauro Carvalho Chehab | 3d3215c | 2009-08-10 10:29:27 -0300 | [diff] [blame] | 2925 | dev->board.is_webcam = 0; |
Mauro Carvalho Chehab | ca3dfd6 | 2010-09-10 17:29:14 -0300 | [diff] [blame] | 2926 | } |
| 2927 | |
Frank Schaefer | 2d466e1 | 2013-03-27 17:06:28 -0300 | [diff] [blame] | 2928 | switch (dev->model) { |
| 2929 | case EM2750_BOARD_UNKNOWN: |
| 2930 | case EM2820_BOARD_UNKNOWN: |
| 2931 | case EM2800_BOARD_UNKNOWN: |
Mauro Carvalho Chehab | ca3dfd6 | 2010-09-10 17:29:14 -0300 | [diff] [blame] | 2932 | /* |
| 2933 | * The K-WORLD DVB-T 310U is detected as an MSI Digivox AD. |
| 2934 | * |
| 2935 | * This occurs because they share identical USB vendor and |
| 2936 | * product IDs. |
| 2937 | * |
| 2938 | * What we do here is look up the EEPROM hash of the K-WORLD |
| 2939 | * and if it is found then we decide that we do not have |
| 2940 | * a DIGIVOX and reset the device to the K-WORLD instead. |
| 2941 | * |
| 2942 | * This solution is only valid if they do not share eeprom |
| 2943 | * hash identities which has not been determined as yet. |
| 2944 | */ |
| 2945 | if (em28xx_hint_board(dev) < 0) |
Mauro Carvalho Chehab | 29b05e2 | 2016-12-07 13:48:10 -0200 | [diff] [blame] | 2946 | dev_err(&dev->intf->dev, "Board not discovered\n"); |
Mauro Carvalho Chehab | ca3dfd6 | 2010-09-10 17:29:14 -0300 | [diff] [blame] | 2947 | else { |
| 2948 | em28xx_set_model(dev); |
| 2949 | em28xx_pre_card_setup(dev); |
| 2950 | } |
| 2951 | break; |
Frank Schaefer | 2d466e1 | 2013-03-27 17:06:28 -0300 | [diff] [blame] | 2952 | default: |
| 2953 | em28xx_set_model(dev); |
Mauro Carvalho Chehab | ca3dfd6 | 2010-09-10 17:29:14 -0300 | [diff] [blame] | 2954 | } |
Mauro Carvalho Chehab | 3d3215c | 2009-08-10 10:29:27 -0300 | [diff] [blame] | 2955 | |
Mauro Carvalho Chehab | 29b05e2 | 2016-12-07 13:48:10 -0200 | [diff] [blame] | 2956 | dev_info(&dev->intf->dev, "Identified as %s (card=%d)\n", |
Mauro Carvalho Chehab | 2a96f60 | 2016-10-12 07:32:23 -0300 | [diff] [blame] | 2957 | dev->board.name, dev->model); |
Mauro Carvalho Chehab | f8b6030 | 2007-11-05 08:42:55 -0300 | [diff] [blame] | 2958 | |
| 2959 | dev->tuner_type = em28xx_boards[dev->model].tuner_type; |
| 2960 | |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 2961 | /* request some modules */ |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2962 | switch (dev->model) { |
| 2963 | case EM2820_BOARD_HAUPPAUGE_WINTV_USB_2: |
Mauro Carvalho Chehab | 98ae127 | 2007-11-05 09:30:39 -0300 | [diff] [blame] | 2964 | case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900: |
Devin Heitmueller | 17d9d55 | 2008-06-08 10:22:03 -0300 | [diff] [blame] | 2965 | case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2: |
Douglas Schilling Landgraf | f89bc32 | 2008-12-01 21:01:04 -0300 | [diff] [blame] | 2966 | case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850: |
Mauro Carvalho Chehab | 10ac660 | 2008-07-27 14:58:58 -0300 | [diff] [blame] | 2967 | case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950: |
Frank Schaefer | a616601 | 2013-03-03 15:37:44 -0300 | [diff] [blame] | 2968 | case EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C: |
Olli Salonen | 11a2a94 | 2016-04-04 12:12:52 -0300 | [diff] [blame] | 2969 | case EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB: |
Kevin Cheng | 1586342 | 2017-01-10 01:14:29 -0200 | [diff] [blame] | 2970 | case EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_01595: |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2971 | { |
| 2972 | struct tveeprom tv; |
Frank Schaefer | a217968 | 2013-03-03 15:37:42 -0300 | [diff] [blame] | 2973 | |
| 2974 | if (dev->eedata == NULL) |
| 2975 | break; |
Mauro Carvalho Chehab | ac07bb7 | 2009-09-08 14:04:41 -0300 | [diff] [blame] | 2976 | #if defined(CONFIG_MODULES) && defined(MODULE) |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2977 | request_module("tveeprom"); |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 2978 | #endif |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2979 | /* Call first TVeeprom */ |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 2980 | |
Mauro Carvalho Chehab | 446aba6 | 2017-03-03 07:28:29 -0300 | [diff] [blame] | 2981 | tveeprom_hauppauge_analog(&tv, dev->eedata); |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 2982 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2983 | dev->tuner_type = tv.tuner_type; |
Mauro Carvalho Chehab | ed08631 | 2008-01-24 06:59:20 -0300 | [diff] [blame] | 2984 | |
Hans Verkuil | 3300101 | 2013-05-29 06:59:45 -0300 | [diff] [blame] | 2985 | if (tv.audio_processor == TVEEPROM_AUDPROC_MSP) { |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2986 | dev->i2s_speed = 2048000; |
Mauro Carvalho Chehab | 505b6d0 | 2008-11-25 09:39:50 -0300 | [diff] [blame] | 2987 | dev->board.has_msp34xx = 1; |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2988 | } |
| 2989 | break; |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 2990 | } |
Franklin Meng | d7de5d8 | 2009-06-06 17:05:02 -0300 | [diff] [blame] | 2991 | case EM2882_BOARD_KWORLD_ATSC_315U: |
| 2992 | em28xx_write_reg(dev, 0x0d, 0x42); |
| 2993 | msleep(10); |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 2994 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xfd); |
Franklin Meng | d7de5d8 | 2009-06-06 17:05:02 -0300 | [diff] [blame] | 2995 | msleep(10); |
| 2996 | break; |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 2997 | case EM2820_BOARD_KWORLD_PVRTV2800RF: |
| 2998 | /* GPIO enables sound on KWORLD PVR TV 2800RF */ |
Frank Schaefer | c074fc4 | 2013-06-03 14:12:03 -0300 | [diff] [blame] | 2999 | em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xf9); |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 3000 | break; |
| 3001 | case EM2820_BOARD_UNKNOWN: |
| 3002 | case EM2800_BOARD_UNKNOWN: |
Darron Broad | da3808e | 2008-09-30 02:46:41 -0300 | [diff] [blame] | 3003 | /* |
| 3004 | * The K-WORLD DVB-T 310U is detected as an MSI Digivox AD. |
| 3005 | * |
| 3006 | * This occurs because they share identical USB vendor and |
| 3007 | * product IDs. |
| 3008 | * |
| 3009 | * What we do here is look up the EEPROM hash of the K-WORLD |
| 3010 | * and if it is found then we decide that we do not have |
| 3011 | * a DIGIVOX and reset the device to the K-WORLD instead. |
| 3012 | * |
| 3013 | * This solution is only valid if they do not share eeprom |
| 3014 | * hash identities which has not been determined as yet. |
| 3015 | */ |
| 3016 | case EM2880_BOARD_MSI_DIGIVOX_AD: |
Mauro Carvalho Chehab | f8b6030 | 2007-11-05 08:42:55 -0300 | [diff] [blame] | 3017 | if (!em28xx_hint_board(dev)) |
| 3018 | em28xx_set_model(dev); |
Devin Heitmueller | cdf7bfa | 2009-06-19 00:20:28 -0300 | [diff] [blame] | 3019 | |
| 3020 | /* In cases where we had to use a board hint, the call to |
| 3021 | em28xx_set_mode() in em28xx_pre_card_setup() was a no-op, |
| 3022 | so make the call now so the analog GPIOs are set properly |
| 3023 | before probing the i2c bus. */ |
Devin Heitmueller | 5343e44 | 2009-07-15 00:35:47 -0300 | [diff] [blame] | 3024 | em28xx_gpio_set(dev, dev->board.tuner_gpio); |
Devin Heitmueller | cdf7bfa | 2009-06-19 00:20:28 -0300 | [diff] [blame] | 3025 | em28xx_set_mode(dev, EM28XX_ANALOG_MODE); |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 3026 | break; |
Andrea.Amorosi76@gmail.com | 7ca7ef6 | 2010-02-09 17:53:38 -0300 | [diff] [blame] | 3027 | |
Frank Schaefer | a217968 | 2013-03-03 15:37:42 -0300 | [diff] [blame] | 3028 | /* |
Andrea.Amorosi76@gmail.com | 7ca7ef6 | 2010-02-09 17:53:38 -0300 | [diff] [blame] | 3029 | * The Dikom DK300 is detected as an Kworld VS-DVB-T 323UR. |
| 3030 | * |
| 3031 | * This occurs because they share identical USB vendor and |
| 3032 | * product IDs. |
| 3033 | * |
| 3034 | * What we do here is look up the EEPROM hash of the Dikom |
| 3035 | * and if it is found then we decide that we do not have |
| 3036 | * a Kworld and reset the device to the Dikom instead. |
| 3037 | * |
| 3038 | * This solution is only valid if they do not share eeprom |
| 3039 | * hash identities which has not been determined as yet. |
| 3040 | */ |
| 3041 | case EM2882_BOARD_KWORLD_VS_DVBT: |
| 3042 | if (!em28xx_hint_board(dev)) |
| 3043 | em28xx_set_model(dev); |
| 3044 | |
| 3045 | /* In cases where we had to use a board hint, the call to |
| 3046 | em28xx_set_mode() in em28xx_pre_card_setup() was a no-op, |
| 3047 | so make the call now so the analog GPIOs are set properly |
| 3048 | before probing the i2c bus. */ |
| 3049 | em28xx_gpio_set(dev, dev->board.tuner_gpio); |
| 3050 | em28xx_set_mode(dev, EM28XX_ANALOG_MODE); |
| 3051 | break; |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 3052 | } |
| 3053 | |
Mauro Carvalho Chehab | 505b6d0 | 2008-11-25 09:39:50 -0300 | [diff] [blame] | 3054 | if (dev->board.valid == EM28XX_BOARD_NOT_VALIDATED) { |
Mauro Carvalho Chehab | 29b05e2 | 2016-12-07 13:48:10 -0200 | [diff] [blame] | 3055 | dev_err(&dev->intf->dev, |
Mauro Carvalho Chehab | ce8591f | 2016-10-20 08:42:03 -0200 | [diff] [blame] | 3056 | "\n\n" |
| 3057 | "The support for this board weren't valid yet.\n" |
| 3058 | "Please send a report of having this working\n" |
| 3059 | "not to V4L mailing list (and/or to other addresses)\n\n"); |
Douglas Schilling Landgraf | 95b86a9 | 2008-07-27 14:03:32 -0300 | [diff] [blame] | 3060 | } |
| 3061 | |
Frank Schaefer | a217968 | 2013-03-03 15:37:42 -0300 | [diff] [blame] | 3062 | /* Free eeprom data memory */ |
| 3063 | kfree(dev->eedata); |
| 3064 | dev->eedata = NULL; |
| 3065 | |
Mauro Carvalho Chehab | f8b6030 | 2007-11-05 08:42:55 -0300 | [diff] [blame] | 3066 | /* Allow override tuner type by a module parameter */ |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 3067 | if (tuner >= 0) |
| 3068 | dev->tuner_type = tuner; |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 3069 | } |
Mauro Carvalho Chehab | c864405 | 2008-11-25 13:10:14 -0300 | [diff] [blame] | 3070 | |
Mauro Carvalho Chehab | ee97207 | 2014-01-12 11:08:22 -0300 | [diff] [blame] | 3071 | void em28xx_setup_xc3028(struct em28xx *dev, struct xc2028_ctrl *ctl) |
| 3072 | { |
| 3073 | memset(ctl, 0, sizeof(*ctl)); |
| 3074 | |
| 3075 | ctl->fname = XC2028_DEFAULT_FIRMWARE; |
| 3076 | ctl->max_len = 64; |
| 3077 | ctl->mts = em28xx_boards[dev->model].mts_firmware; |
| 3078 | |
| 3079 | switch (dev->model) { |
| 3080 | case EM2880_BOARD_EMPIRE_DUAL_TV: |
| 3081 | case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900: |
| 3082 | case EM2882_BOARD_TERRATEC_HYBRID_XS: |
| 3083 | ctl->demod = XC3028_FE_ZARLINK456; |
| 3084 | break; |
| 3085 | case EM2880_BOARD_TERRATEC_HYBRID_XS: |
| 3086 | case EM2880_BOARD_TERRATEC_HYBRID_XS_FR: |
| 3087 | case EM2881_BOARD_PINNACLE_HYBRID_PRO: |
| 3088 | ctl->demod = XC3028_FE_ZARLINK456; |
| 3089 | break; |
| 3090 | case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2: |
| 3091 | case EM2882_BOARD_PINNACLE_HYBRID_PRO_330E: |
| 3092 | ctl->demod = XC3028_FE_DEFAULT; |
| 3093 | break; |
| 3094 | case EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600: |
| 3095 | ctl->demod = XC3028_FE_DEFAULT; |
| 3096 | ctl->fname = XC3028L_DEFAULT_FIRMWARE; |
| 3097 | break; |
| 3098 | case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850: |
| 3099 | case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950: |
| 3100 | case EM2880_BOARD_PINNACLE_PCTV_HD_PRO: |
| 3101 | /* FIXME: Better to specify the needed IF */ |
| 3102 | ctl->demod = XC3028_FE_DEFAULT; |
| 3103 | break; |
| 3104 | case EM2883_BOARD_KWORLD_HYBRID_330U: |
| 3105 | case EM2882_BOARD_DIKOM_DK300: |
| 3106 | case EM2882_BOARD_KWORLD_VS_DVBT: |
| 3107 | ctl->demod = XC3028_FE_CHINA; |
| 3108 | ctl->fname = XC2028_DEFAULT_FIRMWARE; |
| 3109 | break; |
| 3110 | case EM2882_BOARD_EVGA_INDTUBE: |
| 3111 | ctl->demod = XC3028_FE_CHINA; |
| 3112 | ctl->fname = XC3028L_DEFAULT_FIRMWARE; |
| 3113 | break; |
| 3114 | default: |
| 3115 | ctl->demod = XC3028_FE_OREN538; |
| 3116 | } |
| 3117 | } |
| 3118 | EXPORT_SYMBOL_GPL(em28xx_setup_xc3028); |
| 3119 | |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3120 | static void request_module_async(struct work_struct *work) |
| 3121 | { |
| 3122 | struct em28xx *dev = container_of(work, |
| 3123 | struct em28xx, request_module_wk); |
| 3124 | |
Mauro Carvalho Chehab | 6ae5e06 | 2012-10-02 15:35:27 -0300 | [diff] [blame] | 3125 | /* |
| 3126 | * The em28xx extensions can be modules or builtin. If the |
| 3127 | * modules are already loaded or are built in, those extensions |
| 3128 | * can be initialised right now. Otherwise, the module init |
| 3129 | * code will do it. |
| 3130 | */ |
Mauro Carvalho Chehab | e63fa18 | 2014-01-06 05:50:07 -0300 | [diff] [blame] | 3131 | |
| 3132 | /* |
| 3133 | * Devicdes with an audio-only interface also have a V4L/DVB/RC |
| 3134 | * interface. Don't register extensions twice on those devices. |
| 3135 | */ |
| 3136 | if (dev->is_audio_only) { |
| 3137 | #if defined(CONFIG_MODULES) && defined(MODULE) |
| 3138 | request_module("em28xx-alsa"); |
| 3139 | #endif |
| 3140 | return; |
| 3141 | } |
| 3142 | |
Mauro Carvalho Chehab | 6ae5e06 | 2012-10-02 15:35:27 -0300 | [diff] [blame] | 3143 | em28xx_init_extension(dev); |
| 3144 | |
| 3145 | #if defined(CONFIG_MODULES) && defined(MODULE) |
Mauro Carvalho Chehab | 01c2819 | 2013-12-22 13:27:02 -0300 | [diff] [blame] | 3146 | if (dev->has_video) |
| 3147 | request_module("em28xx-v4l"); |
Frank Schaefer | c587420 | 2014-09-13 05:52:20 -0300 | [diff] [blame] | 3148 | if (dev->usb_audio_type == EM28XX_USB_AUDIO_CLASS) |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3149 | request_module("snd-usb-audio"); |
Frank Schaefer | c587420 | 2014-09-13 05:52:20 -0300 | [diff] [blame] | 3150 | else if (dev->usb_audio_type == EM28XX_USB_AUDIO_VENDOR) |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3151 | request_module("em28xx-alsa"); |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3152 | if (dev->board.has_dvb) |
| 3153 | request_module("em28xx-dvb"); |
Frank Schaefer | f5222609 | 2013-12-01 18:06:52 -0300 | [diff] [blame] | 3154 | if (dev->board.buttons || |
Frank Schaefer | 2b64cbd | 2013-04-11 15:56:01 -0300 | [diff] [blame] | 3155 | ((dev->board.ir_codes || dev->board.has_ir_i2c) && !disable_ir)) |
Ezequiel GarcÃa | f4d4e76 | 2012-03-26 09:13:35 -0300 | [diff] [blame] | 3156 | request_module("em28xx-rc"); |
Mauro Carvalho Chehab | 6ae5e06 | 2012-10-02 15:35:27 -0300 | [diff] [blame] | 3157 | #endif /* CONFIG_MODULES */ |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3158 | } |
| 3159 | |
| 3160 | static void request_modules(struct em28xx *dev) |
| 3161 | { |
| 3162 | INIT_WORK(&dev->request_module_wk, request_module_async); |
| 3163 | schedule_work(&dev->request_module_wk); |
| 3164 | } |
Tejun Heo | 707bcf3 | 2010-12-24 16:14:20 +0100 | [diff] [blame] | 3165 | |
| 3166 | static void flush_request_modules(struct em28xx *dev) |
| 3167 | { |
Linus Torvalds | 0b8e74c | 2012-10-07 17:49:05 +0900 | [diff] [blame] | 3168 | flush_work(&dev->request_module_wk); |
Tejun Heo | 707bcf3 | 2010-12-24 16:14:20 +0100 | [diff] [blame] | 3169 | } |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3170 | |
Mauro Carvalho Chehab | 37ecc7b | 2016-01-27 07:07:24 -0200 | [diff] [blame] | 3171 | static int em28xx_media_device_init(struct em28xx *dev, |
| 3172 | struct usb_device *udev) |
| 3173 | { |
| 3174 | #ifdef CONFIG_MEDIA_CONTROLLER |
| 3175 | struct media_device *mdev; |
| 3176 | |
Mauro Carvalho Chehab | 6cf5dad | 2016-02-22 12:10:49 -0300 | [diff] [blame] | 3177 | mdev = kzalloc(sizeof(*mdev), GFP_KERNEL); |
Mauro Carvalho Chehab | 37ecc7b | 2016-01-27 07:07:24 -0200 | [diff] [blame] | 3178 | if (!mdev) |
| 3179 | return -ENOMEM; |
| 3180 | |
Mauro Carvalho Chehab | 6cf5dad | 2016-02-22 12:10:49 -0300 | [diff] [blame] | 3181 | if (udev->product) |
| 3182 | media_device_usb_init(mdev, udev, udev->product); |
| 3183 | else if (udev->manufacturer) |
| 3184 | media_device_usb_init(mdev, udev, udev->manufacturer); |
| 3185 | else |
Mauro Carvalho Chehab | 29b05e2 | 2016-12-07 13:48:10 -0200 | [diff] [blame] | 3186 | media_device_usb_init(mdev, udev, dev_name(&dev->intf->dev)); |
Mauro Carvalho Chehab | 6cf5dad | 2016-02-22 12:10:49 -0300 | [diff] [blame] | 3187 | |
Mauro Carvalho Chehab | 37ecc7b | 2016-01-27 07:07:24 -0200 | [diff] [blame] | 3188 | dev->media_dev = mdev; |
| 3189 | #endif |
| 3190 | return 0; |
| 3191 | } |
| 3192 | |
| 3193 | static void em28xx_unregister_media_device(struct em28xx *dev) |
| 3194 | { |
| 3195 | |
| 3196 | #ifdef CONFIG_MEDIA_CONTROLLER |
| 3197 | if (dev->media_dev) { |
| 3198 | media_device_unregister(dev->media_dev); |
| 3199 | media_device_cleanup(dev->media_dev); |
| 3200 | kfree(dev->media_dev); |
| 3201 | dev->media_dev = NULL; |
| 3202 | } |
| 3203 | #endif |
| 3204 | } |
| 3205 | |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3206 | /* |
Chris Rankin | d7222e7 | 2011-09-24 11:02:32 -0300 | [diff] [blame] | 3207 | * em28xx_release_resources() |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3208 | * unregisters the v4l2,i2c and usb devices |
Chris Rankin | d7222e7 | 2011-09-24 11:02:32 -0300 | [diff] [blame] | 3209 | * called when the device gets disconnected or at module unload |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3210 | */ |
Mauro Carvalho Chehab | 47677e5 | 2014-03-05 11:21:07 -0300 | [diff] [blame] | 3211 | static void em28xx_release_resources(struct em28xx *dev) |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3212 | { |
Mauro Carvalho Chehab | c6d4813 | 2016-12-07 14:34:22 -0200 | [diff] [blame] | 3213 | struct usb_device *udev = interface_to_usbdev(dev->intf); |
| 3214 | |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3215 | /*FIXME: I2C IR should be disconnected */ |
| 3216 | |
Frank Schaefer | 5a620c7 | 2014-01-12 13:24:24 -0300 | [diff] [blame] | 3217 | mutex_lock(&dev->lock); |
| 3218 | |
Mauro Carvalho Chehab | 37ecc7b | 2016-01-27 07:07:24 -0200 | [diff] [blame] | 3219 | em28xx_unregister_media_device(dev); |
| 3220 | |
Mauro Carvalho Chehab | aab3125 | 2013-03-05 06:55:28 -0300 | [diff] [blame] | 3221 | if (dev->def_i2c_bus) |
| 3222 | em28xx_i2c_unregister(dev, 1); |
| 3223 | em28xx_i2c_unregister(dev, 0); |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 3224 | |
Mauro Carvalho Chehab | c6d4813 | 2016-12-07 14:34:22 -0200 | [diff] [blame] | 3225 | usb_put_dev(udev); |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3226 | |
| 3227 | /* Mark device as unused */ |
Mauro Carvalho Chehab | c3aed26 | 2014-01-14 17:35:15 -0300 | [diff] [blame] | 3228 | clear_bit(dev->devno, em28xx_devused); |
Frank Schaefer | 5a620c7 | 2014-01-12 13:24:24 -0300 | [diff] [blame] | 3229 | |
| 3230 | mutex_unlock(&dev->lock); |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3231 | }; |
Mauro Carvalho Chehab | 47677e5 | 2014-03-05 11:21:07 -0300 | [diff] [blame] | 3232 | |
| 3233 | /** |
| 3234 | * em28xx_free_device() - Free em28xx device |
| 3235 | * |
| 3236 | * @ref: struct kref for em28xx device |
| 3237 | * |
| 3238 | * This is called when all extensions and em28xx core unregisters a device |
| 3239 | */ |
| 3240 | void em28xx_free_device(struct kref *ref) |
| 3241 | { |
| 3242 | struct em28xx *dev = kref_to_dev(ref); |
| 3243 | |
Mauro Carvalho Chehab | 29b05e2 | 2016-12-07 13:48:10 -0200 | [diff] [blame] | 3244 | dev_info(&dev->intf->dev, "Freeing device\n"); |
Mauro Carvalho Chehab | 47677e5 | 2014-03-05 11:21:07 -0300 | [diff] [blame] | 3245 | |
| 3246 | if (!dev->disconnected) |
| 3247 | em28xx_release_resources(dev); |
| 3248 | |
| 3249 | kfree(dev->alt_max_pkt_size_isoc); |
| 3250 | kfree(dev); |
| 3251 | } |
| 3252 | EXPORT_SYMBOL_GPL(em28xx_free_device); |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3253 | |
| 3254 | /* |
| 3255 | * em28xx_init_dev() |
| 3256 | * allocates and inits the device structs, registers i2c bus and v4l device |
| 3257 | */ |
Thomas Petazzoni | 622c2fc | 2012-01-07 10:18:45 -0300 | [diff] [blame] | 3258 | static int em28xx_init_dev(struct em28xx *dev, struct usb_device *udev, |
Mauro Carvalho Chehab | 36fa674 | 2009-04-05 08:02:15 -0300 | [diff] [blame] | 3259 | struct usb_interface *interface, |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3260 | int minor) |
| 3261 | { |
Mauro Carvalho Chehab | fcd20e3 | 2009-08-10 02:57:57 -0300 | [diff] [blame] | 3262 | int retval; |
Mauro Carvalho Chehab | ea48c36 | 2016-12-07 14:53:26 -0200 | [diff] [blame] | 3263 | const char *chip_name = NULL; |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3264 | |
Mauro Carvalho Chehab | 29b05e2 | 2016-12-07 13:48:10 -0200 | [diff] [blame] | 3265 | dev->intf = interface; |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3266 | mutex_init(&dev->ctrl_urb_lock); |
| 3267 | spin_lock_init(&dev->slock); |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3268 | |
| 3269 | dev->em28xx_write_regs = em28xx_write_regs; |
| 3270 | dev->em28xx_read_reg = em28xx_read_reg; |
| 3271 | dev->em28xx_read_reg_req_len = em28xx_read_reg_req_len; |
| 3272 | dev->em28xx_write_regs_req = em28xx_write_regs_req; |
| 3273 | dev->em28xx_read_reg_req = em28xx_read_reg_req; |
| 3274 | dev->board.is_em2800 = em28xx_boards[dev->model].is_em2800; |
| 3275 | |
Mauro Carvalho Chehab | fcd20e3 | 2009-08-10 02:57:57 -0300 | [diff] [blame] | 3276 | em28xx_set_model(dev); |
| 3277 | |
Mauro Carvalho Chehab | fcd20e3 | 2009-08-10 02:57:57 -0300 | [diff] [blame] | 3278 | dev->wait_after_write = 5; |
| 3279 | |
| 3280 | /* Based on the Chip ID, set the device configuration */ |
| 3281 | retval = em28xx_read_reg(dev, EM28XX_R0A_CHIPID); |
| 3282 | if (retval > 0) { |
| 3283 | dev->chip_id = retval; |
| 3284 | |
| 3285 | switch (dev->chip_id) { |
Mauro Carvalho Chehab | f57b17c3 | 2009-11-12 11:21:05 -0300 | [diff] [blame] | 3286 | case CHIP_ID_EM2800: |
Mauro Carvalho Chehab | a3efa1c | 2012-12-23 16:32:03 -0200 | [diff] [blame] | 3287 | chip_name = "em2800"; |
Mauro Carvalho Chehab | f57b17c3 | 2009-11-12 11:21:05 -0300 | [diff] [blame] | 3288 | break; |
Mauro Carvalho Chehab | fcd20e3 | 2009-08-10 02:57:57 -0300 | [diff] [blame] | 3289 | case CHIP_ID_EM2710: |
Mauro Carvalho Chehab | a3efa1c | 2012-12-23 16:32:03 -0200 | [diff] [blame] | 3290 | chip_name = "em2710"; |
Mauro Carvalho Chehab | fcd20e3 | 2009-08-10 02:57:57 -0300 | [diff] [blame] | 3291 | break; |
| 3292 | case CHIP_ID_EM2750: |
Mauro Carvalho Chehab | a3efa1c | 2012-12-23 16:32:03 -0200 | [diff] [blame] | 3293 | chip_name = "em2750"; |
Mauro Carvalho Chehab | fcd20e3 | 2009-08-10 02:57:57 -0300 | [diff] [blame] | 3294 | break; |
Frank Schaefer | 736a320 | 2013-03-26 13:38:37 -0300 | [diff] [blame] | 3295 | case CHIP_ID_EM2765: |
| 3296 | chip_name = "em2765"; |
| 3297 | dev->wait_after_write = 0; |
| 3298 | dev->is_em25xx = 1; |
| 3299 | dev->eeprom_addrwidth_16bit = 1; |
| 3300 | break; |
Mauro Carvalho Chehab | fcd20e3 | 2009-08-10 02:57:57 -0300 | [diff] [blame] | 3301 | case CHIP_ID_EM2820: |
Mauro Carvalho Chehab | a3efa1c | 2012-12-23 16:32:03 -0200 | [diff] [blame] | 3302 | chip_name = "em2710/2820"; |
Mauro Carvalho Chehab | c6d4813 | 2016-12-07 14:34:22 -0200 | [diff] [blame] | 3303 | if (le16_to_cpu(udev->descriptor.idVendor) == 0xeb1a) { |
| 3304 | __le16 idProd = udev->descriptor.idProduct; |
Mauro Carvalho Chehab | fdf1bc9 | 2014-11-28 08:34:15 -0300 | [diff] [blame] | 3305 | |
Frank Schaefer | 61ff5d6 | 2013-04-11 15:56:47 -0300 | [diff] [blame] | 3306 | if (le16_to_cpu(idProd) == 0x2710) |
| 3307 | chip_name = "em2710"; |
| 3308 | else if (le16_to_cpu(idProd) == 0x2820) |
| 3309 | chip_name = "em2820"; |
| 3310 | } |
| 3311 | /* NOTE: the em2820 is used in webcams, too ! */ |
Mauro Carvalho Chehab | fcd20e3 | 2009-08-10 02:57:57 -0300 | [diff] [blame] | 3312 | break; |
| 3313 | case CHIP_ID_EM2840: |
Mauro Carvalho Chehab | a3efa1c | 2012-12-23 16:32:03 -0200 | [diff] [blame] | 3314 | chip_name = "em2840"; |
Mauro Carvalho Chehab | fcd20e3 | 2009-08-10 02:57:57 -0300 | [diff] [blame] | 3315 | break; |
| 3316 | case CHIP_ID_EM2860: |
Mauro Carvalho Chehab | a3efa1c | 2012-12-23 16:32:03 -0200 | [diff] [blame] | 3317 | chip_name = "em2860"; |
Mauro Carvalho Chehab | fcd20e3 | 2009-08-10 02:57:57 -0300 | [diff] [blame] | 3318 | break; |
| 3319 | case CHIP_ID_EM2870: |
Mauro Carvalho Chehab | a3efa1c | 2012-12-23 16:32:03 -0200 | [diff] [blame] | 3320 | chip_name = "em2870"; |
Mauro Carvalho Chehab | fcd20e3 | 2009-08-10 02:57:57 -0300 | [diff] [blame] | 3321 | dev->wait_after_write = 0; |
| 3322 | break; |
| 3323 | case CHIP_ID_EM2874: |
Mauro Carvalho Chehab | a3efa1c | 2012-12-23 16:32:03 -0200 | [diff] [blame] | 3324 | chip_name = "em2874"; |
Mauro Carvalho Chehab | fcd20e3 | 2009-08-10 02:57:57 -0300 | [diff] [blame] | 3325 | dev->wait_after_write = 0; |
Frank Schaefer | 87b5243 | 2013-03-03 15:37:40 -0300 | [diff] [blame] | 3326 | dev->eeprom_addrwidth_16bit = 1; |
Mauro Carvalho Chehab | fcd20e3 | 2009-08-10 02:57:57 -0300 | [diff] [blame] | 3327 | break; |
Antti Palosaari | bc02269 | 2011-04-07 16:04:48 -0300 | [diff] [blame] | 3328 | case CHIP_ID_EM28174: |
Mauro Carvalho Chehab | a3efa1c | 2012-12-23 16:32:03 -0200 | [diff] [blame] | 3329 | chip_name = "em28174"; |
Antti Palosaari | bc02269 | 2011-04-07 16:04:48 -0300 | [diff] [blame] | 3330 | dev->wait_after_write = 0; |
Frank Schaefer | 87b5243 | 2013-03-03 15:37:40 -0300 | [diff] [blame] | 3331 | dev->eeprom_addrwidth_16bit = 1; |
Antti Palosaari | bc02269 | 2011-04-07 16:04:48 -0300 | [diff] [blame] | 3332 | break; |
Antti Palosaari | 9f1d0bd | 2013-02-25 08:19:04 -0300 | [diff] [blame] | 3333 | case CHIP_ID_EM28178: |
| 3334 | chip_name = "em28178"; |
| 3335 | dev->wait_after_write = 0; |
| 3336 | dev->eeprom_addrwidth_16bit = 1; |
| 3337 | break; |
Mauro Carvalho Chehab | fcd20e3 | 2009-08-10 02:57:57 -0300 | [diff] [blame] | 3338 | case CHIP_ID_EM2883: |
Mauro Carvalho Chehab | a3efa1c | 2012-12-23 16:32:03 -0200 | [diff] [blame] | 3339 | chip_name = "em2882/3"; |
Mauro Carvalho Chehab | fcd20e3 | 2009-08-10 02:57:57 -0300 | [diff] [blame] | 3340 | dev->wait_after_write = 0; |
| 3341 | break; |
Mauro Carvalho Chehab | fec528b | 2011-07-03 21:05:06 -0300 | [diff] [blame] | 3342 | case CHIP_ID_EM2884: |
Mauro Carvalho Chehab | a3efa1c | 2012-12-23 16:32:03 -0200 | [diff] [blame] | 3343 | chip_name = "em2884"; |
Mauro Carvalho Chehab | fec528b | 2011-07-03 21:05:06 -0300 | [diff] [blame] | 3344 | dev->wait_after_write = 0; |
Frank Schaefer | 87b5243 | 2013-03-03 15:37:40 -0300 | [diff] [blame] | 3345 | dev->eeprom_addrwidth_16bit = 1; |
Mauro Carvalho Chehab | fec528b | 2011-07-03 21:05:06 -0300 | [diff] [blame] | 3346 | break; |
Mauro Carvalho Chehab | fcd20e3 | 2009-08-10 02:57:57 -0300 | [diff] [blame] | 3347 | } |
| 3348 | } |
Mauro Carvalho Chehab | ea48c36 | 2016-12-07 14:53:26 -0200 | [diff] [blame] | 3349 | if (!chip_name) |
Mauro Carvalho Chehab | 29b05e2 | 2016-12-07 13:48:10 -0200 | [diff] [blame] | 3350 | dev_info(&dev->intf->dev, |
Mauro Carvalho Chehab | ea48c36 | 2016-12-07 14:53:26 -0200 | [diff] [blame] | 3351 | "unknown em28xx chip ID (%d)\n", dev->chip_id); |
Mauro Carvalho Chehab | ce8591f | 2016-10-20 08:42:03 -0200 | [diff] [blame] | 3352 | else |
Mauro Carvalho Chehab | 29b05e2 | 2016-12-07 13:48:10 -0200 | [diff] [blame] | 3353 | dev_info(&dev->intf->dev, "chip ID is %s\n", chip_name); |
Mauro Carvalho Chehab | a3efa1c | 2012-12-23 16:32:03 -0200 | [diff] [blame] | 3354 | |
Mauro Carvalho Chehab | 37ecc7b | 2016-01-27 07:07:24 -0200 | [diff] [blame] | 3355 | em28xx_media_device_init(dev, udev); |
| 3356 | |
Mauro Carvalho Chehab | 4f83e7b | 2011-06-17 15:15:12 -0300 | [diff] [blame] | 3357 | if (dev->is_audio_only) { |
Chris Rankin | 6c03e38 | 2011-08-20 08:28:17 -0300 | [diff] [blame] | 3358 | retval = em28xx_audio_setup(dev); |
| 3359 | if (retval) |
Mauro Carvalho Chehab | 4f83e7b | 2011-06-17 15:15:12 -0300 | [diff] [blame] | 3360 | return -ENODEV; |
Mauro Carvalho Chehab | 4f83e7b | 2011-06-17 15:15:12 -0300 | [diff] [blame] | 3361 | em28xx_init_extension(dev); |
| 3362 | |
| 3363 | return 0; |
| 3364 | } |
| 3365 | |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3366 | em28xx_pre_card_setup(dev); |
| 3367 | |
| 3368 | if (!dev->board.is_em2800) { |
Mauro Carvalho Chehab | ca3dfd6 | 2010-09-10 17:29:14 -0300 | [diff] [blame] | 3369 | /* Resets I2C speed */ |
Sascha Sommer | 0903bb5 | 2012-01-08 16:19:30 -0300 | [diff] [blame] | 3370 | retval = em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, dev->board.i2c_speed); |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3371 | if (retval < 0) { |
Mauro Carvalho Chehab | 29b05e2 | 2016-12-07 13:48:10 -0200 | [diff] [blame] | 3372 | dev_err(&dev->intf->dev, |
Mauro Carvalho Chehab | ce8591f | 2016-10-20 08:42:03 -0200 | [diff] [blame] | 3373 | "%s: em28xx_write_reg failed! retval [%d]\n", |
Mauro Carvalho Chehab | 2a96f60 | 2016-10-12 07:32:23 -0300 | [diff] [blame] | 3374 | __func__, retval); |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3375 | return retval; |
| 3376 | } |
| 3377 | } |
| 3378 | |
Mauro Carvalho Chehab | aab3125 | 2013-03-05 06:55:28 -0300 | [diff] [blame] | 3379 | rt_mutex_init(&dev->i2c_bus_lock); |
| 3380 | |
| 3381 | /* register i2c bus 0 */ |
Frank Schaefer | a3ea4bf | 2013-03-26 13:38:36 -0300 | [diff] [blame] | 3382 | if (dev->board.is_em2800) |
| 3383 | retval = em28xx_i2c_register(dev, 0, EM28XX_I2C_ALGO_EM2800); |
| 3384 | else |
| 3385 | retval = em28xx_i2c_register(dev, 0, EM28XX_I2C_ALGO_EM28XX); |
Chris Rankin | 6c03e38 | 2011-08-20 08:28:17 -0300 | [diff] [blame] | 3386 | if (retval < 0) { |
Mauro Carvalho Chehab | 29b05e2 | 2016-12-07 13:48:10 -0200 | [diff] [blame] | 3387 | dev_err(&dev->intf->dev, |
Mauro Carvalho Chehab | ce8591f | 2016-10-20 08:42:03 -0200 | [diff] [blame] | 3388 | "%s: em28xx_i2c_register bus 0 - error [%d]!\n", |
Mauro Carvalho Chehab | 2a96f60 | 2016-10-12 07:32:23 -0300 | [diff] [blame] | 3389 | __func__, retval); |
Mauro Carvalho Chehab | b64f8e9 | 2013-12-22 13:16:49 -0300 | [diff] [blame] | 3390 | return retval; |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3391 | } |
| 3392 | |
Frank Schaefer | a3ea4bf | 2013-03-26 13:38:36 -0300 | [diff] [blame] | 3393 | /* register i2c bus 1 */ |
Mauro Carvalho Chehab | aab3125 | 2013-03-05 06:55:28 -0300 | [diff] [blame] | 3394 | if (dev->def_i2c_bus) { |
Frank Schaefer | 736a320 | 2013-03-26 13:38:37 -0300 | [diff] [blame] | 3395 | if (dev->is_em25xx) |
| 3396 | retval = em28xx_i2c_register(dev, 1, |
Mauro Carvalho Chehab | fdf1bc9 | 2014-11-28 08:34:15 -0300 | [diff] [blame] | 3397 | EM28XX_I2C_ALGO_EM25XX_BUS_B); |
Frank Schaefer | 736a320 | 2013-03-26 13:38:37 -0300 | [diff] [blame] | 3398 | else |
| 3399 | retval = em28xx_i2c_register(dev, 1, |
Mauro Carvalho Chehab | fdf1bc9 | 2014-11-28 08:34:15 -0300 | [diff] [blame] | 3400 | EM28XX_I2C_ALGO_EM28XX); |
Mauro Carvalho Chehab | aab3125 | 2013-03-05 06:55:28 -0300 | [diff] [blame] | 3401 | if (retval < 0) { |
Mauro Carvalho Chehab | 29b05e2 | 2016-12-07 13:48:10 -0200 | [diff] [blame] | 3402 | dev_err(&dev->intf->dev, |
Mauro Carvalho Chehab | ce8591f | 2016-10-20 08:42:03 -0200 | [diff] [blame] | 3403 | "%s: em28xx_i2c_register bus 1 - error [%d]!\n", |
Mauro Carvalho Chehab | 2a96f60 | 2016-10-12 07:32:23 -0300 | [diff] [blame] | 3404 | __func__, retval); |
Mauro Carvalho Chehab | 1f0ee65 | 2014-01-05 08:43:40 -0300 | [diff] [blame] | 3405 | |
| 3406 | em28xx_i2c_unregister(dev, 0); |
| 3407 | |
Mauro Carvalho Chehab | b64f8e9 | 2013-12-22 13:16:49 -0300 | [diff] [blame] | 3408 | return retval; |
Mauro Carvalho Chehab | aab3125 | 2013-03-05 06:55:28 -0300 | [diff] [blame] | 3409 | } |
| 3410 | } |
| 3411 | |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3412 | /* Do board specific init and eeprom reading */ |
| 3413 | em28xx_card_setup(dev); |
| 3414 | |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3415 | return 0; |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3416 | } |
| 3417 | |
Mauro Carvalho Chehab | 4f83e7b | 2011-06-17 15:15:12 -0300 | [diff] [blame] | 3418 | /* high bandwidth multiplier, as encoded in highspeed endpoint descriptors */ |
| 3419 | #define hb_mult(wMaxPacketSize) (1 + (((wMaxPacketSize) >> 11) & 0x03)) |
| 3420 | |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3421 | /* |
| 3422 | * em28xx_usb_probe() |
| 3423 | * checks for supported devices |
| 3424 | */ |
| 3425 | static int em28xx_usb_probe(struct usb_interface *interface, |
| 3426 | const struct usb_device_id *id) |
| 3427 | { |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3428 | struct usb_device *udev; |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3429 | struct em28xx *dev = NULL; |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 3430 | int retval; |
Frank Schaefer | c587420 | 2014-09-13 05:52:20 -0300 | [diff] [blame] | 3431 | bool has_vendor_audio = false, has_video = false, has_dvb = false; |
Mauro Carvalho Chehab | 8b2aea7 | 2012-12-23 13:25:38 -0200 | [diff] [blame] | 3432 | int i, nr, try_bulk; |
Mauro Carvalho Chehab | 4f83e7b | 2011-06-17 15:15:12 -0300 | [diff] [blame] | 3433 | const int ifnum = interface->altsetting[0].desc.bInterfaceNumber; |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3434 | char *speed; |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3435 | |
| 3436 | udev = usb_get_dev(interface_to_usbdev(interface)); |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3437 | |
| 3438 | /* Check to see next free device and mark as used */ |
Chris Rankin | 38b61eb | 2011-08-20 08:21:03 -0300 | [diff] [blame] | 3439 | do { |
Mauro Carvalho Chehab | c3aed26 | 2014-01-14 17:35:15 -0300 | [diff] [blame] | 3440 | nr = find_first_zero_bit(em28xx_devused, EM28XX_MAXBOARDS); |
Chris Rankin | 38b61eb | 2011-08-20 08:21:03 -0300 | [diff] [blame] | 3441 | if (nr >= EM28XX_MAXBOARDS) { |
| 3442 | /* No free device slots */ |
Mauro Carvalho Chehab | 29b05e2 | 2016-12-07 13:48:10 -0200 | [diff] [blame] | 3443 | dev_err(&interface->dev, |
Mauro Carvalho Chehab | ce8591f | 2016-10-20 08:42:03 -0200 | [diff] [blame] | 3444 | "Driver supports up to %i em28xx boards.\n", |
Mauro Carvalho Chehab | fdf1bc9 | 2014-11-28 08:34:15 -0300 | [diff] [blame] | 3445 | EM28XX_MAXBOARDS); |
Chris Rankin | 38b61eb | 2011-08-20 08:21:03 -0300 | [diff] [blame] | 3446 | retval = -ENOMEM; |
| 3447 | goto err_no_slot; |
| 3448 | } |
Mauro Carvalho Chehab | c3aed26 | 2014-01-14 17:35:15 -0300 | [diff] [blame] | 3449 | } while (test_and_set_bit(nr, em28xx_devused)); |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3450 | |
| 3451 | /* Don't register audio interfaces */ |
| 3452 | if (interface->altsetting[0].desc.bInterfaceClass == USB_CLASS_AUDIO) { |
Mauro Carvalho Chehab | 29b05e2 | 2016-12-07 13:48:10 -0200 | [diff] [blame] | 3453 | dev_err(&interface->dev, |
Mauro Carvalho Chehab | ce8591f | 2016-10-20 08:42:03 -0200 | [diff] [blame] | 3454 | "audio device (%04x:%04x): interface %i, class %i\n", |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3455 | le16_to_cpu(udev->descriptor.idVendor), |
| 3456 | le16_to_cpu(udev->descriptor.idProduct), |
| 3457 | ifnum, |
| 3458 | interface->altsetting[0].desc.bInterfaceClass); |
| 3459 | |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 3460 | retval = -ENODEV; |
| 3461 | goto err; |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3462 | } |
| 3463 | |
Holger Nelson | 8ab3362 | 2011-12-28 18:55:41 -0300 | [diff] [blame] | 3464 | /* allocate memory for our device state and initialize it */ |
| 3465 | dev = kzalloc(sizeof(*dev), GFP_KERNEL); |
| 3466 | if (dev == NULL) { |
Holger Nelson | 8ab3362 | 2011-12-28 18:55:41 -0300 | [diff] [blame] | 3467 | retval = -ENOMEM; |
| 3468 | goto err; |
| 3469 | } |
| 3470 | |
| 3471 | /* compute alternate max packet sizes */ |
Frank Schaefer | 0cf544a | 2012-11-08 14:11:49 -0300 | [diff] [blame] | 3472 | dev->alt_max_pkt_size_isoc = |
| 3473 | kmalloc(sizeof(dev->alt_max_pkt_size_isoc[0]) * |
Holger Nelson | 8ab3362 | 2011-12-28 18:55:41 -0300 | [diff] [blame] | 3474 | interface->num_altsetting, GFP_KERNEL); |
Frank Schaefer | 0cf544a | 2012-11-08 14:11:49 -0300 | [diff] [blame] | 3475 | if (dev->alt_max_pkt_size_isoc == NULL) { |
Holger Nelson | 8ab3362 | 2011-12-28 18:55:41 -0300 | [diff] [blame] | 3476 | kfree(dev); |
| 3477 | retval = -ENOMEM; |
| 3478 | goto err; |
| 3479 | } |
| 3480 | |
Mauro Carvalho Chehab | 4f83e7b | 2011-06-17 15:15:12 -0300 | [diff] [blame] | 3481 | /* Get endpoints */ |
| 3482 | for (i = 0; i < interface->num_altsetting; i++) { |
| 3483 | int ep; |
| 3484 | |
| 3485 | for (ep = 0; ep < interface->altsetting[i].desc.bNumEndpoints; ep++) { |
Holger Nelson | 8ab3362 | 2011-12-28 18:55:41 -0300 | [diff] [blame] | 3486 | const struct usb_endpoint_descriptor *e; |
| 3487 | int sizedescr, size; |
Mauro Carvalho Chehab | 4f83e7b | 2011-06-17 15:15:12 -0300 | [diff] [blame] | 3488 | |
Holger Nelson | 8ab3362 | 2011-12-28 18:55:41 -0300 | [diff] [blame] | 3489 | e = &interface->altsetting[i].endpoint[ep].desc; |
| 3490 | |
| 3491 | sizedescr = le16_to_cpu(e->wMaxPacketSize); |
| 3492 | size = sizedescr & 0x7ff; |
| 3493 | |
| 3494 | if (udev->speed == USB_SPEED_HIGH) |
| 3495 | size = size * hb_mult(sizedescr); |
| 3496 | |
Frank Schaefer | c647a91 | 2012-11-08 14:11:52 -0300 | [diff] [blame] | 3497 | if (usb_endpoint_dir_in(e)) { |
Holger Nelson | 8ab3362 | 2011-12-28 18:55:41 -0300 | [diff] [blame] | 3498 | switch (e->bEndpointAddress) { |
Frank Schaefer | c647a91 | 2012-11-08 14:11:52 -0300 | [diff] [blame] | 3499 | case 0x82: |
Holger Nelson | 8ab3362 | 2011-12-28 18:55:41 -0300 | [diff] [blame] | 3500 | has_video = true; |
Frank Schaefer | c647a91 | 2012-11-08 14:11:52 -0300 | [diff] [blame] | 3501 | if (usb_endpoint_xfer_isoc(e)) { |
| 3502 | dev->analog_ep_isoc = |
| 3503 | e->bEndpointAddress; |
| 3504 | dev->alt_max_pkt_size_isoc[i] = size; |
| 3505 | } else if (usb_endpoint_xfer_bulk(e)) { |
| 3506 | dev->analog_ep_bulk = |
| 3507 | e->bEndpointAddress; |
| 3508 | } |
Holger Nelson | 8ab3362 | 2011-12-28 18:55:41 -0300 | [diff] [blame] | 3509 | break; |
Frank Schaefer | c647a91 | 2012-11-08 14:11:52 -0300 | [diff] [blame] | 3510 | case 0x83: |
| 3511 | if (usb_endpoint_xfer_isoc(e)) { |
Frank Schaefer | c587420 | 2014-09-13 05:52:20 -0300 | [diff] [blame] | 3512 | has_vendor_audio = true; |
Frank Schaefer | c647a91 | 2012-11-08 14:11:52 -0300 | [diff] [blame] | 3513 | } else { |
Mauro Carvalho Chehab | 29b05e2 | 2016-12-07 13:48:10 -0200 | [diff] [blame] | 3514 | dev_err(&interface->dev, |
Mauro Carvalho Chehab | ce8591f | 2016-10-20 08:42:03 -0200 | [diff] [blame] | 3515 | "error: skipping audio endpoint 0x83, because it uses bulk transfers !\n"); |
Frank Schaefer | c647a91 | 2012-11-08 14:11:52 -0300 | [diff] [blame] | 3516 | } |
| 3517 | break; |
| 3518 | case 0x84: |
| 3519 | if (has_video && |
| 3520 | (usb_endpoint_xfer_bulk(e))) { |
| 3521 | dev->analog_ep_bulk = |
| 3522 | e->bEndpointAddress; |
| 3523 | } else { |
Frank Schaefer | c647a91 | 2012-11-08 14:11:52 -0300 | [diff] [blame] | 3524 | if (usb_endpoint_xfer_isoc(e)) { |
Frank Schaefer | c647a91 | 2012-11-08 14:11:52 -0300 | [diff] [blame] | 3525 | if (size > dev->dvb_max_pkt_size_isoc) { |
Frank Schaefer | 72cc9ba | 2013-03-27 16:07:41 -0300 | [diff] [blame] | 3526 | has_dvb = true; /* see NOTE (~) */ |
Frank Schaefer | b3404a8 | 2013-04-08 13:06:59 -0300 | [diff] [blame] | 3527 | dev->dvb_ep_isoc = e->bEndpointAddress; |
Frank Schaefer | c647a91 | 2012-11-08 14:11:52 -0300 | [diff] [blame] | 3528 | dev->dvb_max_pkt_size_isoc = size; |
| 3529 | dev->dvb_alt_isoc = i; |
| 3530 | } |
| 3531 | } else { |
Frank Schaefer | 72cc9ba | 2013-03-27 16:07:41 -0300 | [diff] [blame] | 3532 | has_dvb = true; |
Frank Schaefer | c647a91 | 2012-11-08 14:11:52 -0300 | [diff] [blame] | 3533 | dev->dvb_ep_bulk = e->bEndpointAddress; |
| 3534 | } |
Holger Nelson | 8ab3362 | 2011-12-28 18:55:41 -0300 | [diff] [blame] | 3535 | } |
| 3536 | break; |
| 3537 | } |
| 3538 | } |
Frank Schaefer | c647a91 | 2012-11-08 14:11:52 -0300 | [diff] [blame] | 3539 | /* NOTE: |
| 3540 | * Old logic with support for isoc transfers only was: |
| 3541 | * 0x82 isoc => analog |
| 3542 | * 0x83 isoc => audio |
| 3543 | * 0x84 isoc => digital |
| 3544 | * |
| 3545 | * New logic with support for bulk transfers |
| 3546 | * 0x82 isoc => analog |
| 3547 | * 0x82 bulk => analog |
| 3548 | * 0x83 isoc* => audio |
| 3549 | * 0x84 isoc => digital |
| 3550 | * 0x84 bulk => analog or digital** |
| 3551 | * (*: audio should always be isoc) |
| 3552 | * (**: analog, if ep 0x82 is isoc, otherwise digital) |
| 3553 | * |
| 3554 | * The new logic preserves backwards compatibility and |
| 3555 | * reflects the endpoint configurations we have seen |
| 3556 | * so far. But there might be devices for which this |
| 3557 | * logic is not sufficient... |
| 3558 | */ |
Frank Schaefer | 72cc9ba | 2013-03-27 16:07:41 -0300 | [diff] [blame] | 3559 | /* |
| 3560 | * NOTE (~): some manufacturers (e.g. Terratec) disable |
| 3561 | * endpoints by setting wMaxPacketSize to 0 bytes for |
| 3562 | * all alt settings. So far, we've seen this for |
| 3563 | * DVB isoc endpoints only. |
| 3564 | */ |
Mauro Carvalho Chehab | 4f83e7b | 2011-06-17 15:15:12 -0300 | [diff] [blame] | 3565 | } |
| 3566 | } |
| 3567 | |
Frank Schaefer | c587420 | 2014-09-13 05:52:20 -0300 | [diff] [blame] | 3568 | if (!(has_vendor_audio || has_video || has_dvb)) { |
Holger Nelson | 8ab3362 | 2011-12-28 18:55:41 -0300 | [diff] [blame] | 3569 | retval = -ENODEV; |
| 3570 | goto err_free; |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3571 | } |
| 3572 | |
| 3573 | switch (udev->speed) { |
| 3574 | case USB_SPEED_LOW: |
| 3575 | speed = "1.5"; |
| 3576 | break; |
| 3577 | case USB_SPEED_UNKNOWN: |
| 3578 | case USB_SPEED_FULL: |
| 3579 | speed = "12"; |
| 3580 | break; |
| 3581 | case USB_SPEED_HIGH: |
| 3582 | speed = "480"; |
| 3583 | break; |
| 3584 | default: |
| 3585 | speed = "unknown"; |
| 3586 | } |
| 3587 | |
Mauro Carvalho Chehab | 29b05e2 | 2016-12-07 13:48:10 -0200 | [diff] [blame] | 3588 | dev_err(&interface->dev, |
Mauro Carvalho Chehab | ce8591f | 2016-10-20 08:42:03 -0200 | [diff] [blame] | 3589 | "New device %s %s @ %s Mbps (%04x:%04x, interface %d, class %d)\n", |
Ezequiel GarcÃa | 401a582 | 2012-03-13 10:27:09 -0300 | [diff] [blame] | 3590 | udev->manufacturer ? udev->manufacturer : "", |
| 3591 | udev->product ? udev->product : "", |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3592 | speed, |
| 3593 | le16_to_cpu(udev->descriptor.idVendor), |
| 3594 | le16_to_cpu(udev->descriptor.idProduct), |
| 3595 | ifnum, |
| 3596 | interface->altsetting->desc.bInterfaceNumber); |
| 3597 | |
Devin Heitmueller | 64a00b4 | 2009-05-27 23:23:37 -0300 | [diff] [blame] | 3598 | /* |
| 3599 | * Make sure we have 480 Mbps of bandwidth, otherwise things like |
| 3600 | * video stream wouldn't likely work, since 12 Mbps is generally |
| 3601 | * not enough even for most Digital TV streams. |
| 3602 | */ |
Devin Heitmueller | e2a1b79 | 2009-05-27 23:44:10 -0300 | [diff] [blame] | 3603 | if (udev->speed != USB_SPEED_HIGH && disable_usb_speed_check == 0) { |
Mauro Carvalho Chehab | 29b05e2 | 2016-12-07 13:48:10 -0200 | [diff] [blame] | 3604 | dev_err(&interface->dev, "Device initialization failed.\n"); |
| 3605 | dev_err(&interface->dev, |
Mauro Carvalho Chehab | ce8591f | 2016-10-20 08:42:03 -0200 | [diff] [blame] | 3606 | "Device must be connected to a high-speed USB 2.0 port.\n"); |
Devin Heitmueller | 64a00b4 | 2009-05-27 23:23:37 -0300 | [diff] [blame] | 3607 | retval = -ENODEV; |
Holger Nelson | 8ab3362 | 2011-12-28 18:55:41 -0300 | [diff] [blame] | 3608 | goto err_free; |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3609 | } |
| 3610 | |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3611 | dev->devno = nr; |
| 3612 | dev->model = id->driver_info; |
| 3613 | dev->alt = -1; |
Frank Schaefer | c587420 | 2014-09-13 05:52:20 -0300 | [diff] [blame] | 3614 | dev->is_audio_only = has_vendor_audio && !(has_video || has_dvb); |
Mauro Carvalho Chehab | 01c2819 | 2013-12-22 13:27:02 -0300 | [diff] [blame] | 3615 | dev->has_video = has_video; |
Frank Schaefer | 961717b | 2014-01-13 19:02:06 -0300 | [diff] [blame] | 3616 | dev->ifnum = ifnum; |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3617 | |
Frank Schaefer | c587420 | 2014-09-13 05:52:20 -0300 | [diff] [blame] | 3618 | if (has_vendor_audio) { |
Mauro Carvalho Chehab | 29b05e2 | 2016-12-07 13:48:10 -0200 | [diff] [blame] | 3619 | dev_err(&interface->dev, |
Mauro Carvalho Chehab | ce8591f | 2016-10-20 08:42:03 -0200 | [diff] [blame] | 3620 | "Audio interface %i found (Vendor Class)\n", ifnum); |
Frank Schaefer | c587420 | 2014-09-13 05:52:20 -0300 | [diff] [blame] | 3621 | dev->usb_audio_type = EM28XX_USB_AUDIO_VENDOR; |
| 3622 | } |
| 3623 | /* Checks if audio is provided by a USB Audio Class interface */ |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3624 | for (i = 0; i < udev->config->desc.bNumInterfaces; i++) { |
Mauro Carvalho Chehab | 4f83e7b | 2011-06-17 15:15:12 -0300 | [diff] [blame] | 3625 | struct usb_interface *uif = udev->config->interface[i]; |
Mauro Carvalho Chehab | fdf1bc9 | 2014-11-28 08:34:15 -0300 | [diff] [blame] | 3626 | |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3627 | if (uif->altsetting[0].desc.bInterfaceClass == USB_CLASS_AUDIO) { |
Frank Schaefer | c587420 | 2014-09-13 05:52:20 -0300 | [diff] [blame] | 3628 | if (has_vendor_audio) |
Mauro Carvalho Chehab | 29b05e2 | 2016-12-07 13:48:10 -0200 | [diff] [blame] | 3629 | dev_err(&interface->dev, |
Mauro Carvalho Chehab | ce8591f | 2016-10-20 08:42:03 -0200 | [diff] [blame] | 3630 | "em28xx: device seems to have vendor AND usb audio class interfaces !\n" |
Mauro Carvalho Chehab | 2a96f60 | 2016-10-12 07:32:23 -0300 | [diff] [blame] | 3631 | "\t\tThe vendor interface will be ignored. Please contact the developers <linux-media@vger.kernel.org>\n"); |
Frank Schaefer | c587420 | 2014-09-13 05:52:20 -0300 | [diff] [blame] | 3632 | dev->usb_audio_type = EM28XX_USB_AUDIO_CLASS; |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3633 | break; |
| 3634 | } |
| 3635 | } |
| 3636 | |
Mauro Carvalho Chehab | aa51496 | 2012-12-23 13:15:47 -0200 | [diff] [blame] | 3637 | if (has_video) |
Mauro Carvalho Chehab | 29b05e2 | 2016-12-07 13:48:10 -0200 | [diff] [blame] | 3638 | dev_err(&interface->dev, "Video interface %i found:%s%s\n", |
Mauro Carvalho Chehab | 2a96f60 | 2016-10-12 07:32:23 -0300 | [diff] [blame] | 3639 | ifnum, |
| 3640 | dev->analog_ep_bulk ? " bulk" : "", |
| 3641 | dev->analog_ep_isoc ? " isoc" : ""); |
Mauro Carvalho Chehab | aa51496 | 2012-12-23 13:15:47 -0200 | [diff] [blame] | 3642 | if (has_dvb) |
Mauro Carvalho Chehab | 29b05e2 | 2016-12-07 13:48:10 -0200 | [diff] [blame] | 3643 | dev_err(&interface->dev, "DVB interface %i found:%s%s\n", |
Mauro Carvalho Chehab | 2a96f60 | 2016-10-12 07:32:23 -0300 | [diff] [blame] | 3644 | ifnum, |
| 3645 | dev->dvb_ep_bulk ? " bulk" : "", |
| 3646 | dev->dvb_ep_isoc ? " isoc" : ""); |
Mauro Carvalho Chehab | aa51496 | 2012-12-23 13:15:47 -0200 | [diff] [blame] | 3647 | |
Mauro Carvalho Chehab | 4f83e7b | 2011-06-17 15:15:12 -0300 | [diff] [blame] | 3648 | dev->num_alt = interface->num_altsetting; |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3649 | |
Mauro Carvalho Chehab | d3e4ea0 | 2012-10-27 16:29:20 -0300 | [diff] [blame] | 3650 | if ((unsigned)card[nr] < em28xx_bcount) |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3651 | dev->model = card[nr]; |
| 3652 | |
Mauro Carvalho Chehab | 4f83e7b | 2011-06-17 15:15:12 -0300 | [diff] [blame] | 3653 | /* save our data pointer in this interface device */ |
| 3654 | usb_set_intfdata(interface, dev); |
| 3655 | |
Mauro Carvalho Chehab | 22580f7 | 2016-01-29 12:53:56 -0200 | [diff] [blame] | 3656 | /* allocate device struct and check if the device is a webcam */ |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3657 | mutex_init(&dev->lock); |
Thomas Petazzoni | 622c2fc | 2012-01-07 10:18:45 -0300 | [diff] [blame] | 3658 | retval = em28xx_init_dev(dev, udev, interface, nr); |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3659 | if (retval) { |
Mauro Carvalho Chehab | 01c2819 | 2013-12-22 13:27:02 -0300 | [diff] [blame] | 3660 | goto err_free; |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3661 | } |
| 3662 | |
Frank Schaefer | 7e5d74e | 2012-12-26 15:12:37 -0300 | [diff] [blame] | 3663 | if (usb_xfer_mode < 0) { |
Mauro Carvalho Chehab | 8b2aea7 | 2012-12-23 13:25:38 -0200 | [diff] [blame] | 3664 | if (dev->board.is_webcam) |
| 3665 | try_bulk = 1; |
| 3666 | else |
| 3667 | try_bulk = 0; |
| 3668 | } else { |
Frank Schaefer | 7e5d74e | 2012-12-26 15:12:37 -0300 | [diff] [blame] | 3669 | try_bulk = usb_xfer_mode > 0; |
Mauro Carvalho Chehab | 8b2aea7 | 2012-12-23 13:25:38 -0200 | [diff] [blame] | 3670 | } |
| 3671 | |
Frank Schaefer | 85316cf | 2017-04-15 07:05:02 -0300 | [diff] [blame] | 3672 | /* Disable V4L2 if the device doesn't have a decoder or image sensor */ |
Mauro Carvalho Chehab | 22580f7 | 2016-01-29 12:53:56 -0200 | [diff] [blame] | 3673 | if (has_video && |
Frank Schaefer | 85316cf | 2017-04-15 07:05:02 -0300 | [diff] [blame] | 3674 | dev->board.decoder == EM28XX_NODECODER && |
| 3675 | dev->em28xx_sensor == EM28XX_NOSENSOR) { |
| 3676 | |
Mauro Carvalho Chehab | 29b05e2 | 2016-12-07 13:48:10 -0200 | [diff] [blame] | 3677 | dev_err(&interface->dev, |
Mauro Carvalho Chehab | ce8591f | 2016-10-20 08:42:03 -0200 | [diff] [blame] | 3678 | "Currently, V4L2 is not supported on this model\n"); |
Mauro Carvalho Chehab | 22580f7 | 2016-01-29 12:53:56 -0200 | [diff] [blame] | 3679 | has_video = false; |
| 3680 | dev->has_video = false; |
| 3681 | } |
| 3682 | |
Mauro Carvalho Chehab | 8b2aea7 | 2012-12-23 13:25:38 -0200 | [diff] [blame] | 3683 | /* Select USB transfer types to use */ |
| 3684 | if (has_video) { |
Frank Schaefer | 5869778 | 2014-03-22 10:00:59 -0300 | [diff] [blame] | 3685 | if (!dev->analog_ep_isoc || (try_bulk && dev->analog_ep_bulk)) |
| 3686 | dev->analog_xfer_bulk = 1; |
Mauro Carvalho Chehab | 29b05e2 | 2016-12-07 13:48:10 -0200 | [diff] [blame] | 3687 | dev_err(&interface->dev, "analog set to %s mode.\n", |
Mauro Carvalho Chehab | 2a96f60 | 2016-10-12 07:32:23 -0300 | [diff] [blame] | 3688 | dev->analog_xfer_bulk ? "bulk" : "isoc"); |
Mauro Carvalho Chehab | 8b2aea7 | 2012-12-23 13:25:38 -0200 | [diff] [blame] | 3689 | } |
Gianluca Gennari | 86d38d1 | 2012-02-13 13:59:22 -0300 | [diff] [blame] | 3690 | if (has_dvb) { |
Frank Schaefer | 5869778 | 2014-03-22 10:00:59 -0300 | [diff] [blame] | 3691 | if (!dev->dvb_ep_isoc || (try_bulk && dev->dvb_ep_bulk)) |
| 3692 | dev->dvb_xfer_bulk = 1; |
Mauro Carvalho Chehab | 29b05e2 | 2016-12-07 13:48:10 -0200 | [diff] [blame] | 3693 | dev_err(&interface->dev, "dvb set to %s mode.\n", |
Mauro Carvalho Chehab | 2a96f60 | 2016-10-12 07:32:23 -0300 | [diff] [blame] | 3694 | dev->dvb_xfer_bulk ? "bulk" : "isoc"); |
Gianluca Gennari | 86d38d1 | 2012-02-13 13:59:22 -0300 | [diff] [blame] | 3695 | } |
| 3696 | |
Mauro Carvalho Chehab | 47677e5 | 2014-03-05 11:21:07 -0300 | [diff] [blame] | 3697 | kref_init(&dev->ref); |
| 3698 | |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3699 | request_modules(dev); |
| 3700 | |
Mauro Carvalho Chehab | 37ecc7b | 2016-01-27 07:07:24 -0200 | [diff] [blame] | 3701 | /* |
| 3702 | * Do it at the end, to reduce dynamic configuration changes during |
| 3703 | * the device init. Yet, as request_modules() can be async, the |
| 3704 | * topology will likely change after the load of the em28xx subdrivers. |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3705 | */ |
Mauro Carvalho Chehab | 37ecc7b | 2016-01-27 07:07:24 -0200 | [diff] [blame] | 3706 | #ifdef CONFIG_MEDIA_CONTROLLER |
| 3707 | retval = media_device_register(dev->media_dev); |
| 3708 | #endif |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3709 | |
| 3710 | return 0; |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 3711 | |
Holger Nelson | 8ab3362 | 2011-12-28 18:55:41 -0300 | [diff] [blame] | 3712 | err_free: |
Frank Schaefer | 0cf544a | 2012-11-08 14:11:49 -0300 | [diff] [blame] | 3713 | kfree(dev->alt_max_pkt_size_isoc); |
Holger Nelson | 8ab3362 | 2011-12-28 18:55:41 -0300 | [diff] [blame] | 3714 | kfree(dev); |
| 3715 | |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 3716 | err: |
Mauro Carvalho Chehab | c3aed26 | 2014-01-14 17:35:15 -0300 | [diff] [blame] | 3717 | clear_bit(nr, em28xx_devused); |
Chris Rankin | 38b61eb | 2011-08-20 08:21:03 -0300 | [diff] [blame] | 3718 | |
| 3719 | err_no_slot: |
| 3720 | usb_put_dev(udev); |
Douglas Schilling Landgraf | f2cf250 | 2009-03-31 17:10:58 -0300 | [diff] [blame] | 3721 | return retval; |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3722 | } |
| 3723 | |
| 3724 | /* |
| 3725 | * em28xx_usb_disconnect() |
Chris Rankin | d7222e7 | 2011-09-24 11:02:32 -0300 | [diff] [blame] | 3726 | * called when the device gets disconnected |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3727 | * video device will be unregistered on v4l2_close in case it is still open |
| 3728 | */ |
| 3729 | static void em28xx_usb_disconnect(struct usb_interface *interface) |
| 3730 | { |
| 3731 | struct em28xx *dev; |
| 3732 | |
| 3733 | dev = usb_get_intfdata(interface); |
| 3734 | usb_set_intfdata(interface, NULL); |
| 3735 | |
| 3736 | if (!dev) |
| 3737 | return; |
| 3738 | |
Frank Schaefer | 05fe217 | 2012-12-27 19:02:44 -0300 | [diff] [blame] | 3739 | dev->disconnected = 1; |
| 3740 | |
Mauro Carvalho Chehab | 29b05e2 | 2016-12-07 13:48:10 -0200 | [diff] [blame] | 3741 | dev_err(&dev->intf->dev, "Disconnecting\n"); |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3742 | |
Tejun Heo | 707bcf3 | 2010-12-24 16:14:20 +0100 | [diff] [blame] | 3743 | flush_request_modules(dev); |
| 3744 | |
Frank Schaefer | 05fe217 | 2012-12-27 19:02:44 -0300 | [diff] [blame] | 3745 | em28xx_close_extension(dev); |
Mauro Carvalho Chehab | 54a2a84 | 2013-12-27 13:01:04 -0300 | [diff] [blame] | 3746 | |
Frank Schaefer | 5a620c7 | 2014-01-12 13:24:24 -0300 | [diff] [blame] | 3747 | em28xx_release_resources(dev); |
Mauro Carvalho Chehab | 47677e5 | 2014-03-05 11:21:07 -0300 | [diff] [blame] | 3748 | kref_put(&dev->ref, em28xx_free_device); |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3749 | } |
| 3750 | |
Shuah Khan | cd701c8 | 2014-02-21 21:50:18 -0300 | [diff] [blame] | 3751 | static int em28xx_usb_suspend(struct usb_interface *interface, |
Mauro Carvalho Chehab | fdf1bc9 | 2014-11-28 08:34:15 -0300 | [diff] [blame] | 3752 | pm_message_t message) |
Shuah Khan | cd701c8 | 2014-02-21 21:50:18 -0300 | [diff] [blame] | 3753 | { |
| 3754 | struct em28xx *dev; |
| 3755 | |
| 3756 | dev = usb_get_intfdata(interface); |
| 3757 | if (!dev) |
| 3758 | return 0; |
| 3759 | em28xx_suspend_extension(dev); |
| 3760 | return 0; |
| 3761 | } |
| 3762 | |
| 3763 | static int em28xx_usb_resume(struct usb_interface *interface) |
| 3764 | { |
| 3765 | struct em28xx *dev; |
| 3766 | |
| 3767 | dev = usb_get_intfdata(interface); |
| 3768 | if (!dev) |
| 3769 | return 0; |
| 3770 | em28xx_resume_extension(dev); |
| 3771 | return 0; |
| 3772 | } |
| 3773 | |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3774 | static struct usb_driver em28xx_usb_driver = { |
| 3775 | .name = "em28xx", |
| 3776 | .probe = em28xx_usb_probe, |
| 3777 | .disconnect = em28xx_usb_disconnect, |
Shuah Khan | cd701c8 | 2014-02-21 21:50:18 -0300 | [diff] [blame] | 3778 | .suspend = em28xx_usb_suspend, |
| 3779 | .resume = em28xx_usb_resume, |
Mauro Carvalho Chehab | 214635f | 2014-09-26 06:53:15 -0300 | [diff] [blame] | 3780 | .reset_resume = em28xx_usb_resume, |
Mauro Carvalho Chehab | 1a23f81 | 2008-12-28 22:18:14 -0300 | [diff] [blame] | 3781 | .id_table = em28xx_id_table, |
| 3782 | }; |
| 3783 | |
Greg Kroah-Hartman | ecb3b2b | 2011-11-18 09:46:12 -0800 | [diff] [blame] | 3784 | module_usb_driver(em28xx_usb_driver); |