Mike Isely | 989eb15 | 2007-11-26 01:53:12 -0300 | [diff] [blame] | 1 | /* |
| 2 | * |
| 3 | * $Id$ |
| 4 | * |
| 5 | * Copyright (C) 2007 Mike Isely <isely@pobox.com> |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; either version 2 of the License |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 19 | * |
| 20 | */ |
| 21 | |
| 22 | /* |
| 23 | |
| 24 | This source file should encompass ALL per-device type information for the |
| 25 | driver. To define a new device, add elements to the pvr2_device_table and |
| 26 | pvr2_device_desc structures. |
| 27 | |
| 28 | */ |
| 29 | |
| 30 | #include "pvrusb2-devattr.h" |
| 31 | #include <linux/usb.h> |
Mike Isely | 6a54025 | 2007-12-02 23:51:34 -0300 | [diff] [blame] | 32 | /* This is needed in order to pull in tuner type ids... */ |
Mike Isely | 9e2e3ae | 2007-11-26 02:14:23 -0300 | [diff] [blame] | 33 | #include <linux/i2c.h> |
Mike Isely | 9e2e3ae | 2007-11-26 02:14:23 -0300 | [diff] [blame] | 34 | #include <media/tuner.h> |
Mike Isely | 989eb15 | 2007-11-26 01:53:12 -0300 | [diff] [blame] | 35 | |
Mike Isely | 989eb15 | 2007-11-26 01:53:12 -0300 | [diff] [blame] | 36 | |
Mike Isely | 4542783 | 2007-12-08 17:11:13 -0300 | [diff] [blame] | 37 | |
Mike Isely | d130fa8 | 2007-12-08 17:20:06 -0300 | [diff] [blame] | 38 | /*------------------------------------------------------------------------*/ |
| 39 | /* Hauppauge PVR-USB2 Model 29xxx */ |
Mike Isely | 989eb15 | 2007-11-26 01:53:12 -0300 | [diff] [blame] | 40 | |
Mike Isely | 989eb15 | 2007-11-26 01:53:12 -0300 | [diff] [blame] | 41 | static const char *pvr2_client_29xxx[] = { |
| 42 | "msp3400", |
| 43 | "saa7115", |
| 44 | "tuner", |
| 45 | }; |
| 46 | |
Mike Isely | 989eb15 | 2007-11-26 01:53:12 -0300 | [diff] [blame] | 47 | static const char *pvr2_fw1_names_29xxx[] = { |
| 48 | "v4l-pvrusb2-29xxx-01.fw", |
| 49 | }; |
| 50 | |
Mike Isely | d130fa8 | 2007-12-08 17:20:06 -0300 | [diff] [blame] | 51 | static const struct pvr2_device_desc pvr2_device_29xxx = { |
Mike Isely | 989eb15 | 2007-11-26 01:53:12 -0300 | [diff] [blame] | 52 | .description = "WinTV PVR USB2 Model Category 29xxxx", |
| 53 | .shortname = "29xxx", |
| 54 | .client_modules.lst = pvr2_client_29xxx, |
| 55 | .client_modules.cnt = ARRAY_SIZE(pvr2_client_29xxx), |
| 56 | .fx2_firmware.lst = pvr2_fw1_names_29xxx, |
| 57 | .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_29xxx), |
Mike Isely | aaf7884 | 2007-11-26 02:04:11 -0300 | [diff] [blame] | 58 | .flag_has_hauppauge_rom = !0, |
Mike Isely | 1aaac60 | 2008-04-22 14:45:36 -0300 | [diff] [blame] | 59 | .flag_has_analogtuner = !0, |
Mike Isely | d068c6e | 2008-04-22 14:45:36 -0300 | [diff] [blame] | 60 | .flag_has_fmradio = !0, |
Mike Isely | 1aaac60 | 2008-04-22 14:45:36 -0300 | [diff] [blame] | 61 | .flag_has_composite = !0, |
| 62 | .flag_has_svideo = !0, |
Mike Isely | f5174af | 2007-11-26 02:07:26 -0300 | [diff] [blame] | 63 | .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, |
Mike Isely | 40381cb | 2008-04-22 14:45:42 -0300 | [diff] [blame^] | 64 | .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE, |
Mike Isely | d130fa8 | 2007-12-08 17:20:06 -0300 | [diff] [blame] | 65 | }; |
| 66 | |
| 67 | |
| 68 | |
| 69 | /*------------------------------------------------------------------------*/ |
| 70 | /* Hauppauge PVR-USB2 Model 24xxx */ |
| 71 | |
| 72 | static const char *pvr2_client_24xxx[] = { |
| 73 | "cx25840", |
| 74 | "tuner", |
| 75 | "wm8775", |
| 76 | }; |
| 77 | |
| 78 | static const char *pvr2_fw1_names_24xxx[] = { |
| 79 | "v4l-pvrusb2-24xxx-01.fw", |
| 80 | }; |
| 81 | |
| 82 | static const struct pvr2_device_desc pvr2_device_24xxx = { |
Mike Isely | 989eb15 | 2007-11-26 01:53:12 -0300 | [diff] [blame] | 83 | .description = "WinTV PVR USB2 Model Category 24xxxx", |
| 84 | .shortname = "24xxx", |
| 85 | .client_modules.lst = pvr2_client_24xxx, |
| 86 | .client_modules.cnt = ARRAY_SIZE(pvr2_client_24xxx), |
| 87 | .fx2_firmware.lst = pvr2_fw1_names_24xxx, |
| 88 | .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_24xxx), |
| 89 | .flag_has_cx25840 = !0, |
| 90 | .flag_has_wm8775 = !0, |
Mike Isely | aaf7884 | 2007-11-26 02:04:11 -0300 | [diff] [blame] | 91 | .flag_has_hauppauge_rom = !0, |
Mike Isely | 056d1a8 | 2007-11-26 02:09:42 -0300 | [diff] [blame] | 92 | .flag_has_hauppauge_custom_ir = !0, |
Mike Isely | 1aaac60 | 2008-04-22 14:45:36 -0300 | [diff] [blame] | 93 | .flag_has_analogtuner = !0, |
Mike Isely | d068c6e | 2008-04-22 14:45:36 -0300 | [diff] [blame] | 94 | .flag_has_fmradio = !0, |
Mike Isely | 1aaac60 | 2008-04-22 14:45:36 -0300 | [diff] [blame] | 95 | .flag_has_composite = !0, |
| 96 | .flag_has_svideo = !0, |
Mike Isely | f5174af | 2007-11-26 02:07:26 -0300 | [diff] [blame] | 97 | .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, |
Mike Isely | 40381cb | 2008-04-22 14:45:42 -0300 | [diff] [blame^] | 98 | .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE, |
Mike Isely | d130fa8 | 2007-12-08 17:20:06 -0300 | [diff] [blame] | 99 | }; |
| 100 | |
| 101 | |
| 102 | |
| 103 | /*------------------------------------------------------------------------*/ |
| 104 | /* GOTVIEW USB2.0 DVD2 */ |
| 105 | |
| 106 | static const char *pvr2_client_gotview_2[] = { |
| 107 | "cx25840", |
| 108 | "tuner", |
| 109 | }; |
| 110 | |
| 111 | static const struct pvr2_device_desc pvr2_device_gotview_2 = { |
Mike Isely | 9e2e3ae | 2007-11-26 02:14:23 -0300 | [diff] [blame] | 112 | .description = "Gotview USB 2.0 DVD 2", |
| 113 | .shortname = "gv2", |
| 114 | .client_modules.lst = pvr2_client_gotview_2, |
| 115 | .client_modules.cnt = ARRAY_SIZE(pvr2_client_gotview_2), |
Mike Isely | 787f5ab | 2007-12-08 17:08:32 -0300 | [diff] [blame] | 116 | .flag_has_cx25840 = !0, |
Mike Isely | 9e2e3ae | 2007-11-26 02:14:23 -0300 | [diff] [blame] | 117 | .default_tuner_type = TUNER_PHILIPS_FM1216ME_MK3, |
Mike Isely | 1aaac60 | 2008-04-22 14:45:36 -0300 | [diff] [blame] | 118 | .flag_has_analogtuner = !0, |
| 119 | .flag_has_composite = !0, |
| 120 | .flag_has_svideo = !0, |
Mike Isely | 9e2e3ae | 2007-11-26 02:14:23 -0300 | [diff] [blame] | 121 | .signal_routing_scheme = PVR2_ROUTING_SCHEME_GOTVIEW, |
Mike Isely | 989eb15 | 2007-11-26 01:53:12 -0300 | [diff] [blame] | 122 | }; |
| 123 | |
Mike Isely | d130fa8 | 2007-12-08 17:20:06 -0300 | [diff] [blame] | 124 | |
| 125 | |
| 126 | #ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_CREATOR |
| 127 | /*------------------------------------------------------------------------*/ |
| 128 | /* OnAir Creator */ |
| 129 | |
| 130 | static const char *pvr2_client_onair_creator[] = { |
| 131 | "saa7115", |
| 132 | "tuner", |
| 133 | "cs53l32a", |
| 134 | }; |
| 135 | |
| 136 | static const struct pvr2_device_desc pvr2_device_onair_creator = { |
| 137 | .description = "OnAir Creator Hybrid USB tuner", |
| 138 | .shortname = "oac", |
| 139 | .client_modules.lst = pvr2_client_onair_creator, |
| 140 | .client_modules.cnt = ARRAY_SIZE(pvr2_client_onair_creator), |
| 141 | .default_tuner_type = TUNER_LG_TDVS_H06XF, |
Mike Isely | 1aaac60 | 2008-04-22 14:45:36 -0300 | [diff] [blame] | 142 | .flag_has_analogtuner = !0, |
| 143 | .flag_has_composite = !0, |
| 144 | .flag_has_svideo = !0, |
Mike Isely | d130fa8 | 2007-12-08 17:20:06 -0300 | [diff] [blame] | 145 | .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, |
Mike Isely | e8f5bac | 2008-04-22 14:45:40 -0300 | [diff] [blame] | 146 | .digital_control_scheme = PVR2_DIGITAL_SCHEME_ONAIR, |
Mike Isely | d130fa8 | 2007-12-08 17:20:06 -0300 | [diff] [blame] | 147 | }; |
| 148 | #endif |
| 149 | |
| 150 | |
| 151 | |
| 152 | #ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_USB2 |
| 153 | /*------------------------------------------------------------------------*/ |
| 154 | /* OnAir USB 2.0 */ |
| 155 | |
| 156 | static const char *pvr2_client_onair_usb2[] = { |
| 157 | "saa7115", |
| 158 | "tuner", |
| 159 | "cs53l32a", |
| 160 | }; |
| 161 | |
| 162 | static const struct pvr2_device_desc pvr2_device_onair_usb2 = { |
| 163 | .description = "OnAir USB2 Hybrid USB tuner", |
| 164 | .shortname = "oa2", |
| 165 | .client_modules.lst = pvr2_client_onair_usb2, |
| 166 | .client_modules.cnt = ARRAY_SIZE(pvr2_client_onair_usb2), |
| 167 | .default_tuner_type = TUNER_PHILIPS_ATSC, |
Mike Isely | 1aaac60 | 2008-04-22 14:45:36 -0300 | [diff] [blame] | 168 | .flag_has_analogtuner = !0, |
| 169 | .flag_has_composite = !0, |
| 170 | .flag_has_svideo = !0, |
Mike Isely | d130fa8 | 2007-12-08 17:20:06 -0300 | [diff] [blame] | 171 | .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, |
Mike Isely | e8f5bac | 2008-04-22 14:45:40 -0300 | [diff] [blame] | 172 | .digital_control_scheme = PVR2_DIGITAL_SCHEME_ONAIR, |
Mike Isely | d130fa8 | 2007-12-08 17:20:06 -0300 | [diff] [blame] | 173 | }; |
| 174 | #endif |
| 175 | |
| 176 | |
| 177 | |
| 178 | /*------------------------------------------------------------------------*/ |
Michael Krufky | 92c9d07 | 2008-03-15 23:59:29 -0300 | [diff] [blame] | 179 | /* Hauppauge PVR-USB2 Model 73xxx */ |
| 180 | |
| 181 | static const char *pvr2_client_73xxx[] = { |
| 182 | "cx25840", |
| 183 | "tuner", |
| 184 | }; |
| 185 | |
| 186 | static const char *pvr2_fw1_names_73xxx[] = { |
| 187 | "v4l-pvrusb2-73xxx-01.fw", |
| 188 | }; |
| 189 | |
| 190 | static const struct pvr2_device_desc pvr2_device_73xxx = { |
| 191 | .description = "WinTV PVR USB2 Model Category 73xxxx", |
| 192 | .shortname = "73xxx", |
| 193 | .client_modules.lst = pvr2_client_73xxx, |
| 194 | .client_modules.cnt = ARRAY_SIZE(pvr2_client_73xxx), |
| 195 | .fx2_firmware.lst = pvr2_fw1_names_73xxx, |
| 196 | .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_73xxx), |
| 197 | .flag_has_cx25840 = !0, |
| 198 | .flag_has_hauppauge_rom = !0, |
Michael Krufky | 4c3b01f | 2008-04-06 20:40:17 -0400 | [diff] [blame] | 199 | #if 0 |
Michael Krufky | 92c9d07 | 2008-03-15 23:59:29 -0300 | [diff] [blame] | 200 | .flag_has_analogtuner = !0, |
| 201 | .flag_has_composite = !0, |
| 202 | .flag_has_svideo = !0, |
| 203 | .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, |
| 204 | .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE, |
| 205 | .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE, |
Michael Krufky | 4c3b01f | 2008-04-06 20:40:17 -0400 | [diff] [blame] | 206 | #else |
| 207 | .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, |
| 208 | #endif |
Michael Krufky | 92c9d07 | 2008-03-15 23:59:29 -0300 | [diff] [blame] | 209 | }; |
| 210 | |
| 211 | |
| 212 | |
| 213 | /*------------------------------------------------------------------------*/ |
Michael Krufky | 11fcd47 | 2007-10-25 02:01:10 -0300 | [diff] [blame] | 214 | /* Hauppauge PVR-USB2 Model 75xxx */ |
| 215 | |
| 216 | static const char *pvr2_client_75xxx[] = { |
| 217 | "cx25840", |
| 218 | "tuner", |
| 219 | }; |
| 220 | |
| 221 | static const char *pvr2_fw1_names_75xxx[] = { |
| 222 | "v4l-pvrusb2-73xxx-01.fw", |
| 223 | }; |
| 224 | |
| 225 | static const struct pvr2_device_desc pvr2_device_75xxx = { |
| 226 | .description = "WinTV PVR USB2 Model Category 75xxxx", |
| 227 | .shortname = "75xxx", |
| 228 | .client_modules.lst = pvr2_client_75xxx, |
| 229 | .client_modules.cnt = ARRAY_SIZE(pvr2_client_75xxx), |
| 230 | .fx2_firmware.lst = pvr2_fw1_names_75xxx, |
| 231 | .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_75xxx), |
| 232 | .flag_has_cx25840 = !0, |
| 233 | .flag_has_hauppauge_rom = !0, |
Mike Isely | 1aaac60 | 2008-04-22 14:45:36 -0300 | [diff] [blame] | 234 | .flag_has_analogtuner = !0, |
| 235 | .flag_has_composite = !0, |
| 236 | .flag_has_svideo = !0, |
Michael Krufky | 11fcd47 | 2007-10-25 02:01:10 -0300 | [diff] [blame] | 237 | .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, |
Mike Isely | e8f5bac | 2008-04-22 14:45:40 -0300 | [diff] [blame] | 238 | .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE, |
Michael Krufky | 11fcd47 | 2007-10-25 02:01:10 -0300 | [diff] [blame] | 239 | .default_std_mask = V4L2_STD_NTSC_M, |
Mike Isely | 40381cb | 2008-04-22 14:45:42 -0300 | [diff] [blame^] | 240 | .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE, |
Michael Krufky | 11fcd47 | 2007-10-25 02:01:10 -0300 | [diff] [blame] | 241 | }; |
| 242 | |
| 243 | |
| 244 | |
| 245 | /*------------------------------------------------------------------------*/ |
Mike Isely | d130fa8 | 2007-12-08 17:20:06 -0300 | [diff] [blame] | 246 | |
| 247 | struct usb_device_id pvr2_device_table[] = { |
| 248 | { USB_DEVICE(0x2040, 0x2900), |
| 249 | .driver_info = (kernel_ulong_t)&pvr2_device_29xxx}, |
| 250 | { USB_DEVICE(0x2040, 0x2400), |
| 251 | .driver_info = (kernel_ulong_t)&pvr2_device_24xxx}, |
| 252 | { USB_DEVICE(0x1164, 0x0622), |
| 253 | .driver_info = (kernel_ulong_t)&pvr2_device_gotview_2}, |
| 254 | #ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_CREATOR |
| 255 | { USB_DEVICE(0x11ba, 0x1003), |
| 256 | .driver_info = (kernel_ulong_t)&pvr2_device_onair_creator}, |
| 257 | #endif |
| 258 | #ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_USB2 |
| 259 | { USB_DEVICE(0x11ba, 0x1001), |
| 260 | .driver_info = (kernel_ulong_t)&pvr2_device_onair_usb2}, |
| 261 | #endif |
Michael Krufky | 92c9d07 | 2008-03-15 23:59:29 -0300 | [diff] [blame] | 262 | { USB_DEVICE(0x2040, 0x7300), |
| 263 | .driver_info = (kernel_ulong_t)&pvr2_device_73xxx}, |
Michael Krufky | 11fcd47 | 2007-10-25 02:01:10 -0300 | [diff] [blame] | 264 | { USB_DEVICE(0x2040, 0x7500), |
| 265 | .driver_info = (kernel_ulong_t)&pvr2_device_75xxx}, |
Michael Krufky | dd6e946 | 2008-03-08 06:07:38 -0300 | [diff] [blame] | 266 | { USB_DEVICE(0x2040, 0x7501), |
| 267 | .driver_info = (kernel_ulong_t)&pvr2_device_75xxx}, |
Mike Isely | d130fa8 | 2007-12-08 17:20:06 -0300 | [diff] [blame] | 268 | { } |
| 269 | }; |
Mike Isely | 989eb15 | 2007-11-26 01:53:12 -0300 | [diff] [blame] | 270 | |
| 271 | MODULE_DEVICE_TABLE(usb, pvr2_device_table); |
| 272 | |
| 273 | |
| 274 | /* |
| 275 | Stuff for Emacs to see, in order to encourage consistent editing style: |
| 276 | *** Local Variables: *** |
| 277 | *** mode: c *** |
| 278 | *** fill-column: 75 *** |
| 279 | *** tab-width: 8 *** |
| 280 | *** c-basic-offset: 8 *** |
| 281 | *** End: *** |
| 282 | */ |