We have some pretty old PCIe hardware that runs a Linux driver and my boss has asked me to look into Writing a windows driver for it.
Thus far I have mapped the BAR registers and and managed to flash an LED using a timer interrupt.
Now for the hard part.
I think it is best to give an overview about how the current hardware works rather than describing the Linux drivers. It has DMA read and write. Reading from eight audio ADC codecs and writing to to two DAC codecs.
The device has two sets of buffers for read and write (no scatter gather) to be operated in ping pong mode. The device effectively operates continuously. So when it interrupts one set of ADC codec DMA is read and a set of DAC codec to be DMA'd is written on one set of ping pong buffers. When the device interrupts again it does the same on the other set of ping pong buffers.
This indicates my problem. I have a bit of an understanding how DMA works with WDF (I am hoping to use common buffers) however the DMA read and write occur on the same interrupt.
From my understanding the requests for read() and write() are completed separately on separate iterations of the ISR.
Our user application reads the ADC data, processes it then uses this processed data to write the DAC data.
Could I just have a read DMA transaction and simply write data directly to the common buffer for the write transaction?
It looks like you're new here. If you want to get involved, click one of these buttons!
|Upcoming OSR Seminars|
|Writing WDF Drivers||25 Feb 2019||OSR Seminar Space|
|Developing Minifilters||8 April 2019||OSR Seminar Space|