Bluetooth A2DP audio streaming for Windows with experimental LHDC V5 + Low Latency support. Streams system audio through a WinUSB-controlled Bluetooth adapter without a custom kernel driver or test signing.
This is an experimental LHDC V5 / MediaTek MT7922 (AMD RZ616) development fork of A2DP Windows Bridge. It is not an official Savitech, HWA, Microsoft, MediaTek, or BlueKitchen product.
| Codec | Bitrate | Sample Rate | Bit Depth | Latency |
|---|---|---|---|---|
| LHDC V5 | 64/160/192/256/320/400/500/900/1000 kbps | 44.1/48/96 kHz | 16/24 bit | 5 ms frames; LL transport mode |
| LDAC | 330/660/990 kbps | 44.1–96 kHz | 16/24/32 bit | ~200 ms |
| aptX HD | 576 kbps | 44.1/48 kHz | 24 bit | ~150 ms |
| aptX Low Latency | 352 kbps | 44.1/48 kHz | 16 bit | ~32 ms |
| AAC | 128/192/256 kbps | 44.1/48 kHz | 16 bit | ~150 ms |
| SBC | up to ~345 kbps | 44.1/48 kHz | 16 bit | ~150 ms |
+-----------------------------------------------+
| A2DPWB.exe |
| |
| +- GUI (wxWidgets) ------+ +- CLI ---------+|
| | Device / adapter select | | --cli mode ||
| | Codec / quality config | | Same core ||
| | Profile management | | ||
| | Status display | | ||
| +-------------------------+ +---------------+|
| |
| +- Core -------------------------------------+|
| | WASAPI Capture (Loopback / Virtual Device) ||
| | Encoder (LHDC V5 / LDAC / aptX HD / aptX LL / AAC / SBC) |
| | A2DP Service (connection lifecycle) ||
| | BTstack (HCI / L2CAP / AVDTP / A2DP) ||
| +--------------------------------------------+|
| WinUSB API |
+-----------------------+-----------------------+
USB Bluetooth Adapter
| Directory | Description |
|---|---|
app/src/ |
Application: GUI (wxWidgets) + CLI, audio capture, encoding, Bluetooth transport |
app/lang/ |
Localization files (JSON, embedded at build time) |
app/resources/ |
Application icon, manifest, resource script |
extern/btstack/ |
BTstack — user-mode Bluetooth stack (git submodule) |
extern/lhdcv5-encoder/ |
Portable C LHDC V5 encoder (git submodule) |
extern/libldac/ |
AOSP libldac — LDAC encoder (git submodule) |
extern/libopenaptx/ |
libopenaptx — aptX / aptX HD encoder (git submodule) |
extern/fdk-aac/ |
Fraunhofer FDK AAC — AAC-LC encoder (git submodule) |
extern/json/ |
nlohmann/json — JSON parser for settings, profiles, localization |
- Windows 10/11 (x64)
- Visual Studio 2022 or later with C++ desktop workload
- CMake 3.16+
- Git (for submodules and wxWidgets FetchContent)
- Supported WinUSB Bluetooth adapter. The tested path is MediaTek MT7922 /
AMD RZ616 (
USB\VID_0E8D&PID_0616&MI_00). Other adapters retain upstream support but are not yet regression-tested in this fork. - Zadig (https://zadig.akeo.ie/) to install WinUSB driver on the adapter
- Plug in a dedicated USB Bluetooth adapter (keep built-in Bluetooth for normal Windows use)
- Install Zadig from https://zadig.akeo.ie/
- Open Zadig → Options → List All Devices
- Select your USB Bluetooth adapter from the dropdown
- Select WinUSB as the target driver and click Replace Driver
- Find your headphone's Bluetooth address in Windows Settings → Bluetooth & devices → your device → Properties
- Run
A2DPWB.exe(GUI) orA2DPWB.exe --cli -d AA:BB:CC:DD:EE:FF
Warning: Replacing the Bluetooth function driver with WinUSB makes that radio unavailable to normal Windows Bluetooth until its original driver is restored. For the RZ616 combo card, select only BT_FUNCTION (Interface 0 / MI_00) in Zadig. Do not replace the Wi-Fi interface; Wi-Fi remains managed by its normal Windows driver. Keep a way to restore the OEM driver in Device Manager.
The application reads the per-installation DeviceInterfaceGUIDs written by
Zadig, initializes the MT7922 firmware from the installed MediaTek DriverStore
package, and opens only the Bluetooth MI_00 function. No firmware download is
required in the GUI for this adapter.
The tested stable LHDC V5 LL setting is 500 kbps / 48 kHz / 24-bit. The 900/1000 kbps modes are intentionally exposed for testing, but may crackle when the controller or radio link cannot sustain them. LL mode bounds the transmit queue and drops stale packets instead of allowing latency to grow indefinitely.
Realtek-based USB Bluetooth adapters (e.g., TP-Link UB500, RTL8761BU dongles) require proprietary firmware to operate. Intel and CSR adapters do not need this step.
GUI (Guided): Launch A2DPWB.exe and open the Firmware dialog. If firmware is missing, a warning is displayed with the required filenames. Use Open Download Page to open the linux-firmware/rtl_bt page in your browser, and Open Config Folder to open the destination folder. Download the .bin files and place them in the config folder.
Manual:
- Download the firmware and config
.binfiles for your chipset from https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/rtl_bt (e.g.,rtl8761bu_fw.binandrtl8761bu_config.bin) - Place both files in the A2DPWB config folder (
%APPDATA%\A2DPWB, or the path shown in the Firmware dialog)
License: These firmware files are proprietary Realtek binaries distributed via the linux-firmware project. They are not included in this repository. See linux-firmware WHENCE for redistribution terms.
git clone --recursive https://github.com/rison1337/LHDC-V5-Windows-RZ616.git
cd LHDC-V5-Windows-RZ616
cmake -B build -A x64
cmake --build build --config ReleaseThe executable is output to build/app/Release/A2DPWB-1.0.1.exe.
Note: The first build takes several minutes because CMake FetchContent downloads and compiles wxWidgets.
A2DPWB.exe
The graphical interface provides:
- Bluetooth adapter selection (WinUSB-attached adapters)
- Audio device selection (WASAPI loopback capture source)
- LHDC V5 quick controls (64–1000 kbps, 48/96 kHz, 16/24-bit, LL toggle)
- Codec selection (Auto / LHDC V5 / LDAC / aptX HD / aptX LL / AAC / SBC)
- LDAC quality mode (HQ 990 kbps / SQ 660 kbps / MQ 330 kbps)
- LDAC ABR (Adaptive Bit Rate) toggle
- Connection profile management (save / load device + codec settings)
- Real-time status display (codec, bitrate, connection state)
# Auto-select best codec
A2DPWB.exe --cli -d AA:BB:CC:DD:EE:FF
# Specify codec
A2DPWB.exe --cli -d AA:BB:CC:DD:EE:FF -c ldac
A2DPWB.exe --cli -d AA:BB:CC:DD:EE:FF -c lhdcv5
A2DPWB.exe --cli -d AA:BB:CC:DD:EE:FF -c aptxhd
A2DPWB.exe --cli -d AA:BB:CC:DD:EE:FF -c aptxll
A2DPWB.exe --cli -d AA:BB:CC:DD:EE:FF -c aac
A2DPWB.exe --cli -d AA:BB:CC:DD:EE:FF -c sbc
# LDAC quality modes
A2DPWB.exe --cli -d AA:BB:CC:DD:EE:FF -c ldac -q hq # 990 kbps (default)
A2DPWB.exe --cli -d AA:BB:CC:DD:EE:FF -c ldac -q sq # 660 kbps
A2DPWB.exe --cli -d AA:BB:CC:DD:EE:FF -c ldac -q mq # 330 kbps
# Enable LDAC ABR (Adaptive Bit Rate)
A2DPWB.exe --cli -d AA:BB:CC:DD:EE:FF -c ldac -a
# Virtual audio device capture (e.g. VB-CABLE)
A2DPWB.exe --cli -d AA:BB:CC:DD:EE:FF -m virtual --audio-device "{device-id}"
# Specify USB adapter path (when multiple adapters are connected)
A2DPWB.exe --cli -d AA:BB:CC:DD:EE:FF -u "\\?\usb#..."
# List paired Bluetooth audio devices
A2DPWB.exe --cli -lNote: Both capture modes (system loopback and virtual device) use WASAPI shared mode. The capture sample rate depends on the device's format configured in Windows Sound settings (typically 48 kHz). To use LDAC at 96 kHz, change the device format to 96 kHz in Sound settings > Advanced.
- LHDC V5: vendor negotiation, 5 ms frames, 16/24-bit PCM, 44.1/48/96 kHz, fixed 64–1000 kbps modes, and LL packet signaling
- MediaTek RZ616: dynamic WinUSB discovery and firmware/function initialization
- Multi-codec support: LHDC V5, LDAC, aptX HD, aptX Low Latency, AAC, SBC with automatic negotiation
- Two capture modes: System loopback (all system audio) or virtual audio device (per-app routing via VB-CABLE etc.)
- LDAC ABR: Adaptive Bit Rate for unstable connections
- Auto-reconnect: Reconnects on Bluetooth disconnection (up to 10 attempts)
- Profile management: Save and load device + codec configurations
- Localization: English / Japanese UI
- Realtek firmware: Guided firmware download for Realtek adapters
- MTU-aware framing: Optimal packet utilization for each codec
- PCM residual buffering: Prevents audio data loss at encoder boundaries
This project is licensed under the MIT License. See LICENSE for the full text.
Third-party libraries are used under their respective licenses. See THIRD_PARTY_LICENSES.md for details.
BTstack is dual-licensed: BSD-3-Clause for non-commercial use, commercial license available from BlueKitchen GmbH.
- BTstack — Open-source Bluetooth stack with WinUSB support
- Portable LHDC V5 encoder — Apache-2.0 C port of the AOSP encoder
- libldac (AOSP) — LDAC encoder library
- libopenaptx — Open-source aptX / aptX HD encoder
- fdk-aac — Fraunhofer FDK AAC codec library
- wxWidgets — Cross-platform GUI library
- nlohmann/json — JSON for Modern C++
- Zadig — USB driver installer for WinUSB