[wdmaudiodev] Re: Windows 7 wave cyclic driver
- From: Farrah Avanesov <favanesov@xxxxxxxxxxxxx>
- To: <wdmaudiodev@xxxxxxxxxxxxx>
- Date: Wed, 1 Mar 2017 10:02:25 -0500
On Tue, 2017-02-28 at 17:19 -0800, Tim Roberts wrote:
Farrah Avanesov wrote:
I am trying to implement a wave cyclic driver for a PCI card that does
not support DMA and uses a FIFO for capture and playback. In the
IDmaChannel::CopyFrom method, the data is read from the FIFO address
(stored in mCodecBase) into the Destination buffer but I just get
garbage in the wave file saved by the application.
Are you absolutely sure that you're delivering the right format? How do
you know? Do you negotiate a format, or did you fix it to just one?
By right, do you mean wave format? The header on file captured by the
application has the correct wave format.
PULONG pBuffer = (PULONG)Destination;
Source = Miniport->AdapterCommon->m_pCodecBase;
for (ByteCount /= 4; ByteCount != 0; ByteCount--)
*pBuffer++ = READ_REGISTER_ULONG((PULONG)Source);
What happens if the FIFO goes empty? Does the hardware block, or do you
read garbage? Have you dumped the buffer here to make sure it looks OK?
I didn't show it in the code snippet above but ByteCount is actually the
number of samples in the FIFO. Yes, I've dumped the buffer to a file
(by including savedata.cpp in the msvad driver) and all the data is
Can the driver access the application memory directly?
The layers above you will have ensured that the Destination address
points to the right spot. It might be a kernel mapping of the user
buffer, but it will be the same pages.
I tried hardcoding 0xdeadbeef into the destination buffer but it still
does not appear in the captured file...
This e-mail and any attachments may contain information that is confidential to
If you are not the intended recipient, please notify me immediately by replying
to this message. Please also delete all copies. Thank you.
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
URL to WDMAUDIODEV page:
Other related posts: