[dahdi-commits] tzafrir: linux/trunk r4457 - /linux/trunk/drivers/dahdi/xpp/

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Wed Jun 25 03:35:14 CDT 2008


Author: tzafrir
Date: Wed Jun 25 03:35:14 2008
New Revision: 4457

URL: http://svn.digium.com/view/dahdi?view=rev&rev=4457
Log:
Removed some old, unused XPP code.

Modified:
    linux/trunk/drivers/dahdi/xpp/Kbuild
    linux/trunk/drivers/dahdi/xpp/xbus-pcm.c
    linux/trunk/drivers/dahdi/xpp/xbus-pcm.h
    linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c

Modified: linux/trunk/drivers/dahdi/xpp/Kbuild
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/xpp/Kbuild?view=diff&rev=4457&r1=4456&r2=4457
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/Kbuild (original)
+++ linux/trunk/drivers/dahdi/xpp/Kbuild Wed Jun 25 03:35:14 2008
@@ -1,7 +1,6 @@
 EXTRA_CFLAGS	=	$(XPP_LOCAL_CFLAGS)	\
 			-DDEBUG			\
 			-DPOLL_DIGITAL_INPUTS	\
-			-DWITH_ECHO_SUPPRESSION	\
 			-DDEBUG_PCMTX		\
 			-DPROTOCOL_DEBUG	\
 			-g

Modified: linux/trunk/drivers/dahdi/xpp/xbus-pcm.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/xpp/xbus-pcm.c?view=diff&rev=4457&r1=4456&r2=4457
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xbus-pcm.c (original)
+++ linux/trunk/drivers/dahdi/xpp/xbus-pcm.c Wed Jun 25 03:35:14 2008
@@ -36,10 +36,6 @@
 static const char rcsid[] = "$Id$";
 
 extern int debug;
-#ifdef	XPP_EC_CHUNK
-#include "supress/ec_xpp.h"
-DEF_PARM_BOOL(xpp_ec, 0, 0444, "Do we use our own (1) or Dahdi's (0) echo canceller");
-#endif
 #ifdef	OPTIMIZE_CHANMUTE
 static DEF_PARM_BOOL(optimize_chanmute, 1, 0644, "Optimize by muting inactive channels");
 #endif
@@ -650,52 +646,20 @@
 	memcpy(buf, snd, DAHDI_CHUNKSIZE);
 }
 
-#ifdef	XPP_EC_CHUNK
-/*
- * Taken from dahdi.c
- */
-static inline void xpp_ec_chunk(struct dahdi_chan *chan, unsigned char *rxchunk, const unsigned char *txchunk)
-{
-	int16_t		rxlin;
-	int		x;
-	unsigned long	flags;
-
-	/* Perform echo cancellation on a chunk if necessary */
-	if (!chan->ec)
-		return;
-	spin_lock_irqsave(&chan->lock, flags);
-	for (x=0;x<DAHDI_CHUNKSIZE;x++) {
-		rxlin = DAHDI_XLAW(rxchunk[x], chan);
-		rxlin = xpp_echo_can_update(chan->ec, DAHDI_XLAW(txchunk[x], chan), rxlin);
-		rxchunk[x] = DAHDI_LIN2X((int)rxlin, chan);
-	}
-	spin_unlock_irqrestore(&chan->lock, flags);
-}
-#endif
-
 static void do_ec(xpd_t *xpd)
 {
-#ifdef WITH_ECHO_SUPPRESSION
 	struct dahdi_chan	*chans = xpd->span.chans;
 	int		i;
 
-	/* FIXME: need to Echo cancel double buffered data */
 	for (i = 0;i < xpd->span.channels; i++) {
 		if(unlikely(IS_SET(xpd->digital_signalling, i)))	/* Don't echo cancel BRI D-chans */
 			continue;
 		if(!IS_SET(xpd->wanted_pcm_mask, i))			/* No ec for unwanted PCM */
 			continue;
-#ifdef XPP_EC_CHUNK 
-		/* even if defined, parameterr xpp_ec can override at run-time */
-		if (xpp_ec)
-			xpp_ec_chunk(&chans[i], chans[i].readchunk, xpd->ec_chunk2[i]);
-		else
-#endif
-			dahdi_ec_chunk(&chans[i], chans[i].readchunk, xpd->ec_chunk2[i]);
+		dahdi_ec_chunk(&chans[i], chans[i].readchunk, xpd->ec_chunk2[i]);
 		memcpy(xpd->ec_chunk2[i], xpd->ec_chunk1[i], DAHDI_CHUNKSIZE);
 		memcpy(xpd->ec_chunk1[i], chans[i].writechunk, DAHDI_CHUNKSIZE);
 	}
-#endif
 }
 
 #if 0
@@ -719,29 +683,6 @@
    which handles the individual hook states  */
 int (*sethook)(struct dahdi_chan *chan, int hookstate);
 #endif
-
-int xpp_echocan(struct dahdi_chan *chan, int len)
-{
-#ifdef	XPP_EC_CHUNK
-	if(len == 0) {	/* shut down */
-		/* dahdi calls this also during channel initialization */
-		if(chan->ec) {
-			xpp_echo_can_free(chan->ec);
-		}
-		return 0;
-	}
-	if(chan->ec) {
-		ERR("%s: Trying to override an existing EC (%p)\n", __FUNCTION__, chan->ec);
-		return -EINVAL;
-	}
-	chan->ec = xpp_echo_can_create(len, 0);
-	if(!chan->ec) {
-		ERR("%s: Failed creating xpp EC (len=%d)\n", __FUNCTION__, len);
-		return -EINVAL;
-	}
-#endif
-	return 0;
-}
 
 static bool pcm_valid(xpd_t *xpd, xpacket_t *pack)
 {
@@ -1245,15 +1186,6 @@
 	INFO("FEATURE: with CHANMUTE optimization (%sactivated)\n",
 		(optimize_chanmute)?"":"de");
 #endif
-#ifdef	WITH_ECHO_SUPPRESSION
-	INFO("FEATURE: with ECHO_SUPPRESSION\n");
-#else
-	INFO("FEATURE: without ECHO_SUPPRESSION\n");
-#endif
-	if(xpp_ec)
-		INFO("FEATURE: with XPP_EC_CHUNK\n");
-	else
-		INFO("FEATURE: without XPP_EC_CHUNK\n");
 #ifdef	DAHDI_SYNC_TICK
 	INFO("FEATURE: with sync_tick() from DAHDI\n");
 #else
@@ -1288,7 +1220,6 @@
 EXPORT_SYMBOL(xbus_request_sync);
 EXPORT_SYMBOL(got_new_syncer);
 EXPORT_SYMBOL(elect_syncer);
-EXPORT_SYMBOL(xpp_echocan);
 #ifdef	DAHDI_SYNC_TICK
 EXPORT_SYMBOL(dahdi_sync_tick);
 #endif

Modified: linux/trunk/drivers/dahdi/xpp/xbus-pcm.h
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/xpp/xbus-pcm.h?view=diff&rev=4457&r1=4456&r2=4457
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xbus-pcm.h (original)
+++ linux/trunk/drivers/dahdi/xpp/xbus-pcm.h Wed Jun 25 03:35:14 2008
@@ -112,15 +112,8 @@
 int		xbus_command_queue_tick(xbus_t *xbus);
 void		xbus_reset_counters(xbus_t *xbus);
 void		elect_syncer(const char *msg);
-int		xpp_echocan(struct dahdi_chan *chan, int len);
 #ifdef	DAHDI_SYNC_TICK
 int		dahdi_sync_tick(struct dahdi_span *span, int is_master);
-#endif
-
-#ifdef	XPP_EC_CHUNK
-extern int xpp_ec;
-#else
-#define	xpp_ec	0
 #endif
 
 #ifdef	DEBUG_PCMTX

Modified: linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c?view=diff&rev=4457&r1=4456&r2=4457
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c (original)
+++ linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c Wed Jun 25 03:35:14 2008
@@ -955,8 +955,6 @@
 #ifdef	DAHDI_SYNC_TICK
 	span->sync_tick = dahdi_sync_tick;
 #endif
-	if (xpp_ec)
-		span->echocan = xpp_echocan;
 #ifdef	CONFIG_DAHDI_WATCHDOG
 	span->watchdog = xpp_watchdog;
 #endif




More information about the dahdi-commits mailing list