summaryrefslogtreecommitdiff
path: root/torisa.c
diff options
context:
space:
mode:
Diffstat (limited to 'torisa.c')
-rwxr-xr-xtorisa.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/torisa.c b/torisa.c
index 53b529e..19a81a3 100755
--- a/torisa.c
+++ b/torisa.c
@@ -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++;
}