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