Mike Isely | 989eb15 | 2007-11-26 01:53:12 -0300 | [diff] [blame] | 1 | /* |
| 2 | * |
| 3 | * $Id$ |
| 4 | * |
| 5 | * Copyright (C) 2007 Mike Isely <isely@pobox.com> |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; either version 2 of the License |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 19 | * |
| 20 | */ |
| 21 | |
| 22 | /* |
| 23 | |
| 24 | This source file should encompass ALL per-device type information for the |
| 25 | driver. To define a new device, add elements to the pvr2_device_table and |
| 26 | pvr2_device_desc structures. |
| 27 | |
| 28 | */ |
| 29 | |
| 30 | #include "pvrusb2-devattr.h" |
| 31 | #include <linux/usb.h> |
Mike Isely | 6a54025 | 2007-12-02 23:51:34 -0300 | [diff] [blame] | 32 | /* This is needed in order to pull in tuner type ids... */ |
Mike Isely | 9e2e3ae | 2007-11-26 02:14:23 -0300 | [diff] [blame] | 33 | #include <linux/i2c.h> |
Mike Isely | 9e2e3ae | 2007-11-26 02:14:23 -0300 | [diff] [blame] | 34 | #include <media/tuner.h> |
Michael Krufky | 906a495 | 2008-03-28 05:47:47 -0300 | [diff] [blame] | 35 | #ifdef CONFIG_VIDEO_PVRUSB2_DVB |
| 36 | #include "pvrusb2-hdw-internal.h" |
| 37 | #include "lgdt330x.h" |
Michael Krufky | 087886e | 2008-03-28 05:49:36 -0300 | [diff] [blame] | 38 | #include "s5h1409.h" |
Michael Krufky | 4aef8fd | 2008-04-25 04:19:02 -0300 | [diff] [blame] | 39 | #include "s5h1411.h" |
Michael Krufky | 95814bc | 2008-04-19 15:36:51 -0300 | [diff] [blame] | 40 | #include "tda10048.h" |
Michael Krufky | 087886e | 2008-03-28 05:49:36 -0300 | [diff] [blame] | 41 | #include "tda18271.h" |
| 42 | #include "tda8290.h" |
Michael Krufky | 906a495 | 2008-03-28 05:47:47 -0300 | [diff] [blame] | 43 | #include "tuner-simple.h" |
| 44 | #endif |
Mike Isely | 989eb15 | 2007-11-26 01:53:12 -0300 | [diff] [blame] | 45 | |
Mike Isely | 4542783 | 2007-12-08 17:11:13 -0300 | [diff] [blame] | 46 | |
Mike Isely | d130fa8 | 2007-12-08 17:20:06 -0300 | [diff] [blame] | 47 | /*------------------------------------------------------------------------*/ |
| 48 | /* Hauppauge PVR-USB2 Model 29xxx */ |
Mike Isely | 989eb15 | 2007-11-26 01:53:12 -0300 | [diff] [blame] | 49 | |
Mike Isely | 989eb15 | 2007-11-26 01:53:12 -0300 | [diff] [blame] | 50 | static const char *pvr2_client_29xxx[] = { |
| 51 | "msp3400", |
| 52 | "saa7115", |
| 53 | "tuner", |
| 54 | }; |
| 55 | |
Mike Isely | 989eb15 | 2007-11-26 01:53:12 -0300 | [diff] [blame] | 56 | static const char *pvr2_fw1_names_29xxx[] = { |
| 57 | "v4l-pvrusb2-29xxx-01.fw", |
| 58 | }; |
| 59 | |
Mike Isely | d130fa8 | 2007-12-08 17:20:06 -0300 | [diff] [blame] | 60 | static const struct pvr2_device_desc pvr2_device_29xxx = { |
Mike Isely | e7f677f | 2008-03-16 01:13:17 -0300 | [diff] [blame] | 61 | .description = "WinTV PVR USB2 Model Category 29xxx", |
Mike Isely | 989eb15 | 2007-11-26 01:53:12 -0300 | [diff] [blame] | 62 | .shortname = "29xxx", |
| 63 | .client_modules.lst = pvr2_client_29xxx, |
| 64 | .client_modules.cnt = ARRAY_SIZE(pvr2_client_29xxx), |
| 65 | .fx2_firmware.lst = pvr2_fw1_names_29xxx, |
| 66 | .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_29xxx), |
Mike Isely | aaf7884 | 2007-11-26 02:04:11 -0300 | [diff] [blame] | 67 | .flag_has_hauppauge_rom = !0, |
Mike Isely | 1aaac60 | 2008-04-22 14:45:36 -0300 | [diff] [blame] | 68 | .flag_has_analogtuner = !0, |
Mike Isely | d068c6e | 2008-04-22 14:45:36 -0300 | [diff] [blame] | 69 | .flag_has_fmradio = !0, |
Mike Isely | 1aaac60 | 2008-04-22 14:45:36 -0300 | [diff] [blame] | 70 | .flag_has_composite = !0, |
| 71 | .flag_has_svideo = !0, |
Mike Isely | f5174af | 2007-11-26 02:07:26 -0300 | [diff] [blame] | 72 | .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, |
Mike Isely | 40381cb | 2008-04-22 14:45:42 -0300 | [diff] [blame] | 73 | .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE, |
Mike Isely | d130fa8 | 2007-12-08 17:20:06 -0300 | [diff] [blame] | 74 | }; |
| 75 | |
| 76 | |
| 77 | |
| 78 | /*------------------------------------------------------------------------*/ |
| 79 | /* Hauppauge PVR-USB2 Model 24xxx */ |
| 80 | |
| 81 | static const char *pvr2_client_24xxx[] = { |
| 82 | "cx25840", |
| 83 | "tuner", |
| 84 | "wm8775", |
| 85 | }; |
| 86 | |
| 87 | static const char *pvr2_fw1_names_24xxx[] = { |
| 88 | "v4l-pvrusb2-24xxx-01.fw", |
| 89 | }; |
| 90 | |
| 91 | static const struct pvr2_device_desc pvr2_device_24xxx = { |
Mike Isely | e7f677f | 2008-03-16 01:13:17 -0300 | [diff] [blame] | 92 | .description = "WinTV PVR USB2 Model Category 24xxx", |
Mike Isely | 989eb15 | 2007-11-26 01:53:12 -0300 | [diff] [blame] | 93 | .shortname = "24xxx", |
| 94 | .client_modules.lst = pvr2_client_24xxx, |
| 95 | .client_modules.cnt = ARRAY_SIZE(pvr2_client_24xxx), |
| 96 | .fx2_firmware.lst = pvr2_fw1_names_24xxx, |
| 97 | .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_24xxx), |
| 98 | .flag_has_cx25840 = !0, |
| 99 | .flag_has_wm8775 = !0, |
Mike Isely | aaf7884 | 2007-11-26 02:04:11 -0300 | [diff] [blame] | 100 | .flag_has_hauppauge_rom = !0, |
Mike Isely | 056d1a8 | 2007-11-26 02:09:42 -0300 | [diff] [blame] | 101 | .flag_has_hauppauge_custom_ir = !0, |
Mike Isely | 1aaac60 | 2008-04-22 14:45:36 -0300 | [diff] [blame] | 102 | .flag_has_analogtuner = !0, |
Mike Isely | d068c6e | 2008-04-22 14:45:36 -0300 | [diff] [blame] | 103 | .flag_has_fmradio = !0, |
Mike Isely | 1aaac60 | 2008-04-22 14:45:36 -0300 | [diff] [blame] | 104 | .flag_has_composite = !0, |
| 105 | .flag_has_svideo = !0, |
Mike Isely | f5174af | 2007-11-26 02:07:26 -0300 | [diff] [blame] | 106 | .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, |
Mike Isely | 40381cb | 2008-04-22 14:45:42 -0300 | [diff] [blame] | 107 | .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE, |
Mike Isely | d130fa8 | 2007-12-08 17:20:06 -0300 | [diff] [blame] | 108 | }; |
| 109 | |
| 110 | |
| 111 | |
| 112 | /*------------------------------------------------------------------------*/ |
| 113 | /* GOTVIEW USB2.0 DVD2 */ |
| 114 | |
| 115 | static const char *pvr2_client_gotview_2[] = { |
| 116 | "cx25840", |
| 117 | "tuner", |
| 118 | }; |
| 119 | |
| 120 | static const struct pvr2_device_desc pvr2_device_gotview_2 = { |
Mike Isely | 9e2e3ae | 2007-11-26 02:14:23 -0300 | [diff] [blame] | 121 | .description = "Gotview USB 2.0 DVD 2", |
| 122 | .shortname = "gv2", |
| 123 | .client_modules.lst = pvr2_client_gotview_2, |
| 124 | .client_modules.cnt = ARRAY_SIZE(pvr2_client_gotview_2), |
Mike Isely | 787f5ab | 2007-12-08 17:08:32 -0300 | [diff] [blame] | 125 | .flag_has_cx25840 = !0, |
Mike Isely | 9e2e3ae | 2007-11-26 02:14:23 -0300 | [diff] [blame] | 126 | .default_tuner_type = TUNER_PHILIPS_FM1216ME_MK3, |
Mike Isely | 1aaac60 | 2008-04-22 14:45:36 -0300 | [diff] [blame] | 127 | .flag_has_analogtuner = !0, |
Mike Isely | 1df59f0 | 2008-04-21 03:50:39 -0300 | [diff] [blame] | 128 | .flag_has_fmradio = !0, |
Mike Isely | 1aaac60 | 2008-04-22 14:45:36 -0300 | [diff] [blame] | 129 | .flag_has_composite = !0, |
| 130 | .flag_has_svideo = !0, |
Mike Isely | 9e2e3ae | 2007-11-26 02:14:23 -0300 | [diff] [blame] | 131 | .signal_routing_scheme = PVR2_ROUTING_SCHEME_GOTVIEW, |
Mike Isely | 989eb15 | 2007-11-26 01:53:12 -0300 | [diff] [blame] | 132 | }; |
| 133 | |
Mike Isely | d130fa8 | 2007-12-08 17:20:06 -0300 | [diff] [blame] | 134 | |
| 135 | |
Mike Isely | fd1da78 | 2008-04-22 14:45:42 -0300 | [diff] [blame] | 136 | /*------------------------------------------------------------------------*/ |
| 137 | /* GOTVIEW USB2.0 DVD Deluxe */ |
| 138 | |
| 139 | /* (same module list as gotview_2) */ |
| 140 | |
| 141 | static const struct pvr2_device_desc pvr2_device_gotview_2d = { |
| 142 | .description = "Gotview USB 2.0 DVD Deluxe", |
| 143 | .shortname = "gv2d", |
| 144 | .client_modules.lst = pvr2_client_gotview_2, |
| 145 | .client_modules.cnt = ARRAY_SIZE(pvr2_client_gotview_2), |
| 146 | .flag_has_cx25840 = !0, |
| 147 | .default_tuner_type = TUNER_PHILIPS_FM1216ME_MK3, |
| 148 | .flag_has_analogtuner = !0, |
| 149 | .flag_has_composite = !0, |
| 150 | .flag_has_svideo = !0, |
| 151 | .signal_routing_scheme = PVR2_ROUTING_SCHEME_GOTVIEW, |
| 152 | }; |
| 153 | |
| 154 | |
| 155 | |
Mike Isely | d130fa8 | 2007-12-08 17:20:06 -0300 | [diff] [blame] | 156 | /*------------------------------------------------------------------------*/ |
| 157 | /* OnAir Creator */ |
| 158 | |
Michael Krufky | 906a495 | 2008-03-28 05:47:47 -0300 | [diff] [blame] | 159 | #ifdef CONFIG_VIDEO_PVRUSB2_DVB |
| 160 | static struct lgdt330x_config pvr2_lgdt3303_config = { |
| 161 | .demod_address = 0x0e, |
| 162 | .demod_chip = LGDT3303, |
| 163 | .clock_polarity_flip = 1, |
| 164 | }; |
| 165 | |
| 166 | static int pvr2_lgdt3303_attach(struct pvr2_dvb_adapter *adap) |
| 167 | { |
| 168 | adap->fe = dvb_attach(lgdt330x_attach, &pvr2_lgdt3303_config, |
| 169 | &adap->channel.hdw->i2c_adap); |
| 170 | if (adap->fe) |
| 171 | return 0; |
| 172 | |
| 173 | return -EIO; |
| 174 | } |
| 175 | |
| 176 | static int pvr2_lgh06xf_attach(struct pvr2_dvb_adapter *adap) |
| 177 | { |
| 178 | dvb_attach(simple_tuner_attach, adap->fe, |
| 179 | &adap->channel.hdw->i2c_adap, 0x61, |
| 180 | TUNER_LG_TDVS_H06XF); |
| 181 | |
| 182 | return 0; |
| 183 | } |
| 184 | |
Adrian Bunk | e9b59f6 | 2008-05-10 04:35:24 -0300 | [diff] [blame^] | 185 | static struct pvr2_dvb_props pvr2_onair_creator_fe_props = { |
Michael Krufky | 906a495 | 2008-03-28 05:47:47 -0300 | [diff] [blame] | 186 | .frontend_attach = pvr2_lgdt3303_attach, |
| 187 | .tuner_attach = pvr2_lgh06xf_attach, |
| 188 | }; |
| 189 | #endif |
| 190 | |
Mike Isely | d130fa8 | 2007-12-08 17:20:06 -0300 | [diff] [blame] | 191 | static const char *pvr2_client_onair_creator[] = { |
| 192 | "saa7115", |
| 193 | "tuner", |
| 194 | "cs53l32a", |
| 195 | }; |
| 196 | |
| 197 | static const struct pvr2_device_desc pvr2_device_onair_creator = { |
| 198 | .description = "OnAir Creator Hybrid USB tuner", |
| 199 | .shortname = "oac", |
| 200 | .client_modules.lst = pvr2_client_onair_creator, |
| 201 | .client_modules.cnt = ARRAY_SIZE(pvr2_client_onair_creator), |
| 202 | .default_tuner_type = TUNER_LG_TDVS_H06XF, |
Mike Isely | 1aaac60 | 2008-04-22 14:45:36 -0300 | [diff] [blame] | 203 | .flag_has_analogtuner = !0, |
| 204 | .flag_has_composite = !0, |
| 205 | .flag_has_svideo = !0, |
Mike Isely | 72998b7 | 2008-04-03 04:51:19 -0300 | [diff] [blame] | 206 | .flag_digital_requires_cx23416 = !0, |
Mike Isely | d130fa8 | 2007-12-08 17:20:06 -0300 | [diff] [blame] | 207 | .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, |
Mike Isely | e8f5bac | 2008-04-22 14:45:40 -0300 | [diff] [blame] | 208 | .digital_control_scheme = PVR2_DIGITAL_SCHEME_ONAIR, |
Michael Krufky | f0910c7 | 2008-04-22 14:45:45 -0300 | [diff] [blame] | 209 | .default_std_mask = V4L2_STD_NTSC_M, |
Michael Krufky | 906a495 | 2008-03-28 05:47:47 -0300 | [diff] [blame] | 210 | #ifdef CONFIG_VIDEO_PVRUSB2_DVB |
| 211 | .dvb_props = &pvr2_onair_creator_fe_props, |
| 212 | #endif |
Mike Isely | d130fa8 | 2007-12-08 17:20:06 -0300 | [diff] [blame] | 213 | }; |
Mike Isely | d130fa8 | 2007-12-08 17:20:06 -0300 | [diff] [blame] | 214 | |
| 215 | |
| 216 | |
Mike Isely | d130fa8 | 2007-12-08 17:20:06 -0300 | [diff] [blame] | 217 | /*------------------------------------------------------------------------*/ |
| 218 | /* OnAir USB 2.0 */ |
| 219 | |
Michael Krufky | 906a495 | 2008-03-28 05:47:47 -0300 | [diff] [blame] | 220 | #ifdef CONFIG_VIDEO_PVRUSB2_DVB |
| 221 | static struct lgdt330x_config pvr2_lgdt3302_config = { |
| 222 | .demod_address = 0x0e, |
| 223 | .demod_chip = LGDT3302, |
| 224 | }; |
| 225 | |
| 226 | static int pvr2_lgdt3302_attach(struct pvr2_dvb_adapter *adap) |
| 227 | { |
| 228 | adap->fe = dvb_attach(lgdt330x_attach, &pvr2_lgdt3302_config, |
| 229 | &adap->channel.hdw->i2c_adap); |
| 230 | if (adap->fe) |
| 231 | return 0; |
| 232 | |
| 233 | return -EIO; |
| 234 | } |
| 235 | |
| 236 | static int pvr2_fcv1236d_attach(struct pvr2_dvb_adapter *adap) |
| 237 | { |
| 238 | dvb_attach(simple_tuner_attach, adap->fe, |
| 239 | &adap->channel.hdw->i2c_adap, 0x61, |
| 240 | TUNER_PHILIPS_FCV1236D); |
| 241 | |
| 242 | return 0; |
| 243 | } |
| 244 | |
Adrian Bunk | e9b59f6 | 2008-05-10 04:35:24 -0300 | [diff] [blame^] | 245 | static struct pvr2_dvb_props pvr2_onair_usb2_fe_props = { |
Michael Krufky | 906a495 | 2008-03-28 05:47:47 -0300 | [diff] [blame] | 246 | .frontend_attach = pvr2_lgdt3302_attach, |
| 247 | .tuner_attach = pvr2_fcv1236d_attach, |
| 248 | }; |
| 249 | #endif |
| 250 | |
Mike Isely | d130fa8 | 2007-12-08 17:20:06 -0300 | [diff] [blame] | 251 | static const char *pvr2_client_onair_usb2[] = { |
| 252 | "saa7115", |
| 253 | "tuner", |
| 254 | "cs53l32a", |
| 255 | }; |
| 256 | |
| 257 | static const struct pvr2_device_desc pvr2_device_onair_usb2 = { |
| 258 | .description = "OnAir USB2 Hybrid USB tuner", |
| 259 | .shortname = "oa2", |
| 260 | .client_modules.lst = pvr2_client_onair_usb2, |
| 261 | .client_modules.cnt = ARRAY_SIZE(pvr2_client_onair_usb2), |
Michael Krufky | ab8b870 | 2008-04-22 14:46:05 -0300 | [diff] [blame] | 262 | .default_tuner_type = TUNER_PHILIPS_FCV1236D, |
Mike Isely | 1aaac60 | 2008-04-22 14:45:36 -0300 | [diff] [blame] | 263 | .flag_has_analogtuner = !0, |
| 264 | .flag_has_composite = !0, |
| 265 | .flag_has_svideo = !0, |
Mike Isely | 72998b7 | 2008-04-03 04:51:19 -0300 | [diff] [blame] | 266 | .flag_digital_requires_cx23416 = !0, |
Mike Isely | d130fa8 | 2007-12-08 17:20:06 -0300 | [diff] [blame] | 267 | .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, |
Mike Isely | e8f5bac | 2008-04-22 14:45:40 -0300 | [diff] [blame] | 268 | .digital_control_scheme = PVR2_DIGITAL_SCHEME_ONAIR, |
Michael Krufky | f0910c7 | 2008-04-22 14:45:45 -0300 | [diff] [blame] | 269 | .default_std_mask = V4L2_STD_NTSC_M, |
Michael Krufky | 906a495 | 2008-03-28 05:47:47 -0300 | [diff] [blame] | 270 | #ifdef CONFIG_VIDEO_PVRUSB2_DVB |
| 271 | .dvb_props = &pvr2_onair_usb2_fe_props, |
| 272 | #endif |
Mike Isely | d130fa8 | 2007-12-08 17:20:06 -0300 | [diff] [blame] | 273 | }; |
Mike Isely | d130fa8 | 2007-12-08 17:20:06 -0300 | [diff] [blame] | 274 | |
| 275 | |
| 276 | |
| 277 | /*------------------------------------------------------------------------*/ |
Michael Krufky | 92c9d07 | 2008-03-15 23:59:29 -0300 | [diff] [blame] | 278 | /* Hauppauge PVR-USB2 Model 73xxx */ |
| 279 | |
Michael Krufky | 95814bc | 2008-04-19 15:36:51 -0300 | [diff] [blame] | 280 | #ifdef CONFIG_VIDEO_PVRUSB2_DVB |
| 281 | static struct tda10048_config hauppauge_tda10048_config = { |
| 282 | .demod_address = 0x10 >> 1, |
| 283 | .output_mode = TDA10048_PARALLEL_OUTPUT, |
| 284 | .fwbulkwritelen = TDA10048_BULKWRITE_50, |
| 285 | .inversion = TDA10048_INVERSION_ON, |
| 286 | }; |
| 287 | |
| 288 | static struct tda829x_config tda829x_no_probe = { |
| 289 | .probe_tuner = TDA829X_DONT_PROBE, |
| 290 | }; |
| 291 | |
| 292 | static struct tda18271_config hauppauge_tda18271_dvb_config = { |
| 293 | .gate = TDA18271_GATE_ANALOG, |
| 294 | }; |
| 295 | |
| 296 | static int pvr2_tda10048_attach(struct pvr2_dvb_adapter *adap) |
| 297 | { |
| 298 | adap->fe = dvb_attach(tda10048_attach, &hauppauge_tda10048_config, |
| 299 | &adap->channel.hdw->i2c_adap); |
| 300 | if (adap->fe) |
| 301 | return 0; |
| 302 | |
| 303 | return -EIO; |
| 304 | } |
| 305 | |
| 306 | static int pvr2_73xxx_tda18271_8295_attach(struct pvr2_dvb_adapter *adap) |
| 307 | { |
| 308 | dvb_attach(tda829x_attach, adap->fe, |
| 309 | &adap->channel.hdw->i2c_adap, 0x42, |
| 310 | &tda829x_no_probe); |
| 311 | dvb_attach(tda18271_attach, adap->fe, 0x60, |
| 312 | &adap->channel.hdw->i2c_adap, |
| 313 | &hauppauge_tda18271_dvb_config); |
| 314 | |
| 315 | return 0; |
| 316 | } |
| 317 | |
Adrian Bunk | e9b59f6 | 2008-05-10 04:35:24 -0300 | [diff] [blame^] | 318 | static struct pvr2_dvb_props pvr2_73xxx_dvb_props = { |
Michael Krufky | 95814bc | 2008-04-19 15:36:51 -0300 | [diff] [blame] | 319 | .frontend_attach = pvr2_tda10048_attach, |
| 320 | .tuner_attach = pvr2_73xxx_tda18271_8295_attach, |
| 321 | }; |
| 322 | #endif |
| 323 | |
Michael Krufky | 92c9d07 | 2008-03-15 23:59:29 -0300 | [diff] [blame] | 324 | static const char *pvr2_client_73xxx[] = { |
| 325 | "cx25840", |
| 326 | "tuner", |
| 327 | }; |
| 328 | |
| 329 | static const char *pvr2_fw1_names_73xxx[] = { |
| 330 | "v4l-pvrusb2-73xxx-01.fw", |
| 331 | }; |
| 332 | |
| 333 | static const struct pvr2_device_desc pvr2_device_73xxx = { |
Mike Isely | e7f677f | 2008-03-16 01:13:17 -0300 | [diff] [blame] | 334 | .description = "WinTV PVR USB2 Model Category 73xxx", |
Michael Krufky | 92c9d07 | 2008-03-15 23:59:29 -0300 | [diff] [blame] | 335 | .shortname = "73xxx", |
| 336 | .client_modules.lst = pvr2_client_73xxx, |
| 337 | .client_modules.cnt = ARRAY_SIZE(pvr2_client_73xxx), |
| 338 | .fx2_firmware.lst = pvr2_fw1_names_73xxx, |
| 339 | .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_73xxx), |
| 340 | .flag_has_cx25840 = !0, |
| 341 | .flag_has_hauppauge_rom = !0, |
| 342 | .flag_has_analogtuner = !0, |
| 343 | .flag_has_composite = !0, |
| 344 | .flag_has_svideo = !0, |
| 345 | .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, |
| 346 | .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE, |
| 347 | .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE, |
Michael Krufky | 95814bc | 2008-04-19 15:36:51 -0300 | [diff] [blame] | 348 | #ifdef CONFIG_VIDEO_PVRUSB2_DVB |
| 349 | .dvb_props = &pvr2_73xxx_dvb_props, |
| 350 | #endif |
Michael Krufky | 92c9d07 | 2008-03-15 23:59:29 -0300 | [diff] [blame] | 351 | }; |
| 352 | |
| 353 | |
| 354 | |
| 355 | /*------------------------------------------------------------------------*/ |
Michael Krufky | 11fcd47 | 2007-10-25 02:01:10 -0300 | [diff] [blame] | 356 | /* Hauppauge PVR-USB2 Model 75xxx */ |
| 357 | |
Michael Krufky | 087886e | 2008-03-28 05:49:36 -0300 | [diff] [blame] | 358 | #ifdef CONFIG_VIDEO_PVRUSB2_DVB |
| 359 | static struct s5h1409_config pvr2_s5h1409_config = { |
| 360 | .demod_address = 0x32 >> 1, |
| 361 | .output_mode = S5H1409_PARALLEL_OUTPUT, |
| 362 | .gpio = S5H1409_GPIO_OFF, |
| 363 | .qam_if = 4000, |
| 364 | .inversion = S5H1409_INVERSION_ON, |
| 365 | .status_mode = S5H1409_DEMODLOCKING, |
| 366 | }; |
| 367 | |
Michael Krufky | 4aef8fd | 2008-04-25 04:19:02 -0300 | [diff] [blame] | 368 | static struct s5h1411_config pvr2_s5h1411_config = { |
| 369 | .output_mode = S5H1411_PARALLEL_OUTPUT, |
| 370 | .gpio = S5H1411_GPIO_OFF, |
| 371 | .vsb_if = S5H1411_IF_44000, |
| 372 | .qam_if = S5H1411_IF_4000, |
| 373 | .inversion = S5H1411_INVERSION_ON, |
| 374 | .status_mode = S5H1411_DEMODLOCKING, |
| 375 | }; |
| 376 | |
Michael Krufky | 087886e | 2008-03-28 05:49:36 -0300 | [diff] [blame] | 377 | static struct tda18271_std_map hauppauge_tda18271_std_map = { |
| 378 | .atsc_6 = { .if_freq = 5380, .agc_mode = 3, .std = 3, |
| 379 | .if_lvl = 6, .rfagc_top = 0x37, }, |
| 380 | .qam_6 = { .if_freq = 4000, .agc_mode = 3, .std = 0, |
| 381 | .if_lvl = 6, .rfagc_top = 0x37, }, |
| 382 | }; |
| 383 | |
| 384 | static struct tda18271_config hauppauge_tda18271_config = { |
| 385 | .std_map = &hauppauge_tda18271_std_map, |
| 386 | .gate = TDA18271_GATE_ANALOG, |
| 387 | }; |
| 388 | |
| 389 | static int pvr2_s5h1409_attach(struct pvr2_dvb_adapter *adap) |
| 390 | { |
| 391 | adap->fe = dvb_attach(s5h1409_attach, &pvr2_s5h1409_config, |
| 392 | &adap->channel.hdw->i2c_adap); |
| 393 | if (adap->fe) |
| 394 | return 0; |
| 395 | |
| 396 | return -EIO; |
| 397 | } |
| 398 | |
Michael Krufky | 4aef8fd | 2008-04-25 04:19:02 -0300 | [diff] [blame] | 399 | static int pvr2_s5h1411_attach(struct pvr2_dvb_adapter *adap) |
| 400 | { |
| 401 | adap->fe = dvb_attach(s5h1411_attach, &pvr2_s5h1411_config, |
| 402 | &adap->channel.hdw->i2c_adap); |
| 403 | if (adap->fe) |
| 404 | return 0; |
| 405 | |
| 406 | return -EIO; |
| 407 | } |
| 408 | |
Michael Krufky | 087886e | 2008-03-28 05:49:36 -0300 | [diff] [blame] | 409 | static int pvr2_tda18271_8295_attach(struct pvr2_dvb_adapter *adap) |
| 410 | { |
| 411 | dvb_attach(tda829x_attach, adap->fe, |
| 412 | &adap->channel.hdw->i2c_adap, 0x42, |
| 413 | &tda829x_no_probe); |
| 414 | dvb_attach(tda18271_attach, adap->fe, 0x60, |
| 415 | &adap->channel.hdw->i2c_adap, |
| 416 | &hauppauge_tda18271_config); |
| 417 | |
| 418 | return 0; |
| 419 | } |
| 420 | |
Adrian Bunk | e9b59f6 | 2008-05-10 04:35:24 -0300 | [diff] [blame^] | 421 | static struct pvr2_dvb_props pvr2_750xx_dvb_props = { |
Michael Krufky | 087886e | 2008-03-28 05:49:36 -0300 | [diff] [blame] | 422 | .frontend_attach = pvr2_s5h1409_attach, |
| 423 | .tuner_attach = pvr2_tda18271_8295_attach, |
| 424 | }; |
Michael Krufky | 4aef8fd | 2008-04-25 04:19:02 -0300 | [diff] [blame] | 425 | |
Adrian Bunk | e9b59f6 | 2008-05-10 04:35:24 -0300 | [diff] [blame^] | 426 | static struct pvr2_dvb_props pvr2_751xx_dvb_props = { |
Michael Krufky | 4aef8fd | 2008-04-25 04:19:02 -0300 | [diff] [blame] | 427 | .frontend_attach = pvr2_s5h1411_attach, |
| 428 | .tuner_attach = pvr2_tda18271_8295_attach, |
| 429 | }; |
Michael Krufky | 087886e | 2008-03-28 05:49:36 -0300 | [diff] [blame] | 430 | #endif |
| 431 | |
Michael Krufky | 11fcd47 | 2007-10-25 02:01:10 -0300 | [diff] [blame] | 432 | static const char *pvr2_client_75xxx[] = { |
| 433 | "cx25840", |
| 434 | "tuner", |
| 435 | }; |
| 436 | |
| 437 | static const char *pvr2_fw1_names_75xxx[] = { |
| 438 | "v4l-pvrusb2-73xxx-01.fw", |
| 439 | }; |
| 440 | |
Michael Krufky | c881284 | 2008-03-28 05:48:44 -0300 | [diff] [blame] | 441 | static const struct pvr2_device_desc pvr2_device_750xx = { |
| 442 | .description = "WinTV PVR USB2 Model Category 750xx", |
| 443 | .shortname = "750xx", |
| 444 | .client_modules.lst = pvr2_client_75xxx, |
| 445 | .client_modules.cnt = ARRAY_SIZE(pvr2_client_75xxx), |
| 446 | .fx2_firmware.lst = pvr2_fw1_names_75xxx, |
| 447 | .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_75xxx), |
| 448 | .flag_has_cx25840 = !0, |
| 449 | .flag_has_hauppauge_rom = !0, |
| 450 | .flag_has_analogtuner = !0, |
| 451 | .flag_has_composite = !0, |
| 452 | .flag_has_svideo = !0, |
| 453 | .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, |
| 454 | .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE, |
| 455 | .default_std_mask = V4L2_STD_NTSC_M, |
| 456 | .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE, |
Michael Krufky | 087886e | 2008-03-28 05:49:36 -0300 | [diff] [blame] | 457 | #ifdef CONFIG_VIDEO_PVRUSB2_DVB |
| 458 | .dvb_props = &pvr2_750xx_dvb_props, |
| 459 | #endif |
Michael Krufky | c881284 | 2008-03-28 05:48:44 -0300 | [diff] [blame] | 460 | }; |
| 461 | |
| 462 | static const struct pvr2_device_desc pvr2_device_751xx = { |
| 463 | .description = "WinTV PVR USB2 Model Category 751xx", |
| 464 | .shortname = "751xx", |
Michael Krufky | 11fcd47 | 2007-10-25 02:01:10 -0300 | [diff] [blame] | 465 | .client_modules.lst = pvr2_client_75xxx, |
| 466 | .client_modules.cnt = ARRAY_SIZE(pvr2_client_75xxx), |
| 467 | .fx2_firmware.lst = pvr2_fw1_names_75xxx, |
| 468 | .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_75xxx), |
| 469 | .flag_has_cx25840 = !0, |
| 470 | .flag_has_hauppauge_rom = !0, |
Mike Isely | 1aaac60 | 2008-04-22 14:45:36 -0300 | [diff] [blame] | 471 | .flag_has_analogtuner = !0, |
| 472 | .flag_has_composite = !0, |
| 473 | .flag_has_svideo = !0, |
Michael Krufky | 11fcd47 | 2007-10-25 02:01:10 -0300 | [diff] [blame] | 474 | .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, |
Mike Isely | e8f5bac | 2008-04-22 14:45:40 -0300 | [diff] [blame] | 475 | .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE, |
Michael Krufky | 11fcd47 | 2007-10-25 02:01:10 -0300 | [diff] [blame] | 476 | .default_std_mask = V4L2_STD_NTSC_M, |
Mike Isely | 40381cb | 2008-04-22 14:45:42 -0300 | [diff] [blame] | 477 | .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE, |
Michael Krufky | 4aef8fd | 2008-04-25 04:19:02 -0300 | [diff] [blame] | 478 | #ifdef CONFIG_VIDEO_PVRUSB2_DVB |
| 479 | .dvb_props = &pvr2_751xx_dvb_props, |
| 480 | #endif |
Michael Krufky | 11fcd47 | 2007-10-25 02:01:10 -0300 | [diff] [blame] | 481 | }; |
| 482 | |
| 483 | |
| 484 | |
| 485 | /*------------------------------------------------------------------------*/ |
Mike Isely | d130fa8 | 2007-12-08 17:20:06 -0300 | [diff] [blame] | 486 | |
| 487 | struct usb_device_id pvr2_device_table[] = { |
| 488 | { USB_DEVICE(0x2040, 0x2900), |
| 489 | .driver_info = (kernel_ulong_t)&pvr2_device_29xxx}, |
| 490 | { USB_DEVICE(0x2040, 0x2400), |
| 491 | .driver_info = (kernel_ulong_t)&pvr2_device_24xxx}, |
| 492 | { USB_DEVICE(0x1164, 0x0622), |
| 493 | .driver_info = (kernel_ulong_t)&pvr2_device_gotview_2}, |
Mike Isely | fd1da78 | 2008-04-22 14:45:42 -0300 | [diff] [blame] | 494 | { USB_DEVICE(0x1164, 0x0602), |
| 495 | .driver_info = (kernel_ulong_t)&pvr2_device_gotview_2d}, |
Mike Isely | d130fa8 | 2007-12-08 17:20:06 -0300 | [diff] [blame] | 496 | { USB_DEVICE(0x11ba, 0x1003), |
| 497 | .driver_info = (kernel_ulong_t)&pvr2_device_onair_creator}, |
Mike Isely | d130fa8 | 2007-12-08 17:20:06 -0300 | [diff] [blame] | 498 | { USB_DEVICE(0x11ba, 0x1001), |
| 499 | .driver_info = (kernel_ulong_t)&pvr2_device_onair_usb2}, |
Michael Krufky | 92c9d07 | 2008-03-15 23:59:29 -0300 | [diff] [blame] | 500 | { USB_DEVICE(0x2040, 0x7300), |
| 501 | .driver_info = (kernel_ulong_t)&pvr2_device_73xxx}, |
Michael Krufky | 11fcd47 | 2007-10-25 02:01:10 -0300 | [diff] [blame] | 502 | { USB_DEVICE(0x2040, 0x7500), |
Michael Krufky | c881284 | 2008-03-28 05:48:44 -0300 | [diff] [blame] | 503 | .driver_info = (kernel_ulong_t)&pvr2_device_750xx}, |
Michael Krufky | dd6e946 | 2008-03-08 06:07:38 -0300 | [diff] [blame] | 504 | { USB_DEVICE(0x2040, 0x7501), |
Michael Krufky | c881284 | 2008-03-28 05:48:44 -0300 | [diff] [blame] | 505 | .driver_info = (kernel_ulong_t)&pvr2_device_751xx}, |
Mike Isely | d130fa8 | 2007-12-08 17:20:06 -0300 | [diff] [blame] | 506 | { } |
| 507 | }; |
Mike Isely | 989eb15 | 2007-11-26 01:53:12 -0300 | [diff] [blame] | 508 | |
| 509 | MODULE_DEVICE_TABLE(usb, pvr2_device_table); |
| 510 | |
| 511 | |
| 512 | /* |
| 513 | Stuff for Emacs to see, in order to encourage consistent editing style: |
| 514 | *** Local Variables: *** |
| 515 | *** mode: c *** |
| 516 | *** fill-column: 75 *** |
| 517 | *** tab-width: 8 *** |
| 518 | *** c-basic-offset: 8 *** |
| 519 | *** End: *** |
| 520 | */ |