[pulseaudio-discuss] [PATCH v0] bluetooth: Fix unacquired transports during sink resume

Tanu Kaskinen tanuk at iki.fi
Wed Nov 28 19:55:27 PST 2012


On Wed, 2012-11-28 at 19:20 +0100, Mikel Astiz wrote:
> From: Mikel Astiz <mikel.astiz at bmw-carit.de>
> 
> The sink can be resumed while the source is still in PA_SOURCE_INIT.
> This is the case if a module such as module-stream-restore routes the
> audio to the sink during pa_sink_put(), leading to an inconsistent
> state: the sink stays RUNNING but the transport is not actually
> acquired.

Ack from me. I think Arun wants to check this too, so not pushing yet,
but to me the patch makes perfect sense.

Slightly related comment, maybe this

    if (u->sink->thread_info.state != PA_SINK_SUSPENDED)
        break;

just before the changed part should be changed to

    if (PA_SINK_IS_OPENED(u->sink->thread_info.state))
        break;

so that INIT->IDLE transitions will work too, if we decide some day that
it's not a good idea to start the devices suspended. (I think it makes
sense to start them suspended, but relying on module-suspend-on-idle for
unsuspending is not good.)

-- 
Tanu



More information about the pulseaudio-discuss mailing list