Since I installed Ubuntu 22.04 I noticed that my Bluetooth Headset audio was really bad, cutting all the time.
Then I searched in many places how to improve it, but nothing worked.
The suggestion to use BT Classic only (ControllerMode = bredr) and increase tha latency from 0ms to 50ms improved it a little bit:
$ pactl list | grep -Pzo '.*bluez_card(.*\n)*'
Name: bluez_card.90_7A_58_D3_13_9D
Driver: module-bluez5-device.c
Owner Module: 30
Properties:
device.description = "WH-XB910N"
device.string = "90:7A:58:D3:13:9D"
device.api = "bluez"
device.class = "sound"
device.bus = "bluetooth"
device.form_factor = "headset"
bluez.path = "/org/bluez/hci0/dev_90_7A_58_D3_13_9D"
bluez.class = "0x240404"
bluez.alias = "WH-XB910N"
bluetooth.battery = "60%"
device.icon_name = "audio-headset-bluetooth"
device.intended_roles = "phone"
bluetooth.codec = "mSBC"
Profiles:
a2dp_sink: High Fidelity Playback (A2DP Sink) (sinks: 1, sources: 0, priority: 40, available: yes)
handsfree_head_unit: Handsfree Head Unit (HFP) (sinks: 1, sources: 1, priority: 30, available: yes)
off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
Active Profile: handsfree_head_unit
Ports:
headset-output: Headset (type: Headset, priority: 0, latency offset: 50000 usec, available)
Part of profile(s): a2dp_sink, handsfree_head_unit
headset-input: Headset (type: Headset, priority: 0, latency offset: 0 usec, available)
Part of profile(s): handsfree_head_unit
Then I changed it to 50ms:
$ pactl set-port-latency-offset bluez_card.90_7A_58_D3_13_9D headset-output 50000
And restarted the Bluetooth:
$ sudo service bluetooth restart
Note: as explained here https://askubuntu.com/questions/475987/a2dp-on-pulseaudio-terrible-choppy-skipping-audio you can use PulseAudio Volume Control to do it, but you need to install it first:
$ sudo apt install pavucontrol
The setup the audio output from your headset to desired latency to increase the buffer audio :
These modification helped to improve it a little bit, but the audio still cutting.
The only fixing was using HFP (Hands-Free Protocol) instead of A2DP at System Settings -> Sound -> Output -> Configuration!