summaryrefslogtreecommitdiff
path: root/drivers/dahdi/hpec
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2009-02-02 14:13:50 +0000
committerKevin P. Fleming <kpfleming@digium.com>2009-02-02 14:13:50 +0000
commitced6afdc06c719baed23fd147fb7107f30e91072 (patch)
treeb612924a161a2cdd2f80e24763c1fc19e7b5b0cb /drivers/dahdi/hpec
parentd7d0978d7ce471f6544bb4ed8eedca1ba54ce368 (diff)
Array-style echo canceller updates first appeared in Zaptel, because HPEC only supports that mode. However, when the function for doing array-style updates was written, the argument names were reversed. In Zaptel this did no harm, because HPEC was the only module that used array-style updates.
When DAHDI was created, non-array-style updates were removed, and the existing modules were converted to using array-style updates. Unfortunately the new code was written based on the argument names, which were incorrect. This caused all the echo cancellers to be broken (except HPEC, although we did not know that at the time), and it was corrected by reversing the order of the arguments passed when the array-style update function was called (leading to a confusing mismatch). This fixed all the non-HPEC modules, but left HPEC broken, which was just discovered. This commit corrects all these problems, so that the argument names and the data passed actually make sense, and all the modules work properly. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5936 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/hpec')
-rw-r--r--drivers/dahdi/hpec/dahdi_echocan_hpec.c4
-rw-r--r--drivers/dahdi/hpec/hpec.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/dahdi/hpec/dahdi_echocan_hpec.c b/drivers/dahdi/hpec/dahdi_echocan_hpec.c
index eb0689d..ceccf4e 100644
--- a/drivers/dahdi/hpec/dahdi_echocan_hpec.c
+++ b/drivers/dahdi/hpec/dahdi_echocan_hpec.c
@@ -72,9 +72,9 @@ static void echo_can_free(struct echo_can_state *ec)
hpec_channel_free(ec);
}
-static void echo_can_array_update(struct echo_can_state *ec, short *iref, short *isig)
+static void echo_can_array_update(struct echo_can_state *ec, short *isig, short *iref)
{
- hpec_channel_update(ec, iref, isig);
+ hpec_channel_update(ec, isig, iref);
}
DECLARE_MUTEX(alloc_lock);
diff --git a/drivers/dahdi/hpec/hpec.h b/drivers/dahdi/hpec/hpec.h
index ac0a260..832775e 100644
--- a/drivers/dahdi/hpec/hpec.h
+++ b/drivers/dahdi/hpec/hpec.h
@@ -40,7 +40,7 @@ struct echo_can_state __attribute__((regparm(0))) *hpec_channel_alloc(unsigned i
void __attribute__((regparm(0))) hpec_channel_free(struct echo_can_state *channel);
-void __attribute__((regparm(0))) hpec_channel_update(struct echo_can_state *channel, short *iref, short *isig);
+void __attribute__((regparm(0))) hpec_channel_update(struct echo_can_state *channel, short *isig, short *iref);
#endif /* !defined(_HPEC_H) */