Advertisement
techmik

averusb-mod.c

Jun 4th, 2011
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.68 KB | None | 0 0
  1. /*********************************************************************************
  2.  
  3. AVerMedia TECHNOLOGIES, Inc.
  4. AVerMedia Linux Driver License Agreement
  5.  
  6.  
  7.  
  8. IMPORTANT: This AVerMeida Linux Driver is supplied to you by
  9. AVerMedia TECHNOLOGIES, Inc. ("AVerMedia") in consideration
  10. of your agreement to the following terms, and your use, installation,
  11. modification or redistribution of this AVerMedia Linux Driver
  12. constitutes acceptance of these terms. If you do not agree with
  13. these terms, please do not use, install, modify or redistribute
  14. this AVerMedia Linux Driver.
  15.  
  16. 1. License. Any driver sources, binaries, utilities, documentation
  17. and other materials accompanying this License, whether on disk,
  18. print or electronic documentation, in read only memory, or any
  19. other media, (collectively, the "AVerMedia Linux Driver") are
  20. licensed, not sold, to you by AVerMedia for use only under the terms
  21. of this License, and AVerMedia reserves all rights not expressly
  22. granted to you. The rights granted herein are limited to AVerMedia's
  23. intellectual property rights in the AVerMedia Linux Driver and do not
  24. include any other patents or intellectual property rights. You own
  25. the media on which the AVerMedia Linux Driver is recorded but AVerMedia
  26. retains ownership of the AVerMedia Linux Driver itself and its
  27. derivative works. The AVerMedia Linux Driver in this package and
  28. any copies, modifications and derivative works which this License
  29. authorizes you to make are subject to this License. The binaries
  30. part of AVerMedia Linux Driver is ported from Windows driver and
  31. is under some other NDA, so the original source code will not be
  32. released.
  33.  
  34. 2. Permitted Uses and Restrictions. You may use, copy, redistribute
  35. or install the original AVerMedia Linux Driver to test or demonstrate
  36. the AVerMedia Linux Driver with AVerMedia's products. You may also
  37. modify the released source code in order to improve the compatibilities,
  38. operability and functionalities with AVerMedia's products as long as
  39. this License in whole are remained and subsequently use, copy,
  40. redistribute or install the derivative works. You have no right to
  41. reverse engineer, decompile, disassemble the accompanying object files
  42. through the released source code, nor to modify, incorporate into or
  43. compile in combination with your own programs to operate with any
  44. product other than from AVerMedia. Your rights under this License
  45. will terminate automatically without notice from AVerMedia if you
  46. fail to comply with any term(s) of this License.
  47.  
  48. 3. Disclaimer of Warranty. The AVerMedia Linux Driver may be "alpha",
  49. "beta", "development", pre-release, untested, and/or not fully tested
  50. and may contain errors that could cause failures or loss of data, be
  51. incomplete or contain inaccuracies. YOU EXPRESSLY ACKNOWLEDGE AND AGREE
  52. THAT USE OF THE AVERMEDIA LINUX DRIVER IS AT YOUR SOLE RISK AND THAT THE
  53. ENTIRE RISK AS TO SATISFACTORY QUALITY, PERFORMANCE, ACCURACY AND EFFORT
  54. IS WITH YOU. THE AVERMEDIA LINUX DRIVER IS PROVIDED "AS IS" WITH ALL
  55. FAULTS. THE USER ASSUMES TOTAL RESPONSIBILITY AND ALL RISKS ASSOCIATED
  56. WITH USE OF THE SOFTWARE, INCLUDING, WITHOUT LIMITATION, RISKS OF ANY
  57. DEFECTS, INACCURACIES, PROGRAM ERRORS, DAMAGE TO OR LOSS OF DATA,
  58. PROGRAMS OR EQUIPMENT, UNAVAILABILITY OR INTERRUPTION OF OPERATIONS.
  59. AVERMEDIA DOES NOT MAKE, AND EXPRESSLY DISCLAIM, ANY EXPRESS OR IMPLIED
  60. WARRANTIES OF ANY KIND WHATSOEVER, INCLUDING, WITHOUT LIMITATION,
  61. ANY WARRANTIES OR FITNESS FOR A PARTICULAR PURPOSE, AND ANY WARRANTIES
  62. OF TITLE OR NON-INFRINGEMENT. AVERMEDIA DOES NOT WARRANT THAT THE USE
  63. OR OPERATION OF THE SOFTWARE WILL BE UNITERRUPTED OR ERROR FREE.
  64.  
  65. 4. Complete Agreement. This License constitutes the entire agreement
  66. between the parties with respect to the use of the AVerMedia Linux
  67. Driver licensed hereunder and supersedes all prior or contemporaneous
  68. understandings regarding such subject matter. No amendment to or
  69. modification of this License will be binding unless in writing and
  70. signed by AVerMedia. Any translation of this License is done for
  71. local requirements and in the event of a dispute between the English
  72. and any non-English versions, the English version of this License
  73. shall govern.
  74.  
  75. *********************************************************************************/
  76. #include <linux/module.h>
  77. #include <linux/version.h>
  78.  
  79.  
  80.  
  81.  
  82.  
  83. #include "osdep_usb.c"
  84.  
  85. EXPORT_SYMBOL(SysUsbSetIntfdata);
  86. EXPORT_SYMBOL(SysUsbGetIntfdata);
  87. EXPORT_SYMBOL(SysUsbBulkPipe);
  88. EXPORT_SYMBOL(SysUsbIsocPipe);
  89. EXPORT_SYMBOL(SysUsbIntPipe);
  90. EXPORT_SYMBOL(SysIntfGetNumEP);
  91. EXPORT_SYMBOL(SysGetEPDesc);
  92. EXPORT_SYMBOL(SysUsbGetId);
  93. EXPORT_SYMBOL(SysUsbPutDev);
  94. EXPORT_SYMBOL(SysUsbRegister);
  95. EXPORT_SYMBOL(SysUsbDeregister);
  96. EXPORT_SYMBOL(SysUsbDriverName);
  97. EXPORT_SYMBOL(SysUsbBulkMsg);
  98. EXPORT_SYMBOL(SysUsbControlMsg);
  99. EXPORT_SYMBOL(SysUsbBulkMsg2);
  100. EXPORT_SYMBOL(SysUsbControlMsg2);
  101. EXPORT_SYMBOL(SysUsbSubmitUrb);
  102. EXPORT_SYMBOL(SysUsbFillBulkUrb);
  103. EXPORT_SYMBOL(SysUsbFillIntUrb);
  104. EXPORT_SYMBOL(SysUsbFillIsocUrb);
  105. EXPORT_SYMBOL(SysUsbAllocUrb);
  106. EXPORT_SYMBOL(SysUsbGetUrb);
  107. EXPORT_SYMBOL(SysUsbFreeUrb);
  108. EXPORT_SYMBOL(SysUsbKillUrb);
  109. EXPORT_SYMBOL(SysUsbUnlinkUrb);
  110. EXPORT_SYMBOL(SysGetUrbContext);
  111. EXPORT_SYMBOL(SysGetUrbStatus);
  112. EXPORT_SYMBOL(SysGetUrbActualLength);
  113. EXPORT_SYMBOL(SysSetUrbXferFlag);
  114. EXPORT_SYMBOL(SysUsbSetInterface);
  115. EXPORT_SYMBOL(SysUsbClearHalt);
  116. EXPORT_SYMBOL(SysUsbDeviceSpeed);
  117. EXPORT_SYMBOL(SysUsbGetDeviceDescriptor);
  118. EXPORT_SYMBOL(SysUsbGetMaxPower);
  119. EXPORT_SYMBOL(SysGetInfSubClass);
  120. EXPORT_SYMBOL(SysGetUrbTransBufLen);
  121. EXPORT_SYMBOL(SysGetUrbActualLen);
  122. EXPORT_SYMBOL(SysGetUrbTransBuf);
  123. EXPORT_SYMBOL(SysGetIsocDescData);
  124. EXPORT_SYMBOL(SysGetUSBDeviceFromIntf);
  125. EXPORT_SYMBOL(SysGetUSBDevice);
  126.  
  127.  
  128. #include "osdep.c"
  129. EXPORT_SYMBOL(SysWaitQueueHeadInit);
  130. EXPORT_SYMBOL(SysWaitQueueHeadFini);
  131. EXPORT_SYMBOL(SysWaitQueueInit);
  132. EXPORT_SYMBOL(SysWaitQueueFini);
  133. EXPORT_SYMBOL(SysAddWaitQueue);
  134. EXPORT_SYMBOL(SysRemoveWaitQueue);
  135. EXPORT_SYMBOL(SysWakeUp);
  136. EXPORT_SYMBOL(SysPollWait);
  137. EXPORT_SYMBOL(SysSpinLockInit);
  138. EXPORT_SYMBOL(SysSpinLock);
  139. EXPORT_SYMBOL(SysSpinUnlock);
  140. EXPORT_SYMBOL(SysSpinLockIrqsave);
  141. EXPORT_SYMBOL(SysSpinUnlockIrqrestore);
  142. EXPORT_SYMBOL(SysSpinLockFini);
  143. EXPORT_SYMBOL(SysSemInit);
  144. EXPORT_SYMBOL(SysSemDown);
  145. EXPORT_SYMBOL(SysSemDownInterruptible);
  146. EXPORT_SYMBOL(SysSemUp);
  147. EXPORT_SYMBOL(SysSemFini);
  148. EXPORT_SYMBOL(_SysMutexInit);
  149. EXPORT_SYMBOL(SysMutexLock);
  150. EXPORT_SYMBOL(SysMutexLockInterruptible);
  151. EXPORT_SYMBOL(SysMutexUnlock);
  152. EXPORT_SYMBOL(SysMutexFree);
  153. EXPORT_SYMBOL(SysJSleep);
  154. EXPORT_SYMBOL(SysMSleep);
  155. EXPORT_SYMBOL(SysUSleep);
  156. EXPORT_SYMBOL(SysMDelay);
  157. EXPORT_SYMBOL(SysInAtomic);
  158.  
  159. EXPORT_SYMBOL(SysKMallocWithTag);
  160.  
  161. EXPORT_SYMBOL(SysKFreeWithTag);
  162. EXPORT_SYMBOL(SysMemSet);
  163. EXPORT_SYMBOL(SysMemCpy);
  164. EXPORT_SYMBOL(SysMemCmp);
  165. EXPORT_SYMBOL(SysReAlloc);
  166. EXPORT_SYMBOL(SysMemMove);
  167. EXPORT_SYMBOL(SysPrintk);
  168. EXPORT_SYMBOL(SysVPrintk);
  169. EXPORT_SYMBOL(SysSnPrintf);
  170. EXPORT_SYMBOL(SysKrefInit);
  171. EXPORT_SYMBOL(SysKrefPut);
  172. EXPORT_SYMBOL(SysKrefGet);
  173. EXPORT_SYMBOL(SysKrefFree);
  174. EXPORT_SYMBOL(SysLockKernel);
  175. EXPORT_SYMBOL(SysUnlockKernel);
  176. EXPORT_SYMBOL(SysCopyToUser);
  177. EXPORT_SYMBOL(SysCopyFromUser);
  178. EXPORT_SYMBOL(SysStrLen);
  179. EXPORT_SYMBOL(SysSimpleStrtoul);
  180. EXPORT_SYMBOL(SysStrNCpy);
  181. EXPORT_SYMBOL(SysSetCurrentState);
  182. EXPORT_SYMBOL(SysSignalPending);
  183. EXPORT_SYMBOL(SysSchedule);
  184. EXPORT_SYMBOL(SysScheduleTimeout);
  185. EXPORT_SYMBOL(SysGetHZ);
  186. EXPORT_SYMBOL(SysGetPageParam);
  187. EXPORT_SYMBOL(SysVmallocToPage);
  188. EXPORT_SYMBOL(SysPageAddress);
  189. EXPORT_SYMBOL(SysPageHighMem);
  190. EXPORT_SYMBOL(SysGetPage);
  191. EXPORT_SYMBOL(SysPciDmaSyncSingleForCpu);
  192. EXPORT_SYMBOL(SysPciDmaSyncSgForCpu);
  193. EXPORT_SYMBOL(SysFillSG);
  194. EXPORT_SYMBOL(SysGetSgDmaAddress);
  195. EXPORT_SYMBOL(SysGetSgDmaLen);
  196. EXPORT_SYMBOL(SysGetSgPage);
  197. EXPORT_SYMBOL(SysSetSgDmaAddress);
  198. EXPORT_SYMBOL(SysSetSgDmaLen);
  199. EXPORT_SYMBOL(SysSGAlloc);
  200. EXPORT_SYMBOL(SysPciMapSg);
  201. EXPORT_SYMBOL(SysPciUnmapSg);
  202. EXPORT_SYMBOL(SysPciMapSingle);
  203. EXPORT_SYMBOL(SysPciUnmapSingle);
  204. EXPORT_SYMBOL(SysPciAllocConsistent);
  205. EXPORT_SYMBOL(SysPciFreeConsistent);
  206. EXPORT_SYMBOL(SysPciEnableDevice);
  207. EXPORT_SYMBOL(SysPciSetMaster);
  208. EXPORT_SYMBOL(SysPciMMIOMap);
  209. EXPORT_SYMBOL(SysPciMMIOUnMap);
  210. EXPORT_SYMBOL(SysIORead32);
  211. EXPORT_SYMBOL(SysIOWrite32);
  212. EXPORT_SYMBOL(SysIORead16);
  213. EXPORT_SYMBOL(SysIOWrite16);
  214. EXPORT_SYMBOL(SysIORead8);
  215. EXPORT_SYMBOL(SysIOWrite8);
  216. EXPORT_SYMBOL(SysPciReadCfgByte);
  217. EXPORT_SYMBOL(SysPciReadCfgWord);
  218. EXPORT_SYMBOL(SysPciReadCfgDWord);
  219. EXPORT_SYMBOL(SysPciWriteCfgByte);
  220. EXPORT_SYMBOL(SysPciWriteCfgWord);
  221. EXPORT_SYMBOL(SysPciWriteCfgDWord);
  222. EXPORT_SYMBOL(SysPciVendorId);
  223. EXPORT_SYMBOL(SysPciDeviceId);
  224. EXPORT_SYMBOL(SysPciSubVendorId);
  225. EXPORT_SYMBOL(SysPciSubDeviceId);
  226. EXPORT_SYMBOL(SysPciGetDevice);
  227. EXPORT_SYMBOL(SysPciSetDrvData);
  228. EXPORT_SYMBOL(SysPciGetDrvData);
  229. EXPORT_SYMBOL(SysPciGetIrq);
  230. EXPORT_SYMBOL(SysPciGetId);
  231. EXPORT_SYMBOL(SysPciName);
  232. EXPORT_SYMBOL(SysVmalloc32);
  233. EXPORT_SYMBOL(SysVFree);
  234. EXPORT_SYMBOL(SysInitTimer);
  235. EXPORT_SYMBOL(SysFillTimer);
  236. EXPORT_SYMBOL(SysModTimer);
  237. EXPORT_SYMBOL(SysDelTimer);
  238. EXPORT_SYMBOL(SysGetJiffies);
  239. EXPORT_SYMBOL(SysInitWork);
  240. EXPORT_SYMBOL(SysSubmitWork);
  241. EXPORT_SYMBOL(SysFlushWork);
  242. EXPORT_SYMBOL(SysRequestIrq);
  243. EXPORT_SYMBOL(SysFreeIrq);
  244. EXPORT_SYMBOL(SysPciEnableMsi);
  245. EXPORT_SYMBOL(SysPciDisableMsi);
  246. EXPORT_SYMBOL(SysInitCompletion);
  247. EXPORT_SYMBOL(SysReInitCompletion);
  248. EXPORT_SYMBOL(SysCompleteAndExit);
  249. EXPORT_SYMBOL(SysComplete);
  250. EXPORT_SYMBOL(SysCompleteAll);
  251. EXPORT_SYMBOL(SysWaitForCompletion);
  252. EXPORT_SYMBOL(SysWaitForCompletionTimeout);
  253. EXPORT_SYMBOL(SysFiniCompletion);
  254. EXPORT_SYMBOL(SysFileFlagIsNonBlock);
  255. EXPORT_SYMBOL(SysGetTimeOfDay);
  256. EXPORT_SYMBOL(SysAtomicInit);
  257. EXPORT_SYMBOL(SysAtomicSet);
  258. EXPORT_SYMBOL(SysAtomicGet);
  259. EXPORT_SYMBOL(SysAtomicAdd);
  260. EXPORT_SYMBOL(SysAtomicSub);
  261. EXPORT_SYMBOL(SysAtomicFini);
  262. EXPORT_SYMBOL(SysAtomicAddReturn);
  263. EXPORT_SYMBOL(SysAtomicSubReturn);
  264. EXPORT_SYMBOL(SysGetCurrent);
  265. EXPORT_SYMBOL(SysSendSignalToSelf);
  266. EXPORT_SYMBOL(SysGetV4L2IOCTLName);
  267. EXPORT_SYMBOL(aver_usb_board_name);
  268.  
  269.  
  270. #include "averusb_version.h"
  271.  
  272. #define AVERUSB_DRIVER_NAME "AVerMedia USB Wrapper"
  273.  
  274. #ifdef __AVER_USB_PRE__
  275. MODULE_DESCRIPTION(AVERUSB_DRIVER_NAME " " __AVER_USB_PRE_NAME__ " v" DRIVER_VER);
  276. #else
  277. MODULE_DESCRIPTION(AVERUSB_DRIVER_NAME " v" DRIVER_VER);
  278. #endif
  279. MODULE_AUTHOR("MPD Linux Team");
  280. MODULE_LICENSE("GPL");
  281.  
  282.  
  283. static int __init mod_init(void)
  284. {
  285.  
  286. printk("%s for %s version %s loaded\n", AVERUSB_DRIVER_NAME, __AVER_USB_PRE_NAME__, DRIVER_VER);
  287. return 0;
  288. }
  289.  
  290. static void __exit mod_exit(void)
  291. {
  292.  
  293. printk("%s for %s version %s unloaded\n", AVERUSB_DRIVER_NAME, __AVER_USB_PRE_NAME__, DRIVER_VER);
  294. }
  295.  
  296. module_init (mod_init);
  297. module_exit (mod_exit);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement