pvrusb2-devattr.c 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  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. /* This is needed in order to pull in tuner type ids... */
  29. #include <linux/i2c.h>
  30. #include <media/tuner.h>
  31. /*------------------------------------------------------------------------*/
  32. /* Hauppauge PVR-USB2 Model 29xxx */
  33. static const char *pvr2_client_29xxx[] = {
  34. "msp3400",
  35. "saa7115",
  36. "tuner",
  37. };
  38. static const char *pvr2_fw1_names_29xxx[] = {
  39. "v4l-pvrusb2-29xxx-01.fw",
  40. };
  41. static const struct pvr2_device_desc pvr2_device_29xxx = {
  42. .description = "WinTV PVR USB2 Model Category 29xxxx",
  43. .shortname = "29xxx",
  44. .client_modules.lst = pvr2_client_29xxx,
  45. .client_modules.cnt = ARRAY_SIZE(pvr2_client_29xxx),
  46. .fx2_firmware.lst = pvr2_fw1_names_29xxx,
  47. .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_29xxx),
  48. .flag_has_hauppauge_rom = !0,
  49. .flag_has_analogtuner = !0,
  50. .flag_has_fmradio = !0,
  51. .flag_has_composite = !0,
  52. .flag_has_svideo = !0,
  53. .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
  54. .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
  55. };
  56. /*------------------------------------------------------------------------*/
  57. /* Hauppauge PVR-USB2 Model 24xxx */
  58. static const char *pvr2_client_24xxx[] = {
  59. "cx25840",
  60. "tuner",
  61. "wm8775",
  62. };
  63. static const char *pvr2_fw1_names_24xxx[] = {
  64. "v4l-pvrusb2-24xxx-01.fw",
  65. };
  66. static const struct pvr2_device_desc pvr2_device_24xxx = {
  67. .description = "WinTV PVR USB2 Model Category 24xxxx",
  68. .shortname = "24xxx",
  69. .client_modules.lst = pvr2_client_24xxx,
  70. .client_modules.cnt = ARRAY_SIZE(pvr2_client_24xxx),
  71. .fx2_firmware.lst = pvr2_fw1_names_24xxx,
  72. .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_24xxx),
  73. .flag_has_cx25840 = !0,
  74. .flag_has_wm8775 = !0,
  75. .flag_has_hauppauge_rom = !0,
  76. .flag_has_hauppauge_custom_ir = !0,
  77. .flag_has_analogtuner = !0,
  78. .flag_has_fmradio = !0,
  79. .flag_has_composite = !0,
  80. .flag_has_svideo = !0,
  81. .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
  82. .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
  83. };
  84. /*------------------------------------------------------------------------*/
  85. /* GOTVIEW USB2.0 DVD2 */
  86. static const char *pvr2_client_gotview_2[] = {
  87. "cx25840",
  88. "tuner",
  89. };
  90. static const struct pvr2_device_desc pvr2_device_gotview_2 = {
  91. .description = "Gotview USB 2.0 DVD 2",
  92. .shortname = "gv2",
  93. .client_modules.lst = pvr2_client_gotview_2,
  94. .client_modules.cnt = ARRAY_SIZE(pvr2_client_gotview_2),
  95. .flag_has_cx25840 = !0,
  96. .default_tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  97. .flag_has_analogtuner = !0,
  98. .flag_has_composite = !0,
  99. .flag_has_svideo = !0,
  100. .signal_routing_scheme = PVR2_ROUTING_SCHEME_GOTVIEW,
  101. };
  102. #ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_CREATOR
  103. /*------------------------------------------------------------------------*/
  104. /* OnAir Creator */
  105. static const char *pvr2_client_onair_creator[] = {
  106. "saa7115",
  107. "tuner",
  108. "cs53l32a",
  109. };
  110. static const struct pvr2_device_desc pvr2_device_onair_creator = {
  111. .description = "OnAir Creator Hybrid USB tuner",
  112. .shortname = "oac",
  113. .client_modules.lst = pvr2_client_onair_creator,
  114. .client_modules.cnt = ARRAY_SIZE(pvr2_client_onair_creator),
  115. .default_tuner_type = TUNER_LG_TDVS_H06XF,
  116. .flag_has_analogtuner = !0,
  117. .flag_has_composite = !0,
  118. .flag_has_svideo = !0,
  119. .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
  120. .digital_control_scheme = PVR2_DIGITAL_SCHEME_ONAIR,
  121. };
  122. #endif
  123. #ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_USB2
  124. /*------------------------------------------------------------------------*/
  125. /* OnAir USB 2.0 */
  126. static const char *pvr2_client_onair_usb2[] = {
  127. "saa7115",
  128. "tuner",
  129. "cs53l32a",
  130. };
  131. static const struct pvr2_device_desc pvr2_device_onair_usb2 = {
  132. .description = "OnAir USB2 Hybrid USB tuner",
  133. .shortname = "oa2",
  134. .client_modules.lst = pvr2_client_onair_usb2,
  135. .client_modules.cnt = ARRAY_SIZE(pvr2_client_onair_usb2),
  136. .default_tuner_type = TUNER_PHILIPS_ATSC,
  137. .flag_has_analogtuner = !0,
  138. .flag_has_composite = !0,
  139. .flag_has_svideo = !0,
  140. .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
  141. .digital_control_scheme = PVR2_DIGITAL_SCHEME_ONAIR,
  142. };
  143. #endif
  144. /*------------------------------------------------------------------------*/
  145. /* Hauppauge PVR-USB2 Model 73xxx */
  146. static const char *pvr2_client_73xxx[] = {
  147. "cx25840",
  148. "tuner",
  149. };
  150. static const char *pvr2_fw1_names_73xxx[] = {
  151. "v4l-pvrusb2-73xxx-01.fw",
  152. };
  153. static const struct pvr2_device_desc pvr2_device_73xxx = {
  154. .description = "WinTV PVR USB2 Model Category 73xxxx",
  155. .shortname = "73xxx",
  156. .client_modules.lst = pvr2_client_73xxx,
  157. .client_modules.cnt = ARRAY_SIZE(pvr2_client_73xxx),
  158. .fx2_firmware.lst = pvr2_fw1_names_73xxx,
  159. .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_73xxx),
  160. .flag_has_cx25840 = !0,
  161. .flag_has_hauppauge_rom = !0,
  162. #if 0
  163. .flag_has_analogtuner = !0,
  164. .flag_has_composite = !0,
  165. .flag_has_svideo = !0,
  166. .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
  167. .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE,
  168. .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
  169. #else
  170. .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
  171. #endif
  172. };
  173. /*------------------------------------------------------------------------*/
  174. /* Hauppauge PVR-USB2 Model 75xxx */
  175. static const char *pvr2_client_75xxx[] = {
  176. "cx25840",
  177. "tuner",
  178. };
  179. static const char *pvr2_fw1_names_75xxx[] = {
  180. "v4l-pvrusb2-73xxx-01.fw",
  181. };
  182. static const struct pvr2_device_desc pvr2_device_75xxx = {
  183. .description = "WinTV PVR USB2 Model Category 75xxxx",
  184. .shortname = "75xxx",
  185. .client_modules.lst = pvr2_client_75xxx,
  186. .client_modules.cnt = ARRAY_SIZE(pvr2_client_75xxx),
  187. .fx2_firmware.lst = pvr2_fw1_names_75xxx,
  188. .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_75xxx),
  189. .flag_has_cx25840 = !0,
  190. .flag_has_hauppauge_rom = !0,
  191. .flag_has_analogtuner = !0,
  192. .flag_has_composite = !0,
  193. .flag_has_svideo = !0,
  194. .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
  195. .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE,
  196. .default_std_mask = V4L2_STD_NTSC_M,
  197. .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
  198. };
  199. /*------------------------------------------------------------------------*/
  200. struct usb_device_id pvr2_device_table[] = {
  201. { USB_DEVICE(0x2040, 0x2900),
  202. .driver_info = (kernel_ulong_t)&pvr2_device_29xxx},
  203. { USB_DEVICE(0x2040, 0x2400),
  204. .driver_info = (kernel_ulong_t)&pvr2_device_24xxx},
  205. { USB_DEVICE(0x1164, 0x0622),
  206. .driver_info = (kernel_ulong_t)&pvr2_device_gotview_2},
  207. #ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_CREATOR
  208. { USB_DEVICE(0x11ba, 0x1003),
  209. .driver_info = (kernel_ulong_t)&pvr2_device_onair_creator},
  210. #endif
  211. #ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_USB2
  212. { USB_DEVICE(0x11ba, 0x1001),
  213. .driver_info = (kernel_ulong_t)&pvr2_device_onair_usb2},
  214. #endif
  215. { USB_DEVICE(0x2040, 0x7300),
  216. .driver_info = (kernel_ulong_t)&pvr2_device_73xxx},
  217. { USB_DEVICE(0x2040, 0x7500),
  218. .driver_info = (kernel_ulong_t)&pvr2_device_75xxx},
  219. { USB_DEVICE(0x2040, 0x7501),
  220. .driver_info = (kernel_ulong_t)&pvr2_device_75xxx},
  221. { }
  222. };
  223. MODULE_DEVICE_TABLE(usb, pvr2_device_table);
  224. /*
  225. Stuff for Emacs to see, in order to encourage consistent editing style:
  226. *** Local Variables: ***
  227. *** mode: c ***
  228. *** fill-column: 75 ***
  229. *** tab-width: 8 ***
  230. *** c-basic-offset: 8 ***
  231. *** End: ***
  232. */