/* increment ring buffer pointer. NOTE: caller must hold write spinlock  */
static void snd_ps3_bump_buffer(struct snd_ps3_card_info *card, enum snd_ps3_ch ch, size_t byte_count, int stage)
/* increment ring buffer pointer. NOTE: caller must hold write spinlock  */
static void snd_ps3_bump_buffer(struct snd_ps3_card_info *card, enum snd_ps3_ch ch, size_t byte_count, int stage)
{
	if (!stage)
		card->dma_last_transfer_vaddr[ch] =
			card->dma_next_transfer_vaddr[ch];
	card->dma_next_transfer_vaddr[ch] += byte_count;
	if ((card->dma_start_vaddr[ch] + (card->dma_buffer_size / 2)) <=
	    card->dma_next_transfer_vaddr[ch]) {
		card->dma_next_transfer_vaddr[ch] = card->dma_start_vaddr[ch];
	}
}