Skip to content

fix(usb): support LE ISO data over Bulk endpoints#932

Open
zxzxwu wants to merge 1 commit into
google:mainfrom
zxzxwu:usb-iso-bulk-workaround
Open

fix(usb): support LE ISO data over Bulk endpoints#932
zxzxwu wants to merge 1 commit into
google:mainfrom
zxzxwu:usb-iso-bulk-workaround

Conversation

@zxzxwu
Copy link
Copy Markdown
Collaborator

@zxzxwu zxzxwu commented May 25, 2026

Some USB Bluetooth controllers (like Intel BE200) transport LE ISO data over Bulk endpoints instead of Isochronous endpoints when Interface 1 alternate settings are not fully configured or supported for LE Audio.

This change:

  1. Adds a workaround in the host layer to intercept ACL packets using CIS/BIS handles on Bulk In, reconstructing them into ISO packets.
  2. Supports sending HCI ISO Data packets over the default Bulk Out endpoint in the USB transport layer.

This enables a full Bulk-only transport for LE Audio ISO on these controllers without requiring Interface 1 altsetting activation (+sco is not needed).

TAG=agy
CONV=8b9a01f7-32cb-4a83-9300-23c4b688d861

@zxzxwu zxzxwu requested a review from barbibulle May 25, 2026 10:05
@zxzxwu
Copy link
Copy Markdown
Collaborator Author

zxzxwu commented May 25, 2026

ISO can be transmitted now on Intel BE200 and ASUS BT-540, but there are still some problems (melformed?)

Fixed

@zxzxwu zxzxwu force-pushed the usb-iso-bulk-workaround branch 2 times, most recently from 2657d7f to eed19b1 Compare May 25, 2026 10:37
This change implements a complete Bulk-only transport for LE Audio ISO
data (CIS/BIS) on USB controllers (like Intel BE200 and ASUSTek) that
send/expect ISO data over Bulk endpoints. It also improves the stability
and compatibility of periodic advertising sync on newer controllers.

Key Changes:
1. Host Layer Workaround (Bulk In):
   - Intercepts ACL packets using CIS/BIS handles on Bulk In.
   - Adaptively reconstructs them into HCI ISO Data packets:
     * For CIS (Unicast): Dynamically determines if the receiver controller
       includes a Timestamp in the ACL-wrapped payload (Intel does not,
       Realtek does) by checking the controller's company_identifier.
       It then correctly reconstructs either a 4-byte (TS_Flag = 0) or
       8-byte (TS_Flag = 1) ISO header.
     * For BIS (Broadcast): Reconstructs an 8-byte ISO header (TS_Flag = 1)
       as BIS packets always include the Timestamp.
     This vendor-adaptive approach dynamically supports both Unicast and
     Broadcast ISO across different controller hardware (Intel & Realtek) in
     all transmitter/receiver roles.
   - Cleans up the learned TS flags from memory when the link is disconnected.
2. USB Transport Layer (Bulk Out):
   - Adds support for sending HCI ISO Data packets over the default
     Bulk Out endpoint when Isochronous endpoints are not enabled.
3. LE Periodic Sync V2 Event Support:
   - Enables `HCI_LE_PERIODIC_ADVERTISING_SYNC_ESTABLISHED_V2_EVENT` in
     the LE event mask and implements its handler in Host. This supports
     periodic sync on BT 5.4 controllers (like Intel BE200) that use the
     V2 event.

This enables seamless LE Audio Broadcast/Unicast ISO receipt and
transmission on standard USB Bluetooth controllers without requiring
alternate interface activation (+sco is not needed).

TAG=agy
CONV=8b9a01f7-32cb-4a83-9300-23c4b688d861
@zxzxwu zxzxwu force-pushed the usb-iso-bulk-workaround branch from eed19b1 to 8cb66ca Compare May 25, 2026 11:35
@zxzxwu
Copy link
Copy Markdown
Collaborator Author

zxzxwu commented May 25, 2026

A problem is that vendors have different bulk interfaces definition, though very similar, and a major problem is whether to include timestamp. Here it proposed a self-adaptive solution to determine if timestamp is present.

@zxzxwu zxzxwu marked this pull request as ready for review May 26, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant