<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - "Transistor" game makes every client playing at double speed"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=87713#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - "Transistor" game makes every client playing at double speed"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=87713">bug 87713</a>
              from <span class="vcard"><a class="email" href="mailto:superquad.vortex2@gmail.com" title="Raymond <superquad.vortex2@gmail.com>"> <span class="fn">Raymond</span></a>
</span></b>
        <pre>static snd_pcm_uframes_t
snd_ca0106_pcm_pointer_playback(struct snd_pcm_substream *substream)
{
    struct snd_ca0106 *emu = snd_pcm_substream_chip(substream);
    struct snd_pcm_runtime *runtime = substream->runtime;
    struct snd_ca0106_pcm *epcm = runtime->private_data;
    unsigned int ptr, prev_ptr;
    int channel = epcm->channel_id;
    int timeout = 10;

    if (!epcm->running)
        return 0;

    prev_ptr = -1;
    do {
        ptr = snd_ca0106_ptr_read(emu, PLAYBACK_LIST_PTR, channel);
        ptr = (ptr >> 3) * runtime->period_size;
        ptr += bytes_to_frames(runtime,
            snd_ca0106_ptr_read(emu, PLAYBACK_POINTER, channel));
        if (ptr >= runtime->buffer_size)
            ptr -= runtime->buffer_size;
        if (prev_ptr == ptr)
            return ptr;
        prev_ptr = ptr;
    } while (--timeout);
    dev_warn(emu->card->dev, "ca0106: unstable DMA pointer!\n");
    return 0;
}

pointer callback return value from hardware register, 

do the sound card report realtime accurate update poistion ?


<a href="http://cgit.freedesktop.org/pulseaudio/pulseaudio/plain/src/tests/alsa-time-test.c">http://cgit.freedesktop.org/pulseaudio/pulseaudio/plain/src/tests/alsa-time-test.c</a>

try different fill rate 

do the sound card report hw_ptr better than period size ?</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>