pvrusb2-devattr.c 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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. This source file should encompass ALL per-device type information for the
  23. driver. To define a new device, add elements to the pvr2_device_table and
  24. pvr2_device_desc structures.
  25. */
  26. #include "pvrusb2-devattr.h"
  27. #include <linux/usb.h>
  28. /* Known major hardware variants, keyed from device ID */
  29. #define PVR2_HDW_TYPE_29XXX 0
  30. #define PVR2_HDW_TYPE_24XXX 1
  31. struct usb_device_id pvr2_device_table[] = {
  32. [PVR2_HDW_TYPE_29XXX] = { USB_DEVICE(0x2040, 0x2900) },
  33. [PVR2_HDW_TYPE_24XXX] = { USB_DEVICE(0x2040, 0x2400) },
  34. { }
  35. };
  36. /* Names of other client modules to request for 24xxx model hardware */
  37. static const char *pvr2_client_24xxx[] = {
  38. "cx25840",
  39. "tuner",
  40. "wm8775",
  41. };
  42. /* Names of other client modules to request for 29xxx model hardware */
  43. static const char *pvr2_client_29xxx[] = {
  44. "msp3400",
  45. "saa7115",
  46. "tuner",
  47. };
  48. /* Firmware file name(s) for 29xxx devices */
  49. static const char *pvr2_fw1_names_29xxx[] = {
  50. "v4l-pvrusb2-29xxx-01.fw",
  51. };
  52. /* Firmware file name(s) for 29xxx devices */
  53. static const char *pvr2_fw1_names_24xxx[] = {
  54. "v4l-pvrusb2-24xxx-01.fw",
  55. };
  56. const struct pvr2_device_desc pvr2_device_descriptions[] = {
  57. [PVR2_HDW_TYPE_29XXX] = {
  58. .description = "WinTV PVR USB2 Model Category 29xxxx",
  59. .shortname = "29xxx",
  60. .client_modules.lst = pvr2_client_29xxx,
  61. .client_modules.cnt = ARRAY_SIZE(pvr2_client_29xxx),
  62. .fx2_firmware.lst = pvr2_fw1_names_29xxx,
  63. .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_29xxx),
  64. .flag_has_hauppauge_rom = !0,
  65. .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
  66. },
  67. [PVR2_HDW_TYPE_24XXX] = {
  68. .description = "WinTV PVR USB2 Model Category 24xxxx",
  69. .shortname = "24xxx",
  70. .client_modules.lst = pvr2_client_24xxx,
  71. .client_modules.cnt = ARRAY_SIZE(pvr2_client_24xxx),
  72. .fx2_firmware.lst = pvr2_fw1_names_24xxx,
  73. .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_24xxx),
  74. .flag_has_cx25840 = !0,
  75. .flag_has_wm8775 = !0,
  76. .flag_has_hauppauge_rom = !0,
  77. .flag_has_hauppauge_custom_ir = !0,
  78. .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
  79. },
  80. };
  81. const unsigned int pvr2_device_count = ARRAY_SIZE(pvr2_device_descriptions);
  82. MODULE_DEVICE_TABLE(usb, pvr2_device_table);
  83. /*
  84. Stuff for Emacs to see, in order to encourage consistent editing style:
  85. *** Local Variables: ***
  86. *** mode: c ***
  87. *** fill-column: 75 ***
  88. *** tab-width: 8 ***
  89. *** c-basic-offset: 8 ***
  90. *** End: ***
  91. */