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: 62)
.txt   rk3399-rockpro64-v2.dtb.txt (Size: 78.48 KB / Downloads: 70)
.txt   rk3399-rockpro64.dtb.txt (Size: 78.48 KB / Downloads: 70)
  Reply


Messages In This Thread
A fix for Bluetooth audio stuttering on the RockPro64 - by raph - 08-13-2022, 02:38 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  slarm64 (unofficial slackware) ROCKPro64 RK3399 (aarch64) mara 52 55,401 11-18-2022, 10:49 PM
Last Post: mara
  hello i want to drive an edp screen with my rockpro64 hannescam 0 133 10-20-2022, 01:22 PM
Last Post: hannescam
  Can RockPRO64 support PCIe Endpoint? andrewg132 3 485 10-14-2022, 06:24 AM
Last Post: rwk-
  RockPro64 linux console video mode callegar 0 199 09-06-2022, 02:32 PM
Last Post: callegar
  SPDIF output audio gaps jssfr 2 576 07-24-2022, 06:26 AM
Last Post: jssfr
  [OS] SkiffOS and Buildroot for Rockpro64 w/ 5.17 kernel paralin1 1 853 05-08-2022, 03:26 PM
Last Post: paralin1
  PostmarketOS on RockPro64 publiclewdness 0 518 04-24-2022, 11:53 AM
Last Post: publiclewdness
  New OS for RockPro64 is here, TwisterOS Armbian jtremblant 91 58,001 04-03-2022, 01:44 PM
Last Post: davidlsbc
  Armbian is looking for maintainer for ROCKPro64 TRS-80 20 7,980 03-19-2022, 09:32 PM
Last Post: paralin1
  OpenSuse for ROCKPro64: testimage hemertje 2 2,129 03-06-2022, 12:41 AM
Last Post: MobileJAD

Forum Jump:


Users browsing this thread: 1 Guest(s)