/* As each period is completed, this function changes the the link descriptor pointers for that period to point to the next period.  */
static void fsl_dma_update_pointers(struct fsl_dma_private *dma_private)
/* As each period is completed, this function changes the the link descriptor pointers for that period to point to the next period.  */
static void fsl_dma_update_pointers(struct fsl_dma_private *dma_private)
{
	struct fsl_dma_link_descriptor *link =
		&dma_private->link[dma_private->current_link];
	if (dma_private->substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
		link->source_addr =
			cpu_to_be32(dma_private->dma_buf_next);
	else
		link->dest_addr =
			cpu_to_be32(dma_private->dma_buf_next);
	dma_private->dma_buf_next += dma_private->period_size;
	if (dma_private->dma_buf_next >= dma_private->dma_buf_end)
		dma_private->dma_buf_next = dma_private->dma_buf_phys;
	if (++dma_private->current_link >= NUM_DMA_LINKS)
		dma_private->current_link = 0;
}