Dear Hsin-chen,
Am 24.02.25 um 14:06 schrieb Hsin-chen Chuang:
On Mon, Feb 24, 2025 at 4:42 PM Paul Menzel <pmenzel@xxxxxxxxxxxxx> wrote:
Am 24.02.25 um 03:24 schrieb Hsin-chen Chuang:
From: Hsin-chen Chuang <chharry@xxxxxxxxxxxx>
Automatically configure the altsetting for USER_CHANNEL when a SCO is
connected or disconnected. This adds support for the USER_CHANNEL to
transfer SCO data over USB transport.
Should you re-spin, it’d be great if you elaborated a little more.
Especially for the motivation. It’d be also great, if you added how to
test this.
Sure and I'll update this to the commit message in the next patch version.
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.
- 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 specific packets that indicate the air mode
change, and configure the alt setting transparently in btusb.
I tested this patch on ChromeOS devices which are now using the
Android Bluetooth stack built on top of the HCI_USER_CHANNEL. The USB
Bluetooth models could work without a customized kernel.
Awesome. Great explanation. It’d be great to have in the commit message.
I am looking forward to the next iteration.
Fixes: b16b327edb4d ("Bluetooth: btusb: add sysfs attribute to control USB alt setting")
Signed-off-by: Hsin-chen Chuang <chharry@xxxxxxxxxxxx>
---
drivers/bluetooth/btusb.c | 224 +++++++++++++++++++++++++++++++-------
1 file changed, 186 insertions(+), 38 deletions(-)
[…]
--
Best Regards,
Hsin-chen
Unrelated, and only if you care: Your signature delimiter is missing a
space at the end [1].
Kind regards,
Paul
[1]: https://en.wikipedia.org/wiki/Signature_block#Standard_delimiter