aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/echo
diff options
context:
space:
mode:
authorDavid Rowe <david@rowetel.com>2009-05-20 11:18:27 +0930
committerGreg Kroah-Hartman <gregkh@suse.de>2009-06-19 11:00:54 -0700
commit0f51010e87636ed93338f4d9a987a466ca0d6969 (patch)
treefd297606527650a736e1fe74a20f9b36d364a5a3 /drivers/staging/echo
parent99dc2a7f1221cd0cc9d6e988d03755155fadae9d (diff)
Staging: oslec bug fix
I have just had a bug fix submitted for Oslec which I have applied to Oslec SVN. The bug can potentially stops the echo canceller adapting after a few seconds, although it hasn't caused many problems in practice. Signed-off-by: David Rowe <david@rowetel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/echo')
-rw-r--r--drivers/staging/echo/echo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/echo/echo.c b/drivers/staging/echo/echo.c
index 6d7217e1bd0..79d15c65bfe 100644
--- a/drivers/staging/echo/echo.c
+++ b/drivers/staging/echo/echo.c
@@ -395,7 +395,7 @@ int16_t oslec_update(struct oslec_state *ec, int16_t tx, int16_t rx)
old = (int)ec->fir_state.history[ec->fir_state.curr_pos] *
(int)ec->fir_state.history[ec->fir_state.curr_pos];
ec->Pstates +=
- ((new - old) + (1 << ec->log2taps)) >> ec->log2taps;
+ ((new - old) + (1 << (ec->log2taps-1))) >> ec->log2taps;
if (ec->Pstates < 0)
ec->Pstates = 0;
}