On Sun, 26 Apr 2009, Jon Smirl wrote:
Here's the code computing the mpc5200 dma pointer. Could you please take a look at it and let me know what it is doing wrong.
I think that the culprit of your problems is that your code expects that buffer_size / period_size is an integer value (whole period is placed inside ring buffer). But if you do not instruct the high level code of ALSA in open() callback by calling snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS) to do so - see other drivers - then period might be also placed across the buffer_size boundary - which appearently makes your current problems.
I think that bcom_submit_next_buffer() expects continuous memory (thus whole period), right?
Jaroslav
----- Jaroslav Kysela perex@perex.cz Linux Kernel Sound Maintainer ALSA Project, Red Hat, Inc.