From: Nitesh Patel Nitesh on
Hi All,

WDK documentation says that Client driver should send multiple of eight
packets for high speed isochronous transfer. It doesn't say that what should
be size of each packet.
let say maximum packet size of endpoint is 1024 and application wants to
send 2048 bytes in transfer.

WDK help page link
:ms-help://MS.WDK.v10.7600.090618.01/Buses_d/hh/Buses_d/usb-io_72289110-c340-41be-aa92-2542a76b56b2.xml.htm



In this case driver can handle request two ways:

Case 1 : Send each packet of 1024 and rest of the packets to ZLP( Zero
length packet)

Case 2 : 2048/8 and send 256 bytes in each packet.

Which one is the correct implementation Case 1/2 for both Isochronous IN
and OUT transfer ?

Thanks
Nitesh
From: Tim Roberts on
Nitesh Patel <Nitesh Patel(a)discussions.microsoft.com> wrote:
>
>WDK documentation says that Client driver should send multiple of eight
>packets for high speed isochronous transfer. It doesn't say that what should
>be size of each packet.
>let say maximum packet size of endpoint is 1024 and application wants to
>send 2048 bytes in transfer.

Didn't you just ask this question on the OSR "ntdev" mailing list last
week, and didn't I post a lengthy reply?

>In this case driver can handle request two ways:
>
>Case 1 : Send each packet of 1024 and rest of the packets to ZLP( Zero
>length packet)
>
>Case 2 : 2048/8 and send 256 bytes in each packet.
>
>Which one is the correct implementation Case 1/2 for both Isochronous IN
>and OUT transfer ?

For isochronous IN, the answer is easy. The number of packets in the array
must span an even number of whole frames. So, if your interval is set to 1
(meaning every microframe), you need a multiple of 8 packets. If your
interval is 2, you need a multiple of 4 packets. If your interval is 3
(every 4th microframe) you need a multiple of 2 packets. If your interval
is 4 or more, there are no restrictions.

Further, the size of each packet in the IsoPacket array MUST be exactly the
max packet size in the endpoint descriptor. For high-bandwidth endpoints
with multiple transfers per microframe, the packet size includes the WHOLE
microframe. So, if you have the maximum possible endpoint, with 3
transfers per microframe and 1024 bytes per transfer with an interval of 1,
your packets must be 3072 bytes each, and there must be a multiple of 8 in
each URB.

For isochronous OUT, the answer is not so clear. From empirical
observations, it appears that the host controller driver never even looks
at the IsoPacket array. It assumes that your data is all packed at the
beginning of the buffer, exactly like a bulk/interrupt transfer. It will
send full packets as quickly as it can, until the buffer is empty.
--
Tim Roberts, timr(a)probo.com
Providenza & Boekelheide, Inc.