FROMGIT: 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: b16b327e ("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> Bug: 387425332 (cherry picked from commit c01c0d443bcdd49f8179c47aa83943cc64ad9bf9 https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master) Change-Id: I54302b837357b5ee9853262462f46f0f5798ed62 Signed-off-by:
Hsin-chen Chuang <chharry@google.com>
Loading
Please sign in to comment