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