Bug 53066 - echo-cancel: sink_request_rewind_cb() forwards the rewind request without converting the rewind amount between sample specs
Summary: echo-cancel: sink_request_rewind_cb() forwards the rewind request without con...
Status: RESOLVED INVALID
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: modules (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-02 06:07 UTC by Tanu Kaskinen
Modified: 2012-08-30 04:59 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Tanu Kaskinen 2012-08-02 06:07:39 UTC
The code of sink_request_rewind_cb():

/* Called from sink I/O thread context */
static void sink_request_rewind_cb(pa_sink *s) {
    struct userdata *u;

    pa_sink_assert_ref(s);
    pa_assert_se(u = s->userdata);

    if (!PA_SINK_IS_LINKED(u->sink->thread_info.state) ||
        !PA_SINK_INPUT_IS_LINKED(u->sink_input->thread_info.state))
        return;

    pa_log_debug("Sink request rewind %lld", (long long) s->thread_info.rewind_nbytes);

    /* Just hand this one over to the master sink */
    pa_sink_input_request_rewind(u->sink_input,
                                 s->thread_info.rewind_nbytes, TRUE, FALSE, FALSE);
}

If it's possible that the master sink has a different sample spec than the echo cancel sink, then passing s->thread_info.rewind_nbytes is wrong if it's not first converting to the master sink sample spec.
Comment 1 Tanu Kaskinen 2012-08-30 04:59:16 UTC
Resolving as INVALID. The master sink sample spec doesn't matter here. The bytes given to pa_sink_input_request_rewind() are given using the sink input's sample spec, and the sink input's sample spec is the same as the echo-cancel sink's sample spec. The conversion to the master sink's sample spec is done inside pa_sink_input_request_rewind().


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.