Fix Bluetooth Headset Voice Chop in Linux

Posted on Mar 17, 2024

I am using Debian bookworm as my daily driver. As I connected my Sony Bluetooth headset, the voice started chopping or skipping the continuity. Upon searching/googling came across this fix via stackoverflow. In simple words, I need to increase buffer interval from 0 to 50ms and the audio will be buffered a bit early to avoid this lagging.

Find out your bluetooth MAC and respective probe name via which the output coming out of your bluetooth headset. In my case

$ ppactl list | grep -Pzo '.*bluez_card(.*\n)*'
        Name: bluez_card.90_7A_58_D3_D9_00
        Driver: module-bluez5-device.c
        Owner Module: 24
        Properties:
                device.description = "WH-XB910N"
                device.string = "90:7A:58:D3:D9:00"
                bluetooth.battery = "60%"
        Profiles:
                handsfree_head_unit: Handsfree Head Unit (HFP) (sinks: 1, sources: 1, priority: 30, available: yes)
                a2dp_sink: High Fidelity Playback (A2DP Sink) (sinks: 1, sources: 0, priority: 40, available: yes)
                off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
        Active Profile: a2dp_sink
        Ports:
                headset-output: Headset (type: Headset, priority: 0, latency offset: 0 usec, availability unknown)
                        Part of profile(s): handsfree_head_unit, a2dp_sink
                headset-input: Headset (type: Headset, priority: 0, latency offset: 0 usec, availability unknown)
                        Part of profile(s): handsfree_head_unit

So we are interested in Name and headset-output. Then execute below command

$ pactl set-port-latency-offset bluez_card.90_7A_58_D3_D9_00  headset-output 50000 
$ sudo systemctl restart bluetooth

Hope it helps. Thank you.