diff --git a/README b/README index 2d7a1c5c..1fd80443 100644 --- a/README +++ b/README @@ -196,6 +196,41 @@ you a clue of the versions installed: find /lib/modules -name dahdi.ko +OSLEC +~~~~~ +The echo canceller module dahdi_echocan_oslec +provides a DAHDI echo canceller module that uses the code from OSLEC. + +https://www.rowetel.com/ucasterisk/oslec.html[OSLEC] is an +Open Source Line Echo Canceller. It was previously part of the mainline +kernel but has since been removed; for licensing reasons, it is +distributed separately in the dahdi-linux-extra repo. + +You can get the OSLEC code from the dahdi-linux-extra Git repository: + + cd /usr/src + git clone --depth 1 --single-branch --branch extra-2.10.y https://notabug.org/tzafrir/dahdi-linux-extra.git + mv dahdi-linux-extra/drivers/staging dahdi-linux/drivers + rm -rf dahdi-linux-extra + +To use OSLEC, can copy drivers/staging/echo from dahdi-extra +to drivers/staging/echo in dahdi-linux; dahdi_echocan_oslec assumes that +this is where the oslec code lies. If it is elsewhere, you'll need to fix +the #include line. + +After doing that, you'll see the following when building (running +'make') + + ... + CC [M] /usr/src/dahdi-linux/drivers/dahdi/dahdi_echocan_oslec.o + CC [M] /usr/src/dahdi-linux/drivers/dahdi/../staging/echo/echo.o + ... + +As this is an experimental driver, problems building and using it should +be reported on the +https://lists.sourceforge.net/lists/listinfo/freetel-oslec[OSLEC mailing +list]. + ===== LINUX_DIR The relative path to the dahdi-linux tree. The default is '.' and normally there's no reason to override it. diff --git a/drivers/dahdi/Kbuild b/drivers/dahdi/Kbuild index d9d26da8..c5b5e6c6 100644 --- a/drivers/dahdi/Kbuild +++ b/drivers/dahdi/Kbuild @@ -69,9 +69,8 @@ endif obj-m += $(DAHDI_MODULES_EXTRA) -# If you want to build OSLEC, include the code in the standard location: -# drivers/staging/echo . The DAHDI OSLEC echo canceller will be built as -# well: +# If you want to build OSLEC, include the code in drivers/staging/echo +# The DAHDI OSLEC echo canceller will be built as well: ifneq (,$(wildcard $(src)/../staging/echo/echo.c)) obj-m += dahdi_echocan_oslec.o obj-m += ../staging/echo/echo.o diff --git a/drivers/dahdi/dahdi_echocan_oslec.c b/drivers/dahdi/dahdi_echocan_oslec.c index 931f82b9..e1437a90 100644 --- a/drivers/dahdi/dahdi_echocan_oslec.c +++ b/drivers/dahdi/dahdi_echocan_oslec.c @@ -30,9 +30,8 @@ #include #include -/* Fix this if OSLEC is elsewhere */ +/* Change this if OSLEC is elsewhere */ #include "../staging/echo/oslec.h" -//#include #include