USB Audio -- asynchronous isochronous mode

I’m developing hardware that connects to the PC over USB and I want to use asynchronous mode so the hardware provides flow control, not the PC.

Now, according to this document:
http://download.microsoft.com/download/9/c/5/9c5b2167-8017-4bae-9fde-d599bac8184a/UAA_Guidelines.doc
“In Windows Server 2003 and earlier versions of Windows, including Windows Me and Windows 98, usbaudio.sys supports the adaptive and synchronous endpoints, but does not implement the asynchronous endpoint correctly. Full support for asynchronous endpoints in usbaudio.sys is planned for Windows Vista.”

Does this exclude Windows XP SP2? Most people are still on Windows XP, so I need to know whether the standard is fully supported. XP is not mentioned in this document, and when they say Windows Server 2003 “and earlier”, they only mention ME and 98. I need to know for certain whether Windows XP SP2 supports asynchronous mode properly, and whether it was implemented in Vista as the document promises.

My second issue is a comment I read elsewhere that Windows will resample the audio if asynchronous isochronous USB Audio mode is used. Is this correct? This is not in the spirit of the USB Audio Class standard specification, and if true I will have to write a custom driver to bypass this, which I’m not looking forward to as I don’t have experience writing drivers.

Finally, I’ve been unable to get a clear answer from Microsoft regarding whether it is possible to have kmixer in such a state as to guarantee that any data sent by the player program will NOT be resampled or volume changed or in any other way modified before output, and how to get kmixer in such a state. If not, it seems kernel streaming or ASIO is the only way to bypass this, or as one sound card maker did, a custom Wave Out device that bypasses kmixer. But these latter options suffer from the need of setting the player applications to output to such interfaces.

Thanks for any help. I’ve not been able to get reliable answers on any of these from all other sources I’ve tried, so here I am :slight_smile:

xxxxx@shaw.ca wrote:

I’m developing hardware that connects to the PC over USB and I want to use asynchronous mode so the hardware provides flow control, not the PC.

Now, according to this document:
http://download.microsoft.com/download/9/c/5/9c5b2167-8017-4bae-9fde-d599bac8184a/UAA_Guidelines.doc
“In Windows Server 2003 and earlier versions of Windows, including Windows Me and Windows 98, usbaudio.sys supports the adaptive and synchronous endpoints, but does not implement the asynchronous endpoint correctly. Full support for asynchronous endpoints in usbaudio.sys is planned for Windows Vista.”

Does this exclude Windows XP SP2? Most people are still on Windows XP, so I need to know whether the standard is fully supported. XP is not mentioned in this document, and when they say Windows Server 2003 “and earlier”, they only mention ME and 98. I need to know for certain whether Windows XP SP2 supports asynchronous mode properly, and whether it was implemented in Vista as the document promises.

As I understand it, the bug in XP is that usbaudio.sys changes to the
new sample rate immediately, instead of waiting for the interval in the
bRefresh field of the endpoint descriptor. It is also my understanding
that the bug is only fixed in Vista.

You might want to ask your questions on the wdmaudiodev mailing list,
www.wdmaudiodev.com. The hard-core audio dudes hang out there, and are
very responsive to questions.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

I’m not sure what the practical implication is of this bug.

Also, I will ask this at the list you suggested, but I might as well ask it here:

Someone told me that if the device presents itself as having a hardware mixer, then kmixer gets bypassed. My question is, how is this possible if the device is over USB, when according to a Microsoft document, USB Audio always goes through kmixer first. I know the case is not custom drivers, as the device in question doesn’t use custom drivers (Benchmark DAC1). I wasn’t able to get more details…

Hmm, on the wdmaudio list they also don’t seem to know.

I came across this:
http://www.audioasylum.com/scripts/t.pl?f=pcaudio&m=18769
“Apparently if your device driver advertises itself as having a “hardware mixer” and promises to be compliant to AC97, Windows will let it do the mixing instead of using kmixer.
For example, my Audiotrack Prodigy 7.1 will play back DTS files fine, because it *has* a hardware mixer. I think this is also the case for some of the other soundcards based on the Via Envy chipset.
The reason why this discussion is interesting is because the Benchmark USB DAC claims to use generic XP USB drivers, which (I think) do not register as having a hardware mixer to the OS.”

Now, I’ve heard the same from someone at Benchmark, that they have a USB Audio Class device, yet it presents itself to Windows as having a hardware mixer and so kmixer is bypassed–and no driver is installed by the user. However, I couldn’t get any details. Their firmware was written by Centrance, and I sent Centrance an email but got no reply; and I’m sure their IP would be extremely expensive so I’d rather do it myself. But I’m not seeing how they can possibly do that trick, unless there’s a way when the device is plugged in say it’s a generic hardware mixer and then switch to USB Audio mode… I’m just guessing here so I’m sure that’s crazy

Please, don’t send the same letter for me.
Thank you very much.

On 5/28/07, xxxxx@shaw.ca wrote:
>
> Hmm, on the wdmaudio list they also don’t seem to know.
>
> I came across this:
> http://www.audioasylum.com/scripts/t.pl?f=pcaudio&m=18769
> “Apparently if your device driver advertises itself as having a “hardware
> mixer” and promises to be compliant to AC97, Windows will let it do the
> mixing instead of using kmixer.
> For example, my Audiotrack Prodigy 7.1 will play back DTS files fine,
> because it has a hardware mixer. I think this is also the case for some of
> the other soundcards based on the Via Envy chipset.
> The reason why this discussion is interesting is because the Benchmark USB
> DAC claims to use generic XP USB drivers, which (I think) do not register as
> having a hardware mixer to the OS.”
>
> Now, I’ve heard the same from someone at Benchmark, that they have a USB
> Audio Class device, yet it presents itself to Windows as having a hardware
> mixer and so kmixer is bypassed–and no driver is installed by the
> user. However, I couldn’t get any details. Their firmware was written by
> Centrance, and I sent Centrance an email but got no reply; and I’m sure
> their IP would be extremely expensive so I’d rather do it myself. But I’m
> not seeing how they can possibly do that trick, unless there’s a way when
> the device is plugged in say it’s a generic hardware mixer and then switch
> to USB Audio mode… I’m just guessing here so I’m sure that’s crazy
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>