[pulseaudio-tickets] [Bug 94958] New: BlueZ5 module fails to clean out card after headset disconnects
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sat Apr 16 00:39:04 UTC 2016
https://bugs.freedesktop.org/show_bug.cgi?id=94958
Bug ID: 94958
Summary: BlueZ5 module fails to clean out card after headset
disconnects
Product: PulseAudio
Version: unspecified
Hardware: All
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: modules
Assignee: pulseaudio-bugs at lists.freedesktop.org
Reporter: juha.kuikka at gmail.com
QA Contact: pulseaudio-bugs at lists.freedesktop.org
CC: lennart at poettering.net
Created attachment 122981
--> https://bugs.freedesktop.org/attachment.cgi?id=122981&action=edit
Patch to fix the issue
SW: Pulseaudio 8.0 / BlueZ 5.39
Symptoms:
While disconnecting/reconnecting a paired bluetooth headset (LG HBS750) audio
fails roughly on every other connection.
On a failed connection "pactl list cards" shows the bluetooth device's card but
"Active Profile: off". Issuing "pacmd set-card-profile X a2dp_sink" makes audio
work immediately.
I realized that when this happened, the previous disconnection did not remove
the card, instead it was only configured for "Active Profile: off" but
otherwise left in place.
Upon looking at PA debug logs I saw that the transport for the a2dp_sink was
first set into disconnected state and then into idle state. In
"device_connection_changed_cb()" this causes the
"pa_bluetooth_device_any_transport_connected()" return true and the
module-bluez5-device is not unloaded.
Further investigation shows that this is caused by a race of
module-bluez5-device.c:thread_func() and MediaPoint1::ClearConfiguration():
When the FD in thread_func() is closed (POLLHUP) an
BLUETOOTH_MESSAGE_STREAM_FD_HUP message is sent into the main thread. The
handler of this message unconditionally sets the transport into IDLE state.
This is a problem if it has already been set into DISCONNECTED state.
See attached patch for a fix.
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-bugs/attachments/20160416/36346add/attachment.html>
More information about the pulseaudio-bugs
mailing list