[wdmaudiodev] Re: Windows 7 wave cyclic driver

  • From: Farrah Avanesov <favanesov@xxxxxxxxxxxxx>
  • To: <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Wed, 1 Mar 2017 12:07:34 -0500

Yes, I tried using 0xdeadbeef but it was not found in the file saved by
the audio client.

On Wed, 2017-03-01 at 07:51 -0800, Wade Dawson wrote:

Have you tried using a known pattern like a sine table instead of data from 
your hardware's fifo?  Provided you generate the the table in the proper 
format and get some recognizable audio, that will tell you if everything 
above is working as you expect. If not, adjust the endianess / byte ordering 
/ generation of your test data until you get something you recognize out.

Sent from my iPhone

On Mar 1, 2017, at 07:02, Farrah Avanesov <favanesov@xxxxxxxxxxxxx> wrote:

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
there.


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 Ross Video.

If you are not the intended recipient, please notify me immediately by 
replying to this message. Please also delete all copies. Thank you.
******************

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/

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

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/



----------------------------------------------

This e-mail and any attachments may contain information that is confidential to 
Ross Video.

If you are not the intended recipient, please notify me immediately by replying 
to this message. Please also delete all copies. Thank you.
******************

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: