aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Rowe <david@rowetel.com>2009-05-19 21:48:27 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-06-19 14:00:54 -0400
commit0f51010e87636ed93338f4d9a987a466ca0d6969 (patch)
treefd297606527650a736e1fe74a20f9b36d364a5a3
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>
-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 6d7217e1bd06..79d15c65bfe4 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)
395 old = (int)ec->fir_state.history[ec->fir_state.curr_pos] * 395 old = (int)ec->fir_state.history[ec->fir_state.curr_pos] *
396 (int)ec->fir_state.history[ec->fir_state.curr_pos]; 396 (int)ec->fir_state.history[ec->fir_state.curr_pos];
397 ec->Pstates += 397 ec->Pstates +=
398 ((new - old) + (1 << ec->log2taps)) >> ec->log2taps; 398 ((new - old) + (1 << (ec->log2taps-1))) >> ec->log2taps;
399 if (ec->Pstates < 0) 399 if (ec->Pstates < 0)
400 ec->Pstates = 0; 400 ec->Pstates = 0;
401 } 401 }