[pulseaudio-tickets] [Bug 87713] "Transistor" game makes every client playing at double speed

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Dec 29 19:03:08 PST 2014


https://bugs.freedesktop.org/show_bug.cgi?id=87713

--- Comment #5 from Raymond <superquad.vortex2 at gmail.com> ---
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 ?


http://cgit.freedesktop.org/pulseaudio/pulseaudio/plain/src/tests/alsa-time-test.c

try different fill rate 

do the sound card report hw_ptr better than period size ?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-bugs/attachments/20141230/3252fe63/attachment-0001.html>


More information about the pulseaudio-bugs mailing list