How to improve Bluetooth audio quality
#5
Hi all!

@dukla2000: Many thanks for the warm welcome! :-)

@fernando_c_m: Thanks for trying it out. If the script fails at this point, then the headset is not yet registered by PulseAudio. It takes a few seconds (2-5?). Try rerunning the command (the one that start with "BLUEZCARD= ...") again. And yes, the headset gets disconnected after running the command. You only have to run it once. "rtprio 99" is from the site linked above. It's an upper range limit, so that should be fine.

I have some news for you, after fiddling around for a few days. Here's fix no. 4:

4. Disable WiFi / Bluetooth Coexistence

WiFi and Bluetooth operate on the same 2.4GHz frequency range, and this can cause issues. I noticed stuttering when I was logged into the PinePhone via SSH. Disabling the coexistence mode seems to help. Here's what I did (steps to replicate):

1. Run "lsmod", which prints out a list of all loaded kernel modules. We're looking for "8723cs", which is the WiFi (and Bluetooth?) module.

2. Run "sudo modinfo 8723cs | grep co-existence", which prints out the module's options for the co-exitence setting. You should get:

Code:
parm:          rtw_btcoex_enable:BT co-existence on/off, 0:off, 1:on, 2:by efuse (int)


3. Run "cat /sys/module/8723cs/parameters/rtw_btcoex_enable", this will print out the current setting, which should be 2.

To disable the coexistence, do the following:

4. Create the file "/etc/modprobe.d/8723cs-opt.conf" with the following content: "options 8723cs rtw_btcoex_enable=0" (without quotation marks).

5. Reboot the PinePhone. After running the cat command (step 3) again, you should get 0.

I am by no means an expert in this area, so I would be grateful if someone could comment on it. But this has improved the link quality dramatically for me, and I can now revise option 3 from above:

3. Install other codec modues and increase minimum allowed bitpool (update)

I'm now using the setting 

Code:
load-module module-bluetooth-discover a2dp_config="sbc_freq=44k sbc_cmode=joint_stereo sbc_min_bp=46 sbc_max_bp=46"

in /etc/pulse/default.pa, which works just fine and is acceptable in terms of sound quality (compression). From https://btcodecs.valdikss.org.ru/codec-compatibility/ (which was linked at: https://github.com/EHfive/pulseaudio-modules-bt), and by searching for the first digits of my headsets' MAC address, my headset should support a maximum bitpool of 53 and dual channel SBC. But that's not working without stuttering. 36-38 is too low, sounds very compressed to my ears.

Audio is sometimes still choppy for me, especially if the phone is doing other work. I also do not yet fully understand if WiFi is still an issue and if cellular is also. But in general it's now very usable with my tweaks. The "Lollypop" player is the best I've come across!  Heart

Best, Sebastian


Messages In This Thread
RE: How to improve Bluetooth audio quality - by CyberSeb - 07-27-2020, 01:55 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Mobian, Suspend, and Audio Playback biketool 0 129 12-11-2024, 12:56 AM
Last Post: biketool
  Audio output switching anomalies treebeard 1 1,036 06-10-2024, 06:37 AM
Last Post: anonymous
  Bluetooth audio revisited 3x5co 1 1,491 01-10-2023, 05:51 PM
Last Post: Zebulon Walton
  No audio on calls after updating today Zebulon Walton 10 6,569 12-12-2022, 09:55 PM
Last Post: BaronAlbatross
  Ringtones and Audio Modes biketool 0 1,040 09-05-2022, 10:42 AM
Last Post: biketool
  Giving certain audio apps priority on the lock screen and pulldown 3x5co 0 1,132 07-17-2022, 10:34 AM
Last Post: 3x5co
  Any fix for bluetooth crash when entering pairing password? kk22 0 1,123 06-18-2022, 07:51 PM
Last Post: kk22
  Blueman GUI Bluetooth Network Access Point - fixing Bridging biketool 12 11,064 05-26-2022, 05:56 AM
Last Post: biketool
  Scripting Bluetooth Hotspot for Mobian biketool 1 1,949 03-20-2022, 03:03 PM
Last Post: biketool
  Bluetooth audio support? Zebulon Walton 5 4,661 02-28-2022, 08:59 AM
Last Post: Zebulon Walton

Forum Jump:


Users browsing this thread: 5 Guest(s)