[svn-commits] kpfleming: branch linux/kpfleming/echocan_work r6495 - /linux/team/kpfleming/...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Apr 27 10:26:45 CDT 2009


Author: kpfleming
Date: Mon Apr 27 10:26:42 2009
New Revision: 6495

URL: http://svn.digium.com/svn-view/dahdi?view=rev&rev=6495
Log:
vpm150m *does* support parameters, so don't drop them

add some debugging messages for vpm150m being enabled/disabled


Modified:
    linux/team/kpfleming/echocan_work/drivers/dahdi/wctdm24xxp/base.c

Modified: linux/team/kpfleming/echocan_work/drivers/dahdi/wctdm24xxp/base.c
URL: http://svn.digium.com/svn-view/dahdi/linux/team/kpfleming/echocan_work/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=6495&r1=6494&r2=6495
==============================================================================
--- linux/team/kpfleming/echocan_work/drivers/dahdi/wctdm24xxp/base.c (original)
+++ linux/team/kpfleming/echocan_work/drivers/dahdi/wctdm24xxp/base.c Mon Apr 27 10:26:42 2009
@@ -1512,7 +1512,9 @@
 	}
 }
 
+#ifdef VPM150M_SUPPORT
 #include "adt_lec.c"
+#endif
 
 static int echocan_create(struct dahdi_chan *chan, struct dahdi_echocanparams *ecp,
 			  struct dahdi_echocanparam *p, struct dahdi_echocan_state **ec)
@@ -1540,7 +1542,7 @@
 	}
 #endif
 
-	if (ecp->param_count > 0) {
+	if (wc->vpm && (ecp->param_count > 0)) {
 		printk(KERN_WARNING "%s echo canceller does not support parameters; failing request\n", ops->name);
 		return -EINVAL;
 	}
@@ -1559,8 +1561,8 @@
 			channel >>= 2;
 	
 		if (debug & DEBUG_ECHOCAN) 
-			printk(KERN_DEBUG "echocan: Unit is %d, Channel is  %d length %d\n", 
-			       unit, channel, ecp->tap_length);
+			printk(KERN_DEBUG "echocan: Unit is %d, Channel is %d length %d\n", unit, channel, ecp->tap_length);
+
 		wctdm_vpm_out(wc, unit, channel, 0x3e);
 #ifdef VPM150M_SUPPORT
 	} else if (wc->vpm150m) {
@@ -1571,6 +1573,9 @@
 		if ((ret = adt_lec_parse_params(&vpm150m->desiredecstate[channo], ecp, p)))
 			return ret;
 
+		if (debug & DEBUG_ECHOCAN) 
+			printk(KERN_DEBUG "echocan: Channel is %d length %d\n", channo, ecp->tap_length);
+
 		if (memcmp(&vpm150m->curecstate[channo], &vpm150m->desiredecstate[channo], sizeof(vpm150m->curecstate[channo])) &&
 		    test_bit(VPM150M_ACTIVE, &vpm150m->control))
 			queue_work(vpm150m->wq, &vpm150m->work);
@@ -1595,8 +1600,8 @@
 			channel >>= 2;
 	
 		if (debug & DEBUG_ECHOCAN) 
-			printk(KERN_DEBUG "echocan: Unit is %d, Channel is %d length 0\n", 
-			       unit, channel);
+			printk(KERN_DEBUG "echocan: Unit is %d, Channel is %d length 0\n", unit, channel);
+
 		wctdm_vpm_out(wc, unit, channel, 0x01);
 #ifdef VPM150M_SUPPORT
 	} else if (wc->vpm150m) {
@@ -1604,6 +1609,9 @@
 		int channo = chan->chanpos - 1;
 
 		adt_lec_init_defaults(&vpm150m->desiredecstate[channo], 0);
+
+		if (debug & DEBUG_ECHOCAN) 
+			printk(KERN_DEBUG "echocan: Channel is %d length 0\n", channo);
 
 		if (memcmp(&vpm150m->curecstate[channo], &vpm150m->desiredecstate[channo], sizeof(vpm150m->curecstate[channo])) &&
 		    test_bit(VPM150M_ACTIVE, &vpm150m->control))




More information about the svn-commits mailing list