pvrusb2-devattr.c 7.7 KB

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