How to Check Which Bluetooth A2DP Audio Codec Is Used on Windows

This is a follow-up to my earlier article Bluetooth Audio Quality & aptX on Windows 10, based on a comment by reader eluxe.

Windows makes it unnecessarily hard to identify the audio codec used by the Bluetooth A2DP profile, but there is a way. This post shows how to check if your connection makes use of aptX, LDAC, or some other more advanced codec, or if it falls back to SBC.

Vintage Zenith Royal 755LG Portable Transistor Radio by Joe Haupt under CC

The Procedure

The process only involves two steps:

  1. Collecting ETL logs with Windows Performance Recorder (WPR)
  2. Processing the logs with Windows Performance Analyzer (WPA)

Collecting Bluetooth ETL Logs With WPR

  1. Open an elevated PowerShell prompt (i.e., with admin rights)

  2. Navigate to a temporary directory

  3. Download Microsoft’s custom Bluetooth tracing recording profile for WPR:

    wget https://github.com/Microsoft/busiotools/raw/master/bluetooth/tracing/BluetoothStack.wprp -outfile .\BluetoothStack.wprp
    
  4. Start the trace:

    wpr.exe -start BluetoothStack.wprp!BluetoothStack -filemode
    
  5. Start playing audio via your Bluetooth device

  6. Stop the trace:

    wpr.exe -stop BthTracing.etl
    
  7. You should now have a file called BthTracing.etl

Source and more information: Microsoft’s busiotools GitHub repository

Processing Bluetooth ETL Logs With WPA

Double-click the trace file BthTracing.etl to open it in Windows Performance Analyzer (WPA). You should see a window that looks similar to this:

Close all the default charts and tables in the main area by clicking the x in the upper right corner. Then double click the preview chart below System Activity in the upper left corner. The window should now look like this:

Click the loupe symbol and enter a2dpstreaming:

After clicking Find all you should see two events highlighted in the table:

We are only interested in the second event with the task name A2dpStreaming. Unfortunately, the default columns do not have any meaningful information for us, and WPA makes it really quite hard to get to the interesting fields.

Right-click the column header and select Open View Editor:

De-select the fields Id, Process, Cpu, and ThreadId. From the left column drag and drop the fields 4 through 6 (Field 4, Field 5, Field 6) to the main area below the golden bar. It should look like this:

Rearranging the columns a bit for readability we finally see the information we need:

Interpreting the Result

All the fiddling around with WPA had the sole purpose of revealing the data of three fields:

  • A2dpStandardCodecId (field 4)
  • A2dpVendorId (field 5)
  • A2dpVendorCodecId (field 6)

The following table shows the values from my Bluetooth connection, both in decimal (as displayed by WPA) and in hexadecimal:

FieldValue (dec)Value (hex)
A2dpStandardCodecId2550xFF
A2dpVendorId790x004F
A2dpVendorCodecId10x01

A complete list of Bluetooth vendor IDs can be found on the website of the Bluetooth SIG. We should not need it, though, because, luckily, an author called ValdikSS already compiled the relevant information in their excellent article Audio over Bluetooth: most detailed information about profiles, codecs, and devices. I’ll copy just the information required to interpret the data we collected.

A2DP has three types of codecs: mandatory, optional, and vendor-specific.

Mandatory A2DP Codecs

Standard codec IDVendor IDVendor codec IDCodec name
0x00[empty][empty]SBC

Optional A2DP Codecs

Standard codec IDVendor IDVendor codec IDCodec name
0x01[empty][empty]MPEG-1,2 (aka MP3)
0x02[empty][empty]MPEG-2,4 (aka AAC)
0x04[empty][empty]ATRAC

Vendor-Specific A2DP Codecs

Standard codec IDVendor IDVendor codec IDCodec name
0xFF0x004F0x01aptX
0xFF0x00D70x24aptX HD
0xFF0x000A0x02aptX Low Latency
0xFF0x00D70x02aptX Low Latency
0xFF0x000A0x01FastStream
0xFF0x012D0xAALDAC
0xFF0x00750x0102Samsung HD
0xFF0x00750x0103Samsung Scalable Codec
0xFF0x053A0x484CSavitech LHDC
0xFF0x000A0x0104The CSR True Wireless Stereo v3 Codec ID for AAC
0xFF0x000A0x0105The CSR True Wireless Stereo v3 Codec ID for MP3
0xFF0x000A0x0106The CSR True Wireless Stereo v3 Codec ID for aptX

Conclusion

Looking once again at my values, we see in the tables above that a standard codec ID of 0xFF indicates a vendor-specific code. We can learn from the corresponding table that the vendor ID 0x004F and the vendor codec ID 0x01 stand for the aptX codec. This proves what I had suspected in my original article: Windows 10 supports aptX.

Comments

Latest Posts

Scripted WordPress to Hugo Migration

Scripted WordPress to Hugo Migration
After having published in WordPress for almost 20 years, it was time for a change. This site is now rendered by Hugo, a static website generator built for Markdown content hosted in a Git repository. The migration from WordPress (HTML) to Hugo (Markdown) was far from trivial. Since I couldn’t find any tool for the job, I developed my own set of migration scripts that fully automate the migration process. You can find them on GitHub along with extensive documentation.
Website