Discussion:
[libusb] Integrating isochronous support in the WinUSB backend
Philemon Favrod
2017-02-28 14:55:47 UTC
Permalink
Hi libusb folks,

I recently implemented isochronous transfer support in the libusb WinUSB
backend. I think it would be great to merge it with the main line as
this is a requested feature. I couldn't find any information about what
is the procedure to contribute to libusb. Please let me know what are
the steps.

You can find my fork here: https://github.com/philemonf/libusb. The
limitations of my implementation are the one inherited from the WinUSB
API, i.e. isochronous transfers must be aligned to 1-ms frame
boundaries. I tried to design the code so that, if it is used on an
older Windows platform than 8.1, i.e. the ones with no isochronous
support in WinUSB, the behavior is as it was before: the user gets a
LIBUSB_ERROR_NOT_SUPPORTED error code.

I successfully tested my code on an isochronous IN endpoint. I didn't
get the chance to test the OUT direction at the moment. This is on my
TODO list though. Let me know if there are tests you would require to
merge such a change.

I am looking forward to hearing from the libusb community!

Sincerely,
Phil
Xiaofan Chen
2017-03-02 12:31:18 UTC
Permalink
On Tue, Feb 28, 2017 at 10:55 PM, Philemon Favrod
Post by Philemon Favrod
Hi libusb folks,
I recently implemented isochronous transfer support in the libusb WinUSB
backend. I think it would be great to merge it with the main line as
this is a requested feature. I couldn't find any information about what
is the procedure to contribute to libusb. Please let me know what are
the steps.
You can find my fork here: https://github.com/philemonf/libusb. The
limitations of my implementation are the one inherited from the WinUSB
API, i.e. isochronous transfers must be aligned to 1-ms frame
boundaries. I tried to design the code so that, if it is used on an
older Windows platform than 8.1, i.e. the ones with no isochronous
support in WinUSB, the behavior is as it was before: the user gets a
LIBUSB_ERROR_NOT_SUPPORTED error code.
I successfully tested my code on an isochronous IN endpoint. I didn't
get the chance to test the OUT direction at the moment. This is on my
TODO list though. Let me know if there are tests you would require to
merge such a change.
I am looking forward to hearing from the libusb community!
Thanks for the sharing. It is great you post in the mailing list.
You can create a pull request in github.
https://github.com/libusb/libusb/pulls

BTW, could you look at this pull request as well?
https://github.com/libusb/libusb/pull/246

Original ticket here.
https://github.com/libusb/libusb/issues/46
--
Xiaofan
Philemon Favrod
2017-03-06 12:15:31 UTC
Permalink
Thank you Xiaofan for answering! I'll create a pull request as soon as I
manage to find the time to test and finalize the OUT direction.

I had a look at the pull request you mentioned that implements
isochronous transfers using libusbK (not WinUSB). I have seen two
potential issues:
- as indicated by a TODO in the code, the USBD_STATUS of received
isochronous packets aren't translated to their libusb counterparts; and
- the libusb API invariants may be violated for outgoing transfers as
the packet descriptors potentially populated by the user (offsets and
lengths) aren't taken into account or, at least, checked for contiguity
if the libusbK API doesn't support non-contiguous transfers.

I hope this helps!
Post by Xiaofan Chen
On Tue, Feb 28, 2017 at 10:55 PM, Philemon Favrod
Post by Philemon Favrod
Hi libusb folks,
I recently implemented isochronous transfer support in the libusb WinUSB
backend. I think it would be great to merge it with the main line as
this is a requested feature. I couldn't find any information about what
is the procedure to contribute to libusb. Please let me know what are
the steps.
You can find my fork here: https://github.com/philemonf/libusb. The
limitations of my implementation are the one inherited from the WinUSB
API, i.e. isochronous transfers must be aligned to 1-ms frame
boundaries. I tried to design the code so that, if it is used on an
older Windows platform than 8.1, i.e. the ones with no isochronous
support in WinUSB, the behavior is as it was before: the user gets a
LIBUSB_ERROR_NOT_SUPPORTED error code.
I successfully tested my code on an isochronous IN endpoint. I didn't
get the chance to test the OUT direction at the moment. This is on my
TODO list though. Let me know if there are tests you would require to
merge such a change.
I am looking forward to hearing from the libusb community!
Thanks for the sharing. It is great you post in the mailing list.
You can create a pull request in github.
https://github.com/libusb/libusb/pulls
BTW, could you look at this pull request as well?
https://github.com/libusb/libusb/pull/246
Original ticket here.
https://github.com/libusb/libusb/issues/46
Philemon Favrod
2017-03-23 15:56:48 UTC
Permalink
Hi libusb folks,

After testing outgoing transfers, the associated pull request is up:
https://github.com/libusb/libusb/pull/284/files.

I am looking forward to working with you!

-- Phil
Post by Xiaofan Chen
On Tue, Feb 28, 2017 at 10:55 PM, Philemon Favrod
Post by Philemon Favrod
Hi libusb folks,
I recently implemented isochronous transfer support in the libusb WinUSB
backend. I think it would be great to merge it with the main line as
this is a requested feature. I couldn't find any information about what
is the procedure to contribute to libusb. Please let me know what are
the steps.
You can find my fork here: https://github.com/philemonf/libusb. The
limitations of my implementation are the one inherited from the WinUSB
API, i.e. isochronous transfers must be aligned to 1-ms frame
boundaries. I tried to design the code so that, if it is used on an
older Windows platform than 8.1, i.e. the ones with no isochronous
support in WinUSB, the behavior is as it was before: the user gets a
LIBUSB_ERROR_NOT_SUPPORTED error code.
I successfully tested my code on an isochronous IN endpoint. I didn't
get the chance to test the OUT direction at the moment. This is on my
TODO list though. Let me know if there are tests you would require to
merge such a change.
I am looking forward to hearing from the libusb community!
Thanks for the sharing. It is great you post in the mailing list.
You can create a pull request in github.
https://github.com/libusb/libusb/pulls
BTW, could you look at this pull request as well?
https://github.com/libusb/libusb/pull/246
Original ticket here.
https://github.com/libusb/libusb/issues/46
Philemon Favrod
2017-05-11 08:15:31 UTC
Permalink
Hi libusb folks,

As I haven't heard back from you after I performed the changes you
requested on my pull request, I am, therefore, following up with you
about it.

You can find it here: https://github.com/libusb/libusb/pull/284/.

I know we probably all have tight schedule, but I think the community
may benefit from this patch and I am ready to adapt it to your taste.

I am looking forward to working with you!

-- Phil
Post by Philemon Favrod
Hi libusb folks,
https://github.com/libusb/libusb/pull/284/files.
I am looking forward to working with you!
-- Phil
Post by Xiaofan Chen
On Tue, Feb 28, 2017 at 10:55 PM, Philemon Favrod
Post by Philemon Favrod
Hi libusb folks,
I recently implemented isochronous transfer support in the libusb WinUSB
backend. I think it would be great to merge it with the main line as
this is a requested feature. I couldn't find any information about what
is the procedure to contribute to libusb. Please let me know what are
the steps.
You can find my fork here: https://github.com/philemonf/libusb. The
limitations of my implementation are the one inherited from the WinUSB
API, i.e. isochronous transfers must be aligned to 1-ms frame
boundaries. I tried to design the code so that, if it is used on an
older Windows platform than 8.1, i.e. the ones with no isochronous
support in WinUSB, the behavior is as it was before: the user gets a
LIBUSB_ERROR_NOT_SUPPORTED error code.
I successfully tested my code on an isochronous IN endpoint. I didn't
get the chance to test the OUT direction at the moment. This is on my
TODO list though. Let me know if there are tests you would require to
merge such a change.
I am looking forward to hearing from the libusb community!
Thanks for the sharing. It is great you post in the mailing list.
You can create a pull request in github.
https://github.com/libusb/libusb/pulls
BTW, could you look at this pull request as well?
https://github.com/libusb/libusb/pull/246
Original ticket here.
https://github.com/libusb/libusb/issues/46
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
Philemon Favrod
2017-05-26 11:54:52 UTC
Permalink
Hi all,

If I remove the commit implementing the support for wBytesPerInterval
for USB 3.0 applications in libusb_get_max_iso_packet_size(), would it
make my pull request easier to consider for review and merge?

I am talking about this commit:
https://github.com/libusb/libusb/pull/284/commits/c43b05c32824500b9f3895a6a8cbc87e6e18bc01

I realize that you might want to be more cautious about this very
feature as this might affect existing applications.

I am looking forward to hearing from you!

-- Phil
Post by Philemon Favrod
Hi libusb folks,
As I haven't heard back from you after I performed the changes you
requested on my pull request, I am, therefore, following up with you
about it.
You can find it here: https://github.com/libusb/libusb/pull/284/.
I know we probably all have tight schedule, but I think the community
may benefit from this patch and I am ready to adapt it to your taste.
I am looking forward to working with you!
-- Phil
Post by Philemon Favrod
Hi libusb folks,
https://github.com/libusb/libusb/pull/284/files.
I am looking forward to working with you!
-- Phil
Post by Xiaofan Chen
On Tue, Feb 28, 2017 at 10:55 PM, Philemon Favrod
Post by Philemon Favrod
Hi libusb folks,
I recently implemented isochronous transfer support in the libusb WinUSB
backend. I think it would be great to merge it with the main line as
this is a requested feature. I couldn't find any information about what
is the procedure to contribute to libusb. Please let me know what are
the steps.
You can find my fork here: https://github.com/philemonf/libusb. The
limitations of my implementation are the one inherited from the WinUSB
API, i.e. isochronous transfers must be aligned to 1-ms frame
boundaries. I tried to design the code so that, if it is used on an
older Windows platform than 8.1, i.e. the ones with no isochronous
support in WinUSB, the behavior is as it was before: the user gets a
LIBUSB_ERROR_NOT_SUPPORTED error code.
I successfully tested my code on an isochronous IN endpoint. I didn't
get the chance to test the OUT direction at the moment. This is on my
TODO list though. Let me know if there are tests you would require to
merge such a change.
I am looking forward to hearing from the libusb community!
Thanks for the sharing. It is great you post in the mailing list.
You can create a pull request in github.
https://github.com/libusb/libusb/pulls
BTW, could you look at this pull request as well?
https://github.com/libusb/libusb/pull/246
Original ticket here.
https://github.com/libusb/libusb/issues/46
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
libusb-devel mailing list
https://lists.sourceforge.net/lists/listinfo/libusb-devel
Loading...