[linux-audio-dev] Re: How does ASIO work?
RonKuper at Cakewalk.com
Tue Jul 6 12:30:41 EDT 2004
I am preparing some slides about Linux audio, and while comparing Linux
with Windows, I have been wondering how the ASIO drivers manage to
obtain low latency on MS Windows, an operating system that does not seem
capable of low latency in any other way. So what tricks did Steinberg
come up with to get around that? I'd like to be able to say why the
approach is better/cleaner.
ASIO provides an interface directly to the kernel mode driver, typically
through a private device I/O control between the user mode ASIO DLL and
the kernel mode driver. By talking right to the driver, they bypass the
system component known as KMIXER, which adds 30 msec of latency to all
audio in Windows.
But ASIO isn't the only way around KMIXER. With the advent of Win32
Driver Model (WDM) Kernel Streaming (KS), the Windows O/S is indeed
capable of very low latency. WDM KS has a standardized device I/O
control set that's part of the Windows audio stack. KS makes it
possible to stream audio at sub 5-msec latency -- approaching 1 msec
latency -- using a direct interface to the "miniport" driver in the
Windows driver stack.
I wrote a white paper about all this a few years back:
There's a diagram of the audio stack in Windows which might be helpful.
Note that we never needed to create custom IOCTLs for Windows.
Microsoft followed up after this meeting by disclosing the Windows
kernel IO controls for everyone to use, known as DirectKS:
As far as I know the ASIO4All driver is built using DirectKS.
VP / Engineering
More information about the linux-audio-dev