sonyxperiadev / bug_tracker

Empty repository that is used as a bugtracker for Open Devices project
52 stars 13 forks source link

[Loire] intermediate bluetooth disconnection #196

Closed oshmoun closed 5 years ago

oshmoun commented 6 years ago

Platform: loire Device: kugo Kernel version: 4.4 and 4.9 Android version: 8.1 and 9.0

Description while playing music on a bt headset, the connection will randomly drop and playback will pause

How to reproduce enable bluetooth pair a bt headset start music playback after some time, and while normally using the device, bt will disconnect

oshmoun commented 6 years ago

@mase76 originally reported this issue

kholk commented 6 years ago

Please post logs

mase76 commented 6 years ago

You can find my logs here: https://forum.xda-developers.com/showpost.php?p=77416898&postcount=512

jerpelea commented 5 years ago

https://github.com/sonyxperiadev/device-sony-common/commit/fd07d8e5399c3c384da7fe1cd126d4d9f917e68f

oshmoun commented 5 years ago

this is not resolved yet, still happens. should I open a new issue or can this be re-opened?

bartcubbins commented 5 years ago

can confirm, this issue still persist on my suzu

deniskuz95 commented 5 years ago

about bluetooth. sometimes it is tightly disconnected or intermittently playing music. when logging, it produces the following error: 01-28 01:02:30.366 F/linker (20127): CANNOT LINK EXECUTABLE "/odm/bin/imsdatadaemon": cannot locate symbol "dsi_query_link_local_network_handle" referenced by "/odm/bin/imsdatadaemon"...

oshmoun commented 5 years ago

@deniskuz95 that is an unrelated issue, and should be handled already. If you flash a clean build you should not see that error anymore, since that service has been removed.

kholk commented 5 years ago

How to proceed:

  1. Disable serial driver power management If issue persists
  2. Disable bluesleep power management If issue persists
  3. That's not possible, rinse and repeat.

Once we locate the issue in one of the two drivers, then we can do magic to fix it.

deniskuz95 commented 5 years ago

@kholk Thanks :) the problem is that I don’t know how to do it, I didn’t find instructions on the Internet ...

kholk commented 5 years ago

Don't worry, everyone learns. If that's out of your skills, me, Obi or other developers can look at it.

mase76 commented 5 years ago

I can confirm, the issue is still there on 2 of my Suzu devices.

mase76 commented 5 years ago

Please reopen this issue. This bug is so annoying, that it makes the usage of bluetooth headsets and speakers nearly impossible.

djselbeck commented 5 years ago

Besides the rebooting problem of #348 the Bluetooth connection to a BT speaker is also unstable for lilac/Yoshino.

Sometimes the music stops playing but the connection is still showed as active and then as disconnected.

I'll try to get logs next time

djselbeck commented 5 years ago

bt_audio_disconnect.txt

The bt audio crash starts at:

03-11 20:55:43.216 624 26363 E bt_a2dp_hw: a2dp_command: A2DP COMMAND A2DP_CTRL_CMD_START error 1

I was listening to music (mp3) over BT

mase76 commented 5 years ago

I have the same behaviour than djselbeck. The audioplayer is still running, but the connection drops. This happens within a few seconds after starting playback. It happens with all kind of audioplayers, mostly after resuming a paused playback. Sometimes turning off and on bt helps for a while. No problems with the 3.10 kernel used in LineageOS by Chippa.

djselbeck commented 5 years ago

I was listening to music for around 10 minutes before the crash

mase76 commented 5 years ago

With the 4.9 kernel used with Android 9 ROMs, bt became completely unusable. Either the bt app crashes, or audio stops playing after just a few seconds.

jerpelea commented 5 years ago

@stefanhh0 this bug report is about the loire platform which uses a different BT HW please open a new ticket for yoshino BT

jerpelea commented 5 years ago

@stefanhh0 are you building AOSP?

stefanhh0 commented 5 years ago

Moved my post and the answer to your question as requested to #362.

kholk commented 5 years ago

I've just engineered a possible solution for this issue, thanks to @oshmoun isolating the producer to a specific clock.

Can you please test again with this patchset? sonyxperiadev/kernel#1985

Thanks!

anthonyhaussman commented 5 years ago

@kholk I also have the Bluetooth problem on kugo/loire (on 8.1 and 9.0). How can I test your patchset?

oshmoun commented 5 years ago

@anthonyhaussman it's been merged into 4.9 kernel, i.e is available for 9.0 if you make a new build with the latest kernel sources you should have the Bluetooth fix

kholk commented 5 years ago

REDACTED

Sorry, I had misread the message. Follow @oshmoun 's advice.

anthonyhaussman commented 5 years ago

No problem @kholk. The thing is I have never build an Android kernel until now. I'm going to try to follow the sony procedure on https://developer.sony.com/develop/open-devices/guides/kernel-compilation-guides/how-to-build-mainline-linux-kernel-for-xperia-devices

@oshmoun, So I can use the tag v4.9 of the Linux kernel source tree repo of Torvald?

stefanhh0 commented 5 years ago

@anthonyhaussman sonyxperiadev/kernel#1985 Was merged back 2 days ago.

To do a fresh build with kernel included simply call ./repo_update.sh followed by rm -r kernel/sony/msm-4.9/common-kernel

common-kernel contains the precompiled kernels, if that folder is removed then kernel is automatically being build from the sources.

anthonyhaussman commented 5 years ago

Work great. I have used my Bluetooth headset for more than a hour. Works great without crash.

oshmoun commented 5 years ago

awesome, thanks for confirming