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>
This commit is contained in:
parent
99dc2a7f12
commit
0f51010e87
1 changed files with 1 additions and 1 deletions
|
@ -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] *
|
old = (int)ec->fir_state.history[ec->fir_state.curr_pos] *
|
||||||
(int)ec->fir_state.history[ec->fir_state.curr_pos];
|
(int)ec->fir_state.history[ec->fir_state.curr_pos];
|
||||||
ec->Pstates +=
|
ec->Pstates +=
|
||||||
((new - old) + (1 << ec->log2taps)) >> ec->log2taps;
|
((new - old) + (1 << (ec->log2taps-1))) >> ec->log2taps;
|
||||||
if (ec->Pstates < 0)
|
if (ec->Pstates < 0)
|
||||||
ec->Pstates = 0;
|
ec->Pstates = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue