akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 1 | /* |
Mauro Carvalho Chehab | f7abcd3 | 2005-11-08 21:38:25 -0800 | [diff] [blame] | 2 | em28xx-cards.c - driver for Empia EM2800/EM2820/2840 USB video capture devices |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 3 | |
Mauro Carvalho Chehab | f7abcd3 | 2005-11-08 21:38:25 -0800 | [diff] [blame] | 4 | Copyright (C) 2005 Ludovico Cavedon <cavedon@sssup.it> |
| 5 | Markus Rechberger <mrechberger@gmail.com> |
Mauro Carvalho Chehab | 2e7c6dc | 2006-04-03 07:53:40 -0300 | [diff] [blame] | 6 | Mauro Carvalho Chehab <mchehab@infradead.org> |
Mauro Carvalho Chehab | f7abcd3 | 2005-11-08 21:38:25 -0800 | [diff] [blame] | 7 | Sascha Sommer <saschasommer@freenet.de> |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 8 | |
| 9 | This program is free software; you can redistribute it and/or modify |
| 10 | it under the terms of the GNU General Public License as published by |
| 11 | the Free Software Foundation; either version 2 of the License, or |
| 12 | (at your option) any later version. |
| 13 | |
| 14 | This program is distributed in the hope that it will be useful, |
| 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | GNU General Public License for more details. |
| 18 | |
| 19 | You should have received a copy of the GNU General Public License |
| 20 | along with this program; if not, write to the Free Software |
| 21 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 22 | */ |
| 23 | |
| 24 | #include <linux/init.h> |
| 25 | #include <linux/module.h> |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 26 | #include <linux/delay.h> |
| 27 | #include <linux/i2c.h> |
| 28 | #include <linux/usb.h> |
| 29 | #include <media/tuner.h> |
Hans Verkuil | 2474ed4 | 2006-03-19 12:35:57 -0300 | [diff] [blame] | 30 | #include <media/msp3400.h> |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 31 | #include <media/saa7115.h> |
| 32 | #include <media/tvp5150.h> |
Mauro Carvalho Chehab | 1f6173e | 2005-11-08 21:37:16 -0800 | [diff] [blame] | 33 | #include <media/tveeprom.h> |
Hans Verkuil | 2474ed4 | 2006-03-19 12:35:57 -0300 | [diff] [blame] | 34 | #include <media/audiochip.h> |
Mauro Carvalho Chehab | 9bb13a6 | 2006-01-09 15:25:37 -0200 | [diff] [blame] | 35 | #include <media/v4l2-common.h> |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 36 | |
Mauro Carvalho Chehab | f7abcd3 | 2005-11-08 21:38:25 -0800 | [diff] [blame] | 37 | #include "em28xx.h" |
Mauro Carvalho Chehab | 882876b | 2007-10-29 11:33:18 -0300 | [diff] [blame] | 38 | #include "tuner-xc2028.h" |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 39 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 40 | static int tuner = -1; |
| 41 | module_param(tuner, int, 0444); |
| 42 | MODULE_PARM_DESC(tuner, "tuner type"); |
| 43 | |
| 44 | struct em28xx_hash_table { |
| 45 | unsigned long hash; |
| 46 | unsigned int model; |
| 47 | unsigned int tuner; |
| 48 | }; |
| 49 | |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 50 | struct em28xx_board em28xx_boards[] = { |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 51 | [EM2800_BOARD_UNKNOWN] = { |
| 52 | .name = "Unknown EM2800 video grabber", |
| 53 | .is_em2800 = 1, |
| 54 | .vchannels = 2, |
| 55 | .norm = VIDEO_MODE_PAL, |
| 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 | 596d92d | 2005-11-08 21:37:24 -0800 | [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, |
| 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, |
| 67 | }}, |
| 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, |
| 77 | .norm = VIDEO_MODE_PAL, |
| 78 | .tda9887_conf = TDA9887_PRESENT, |
| 79 | .has_tuner = 1, |
| 80 | .decoder = EM28XX_SAA7113, |
| 81 | .input = {{ |
| 82 | .type = EM28XX_VMUX_COMPOSITE1, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 83 | .vmux = SAA7115_COMPOSITE0, |
Markus Rechberger | 4d17d08 | 2006-02-07 06:25:39 -0200 | [diff] [blame] | 84 | .amux = 1, |
| 85 | },{ |
| 86 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 87 | .vmux = SAA7115_SVIDEO3, |
Markus Rechberger | 4d17d08 | 2006-02-07 06:25:39 -0200 | [diff] [blame] | 88 | .amux = 1, |
| 89 | }}, |
| 90 | }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 91 | [EM2820_BOARD_TERRATEC_CINERGY_250] = { |
| 92 | .name = "Terratec Cinergy 250 USB", |
| 93 | .vchannels = 3, |
| 94 | .norm = VIDEO_MODE_PAL, |
| 95 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
| 96 | .tda9887_conf = TDA9887_PRESENT, |
| 97 | .has_tuner = 1, |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 98 | .decoder = EM28XX_SAA7113, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 99 | .input = {{ |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 100 | .type = EM28XX_VMUX_TELEVISION, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 101 | .vmux = SAA7115_COMPOSITE2, |
Markus Rechberger | 9475fb1 | 2006-02-27 00:07:34 -0300 | [diff] [blame] | 102 | .amux = 1, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 103 | },{ |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 104 | .type = EM28XX_VMUX_COMPOSITE1, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 105 | .vmux = SAA7115_COMPOSITE0, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 106 | .amux = 1, |
| 107 | },{ |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 108 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 109 | .vmux = SAA7115_SVIDEO3, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 110 | .amux = 1, |
| 111 | }}, |
| 112 | }, |
| 113 | [EM2820_BOARD_PINNACLE_USB_2] = { |
| 114 | .name = "Pinnacle PCTV USB 2", |
| 115 | .vchannels = 3, |
| 116 | .norm = VIDEO_MODE_PAL, |
| 117 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
| 118 | .tda9887_conf = TDA9887_PRESENT, |
| 119 | .has_tuner = 1, |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 120 | .decoder = EM28XX_SAA7113, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 121 | .input = {{ |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 122 | .type = EM28XX_VMUX_TELEVISION, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 123 | .vmux = SAA7115_COMPOSITE2, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 124 | .amux = 0, |
| 125 | },{ |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 126 | .type = EM28XX_VMUX_COMPOSITE1, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 127 | .vmux = SAA7115_COMPOSITE0, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 128 | .amux = 1, |
| 129 | },{ |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 130 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 131 | .vmux = SAA7115_SVIDEO3, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 132 | .amux = 1, |
| 133 | }}, |
| 134 | }, |
| 135 | [EM2820_BOARD_HAUPPAUGE_WINTV_USB_2] = { |
| 136 | .name = "Hauppauge WinTV USB 2", |
| 137 | .vchannels = 3, |
| 138 | .norm = VIDEO_MODE_NTSC, |
| 139 | .tuner_type = TUNER_PHILIPS_FM1236_MK3, |
| 140 | .tda9887_conf = TDA9887_PRESENT|TDA9887_PORT1_ACTIVE|TDA9887_PORT2_ACTIVE, |
| 141 | .has_tuner = 1, |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 142 | .decoder = EM28XX_TVP5150, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 143 | .has_msp34xx = 1, |
| 144 | /*FIXME: S-Video not tested */ |
| 145 | .input = {{ |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 146 | .type = EM28XX_VMUX_TELEVISION, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 147 | .vmux = TVP5150_COMPOSITE0, |
Hans Verkuil | 2474ed4 | 2006-03-19 12:35:57 -0300 | [diff] [blame] | 148 | .amux = MSP_INPUT_DEFAULT, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 149 | },{ |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 150 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 151 | .vmux = TVP5150_SVIDEO, |
Hans Verkuil | 0715172 | 2006-04-01 18:03:23 -0300 | [diff] [blame] | 152 | .amux = MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1, |
| 153 | MSP_DSP_IN_SCART, MSP_DSP_IN_SCART), |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 154 | }}, |
| 155 | }, |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 156 | [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900] = { |
Mauro Carvalho Chehab | 7d070e2 | 2007-11-01 21:52:58 -0300 | [diff] [blame] | 157 | .name = "Hauppauge WinTV HVR 900/950", |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 158 | .vchannels = 3, |
| 159 | .norm = VIDEO_MODE_PAL, |
| 160 | .tda9887_conf = TDA9887_PRESENT, |
| 161 | .tuner_type = TUNER_XC2028, |
| 162 | .has_tuner = 1, |
| 163 | .decoder = EM28XX_TVP5150, |
| 164 | .input = {{ |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 165 | .type = EM28XX_VMUX_TELEVISION, |
| 166 | .vmux = TVP5150_COMPOSITE0, |
| 167 | .amux = 0, |
| 168 | },{ |
Mauro Carvalho Chehab | 7d070e2 | 2007-11-01 21:52:58 -0300 | [diff] [blame] | 169 | .type = EM28XX_VMUX_COMPOSITE1, |
| 170 | .vmux = TVP5150_COMPOSITE1, |
| 171 | .amux = 1, |
| 172 | },{ |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 173 | .type = EM28XX_VMUX_SVIDEO, |
| 174 | .vmux = TVP5150_SVIDEO, |
| 175 | .amux = 1, |
| 176 | }}, |
| 177 | }, |
| 178 | [EM2880_BOARD_TERRATEC_HYBRID_XS] = { |
| 179 | .name = "Terratec Hybrid XS", |
| 180 | .vchannels = 3, |
| 181 | .norm = VIDEO_MODE_PAL, |
| 182 | .tda9887_conf = TDA9887_PRESENT, |
| 183 | .has_tuner = 1, |
| 184 | .tuner_type = TUNER_XC2028, |
| 185 | .decoder = EM28XX_TVP5150, |
| 186 | .input = {{ |
| 187 | .type = EM28XX_VMUX_TELEVISION, |
| 188 | .vmux = TVP5150_COMPOSITE0, |
| 189 | .amux = 0, |
| 190 | },{ |
| 191 | .type = EM28XX_VMUX_COMPOSITE1, |
| 192 | .vmux = TVP5150_COMPOSITE1, |
| 193 | .amux = 1, |
| 194 | },{ |
| 195 | .type = EM28XX_VMUX_SVIDEO, |
| 196 | .vmux = TVP5150_SVIDEO, |
| 197 | .amux = 1, |
| 198 | }}, |
| 199 | }, |
| 200 | /* maybe there's a reason behind it why Terratec sells the Hybrid XS as Prodigy XS with a |
| 201 | * different PID, let's keep it separated for now maybe we'll need it lateron */ |
| 202 | [EM2880_BOARD_TERRATEC_PRODIGY_XS] = { |
| 203 | .name = "Terratec Prodigy XS", |
| 204 | .vchannels = 3, |
| 205 | .norm = VIDEO_MODE_PAL, |
| 206 | .tda9887_conf = TDA9887_PRESENT, |
| 207 | .has_tuner = 1, |
| 208 | .tuner_type = TUNER_XC2028, |
| 209 | .decoder = EM28XX_TVP5150, |
| 210 | .input = {{ |
| 211 | .type = EM28XX_VMUX_TELEVISION, |
| 212 | .vmux = TVP5150_COMPOSITE0, |
| 213 | .amux = 0, |
| 214 | },{ |
| 215 | .type = EM28XX_VMUX_COMPOSITE1, |
| 216 | .vmux = TVP5150_COMPOSITE1, |
| 217 | .amux = 1, |
| 218 | },{ |
| 219 | .type = EM28XX_VMUX_SVIDEO, |
| 220 | .vmux = TVP5150_SVIDEO, |
| 221 | .amux = 1, |
| 222 | }}, |
| 223 | }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 224 | [EM2820_BOARD_MSI_VOX_USB_2] = { |
| 225 | .name = "MSI VOX USB 2.0", |
| 226 | .vchannels = 3, |
| 227 | .norm = VIDEO_MODE_PAL, |
Markus Rechberger | 08eca13 | 2005-11-08 21:38:05 -0800 | [diff] [blame] | 228 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 229 | .tda9887_conf = TDA9887_PRESENT|TDA9887_PORT1_ACTIVE|TDA9887_PORT2_ACTIVE, |
| 230 | .has_tuner = 1, |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 231 | .decoder = EM28XX_SAA7114, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 232 | .input = {{ |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 233 | .type = EM28XX_VMUX_TELEVISION, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 234 | .vmux = SAA7115_COMPOSITE4, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 235 | .amux = 0, |
| 236 | },{ |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 237 | .type = EM28XX_VMUX_COMPOSITE1, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 238 | .vmux = SAA7115_COMPOSITE0, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 239 | .amux = 1, |
| 240 | },{ |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 241 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 242 | .vmux = SAA7115_SVIDEO3, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 243 | .amux = 1, |
| 244 | }}, |
| 245 | }, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 246 | [EM2800_BOARD_TERRATEC_CINERGY_200] = { |
| 247 | .name = "Terratec Cinergy 200 USB", |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 248 | .is_em2800 = 1, |
| 249 | .vchannels = 3, |
| 250 | .norm = VIDEO_MODE_PAL, |
| 251 | .tuner_type = TUNER_LG_PAL_NEW_TAPC, |
| 252 | .tda9887_conf = TDA9887_PRESENT, |
| 253 | .has_tuner = 1, |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 254 | .decoder = EM28XX_SAA7113, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 255 | .input = {{ |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 256 | .type = EM28XX_VMUX_TELEVISION, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 257 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 258 | .amux = 0, |
| 259 | },{ |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 260 | .type = EM28XX_VMUX_COMPOSITE1, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 261 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 262 | .amux = 1, |
| 263 | },{ |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 264 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 265 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 266 | .amux = 1, |
| 267 | }}, |
| 268 | }, |
| 269 | [EM2800_BOARD_LEADTEK_WINFAST_USBII] = { |
| 270 | .name = "Leadtek Winfast USB II", |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 271 | .is_em2800 = 1, |
| 272 | .vchannels = 3, |
| 273 | .norm = VIDEO_MODE_PAL, |
| 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 | 596d92d | 2005-11-08 21:37:24 -0800 | [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, |
| 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, |
| 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, |
| 290 | }}, |
| 291 | }, |
| 292 | [EM2800_BOARD_KWORLD_USB2800] = { |
| 293 | .name = "Kworld USB2800", |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 294 | .is_em2800 = 1, |
| 295 | .vchannels = 3, |
| 296 | .norm = VIDEO_MODE_PAL, |
| 297 | .tuner_type = TUNER_PHILIPS_ATSC, |
| 298 | .tda9887_conf = TDA9887_PRESENT, |
| 299 | .has_tuner = 1, |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 300 | .decoder = EM28XX_SAA7113, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 301 | .input = {{ |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 302 | .type = EM28XX_VMUX_TELEVISION, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 303 | .vmux = SAA7115_COMPOSITE2, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 304 | .amux = 0, |
| 305 | },{ |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 306 | .type = EM28XX_VMUX_COMPOSITE1, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 307 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 308 | .amux = 1, |
| 309 | },{ |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 310 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 311 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 312 | .amux = 1, |
| 313 | }}, |
| 314 | }, |
Mauro Carvalho Chehab | 45632c4 | 2005-11-08 21:38:15 -0800 | [diff] [blame] | 315 | [EM2820_BOARD_PINNACLE_DVC_90] = { |
| 316 | .name = "Pinnacle Dazzle DVC 90", |
| 317 | .vchannels = 3, |
| 318 | .norm = VIDEO_MODE_PAL, |
| 319 | .has_tuner = 0, |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 320 | .decoder = EM28XX_SAA7113, |
Mauro Carvalho Chehab | 45632c4 | 2005-11-08 21:38:15 -0800 | [diff] [blame] | 321 | .input = {{ |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 322 | .type = EM28XX_VMUX_COMPOSITE1, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 323 | .vmux = SAA7115_COMPOSITE0, |
Mauro Carvalho Chehab | 45632c4 | 2005-11-08 21:38:15 -0800 | [diff] [blame] | 324 | .amux = 1, |
| 325 | },{ |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 326 | .type = EM28XX_VMUX_SVIDEO, |
Hans Verkuil | c7c0b34 | 2006-04-02 13:35:00 -0300 | [diff] [blame] | 327 | .vmux = SAA7115_SVIDEO3, |
Mauro Carvalho Chehab | 45632c4 | 2005-11-08 21:38:15 -0800 | [diff] [blame] | 328 | .amux = 1, |
| 329 | }}, |
| 330 | }, |
Mauro Carvalho Chehab | ea4fd56 | 2007-11-03 21:21:57 -0300 | [diff] [blame^] | 331 | [EM2820_BOARD_PROLINK_PLAYTV_USB2] = { |
| 332 | .name = "Pixelview Prolink PlayTV USB 2.0", |
| 333 | .vchannels = 3, |
| 334 | .tda9887_conf = TDA9887_PRESENT, |
| 335 | .has_tuner = 1, |
| 336 | .decoder = EM28XX_SAA7113, |
| 337 | .input = {{ |
| 338 | .type = EM28XX_VMUX_TELEVISION, |
| 339 | .vmux = SAA7115_COMPOSITE2, |
| 340 | .amux = 1, |
| 341 | },{ |
| 342 | .type = EM28XX_VMUX_COMPOSITE1, |
| 343 | .vmux = SAA7115_COMPOSITE0, |
| 344 | .amux = 1, |
| 345 | },{ |
| 346 | .type = EM28XX_VMUX_SVIDEO, |
| 347 | .vmux = SAA7115_SVIDEO3, |
| 348 | .amux = 1, |
| 349 | }}, |
| 350 | }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 351 | }; |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 352 | const unsigned int em28xx_bcount = ARRAY_SIZE(em28xx_boards); |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 353 | |
| 354 | /* table of devices that work with this driver */ |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 355 | struct usb_device_id em28xx_id_table [] = { |
Mauro Carvalho Chehab | 3dbd85b | 2007-11-03 08:07:07 -0300 | [diff] [blame] | 356 | { USB_DEVICE(0xeb1a, 0x2750), .driver_info = EM2820_BOARD_UNKNOWN }, |
Mauro Carvalho Chehab | 596d92d | 2005-11-08 21:37:24 -0800 | [diff] [blame] | 357 | { USB_DEVICE(0xeb1a, 0x2800), .driver_info = EM2800_BOARD_UNKNOWN }, |
Mauro Carvalho Chehab | 3dbd85b | 2007-11-03 08:07:07 -0300 | [diff] [blame] | 358 | { USB_DEVICE(0xeb1a, 0x2820), .driver_info = EM2820_BOARD_UNKNOWN }, |
| 359 | { USB_DEVICE(0xeb1a, 0x2821), .driver_info = EM2820_BOARD_UNKNOWN }, |
| 360 | { USB_DEVICE(0xeb1a, 0x2860), .driver_info = EM2820_BOARD_UNKNOWN }, |
| 361 | { USB_DEVICE(0xeb1a, 0x2861), .driver_info = EM2820_BOARD_UNKNOWN }, |
| 362 | { USB_DEVICE(0xeb1a, 0x2870), .driver_info = EM2820_BOARD_UNKNOWN }, |
| 363 | { USB_DEVICE(0xeb1a, 0x2881), .driver_info = EM2820_BOARD_UNKNOWN }, |
| 364 | { USB_DEVICE(0xeb1a, 0x2883), .driver_info = EM2820_BOARD_UNKNOWN }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 365 | { USB_DEVICE(0x0ccd, 0x0036), .driver_info = EM2820_BOARD_TERRATEC_CINERGY_250 }, |
| 366 | { USB_DEVICE(0x2304, 0x0208), .driver_info = EM2820_BOARD_PINNACLE_USB_2 }, |
| 367 | { USB_DEVICE(0x2040, 0x4200), .driver_info = EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 }, |
Mauro Carvalho Chehab | 45632c4 | 2005-11-08 21:38:15 -0800 | [diff] [blame] | 368 | { USB_DEVICE(0x2304, 0x0207), .driver_info = EM2820_BOARD_PINNACLE_DVC_90 }, |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 369 | { USB_DEVICE(0x2040, 0x6500), .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900 }, |
Mauro Carvalho Chehab | 6c362c8 | 2007-10-29 23:36:12 -0300 | [diff] [blame] | 370 | { USB_DEVICE(0x2040, 0x6513), .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900 }, |
Mauro Carvalho Chehab | 1246657 | 2007-10-24 11:08:20 -0300 | [diff] [blame] | 371 | { USB_DEVICE(0x0ccd, 0x0042), .driver_info = EM2880_BOARD_TERRATEC_HYBRID_XS }, |
| 372 | { USB_DEVICE(0x0ccd, 0x0047), .driver_info = EM2880_BOARD_TERRATEC_PRODIGY_XS }, |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 373 | { }, |
| 374 | }; |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 375 | MODULE_DEVICE_TABLE (usb, em28xx_id_table); |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 376 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 377 | static struct em28xx_hash_table em28xx_hash [] = { |
Mauro Carvalho Chehab | ea4fd56 | 2007-11-03 21:21:57 -0300 | [diff] [blame^] | 378 | /* P/N: SA 60002070465 Tuner: TVF7533-MF */ |
| 379 | { 0x6ce05a8f, EM2820_BOARD_PROLINK_PLAYTV_USB2, TUNER_YMEC_TVF_5533MF }, |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 380 | }; |
| 381 | |
| 382 | /* Since em28xx_pre_card_setup() requires a proper dev->model, |
| 383 | * this won't work for boards with generic PCI IDs |
| 384 | */ |
Markus Rechberger | a94e95b | 2006-01-23 17:11:10 -0200 | [diff] [blame] | 385 | void em28xx_pre_card_setup(struct em28xx *dev) |
| 386 | { |
| 387 | /* request some modules */ |
| 388 | switch(dev->model){ |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 389 | case EM2880_BOARD_TERRATEC_PRODIGY_XS: |
| 390 | case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900: |
| 391 | case EM2880_BOARD_TERRATEC_HYBRID_XS: |
| 392 | /* reset through GPIO? */ |
| 393 | em28xx_write_regs_req(dev, 0x00, 0x08, "\x7d", 1); |
| 394 | break; |
Markus Rechberger | a94e95b | 2006-01-23 17:11:10 -0200 | [diff] [blame] | 395 | } |
| 396 | } |
| 397 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 398 | static int em28xx_tuner_callback(void *ptr, int command, int arg) |
| 399 | { |
| 400 | int rc = 0; |
| 401 | struct em28xx *dev = ptr; |
| 402 | |
| 403 | if (dev->tuner_type != TUNER_XC2028) |
| 404 | return 0; |
| 405 | |
| 406 | switch (command) { |
| 407 | case XC2028_TUNER_RESET: |
| 408 | /* FIXME: This is device-dependent */ |
| 409 | dev->em28xx_write_regs_req(dev, 0x00, 0x48, "\x00", 1); |
| 410 | dev->em28xx_write_regs_req(dev, 0x00, 0x12, "\x67", 1); |
| 411 | |
| 412 | msleep(140); |
| 413 | break; |
| 414 | } |
| 415 | return rc; |
| 416 | } |
| 417 | |
Mauro Carvalho Chehab | 882876b | 2007-10-29 11:33:18 -0300 | [diff] [blame] | 418 | static void em28xx_config_tuner (struct em28xx *dev) |
| 419 | { |
| 420 | struct v4l2_priv_tun_config xc2028_cfg; |
| 421 | struct xc2028_ctrl ctl; |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 422 | struct tuner_setup tun_setup; |
| 423 | struct v4l2_frequency f; |
Mauro Carvalho Chehab | 882876b | 2007-10-29 11:33:18 -0300 | [diff] [blame] | 424 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 425 | if (!dev->has_tuner) |
| 426 | return; |
Mauro Carvalho Chehab | 882876b | 2007-10-29 11:33:18 -0300 | [diff] [blame] | 427 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 428 | tun_setup.mode_mask = T_ANALOG_TV | T_RADIO; |
| 429 | tun_setup.type = dev->tuner_type; |
| 430 | tun_setup.addr = dev->tuner_addr; |
| 431 | tun_setup.tuner_callback = em28xx_tuner_callback; |
Mauro Carvalho Chehab | 882876b | 2007-10-29 11:33:18 -0300 | [diff] [blame] | 432 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 433 | em28xx_i2c_call_clients(dev, TUNER_SET_TYPE_ADDR, &tun_setup); |
Mauro Carvalho Chehab | 882876b | 2007-10-29 11:33:18 -0300 | [diff] [blame] | 434 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 435 | if (dev->tuner_type == TUNER_XC2028) { |
| 436 | memset (&ctl, 0, sizeof(ctl)); |
| 437 | |
| 438 | ctl.fname = XC2028_DEFAULT_FIRMWARE; |
| 439 | ctl.max_len = 64; |
| 440 | |
| 441 | xc2028_cfg.tuner = TUNER_XC2028; |
| 442 | xc2028_cfg.priv = &ctl; |
| 443 | |
| 444 | em28xx_i2c_call_clients(dev, TUNER_SET_CONFIG, &xc2028_cfg); |
| 445 | } |
| 446 | |
| 447 | /* configure tuner */ |
| 448 | f.tuner = 0; |
| 449 | f.type = V4L2_TUNER_ANALOG_TV; |
| 450 | f.frequency = 9076; /* just a magic number */ |
| 451 | dev->ctl_freq = f.frequency; |
| 452 | em28xx_i2c_call_clients(dev, VIDIOC_S_FREQUENCY, &f); |
| 453 | } |
| 454 | |
| 455 | static int em28xx_hint_board(struct em28xx *dev) |
| 456 | { |
| 457 | int i; |
| 458 | |
| 459 | for (i = 0; i < ARRAY_SIZE(em28xx_hash); i++) { |
| 460 | if (dev->hash == em28xx_hash[i].hash) { |
| 461 | dev->model = em28xx_hash[i].model; |
| 462 | dev->tuner_type = em28xx_hash[i].tuner; |
| 463 | |
| 464 | em28xx_errdev("Your board has no unique USB ID.\n"); |
| 465 | em28xx_errdev("A hint were successfully done, " |
| 466 | "based on eeprom hash.\n"); |
| 467 | em28xx_errdev("This method is not 100%% failproof.\n"); |
| 468 | em28xx_errdev("If the board were missdetected, " |
| 469 | "please email this log to:\n"); |
| 470 | em28xx_errdev("\tV4L Mailing List " |
| 471 | " <video4linux-list@redhat.com>\n"); |
| 472 | em28xx_errdev("Board detected as %s\n", |
| 473 | em28xx_boards[dev->model].name); |
| 474 | |
| 475 | return 0; |
| 476 | } |
| 477 | } |
| 478 | em28xx_errdev("Your board has no unique USB ID and thus need a " |
| 479 | "hint to be detected.\n"); |
| 480 | em28xx_errdev("You may try to use card=<n> insmod option to " |
| 481 | "workaround that.\n"); |
| 482 | em28xx_errdev("Please send an email with this log to:\n"); |
| 483 | em28xx_errdev("\tV4L Mailing List <video4linux-list@redhat.com>\n"); |
| 484 | em28xx_errdev("Board eeprom hash is 0x%08lx\n", dev->hash); |
| 485 | |
| 486 | em28xx_errdev("Here is a list of valid choices for the card=<n>" |
| 487 | " insmod option:\n"); |
| 488 | for (i = 0; i < em28xx_bcount; i++) { |
| 489 | em28xx_errdev(" card=%d -> %s\n", |
| 490 | i, em28xx_boards[i].name); |
| 491 | } |
| 492 | return -1; |
Mauro Carvalho Chehab | 882876b | 2007-10-29 11:33:18 -0300 | [diff] [blame] | 493 | } |
| 494 | |
Mauro Carvalho Chehab | 3acf280 | 2005-11-08 21:38:27 -0800 | [diff] [blame] | 495 | void em28xx_card_setup(struct em28xx *dev) |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 496 | { |
| 497 | /* request some modules */ |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 498 | switch (dev->model) { |
| 499 | case EM2820_BOARD_HAUPPAUGE_WINTV_USB_2: |
| 500 | { |
| 501 | struct tveeprom tv; |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 502 | #ifdef CONFIG_MODULES |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 503 | request_module("tveeprom"); |
| 504 | request_module("ir-kbd-i2c"); |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 505 | #endif |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 506 | /* Call first TVeeprom */ |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 507 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 508 | dev->i2c_client.addr = 0xa0 >> 1; |
| 509 | tveeprom_hauppauge_analog(&dev->i2c_client, &tv, dev->eedata); |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 510 | |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 511 | dev->tuner_type = tv.tuner_type; |
| 512 | if (tv.audio_processor == AUDIO_CHIP_MSP34XX) { |
| 513 | dev->i2s_speed = 2048000; |
| 514 | dev->has_msp34xx = 1; |
| 515 | } |
| 516 | break; |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 517 | } |
Mauro Carvalho Chehab | 03910cc | 2007-11-03 21:20:59 -0300 | [diff] [blame] | 518 | case EM2820_BOARD_KWORLD_PVRTV2800RF: |
| 519 | /* GPIO enables sound on KWORLD PVR TV 2800RF */ |
| 520 | em28xx_write_regs_req(dev, 0x00, 0x08, "\xf9", 1); |
| 521 | break; |
| 522 | case EM2820_BOARD_UNKNOWN: |
| 523 | case EM2800_BOARD_UNKNOWN: |
| 524 | em28xx_hint_board(dev); |
| 525 | } |
| 526 | |
| 527 | dev->is_em2800 = em28xx_boards[dev->model].is_em2800; |
| 528 | dev->has_tuner = em28xx_boards[dev->model].has_tuner; |
| 529 | dev->has_msp34xx = em28xx_boards[dev->model].has_msp34xx; |
| 530 | dev->tda9887_conf = em28xx_boards[dev->model].tda9887_conf; |
| 531 | dev->decoder = em28xx_boards[dev->model].decoder; |
| 532 | dev->video_inputs = em28xx_boards[dev->model].vchannels; |
| 533 | |
| 534 | if (tuner >= 0) |
| 535 | dev->tuner_type = tuner; |
| 536 | |
| 537 | #ifdef CONFIG_MODULES |
| 538 | /* request some modules */ |
| 539 | if (dev->has_msp34xx) |
| 540 | request_module("msp3400"); |
| 541 | if (dev->decoder == EM28XX_SAA7113 || dev->decoder == EM28XX_SAA7114) |
| 542 | request_module("saa7115"); |
| 543 | if (dev->decoder == EM28XX_TVP5150) |
| 544 | request_module("tvp5150"); |
| 545 | if (dev->has_tuner) |
| 546 | request_module("tuner"); |
| 547 | #endif |
| 548 | |
Mauro Carvalho Chehab | 882876b | 2007-10-29 11:33:18 -0300 | [diff] [blame] | 549 | em28xx_config_tuner (dev); |
akpm@osdl.org | a6c2ba2 | 2005-11-08 21:37:07 -0800 | [diff] [blame] | 550 | } |