diff options
author | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2002-06-19 18:53:18 +0000 |
---|---|---|
committer | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2002-06-19 18:53:18 +0000 |
commit | 85d82e003f9dd3cfbc8733a537746750dbd0e5e0 (patch) | |
tree | 8a8aa2ffbf957fd4a2b6a170c4bab456b0c586d6 /torisa.c | |
parent | c63dd8597671fa41afb9fe9a1909ace27c6c447c (diff) |
Version 0.2.0 from FTP
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@85 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'torisa.c')
-rwxr-xr-x | torisa.c | 19 |
1 files changed, 14 insertions, 5 deletions
@@ -302,7 +302,7 @@ static void make_chans(void) c = x * channels_per_span + y; sprintf(chans[c].name, "TorISA/%d/%d", x + 1, y + 1); chans[c].sigcap = ZT_SIG_EM | ZT_SIG_CLEAR | ZT_SIG_FXSLS | ZT_SIG_FXSGS | ZT_SIG_FXSKS | - ZT_SIG_FXOLS | ZT_SIG_FXOGS | ZT_SIG_FXOKS; + ZT_SIG_FXOLS | ZT_SIG_FXOGS | ZT_SIG_FXOKS | ZT_SIG_CAS; chans[c].pvt = &pvts[c]; pvts[c].span = x; chans[c].chanpos = y + 1; @@ -669,16 +669,25 @@ static struct tasklet_struct torisa_tlet; static void torisa_tasklet(unsigned long data) { - + int x; + taskletrun++; if (taskletpending) { taskletexec++; /* Perform receive data calculations. Reverse to run most likely master last */ - if (spans[1].flags & ZT_FLAG_RUNNING) + if (spans[1].flags & ZT_FLAG_RUNNING) { + /* Perform echo cancellation */ + for (x=0;x<channels_per_span;x++) + zt_ec_chunk(&spans[1].chans[x], spans[1].chans[x].readchunk, writedata[1-curread][x + channels_per_span]); zt_receive(&spans[1]); - if (spans[0].flags & ZT_FLAG_RUNNING) + } + if (spans[0].flags & ZT_FLAG_RUNNING) { + /* Perform echo cancellation */ + for (x=0;x<channels_per_span;x++) + zt_ec_chunk(&spans[0].chans[x], spans[0].chans[x].readchunk, writedata[1-curread][x]); zt_receive(&spans[0]); + } /* Prepare next set for transmission */ if (spans[1].flags & ZT_FLAG_RUNNING) @@ -751,7 +760,7 @@ static void torisa_intr(int irq, void *dev_id, struct pt_regs *regs) if (!taskletpending) { taskletpending = 1; taskletsched++; - tasklet_hi_schedule(&torisa_tlet); + tasklet_hi_schedule(&torisa_tlet); } else { txerrors++; } |