au88x0 hardware seems returning the current pointer at the buffer
boundary instead of going back to zero. This results in spewing
warnings from PCM core.
This patch corrects the return value from the pointer callback within
the proper value range, just returning zero if the position is equal
or above the buffer size.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
#endif
//printk(KERN_INFO "vortex: pointer = 0x%x\n", current_ptr);
spin_unlock(&chip->lock);
- return (bytes_to_frames(substream->runtime, current_ptr));
+ current_ptr = bytes_to_frames(substream->runtime, current_ptr);
+ if (current_ptr >= substream->runtime->buffer_size)
+ current_ptr = 0;
+ return current_ptr;
}
/* operators */