[pulseaudio-discuss] [PATCH v3 2/2] bluetooth: Do not unload module-bluetooth-device on ERR or HUP
Luiz Augusto von Dentz
luiz.dentz at gmail.com
Mon Aug 29 01:52:33 PDT 2011
Hi Frédéric,
2011/8/22 Frédéric Dalleau <frederic.dalleau at linux.intel.com>:
> This happens in the following scenario :
> An HandsfreeGateway connects RFCOMM and then SCO. A card appears in
> PA and can be used. If for some reason, SCO is disconnected,
> module-bluetooth-device is unloaded. The card will disappear, even
> if RFCOMM is still connected. After that, it is not possible to
> connect SCO again from PA.
> ---
> src/modules/bluetooth/module-bluetooth-device.c | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c
> index 1638a0e..d4a9cf3 100644
> --- a/src/modules/bluetooth/module-bluetooth-device.c
> +++ b/src/modules/bluetooth/module-bluetooth-device.c
> @@ -1721,7 +1721,6 @@ static void thread_func(void *userdata) {
> fail:
> /* If this was no regular exit from the loop we have to continue processing messages until we receive PA_MESSAGE_SHUTDOWN */
> pa_log_debug("IO thread failed");
> - pa_asyncmsgq_post(u->thread_mq.outq, PA_MSGOBJECT(u->core), PA_CORE_MESSAGE_UNLOAD_MODULE, u->module, 0, NULL, NULL);
> pa_asyncmsgq_wait_for(u->thread_mq.inq, PA_MESSAGE_SHUTDOWN);
>
> finish:
> --
> 1.7.1
IMO in such cases we should set the profile to "Off" to indicate the
profile is not working properly, then the ui can either retry or
switch to another profile e.g. A2DP.
--
Luiz Augusto von Dentz
More information about the pulseaudio-discuss
mailing list