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