[dahdi-commits] fjoe: freebsd/trunk r9216 - in /freebsd/trunk: drivers/dahdi/ drivers/staging...
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Tue Aug 31 02:55:44 CDT 2010
Author: fjoe
Date: Tue Aug 31 02:55:42 2010
New Revision: 9216
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9216
Log:
Initial port of OSLEC echo canceller.
Added:
freebsd/trunk/freebsd/dahdi_echocan_oslec/ (with props)
freebsd/trunk/freebsd/dahdi_echocan_oslec/Makefile (with props)
Modified:
freebsd/trunk/drivers/dahdi/dahdi_echocan_oslec.c
freebsd/trunk/drivers/staging/echo/echo.c
freebsd/trunk/freebsd/Makefile
Modified: freebsd/trunk/drivers/dahdi/dahdi_echocan_oslec.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/dahdi_echocan_oslec.c?view=diff&rev=9216&r1=9215&r2=9216
==============================================================================
--- freebsd/trunk/drivers/dahdi/dahdi_echocan_oslec.c (original)
+++ freebsd/trunk/drivers/dahdi/dahdi_echocan_oslec.c Tue Aug 31 02:55:42 2010
@@ -22,6 +22,10 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#if defined(__FreeBSD__)
+#include <sys/types.h>
+#include <sys/module.h>
+#else
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/errno.h>
@@ -29,6 +33,7 @@
#include <linux/init.h>
#include <linux/ctype.h>
#include <linux/moduleparam.h>
+#endif /* !__FreeBSD__ */
/* Fix this if OSLEC is elsewhere */
#include "../staging/echo/oslec.h"
@@ -136,9 +141,32 @@
dahdi_unregister_echocan_factory(&my_factory);
}
+#if defined(__FreeBSD__)
+static int
+echocan_oslec_modevent(module_t mod __unused, int type, void *data __unused)
+{
+ int res;
+
+ switch (type) {
+ case MOD_LOAD:
+ res = mod_init();
+ return (-res);
+ case MOD_UNLOAD:
+ mod_exit();
+ return (0);
+ default:
+ return (EOPNOTSUPP);
+ }
+}
+
+DAHDI_DEV_MODULE(dahdi_echocan_oslec, echocan_oslec_modevent, NULL);
+MODULE_VERSION(dahdi_echocan_oslec, 1);
+MODULE_DEPEND(dahdi_echocan_oslec, dahdi, 1, 1, 1);
+#else
MODULE_DESCRIPTION("DAHDI OSLEC wrapper");
MODULE_AUTHOR("Tzafrir Cohen <tzafrir.cohen at xorcom.com>");
MODULE_LICENSE("GPL");
module_init(mod_init);
module_exit(mod_exit);
+#endif /* !__FreeBSD__ */
Modified: freebsd/trunk/drivers/staging/echo/echo.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/staging/echo/echo.c?view=diff&rev=9216&r1=9215&r2=9216
==============================================================================
--- freebsd/trunk/drivers/staging/echo/echo.c (original)
+++ freebsd/trunk/drivers/staging/echo/echo.c Tue Aug 31 02:55:42 2010
@@ -102,9 +102,15 @@
Mark, Pawel, and Pavel.
*/
+#if defined(__FreeBSD__)
+#include <sys/types.h>
+#include <sys/libkern.h>
+#include <dahdi/compat/bsd.h>
+#else
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
+#endif /* !__FreeBSD__ */
#include "echo.h"
@@ -656,7 +662,9 @@
}
EXPORT_SYMBOL_GPL(oslec_hpf_tx);
+#if !defined(__FreeBSD__)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("David Rowe");
MODULE_DESCRIPTION("Open Source Line Echo Canceller");
MODULE_VERSION("0.3.0");
+#endif /* !__FreeBSD__ */
Modified: freebsd/trunk/freebsd/Makefile
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/freebsd/Makefile?view=diff&rev=9216&r1=9215&r2=9216
==============================================================================
--- freebsd/trunk/freebsd/Makefile (original)
+++ freebsd/trunk/freebsd/Makefile Tue Aug 31 02:55:42 2010
@@ -19,6 +19,7 @@
dahdi_echocan_jpah\
dahdi_echocan_kb1\
dahdi_echocan_mg2\
+ dahdi_echocan_oslec\
dahdi_echocan_sec\
dahdi_echocan_sec2
Propchange: freebsd/trunk/freebsd/dahdi_echocan_oslec/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Aug 31 02:55:42 2010
@@ -1,0 +1,8 @@
+@
+machine
+.depend
+export_syms
+*.ko
+*.kld
+*_if.h
+
Added: freebsd/trunk/freebsd/dahdi_echocan_oslec/Makefile
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/freebsd/dahdi_echocan_oslec/Makefile?view=auto&rev=9216
==============================================================================
--- freebsd/trunk/freebsd/dahdi_echocan_oslec/Makefile (added)
+++ freebsd/trunk/freebsd/dahdi_echocan_oslec/Makefile Tue Aug 31 02:55:42 2010
@@ -1,0 +1,8 @@
+# $Id$
+
+.PATH: ${.CURDIR}/../../drivers/dahdi ${.CURDIR}/../../drivers/staging/echo
+
+KMOD= dahdi_echocan_oslec
+SRCS= dahdi_echocan_oslec.c echo.c
+
+.include <bsd.kmod.mk>
Propchange: freebsd/trunk/freebsd/dahdi_echocan_oslec/Makefile
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: freebsd/trunk/freebsd/dahdi_echocan_oslec/Makefile
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: freebsd/trunk/freebsd/dahdi_echocan_oslec/Makefile
------------------------------------------------------------------------------
svn:mime-type = text/plain
More information about the dahdi-commits
mailing list