2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/drivers/bluetooth
Hsin-chen Chuang 75ddcd5ad4 Bluetooth: btusb: Configure altsetting for HCI_USER_CHANNEL
Automatically configure the altsetting for HCI_USER_CHANNEL when a SCO
is connected.

The motivation is to enable the HCI_USER_CHANNEL user to send out SCO
data through USB Bluetooth chips, which is mainly used for bidirectional
audio transfer (voice call). This was not capable because:

- Per Bluetooth Core Spec v5, Vol 4, Part B, 2.1, the corresponding
  alternate setting should be set based on the air mode in order to
  transfer SCO data, but
- The Linux Bluetooth HCI_USER_CHANNEL exposes the Bluetooth Host
  Controller Interface to the user space, which is something above the
  USB layer. The user space is not able to configure the USB alt while
  keeping the channel open.

This patch intercepts the HCI_EV_SYNC_CONN_COMPLETE packets in btusb,
extracts the air mode, and configures the alt setting in btusb.

This patch is tested on ChromeOS devices. The USB Bluetooth models
(CVSD, TRANS alt3 and alt6) could work without a customized kernel.

Fixes: b16b327edb ("Bluetooth: btusb: add sysfs attribute to control USB alt setting")
Signed-off-by: Hsin-chen Chuang <chharry@chromium.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2025-03-07 12:43:27 -05:00
..
ath3k.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
bcm203x.c Bluetooth: bcm203x: remove superfluous header files 2022-03-18 17:12:09 +01:00
bfusb.c Bluetooth: bfusb: fix division by zero in send path 2021-10-25 15:04:46 +02:00
bluecard_cs.c Bluetooth: Use fallthrough pseudo-keyword 2020-07-10 19:09:42 +02:00
bpa10x.c Bluetooth: bpa10x: change return value 2019-09-04 16:11:46 +02:00
bt3c_cs.c Bluetooth: bt3c_cs: Fix obsolete function 2018-09-27 12:57:39 +02:00
btbcm.c Bluetooth: btbcm: Fix NULL deref in btbcm_get_board_name() 2025-01-15 10:34:27 -05:00
btbcm.h Bluetooth: hci_bcm: Add support for FW loading in autobaud mode 2022-07-21 17:04:38 -07:00
btintel_pcie.c Bluetooth: btintel_pcie: Fix a potential race condition 2025-02-13 11:14:04 -05:00
btintel_pcie.h Bluetooth: btintel_pcie: Add recovery mechanism 2024-11-14 15:30:53 -05:00
btintel.c Bluetooth: Use str_enable_disable-like helpers 2025-01-15 10:36:11 -05:00
btintel.h Bluetooth: btintel: Add DSBR support for BlazarIW, BlazarU and GaP 2024-11-14 15:31:30 -05:00
btmrvl_debugfs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_390.RULE 2022-06-10 14:51:36 +02:00
btmrvl_drv.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_390.RULE 2022-06-10 14:51:36 +02:00
btmrvl_main.c Bluetooth: Use str_enable_disable-like helpers 2025-01-15 10:36:11 -05:00
btmrvl_sdio.c Bluetooth: btmrvl: Use IRQF_NO_AUTOEN flag in request_irq() 2024-09-27 10:52:19 -04:00
btmrvl_sdio.h treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_390.RULE 2022-06-10 14:51:36 +02:00
btmtk.c Bluetooth: btmtk: Remove resetting mt7921 before downloading the fw 2025-01-15 10:35:55 -05:00
btmtk.h Bluetooth: btmtk: remove #ifdef around declarations 2024-07-26 10:56:54 -04:00
btmtksdio.c Bluetooth: Get rid of cmd_timeout and use the reset callback 2025-01-15 10:36:42 -05:00
btmtkuart.c bluetooth: Fix typos in the comments 2024-11-14 15:28:07 -05:00
btnxpuart.c Bluetooth: btnxpuart: Fix glitches seen in dual A2DP streaming 2025-01-29 15:23:49 -05:00
btqca.c Bluetooth: qca: Fix poor RF performance for WCN6855 2025-01-15 10:37:23 -05:00
btqca.h Bluetooth: qca: Expand firmware-name to load specific rampatch 2025-01-15 10:34:12 -05:00
btqcomsmd.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
btrsi.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
btrtl.c Bluetooth: btrtl: check for NULL in btrtl_setup_realtek() 2025-01-15 10:34:41 -05:00
btrtl.h Bluetooth: btrtl: Add Realtek devcoredump support 2023-08-11 11:35:14 -07:00
btsdio.c Bluetooth: btsdio: Do not bind to non-removable CYW4373 2024-09-12 12:24:08 -04:00
btusb.c Bluetooth: btusb: Configure altsetting for HCI_USER_CHANNEL 2025-03-07 12:43:27 -05:00
dtl1_cs.c
h4_recv.h move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hci_ag6xx.c Bluetooth: hci_uart: Remove redundant assignment to fw_ptr 2021-06-26 07:52:41 +02:00
hci_aml.c Bluetooth: hci_uart: Add support for Amlogic HCI UART 2024-09-10 12:44:10 -04:00
hci_ath.c Bluetooth: hci_uart: check for missing tty operations 2019-07-31 13:17:33 -07:00
hci_bcm4377.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hci_bcm.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
hci_bcsp.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hci_h4.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hci_h5.c Bluetooth: btrtl: fix out of bounds memory access 2024-03-06 17:26:21 -05:00
hci_intel.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
hci_ldisc.c bluetooth: Fix typos in the comments 2024-11-14 15:28:07 -05:00
hci_ll.c bluetooth: Fix typos in the comments 2024-11-14 15:28:07 -05:00
hci_mrvl.c Bluetooth: hci_mrvl: Add serdev support for 88W8997 2023-04-23 21:45:29 -07:00
hci_nokia.c bluetooth: Fix typos in the comments 2024-11-14 15:28:07 -05:00
hci_qca.c Bluetooth: Get rid of cmd_timeout and use the reset callback 2025-01-15 10:36:42 -05:00
hci_serdev.c Bluetooth: HCI: Remove HCI_AMP support 2024-05-14 10:54:49 -04:00
hci_uart.h Bluetooth: hci_uart: Add support for Amlogic HCI UART 2024-09-10 12:44:10 -04:00
hci_vhci.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
Kconfig Bluetooth: btusb: Configure altsetting for HCI_USER_CHANNEL 2025-03-07 12:43:27 -05:00
Makefile Bluetooth: hci_uart: Add support for Amlogic HCI UART 2024-09-10 12:44:10 -04:00
virtio_bt.c virtio: rename virtio_find_vqs_info() to virtio_find_vqs() 2024-07-17 05:20:58 -04:00