On 11/27/2012 06:39 PM, Mikel Astiz wrote:
Hi David,

On Mon, Nov 26, 2012 at 6:27 PM, Mikel Astiz <mikel.astiz....@gmail.com> wrote:
Hi David,

On Mon, Nov 26, 2012 at 10:15 AM, David Henningsson
<david.hennings...@canonical.com> wrote:
On 11/23/2012 05:27 PM, Tanu Kaskinen wrote:

On Fri, 2012-11-23 at 16:40 +0100, David Henningsson wrote:

Under PulseAudio 2.1 I can select a2dp without problem.

Under PulseAudio 2.99.2, when I execute "pactl set-card-profile 1 a2dp"
I get "Failure: Input/Output Error" back (as the output from pactl), and
I see the following in PulseAudio's log:

module-bluetooth-device.c: Profile has no transport

...and the profile is not changed to a2dp. Anyone want to debug with me?


I can try to help, if it's not too late? You seem to have left IRC.


Thanks, I'll be around today.


I'm not able reproduce this with my headset.


Ok. I've done some minor debugging myself, but haven't got much. The
pulseaudio debug log is here: http://pastebin.se/s3CIWSl0
At the same time I get these messages in syslog: http://pastebin.se/bilI1XGX

It looks like bluetoothd does find the A2DP Sink (and source?!), but then
there is no callback to PulseAudio to register the transport, because this
part is only shown for HSP, not for A2DP:

D: [lt-pulseaudio] bluetooth-util.c: dbus:
interface=org.bluez.MediaEndpoint, path=/MediaEndpoint/HFPAG,
member=SetConfiguration
D: [lt-pulseaudio] bluetooth-util.c: dbus:
interface=org.bluez.MediaEndpoint, path=/MediaEndpoint/HFPAG,
member=SetConfiguration
D: [lt-pulseaudio] bluetooth-util.c: Transport
/org/bluez/634/hci0/dev_00_18_91_3A_B6_EC/fd3 profile 2 available

Just to make sure... can you confirm that the device was paired before
PA was started? There is a potential issue immediately after pairing,
but this would be no regression and nobody has complaint so far.

Assuming the device was already paired, can you check if A2DP profile
is connected before and after this problem? You can see this in
BlueZ's AudioSink.GetProperties(), property "State".

I can't see anything strange in the log, so my best guess is that A2DP
is actually disconnected? In this case the behavior would be the
expected one. This could typically happen if you shut PA down and then
restart it: HSP would still be connected but not A2DP. In this case
you can't use Audio.Connect() to connect the device, since it'll
complain with AlreadyConnected (since Audio.State == "connected"
represents that at least one of the profiles is connected). Therefore
AudioSink.Connect() would solve the issue.

It's a long shot but anyway...

After checking your traces today, the hypothesis above is now discarded.

The issue seems to be related to the socket-IPC vs media-API. You're
using BlueZ 4.101 but probably you have a modified version of
audio.conf which enables the socket interface (a line like
Enable=Socket), since it's otherwise disabled by default.

This would explain what's happening assuming that BlueZ 4.101 has a
bug that is causing this. You could confirm this by testing with PA
2.1 + BlueZ 4.101 without the socket interface (just remove "Socket"
from the Enable line), which I would expect to fail.

In a similar way, please check if the issue can be reproduced with PA
4.99 + BlueZ 4.101 without socket IPC.

After much and long research by Mikel and myself:

This was traced down to the combination of Ubuntu enabling the socket interface of bluez by default, and that bluez cannot handle the d-bus API correctly when the socket interface is enabled.

So in short; if you want bluetooth audio to work under 2.99, don't enable bluez's socket API.


--
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

Reply via email to