USB Audio Driver Sample

Dear Team,

I have a custom usb audio device for audiophiles which transmits data only through control, interrupt and bulk endpoints. There are no isochronous end points in the device. In order to develop pc side us audio, should I consider softusbaudio, msvad or any other sample as the starting point. I have ddk - 7600.16385.1 version.

Regards.

xxxxx@gmail.com wrote:

I have a custom usb audio device for audiophiles which transmits data only through control, interrupt and bulk endpoints. There are no isochronous end points in the device.

Why? What will you do if there are bus retries so that a transfer is
delayed?

In order to develop pc side us audio, should I consider softusbaudio, msvad or any other sample as the starting point. I have ddk - 7600.16385.1 version.

I would use one of the AVStream samples as my starting point. MSVAD
includes a lot of stuff that won’t apply to you. You have a pretty big
job ahead of you.


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

Thanks for the pointer. I definitely see a pretty big job ahead. I have gone through the discussion at the following thread couple of years ago.

http://www.osronline.com/ShowThread.cfm?link=112321

Finally the aim is to see usb device audio driver under Sound, Video, Game Controllers section of the device manager and set the device as default one from control panel so that when I play music in media player, the transfers are to the device.

Before starting with usb stuff, I installed the existing sample without any modifications. I can see it as Legacy Audio Drivers, Legacy Video Capture Devices, Media Control Devices under Sound, Video, Game Controller of the Device Manager.

I am unable to see them under control panel default sound audio device setting section. From what I understood from the above mentioned thread is that if I manage usb abstraction correctly, ks.sys will take care of the biolerplate.

Regards.

xxxxx@gmail.com wrote:

Finally the aim is to see usb device audio driver under Sound, Video, Game Controllers section of the device manager and set the device as default one from control panel so that when I play music in media player, the transfers are to the device.

Before starting with usb stuff, I installed the existing sample without any modifications. I can see it as Legacy Audio Drivers, Legacy Video Capture Devices, Media Control Devices under Sound, Video, Game Controller of the Device Manager.

Which sample did you install?

I am unable to see them under control panel default sound audio device setting section. From what I understood from the above mentioned thread is that if I manage usb abstraction correctly, ks.sys will take care of the biolerplate.

We may have had this conversation before, but you shouldn’t need a
driver at all for a USB Audio Device. As long as you build your device
to meet the USB Audio Class spec, the standard Windows driver will do
it. That driver has had some 13 years of development and debugging;
re-engineering it is a task not to be taken lightly.


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

I installed avssamp.

Please kindly consider the following statements:

Although isochronous endpoints are used for designing streaming
applications, bulk endpoints can also be used to design the same type
of application.

Depending on the data throughput and bandwidth required, the designer
may opt for either type of endpoint. The designer must make a
decision what endpoint type to use based on the bandwidth and
throughput requirements of their application.

If the above statements are correct, can the same usbaudio.sys be used
for data streaming through bulk end points.

Regards.

On Tue, Nov 2, 2010 at 10:36 PM, Tim Roberts wrote:
> xxxxx@gmail.com wrote:
>> Finally the aim is to see usb device audio driver under Sound, Video, Game Controllers section of the device manager and set the device as default one from control panel so that when I play music in media player, the transfers are to the device.
>>
>> Before starting with usb stuff, I installed the existing sample without any modifications. ?I can see it as Legacy Audio Drivers, Legacy Video Capture Devices, Media Control Devices under Sound, Video, Game Controller of the Device Manager.
>
> Which sample did you install?
>
>> I am unable to see them under control panel default sound audio device setting section. ?From what I understood from the above mentioned thread is that if I manage usb abstraction correctly, ks.sys will take care of the biolerplate.
>
> We may have had this conversation before, but you shouldn’t need a
> driver at all for a USB Audio Device. ?As long as you build your device
> to meet the USB Audio Class spec, the standard Windows driver will do
> it. ?That driver has had some 13 years of development and debugging;
> re-engineering it is a task not to be taken lightly.
>
> –
> 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
>

Bhaskar wrote:

Please kindly consider the following statements:

Although isochronous endpoints are used for designing streaming
applications, bulk endpoints can also be used to design the same type
of application.

Depending on the data throughput and bandwidth required, the designer
may opt for either type of endpoint. The designer must make a
decision what endpoint type to use based on the bandwidth and
throughput requirements of their application.

If the above statements are correct, can the same usbaudio.sys be used
for data streaming through bulk end points.

No. Usbaudio.sys only does isochronous, because that’s what the USB
Audio Class specification requires. Your statement may be applicable
for certain types of streaming data, but not for audio. If you use a
bulk pipe, you are not Audio Class compliant.

Remember, for audio data, throughput and bandwidth are insignificant.
You have a few hundred kilobytes per second – trivial. Latency is the
critical criterion. Isochronous pipes have latency guarantees. Bulk
pipes do not.


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

Dear Bhaskar,

Good to see here, again. How is the work over there? How is you baby
doing? Are you writing Windows USB Audio drivers? What else? How is
Surendra Sir? How is your rest of the colleagues?

Convey my wishes to your family and friends.

Thanks and Regards,
Ramya.

Did you mean to send this offlist?

mm

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ramya Desai
Sent: Thursday, November 04, 2010 4:46 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] USB Audio Driver Sample

Dear Bhaskar,

Good to see here, again. How is the work over there? How is you baby
doing? Are you writing Windows USB Audio drivers? What else? How is
Surendra Sir? How is your rest of the colleagues?

Convey my wishes to your family and friends.

Thanks and Regards,
Ramya.


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

Dear Team,

Sincere Regrets and Apologies. Please kindly ignore the previous message.

Regards.

On Thu, Nov 4, 2010 at 2:19 PM, Martin O’Brien
wrote:
> Did you mean to send this offlist?
>
>
> mm
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Ramya Desai
> Sent: Thursday, November 04, 2010 4:46 AM
> To: Windows System Software Devs Interest List
> Subject: Re: [ntdev] USB Audio Driver Sample
>
> Dear Bhaskar,
>
> Good to see here, again. How is the work over there? How is you baby
> doing? Are you writing Windows USB Audio drivers? What else? How is
> Surendra Sir? How is your rest of the colleagues?
>
> Convey my wishes to your family and friends.
>
> Thanks and Regards,
> Ramya.
>
> —
> 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
>
>
> —
> 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
>

No worries.

mm

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Bhaskar
Sent: Thursday, November 04, 2010 4:55 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] USB Audio Driver Sample

Dear Team,

Sincere Regrets and Apologies. Please kindly ignore the previous message.

Regards.

On Thu, Nov 4, 2010 at 2:19 PM, Martin O’Brien
wrote:
> Did you mean to send this offlist?
>
>
> mm
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Ramya Desai
> Sent: Thursday, November 04, 2010 4:46 AM
> To: Windows System Software Devs Interest List
> Subject: Re: [ntdev] USB Audio Driver Sample
>
> Dear Bhaskar,
>
> Good to see here, again. How is the work over there? How is you baby
> doing? Are you writing Windows USB Audio drivers? What else? How is
> Surendra Sir? How is your rest of the colleagues?
>
> Convey my wishes to your family and friends.
>
> Thanks and Regards,
> Ramya.
>
> —
> 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
>
>
> —
> 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
>


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

Actually the reason for not using the isochronous endpoints are as follows:

  1. The application demands 0% audio sample loss. In Isochronous transfers packets may be lost.

  2. Audio Latency due to retransmits is OK. We will use Interrupt pipes for transfers, which has more
    priority than Bulk.

From previous thread, I cannot use usbaudio.sys because of not having isochronous endpoints. So is it a good idea to write lower filter driver and simulate isochronous transactions or develop a minidriver based on AVStream sample.

Also, before starting I want to clarify whether sample rate of 192Khz is supported in Windows XP. Vista, and 7.

Regards.

xxxxx@gmail.com wrote:

Actually the reason for not using the isochronous endpoints are as follows:

  1. The application demands 0% audio sample loss. In Isochronous transfers packets may be lost.

In the real world, this doesn’t actually happen, unless you have a
defective cable or a defective hub. A case that causes isochronous
packets to be lost is going to cause interrupt and bulk transfers to
retry, which is going to delay your stream and cause your FIFOs to fill
up. There is no perfect solution.

  1. Audio Latency due to retransmits is OK. We will use Interrupt pipes for transfers, which has more
    priority than Bulk.

That doesn’t necessarily mean what you think it does. An interrupt pipe
gets its one shot, then its done until its next scheduled time. A bulk
pipe can keep going arbitrarily.

From previous thread, I cannot use usbaudio.sys because of not having isochronous endpoints. So is it a good idea to write lower filter driver and simulate isochronous transactions or develop a minidriver based on AVStream sample.

Tough call. The lower filter would be less effort (in my opinion).
Rewrite the descriptors on the way through, and repack the buffer in
each URB. You’d still inherit the usbaudio.sys framework.

Also, before starting I want to clarify whether sample rate of 192Khz is supported in Windows XP. Vista, and 7.

Yes. The audio subsystem will handle essentially arbitrary sample
rates. It is essentially just plumbing between a producer and a consumer.


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

Sincere thanks for the pointers. I will revert back after doing my homework.

Regards.

On Mon, Nov 8, 2010 at 11:15 PM, Tim Roberts wrote:
> xxxxx@gmail.com wrote:
>> Actually the reason for not using the isochronous endpoints are as follows:
>>
>> 1. ?The application demands 0% audio sample loss. In Isochronous transfers packets may be lost.
>
> In the real world, this doesn’t actually happen, unless you have a
> defective cable or a defective hub. ?A case that causes isochronous
> packets to be lost is going to cause interrupt and bulk transfers to
> retry, which is going to delay your stream and cause your FIFOs to fill
> up. ?There is no perfect solution.
>
>> 2. ?Audio Latency due to retransmits is OK. We will use Interrupt pipes for transfers, which has more
>> ? ? priority than Bulk.
>
> That doesn’t necessarily mean what you think it does. ?An interrupt pipe
> gets its one shot, then its done until its next scheduled time. ?A bulk
> pipe can keep going arbitrarily.
>
>> From previous thread, I cannot use usbaudio.sys because of not having isochronous endpoints. ?So is it a good idea to write lower filter driver and simulate isochronous transactions or develop a minidriver based on AVStream sample.
>
> Tough call. ?The lower filter would be less effort (in my opinion).
> Rewrite the descriptors on the way through, and repack the buffer in
> each URB. ?You’d still inherit the usbaudio.sys framework.
>
>> Also, before starting I want to clarify whether sample rate of 192Khz is supported in Windows XP. Vista, and 7.
>
> Yes. ?The audio subsystem will handle essentially arbitrary sample
> rates. ?It is essentially just plumbing between a producer and a consumer.
>
> –
> 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
>