kpb: change kpb buffer if at the end od draining r_ptr == buff->end_addr

This patch takes care of changing kpb buffer if last
drained size made read pointer equal to buffer
end address. This is important since in slow draining
cases we might need to update history size by real
time stream and therefore continue draining.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
This commit is contained in:
Marcin Rajwa 2019-07-29 23:00:55 +02:00 committed by Janusz Jankowski
parent 67225ccfdb
commit 68c2cf87e2
1 changed files with 1 additions and 1 deletions

View File

@ -1004,7 +1004,7 @@ static uint64_t kpb_draining_task(void *arg)
else
size_to_copy = sink->free;
} else {
if (size_to_read >= history_depth) {
if (size_to_read > history_depth) {
size_to_copy = history_depth;
} else {
size_to_copy = size_to_read;