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