[svn-commits] kmoore: linux/trunk r9521 - /linux/trunk/drivers/dahdi/dahdi-base.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Dec 9 14:19:18 CST 2010


Author: kmoore
Date: Thu Dec  9 14:19:16 2010
New Revision: 9521

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9521
Log:
dahdi-base: Remove old method of invoking HWEC

Remove the code that allowed hardware echo cancellation to automatically
override software cancellation and prevented SWEC from working at all on a
card if HWEC was installed.  All EC now uses the standard modular EC interface.
Additionally, the "SWEC" identifier on channel lines in /proc/dahdi has been
changed to "ECTYPE" to avoid confusion.

Signed-off-by: Kinsey Moore <kmoore at digium.com>
Acked-by: Shaun Ruffell <sruffell at digium.com>

Modified:
    linux/trunk/drivers/dahdi/dahdi-base.c

Modified: linux/trunk/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=9521&r1=9520&r2=9521
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Thu Dec  9 14:19:16 2010
@@ -571,17 +571,6 @@
 static void dahdi_disable_dacs(struct dahdi_chan *chan)
 {
 	dahdi_chan_dacs(chan, NULL);
-}
-
-static int dahdi_chan_echocan_create(struct dahdi_chan *chan,
-				     struct dahdi_echocanparams *ecp,
-				     struct dahdi_echocanparam *p,
-				     struct dahdi_echocan_state **ec)
-{
-	if (chan->span && chan->span->ops->echocan_create)
-		return chan->span->ops->echocan_create(chan, ecp, p, ec);
-	else
-		return -ENODEV;
 }
 
 /*!
@@ -812,7 +801,7 @@
 				chan->chan_alarms);
 
 		if (chan->ec_factory)
-			len += snprintf(page+len, count-len, "(SWEC: %s) ",
+			len += snprintf(page+len, count-len, "(ECTYPE: %s) ",
 					chan->ec_factory->name);
 
 		if (chan->ec_state)
@@ -5430,7 +5419,7 @@
 	struct dahdi_echocan_state *ec = NULL, *ec_state;
 	const struct dahdi_echocan_factory *ec_current;
 	struct dahdi_echocanparam *params;
-	int ret;
+	int ret = 0;
 	unsigned long flags;
 
 	if (ecp->param_count > DAHDI_MAX_ECHOCANPARAMS)
@@ -5491,11 +5480,7 @@
 
 	ec_current = NULL;
 
-	/* attempt to use the span's echo canceler; fall back to built-in
-	   if it fails (but not if an error occurs) */
-	ret = dahdi_chan_echocan_create(chan, ecp, params, &ec);
-
-	if ((ret == -ENODEV) && chan->ec_factory) {
+	if (chan->ec_factory) {
 		/* try to get another reference to the module providing
 		   this channel's echo canceler */
 		if (!try_module_get(chan->ec_factory->owner)) {




More information about the svn-commits mailing list