fix(usb): support LE ISO data over Bulk endpoints#932
Merged
Conversation
Collaborator
Author
|
ISO can be transmitted now on Intel BE200 and ASUS BT-540, but there are still some problems (melformed?) Fixed |
eed19b1 to
8cb66ca
Compare
Collaborator
Author
|
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. |
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
8cb66ca to
17a202b
Compare
barbibulle
reviewed
Jun 3, 2026
Collaborator
barbibulle
left a comment
There was a problem hiding this comment.
This PR mentions support for sending ISO packets as well ("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.") but I don't see the corresponding code here. Are you submitting that in a separate PR?
This change adds the missing transport-side support for sending HCI ISO Data packets over the default Bulk Out endpoint when Isochronous endpoints are not enabled. - Handles HCI_ISO_DATA_PACKET (0x05) in both `usb` and `pyusb` transports. - Adds unit tests to verify the routing behavior. TAG=agy CONV=5502c76b-b272-4e43-a0b9-425a23cf137e
Collaborator
Author
|
Somehow I removed it probably during rebase... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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