zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.72k stars 6.55k forks source link

Bluetooth: ISO: HCI ISO over USB #44013

Open Thalley opened 2 years ago

Thalley commented 2 years ago

Is your enhancement proposal related to a problem? Please describe. Currently it is not possible to transmit or receive HCI ISO data using e.g. the native_posix board on a board running the hci_usb or hci_usb_h4 samples.

Describe the solution you'd like Make it possible to send and receive HCI ISO data over USB using the hci_usb or hci_usb_h4 samples.

Describe alternatives you've considered N/A

Additional context

ISO USB from the core spec (version 5.3, vol 4, part B, 2.5:

2.5 ISOCHRONOUS ENDPOINTS EXPECTATIONS These isochronous endpoints transfer synchronous data to and from the Controller of the radio.

Time is the critical aspect for this type of data. The USB firmware should transfer the contents of the data to the Controllers' synchronous FIFOs. If the FIFOs are full, the data should be overwritten with new data.

These endpoints have a one (1) ms interval, as required by Chapter 9 of the USB Specification, Versions 1.0 and 1.1.

The radio is capable of three (3) 64 kb/s voice channels (and can receive the data coded in different ways – 16-bit linear audio coding is the method that requires the most data). A suggested max packet size for this endpoint would be at least 64 bytes. (It is recommended that max packet sizes be on power of 2 boundaries for optimum throughput.) However, if it is not necessary to support three voice channels with 16-bit coding, 32 bytes could also be considered an acceptable max packet size.

Thalley commented 2 years ago

@Casper-Bonde-Bose You have previously looked into this I believe. Can you share any information on how we can achieve this?

Casper-Bonde-Bose commented 2 years ago

@Thalley For USB operation native_posix relies on BlueZ to load the USB driver and forward the ISO data channel to the socket interface that Zephyr uses. Current Linux kernel do not have support for this - hence one would need to wait for support @Vudentz might be able to comment as he knows more about BlueZ than I do. A workaround could be to have the hci_usb sample application use the ACL channel for ISO data and implement multiplexing in the native-posixzephyr build based on the connection handle - which will be different for an ACL and the ISO. Such a solution will not require BlueZ support for ISO data transport. I have only ben using the hci_uart sample application.

Thalley commented 2 years ago

@jhedberg @Vudentz If you have any input on this, please share :D

zephyrbot commented 8 months ago

Hi @jhedberg,

This issue, marked as an Enhancement, was opened a while ago and did not get any traction. It was just assigned to you based on the labels. If you don't consider yourself the right person to address this issue, please re-assing it to the right person.

Please take a moment to review if the issue is still relevant to the project. If it is, please provide feedback and direction on how to move forward. If it is not, has already been addressed, is a duplicate, or is no longer relevant, please close it with a short comment explaining the reason.

@Thalley you are also encouraged to help moving this issue forward by providing additional information and confirming this request/issue is still relevant to you.

Thanks!

Thalley commented 8 months ago

This is still valid