[Sound-open-firmware] [PATCH 1/5] Audio/buffer: Set alloc_size

Liam Girdwood liam.r.girdwood at intel.com
Thu Jun 29 12:58:03 CEST 2017


On Wed, 2017-06-28 at 19:25 +0300, Seppo Ingalsuo wrote:
> The buffer->alloc_size was not set. It needs to be equal to
> buffer->end_addr minus buffer->addr for circular buffers.
> 
> Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo at linux.intel.com>
> ---
>  src/audio/buffer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/audio/buffer.c b/src/audio/buffer.c
> index 5bd3b30..39289f6 100644
> --- a/src/audio/buffer.c
> +++ b/src/audio/buffer.c
> @@ -77,7 +77,7 @@ struct comp_buffer *buffer_new(struct sof_ipc_buffer *desc)
>  	memcpy(&buffer->ipc_buffer, desc, sizeof(*desc));
>  
>  	//buffer->size =
> -	//buffer->alloc_size =
> +	buffer->alloc_size = desc->size;
>  	buffer->ipc_buffer = *desc;
>  	buffer->w_ptr = buffer->r_ptr = buffer->addr;
>  	buffer->end_addr = buffer->addr + buffer->ipc_buffer.size;

Thanks, I need to come back and complete the allocator update for this
later.

All applied.

Liam

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


More information about the Sound-open-firmware mailing list