-----Original Message----- From: Liam Girdwood [mailto:liam.r.girdwood@linux.intel.com] Sent: Wednesday, February 8, 2017 8:02 PM To: Keyon Jie yang.jie@linux.intel.com Cc: sound-open-firmware@alsa-project.org; Jie, Yang yang.jie@intel.com; Ingalsuo, Seppo seppo.ingalsuo@intel.com Subject: Re: [Sound-open-firmware] [PATCH 08/25] host: add host_update_buffer for produce and consume
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@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).
OK, let me remove volatile for host_avail and host_free.
Thanks, ~Keyon
Liam