On Fri, 2017-08-25 at 19:42 +0300, Seppo Ingalsuo wrote:
The pointers advance is done in EQ func so the 2nd argument needs to be 0 to just update free/avail.
Signed-off-by: Seppo Ingalsuo seppo.ingalsuo@linux.intel.com
src/audio/eq_fir.c | 4 ++-- src/audio/eq_iir.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/audio/eq_fir.c b/src/audio/eq_fir.c index 534a4a1..80f727e 100644 --- a/src/audio/eq_fir.c +++ b/src/audio/eq_fir.c @@ -421,8 +421,8 @@ static int eq_fir_copy(struct comp_dev *dev) sd->eq_fir_func(dev, source, sink, dev->frames);
/* calc new free and available */
- comp_update_buffer_consume(source, copy_bytes);
- comp_update_buffer_produce(sink, copy_bytes);
comp_update_buffer_consume(source, 0);
comp_update_buffer_produce(sink, 0);
return dev->frames;
} diff --git a/src/audio/eq_iir.c b/src/audio/eq_iir.c index 0ac2ef9..971665e 100644 --- a/src/audio/eq_iir.c +++ b/src/audio/eq_iir.c @@ -431,8 +431,8 @@ static int eq_iir_copy(struct comp_dev *dev) cd->eq_iir_func(dev, source, sink, dev->frames);
/* calc new free and available */
- comp_update_buffer_consume(source, copy_bytes);
- comp_update_buffer_produce(sink, copy_bytes);
comp_update_buffer_consume(source, 0);
comp_update_buffer_produce(sink, 0);
return dev->frames;
}
I think it would be best if we added a new API call here :-
comp_update_buffer_consume_ptr(source, new_ptr);
and similar for produce. These would be similar to the existing funcs with the exception of checking for wrap (comp has to do this). But they would report boundary errors and calc free/avail etc.
Liam