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

             Bug #: 54007
           Summary: The alsa sink does larger rewind than needed when the
                    configured sink latency changes
    Classification: Unclassified
           Product: PulseAudio
           Version: unspecified
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: medium
         Component: alsa
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
                CC: [email protected]


If a sink supports dynamic latency and the latency is adjusted downwards, there
needs to be a rewind to ensure that the sink buffer doesn't contain more data
than what is allowed by the new latency. This is because rewind requests can't
be larger than the configured latency, and if there's more data than that in
the buffer, a later rewind request may end up being too small.

The alsa sink requests the rewind in sink_update_requested_latency_cb():

    if (u->hwbuf_unused > before) {
        pa_log_debug("Requesting rewind due to latency change.");
        pa_sink_request_rewind(s, (size_t) -1);
    }

Doing a full rewind (-1 as the rewind amount) is not necessary, as far as I can
see. It would be sufficient to rewind only by the difference between the old
and new latency.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are the assignee for the bug.
_______________________________________________
pulseaudio-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-bugs

Reply via email to