FROMGIT: Bluetooth: btusb: Add HCI Drv commands for configuring altsetting
Although commit 75ddcd5a ("Bluetooth: btusb: Configure altsetting for HCI_USER_CHANNEL") has enabled the HCI_USER_CHANNEL user to send out SCO data through USB Bluetooth chips, it's observed that with the patch HFP is flaky on most of the existing USB Bluetooth controllers: Intel chips sometimes send out no packet for Transparent codec; MTK chips may generate SCO data with a wrong handle for CVSD codec; RTK could split the data with a wrong packet size for Transparent codec; ... etc. To address the issue above one needs to reset the altsetting back to zero when there is no active SCO connection, which is the same as the BlueZ behavior, and another benefit is the bus doesn't need to reserve bandwidth when no SCO connection. This patch adds "Supported Altsettings" and "Switch Altsetting" commands that allow the user space program to configure the altsetting freely. This patch is tested on ChromeOS devices. The USB Bluetooth models (CVSD, TRANS alt3, and TRANS alt6) could pass the stress HFP test narrow band speech and wide band speech. Cc: chromeos-bluetooth-upstreaming@chromium.org 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 f647a851f3d7092b67ce78504a57ac64541fe775 https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master) Change-Id: Ia45e733826c8b954c5b371972952265d63bcb319 Signed-off-by:
Hsin-chen Chuang <chharry@google.com>
Loading
Please sign in to comment