[Sound-open-firmware] [PATCH 08/25] host: add host_update_buffer for produce and consume

Liam Girdwood liam.r.girdwood at linux.intel.com
Wed Feb 8 13:02:20 CET 2017


On Tue, 2017-02-07 at 22:02 +0800, Keyon Jie wrote:
> To implement host side buffer R/W pointer check, we need add
> buffer update procedures at first, here we introduce host_avail
> and host_free to indicate the buffer usuage status.
> 
> Signed-off-by: Keyon Jie <yang.jie at linux.intel.com>
> ---
>  src/audio/host.c | 29 +++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
> 
> diff --git a/src/audio/host.c b/src/audio/host.c
> index 48efa4f..d6209c5 100644
> --- a/src/audio/host.c
> +++ b/src/audio/host.c
> @@ -73,6 +73,9 @@ struct host_data {
>  	uint32_t host_pos_blks;		/* position in bytes (nearest block) */
>  	uint32_t host_period_bytes;	/* host period size in bytes */
>  	uint32_t host_period_pos;	/* position in current host perid */
> +	volatile uint32_t *host_app_pos;        /* host buffer app write pos, points to mailbox */
> +	volatile uint32_t host_avail;   /* host buffer available size */
> +	volatile uint32_t host_free;    /* host buffer free size */

Volatile only needed for members read back directly by host (with
different physical caches).

Liam



More information about the Sound-open-firmware mailing list