[svn-commits] tzafrir: linux/trunk r5503 - /linux/trunk/drivers/dahdi/dahdi_echocan_oslec.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Dec 11 14:51:15 CST 2008


Author: tzafrir
Date: Thu Dec 11 14:51:15 2008
New Revision: 5503

URL: http://svn.digium.com/view/dahdi?view=rev&rev=5503
Log:
Send all samples to OSLEC, rather than just the first.

(closes issue #14036)
Reported by: marcotasto
Patches:
      dahdi_echocan_oslec.patch uploaded by marcotasto (license 635)

Modified:
    linux/trunk/drivers/dahdi/dahdi_echocan_oslec.c

Modified: linux/trunk/drivers/dahdi/dahdi_echocan_oslec.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/dahdi_echocan_oslec.c?view=diff&rev=5503&r1=5502&r2=5503
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_echocan_oslec.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_echocan_oslec.c Thu Dec 11 14:51:15 2008
@@ -46,7 +46,14 @@
 
 static void echo_can_update(struct echo_can_state *ec, short *iref, short *isig)
 {
-	oslec_update((struct oslec_state *)ec, *iref, *isig);
+	unsigned int SampleNum;
+
+	for (SampleNum = 0; SampleNum < DAHDI_CHUNKSIZE; SampleNum++, iref++)
+	{
+		short iCleanSample;
+		iCleanSample = (short) oslec_update((struct oslec_state *)ec, *iref, *isig);
+		*isig++ = iCleanSample;
+	}
 }
 
 static int echo_can_create(struct dahdi_echocanparams *ecp, struct dahdi_echocanparam *p,
@@ -57,8 +64,7 @@
 		return -EINVAL;
 	}
 
-	/* TODO: get adaption mode from EC parameters? */
-	*ec = (struct echo_can_state *)oslec_create(ecp->tap_length, 0);
+	*ec = (struct echo_can_state *)oslec_create(ecp->tap_length, ECHO_CAN_USE_ADAPTION | ECHO_CAN_USE_NLP  | ECHO_CAN_USE_CLIP | ECHO_CAN_USE_TX_HPF | ECHO_CAN_USE_RX_HPF);
 
 	return *ec ? 0 : -ENOTTY;
 }




More information about the svn-commits mailing list