[pulseaudio-discuss] [PATCH v0] loopback: Fix cork state not updated after move

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Mon Jul 8 07:54:49 PDT 2013


On Mon, 2013-07-08 at 16:25 +0200, Mikel Astiz wrote:
> Hi Tanu,
> 
> On Mon, Jul 8, 2013 at 3:06 PM, Tanu Kaskinen
> <tanu.kaskinen at linux.intel.com> wrote:
> > On Mon, 2013-07-01 at 10:27 +0200, Mikel Astiz wrote:
> >> From: Mikel Astiz <mikel.astiz at bmw-carit.de>
> >>
> >> The source output and sink inputs should be corked if the corresponding
> >> sink/source is suspended, as handled during module initialization. This
> >> also needs to be handled during stream move, because the suspend state
> >> of the destination sink/source might be different to the previous one.
> >>
> >> This fixes the issue with an infinite number of "Requesting rewind due
> >> to end of underrun" traces after a stream move.
> >
> > module-loopback should certainly update the stream cork states when the
> > streams are moved, but this patch looks like it will cause crashing. Did
> > you test the patch? The moving() callback is called when i->sink is
> > NULL, and pa_sink_input_cork() looks like it will crash in that
> > situation.
> 
> I did test the patch and didn't reproduce the issue you describe,
> neither did Georg, as it seems ([1]). Can you explain how this can be
> reproduced?

I reproduced it inside my head only, using some imagination and flawed
logic.

> You mention i->sink is NULL but how could that be the case during
> *source*-output-moving?

A very good point. I was thinking that pa_sink_input_cork() was called
when the sink input was being moved, which of course is not what the
code does.

Sorry for the nonsense, I have now applied the patch.

-- 
Tanu



More information about the pulseaudio-discuss mailing list