A fix for Bluetooth audio stuttering on the RockPro64
#1
Hello,

I've bought the wifi+blueooth module for the RockPro64 board (https://pine64.com/product/rockpro64-1x1...-0-module/).

I have been struggling to make Bluetooth audio work with it. It stuttered a lot, but yesterday I found a solution. Please test it and report back, I need feedback from a few people so I can submit a kernel patch with enough confidence.

Quick explanation: A patch that fixes the stutters on ROCK Pi 4 boards, also based on the rk3399 board with the same BCM4345C5 Bluetooth device, also on UART0, has been submitted last November: https://patchwork.kernel.org/project/lin...tions.com/

This fix sets the correct right max-speed and compatibility configurations for the Bluetooth device to work correctly. It is already present for the Pinebook Pro. The same fix needs to be applied for the RockPro64.

I'm using Armbian, so the following instructions might need to be adapted for other distributions, though the fix not to be specific to Armbian and the instructions might be generic enough.

I attached 3 files to this post. Please remove the .txt extensions when downloading them. Here's how to use them.

Testing quicky

First, I only tested this on linux 5.18. This is not the default kernel version on Armbian for the RockPro64. The default kernel is 5.15. To install version 5.18, you can use the armbian-config tool which will install the linux-image-edge-rockchip64 kernel. 5.15 might work but I haven't tested it.

So:
  • Backup your stuff. We are messing with boot files.
  • If you haven't already, install linux 5.18 (the linux-image-edge-rockchip64 kernel, which can be installed using armbian-config)
  • Download the rk3399-rockpro64-v2.dtb and rk3399-rockpro64.dtb files attached to this post. Remove the .txt extensions.
  • Then, as root (add sudo as needed):


Code:
cp /boot/dtb-5.18.0-rockchip64/rockchip/rk3399-rockpro64-v2.dtb{,.bak}
cp /boot/dtb-5.18.0-rockchip64/rockchip/rk3399-rockpro64.dtb{,.bak}
cp rk3399-rockpro64-v2.dtb /boot/dtb-5.18.0-rockchip64/rockchip/rk3399-rockpro64-v2.dtb
cp rk3399-rockpro64.dtb /boot/dtb-5.18.0-rockchip64/rockchip/rk3399-rockpro64.dtb

And then reboot. Be aware that any kernel upgrade will probably erase these files and you'll need to copy them back after upgrade.

These files actually come from a kernel build, so if you want, you can recompile the kernel with the fix.

Recompiling the kernel

The previous instructions are sufficient to use the fix. However, if you may want to recompile your kernel with this fix.

Apply the attached patch. I'm testing this on kernel 5.18. The patch should cleanly apply on versions 5.18 and 5.19. I've not tested this on 5.15. On Armbian, you can download the kernel sources using apt install linux-source-5.18.0-edge-rockchip64. You'll find the kernel sources and the config used in Armbian for the RockPro64 in the /usr/src folder. The following is sufficient to build the dtb files:

Code:
make dtbs

If you want to build deb packages, use make deb-pkg.


Attached Files
.txt   0001-arm64-dts-rockchip-Fix-Bluetooth-on-the-RockPro64-bo.patch.txt (Size: 1.57 KB / Downloads: 177)
.txt   rk3399-rockpro64-v2.dtb.txt (Size: 78.48 KB / Downloads: 192)
.txt   rk3399-rockpro64.dtb.txt (Size: 78.48 KB / Downloads: 180)
  Reply
#2
Note that the edge kernel is now 5.19.16.

Convenience command:

sudo curl https://forum.pine64.org/attachment.php\?aid\=2677 -o /boot/dtb-5.19.16-rockchip64/rockchip/rk3399-rockpro64-v2.dtb
sudo curl https://forum.pine64.org/attachment.php\?aid\=2678 -o /boot/dtb-5.19.16-rockchip64/rockchip/rk3399-rockpro64.dtb
  Reply
#3
Starting from kernel 6.0 (today: 6.0.10), Bluetooth does not work for me. I needed to downgrade the kernel to version 5.19.16 for the Bluetooth to work again (regardless of this fix).




Code:
sudo apt install linux-dtb-edge-rockchip64=22.08.6 linux-image-edge-rockchip64=22.08.6
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  irradium (based on crux linux) RockPro64 riscv64, aarch64 mara 1 345 03-25-2024, 12:12 PM
Last Post: mara
  yocto for RockPro64 Fide 1 648 01-16-2024, 10:01 AM
Last Post: Fide
  Installing Ubuntu Server on RockPro64 deutschlmao 2 2,519 10-29-2023, 04:43 PM
Last Post: brotherj4mes
  Vanilla mainline Debian 11 (Bullseye) on the RockPro64 Pete Tandy 22 16,828 08-16-2023, 01:34 AM
Last Post: varac
  slarm64 (unofficial slackware) ROCKPro64 RK3399 (aarch64) mara 54 82,208 08-11-2023, 11:13 AM
Last Post: mara
  How to enable CoreSight ETM trace on RockPro64 shpark 0 541 05-21-2023, 11:34 PM
Last Post: shpark
  Rockpro64 Dead on arrival? quixoticgeek 1 880 03-12-2023, 06:55 PM
Last Post: quixoticgeek
  RockPro64 boot questions misterc 3 1,488 01-13-2023, 06:21 PM
Last Post: misterc
  hello i want to drive an edp screen with my rockpro64 hannescam 0 707 10-20-2022, 01:22 PM
Last Post: hannescam
  Can RockPRO64 support PCIe Endpoint? andrewg132 3 2,091 10-14-2022, 06:24 AM
Last Post: rwk-

Forum Jump:


Users browsing this thread: 1 Guest(s)