pvrusb2-devattr.c 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  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. /*------------------------------------------------------------------------*/
  103. /* GOTVIEW USB2.0 DVD Deluxe */
  104. /* (same module list as gotview_2) */
  105. static const struct pvr2_device_desc pvr2_device_gotview_2d = {
  106. .description = "Gotview USB 2.0 DVD Deluxe",
  107. .shortname = "gv2d",
  108. .client_modules.lst = pvr2_client_gotview_2,
  109. .client_modules.cnt = ARRAY_SIZE(pvr2_client_gotview_2),
  110. .flag_has_cx25840 = !0,
  111. .default_tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
  112. .flag_has_analogtuner = !0,
  113. .flag_has_composite = !0,
  114. .flag_has_svideo = !0,
  115. .signal_routing_scheme = PVR2_ROUTING_SCHEME_GOTVIEW,
  116. };
  117. #ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_CREATOR
  118. /*------------------------------------------------------------------------*/
  119. /* OnAir Creator */
  120. static const char *pvr2_client_onair_creator[] = {
  121. "saa7115",
  122. "tuner",
  123. "cs53l32a",
  124. };
  125. static const struct pvr2_device_desc pvr2_device_onair_creator = {
  126. .description = "OnAir Creator Hybrid USB tuner",
  127. .shortname = "oac",
  128. .client_modules.lst = pvr2_client_onair_creator,
  129. .client_modules.cnt = ARRAY_SIZE(pvr2_client_onair_creator),
  130. .default_tuner_type = TUNER_LG_TDVS_H06XF,
  131. .flag_has_analogtuner = !0,
  132. .flag_has_composite = !0,
  133. .flag_has_svideo = !0,
  134. .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
  135. .digital_control_scheme = PVR2_DIGITAL_SCHEME_ONAIR,
  136. };
  137. #endif
  138. #ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_USB2
  139. /*------------------------------------------------------------------------*/
  140. /* OnAir USB 2.0 */
  141. static const char *pvr2_client_onair_usb2[] = {
  142. "saa7115",
  143. "tuner",
  144. "cs53l32a",
  145. };
  146. static const struct pvr2_device_desc pvr2_device_onair_usb2 = {
  147. .description = "OnAir USB2 Hybrid USB tuner",
  148. .shortname = "oa2",
  149. .client_modules.lst = pvr2_client_onair_usb2,
  150. .client_modules.cnt = ARRAY_SIZE(pvr2_client_onair_usb2),
  151. .default_tuner_type = TUNER_PHILIPS_ATSC,
  152. .flag_has_analogtuner = !0,
  153. .flag_has_composite = !0,
  154. .flag_has_svideo = !0,
  155. .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
  156. .digital_control_scheme = PVR2_DIGITAL_SCHEME_ONAIR,
  157. };
  158. #endif
  159. /*------------------------------------------------------------------------*/
  160. /* Hauppauge PVR-USB2 Model 73xxx */
  161. static const char *pvr2_client_73xxx[] = {
  162. "cx25840",
  163. "tuner",
  164. };
  165. static const char *pvr2_fw1_names_73xxx[] = {
  166. "v4l-pvrusb2-73xxx-01.fw",
  167. };
  168. static const struct pvr2_device_desc pvr2_device_73xxx = {
  169. .description = "WinTV PVR USB2 Model Category 73xxxx",
  170. .shortname = "73xxx",
  171. .client_modules.lst = pvr2_client_73xxx,
  172. .client_modules.cnt = ARRAY_SIZE(pvr2_client_73xxx),
  173. .fx2_firmware.lst = pvr2_fw1_names_73xxx,
  174. .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_73xxx),
  175. .flag_has_cx25840 = !0,
  176. .flag_has_hauppauge_rom = !0,
  177. #if 0
  178. .flag_has_analogtuner = !0,
  179. .flag_has_composite = !0,
  180. .flag_has_svideo = !0,
  181. .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
  182. .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE,
  183. .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
  184. #else
  185. .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
  186. #endif
  187. };
  188. /*------------------------------------------------------------------------*/
  189. /* Hauppauge PVR-USB2 Model 75xxx */
  190. static const char *pvr2_client_75xxx[] = {
  191. "cx25840",
  192. "tuner",
  193. };
  194. static const char *pvr2_fw1_names_75xxx[] = {
  195. "v4l-pvrusb2-73xxx-01.fw",
  196. };
  197. static const struct pvr2_device_desc pvr2_device_75xxx = {
  198. .description = "WinTV PVR USB2 Model Category 75xxxx",
  199. .shortname = "75xxx",
  200. .client_modules.lst = pvr2_client_75xxx,
  201. .client_modules.cnt = ARRAY_SIZE(pvr2_client_75xxx),
  202. .fx2_firmware.lst = pvr2_fw1_names_75xxx,
  203. .fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_75xxx),
  204. .flag_has_cx25840 = !0,
  205. .flag_has_hauppauge_rom = !0,
  206. .flag_has_analogtuner = !0,
  207. .flag_has_composite = !0,
  208. .flag_has_svideo = !0,
  209. .signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
  210. .digital_control_scheme = PVR2_DIGITAL_SCHEME_HAUPPAUGE,
  211. .default_std_mask = V4L2_STD_NTSC_M,
  212. .led_scheme = PVR2_LED_SCHEME_HAUPPAUGE,
  213. };
  214. /*------------------------------------------------------------------------*/
  215. struct usb_device_id pvr2_device_table[] = {
  216. { USB_DEVICE(0x2040, 0x2900),
  217. .driver_info = (kernel_ulong_t)&pvr2_device_29xxx},
  218. { USB_DEVICE(0x2040, 0x2400),
  219. .driver_info = (kernel_ulong_t)&pvr2_device_24xxx},
  220. { USB_DEVICE(0x1164, 0x0622),
  221. .driver_info = (kernel_ulong_t)&pvr2_device_gotview_2},
  222. { USB_DEVICE(0x1164, 0x0602),
  223. .driver_info = (kernel_ulong_t)&pvr2_device_gotview_2d},
  224. #ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_CREATOR
  225. { USB_DEVICE(0x11ba, 0x1003),
  226. .driver_info = (kernel_ulong_t)&pvr2_device_onair_creator},
  227. #endif
  228. #ifdef CONFIG_VIDEO_PVRUSB2_ONAIR_USB2
  229. { USB_DEVICE(0x11ba, 0x1001),
  230. .driver_info = (kernel_ulong_t)&pvr2_device_onair_usb2},
  231. #endif
  232. { USB_DEVICE(0x2040, 0x7300),
  233. .driver_info = (kernel_ulong_t)&pvr2_device_73xxx},
  234. { USB_DEVICE(0x2040, 0x7500),
  235. .driver_info = (kernel_ulong_t)&pvr2_device_75xxx},
  236. { USB_DEVICE(0x2040, 0x7501),
  237. .driver_info = (kernel_ulong_t)&pvr2_device_75xxx},
  238. { }
  239. };
  240. MODULE_DEVICE_TABLE(usb, pvr2_device_table);
  241. /*
  242. Stuff for Emacs to see, in order to encourage consistent editing style:
  243. *** Local Variables: ***
  244. *** mode: c ***
  245. *** fill-column: 75 ***
  246. *** tab-width: 8 ***
  247. *** c-basic-offset: 8 ***
  248. *** End: ***
  249. */