<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jul 20, 2021, at 8:32 AM, Ethin Probst <<a href="mailto:harlydavidsen@gmail.com" class="">harlydavidsen@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hello all,<br class=""><br class="">A few days ago Leif determined that the USB DXE does not implement<br class="">isochronous transfers. This will make USB Audio quite impossible as<br class="">the audio data endpoint requires isochronous transfers.<br class=""><br class="">I was looking at the EHCI driver but I can't determine a couple things:<br class=""><br class="">- Isochronous transfers have a different structure compared to other<br class="">URB types. (Each URB type may have its own structure -- I haven't<br class="">checked.)<br class="">- I can't seem to figure out how this is handled in, say, EhciDxe.<br class="">- If we were to try and implement this -- though I'm not quite sure<br class="">how -- would we need to modify the PEIs too?<br class=""><br class=""></div></div></blockquote><div><br class=""></div><div>I don’t think we would need to change PEI. </div><div><br class=""></div><div><br class=""></div><div>1s you need to figure out which UsbIo service you would need to code the USB Audio driver against. </div><div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">MdePkg/Include/Protocol/UsbIo.h</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(46, 174, 187);" class="">:</span><span style="font-variant-ligatures: no-common-ligatures;" class="">485</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(46, 174, 187);" class="">:</span><span style="font-variant-ligatures: no-common-ligatures;" class="">  EFI_USB_IO_ISOCHRONOUS_TRANSFER       Usb</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(180, 36, 25);" class=""><b class="">Isochronous</b></span><span style="font-variant-ligatures: no-common-ligatures;" class="">Transfer;</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">MdePkg/Include/Protocol/UsbIo.h</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(46, 174, 187);" class="">:</span><span style="font-variant-ligatures: no-common-ligatures;" class="">486</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(46, 174, 187);" class="">:</span><span style="font-variant-ligatures: no-common-ligatures;" class="">  EFI_USB_IO_ASYNC_ISOCHRONOUS_TRANSFER UsbAsync</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(180, 36, 25);" class=""><b class="">Isochronous</b></span><span style="font-variant-ligatures: no-common-ligatures;" class="">Transfer;</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">That service would likely be implemented on top of the matching USB Host Controller service. </span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""><br class=""></span></div></div><div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">MdePkg/Include/Protocol/Usb2HostController.h</span><span style="font-variant-ligatures: no-common-ligatures; color: #2eaebb" class="">:</span><span style="font-variant-ligatures: no-common-ligatures" class="">635</span><span style="font-variant-ligatures: no-common-ligatures; color: #2eaebb" class="">:</span><span style="font-variant-ligatures: no-common-ligatures" class="">  EFI_USB2_HC_PROTOCOL_ISOCHRONOUS_TRANSFER        </span><span style="font-variant-ligatures: no-common-ligatures; color: #b42419" class=""><b class="">Isochronous</b></span><span style="font-variant-ligatures: no-common-ligatures" class="">Transfer;</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">MdePkg/Include/Protocol/Usb2HostController.h</span><span style="font-variant-ligatures: no-common-ligatures; color: #2eaebb" class="">:</span><span style="font-variant-ligatures: no-common-ligatures" class="">636</span><span style="font-variant-ligatures: no-common-ligatures; color: #2eaebb" class="">:</span><span style="font-variant-ligatures: no-common-ligatures" class="">  EFI_USB2_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER  Async</span><span style="font-variant-ligatures: no-common-ligatures; color: #b42419" class=""><b class="">Isochronous</b></span><span style="font-variant-ligatures: no-common-ligatures" class="">Transfer;</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">MdePkg/Include/Protocol/UsbHostController.h</span><span style="font-variant-ligatures: no-common-ligatures; color: #2eaebb" class="">:</span><span style="font-variant-ligatures: no-common-ligatures" class="">480</span><span style="font-variant-ligatures: no-common-ligatures; color: #2eaebb" class="">:</span><span style="font-variant-ligatures: no-common-ligatures" class="">  EFI_USB_HC_PROTOCOL_ISOCHRONOUS_TRANSFER        </span><span style="font-variant-ligatures: no-common-ligatures; color: #b42419" class=""><b class="">Isochronous</b></span><span style="font-variant-ligatures: no-common-ligatures" class="">Transfer;</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">MdePkg/Include/Protocol/UsbHostController.h</span><span style="font-variant-ligatures: no-common-ligatures; color: #2eaebb" class="">:</span><span style="font-variant-ligatures: no-common-ligatures" class="">481</span><span style="font-variant-ligatures: no-common-ligatures; color: #2eaebb" class="">:</span><span style="font-variant-ligatures: no-common-ligatures" class="">  EFI_USB_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER  Async</span><span style="font-variant-ligatures: no-common-ligatures; color: #b42419" class=""><b class="">Isochronous</b></span><span style="font-variant-ligatures: no-common-ligatures" class="">Transfer;</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><div style="font-family: Helvetica; font-size: 12px;">So for each USB HC (EHCI, XHCI, OHCI, etc) that is needed you would need to implement the required isochronous transfer. This likely involves managing the DMA queue of the hardware. </div><div style="font-family: Helvetica; font-size: 12px;"><br class=""></div><div style="font-family: Helvetica; font-size: 12px;">You would also need a generic change to the USB Bus Driver to implement the UsbIo services on top of the Usb Host Controller services. That would work for every USB Host Controller. </div><div style="font-family: Helvetica; font-size: 12px;"><br class=""></div><div style="font-family: Helvetica; font-size: 12px;">Sorry I don’t know of any EFI USB Stack that implements Isochronous transfers. </div><div style="font-family: Helvetica; font-size: 12px;"><br class=""></div><div style="font-family: Helvetica; font-size: 12px;">Thanks,</div><div style="font-family: Helvetica; font-size: 12px;"><br class=""></div><div style="font-family: Helvetica; font-size: 12px;">Andrew Fish</div><div style="font-family: Helvetica; font-size: 12px;"><br class=""></div><div style="font-family: Helvetica; font-size: 12px;">PS FYI that post I sent about gdb should work for you too if you grab those 2 files. </div><div class=""><br class=""></div></div></span></div></div><br class=""><blockquote type="cite" class=""><div class=""><div class="">-- <br class="">Signed,<br class="">Ethin D. Probst<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""></div></div></blockquote></div><br class=""></body></html>


 <div width="1" style="color:white;clear:both">_._,_._,_</div> <hr>   Groups.io Links:<p>   You receive all messages sent to this group.    <p> <a target="_blank" href="https://edk2.groups.io/g/devel/message/77982">View/Reply Online (#77982)</a> |    |  <a target="_blank" href="https://groups.io/mt/84335074/1813853">Mute This Topic</a>  | <a href="https://edk2.groups.io/g/devel/post">New Topic</a><br>    <a href="https://edk2.groups.io/g/devel/editsub/1813853">Your Subscription</a> | <a href="mailto:devel+owner@edk2.groups.io">Contact Group Owner</a> |  <a href="https://edk2.groups.io/g/devel/unsub">Unsubscribe</a>  [edk2-devel-archive@redhat.com]<br> <div width="1" style="color:white;clear:both">_._,_._,_</div>