Bluetooth is a protocol allowing low power devices to communicate wireless.

As it is low power, range is 10m (33 feet) most of the time.

 

Bluetooth protocol stack


For audio, Bluetooth can be used to connect a media player and a headphone wireless.

Mobile phones and Bluetooth headphones are a well know example.

 

Analog gear can be made wireless by adding a Bluetooth sender to the analog out and/or a Bluetooth receiver to the analog in.

You can turn any wired headphone into a wireless one using a portable receiver.

A2DP

High quality stereo audio is obtained using the A2DP ( Advanced Audio Distribution Profile) protocol. High quality means “high”  relative to HSP (Headset Profile) with its 64 kbps mono stream.

SBC

The SBC (low-complexity subband codec) is the mandatory audio codec.

 

There are voices on the internet stating that Bluetooth audio has improved so much over the years.
This is probably the right observation but the wrong conclusion.
SBC is part of Bluetooth from 2003 on and hasn't changed so no improvement here.
However you can specify the size of the bitpool and this affects the amount of compression.
In the past low values where used to guarantee a stable connection with a low bit rate  as a consequence.
Today 53 is a popular values allowing for 328 kb/s , pretty much like the highest bitrate available in MP3.
Some headphones use even higher values but most OS don’t support this.
If both source and sink would use the maximum values, 1500 kb/s is possible. Indeed this value allows for CD quality.

 

Want to know what parameters like bitpool or subbands do?

You can try it here: Bluetooth A2DP SBC/aptX online encoder

Optional codecs

Codecs listed as optional are: MPEG 1 & 2 Audio , MPEG 3 & 4, AAC, and ATRAC(Sony).
Vendors can also implement their own protocols.

LC3

Bluetooth SIG is developing a new system for audio, LE Audio
As the name implies it operates on the Bluetooth Low Energy radio.
LE Audio will include a low-power audio codec, the Low Complexity Communications Codec (LC3).
It is supposed to be an improvement on SBC.

According to Bluetooth:
Extensive listening tests have shown that LC3 will provide improvements in audio quality over the SBC codec included with Classic Audio, even at a 50% lower bit rate.

2020 will see the first products using this codec.

LC3plus

This codec can operate at several low-delay modes – down to 5ms at a 2.5ms packet size.

It also includes dedicated high-resolution audio modes, which improve the measurable audio quality to provide perceptual transparency (up to 500 kbit/s per channel).

Source: press release Fraunhofer Institute for Integrated Circuits IIS

AAC

One day the consortium that developed MP3 decided to drop backwards compatibility and started from scratch using all the knowledge they had accumulated. This resulted in AAC, a better MP3 than MP3.

 

The Advanced Audio Coding is most of all popular in the Apple world.

Some people even think it is owned by Apple. This is simply not true.

Windows 11 support AAC as well.

 

Bitrate often is between 256 and 320 kbs.

Skipping the conversion

Audio files comes in many formats.
The media player reads them by invoking the appropriate decoder to expand them to raw PCM.
It must be PCM otherwise you can’t do any kind of DSP like volume control, EQ, mixing (incoming phone call), etc.


The audio is send to the audio device, in this case the Bluetooth sender.
There the audio in encoded with the codec negotiated between sender and sink. The sink decodes it to back to PCM and send it to the DAC of the Bluetooth device.

 

Voices on the internet say the whole conversion is skipped if both the audio file and the codec used by Bluetooth are both AAC.

I’m afraid this is a typical case of armchair engineering.

Just as with any other Bluetooth codec, any music is first decoded then encoded with a codec. When listening to music in AAC format, it is first decoded by the OS, then encoded into AAC again, for transmission over Bluetooth. This is necessary to mix several audio streams such as music and new message notifications. iOS is no exception. You can find a lot of statements that iOS does not transcode music in AAC format for transmission via Bluetooth, which is incorrect.

Audio over Bluetooth: most detailed information about profiles, codecs, and devices

 

Robert Trigss did an elegant experiment.
He took a AAC file, so one with a known frequency response and played it on a couple of phones including a iPhone.
As the frequency response differs from the original, obvious the AAC file has been decoded and encoded by the Bluetooth device while using AAC as the transmission protocol.

 

AAC Codec

aptX

A proprietary codec by CSR (Qualcomm today)
As it is not a mandatory part of the standard you need both a sender and a receiver (SouRCe and SiNK in Bluetooth lingo) supporting this protocol.

Although many think so, aptX is not lossless. It is an alternative for the standard SBC codec.

It has a fixed compression ration of 4:1 and a data rate of 352kbps

An overview of devices supporting aptX

aptX HD

In January 2016 Qualcomm announced aptX HD, it support 24 bits / 48 kHz LPCM audio over Bluetooth.

Compression remains at a ratio of 4:1, with a bit rate of 576kbps.

Although the data rate is substantially higher compared with aptX, it is and remain a lossy codec.

An overview of devices supporting aptX HD

aptX Adaptive

The latest version, compatible with aptX and aptX HD.

The bitrate is adaptive and varies between 279 kbps to 420 kbps.

It latency is not as low as aptX LL but at 80 ms typical, substantial lower compared with aptX.

aptX lossless

Mid 2021 Qualcomm announced a lossless version of aptX.

LDAC

LDAC is Sony’s proprietary protocol.
It can transmit up to 990kbps over Bluetooth.

More about LDAC

Android 8 supports both aptX and LDAC.

LHCD

A proprietary codec by HWA (Hi-res Wireless Audio)
Only available on Huawei smartphones.
No headphones or speakers available at the present (march 2019)
It claims a 900 kbps throughput.

UAT

A proprietary codec by HiBy

It claims a 192 kHz sample rate as the max.

With a bit rate of 1.2 Mbps (1200 kbs) it is a lossy codec.

Scalable Codec

The Samsung Scalable Codec prevents audio chopping by analyzing the radio frequency environment and adjusting the bitrate dynamically (from 88kbps to 512kbps).

Basically like APT-X adaptive but only compatible with select Galaxy phones and Galaxy Buds series earphones.

Bitrate

 

Codec kbps
SBC 328
AAC 256-320
aptX (48 kHz) 384
aptX-HD (48 kHz) 576
aptX- Adaptive 279 - 420
LDAC (Connection priority mode) 330
LDAC (Normal mode) 660
LDAC (Quality priority mode) 990
LHCD 900
UAT 1200
LC3plus 1000

 

As a reference:

The bit-rate of a CD = 2x16*41000= 1411 kbs

FLAC is roughly half of it.

High bitrate MP3: 320 kbs

 

Comparison
Amirm measured the Toslink output of a Topping BT receiver. This demonstrates the quality of the various codecs nicely.

 

codec-sbc

 

codec-aptx

 

codec-AAC

 

Codec LDAC 24

 

Codec used

Because both source and sink can have multiple codecs in common, it is often very unclear which codec is actually used.

You can check it yourself:

 

Lossless Codecs

There are lossless protocols like Kleernet and SKAA.
They support lossless audio but products supporting these protocols are a bit rare.

Choosing the codec

From Android 8 on, it is possible to control the Bluetooth settings.

Maybe stating the obvious but the codec you choose on your mobile must be supported by your headphone as well.

SBC-aptX

Rtings measured both frequency response and total harmonic distortion.
The differences between aptX and SBC are very small.

There is a small difference in latency between SBC and aptX.
In both cases still a bit too high for watching video (lip sync).
If you are in need for low latency, aptX LL is the best codec.

 

Plantronics BackBeat Pro 2 latency (ms) 
Wired 7
SBC 173
aptX 166
aptX LL (Low Latency) 34
aptX- Adaptive 80


Robert Triggs measured various codec's on various mobiles.

 The codec’s do differ a little in latency but the phones do make a difference as well.

Note the fluctuation in latency, it can be quite high.

 

The 2021 revision of his article shows a dramatic improvement.

This is contributed to a platform called Oboe.

 

Latency 2021

References
  1. Bluetooth SIG
  2. Bluetooth - Wikipedia
  3. Optimally Using the Bluetooth Subband Codec - Christian Hoene and Mansoor Hyder
  4. Bluetooth - palowireless
  5. aptX - Qualcom
  6. aptX - Wikipedia
  7. aptX - Hydrogenaudio
  8. Bluetooth audio quality - A2DP - SoundExpert
  9. Bluetooth Can Reduce Audio Quality, But It Doesn't Have To. Here's Why. - Brent Butterworth
  10. SBC vs AptX: Which Bluetooth Codec is the best? - Rtings.com
  11. Android Dev options - Cityle
  12. How good is Bluetooth audio at its best? - Behzad Haki
  13. Audio over Bluetooth: most detailed information about profiles, codecs, and devices - Valdikss
  14. Android's Bluetooth latency needs a serious overhaul - Robert Triggs
  15. HOWTO find which codec is used between iOS device and bluetooth headphones - rshev (2017)
  16. Bluetooth A2DP Codec Dissection - Valdikss
  17. Audio quality of SBC XQ Bluetooth audio codec - SoundExpert
  18. Bluetooth Audio Quality & aptX on Windows 10 - Helge Klein - 2019
  19. AAC only acceptable on Apple phones - Robert Triggs
  20. LC3plus press release - Fraunhofer Institute for Integrated Circuits IIS
  21. Topping BC3 Review (Bluetooth Receiver) & BT CODECs - Audio Science Review 2021