If you have ever connected a pair of wireless earbuds to your phone, listened to a song you know intimately, and thought something sounded slightly off — like a layer of haze had been laid over the recording, or like the cymbals had been replaced by an impression of cymbals — you were not imagining it. You were hearing the audible consequences of a technical decision made silently, on your behalf, by software you have probably never thought about.

The good news is that, in many cases, the problem is fixable in about three minutes, and the fix does not cost anything. The bad news is that almost nobody knows the fix exists, partly because the companies that make your phone and your earbuds have very little incentive to tell you about it.

This is the story of Bluetooth audio codecs. It is more interesting than it sounds.

What is actually happening when you press play

When you play a song from your phone through wireless earbuds, the audio cannot simply travel from one device to the other in its original form. Bluetooth, the wireless protocol that connects them, was not designed for high-quality audio. It was designed in the late 1990s for low-power, short-range data transmission of any kind — file transfers, mouse clicks, eventually phone calls. Audio was an afterthought.

To make audio work over Bluetooth at all, the original signal has to be compressed before transmission and decompressed on the other end. The piece of software that does this compression and decompression is called a codec. There are many different Bluetooth codecs, and they vary enormously in quality.

The default codec, called SBC, was specified in the early 2000s and was designed to work on the cheapest possible hardware. It throws away a great deal of audio information in order to keep its bandwidth requirements low. On simple sources — voice calls, podcasts, music with limited dynamic range — the loss is mostly inaudible. On music with complex high frequencies or wide dynamic range, the loss is obvious to anyone listening attentively.

The codecs you have probably never heard of

In the years since SBC was standardized, several better codecs have emerged. AAC, which Apple primarily uses, transmits more information at the same bandwidth and produces noticeably better results on most music. aptX and its variants, developed by Qualcomm, do the same on Android devices. LDAC, developed by Sony, can transmit up to three times more data per second than SBC and produces results that, on good earbuds with a clean signal, are difficult to distinguish from a wired connection. LC3, the codec built into the newer Bluetooth LE Audio specification, manages to be both higher quality and lower power than SBC.

Most modern earbuds support several of these codecs. Most modern phones support several of them too. The problem is that the two devices have to agree on which one to use, and the negotiation often defaults to the worst common option for reasons that have nothing to do with sound quality.

The negotiation often defaults to the worst common option for reasons that have nothing to do with sound quality.

Why the negotiation goes wrong

There are several reasons the codec negotiation between phone and earbuds tends to land on a worse codec than the hardware is capable of using.

The first is licensing. Some codecs require licensing fees from the manufacturer, and lower-end devices sometimes save money by supporting only the unlicensed defaults. This is rare in flagship earbuds but common in budget models that, on paper, should sound better than they do.

The second is operating system policy. Both major mobile operating systems have, at various points, restricted which codecs are used by default in the interest of battery life or connection stability. The user can usually override these defaults, but only if they know that the override exists.

The third is the sample rate of the source material. Streaming services frequently transcode their audio before sending it to your phone, and the version that arrives at your earbuds is sometimes already lower quality than the original recording, before any Bluetooth compression is applied. Some streaming services are upfront about this. Others are not.

The fourth, and most frustrating, is connection quality. When the Bluetooth connection between phone and earbuds becomes unstable — interference from other devices, walls, distance — the codec will sometimes drop to a lower-quality setting to maintain the connection. It does not always return to the higher-quality setting once conditions improve.

The three-minute fix

For most users with reasonably modern earbuds and a reasonably modern phone, the following sequence will produce audibly better sound:

On Android: Open the developer options menu, scroll to the section labeled "Bluetooth audio codec," and check what is selected. If it is set to "default" or "SBC," change it to the highest-quality option that your earbuds support. If you do not know what your earbuds support, try LDAC first, then aptX HD, then aptX, and listen for stability problems. If the connection becomes unreliable, step down one level.

The developer options menu is not enabled by default on Android devices, but it can be enabled by tapping the build number in your device settings several times in succession. This sounds suspicious. It is, in fact, a documented feature of the operating system.

On iOS: Apple does not expose codec selection to users. The phone uses AAC by default with most third-party earbuds and a proprietary codec with Apple-branded earbuds. There is little you can do here other than choose earbuds that support AAC well, which most modern ones do.

For everyone: The settings menu of the earbuds themselves often contains a quality versus connection-stability toggle. On premium earbuds, this is sometimes labeled "sound quality priority" versus "connection stability priority." Switching to sound quality priority will use the higher-quality codec when conditions allow.

The streaming side of the equation

None of this matters if the audio source is already low quality. Most major streaming services now offer a "high quality" or "lossless" tier, sometimes at the same price as the standard tier and sometimes for a small premium. On most services, the default is not the highest available quality. Check your streaming app's settings menu and ensure that streaming quality is set to the highest available, at least when you are on Wi-Fi. The default settings often save bandwidth at the expense of fidelity.

The hardware in your ears is almost certainly more capable than what you are currently asking it to do.

What you will actually hear

If you have done all of this and your earbuds and phone are reasonably modern, the difference will be obvious on the right kind of music. Acoustic recordings, classical music, and well-produced jazz are the easiest places to hear the change. Cymbals will sound less like distorted hiss and more like cymbals. The space around individual instruments will feel more defined. The bass will feel less like a pulse and more like an actual instrument.

On heavily compressed pop music or podcasts, the difference will be smaller. Material that has already been compressed by its producer cannot be uncompressed by your earbuds. But even on this material, you should hear a slight reduction in fatigue over long listening sessions, which is one of the more reliable indicators that the audio you are hearing is closer to its original form.

The wider point

What is striking about this whole situation is how little of it is communicated to consumers. The earbuds are sold on the basis of how good they sound, but the actual sound the buyer experiences is determined as much by configuration as by hardware. The configuration is technical, hidden in menus most people will never open, and presented in language designed for engineers rather than listeners.

This is not unique to wireless audio. It is a recurring pattern in consumer technology: hardware that is more capable than its default configuration suggests, hidden behind interfaces that prioritize stability and battery life over the experience the buyer was paying for. The hardware in your ears is almost certainly more capable than what you are currently asking it to do.

Three minutes of menu-diving will probably make your music sound noticeably better. The companies that sold you the music and the earbuds will not tell you this. We thought we would.