From: "Andrew Fish" <afish@apple.com>
To: edk2-devel-groups-io <devel@edk2.groups.io>,
Ethin Probst <harlydavidsen@gmail.com>
Cc: "Leif Lindholm (Nuvia address)" <leif@nuviainc.com>,
Ray Ni <ray.ni@intel.com>
Subject: Re: [edk2-devel] USB isochronous transfers
Date: Tue, 20 Jul 2021 10:23:59 -0700 [thread overview]
Message-ID: <C2AFFFF4-CA35-43E6-9A2F-C0E5A086DCCA@apple.com> (raw)
In-Reply-To: <CAJQtwF1eO6LqX6hE0vxjq45x_4fF4UD4_PdnF1kZZwwk5G6Few@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2325 bytes --]
> On Jul 20, 2021, at 8:32 AM, Ethin Probst <harlydavidsen@gmail.com> wrote:
>
> Hello all,
>
> A few days ago Leif determined that the USB DXE does not implement
> isochronous transfers. This will make USB Audio quite impossible as
> the audio data endpoint requires isochronous transfers.
>
> I was looking at the EHCI driver but I can't determine a couple things:
>
> - Isochronous transfers have a different structure compared to other
> URB types. (Each URB type may have its own structure -- I haven't
> checked.)
> - I can't seem to figure out how this is handled in, say, EhciDxe.
> - If we were to try and implement this -- though I'm not quite sure
> how -- would we need to modify the PEIs too?
>
I don’t think we would need to change PEI.
1s you need to figure out which UsbIo service you would need to code the USB Audio driver against.
MdePkg/Include/Protocol/UsbIo.h:485: EFI_USB_IO_ISOCHRONOUS_TRANSFER UsbIsochronousTransfer;
MdePkg/Include/Protocol/UsbIo.h:486: EFI_USB_IO_ASYNC_ISOCHRONOUS_TRANSFER UsbAsyncIsochronousTransfer;
That service would likely be implemented on top of the matching USB Host Controller service.
MdePkg/Include/Protocol/Usb2HostController.h:635: EFI_USB2_HC_PROTOCOL_ISOCHRONOUS_TRANSFER IsochronousTransfer;
MdePkg/Include/Protocol/Usb2HostController.h:636: EFI_USB2_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER AsyncIsochronousTransfer;
MdePkg/Include/Protocol/UsbHostController.h:480: EFI_USB_HC_PROTOCOL_ISOCHRONOUS_TRANSFER IsochronousTransfer;
MdePkg/Include/Protocol/UsbHostController.h:481: EFI_USB_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER AsyncIsochronousTransfer;
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.
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.
Sorry I don’t know of any EFI USB Stack that implements Isochronous transfers.
Thanks,
Andrew Fish
PS FYI that post I sent about gdb should work for you too if you grab those 2 files.
> --
> Signed,
> Ethin D. Probst
>
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 9171 bytes --]
prev parent reply other threads:[~2021-07-20 17:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-20 15:32 USB isochronous transfers Ethin Probst
2021-07-20 17:05 ` [edk2-devel] " Michael D Kinney
2021-07-20 17:23 ` Andrew Fish [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C2AFFFF4-CA35-43E6-9A2F-C0E5A086DCCA@apple.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox