diff options
author | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2003-04-14 23:02:02 +0000 |
---|---|---|
committer | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2003-04-14 23:02:02 +0000 |
commit | 474456d5b860e918461480b3d22b2a1e0fe0fea1 (patch) | |
tree | b4bf73c5d1546b18b8ad283ef2f780b53eb983fa | |
parent | 38cbe2090ef94689f646ea40d3cacb4ddf309f5a (diff) |
Make mec3 appear to work
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@170 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rwxr-xr-x | mec3.h | 5 | ||||
-rwxr-xr-x | zaptel.c | 8 |
2 files changed, 7 insertions, 6 deletions
@@ -111,8 +111,8 @@ static inline short echo_can_update(echo_can_state_t *ec, short iref, short isig float beta; /* Factor */ float se; /* Simulated echo */ /* Convert to floats about 1.0 */ - ref = (iref/32767.0); - sig = (isig/32767.0); + ref = (((float)iref)/32767.0); + sig = (((float)isig)/32767.0); #if 0 printf("start: %d, finish: %d\n", ec->start, ec->finish); @@ -202,6 +202,7 @@ static inline echo_can_state_t *echo_can_create(int taps, int adaption_mode) taps = NTAPS; ec = MALLOC(sizeof(echo_can_state_t)); if (ec) { + printk("Allocating MEC3 canceller\n"); memset(ec, 0, sizeof(ec)); ec->taps = taps; ec->pos = ec->taps-1; @@ -65,7 +65,7 @@ /* Get helper arithmetic */ #include "arith.h" -#ifdef CONFIG_ZAPTEL_MMX +#if defined(CONFIG_ZAPTEL_MMX) || defined(ECHO_CAN_MARK3) #include <asm/i387.h> #endif @@ -236,7 +236,7 @@ of the next sample chunk's data (next time around the world). #include "digits.h" -#ifdef CONFIG_ZAPTEL_MMX +#if defined(CONFIG_ZAPTEL_MMX) || defined(ECHO_CAN_MARK3) /* XXX kernel_fpu_begin() is NOT exported properly, so we have to make a local version. Somebody fix this! XXX */ @@ -4605,7 +4605,7 @@ void zt_ec_chunk(struct zt_chan *ss, unsigned char *rxchunk, const unsigned char spin_lock_irqsave(&ss->lock, flags); /* Perform echo cancellation on a chunk if necessary */ if (ss->ec) { -#ifdef CONFIG_ZAPTEL_MMX +#if defined(CONFIG_ZAPTEL_MMX) || defined(ECHO_CAN_MARK3) zt_kernel_fpu_begin(); #endif for (x=0;x<ZT_CHUNKSIZE;x++) { @@ -4613,7 +4613,7 @@ void zt_ec_chunk(struct zt_chan *ss, unsigned char *rxchunk, const unsigned char rxlin = echo_can_update(ss->ec, ZT_XLAW(txchunk[x], ss), rxlin); rxchunk[x] = ZT_LIN2X((int)rxlin, ss); } -#ifdef CONFIG_ZAPTEL_MMX +#if defined(CONFIG_ZAPTEL_MMX) || defined(ECHO_CAN_MARK3) kernel_fpu_end(); #endif } |