You are not logged in.

#1 2017-08-08 07:19:53

Jeroen)Mathon
Member
From: Netherlands
Registered: 2013-08-29
Posts: 82

Bluetooth headset audio lag

Hey Everyone,

I searched the forums and google for a bit but only found some temporary solutions to this problem.
Allow me to explain the issue at hand first.

I am using a carbon copy(cloned disk image) of my old Latitude E7450 on my new Latitude E7470, The two models for as i know do not differ much, the problem that i am facing is that after my bluetooth headphone is connected for a while the audio starts to lag behind the software,

This is not limited to one piece of software but in fact all audio produced on the system.
The lag can add up to 2 seconds or more.

I will now include some(hopefully) usefull information regarding my bluetooth drivers, packages and hardware.

Hardware:
- Sound card: HDA Intel PCH
- Bluetooth Firmware: intel/ibt-11-5.sfi
- Soundsystem: Alsa(with Pulseaudio for bluetooth audio)

If you guys need any more information or have any suggestions please let me know.

Offline

#2 2017-08-10 11:43:00

Jeroen)Mathon
Member
From: Netherlands
Registered: 2013-08-29
Posts: 82

Re: Bluetooth headset audio lag

I have found something that might have caused the issue.
Since configuring pulseaudio to use bluetooth is considered legacy(bluez handles bluetooth and passes the audio to pulseaudio) i have decided to comment out the following lines and to then restart pulseaudio:

### Automatically load driver modules for Bluetooth hardware
.ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy
.endif

.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
.endif

Update:
Despite having turned bluetooth off in pulseaudio it did not have the desired effect and the audio still lags behind after a while.

Offline

#3 2017-08-10 11:51:43

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,645

Re: Bluetooth headset audio lag

WLAN/Bluetooth chip? Issues like these might arise because the wifi signal is interfering with the bluetooth signal and vice-versa if you can try to move to a 5GHz band for wifi. Any messages in dmesg? Can you post

pacmd list-sinks
pacmd list-sink-inputs

while the issue occurs.

Offline

#4 2017-08-10 11:52:55

Jeroen)Mathon
Member
From: Netherlands
Registered: 2013-08-29
Posts: 82

Re: Bluetooth headset audio lag

Here is my theory of the problem.
(Take notice that this is a theory and will not necessarily be the cause of the problem)

The bluetooth headset connects, The system fills a buffer with the audio fragments ready to be send.
This buffer sometimes lags and the bluetooth driver wants to send everything over instead of skipping fragment to stay in sync with the input audio.

I am pretty sure that this is not happening but i cannot be sure, but one thing is for sure and that is that this lag is very disruptive.

Offline

#5 2017-08-10 11:53:43

Jeroen)Mathon
Member
From: Netherlands
Registered: 2013-08-29
Posts: 82

Re: Bluetooth headset audio lag

Hey V1del,

Sorry i typed my message while you where typing yours, I will try it out and come back with the results.

Offline

#6 2017-08-10 11:54:33

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,645

Re: Bluetooth headset audio lag

Please don't double and triple post, edit a previous post to append new information.

Offline

#7 2017-08-10 11:57:59

Jeroen)Mathon
Member
From: Netherlands
Registered: 2013-08-29
Posts: 82

Re: Bluetooth headset audio lag

Hey V1del,

Unfortunately at the office i cannot use a 5ghz band, furthermore i have logged the results that you requested while the issue occurred.

2 sink(s) available.
    index: 0
        name: <alsa_output.pci-0000_00_1f.3.analog-stereo>
        driver: <module-alsa-card.c>
        flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
        state: SUSPENDED
        suspend cause: IDLE 
        priority: 9959
        volume: front-left: 1 /   0% / -288.99 dB,   front-right: 0 /   0% / -inf dB
                balance -1.00
        base volume: 65536 / 100% / 0.00 dB
        volume steps: 65537
        muted: yes
        current latency: 0.00 ms
        max request: 0 KiB
        max rewind: 0 KiB
        monitor source: 0
        sample spec: s16le 2ch 44100Hz
        channel map: front-left,front-right
                     Stereo
        used by: 0
        linked by: 0
        configured latency: 0.00 ms; range is 0.50 .. 2000.00 ms
        card: 0 <alsa_card.pci-0000_00_1f.3>
        module: 7
        properties:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "ALC3235 Analog"
                alsa.id = "ALC3235 Analog"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "0"
                alsa.card = "0"
                alsa.card_name = "HDA Intel PCH"
                alsa.long_card_name = "HDA Intel PCH at 0xe1248000 irq 131"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:1f.3"
                sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
                device.bus = "pci"
                device.vendor.id = "8086"
                device.vendor.name = "Intel Corporation"
                device.product.id = "9d70"
                device.product.name = "Sunrise Point-LP HD Audio"
                device.form_factor = "internal"
                device.string = "front:0"
                device.buffering.buffer_size = "352800"
                device.buffering.fragment_size = "176400"
                device.access_mode = "mmap+timer"
                device.profile.name = "analog-stereo"
                device.profile.description = "Analog Stereo"
                device.description = "Built-in Audio Analog Stereo"
                alsa.mixer_name = "Realtek ALC3235"
                alsa.components = "HDA:10ec0293,102806dc,00100003 HDA:80862809,80860101,00100000"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        ports:
                analog-output-lineout: Line Out (priority 9900, latency offset 0 usec, available: no)
                        properties:

                analog-output-speaker: Speakers (priority 10000, latency offset 0 usec, available: unknown)
                        properties:
                                device.icon_name = "audio-speakers"
                analog-output-headphones: Headphones (priority 9000, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "audio-headphones"
        active port: <analog-output-speaker>
  * index: 1
        name: <bluez_sink.00_18_09_9E_21_C8.a2dp_sink>
        driver: <module-bluez5-device.c>
        flags: HARDWARE DECIBEL_VOLUME LATENCY 
        state: RUNNING
        suspend cause: 
        priority: 9030
        volume: front-left: 22935 /  35% / -27.36 dB,   front-right: 22935 /  35% / -27.36 dB
                balance 0.00
        base volume: 65536 / 100% / 0.00 dB
        volume steps: 65537
        muted: no
        current latency: 38.00 ms
        max request: 5 KiB
        max rewind: 0 KiB
        monitor source: 2
        sample spec: s16le 2ch 44100Hz
        channel map: front-left,front-right
                     Stereo
        used by: 1
        linked by: 1
        fixed latency: 56.93 ms
        card: 1 <bluez_card.00_18_09_9E_21_C8>
        module: 25
        properties:
                bluetooth.protocol = "a2dp_sink"
                device.description = "MDR-XB650BT"
                device.string = "00:18:09:9E:21:C8"
                device.api = "bluez"
                device.class = "sound"
                device.bus = "bluetooth"
                device.form_factor = "headset"
                bluez.path = "/org/bluez/hci0/dev_00_18_09_9E_21_C8"
                bluez.class = "0x240404"
                bluez.alias = "MDR-XB650BT"
                device.icon_name = "audio-headset-bluetooth"
                device.intended_roles = "phone"
        ports:
                headset-output: Headset (priority 0, latency offset 0 usec, available: yes)
                        properties:

        active port: <headset-output>
1 sink input(s) available.
    index: 1
        driver: <protocol-native.c>
        flags: START_CORKED 
        state: RUNNING
        sink: 1 <bluez_sink.00_18_09_9E_21_C8.a2dp_sink>
        volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
                balance 0.00
        muted: no
        current latency: 144.79 ms
        requested latency: 45.32 ms
        sample spec: s16le 2ch 48000Hz
        channel map: front-left,front-right
                     Stereo
        resample method: speex-float-1
        module: 12
        client: 9 <Clementine>
        properties:
                media.name = "'Blue House' by 'Thomas Vent'"
                application.name = "Clementine"
                native-protocol.peer = "UNIX socket client"
                native-protocol.version = "32"
                media.role = "music"
                application.process.id = "8711"
                application.process.user = "jeroen"
                application.process.host = "Jeroen-True"
                application.process.binary = "clementine"
                application.language = "en_US.UTF-8"
                window.x11.display = ":0"
                application.process.machine_id = "ebfe19a0b8d44e4b86ffc78a7dbf8642"
                application.process.session_id = "c2"
                application.icon_name = "clementine"
                module-stream-restore.id = "sink-input-by-media-role:music"
                media.title = " Blue House"
                media.artist = "Thomas Vent"

The model of my Dell workstation is Latitude E7470

Offline

#8 2017-08-11 20:26:05

c00ter
Member
From: Alaskan in Washington State
Registered: 2014-08-28
Posts: 392

Re: Bluetooth headset audio lag

Install pavucontrol or pavucontrol-qt, turn on the BT headset, run pavucontrol and set latency offset to 99 ms. You may have to adjust up or down.

Regards


UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things. -- Doug Gwyn

Offline

#9 2017-08-14 06:53:01

Jeroen)Mathon
Member
From: Netherlands
Registered: 2013-08-29
Posts: 82

Re: Bluetooth headset audio lag

c00ter wrote:

Install pavucontrol or pavucontrol-qt, turn on the BT headset, run pavucontrol and set latency offset to 99 ms. You may have to adjust up or down.

Regards

Tho that might be a temporary workaround a permanent solution or answer to why this problem occurs would be more helpful, but thanks for supplying us with an option.

Offline

#10 2017-08-15 01:51:34

c00ter
Member
From: Alaskan in Washington State
Registered: 2014-08-28
Posts: 392

Re: Bluetooth headset audio lag

I've been running Linux for a while. At some point I lost interest in "why" something does not work; I like something that does, hackery be dammed. (Generalized statement.) wink


UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things. -- Doug Gwyn

Offline

Board footer

Powered by FluxBB