[wdmaudiodev] Re: Problem about GetMapping() / ReleaseMapping() in WavePCI

  • From: Ken Cooper <Ken.Cooper@xxxxxxxxxxxxx>
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Mon, 20 Oct 2008 11:28:20 -0700

There should be no difference in audio quality between WaveCyclic and WavePci.  
If you are having issues with WaveCyclic, then you are likely doing something 
wrong in your driver.  The IRP handling between the two models is essentially 
the same, with the main difference that in the case of WavePci we hand you the 
page mappings from the mapped IRP buffer and in WaveCyclic we copy the data 
from the IRP buffer into your cyclic buffer based on your indication of DMA 
position with a DPC that is scheduled whenever you notify us.

We originally wrote WaveCyclic to support the legacy DMA controllers of the day 
(circa 1997) that couldn't do scatter-gather.  The cost being that a data copy 
was needed between the IRP buffer written by the application and the DMA buffer 
accessible to the hardware.  WavePci was written to eliminate the need for the 
data copy for DMA controllers that could support scatter-gather.  While we 
saved CPU with the elimination of the data copy, we added overhead with all of 
the mapping management.

If you are looking to support Vista/Win7 and don't care about back-porting to 
XP, you can use the WaveRT model that we introduced in Vista.  In this model 
the hardware DMA buffer is mapped directly into the application's usermode 
process space and there is no streaming IRP flow at all.  The application 
writes directly into the DMA buffer based on the DMA position (that it can read 
either from a memory-mapped register or using the traditional property 

Best Regards,


From: wdmaudiodev-bounce@xxxxxxxxxxxxx 
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of pritesh gajjar
Sent: Saturday, October 18, 2008 12:10 AM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: Problem about GetMapping() / ReleaseMapping() in 

Hi Devendra,
audio quality is not really good in waveCyclic miniport driver
What makes you think so?
My conjecture is that the IRP handling and queueing is done by portcls in our 
buffer, whose address we give to PortCls through SystemAddress(). So it may due 
to overrunning of read pointer in buffer. Due to which buffer gets emptied and 
waits for new IRPs to get write pointer move ahead, then everything moves 
smoothly for few seconds. Same thing repeated again. Since that read /write 
pointer is not in our hand, we can not much about it. That's where WavePCI has 
advantage over WaveCyclic.

Thanks and regards

Other related posts: