none
Multiple devices on wavedev.dll RRS feed

  • Question

  • Just after some pointers on a couple of possible "got-chas" that I may have over looked...

    Background -
    Originally our device was servicing an I2C ADC... This ADC DMA'd into buffers handled by the WAV_API.

    Since then I have updated our device driver and added an new SPI ADC... This ADC also DMA's into buffers handled by the WAV_API.

    Both ADCs are to run concurrently, with events being fired to a "registered" application - using waveOpen/waveStart

    Problem -
    I have split the driver such that all common portion of the wavein class are inherited by both types of wavin devices (ie - I have a wavin_i2s and a wavein_ssp). All buffer handling routines and notification routines are common to both wavin implementations...

    The I2S device performs as expected... This means my application that registered callbacks (events) gets the call backs, and life is good...

    However, the new SPI device (which "shares") the same buffer handling routines never gets any buffer full events...

    I have added debug messages and for both instances (I2S and SPI) you can see the DMA buffers empty, and the submitted wave header buffers fill up... Upon completion I can see the "MM_WIM_DONE", all at the correct points in time...

    However, only the I2S device signals completion...

    I have ensured that all function pointers and call back handles are valid...

    I've only ever worked with single devices... what else could I be missing? Do I need both instances to be opened and started? ie - can I test with device id 1 only? it seems my dwInstance from WAVEOPENDESC is always 0 (when the open call is made)...

    Any help would be greatly appreciated... I'll post more information as I continue debugging...

    Cheers

    Wednesday, October 27, 2010 6:15 AM