[wdmaudiodev] Re: Windows 7 wave cyclic driver

  • From: Tim Roberts <timr@xxxxxxxxx>
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Tue, 28 Feb 2017 17:19:34 -0800

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?


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?


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.

-- 
Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.

******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/

Other related posts: