Skip to contentSkip to conversation

New: Blanket HCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONN for all MediaTek chips breaks HFP mSBC microphone on MT7925 (0489:e111)

Bug 221722 [email protected] 2 participants 4 messages Jul 4 – Oct 19 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

https://bugzilla.kernel.org/show_bug.cgi?id=221722

            Bug ID: 221722
           Summary: Blanket HCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONN for
                    all MediaTek chips breaks HFP mSBC microphone on
                    MT7925 (0489:e111)
           Product: Drivers
           Version: 2.5
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Bluetooth
          Assignee: [email protected]
          Reporter: [email protected]
        Regression: No

SUMMARY

- One line to remove: hci_set_quirk(hdev, HCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONN)
from the IS_ENABLED(CONFIG_BT_HCIBTUSB_MTK) block in btusb_probe().
- Location: drivers/bluetooth/btusb.c, line ~4279 in current mainline.
- Rationale: Blanket quirk for all MediaTek chips is incorrect. MT7925 firmware correctly implements HCI_Enhanced_Setup_Sync_Conn. The quirk was added for MT7921 only; scope it per-chip or remove blanket and rely on fallback logic.
- Kernel fallback handles failure gracefully (re-tries with legacy command), so no audio functionality is lost even on chips that truly don't support Enhanced Setup.

ADDITIONAL CONTEXT: The MT6639 case

A separate patch submission exists for the MT6639 (dev_id 0x6639):
Title: "Bluetooth: btusb: Add HCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONN for MT6639"
This adds the quirk for MT6639 only, which is the OPPOSITE direction (adding the quirk where it was not set before). This confirms that Enhanced Setup behavior varies across MediaTek chip variants and should not be blanket-configured.

BENEFIT:
HFP/HFP mSBC microphone works on MT7925 (and likely other newer MediaTek chips). Users can make voice calls, use voice assistants, and join conference calls with Bluetooth headsets.

HARDWARE

USB Bluetooth adapter:

Vendor:   0x0489  Foxconn / Hon Hai
Product:  0xe111  Wireless_Device
Chipset:  MediaTek MT7925 (Filogic 330)
Module:   Foxconn / Hon Hai (integrated in laptop)
Firmware: BT_RAM_CODE_MT7925_1_1_hdr.bin (Build Time: 20260605184651a)

dmesg:
usb 3-2.3: New USB device found, idVendor=0489, idProduct=e111, bcdDevice= 1.00 mt7925e 0000:03:00.0: ASIC revision: 79250000
mt7925e 0000:03:00.0: HW/SW Version: 0x8a108a10, Build Time: 20260605184651a

SOFTWARE

Kernel:   7.0.14-arch1-1 (x86_64, SMP PREEMPT_DYNAMIC)
Distro:   Arch Linux
Bluetooth: BTUSB + BTMTK kernel modules
Userspace: WirePlumber 0.5, PipeWire, bluez

PROBLEM DESCRIPTION

HFP/HFP mSBC microphone produces complete silence when a Bluetooth headset is connected via HFP/HFP (Hands-Free Profile) on the MediaTek MT7925 USB Bluetooth adapter.

The SCO audio stream is established successfully, data frames arrive at the host, but every sample is zero (silence). The headset's microphone is known to work on other platforms/adapters.

ROOT CAUSE

In drivers/bluetooth/btusb.c, the function btusb_probe() sets HCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONN for ALL MediaTek Bluetooth USB devices unconditionally:

if (IS_ENABLED(CONFIG_BT_HCIBTUSB_MTK) && (id->driver_info & BTUSB_MEDIATEK)) {
...
hci_set_quirk(hdev, HCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONN);
...
}

This quirk was introduced by commit e11523e97f474 ("Bluetooth: btusb: Add support for Mediatek MT7921") in 2022, based on Bugzilla #215576 where the MT7921 failed to establish HFP connections with HCI_Enhanced_Setup_Sync_Conn.

When the quirk is set, the kernel falls back to the legacy HCI_Setup_Sync_Conn command, which only transmits a voice_setting parameter and does NOT convey the mSBC codec configuration (codec ID, frame size, data path) that the HCI_Enhanced_Setup_Sync_Conn command includes.

The Mediatek MT7925 firmware (build 2026-06-05) correctly implements HCI_Enhanced_Setup_Sync_Conn and the associated mSBC codec configuration. Without this command, the firmware defaults to a non-functional codec configuration, resulting in zero-sample output.

Evidence from dmesg:

Bluetooth: hci0: HCI Enhanced Setup Synchronous Connection command is advertised, but not supported.

This message appears because:
1. The controller advertises support via HCI command bit
2. The kernel has set HCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONN
3. The kernel falls back to legacy HCI_Setup_Sync_Conn

VERIFICATION

Test: Capture PCM samples from the HFP mSBC audio source with and without the quirk.

WITH quirk set (stock kernel):
- All 14,336 PCM samples are zero (complete silence)
- RMS amplitude: 0.0

WITH quirk removed (DKMS patch removing the single line):
- 14,333 out of 14,336 PCM samples are non-zero (valid audio)
- RMS amplitude: ~0.07 (normal speech-level signal)

The only change is the removal of:
hci_set_quirk(hdev, HCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONN); from the MediaTek section of btusb_probe().

No other modifications were made. The Qualcomm instance of the same quirk (in btusb_setup_qca()) was left untouched.

PROPOSED FIX

The quirk should NOT be applied blanket to all MediaTek chips. Instead, it should be scoped per-chip based on which controllers actually exhibit the Enhanced Setup failure.

Two approaches:

APPROACH A (minimal, recommended):
Remove the blanket quirk from the MediaTek section in btusb_probe(). The quirk was added for MT7921 based on Bugzilla #215576, but even for MT7921 the Enhanced Setup path may work in newer firmware revisions. If regression is found on a specific chip, it can be re-added with a per-USB-ID quirk table or a DMI-based workaround.

drivers/bluetooth/btusb.c +0 -0
@@ -4276,7 +4276,6 @@ static int btusb_probe(struct usb_inter

hdev->set_bdaddr = btmtk_set_bdaddr; hdev->send = btusb_send_frame_mtk; hci_set_quirk(hdev,
- HCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONN);
hci_set_quirk(hdev, HCI_QUIRK_NON_PERSISTENT_SETUP); data->recv_acl = btmtk_usb_recv_acl; data->recv_event = btmtk_recv_event;

APPROACH B (conservative):
Add the quirk only for known-bad chip IDs using a per-device quirk table or by checking dev_id from btmtk_usb_setup() and only setting the quirk for dev_id == 0x7922 (MT7921) or other confirmed-bad chips.

SAFETY / IMPACT ANALYSIS

RISK OF REMOVING THE BLANKET QUIRK:
Low to moderate.

1. The quirk was originally added for MT7921 (dev_id 0x7922). Even on MT7921, the HCI_Enhanced_Setup_Sync_Conn failure manifests as a connection rejection, after which the kernel fallback logic re-attempts with legacy HCI_Setup_Sync_Conn. So at worst, the headset takes slightly longer to connect (one extra round trip) rather than failing entirely.

2. The upstream Bluetooth stack has robust fallback logic:
if Enhanced Setup fails, the kernel retries with legacy Setup_Sync_Conn. No audio functionality is lost.

3. Newer MediaTek chips (MT7925, MT7927/MT6639) with recent firmware DO implement Enhanced Setup correctly. The blanket quirk penalises all of them.

4. The same quirk for Qualcomm chips (in btusb_setup_qca()) is NOT affected by this change.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.
#1 lore raw

This is an automated email and please do not reply to this email.

Dear Submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
While preparing the CI tests, the patches you submitted couldn't be applied to the current HEAD of the repository.

----- Output -----

error: corrupt patch at line 4
hint: Use 'git am --show-current-patch' to see the failed patch

Please resolve the issue and submit the patches again.

---
Regards,
Linux Bluetooth

#2 lore raw

[Bug 221722] Blanket HCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONN for all MediaTek chips breaks HFP mSBC microphone on MT7925 (0489:e111)

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=221722

Ender Bonnet ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #1 from Ender Bonnet ([email protected]) --- Additional affected hardware — new USB ID for this quirk:

Adapter: MediaTek MT7925, USB ID 0e8d:e025 (MediaTek Inc. Wireless_Device)
— note: different from the reporter's 0489:e111 (Foxconn), so the blanket quirk affects at least two MT7925 USB variants.
Machine: Lenovo ThinkPad P14s Gen 6 AMD (21QL), BIOS R2XET40W 1.20
(2026-05-26)

  Kernel:   7.1.4-204.fc44.x86_64 (Fedora 44)
  Stack:    bluez 5.87, pipewire 1.6.8, wireplumber 0.5.14
  BT FW:    Build Time 20260605184935

dmesg confirms the blanket quirk fires on this variant too:

Bluetooth: hci0: HCI Enhanced Setup Synchronous Connection command is advertised, but not supported.

Possibly related additional impact beyond the broken mSBC microphone:
on this machine, roughly every 2nd reconnect of an A2DP-only-use headset (SLEVE EVO) comes up either stuck in the HFP profile (16 kHz mono sink) or with garbled audio while bluetoothctl reports the connection healthy. Forcing the profile back with pactl set-card-profile ... a2dp-sink sometimes recovers; otherwise only a full adapter power cycle (bluetoothctl power off / on) heals it. Frequency: 5 occurrences in the last 30 days, logged by a watchdog script I run as a workaround.

Since the quirk forces all SCO/profile setup on MT7925 down the legacy fallback path, this reconnect misbehavior may share the same root cause. Happy to test a kernel with the quirk scoped per-chip (the proposed one-line change in btusb_probe()) and report back.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.
#3 lore raw

[Bug 221722] Blanket HCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONN for all MediaTek chips breaks HFP mSBC microphone on MT7925 (0489:e111)

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=221722

--- Comment #2 from [email protected] ---
Update from the reporter: I can no longer reproduce the silent mSBC microphone on
this machine (0489:e111, kernel 7.2.8, BT firmware build 20260605184935). With HCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONN still applied ("HCI Enhanced Setup
Synchronous Connection command is advertised, but not supported" is logged), recording from the headset mic gave real signal in both profiles:

headset-head-unit-cvsd max -16.5 dB
headset-head-unit max -18.3 dB (mSBC)

The call failures I see now are tracked separately in bug 222151 (BT firmware 20260813113236 regression). Leaving this open since another reporter is affected
on 0e8d:e025.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.