Update of /cvsroot/alsa/alsa-kernel/core
In directory sc8-pr-cvs1:/tmp/cvs-serv4570

Modified Files:
        pcm_lib.c 
Log Message:
- don't print debug messages for low count of periods
- added right path for one period to the update pointer routine (interrupt) 


Index: pcm_lib.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/pcm_lib.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- pcm_lib.c   6 Oct 2003 12:19:10 -0000       1.45
+++ pcm_lib.c   22 Oct 2003 09:32:20 -0000      1.46
@@ -173,15 +173,21 @@
        snd_pcm_sframes_t delta;
 
        pos = snd_pcm_update_hw_ptr_pos(substream, runtime);
+       if (runtime->period_size == runtime->buffer_size)
+               goto __next_buf;
        new_hw_ptr = runtime->hw_ptr_base + pos;
        hw_ptr_interrupt = runtime->hw_ptr_interrupt + runtime->period_size;
 
        delta = hw_ptr_interrupt - new_hw_ptr;
        if (delta > 0) {
                if ((snd_pcm_uframes_t)delta < runtime->buffer_size / 2) {
-                       snd_printd(KERN_ERR "Unexpected hw_pointer value (stream = %i, 
delta: -%ld, max jitter = %ld): wrong interrupt acknowledge?\n", substream->stream, 
(long) delta, runtime->buffer_size / 2);
+#ifdef CONFIG_SND_DEBUG
+                       if (runtime->periods > 1)
+                               snd_printd(KERN_ERR "Unexpected hw_pointer value [1] 
(stream = %i, delta: -%ld, max jitter = %ld): wrong interrupt acknowledge?\n", 
substream->stream, (long) delta, runtime->buffer_size / 2);
+#endif
                        return 0;
                }
+             __next_buf:
                runtime->hw_ptr_base += runtime->buffer_size;
                if (runtime->hw_ptr_base == runtime->boundary)
                        runtime->hw_ptr_base = 0;
@@ -213,7 +219,10 @@
        delta = old_hw_ptr - new_hw_ptr;
        if (delta > 0) {
                if ((snd_pcm_uframes_t)delta < runtime->buffer_size / 2) {
-                       snd_printd(KERN_ERR "Unexpected hw_pointer value (stream = %i, 
delta: -%ld, max jitter = %ld): wrong interrupt acknowledge?\n", substream->stream, 
(long) delta, runtime->buffer_size / 2);
+#ifdef CONFIG_SND_DEBUG
+                       if (runtime->periods > 2)
+                               snd_printd(KERN_ERR "Unexpected hw_pointer value [2] 
(stream = %i, delta: -%ld, max jitter = %ld): wrong interrupt acknowledge?\n", 
substream->stream, (long) delta, runtime->buffer_size / 2);
+#endif
                        return 0;
                }
                runtime->hw_ptr_base += runtime->buffer_size;



-------------------------------------------------------
This SF.net email is sponsored by OSDN developer relations
Here's your chance to show off your extensive product knowledge
We want to know what you know. Tell us and you have a chance to win $100
http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to