Bluetooth Interference with WiFi: Impact of Codecs

Bluetooth Interference with WiFi: Impact of Codecs

Bluetooth and WiFi can interfere with each other when operating in the same frequency range. However, this interference is primarily observed when using audio codecs other than SBC (Subband Coding). This article explores the relationship between codecs, Bluetooth, and WiFi interference, providing insights into mitigating the issue.

Understanding the Case

In the case of PipeWire, a multimedia application handler, the audio quality drops and WiFi performance is affected when AAC or SBC-XQ codecs are used. Interestingly, the speed of YouTube videos improves when using the SBC codec. PulseAudio, another sound server for Linux, also confirms this behavior when switching codecs.

Fetching Supported Codecs

To examine the impact of codecs on interference, we can fetch the supported codecs using the following commands, documented in the PulseAudio release notes:

$ pactl send-message /card/bluez_card.XX_XX_XX_XX_XX_XX/bluez list-codecs
# [
#    {
#       "description" : "SBC",
#       "name" : "sbc"
#    },
#    {
#       "description" : "SBC XQ 453kbps",
#       "name" : "sbc_xq_453"
#    },
#    {
#       "description" : "SBC XQ 512kbps",
#       "name" : "sbc_xq_512"
#    },
#    {
#       "description" : "SBC XQ 552kbps",
#       "name" : "sbc_xq_552"
#    }
# ]

This command retrieves the available codecs along with their descriptions and names.

Determining the Active Codec

To identify the active codec being used, execute:

$ pactl send-message /card/bluez_card.XX_XX_XX_XX_XX_XX/bluez get-codec
# sbc

The command reveals the current codec in use, which, in my case, happens to be SBC.

Codec Impact and Recommendations

The observation that WiFi speeds are stable with the SBC codec can be attributed to PulseAudio's default behavior. SBC does not significantly interfere with WiFi, making it a reliable choice for Bluetooth audio streaming.

Upgrading to a higher quality codec, like SBC-XQ 512kbps, is expected to decrease WiFi speeds due to increased interference. It's advisable to stick to low-quality SBC or consider using a 5GHz WiFi network to minimize interference. For inspecting audio quality and ensuring minimal interference, the song After Dark can be used as a reference. This song helped me evaluate the audio quality and identify any potential acoustic artifacts.

Did you find this article valuable?

Support Arunanshu Biswas by becoming a sponsor. Any amount is appreciated!