[pulseaudio-discuss] bluetooth headset disconection

Shinnosuke Suzuki suzukisn at gmail.com
Tue Nov 21 06:55:58 UTC 2017


Hi,

Once the bluetooth headset was reconneted to pulseaudio, this issue has
occurred.
So, is there a way to prevent the Bluetooth module (module-bluez5-*) from
being deleted when the Bluetooth headset is disconnected?
Or Do I need to modify code?

Best Regards,
Shinnosuke Suzuki
2017-11-13 18:01 GMT+09:00 Shinnosuke Suzuki <suzukisn at gmail.com>:

> As I posted before, Pulseaudio is stuck following point, So I put the
> additional log on to it.
> D: [pulseaudio] module-bluez5-discover.c: Loading module-bluez5-device
> path=/org/bluez/hci0/dev_00_14_BE_8A_7B_FE
>
> module-bluez5-discover.c :
> static pa_hook_result_t device_connection_changed_cb(pa_bluetooth_discovery
> *y, const pa_bluetooth_device *d, struct userdata *u) {
> ...
>  pa_log_debug("Loading module-bluez5-device %s", args);
>  m = pa_module_load(u->module->core, "module-bluez5-device", args);
>  pa_log_debug("Loading module-bluez5-device end"); <- I added this, but
> didn't displayed.
>  pa_xfree(args);
> ...
>
> It didn't return from pa_module_load() in device_connection_changed_cb().So
> I searched in pa_module_load().
>
> module.c :
> pa_module* pa_module_load(pa_core *c, const char *name, const char
> *argument) {
> ...
>     if (!(m->dl = lt_dlopenext(name))) {
>         /* We used to print the error that is returned by lt_dlerror(), but
>          * lt_dlerror() is useless. It returns pretty much always "file not
>          * found". That's because if there are any problems with loading
> the
>          * module with normal loaders, libltdl falls back to the "preload"
>          * loader, which never finds anything, and therefore says "file not
>          * found". */
>         pa_log("Failed to open module \"%s\".", name);
>         goto fail;
>     }
> ...
>
> It didn't return from lt_dlopenext. I think pulseaudio get infinity loop
> in lt_dlopenext().
> So I searched in pulseaudio-disscuss list again, I found the following
> post:
> [pulseaudio-discuss] Arduino Tian issue changing card profile to A2DP with
> bluetooth headset
>
> This post seems to be similar to my situation.
> However, this post remain open issue.
>
> I added boot parameter --disallow-module-loading as a trial. However, When
> I connect the bluetooth headset, I got error:
> W: [pulseaudio] module-bluez5-discover.c: Failed to load module for device
> /org/bluez/hci0/dev_00_14_BE_8A_7B_FE
>
> Any suggestions?
>
> Best Regards,
> Shinnosuke Suzki
> 2017-10-30 20:23 GMT+09:00 Tanu Kaskinen <tanuk at iki.fi>:
>
>> On Sat, 2017-10-28 at 14:30 +0900, Shinnosuke Suzuki wrote:
>> > > Your attached log ends at this message:
>> > >
>> > >    D: [pulseaudio] module-always-sink.c: Autoloading null-sink as no
>> other sinks detected.
>> > >
>> > > Is that the last message that you see, and after that PulseAudio is
>> > > stuck? If so, then it should be possible to find the infinite loop by
>> > > adding extra logging to the code that follows that message. Or if you
>> > > know how to use some profiling tool, that should do the trick as well.
>> >
>> >
>> > I there any logging option to the pulseaudio?
>> > I know only the way to get logging info by adding boot argument -vvvv.
>> > Should I have to add a extra logging code to the pulseaudio?
>> > Or Should I use a debug tool like gdb to find a stuck point?
>>
>> Using gdb is a good idea, it will probably be effective at finding the
>> looping part of the code.
>>
>> Regarding logging, I meant adding new log statements to the pulseaudio
>> code. With -vvvv the log verbosity is already at the maximum, so the
>> current logging isn't sufficient to find the looping code.
>>
>> --
>> Tanu
>>
>> https://www.patreon.com/tanuk
>>
>
>
>
> --
> --
> Shinnosuke Suzuki
> E-mail : suzukisn at gmail.com
>



-- 
--
Shinnosuke Suzuki
E-mail : suzukisn at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20171121/2982eda5/attachment.html>


More information about the pulseaudio-discuss mailing list