
we can normally use offsets to work and do all the calculation in the core. But this check fails when app_ptr = hw_ptr. Here we dont know if the buffer is full or empty :) So we need to look at cummulative values for those checks, hence the core maintains both of these and IIRC looks at cummulative values when calucating avail only when we hit the above condition or probably in case when we wrap over the ring buffer.
In both memory mapped and non mapped these cases are true so I dont see why this caluclation is specfic for memory maped DSPs. There is nothing in this case which relies. We only use the values reported by DSP and internal counters...
the question was whether we need these offsets at all. Can't we just use cumulative values everywhere? -Pierre