]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Bluetooth: btmtk: fix ISO interface setup for single alt setting
authorJavier Tia <floss@jetm.me>
Mon, 30 Mar 2026 20:39:24 +0000 (14:39 -0600)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 13 Apr 2026 13:18:16 +0000 (09:18 -0400)
Some MT6639 Bluetooth USB interfaces (e.g. IMC Networks 13d3:3588 on
ASUS ROG STRIX X870E-E and ProArt X870E-Creator boards) expose only a
single alternate setting (alt 0) on the ISO interface. The driver
unconditionally requests alt setting 1, which fails with EINVAL on
these devices, causing a ~20 second initialization delay and no LE
audio support.

Check the number of available alternate settings before selecting one.
If only alt 0 exists, use it; otherwise request alt 1 as before.

Closes: https://github.com/jetm/mediatek-mt7927-dkms/pull/39
Signed-off-by: Javier Tia <floss@jetm.me>
Reported-by: Ryan Gilbert <xelnaga@gmail.com>
Tested-by: Ryan Gilbert <xelnaga@gmail.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
drivers/bluetooth/btmtk.c

index cef7a6405e1d0f5c333725174feb09f33d1483c7..099188bf772ef63a540fdac7221d8c9aa2160408 100644 (file)
@@ -1029,7 +1029,8 @@ static int __set_mtk_intr_interface(struct hci_dev *hdev)
        if (!btmtk_data->isopkt_intf)
                return -ENODEV;
 
-       err = usb_set_interface(btmtk_data->udev, MTK_ISO_IFNUM, 1);
+       err = usb_set_interface(btmtk_data->udev, MTK_ISO_IFNUM,
+                              (intf->num_altsetting > 1) ? 1 : 0);
        if (err < 0) {
                bt_dev_err(hdev, "setting interface failed (%d)", -err);
                return err;