You are not logged in.

#1 2024-10-14 13:30:51

werefkin
Member
Registered: 2023-11-21
Posts: 38

WiFi and Bluetooth interference - Sluttering audio

Dear all,
I have been trying to fix my Bluetooth audio for a couple of days with no success. Nevertheless, I could identify the issue: apparently, it is interference between WiFi and Bluetooth; if the WiFi bandwidth is heavily utilized, the audio stutters a lot. Alternatively, if the WiFi connection is off, there is no sluttering.

The patient is Macbookpro14,1 (2017, A1708), which will not get official updates soon, so it was decided to switch to linux.
The laptop has:

 02:00.0 Network controller: Broadcom Inc. and subsidiaries BCM4350 802.11ac Wireless Network Adapter (rev 05)
Subsystem: Apple Inc. Device 0170
Kernel driver in use: brcmfmac
Kernel modules: brcmfmac

The audio is governed by pipewire and wireplumber; Bluetooth by bluez, in addition, I had to install a patch https://github.com/leifliddy/macbook12-bluetooth-driver, otherwise Bluetooth didn't work.
Now, both Bluetooth and wifi are running, which, as far as I understand, physically share the same chip. But I experienced the problem mentioned above.

I tried to play with A2DP configuration codecs, no improvement.

Unfortunately, I cannot exchange the wifi module on this laptop, as it is directly soldered on the motherboard.

Does anyone have a suggestion on what to try to fix it? As the problem is not hardware (or at least not only :-)), I would expect there should be a solution, which I, however, could not find. I could not find anything useful in wiki, except https://wiki.archlinux.org/title/PipeWi … _Bluetooth (didn't help)

Offline

#2 2024-10-15 08:58:20

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,307

Re: WiFi and Bluetooth interference - Sluttering audio

The only real way to fix this is to switch your WIFI to the 5Ghz band if at all possible, otherwise they share the same band and thus will get into collisions if both are in heavy use.

Offline

#3 2024-10-15 16:40:38

werefkin
Member
Registered: 2023-11-21
Posts: 38

Re: WiFi and Bluetooth interference - Sluttering audio

V1del wrote:

The only real way to fix this is to switch your WIFI to the 5Ghz band if at all possible, otherwise they share the same band and thus will get into collisions if both are in heavy use.

Hi, thanks for commenting
Hm, for the same configuration of wifi/bluetooth on macos there were no issues, I guess the prioritization was handled differently, which make me think it might be possible. I try to play with configuration of wireplumber and sample rate but with no success now. I would be fine to sacrifice some quality for stability.

monitor.bluez.properties = {
  bluez5.roles = [ a2dp_sink a2dp_source bap_sink bap_source hsp_hs hsp_ag hfp_hf hfp_ag ]
  bluez5.codecs = [ sbc sbc_xq aac ldac aptx faststream]
  bluez5.enable-sbc-xq = true
  bluez5.hfphsp-backend = "native"
  bluez5.default.rate = 24000
  bluez5.enable-msbc = true
  bluez5.default.channels = 2
}


properties = {
  bluez5.default.rate = 24000
  bluez5.a2dp.aac.bitratemode = 3
}

get

pactl list short | grep bluez
197	bluez_output.2C_4D_79_C3_44_F4.1	PipeWire	s16le 2ch 44100Hz	SUSPENDED
149	bluez_input.2C:4D:79:C3:44:F4	PipeWire	float32le 1ch 48000Hz	SUSPENDED
197	bluez_output.2C_4D_79_C3_44_F4.1.monitor	PipeWire	s16le 2ch 44100Hz	SUSPENDED
147	bluez_card.2C_4D_79_C3_44_F4	module-bluez5-device.c

Offline

Board footer

Powered by FluxBB