From 0f51010e87636ed93338f4d9a987a466ca0d6969 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Wed, 20 May 2009 11:18:27 +0930 Subject: [PATCH] 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/echo/echo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) 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; } -- 2.20.1