|
Prev: DIFxApp download help
Next: Ramdisk example and Vista
From: decoder on 1 May 2008 15:21 We have a USB 2.0 device that outputs small multiples of MPEG2 TS packets(188 bytes), and therefore need to queue up multiple BULK requests to the USB bus driver(USBD) in order to keep the MPEG2 video flowing without dropping packets. Since in BULK mode our requests are not aligned on 512 byte boundaries, submitting a large buffer to the USBD does not help, since in BULK mode a transaction of less than 512 bytes ends the session. So the question is: What is the best way to queue up multiple BULK requests with small buffers in the driver? Are System Work Items a way to go, queue up multiple initially, then requeue in the callback? The DDK docs indicate that the System thread pool is a shared resource and should be used sparingly... Any suggestions would be appreciated. Thanks -decoder
From: Tim Roberts on 2 May 2008 00:55 "decoder" <rcg_golf(a)verizon.net> wrote: > >We have a USB 2.0 device that outputs small multiples of MPEG2 TS >packets(188 bytes), and therefore need to queue >up multiple BULK requests to the USB bus driver(USBD) in order to keep the >MPEG2 video flowing without >dropping packets. Since in BULK mode our requests are not aligned on 512 >byte boundaries, submitting a >large buffer to the USBD does not help, since in BULK mode a transaction of >less than 512 bytes ends the session. > >So the question is: What is the best way to queue up multiple BULK >requests with small buffers in the driver? The solution is to change your device to send a continuous stream of 512-byte packets. Don't commit packets 188 bytes at a time. Otherwise, you'll never be able to keep up. Alternatively, you could switch to an isochronous pipe and set the max packet size to 188. -- Tim Roberts, timr(a)probo.com Providenza & Boekelheide, Inc.
From: decoder on 2 May 2008 13:25 > The solution is to change your device to send a continuous stream of > 512-byte packets. Don't commit packets 188 bytes at a time. Otherwise, > you'll never be able to keep up. > > Alternatively, you could switch to an isochronous pipe and set the max > packet size to 188. Your points are well taken, and as a future modification we may be able to modify the device... But since the device modification is not trivial, and we need to use BULK mode in addition to ISO with the current device, the question is: Besides using System Work Items in the driver, is there a better way or recommended technique that does not involve using the Work Items( queuing/re-queuing) etc.? Thanks -decoder "
From: Tim Roberts on 3 May 2008 23:35 "decoder" <rcg_golf(a)verizon.net> wrote: > >Your points are well taken, and as a future modification we may be able to >modify the device... > >But since the device modification is not trivial, and we need to use BULK >mode >in addition to ISO with the current device, the question is: > >Besides using System Work Items in the driver, is there a better way or >recommended technique >that does not involve using the Work Items( queuing/re-queuing) etc.? You don't need work items. You can queue up two dozen URBs with 512 bytes each, then resubmit them in the completion routine, but the throughput will never be as good as the other options. -- Tim Roberts, timr(a)probo.com Providenza & Boekelheide, Inc.
|
Pages: 1 Prev: DIFxApp download help Next: Ramdisk example and Vista |