On Sun, 2016-08-21 at 19:30 -0400, James Bottomley wrote:
> On Sun, 2016-08-21 at 15:19 +0300, Tanu Kaskinen wrote:
> > 
> > One thing that needs fixing is the profile waiting logic - we wait
> > until all supported profiles are connected (or until a timeout 
> > expires) before loading module-bluez5-device. Since we will now 
> > connect only HFP or HSP, it doesn't make sense to wait for both of 
> > them getting connected. The waiting logic is implemented in
> > pa_bluetooth_transport_set_state().
> 
> This actually seems to be broken today.  I unwound all my patches and I
> still see the debug message
> 
> Aug 21 19:23:28 jarvis pulseaudio[12479]: [pulseaudio] bluez5-util.c:
> Timeout expired, and device /org/bluez/hci0/dev_B8_AD_3E_8E_DE_EF still
> has disconnected profiles:
> 
> meaning the timer expired even though all profiles were connected.  I
> think the bug is that pa_bluetooth_transport_set_state() starts the
> timer when we go from 0->1 disconnected profiles, but after that, the
> test (old_any_connected !=
> pa_bluetooth_device_any_transport_connected(t->device) is always true
> and so the timer never gets stopped if we're waiting for more than one
> transport connection.

Oops! I added this code recently, but I couldn't test it properly,
because my headset most of the time connects only A2DP for some reason,
and on the one occasion when it did connect HSP, A2DP got connected
only much later.

> I think the fix is this.

Yes, that should do the trick. It will fire the CONNECTION_CHANGED hook
more often than necessary, though. I'll make a bit different patch.

-- 
Tanu
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

Reply via email to