Skip to contentSkip to conversation

Unexpected hw_pointer value (pcm_lib.c)

DISCUSSION Manuel Jander 1 participant 1 message Oct 12, 2003

lore
Share & tools
lore
#0 lore raw

Hello,

Can anyone tell me how does pcm_lib.c cope with buffer wrap around ? I'm missing something like:

delta = pointer_current - pointer_prev;
if (delta < 0)
delta += period_size;

Well, indeed i'm getting some warnings then and when, after i enabled the ALSA debug option:

ALSA sound/core/pcm_lib.c:216: Unexpected hw_pointer value (stream = 0,
delta: -586, max jitter = 8192): wrong interrupt acknowledge?

Delta has a negative value, thus the if statement :

if ((snd_pcm_uframes_t)delta < runtime->buffer_size / 2) {
snd_printd("Unexpected hw_pointer value (stream = %i, d return 0;
}

... is always true. Well, as the code looks like, the situation when the period pointer wraps around back to cero isn't handled correctly. Or is that handled by other means ? Maybe i just oversaw something. Can anyone give me more insight over this ? Thanks...

Best Regards

Manuel Jander.

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php