Getting started with audio drivers

I’m new to Windows driver programming. My experience is as HW designer
and embedded C/asm programmer. Now I want to start working on Windows
audio drivers.

Could you please give me some pointers to where to start with audio
driver development? I have downloaded WDK 7.1 and the latest Virtual
Audio Device Driver Samples. I plan to send audio data within the
computer, not to an actual audio device.

The goal of the project is to provide a bridge from a Windows audio
driver recognized in all programs - to the open source USB Audio Class
2 ASIO driver described in my previous post. (See www.qnktc.com for
more info.)

Before I get started for real, I hope you can tell me which packages
to download and which programming environments to use. I’ll also need
to read up on relevant Windows audio technology. After browsing for a
while I see there’s a lot of documentation and packages out there.

So the driver must appear on one side as a generic audio device, and
on the other as an ASIO player. It is important that the ASIO side
provides the clocking. (The ASIO driver implements asynchronous USB
audio where the DAC box is the timing master.) The driver must
(eventually) be bit correct for the sample rates the ASIO driver
supports. It must resample on all others. It must work on Windows 7.
XP support is not critical, but it would be nice to not have it
designed out. (I believe this means using WDK 7.1, not 8…)

I hope this sounds like a cool project and that you can help out a
driver newbie.

Cheers,

B?rge

On Sun, Sep 2, 2012 at 12:16 AM, B?rge Strand-Bergesen
wrote:
> I’m new to Windows driver programming. My experience is as HW designer
> and embedded C/asm programmer. Now I want to start working on Windows
> audio drivers.
>
> The goal of the project is to provide a bridge from a Windows audio
> driver recognized in all programs - to the open source USB Audio Class
> 2 ASIO driver described in my previous post. (See www.qnktc.com for
> more info.)

I do not know much about this myself. But your open source USB
Audio Class 2 ASIO driver is based on libusbK, right? And I am
wondering if it is even possible to achieve your goal here to “bridge
from a Windows audio driver recognized in all programs”.

http://msdn.microsoft.com/en-us/library/windows/hardware/ff537760
From what I read in the above URL, you need a kernel driver,
And your libusbK based driver will be a user space driver. I do
not know if is possible to achieve what you want to do.


Xiaofan

Thanks for your reply.

As a first attempt I believe the kernel mode driver will have to
forward the audio data to a user mode program acting as an ASIO
player.

B?rge

On 9/2/12, Xiaofan Chen wrote:
> On Sun, Sep 2, 2012 at 12:16 AM, B?rge Strand-Bergesen
> wrote:
>> I’m new to Windows driver programming. My experience is as HW designer
>> and embedded C/asm programmer. Now I want to start working on Windows
>> audio drivers.
>>
>> The goal of the project is to provide a bridge from a Windows audio
>> driver recognized in all programs - to the open source USB Audio Class
>> 2 ASIO driver described in my previous post. (See www.qnktc.com for
>> more info.)
>
> I do not know much about this myself. But your open source USB
> Audio Class 2 ASIO driver is based on libusbK, right? And I am
> wondering if it is even possible to achieve your goal here to “bridge
> from a Windows audio driver recognized in all programs”.
>
> http://msdn.microsoft.com/en-us/library/windows/hardware/ff537760
> From what I read in the above URL, you need a kernel driver,
> And your libusbK based driver will be a user space driver. I do
> not know if is possible to achieve what you want to do.
>
> –
> Xiaofan
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

Did you check out asio4all ? From what I can see, it just does what you are
contemplating.

//Daniel

“Børge Strand-Bergesen” wrote in message
news:xxxxx@ntdev…
The goal of the project is to provide a bridge from a Windows audio
driver recognized in all programs - to the open source USB Audio Class
2 ASIO driver described in my previous post. (See www.qnktc.com for
more info.)

Hi Daniel,

what I have in mind is the inverse of asio4all :slight_smile:

Asio4all lets an ASIO player play back audio through a generic sound
board with a working Windows driver.

In my case there is a working ASIO driver, and I want any Windows
program (not just the ASIO capable ones) to be able to play music
through it. So what I had in mind is a virtual device driver which
captures the outgoing audio and sends it to a user mode program which
in terms plays it back using the ASIO driver.

B?rge

On Sun, Sep 2, 2012 at 9:45 PM, wrote:
> Did you check out asio4all ? From what I can see, it just does what you are
> contemplating.
>
> //Daniel
>
>
> “B?rge Strand-Bergesen” wrote in message
> news:xxxxx@ntdev…
> The goal of the project is to provide a bridge from a Windows audio
> driver recognized in all programs - to the open source USB Audio Class
> 2 ASIO driver described in my previous post. (See www.qnktc.com for
> more info.)
>
>
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Børge Strand-Bergesen wrote:

Asio4all lets an ASIO player play back audio through a generic sound
board with a working Windows driver.

In my case there is a working ASIO driver, and I want any Windows
program (not just the ASIO capable ones) to be able to play music
through it. So what I had in mind is a virtual device driver which
captures the outgoing audio and sends it to a user mode program which
in terms plays it back using the ASIO driver.

Audio drivers are complicated. That’s why most people let the stock
usbaudio.sys driver handle the hardware and use asio4all to provide the
ASIO interface. Usbaudio.sys has had nearly 15 years of design,
development, testing, and improvements. Unless you have some concrete
reasons as to why the usbaudio/asio4all solution is inadequate, you’re
mostly wasting your time.

There is a virtual audio driver in the WDK (MSVAD) that could be used as
a basis for this, but as I said, it’s complicated.


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

Hi Tim,

the reason for doing this is to get support for USB Audio Class 2
(UAC2). This protocol enables higher sample rates and word lengths.
UAC2 is supported natively by Linux and Mac, not by Windows.

Using ASIO4ALL is good if you have an existing Windows driver for your
hardware and want to use it with special ASIO enabled players. Our
case is different. Here, an ASIO driver exists for the hardware, but
no Windows driver. That’s where the virtual audio driver comes in. I
do not intend to make a replacement for Usbaudio.sys with USB logic in
Kernel mode. (At least not to begin with :slight_smile:

B?rge

On Tue, Sep 4, 2012 at 7:38 PM, Tim Roberts wrote:
> B?rge Strand-Bergesen wrote:
>> Asio4all lets an ASIO player play back audio through a generic sound
>> board with a working Windows driver.
>>
>> In my case there is a working ASIO driver, and I want any Windows
>> program (not just the ASIO capable ones) to be able to play music
>> through it. So what I had in mind is a virtual device driver which
>> captures the outgoing audio and sends it to a user mode program which
>> in terms plays it back using the ASIO driver.
>
> Audio drivers are complicated. That’s why most people let the stock
> usbaudio.sys driver handle the hardware and use asio4all to provide the
> ASIO interface. Usbaudio.sys has had nearly 15 years of design,
> development, testing, and improvements. Unless you have some concrete
> reasons as to why the usbaudio/asio4all solution is inadequate, you’re
> mostly wasting your time.
>
> There is a virtual audio driver in the WDK (MSVAD) that could be used as
> a basis for this, but as I said, it’s complicated.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer