Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Program lockup when stop audio stream #294

Closed
refeved opened this issue Feb 12, 2020 · 2 comments
Closed

Program lockup when stop audio stream #294

refeved opened this issue Feb 12, 2020 · 2 comments

Comments

@refeved
Copy link

refeved commented Feb 12, 2020

I was using a python library 'sounddevice' to play audio through bluezalsa device. Most of time, it will works as expect. However, the program will hang occasionally when trying to stop ongoing stream. Below is the log of bluealsa when I reproduce the issue:

bluealsa: D: ../../src/ba-transport.c:864: State transition: 0 -> 0
bluealsa: D: ../../src/at.c:161: AT message: SET: command:+NREC, value:0
bluealsa: D: ../../src/rfcomm.c:105: Sending AT message: RESP: command:(null), value:ERROR
bluealsa: D: ../../src/at.c:161: AT message: SET: command:+VGS, value:0
bluealsa: D: ../../src/rfcomm.c:105: Sending AT message: RESP: command:(null), value:OK
bluealsa: D: ../../src/at.c:161: AT message: SET: command:+VGM, value:0
bluealsa: D: ../../src/rfcomm.c:105: Sending AT message: RESP: command:(null), value:OK
bluealsa: D: ../../src/bluealsa-dbus.c:155: Called: org.bluealsa.Manager1.GetPCMs()
bluealsa: D: ../../src/bluealsa-dbus.c:155: Called: org.bluealsa.Manager1.GetPCMs()
bluealsa: D: ../../src/bluealsa-dbus.c:155: Called: org.bluealsa.Manager1.GetPCMs()
bluealsa: D: ../../src/bluealsa-dbus.c:382: Called: org.bluealsa.PCM1.Open()
bluealsa: D: ../../src/ba-transport.c:993: New transport: 20 (MTU: R:672 W:885)
bluealsa: D: ../../src/bluez.c:1346: Signal: org.freedesktop.DBus.Properties.PropertiesChanged()
bluealsa: D: ../../src/bluez.c:1380: Signal: PropertiesChanged: org.bluez.MediaTransport1: State
bluealsa: D: ../../src/ba-transport.c:864: State transition: 0 -> 2
bluealsa: D: ../../src/ba-transport.c:1178: Created new thread [ba-a2dp-sbc]: A2DP Source (SBC)
bluealsa: D: ../../src/a2dp.c:574: Starting IO loop: A2DP Source (SBC)
bluealsa: D: ../../src/ba-transport.c:864: State transition: 2 -> 2
bluealsa: D: ../../src/bluez.c:719: Called: org.bluez.MediaEndpoint1.ClearConfiguration()
bluealsa: D: ../../src/bluez.c:678: Disconnecting media endpoint: /org/bluez/hci1/A2DP/SBC/Source/1
bluealsa: D: ../../src/rfcomm.c:1175: RFCOMM disconnected: Connection reset by peer
bluealsa: D: ../../src/ba-transport.c:1072: Closing RFCOMM: 9
bluealsa: D: ../../src/ba-transport.c:1200: Exiting IO thread: HFP Audio Gateway (CVSD)
bluealsa: D: ../../src/ba-transport.c:331: Freeing transport: HFP Audio Gateway (CVSD)
bluealsa: D: ../../src/ba-transport.c:1200: Exiting IO thread: RFCOMM: HFP Audio Gateway
bluealsa: D: ../../src/ba-transport.c:331: Freeing transport: RFCOMM: HFP Audio Gateway
bluealsa: D: ../../src/ba-transport.c:1020: Releasing transport: A2DP Source (SBC)
bluealsa: E: Couldn't release transport: GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: Method "Release" with signature "" on interface "org.bluez.MediaTransport1" doesn't exist

bluealsa: D: ../../src/ba-transport.c:1200: Exiting IO thread: A2DP Source (SBC)
bluealsa: D: ../../src/ba-transport.c:1020: Releasing transport: A2DP Source (SBC)
bluealsa: E: Couldn't release transport: GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: Method "Release" with signature "" on interface "org.bluez.MediaTransport1" doesn't exist

bluealsa: D: ../../src/ba-transport.c:331: Freeing transport: A2DP Source (SBC)
bluealsa: D: ../../src/ba-transport.c:1151: Closing PCM: 16
bluealsa: D: ../../src/ba-device.c:131: Freeing device: 24:71:89:2E:72:A2
bluealsa: D: ../../src/bluez.c:1307: Signal: org.freedesktop.DBus.ObjectManager.InterfacesRemoved()
bluealsa: D: ../../src/bluez.c:1307: Signal: org.freedesktop.DBus.ObjectManager.InterfacesRemoved()
bluealsa: D: ../../src/bluez.c:1307: Signal: org.freedesktop.DBus.ObjectManager.InterfacesRemoved()
bluealsa: D: ../../src/bluez.c:1307: Signal: org.freedesktop.DBus.ObjectManager.InterfacesRemoved()
bluealsa: D: ../../src/bluez.c:1307: Signal: org.freedesktop.DBus.ObjectManager.InterfacesRemoved()
bluealsa: D: ../../src/bluez.c:1307: Signal: org.freedesktop.DBus.ObjectManager.InterfacesRemoved()
bluealsa: D: ../../src/bluez.c:1307: Signal: org.freedesktop.DBus.ObjectManager.InterfacesRemoved()
bluealsa: D: ../../src/bluez.c:1307: Signal: org.freedesktop.DBus.ObjectManager.InterfacesRemoved()
bluealsa: D: ../../src/bluez.c:1307: Signal: org.freedesktop.DBus.ObjectManager.InterfacesRemoved()
bluealsa: D: ../../src/bluez.c:1307: Signal: org.freedesktop.DBus.ObjectManager.InterfacesRemoved()
bluealsa: D: ../../src/bluez.c:1307: Signal: org.freedesktop.DBus.ObjectManager.InterfacesRemoved()
bluealsa: D: ../../src/bluez.c:1307: Signal: org.freedesktop.DBus.ObjectManager.InterfacesRemoved()
bluealsa: D: ../../src/bluez.c:1307: Signal: org.freedesktop.DBus.ObjectManager.InterfacesRemoved()

Is there anyone knows what's going on here?

I was using bluez-alsa on a Raspberry Pi 3B+ running Ubuntu-mate. The Bluez version is 5.48 from the depot originally. I have tried to upgrade Bluez to 5.52, but can not fix the problem.

When the issue happens, bluetooth will go off and stop responding completely. And I can not turn on bluetooth anymore, below is the output of bluetoothctl:
[bluetooth]# power on
Failed to set power on: org.bluez.Error.Failed
Restarting bluetooth service or bluealsa will also not help, the only way to recover is a reboot.

@refeved
Copy link
Author

refeved commented Feb 17, 2020

This seems a issue of Raspberry firmware raspberrypi/firmware#887

@refeved
Copy link
Author

refeved commented Feb 20, 2020

I have tried to build and install the latest rpi-4.19.y branch of https://github.com/raspberrypi/linux on My 3B+ running Ubuntu-Mate 18.04. And confirm that it fixed the Bluetooth problem. I leave it play audio overnight and cannot see an disconnection.
So, close the issue here.

@refeved refeved closed this as completed Feb 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant