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 | |
| 36 | /* Known major hardware variants, keyed from device ID */ |
| 37 | #define PVR2_HDW_TYPE_29XXX 0 |
| 38 | #define PVR2_HDW_TYPE_24XXX 1 |
Mike Isely | 9e2e3ae | 2007-11-26 02:14:23 -0300 | [diff] [blame] | 39 | #define PVR2_HDW_TYPE_GOTVIEW_2 2 |
Mike Isely | 989eb15 | 2007-11-26 01:53:12 -0300 | [diff] [blame] | 40 | |
| 41 | struct usb_device_id pvr2_device_table[] = { |
| 42 | [PVR2_HDW_TYPE_29XXX] = { USB_DEVICE(0x2040, 0x2900) }, |
| 43 | [PVR2_HDW_TYPE_24XXX] = { USB_DEVICE(0x2040, 0x2400) }, |
Mike Isely | 9e2e3ae | 2007-11-26 02:14:23 -0300 | [diff] [blame] | 44 | [PVR2_HDW_TYPE_GOTVIEW_2] = { USB_DEVICE(0x1164, 0x0622) }, |
Mike Isely | 989eb15 | 2007-11-26 01:53:12 -0300 | [diff] [blame] | 45 | { } |
| 46 | }; |
| 47 | |
| 48 | /* Names of other client modules to request for 24xxx model hardware */ |
| 49 | static const char *pvr2_client_24xxx[] = { |
| 50 | "cx25840", |
| 51 | "tuner", |
| 52 | "wm8775", |
| 53 | }; |
| 54 | |
| 55 | /* Names of other client modules to request for 29xxx model hardware */ |
| 56 | static const char *pvr2_client_29xxx[] = { |
| 57 | "msp3400", |
| 58 | "saa7115", |
| 59 | "tuner", |
| 60 | }; |
| 61 | |
Mike Isely | 9e2e3ae | 2007-11-26 02:14:23 -0300 | [diff] [blame] | 62 | // Names of other client modules to request for Gotview 2 model hardware |
| 63 | static const char *pvr2_client_gotview_2[] = { |
| 64 | "cx25840", |
| 65 | "tuner", |
| 66 | }; |
| 67 | |
Mike Isely | 989eb15 | 2007-11-26 01:53:12 -0300 | [diff] [blame] | 68 | /* Firmware file name(s) for 29xxx devices */ |
| 69 | static const char *pvr2_fw1_names_29xxx[] = { |
| 70 | "v4l-pvrusb2-29xxx-01.fw", |
| 71 | }; |
| 72 | |
Michael Krufky | 482cb9a | 2007-11-27 16:58:33 -0300 | [diff] [blame] | 73 | /* Firmware file name(s) for 24xxx devices */ |
Mike Isely | 989eb15 | 2007-11-26 01:53:12 -0300 | [diff] [blame] | 74 | static const char *pvr2_fw1_names_24xxx[] = { |
| 75 | "v4l-pvrusb2-24xxx-01.fw", |
| 76 | }; |
| 77 | |
| 78 | const struct pvr2_device_desc pvr2_device_descriptions[] = { |
| 79 | [PVR2_HDW_TYPE_29XXX] = { |
| 80 | .description = "WinTV PVR USB2 Model Category 29xxxx", |
| 81 | .shortname = "29xxx", |
| 82 | .client_modules.lst = pvr2_client_29xxx, |
| 83 | .client_modules.cnt = ARRAY_SIZE(pvr2_client_29xxx), |
| 84 | .fx2_firmware.lst = pvr2_fw1_names_29xxx, |
| 85 | .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_29xxx), |
Mike Isely | aaf7884 | 2007-11-26 02:04:11 -0300 | [diff] [blame] | 86 | .flag_has_hauppauge_rom = !0, |
Mike Isely | f5174af | 2007-11-26 02:07:26 -0300 | [diff] [blame] | 87 | .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, |
Mike Isely | 989eb15 | 2007-11-26 01:53:12 -0300 | [diff] [blame] | 88 | }, |
| 89 | [PVR2_HDW_TYPE_24XXX] = { |
| 90 | .description = "WinTV PVR USB2 Model Category 24xxxx", |
| 91 | .shortname = "24xxx", |
| 92 | .client_modules.lst = pvr2_client_24xxx, |
| 93 | .client_modules.cnt = ARRAY_SIZE(pvr2_client_24xxx), |
| 94 | .fx2_firmware.lst = pvr2_fw1_names_24xxx, |
| 95 | .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_24xxx), |
| 96 | .flag_has_cx25840 = !0, |
| 97 | .flag_has_wm8775 = !0, |
Mike Isely | aaf7884 | 2007-11-26 02:04:11 -0300 | [diff] [blame] | 98 | .flag_has_hauppauge_rom = !0, |
Mike Isely | 056d1a8 | 2007-11-26 02:09:42 -0300 | [diff] [blame] | 99 | .flag_has_hauppauge_custom_ir = !0, |
Mike Isely | f5174af | 2007-11-26 02:07:26 -0300 | [diff] [blame] | 100 | .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE, |
Mike Isely | 989eb15 | 2007-11-26 01:53:12 -0300 | [diff] [blame] | 101 | }, |
Mike Isely | 9e2e3ae | 2007-11-26 02:14:23 -0300 | [diff] [blame] | 102 | [PVR2_HDW_TYPE_GOTVIEW_2] = { |
| 103 | .description = "Gotview USB 2.0 DVD 2", |
| 104 | .shortname = "gv2", |
| 105 | .client_modules.lst = pvr2_client_gotview_2, |
| 106 | .client_modules.cnt = ARRAY_SIZE(pvr2_client_gotview_2), |
Mike Isely | 787f5ab | 2007-12-08 17:08:32 -0300 | [diff] [blame^] | 107 | .flag_has_cx25840 = !0, |
Mike Isely | 9e2e3ae | 2007-11-26 02:14:23 -0300 | [diff] [blame] | 108 | .default_tuner_type = TUNER_PHILIPS_FM1216ME_MK3, |
| 109 | .signal_routing_scheme = PVR2_ROUTING_SCHEME_GOTVIEW, |
| 110 | }, |
Mike Isely | 989eb15 | 2007-11-26 01:53:12 -0300 | [diff] [blame] | 111 | }; |
| 112 | |
| 113 | const unsigned int pvr2_device_count = ARRAY_SIZE(pvr2_device_descriptions); |
| 114 | |
| 115 | MODULE_DEVICE_TABLE(usb, pvr2_device_table); |
| 116 | |
| 117 | |
| 118 | /* |
| 119 | Stuff for Emacs to see, in order to encourage consistent editing style: |
| 120 | *** Local Variables: *** |
| 121 | *** mode: c *** |
| 122 | *** fill-column: 75 *** |
| 123 | *** tab-width: 8 *** |
| 124 | *** c-basic-offset: 8 *** |
| 125 | *** End: *** |
| 126 | */ |