Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Bluetooth: btmtk: fix ISO interface setup for single alt setting

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>

authored by

Javier Tia and committed by
Luiz Augusto von Dentz
e4f6bc7f 28b7c5a6

+2 -1
+2 -1
drivers/bluetooth/btmtk.c
··· 1029 1029 if (!btmtk_data->isopkt_intf) 1030 1030 return -ENODEV; 1031 1031 1032 - err = usb_set_interface(btmtk_data->udev, MTK_ISO_IFNUM, 1); 1032 + err = usb_set_interface(btmtk_data->udev, MTK_ISO_IFNUM, 1033 + (intf->num_altsetting > 1) ? 1 : 0); 1033 1034 if (err < 0) { 1034 1035 bt_dev_err(hdev, "setting interface failed (%d)", -err); 1035 1036 return err;