[pulseaudio-discuss] [PATCH 2/8] source: Fix monitor source rate changing

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Mon Aug 12 04:34:41 PDT 2013


On Mon, 2013-08-12 at 13:28 +0200, David Henningsson wrote:
> On 08/12/2013 12:18 PM, Tanu Kaskinen wrote:
> > On Mon, 2013-08-12 at 09:15 +0200, David Henningsson wrote:
> >> On 08/09/2013 08:57 AM, Tanu Kaskinen wrote:
> >>> Monitor sources don't have the update_rate() callback set, so their rate was
> >>> not being changed when changing the sink rate.
> >>
> >> For better understanding (I was a little confused first), one could add
> >> a sentence to the commit comment saying e g "This patch fixes this by
> >> changing the rate correctly, even if the update_rate callback is not set".
> > 
> > Ok.
> > 
> >> Can this also happen to sinks, that there might be types of sinks that
> >> do not have update_rate set, and might fall into the same bug?
> > 
> > I don't think there are such sinks. Monitor sources are special, because
> > they are automatically created by the core. All other sources and sinks
> > are supposed to set update_rate() if they support rate switching.
> > 
> 
> So, with this patch, it looks like sources not supporting rate
> switching, will not set update_rate initially, and then crash in
> assert(monitor_of) ?

There's

-    if (!s->update_rate)
+    if (!s->update_rate && !s->monitor_of)
         return false;

in the beginning of the patch.

-- 
Tanu



More information about the pulseaudio-discuss mailing list