summaryrefslogtreecommitdiff
path: root/drivers/dahdi/dahdi_echocan_oslec.c
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2008-12-11 20:51:15 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2008-12-11 20:51:15 +0000
commit2fcb88c87b6bd6c501fff312d92fbeac49aa436c (patch)
treed93bb0148f55a8303e2b17ad50e014083e651cba /drivers/dahdi/dahdi_echocan_oslec.c
parent503050b2a504ee3da8b9f39545ab7f0847328a89 (diff)
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) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5503 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/dahdi_echocan_oslec.c')
-rw-r--r--drivers/dahdi/dahdi_echocan_oslec.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/dahdi/dahdi_echocan_oslec.c b/drivers/dahdi/dahdi_echocan_oslec.c
index b0c7779..aa63599 100644
--- a/drivers/dahdi/dahdi_echocan_oslec.c
+++ b/drivers/dahdi/dahdi_echocan_oslec.c
@@ -46,7 +46,14 @@ static void echo_can_free(struct echo_can_state *ec)
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 @@ static int echo_can_create(struct dahdi_echocanparams *ecp, struct dahdi_echocan
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;
}