[Sound-open-firmware] [PATCH] pipeline: clear buffer content to 0s on new
We need clear/reset buffer content to 0s each time creating a pipeline buffer, to avoid random noise when using it.
Signed-off-by: Keyon Jie yang.jie@linux.intel.com --- src/audio/pipeline.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/src/audio/pipeline.c b/src/audio/pipeline.c index f42fa15..50ae768 100644 --- a/src/audio/pipeline.c +++ b/src/audio/pipeline.c @@ -250,6 +250,7 @@ struct comp_buffer *pipeline_buffer_new(struct pipeline *p, trace_pipe_error("ebm"); return NULL; } + bzero(buffer->addr, desc->size);
buffer->w_ptr = buffer->r_ptr = buffer->addr; buffer->end_addr = buffer->addr + desc->size;
On Tue, 2016-12-06 at 15:43 +0800, Keyon Jie wrote:
We need clear/reset buffer content to 0s each time creating a pipeline buffer, to avoid random noise when using it.
Signed-off-by: Keyon Jie yang.jie@linux.intel.com
src/audio/pipeline.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/src/audio/pipeline.c b/src/audio/pipeline.c index f42fa15..50ae768 100644 --- a/src/audio/pipeline.c +++ b/src/audio/pipeline.c @@ -250,6 +250,7 @@ struct comp_buffer *pipeline_buffer_new(struct pipeline *p, trace_pipe_error("ebm"); return NULL; }
bzero(buffer->addr, desc->size);
buffer->w_ptr = buffer->r_ptr = buffer->addr; buffer->end_addr = buffer->addr + desc->size;
Applied.
Thanks
Liam
participants (2)
-
Keyon Jie
-
Liam Girdwood