[Sound-open-firmware] [PATCH 07/10] buffer: corrected check in comp_buffer_get_copy_bytes Signed-off-by: Slawomir Blauciak <slawomir.blauciak at linux.intel.com>
Liam Girdwood
liam.r.girdwood at linux.intel.com
Thu Jun 21 12:12:05 CEST 2018
From: Slawomir Blauciak <slawomir.blauciak at linux.intel.com>
---
src/include/sof/audio/buffer.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/include/sof/audio/buffer.h b/src/include/sof/audio/buffer.h
index 9193a78..a8b98b6 100644
--- a/src/include/sof/audio/buffer.h
+++ b/src/include/sof/audio/buffer.h
@@ -164,7 +164,7 @@ static inline int comp_buffer_can_copy_bytes(struct comp_buffer *source,
static inline uint32_t comp_buffer_get_copy_bytes(struct comp_buffer *source,
struct comp_buffer *sink)
{
- if (source->avail < sink->free)
+ if (source->avail > sink->free)
return sink->free;
else
return source->avail;
--
2.17.0
More information about the Sound-open-firmware
mailing list