akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 1 | /* |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 2 | em28xx-cards.c - driver for Empia EM2800/EM2820/2840 USB |
| 3 | video capture devices |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 4 | |
Mauro Carvalho Chehab | f7abcd3 | 2005-11-08 21:38:25 -0800 | [diff] [blame] | 5 | Copyright (C) 2005 Ludovico Cavedon <cavedon@sssup.it> |
| 6 | Markus Rechberger <mrechberger@gmail.com> |
Mauro Carvalho Chehab | 2e7c6dc | 2006-04-03 07:53:40 -0300 | [diff] [blame] | 7 | Mauro Carvalho Chehab <mchehab@infradead.org> |
Mauro Carvalho Chehab | f7abcd3 | 2005-11-08 21:38:25 -0800 | [diff] [blame] | 8 | Sascha Sommer <saschasommer@freenet.de> |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 9 | |
| 10 | This program is free software; you can redistribute it and/or modify |
| 11 | it under the terms of the GNU General Public License as published by |
| 12 | the Free Software Foundation; either version 2 of the License, or |
| 13 | (at your option) any later version. |
| 14 | |
| 15 | This program is distributed in the hope that it will be useful, |
| 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 | GNU General Public License for more details. |
| 19 | |
| 20 | You should have received a copy of the GNU General Public License |
| 21 | along with this program; if not, write to the Free Software |
| 22 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 23 | */ |
| 24 | |
| 25 | #include <linux/init.h> |
| 26 | #include <linux/module.h> |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 27 | #include <linux/delay.h> |
| 28 | #include <linux/i2c.h> |
| 29 | #include <linux/usb.h> |
| 30 | #include <media/tuner.h> |
Hans Verkuil | 2474ed4 | 2006-03-19 12:35:57 -0300 | [diff] [blame] | 31 | #include <media/msp3400.h> |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 32 | #include <media/saa7115.h> |
| 33 | #include <media/tvp5150.h> |
Mauro Carvalho Chehab | 1f6173e | 2005-11-08 21:37:16 -0800 | [diff] [blame] | 34 | #include <media/tveeprom.h> |
Hans Verkuil | 2474ed4 | 2006-03-19 12:35:57 -0300 | [diff] [blame] | 35 | #include <media/audiochip.h> |
Mauro Carvalho Chehab | 9bb13a6 | 2006-01-09 15:25:37 -0200 | [diff] [blame] | 36 | #include <media/v4l2-common.h> |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 37 | |
Mauro Carvalho Chehab | f7abcd3 | 2005-11-08 21:38:25 -0800 | [diff] [blame] | 38 | #include "em28xx.h" |
Mauro Carvalho Chehab | 882876b | 2007-10-29 11:33:18 -0300 | [diff] [blame] | 39 | #include "tuner-xc2028.h" |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 40 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 41 | static int tuner = -1; |
| 42 | module_param(tuner, int, 0444); |
| 43 | MODULE_PARM_DESC(tuner, "tuner type"); |
| 44 | |
| 45 | struct em28xx_hash_table { |
| 46 | unsigned long hash; |
| 47 | unsigned int model; |
| 48 | unsigned int tuner; |
| 49 | }; |
| 50 | |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 51 | struct em28xx_board em28xx_boards[] = { |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 52 | [EM2800_BOARD_UNKNOWN] = { |
| 53 | .name = "Unknown EM2800 video grabber", |
| 54 | .is_em2800 = 1, |
| 55 | .vchannels = 2, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 56 | .tda9887_conf = TDA9887_PRESENT, |
| 57 | .has_tuner = 1, |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 58 | .decoder = EM28XX_SAA7113, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 59 | .input = { { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 60 | .type = EM28XX_VMUX_COMPOSITE1, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 61 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 62 | .amux = 1, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 63 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 64 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 65 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 66 | .amux = 1, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 67 | } }, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 68 | }, |
| 69 | [EM2820_BOARD_UNKNOWN] = { |
Mauro Carvalho Chehab | 3dbd85b | 2007-11-03 08:07:07 -0300 | [diff] [blame] | 70 | .name = "Unknown EM2750/28xx video grabber", |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 71 | .is_em2800 = 0, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 72 | }, |
Markus Rechberger | 4d17d08 | 2006-02-07 06:25:39 -0200 | [diff] [blame] | 73 | [EM2820_BOARD_KWORLD_PVRTV2800RF] = { |
Markus Rechberger | 33ccaa3 | 2006-02-07 06:25:41 -0200 | [diff] [blame] | 74 | .name = "Kworld PVR TV 2800 RF", |
Markus Rechberger | 4d17d08 | 2006-02-07 06:25:39 -0200 | [diff] [blame] | 75 | .is_em2800 = 0, |
| 76 | .vchannels = 2, |
Markus Rechberger | 4d17d08 | 2006-02-07 06:25:39 -0200 | [diff] [blame] | 77 | .tda9887_conf = TDA9887_PRESENT, |
| 78 | .has_tuner = 1, |
| 79 | .decoder = EM28XX_SAA7113, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 80 | .input = { { |
Markus Rechberger | 4d17d08 | 2006-02-07 06:25:39 -0200 | [diff] [blame] | 81 | .type = EM28XX_VMUX_COMPOSITE1, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 82 | .vmux = SAA7115_COMPOSITE0, |
Markus Rechberger | 4d17d08 | 2006-02-07 06:25:39 -0200 | [diff] [blame] | 83 | .amux = 1, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 84 | }, { |
Markus Rechberger | 4d17d08 | 2006-02-07 06:25:39 -0200 | [diff] [blame] | 85 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 86 | .vmux = SAA7115_SVIDEO3, |
Markus Rechberger | 4d17d08 | 2006-02-07 06:25:39 -0200 | [diff] [blame] | 87 | .amux = 1, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 88 | } }, |
Markus Rechberger | 4d17d08 | 2006-02-07 06:25:39 -0200 | [diff] [blame] | 89 | }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 90 | [EM2820_BOARD_TERRATEC_CINERGY_250] = { |
| 91 | .name = "Terratec Cinergy 250 USB", |
| 92 | .vchannels = 3, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 93 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
| 94 | .tda9887_conf = TDA9887_PRESENT, |
| 95 | .has_tuner = 1, |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 96 | .decoder = EM28XX_SAA7113, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 97 | .input = { { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 98 | .type = EM28XX_VMUX_TELEVISION, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 99 | .vmux = SAA7115_COMPOSITE2, |
Markus Rechberger | 9475fb1 | 2006-02-27 00:07:34 -0300 | [diff] [blame] | 100 | .amux = 1, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 101 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 102 | .type = EM28XX_VMUX_COMPOSITE1, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 103 | .vmux = SAA7115_COMPOSITE0, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 104 | .amux = 1, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 105 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 106 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 107 | .vmux = SAA7115_SVIDEO3, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 108 | .amux = 1, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 109 | } }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 110 | }, |
| 111 | [EM2820_BOARD_PINNACLE_USB_2] = { |
| 112 | .name = "Pinnacle PCTV USB 2", |
| 113 | .vchannels = 3, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 114 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
| 115 | .tda9887_conf = TDA9887_PRESENT, |
| 116 | .has_tuner = 1, |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 117 | .decoder = EM28XX_SAA7113, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 118 | .input = { { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 119 | .type = EM28XX_VMUX_TELEVISION, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 120 | .vmux = SAA7115_COMPOSITE2, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 121 | .amux = 0, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 122 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 123 | .type = EM28XX_VMUX_COMPOSITE1, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 124 | .vmux = SAA7115_COMPOSITE0, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 125 | .amux = 1, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 126 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 127 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 128 | .vmux = SAA7115_SVIDEO3, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 129 | .amux = 1, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 130 | } }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 131 | }, |
| 132 | [EM2820_BOARD_HAUPPAUGE_WINTV_USB_2] = { |
| 133 | .name = "Hauppauge WinTV USB 2", |
| 134 | .vchannels = 3, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 135 | .tuner_type = TUNER_PHILIPS_FM1236_MK3, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 136 | .tda9887_conf = TDA9887_PRESENT | |
| 137 | TDA9887_PORT1_ACTIVE| |
| 138 | TDA9887_PORT2_ACTIVE, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 139 | .has_tuner = 1, |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 140 | .decoder = EM28XX_TVP5150, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 141 | .has_msp34xx = 1, |
| 142 | /*FIXME: S-Video not tested */ |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 143 | .input = { { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 144 | .type = EM28XX_VMUX_TELEVISION, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 145 | .vmux = TVP5150_COMPOSITE0, |
Hans Verkuil | 2474ed4 | 2006-03-19 12:35:57 -0300 | [diff] [blame] | 146 | .amux = MSP_INPUT_DEFAULT, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 147 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 148 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 149 | .vmux = TVP5150_SVIDEO, |
Hans Verkuil | 0715172 | 2006-04-01 18:03:23 -0300 | [diff] [blame] | 150 | .amux = MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1, |
| 151 | MSP_DSP_IN_SCART, MSP_DSP_IN_SCART), |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 152 | } }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 153 | }, |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 154 | [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900] = { |
Aidan Thornton | 122d158 | 2007-11-20 15:25:08 -0300 | [diff] [blame] | 155 | .name = "Hauppauge WinTV HVR 900", |
| 156 | .vchannels = 3, |
| 157 | .tda9887_conf = TDA9887_PRESENT, |
| 158 | .tuner_type = TUNER_XC2028, |
| 159 | .has_tuner = 1, |
Mauro Carvalho Chehab | 5add9a6 | 2007-11-22 12:08:53 -0300 | [diff] [blame] | 160 | .mts_firmware = 1, |
Aidan Thornton | 122d158 | 2007-11-20 15:25:08 -0300 | [diff] [blame] | 161 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 162 | .input = { { |
Aidan Thornton | 122d158 | 2007-11-20 15:25:08 -0300 | [diff] [blame] | 163 | .type = EM28XX_VMUX_TELEVISION, |
| 164 | .vmux = TVP5150_COMPOSITE0, |
| 165 | .amux = 0, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 166 | }, { |
Aidan Thornton | 122d158 | 2007-11-20 15:25:08 -0300 | [diff] [blame] | 167 | .type = EM28XX_VMUX_COMPOSITE1, |
| 168 | .vmux = TVP5150_COMPOSITE1, |
| 169 | .amux = 1, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 170 | }, { |
Aidan Thornton | 122d158 | 2007-11-20 15:25:08 -0300 | [diff] [blame] | 171 | .type = EM28XX_VMUX_SVIDEO, |
| 172 | .vmux = TVP5150_SVIDEO, |
| 173 | .amux = 1, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 174 | } }, |
Aidan Thornton | 122d158 | 2007-11-20 15:25:08 -0300 | [diff] [blame] | 175 | }, |
| 176 | [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_950] = { |
Mauro Carvalho Chehab | 3abee53 | 2008-01-05 17:01:41 -0300 | [diff] [blame^] | 177 | .name = "Hauppauge WinTV HVR 950", |
| 178 | .vchannels = 3, |
| 179 | .tda9887_conf = TDA9887_PRESENT, |
| 180 | .tuner_type = TUNER_XC2028, |
| 181 | .has_tuner = 1, |
| 182 | .mts_firmware = 1, |
| 183 | .has_12mhz_i2s = 1, |
| 184 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 185 | .input = { { |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 186 | .type = EM28XX_VMUX_TELEVISION, |
| 187 | .vmux = TVP5150_COMPOSITE0, |
| 188 | .amux = 0, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 189 | }, { |
Mauro Carvalho Chehab | 7d070e2 | 2007-11-01 21:52:58 -0300 | [diff] [blame] | 190 | .type = EM28XX_VMUX_COMPOSITE1, |
| 191 | .vmux = TVP5150_COMPOSITE1, |
| 192 | .amux = 1, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 193 | }, { |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 194 | .type = EM28XX_VMUX_SVIDEO, |
| 195 | .vmux = TVP5150_SVIDEO, |
| 196 | .amux = 1, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 197 | } }, |
Mauro Carvalho Chehab | 74f38a8 | 2008-01-05 09:54:58 -0300 | [diff] [blame] | 198 | |
| 199 | /* gpio's 4, 1, 0 */ |
| 200 | .analog_gpio = 0x003d2d, |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 201 | }, |
| 202 | [EM2880_BOARD_TERRATEC_HYBRID_XS] = { |
| 203 | .name = "Terratec Hybrid XS", |
| 204 | .vchannels = 3, |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 205 | .tda9887_conf = TDA9887_PRESENT, |
| 206 | .has_tuner = 1, |
| 207 | .tuner_type = TUNER_XC2028, |
| 208 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 209 | .input = { { |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 210 | .type = EM28XX_VMUX_TELEVISION, |
| 211 | .vmux = TVP5150_COMPOSITE0, |
| 212 | .amux = 0, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 213 | }, { |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 214 | .type = EM28XX_VMUX_COMPOSITE1, |
| 215 | .vmux = TVP5150_COMPOSITE1, |
| 216 | .amux = 1, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 217 | }, { |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 218 | .type = EM28XX_VMUX_SVIDEO, |
| 219 | .vmux = TVP5150_SVIDEO, |
| 220 | .amux = 1, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 221 | } }, |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 222 | }, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 223 | /* maybe there's a reason behind it why Terratec sells the Hybrid XS |
| 224 | as Prodigy XS with a different PID, let's keep it separated for now |
| 225 | maybe we'll need it lateron */ |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 226 | [EM2880_BOARD_TERRATEC_PRODIGY_XS] = { |
| 227 | .name = "Terratec Prodigy XS", |
| 228 | .vchannels = 3, |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 229 | .tda9887_conf = TDA9887_PRESENT, |
| 230 | .has_tuner = 1, |
| 231 | .tuner_type = TUNER_XC2028, |
| 232 | .decoder = EM28XX_TVP5150, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 233 | .input = { { |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 234 | .type = EM28XX_VMUX_TELEVISION, |
| 235 | .vmux = TVP5150_COMPOSITE0, |
| 236 | .amux = 0, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 237 | }, { |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 238 | .type = EM28XX_VMUX_COMPOSITE1, |
| 239 | .vmux = TVP5150_COMPOSITE1, |
| 240 | .amux = 1, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 241 | }, { |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 242 | .type = EM28XX_VMUX_SVIDEO, |
| 243 | .vmux = TVP5150_SVIDEO, |
| 244 | .amux = 1, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 245 | } }, |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 246 | }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 247 | [EM2820_BOARD_MSI_VOX_USB_2] = { |
| 248 | .name = "MSI VOX USB 2.0", |
| 249 | .vchannels = 3, |
Markus Rechberger | 08eca13 | 2005-11-08 21:38:05 -0800 | [diff] [blame] | 250 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 251 | .tda9887_conf = TDA9887_PRESENT | |
| 252 | TDA9887_PORT1_ACTIVE | |
| 253 | TDA9887_PORT2_ACTIVE, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 254 | .has_tuner = 1, |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 255 | .decoder = EM28XX_SAA7114, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 256 | .input = { { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 257 | .type = EM28XX_VMUX_TELEVISION, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 258 | .vmux = SAA7115_COMPOSITE4, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 259 | .amux = 0, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 260 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 261 | .type = EM28XX_VMUX_COMPOSITE1, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 262 | .vmux = SAA7115_COMPOSITE0, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 263 | .amux = 1, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 264 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 265 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 266 | .vmux = SAA7115_SVIDEO3, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 267 | .amux = 1, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 268 | } }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 269 | }, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 270 | [EM2800_BOARD_TERRATEC_CINERGY_200] = { |
| 271 | .name = "Terratec Cinergy 200 USB", |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 272 | .is_em2800 = 1, |
| 273 | .vchannels = 3, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 274 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
| 275 | .tda9887_conf = TDA9887_PRESENT, |
| 276 | .has_tuner = 1, |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 277 | .decoder = EM28XX_SAA7113, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 278 | .input = { { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 279 | .type = EM28XX_VMUX_TELEVISION, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 280 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 281 | .amux = 0, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 282 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 283 | .type = EM28XX_VMUX_COMPOSITE1, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 284 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 285 | .amux = 1, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 286 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 287 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 288 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 289 | .amux = 1, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 290 | } }, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 291 | }, |
| 292 | [EM2800_BOARD_LEADTEK_WINFAST_USBII] = { |
| 293 | .name = "Leadtek Winfast USB II", |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 294 | .is_em2800 = 1, |
| 295 | .vchannels = 3, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 296 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
| 297 | .tda9887_conf = TDA9887_PRESENT, |
| 298 | .has_tuner = 1, |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 299 | .decoder = EM28XX_SAA7113, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 300 | .input = { { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 301 | .type = EM28XX_VMUX_TELEVISION, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 302 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 303 | .amux = 0, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 304 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 305 | .type = EM28XX_VMUX_COMPOSITE1, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 306 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 307 | .amux = 1, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 308 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 309 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 310 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 311 | .amux = 1, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 312 | } }, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 313 | }, |
| 314 | [EM2800_BOARD_KWORLD_USB2800] = { |
| 315 | .name = "Kworld USB2800", |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 316 | .is_em2800 = 1, |
| 317 | .vchannels = 3, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 318 | .tuner_type = TUNER_PHILIPS_ATSC, |
| 319 | .tda9887_conf = TDA9887_PRESENT, |
| 320 | .has_tuner = 1, |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 321 | .decoder = EM28XX_SAA7113, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 322 | .input = { { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 323 | .type = EM28XX_VMUX_TELEVISION, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 324 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 325 | .amux = 0, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 326 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 327 | .type = EM28XX_VMUX_COMPOSITE1, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 328 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 329 | .amux = 1, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 330 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 331 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 332 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 333 | .amux = 1, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 334 | } }, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 335 | }, |
Mauro Carvalho Chehab | 45632c4 | 2005-11-08 21:38:15 -0800 | [diff] [blame] | 336 | [EM2820_BOARD_PINNACLE_DVC_90] = { |
Aurelien Jarno | aec2aef | 2007-12-17 13:49:17 -0300 | [diff] [blame] | 337 | .name = "Pinnacle Dazzle DVC 90/DVC 100", |
Mauro Carvalho Chehab | 45632c4 | 2005-11-08 21:38:15 -0800 | [diff] [blame] | 338 | .vchannels = 3, |
Mauro Carvalho Chehab | 45632c4 | 2005-11-08 21:38:15 -0800 | [diff] [blame] | 339 | .has_tuner = 0, |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 340 | .decoder = EM28XX_SAA7113, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 341 | .input = { { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 342 | .type = EM28XX_VMUX_COMPOSITE1, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 343 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 45632c4 | 2005-11-08 21:38:15 -0800 | [diff] [blame] | 344 | .amux = 1, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 345 | }, { |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 346 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 347 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 45632c4 | 2005-11-08 21:38:15 -0800 | [diff] [blame] | 348 | .amux = 1, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 349 | } }, |
Mauro Carvalho Chehab | 45632c4 | 2005-11-08 21:38:15 -0800 | [diff] [blame] | 350 | }, |
Sascha Sommer | 4362559 | 2007-11-03 15:05:07 -0300 | [diff] [blame] | 351 | [EM2800_BOARD_VGEAR_POCKETTV] = { |
| 352 | .name = "V-Gear PocketTV", |
| 353 | .is_em2800 = 1, |
| 354 | .vchannels = 3, |
Sascha Sommer | 4362559 | 2007-11-03 15:05:07 -0300 | [diff] [blame] | 355 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
| 356 | .tda9887_conf = TDA9887_PRESENT, |
| 357 | .has_tuner = 1, |
| 358 | .decoder = EM28XX_SAA7113, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 359 | .input = { { |
Sascha Sommer | 4362559 | 2007-11-03 15:05:07 -0300 | [diff] [blame] | 360 | .type = EM28XX_VMUX_TELEVISION, |
| 361 | .vmux = SAA7115_COMPOSITE2, |
| 362 | .amux = 0, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 363 | }, { |
Sascha Sommer | 4362559 | 2007-11-03 15:05:07 -0300 | [diff] [blame] | 364 | .type = EM28XX_VMUX_COMPOSITE1, |
| 365 | .vmux = SAA7115_COMPOSITE0, |
| 366 | .amux = 1, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 367 | }, { |
Sascha Sommer | 4362559 | 2007-11-03 15:05:07 -0300 | [diff] [blame] | 368 | .type = EM28XX_VMUX_SVIDEO, |
| 369 | .vmux = SAA7115_SVIDEO3, |
| 370 | .amux = 1, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 371 | } }, |
Sascha Sommer | 4362559 | 2007-11-03 15:05:07 -0300 | [diff] [blame] | 372 | }, |
Mauro Carvalho Chehab | ea4fd56 | 2007-11-03 21:21:57 -0300 | [diff] [blame] | 373 | [EM2820_BOARD_PROLINK_PLAYTV_USB2] = { |
| 374 | .name = "Pixelview Prolink PlayTV USB 2.0", |
| 375 | .vchannels = 3, |
| 376 | .tda9887_conf = TDA9887_PRESENT, |
| 377 | .has_tuner = 1, |
| 378 | .decoder = EM28XX_SAA7113, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 379 | .input = { { |
Mauro Carvalho Chehab | ea4fd56 | 2007-11-03 21:21:57 -0300 | [diff] [blame] | 380 | .type = EM28XX_VMUX_TELEVISION, |
| 381 | .vmux = SAA7115_COMPOSITE2, |
| 382 | .amux = 1, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 383 | }, { |
Mauro Carvalho Chehab | ea4fd56 | 2007-11-03 21:21:57 -0300 | [diff] [blame] | 384 | .type = EM28XX_VMUX_COMPOSITE1, |
| 385 | .vmux = SAA7115_COMPOSITE0, |
| 386 | .amux = 1, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 387 | }, { |
Mauro Carvalho Chehab | ea4fd56 | 2007-11-03 21:21:57 -0300 | [diff] [blame] | 388 | .type = EM28XX_VMUX_SVIDEO, |
| 389 | .vmux = SAA7115_SVIDEO3, |
| 390 | .amux = 1, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 391 | } }, |
Mauro Carvalho Chehab | ea4fd56 | 2007-11-03 21:21:57 -0300 | [diff] [blame] | 392 | }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 393 | }; |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 394 | const unsigned int em28xx_bcount = ARRAY_SIZE(em28xx_boards); |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 395 | |
| 396 | /* table of devices that work with this driver */ |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 397 | struct usb_device_id em28xx_id_table [] = { |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 398 | { USB_DEVICE(0xeb1a, 0x2750), |
| 399 | .driver_info = EM2820_BOARD_UNKNOWN }, |
| 400 | { USB_DEVICE(0xeb1a, 0x2800), |
| 401 | .driver_info = EM2800_BOARD_UNKNOWN }, |
| 402 | { USB_DEVICE(0xeb1a, 0x2820), |
| 403 | .driver_info = EM2820_BOARD_UNKNOWN }, |
| 404 | { USB_DEVICE(0xeb1a, 0x2821), |
| 405 | .driver_info = EM2820_BOARD_UNKNOWN }, |
| 406 | { USB_DEVICE(0xeb1a, 0x2860), |
| 407 | .driver_info = EM2820_BOARD_UNKNOWN }, |
| 408 | { USB_DEVICE(0xeb1a, 0x2861), |
| 409 | .driver_info = EM2820_BOARD_UNKNOWN }, |
| 410 | { USB_DEVICE(0xeb1a, 0x2870), |
| 411 | .driver_info = EM2820_BOARD_UNKNOWN }, |
| 412 | { USB_DEVICE(0xeb1a, 0x2881), |
| 413 | .driver_info = EM2820_BOARD_UNKNOWN }, |
| 414 | { USB_DEVICE(0xeb1a, 0x2883), |
| 415 | .driver_info = EM2820_BOARD_UNKNOWN }, |
| 416 | { USB_DEVICE(0x0ccd, 0x0036), |
| 417 | .driver_info = EM2820_BOARD_TERRATEC_CINERGY_250 }, |
| 418 | { USB_DEVICE(0x2304, 0x0208), |
| 419 | .driver_info = EM2820_BOARD_PINNACLE_USB_2 }, |
| 420 | { USB_DEVICE(0x2040, 0x4200), |
| 421 | .driver_info = EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 }, |
| 422 | { USB_DEVICE(0x2304, 0x0207), |
| 423 | .driver_info = EM2820_BOARD_PINNACLE_DVC_90 }, |
Aurelien Jarno | aec2aef | 2007-12-17 13:49:17 -0300 | [diff] [blame] | 424 | { USB_DEVICE(0x2304, 0x021a), |
| 425 | .driver_info = EM2820_BOARD_PINNACLE_DVC_90 }, |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 426 | { USB_DEVICE(0x2040, 0x6500), |
| 427 | .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900 }, |
| 428 | { USB_DEVICE(0x2040, 0x6513), |
| 429 | .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_950 }, |
| 430 | { USB_DEVICE(0x0ccd, 0x0042), |
| 431 | .driver_info = EM2880_BOARD_TERRATEC_HYBRID_XS }, |
| 432 | { USB_DEVICE(0x0ccd, 0x0047), |
| 433 | .driver_info = EM2880_BOARD_TERRATEC_PRODIGY_XS }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 434 | { }, |
| 435 | }; |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 436 | MODULE_DEVICE_TABLE(usb, em28xx_id_table); |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 437 | |
Mauro Carvalho Chehab | d2ba055 | 2007-11-04 08:32:42 -0300 | [diff] [blame] | 438 | /* EEPROM hash table for devices with generic USB IDs */ |
| 439 | static struct em28xx_hash_table em28xx_eeprom_hash [] = { |
Mauro Carvalho Chehab | ea4fd56 | 2007-11-03 21:21:57 -0300 | [diff] [blame] | 440 | /* P/N: SA 60002070465 Tuner: TVF7533-MF */ |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 441 | {0x6ce05a8f, EM2820_BOARD_PROLINK_PLAYTV_USB2, TUNER_YMEC_TVF_5533MF}, |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 442 | }; |
| 443 | |
Mauro Carvalho Chehab | d2ba055 | 2007-11-04 08:32:42 -0300 | [diff] [blame] | 444 | /* I2C devicelist hash table for devices with generic USB IDs */ |
Sascha Sommer | fad7b95 | 2007-11-04 08:06:48 -0300 | [diff] [blame] | 445 | static struct em28xx_hash_table em28xx_i2c_hash[] = { |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 446 | {0xb06a32c3, EM2800_BOARD_TERRATEC_CINERGY_200, TUNER_LG_PAL_NEW_TAPC}, |
| 447 | {0xf51200e3, EM2800_BOARD_VGEAR_POCKETTV, TUNER_LG_PAL_NEW_TAPC}, |
Sascha Sommer | fad7b95 | 2007-11-04 08:06:48 -0300 | [diff] [blame] | 448 | }; |
| 449 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 450 | /* Since em28xx_pre_card_setup() requires a proper dev->model, |
| 451 | * this won't work for boards with generic PCI IDs |
| 452 | */ |
Markus Rechberger | a94e95b | 2006-01-23 17:11:10 -0200 | [diff] [blame] | 453 | void em28xx_pre_card_setup(struct em28xx *dev) |
| 454 | { |
| 455 | /* request some modules */ |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 456 | switch (dev->model) { |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 457 | case EM2880_BOARD_TERRATEC_PRODIGY_XS: |
| 458 | case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900: |
Aidan Thornton | 122d158 | 2007-11-20 15:25:08 -0300 | [diff] [blame] | 459 | case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_950: |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 460 | case EM2880_BOARD_TERRATEC_HYBRID_XS: |
Mauro Carvalho Chehab | 74f38a8 | 2008-01-05 09:54:58 -0300 | [diff] [blame] | 461 | em28xx_write_regs(dev, XCLK_REG, "\x27", 1); |
| 462 | em28xx_write_regs(dev, I2C_CLK_REG, "\x40", 1); |
| 463 | em28xx_write_regs(dev, 0x08, "\xff", 1); |
| 464 | em28xx_write_regs(dev, 0x04, "\x00", 1); |
| 465 | msleep(100); |
| 466 | em28xx_write_regs(dev, 0x04, "\x08", 1); |
| 467 | msleep(100); |
| 468 | em28xx_write_regs(dev, 0x08, "\xff", 1); |
| 469 | msleep(50); |
| 470 | em28xx_write_regs(dev, 0x08, "\x2d", 1); |
| 471 | msleep(50); |
| 472 | em28xx_write_regs(dev, 0x08, "\x3d", 1); |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 473 | break; |
Markus Rechberger | a94e95b | 2006-01-23 17:11:10 -0200 | [diff] [blame] | 474 | } |
| 475 | } |
| 476 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 477 | static int em28xx_tuner_callback(void *ptr, int command, int arg) |
| 478 | { |
| 479 | int rc = 0; |
| 480 | struct em28xx *dev = ptr; |
| 481 | |
| 482 | if (dev->tuner_type != TUNER_XC2028) |
| 483 | return 0; |
| 484 | |
| 485 | switch (command) { |
| 486 | case XC2028_TUNER_RESET: |
Mauro Carvalho Chehab | 74f38a8 | 2008-01-05 09:54:58 -0300 | [diff] [blame] | 487 | { |
| 488 | char gpio0, gpio1, gpio4; |
| 489 | |
| 490 | /* GPIO and initialization codes for analog TV */ |
| 491 | gpio0 = dev->analog_gpio & 0xff; |
| 492 | gpio1 = (dev->analog_gpio >> 8) & 0xff; |
| 493 | gpio4 = dev->analog_gpio >> 24; |
| 494 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 495 | dev->em28xx_write_regs_req(dev, 0x00, 0x48, "\x00", 1); |
| 496 | dev->em28xx_write_regs_req(dev, 0x00, 0x12, "\x67", 1); |
| 497 | |
Mauro Carvalho Chehab | 74f38a8 | 2008-01-05 09:54:58 -0300 | [diff] [blame] | 498 | if (gpio4) { |
| 499 | dev->em28xx_write_regs(dev, 0x04, &gpio4, 1); |
| 500 | msleep(140); |
| 501 | } |
| 502 | |
| 503 | msleep(6); |
| 504 | dev->em28xx_write_regs(dev, 0x08, &gpio0, 1); |
| 505 | msleep(10); |
| 506 | dev->em28xx_write_regs(dev, 0x08, &gpio1, 1); |
| 507 | msleep(5); |
| 508 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 509 | break; |
| 510 | } |
Mauro Carvalho Chehab | 74f38a8 | 2008-01-05 09:54:58 -0300 | [diff] [blame] | 511 | } |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 512 | return rc; |
| 513 | } |
| 514 | |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 515 | static void em28xx_config_tuner(struct em28xx *dev) |
Mauro Carvalho Chehab | 882876b | 2007-10-29 11:33:18 -0300 | [diff] [blame] | 516 | { |
| 517 | struct v4l2_priv_tun_config xc2028_cfg; |
| 518 | struct xc2028_ctrl ctl; |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 519 | struct tuner_setup tun_setup; |
| 520 | struct v4l2_frequency f; |
Mauro Carvalho Chehab | 882876b | 2007-10-29 11:33:18 -0300 | [diff] [blame] | 521 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 522 | if (!dev->has_tuner) |
| 523 | return; |
Mauro Carvalho Chehab | 882876b | 2007-10-29 11:33:18 -0300 | [diff] [blame] | 524 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 525 | tun_setup.mode_mask = T_ANALOG_TV | T_RADIO; |
| 526 | tun_setup.type = dev->tuner_type; |
| 527 | tun_setup.addr = dev->tuner_addr; |
| 528 | tun_setup.tuner_callback = em28xx_tuner_callback; |
Mauro Carvalho Chehab | 882876b | 2007-10-29 11:33:18 -0300 | [diff] [blame] | 529 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 530 | em28xx_i2c_call_clients(dev, TUNER_SET_TYPE_ADDR, &tun_setup); |
Mauro Carvalho Chehab | 882876b | 2007-10-29 11:33:18 -0300 | [diff] [blame] | 531 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 532 | if (dev->tuner_type == TUNER_XC2028) { |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 533 | memset(&ctl, 0, sizeof(ctl)); |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 534 | |
| 535 | ctl.fname = XC2028_DEFAULT_FIRMWARE; |
| 536 | ctl.max_len = 64; |
Mauro Carvalho Chehab | 5add9a6 | 2007-11-22 12:08:53 -0300 | [diff] [blame] | 537 | ctl.mts = em28xx_boards[dev->model].mts_firmware; |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 538 | |
| 539 | xc2028_cfg.tuner = TUNER_XC2028; |
| 540 | xc2028_cfg.priv = &ctl; |
| 541 | |
| 542 | em28xx_i2c_call_clients(dev, TUNER_SET_CONFIG, &xc2028_cfg); |
| 543 | } |
| 544 | |
| 545 | /* configure tuner */ |
| 546 | f.tuner = 0; |
| 547 | f.type = V4L2_TUNER_ANALOG_TV; |
| 548 | f.frequency = 9076; /* just a magic number */ |
| 549 | dev->ctl_freq = f.frequency; |
| 550 | em28xx_i2c_call_clients(dev, VIDIOC_S_FREQUENCY, &f); |
| 551 | } |
| 552 | |
| 553 | static int em28xx_hint_board(struct em28xx *dev) |
| 554 | { |
| 555 | int i; |
| 556 | |
Mauro Carvalho Chehab | d2ba055 | 2007-11-04 08:32:42 -0300 | [diff] [blame] | 557 | /* HINT method: EEPROM |
| 558 | * |
| 559 | * This method works only for boards with eeprom. |
| 560 | * Uses a hash of all eeprom bytes. The hash should be |
| 561 | * unique for a vendor/tuner pair. |
| 562 | * There are a high chance that tuners for different |
| 563 | * video standards produce different hashes. |
| 564 | */ |
| 565 | for (i = 0; i < ARRAY_SIZE(em28xx_eeprom_hash); i++) { |
| 566 | if (dev->hash == em28xx_eeprom_hash[i].hash) { |
| 567 | dev->model = em28xx_eeprom_hash[i].model; |
| 568 | dev->tuner_type = em28xx_eeprom_hash[i].tuner; |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 569 | |
| 570 | em28xx_errdev("Your board has no unique USB ID.\n"); |
| 571 | em28xx_errdev("A hint were successfully done, " |
| 572 | "based on eeprom hash.\n"); |
| 573 | em28xx_errdev("This method is not 100%% failproof.\n"); |
| 574 | em28xx_errdev("If the board were missdetected, " |
| 575 | "please email this log to:\n"); |
| 576 | em28xx_errdev("\tV4L Mailing List " |
| 577 | " <video4linux-list@redhat.com>\n"); |
| 578 | em28xx_errdev("Board detected as %s\n", |
| 579 | em28xx_boards[dev->model].name); |
| 580 | |
| 581 | return 0; |
| 582 | } |
| 583 | } |
Sascha Sommer | fad7b95 | 2007-11-04 08:06:48 -0300 | [diff] [blame] | 584 | |
Mauro Carvalho Chehab | d2ba055 | 2007-11-04 08:32:42 -0300 | [diff] [blame] | 585 | /* HINT method: I2C attached devices |
| 586 | * |
| 587 | * This method works for all boards. |
| 588 | * Uses a hash of i2c scanned devices. |
| 589 | * Devices with the same i2c attached chips will |
| 590 | * be considered equal. |
| 591 | * This method is less precise than the eeprom one. |
| 592 | */ |
| 593 | |
Sascha Sommer | fad7b95 | 2007-11-04 08:06:48 -0300 | [diff] [blame] | 594 | /* user did not request i2c scanning => do it now */ |
| 595 | if (!dev->i2c_hash) |
| 596 | em28xx_do_i2c_scan(dev); |
| 597 | |
| 598 | for (i = 0; i < ARRAY_SIZE(em28xx_i2c_hash); i++) { |
| 599 | if (dev->i2c_hash == em28xx_i2c_hash[i].hash) { |
| 600 | dev->model = em28xx_i2c_hash[i].model; |
| 601 | dev->tuner_type = em28xx_i2c_hash[i].tuner; |
| 602 | em28xx_errdev("Your board has no unique USB ID.\n"); |
| 603 | em28xx_errdev("A hint were successfully done, " |
| 604 | "based on i2c devicelist hash.\n"); |
| 605 | em28xx_errdev("This method is not 100%% failproof.\n"); |
| 606 | em28xx_errdev("If the board were missdetected, " |
| 607 | "please email this log to:\n"); |
| 608 | em28xx_errdev("\tV4L Mailing List " |
| 609 | " <video4linux-list@redhat.com>\n"); |
| 610 | em28xx_errdev("Board detected as %s\n", |
| 611 | em28xx_boards[dev->model].name); |
| 612 | |
| 613 | return 0; |
| 614 | } |
| 615 | } |
| 616 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 617 | em28xx_errdev("Your board has no unique USB ID and thus need a " |
| 618 | "hint to be detected.\n"); |
| 619 | em28xx_errdev("You may try to use card=<n> insmod option to " |
| 620 | "workaround that.\n"); |
| 621 | em28xx_errdev("Please send an email with this log to:\n"); |
| 622 | em28xx_errdev("\tV4L Mailing List <video4linux-list@redhat.com>\n"); |
| 623 | em28xx_errdev("Board eeprom hash is 0x%08lx\n", dev->hash); |
Sascha Sommer | fad7b95 | 2007-11-04 08:06:48 -0300 | [diff] [blame] | 624 | em28xx_errdev("Board i2c devicelist hash is 0x%08lx\n", dev->i2c_hash); |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 625 | |
| 626 | em28xx_errdev("Here is a list of valid choices for the card=<n>" |
| 627 | " insmod option:\n"); |
| 628 | for (i = 0; i < em28xx_bcount; i++) { |
| 629 | em28xx_errdev(" card=%d -> %s\n", |
| 630 | i, em28xx_boards[i].name); |
| 631 | } |
| 632 | return -1; |
Mauro Carvalho Chehab | 882876b | 2007-10-29 11:33:18 -0300 | [diff] [blame] | 633 | } |
| 634 | |
Mauro Carvalho Chehab | f8b6030 | 2007-11-05 08:42:55 -0300 | [diff] [blame] | 635 | |
| 636 | static void em28xx_set_model(struct em28xx *dev) |
| 637 | { |
| 638 | dev->is_em2800 = em28xx_boards[dev->model].is_em2800; |
| 639 | dev->has_tuner = em28xx_boards[dev->model].has_tuner; |
| 640 | dev->has_msp34xx = em28xx_boards[dev->model].has_msp34xx; |
| 641 | dev->tda9887_conf = em28xx_boards[dev->model].tda9887_conf; |
| 642 | dev->decoder = em28xx_boards[dev->model].decoder; |
| 643 | dev->video_inputs = em28xx_boards[dev->model].vchannels; |
Mauro Carvalho Chehab | 74f38a8 | 2008-01-05 09:54:58 -0300 | [diff] [blame] | 644 | dev->analog_gpio = em28xx_boards[dev->model].analog_gpio; |
Mauro Carvalho Chehab | 3abee53 | 2008-01-05 17:01:41 -0300 | [diff] [blame^] | 645 | dev->has_12mhz_i2s = em28xx_boards[dev->model].has_12mhz_i2s; |
Mauro Carvalho Chehab | f8b6030 | 2007-11-05 08:42:55 -0300 | [diff] [blame] | 646 | |
| 647 | if (!em28xx_boards[dev->model].has_tuner) |
| 648 | dev->tuner_type = UNSET; |
| 649 | } |
| 650 | |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 651 | void em28xx_card_setup(struct em28xx *dev) |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 652 | { |
Mauro Carvalho Chehab | f8b6030 | 2007-11-05 08:42:55 -0300 | [diff] [blame] | 653 | em28xx_set_model(dev); |
| 654 | |
| 655 | dev->tuner_type = em28xx_boards[dev->model].tuner_type; |
| 656 | |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 657 | /* request some modules */ |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 658 | switch (dev->model) { |
| 659 | case EM2820_BOARD_HAUPPAUGE_WINTV_USB_2: |
Mauro Carvalho Chehab | 98ae127 | 2007-11-05 09:30:39 -0300 | [diff] [blame] | 660 | case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900: |
Aidan Thornton | 122d158 | 2007-11-20 15:25:08 -0300 | [diff] [blame] | 661 | case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_950: |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 662 | { |
| 663 | struct tveeprom tv; |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 664 | #ifdef CONFIG_MODULES |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 665 | request_module("tveeprom"); |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 666 | #endif |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 667 | /* Call first TVeeprom */ |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 668 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 669 | dev->i2c_client.addr = 0xa0 >> 1; |
| 670 | tveeprom_hauppauge_analog(&dev->i2c_client, &tv, dev->eedata); |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 671 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 672 | dev->tuner_type = tv.tuner_type; |
| 673 | if (tv.audio_processor == AUDIO_CHIP_MSP34XX) { |
| 674 | dev->i2s_speed = 2048000; |
| 675 | dev->has_msp34xx = 1; |
| 676 | } |
Mauro Carvalho Chehab | 98ae127 | 2007-11-05 09:30:39 -0300 | [diff] [blame] | 677 | #ifdef CONFIG_MODULES |
| 678 | if (tv.has_ir) |
| 679 | request_module("ir-kbd-i2c"); |
| 680 | #endif |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 681 | break; |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 682 | } |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 683 | case EM2820_BOARD_KWORLD_PVRTV2800RF: |
| 684 | /* GPIO enables sound on KWORLD PVR TV 2800RF */ |
| 685 | em28xx_write_regs_req(dev, 0x00, 0x08, "\xf9", 1); |
| 686 | break; |
| 687 | case EM2820_BOARD_UNKNOWN: |
| 688 | case EM2800_BOARD_UNKNOWN: |
Mauro Carvalho Chehab | f8b6030 | 2007-11-05 08:42:55 -0300 | [diff] [blame] | 689 | if (!em28xx_hint_board(dev)) |
| 690 | em28xx_set_model(dev); |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 691 | } |
| 692 | |
Mauro Carvalho Chehab | f8b6030 | 2007-11-05 08:42:55 -0300 | [diff] [blame] | 693 | /* Allow override tuner type by a module parameter */ |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 694 | if (tuner >= 0) |
| 695 | dev->tuner_type = tuner; |
| 696 | |
| 697 | #ifdef CONFIG_MODULES |
| 698 | /* request some modules */ |
| 699 | if (dev->has_msp34xx) |
| 700 | request_module("msp3400"); |
| 701 | if (dev->decoder == EM28XX_SAA7113 || dev->decoder == EM28XX_SAA7114) |
| 702 | request_module("saa7115"); |
| 703 | if (dev->decoder == EM28XX_TVP5150) |
| 704 | request_module("tvp5150"); |
| 705 | if (dev->has_tuner) |
| 706 | request_module("tuner"); |
| 707 | #endif |
| 708 | |
Mauro Carvalho Chehab | c23f594 | 2007-11-23 14:22:14 -0300 | [diff] [blame] | 709 | em28xx_config_tuner(dev); |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 710 | } |