xxxxx@yahoo.com wrote:
Microsoft documentation says that Client driver should send multiple of eight packets for
high speed isochronous transfer. Why is it done like that.
The rule is that each isochronous URB must cover an integral number of
frames. So, if your endpoint’s interval is 1 (meaning every
microframe), then you need a multiple of 8 packets per URB (since there
are 8 microframes perframe). If your endpoint’s interval is 2 (every
other microframe), then you need a multiple of 4 packets per URB.
Interval 3 (every 4th microframe) needs a multiple of 2 packets. With
an interval of 4 or larger, there are no restrictions.
Why? I don’t know. It probably simplifies the scheduling.
It doesn’t say that what should be size of each packet.
let say maximumpacket size of endpoint is 1024 and application wants to send 2048 bytes in
transfer.
The size of each packet MUST exactly match the endpoint’s max packet
size. No more, no less. Well, you could use more, but that would be
silly. Note that, for a high-bandwidth endpoint with multiple transfers
per microframe, the transfers are all added together to make the max
packet size. So, if you have an endpoint with an interval of 1 with a
max packet size of 1024 and 3 transfers per microframe, each URB must
contain a multiple of 8 packets, and each packet must be 3072 bytes.
In this case driver can handle request two ways:
Case 1 : Send each packet of 1024 and rest of the packets to ZLP( Sero legnth packet)
Case 2 : 2048/8 and send 256 bytes in each packet.Which one is the correct implementation Case 1/2 ?
Ah, so you are talking about an OUTPUT pipe, not an INPUT pipe. In that
case, the rules are a little fuzzy. From experience, it appears that
the host controller does not even look at the IsoPacket array for an
isochronous output URB. Instead, it treats the URB very much like a
bulk output request. It assumes that you have packed the bytes of
interest at the beginning of the buffer. I don’t think it will schedule
a zero-length packet in that case; I think it will just skip that
microframe.
In fact, I’m not even sure that the “multiple of 8” thing applies to an
isochronous output URB. It would be nice to get a little clarity on
this issue.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.