[pulseaudio-discuss] [PATCH] device-manager: Don't try to use unlinked devices

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Sun Jan 26 11:26:06 PST 2014


On Sun, 2014-01-26 at 20:30 +0200, Tanu Kaskinen wrote:
> This fixes an assertion crash:
> 
> [pulseaudio] source.c: Assertion 'PA_SOURCE_IS_LINKED(s->state)' failed at pulsecore/source.c:734, function pa_source_update_status(). Aborting.
> 
> The crash happened when a Bluetooth headset profile was changed from
> a2dp to hsp. During the profile change three devices are created:
> a sink, a monitor source for the sink, and a regular source. First
> pa_sink/source_new() are called for each device, and that puts the
> devices to u->core->sinks/sources. Then, pa_sink_put() is called for
> the sink, and that in turn calls pa_source_put() for the source. At
> that point module-device-manager decides to reroute all source
> outputs. The non-monitor source that the Bluetooth card created hasn't
> been linked yet at this stage, because it will only be linked after
> the sink and the monitor source have been linked. So,
> module-device-manager should take into account during the rerouting
> that not all sinks and sources are necessarily linked. This patch does
> that.
> 
> Reported-By: Iskren Hadzhinedev <i.hadzhinedev at gmail.com>
> ---
> NOTE: I have not yet tested that this patch actually works.

I have now tested the patch, it works, and I considered it obvious
enough that I pushed it without review.

-- 
Tanu



More information about the pulseaudio-discuss mailing list