Re: Feedback endpoint poll rate

Børge Strand-Bergesen <[email protected]>
Newsgroups gmane.comp.lib.libusb.devel.windows
Message-ID <CAE9Na6GuyPK9SYyaAa7G=VJVQ9uRVwQa3G55B4Qq7D4qzfLJRw@mail.gmail.com>
Hi guys,

any input appreciated on how the ep poll rate is set in a libusbK.sys driver.

Thanks,
Borge

On Thu, Apr 10, 2014 at 10:32 AM, Børge Strand-Bergesen
<[email protected]> wrote:
> Hi guys,
>
> I'm maintaining an audio ASIO driver for USB Audio Class 2 (i.e.
> Hi-Speed).  It uses libusbK. Descriptor dump from tdd.exe attached.
> Code: https://github.com/nikkov/Win-Widget/tree/exp_asio It builds
> with VC++08.
>
> Most of it works quite well, but I have trouble setting the poll rate
> for a feedback endpoint. This ep lets the Device tell the Host if the
> latter needs to adjust the audio sample rate. That's at the core of
> asynchronous USB audio.
>
> In line 220 bInterval = 0x04. The Device uses 250us microframes.
> Regardless of what I set this bInterval to, the Windows driver polls
> the endpoint at a 1ms rate. OS X and Linux support it in built-in
> class drivers. OS X polls the ep at quite a different rate. (4 or 8ms
> if I remember correctly.) The 0x04 value is a compromize where both
> libusbK and OS X are functional. In Linux I haven't yet correlated
> bInterval to the actual poll rate.
>
> I'd like to significantly slow down the poll rate. A 32 or 64ms
> interval will probably work just fine in the application and reduce
> the load on both Host and Device.
>
> I don't know if there is a bug in the descriptor.
>
> Question: What part of the chain (OS, low-level USB driver,
> libusbK.sys, libusbk.dll, user mode application) does the actual ep
> poll timing? When parsing this value from the descriptor, how is the
> poll timing set up?
>
> I have control over the user mode application and Device firmware. And
> in both I see that correct feedback data is received and generated,
> respectively. I just don't know how to trace it through the Host and
> back to the Device.
>
>
> Thanks,
>
> Borge

------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.