@@ -453,6 +453,7 @@ static const struct dmi_system_id btusb_needs_reset_resume_table[] = {
453
453
#define BTUSB_HW_RESET_ACTIVE 12
454
454
#define BTUSB_TX_WAIT_VND_EVT 13
455
455
#define BTUSB_WAKEUP_DISABLE 14
456
+ #define BTUSB_USE_ALT1_FOR_WBS 15
456
457
457
458
struct btusb_data {
458
459
struct hci_dev * hdev ;
@@ -1682,14 +1683,15 @@ static void btusb_work(struct work_struct *work)
1682
1683
new_alts = data -> sco_num ;
1683
1684
}
1684
1685
} else if (data -> air_mode == HCI_NOTIFY_ENABLE_SCO_TRANSP ) {
1685
-
1686
- data -> usb_alt6_packet_flow = true;
1687
-
1688
1686
/* Check if Alt 6 is supported for Transparent audio */
1689
- if (btusb_find_altsetting (data , 6 ))
1687
+ if (btusb_find_altsetting (data , 6 )) {
1688
+ data -> usb_alt6_packet_flow = true;
1690
1689
new_alts = 6 ;
1691
- else
1690
+ } else if (test_bit (BTUSB_USE_ALT1_FOR_WBS , & data -> flags )) {
1691
+ new_alts = 1 ;
1692
+ } else {
1692
1693
bt_dev_err (hdev , "Device does not support ALT setting 6" );
1694
+ }
1693
1695
}
1694
1696
1695
1697
if (btusb_switch_alt_setting (hdev , new_alts ) < 0 )
@@ -4004,6 +4006,15 @@ static int btusb_probe(struct usb_interface *intf,
4004
4006
btusb_check_needs_reset_resume (intf );
4005
4007
}
4006
4008
4009
+ if (id -> driver_info & BTUSB_AMP ) {
4010
+ /* AMP controllers do not support SCO packets */
4011
+ data -> isoc = NULL ;
4012
+ } else {
4013
+ /* Interface orders are hardcoded in the specification */
4014
+ data -> isoc = usb_ifnum_to_if (data -> udev , ifnum_base + 1 );
4015
+ data -> isoc_ifnum = ifnum_base + 1 ;
4016
+ }
4017
+
4007
4018
if (IS_ENABLED (CONFIG_BT_HCIBTUSB_RTL ) &&
4008
4019
(id -> driver_info & BTUSB_REALTEK )) {
4009
4020
hdev -> setup = btrtl_setup_realtek ;
@@ -4015,21 +4026,16 @@ static int btusb_probe(struct usb_interface *intf,
4015
4026
* (DEVICE_REMOTE_WAKEUP)
4016
4027
*/
4017
4028
set_bit (BTUSB_WAKEUP_DISABLE , & data -> flags );
4029
+ if (btusb_find_altsetting (data , 1 ))
4030
+ set_bit (BTUSB_USE_ALT1_FOR_WBS , & data -> flags );
4031
+ else
4032
+ bt_dev_err (hdev , "Device does not support ALT setting 1" );
4018
4033
4019
4034
err = usb_autopm_get_interface (intf );
4020
4035
if (err < 0 )
4021
4036
goto out_free_dev ;
4022
4037
}
4023
4038
4024
- if (id -> driver_info & BTUSB_AMP ) {
4025
- /* AMP controllers do not support SCO packets */
4026
- data -> isoc = NULL ;
4027
- } else {
4028
- /* Interface orders are hardcoded in the specification */
4029
- data -> isoc = usb_ifnum_to_if (data -> udev , ifnum_base + 1 );
4030
- data -> isoc_ifnum = ifnum_base + 1 ;
4031
- }
4032
-
4033
4039
if (!reset )
4034
4040
set_bit (HCI_QUIRK_RESET_ON_CLOSE , & hdev -> quirks );
4035
4041
0 commit comments