/* read/write the ring buffer pointers. These routines' arguments and results are byte offsets from the beginning of the ring buffer.  */
static __inline__ int li_read_swptr(dma_chan_t *chan)
/* read/write the ring buffer pointers. These routines' arguments and results are byte offsets from the beginning of the ring buffer.  */
static __inline__ int li_read_swptr(dma_chan_t *chan)
{
	const unsigned long mask = chan->desc->swptrmask;
	return CHUNKS_TO_BYTES(UNSHIFT_FIELD(chan->ctlval, mask));
}