[wdmaudiodev] Re: Audio Miniport Driver Design Question

  • From: Tom Eckert <teckert@xxxxxxxxxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Thu, 02 Aug 2007 16:50:30 -0400


    Thanks a lot for your help. It seems to me, I should implement my
driver as a multifunctional one.

  But the problem is,  there is a single device ID to the device as a
whole and no separate PCI base-address registers (BARs) for the
individual subdevices. As I mentioned in my earlier mail  that I got
the ResourceList with MemoryCount = 1, IRQCount =1 and the
DevPrivCount=1.
I don't think a multifunction driver is appropriate here and would introduce much more complexity than is necessary. If your determined to go that route check out some bus driver example code.
  Also, even if I treat my device as a collection of multiple
subdevices, then I am having much difficulties to handle my DSP side
code also identify the pins correctly which subdevice it belong to.
Whatever your implementation you will need to address the DSP side. It's dependent on your HW. It's certainly not uncommon for an adapter with multiple ports to have only one set of resources (i.e. 1 IRQ, 1 Memory range, etc.).

===>
"Depending on the HW you should be able to use the same miniport code
for all but you will need to be able to tell each instance which one
it's supposed to be and give it any device specific info it needs.  To
do this I'd suggest adding and interface to the wave miniport and call
it from StartDevice() within or after InstallSubdevice()."
<===

Since I am new to Windows driver development, the above part of your
comment is not very much clear to me. If possible, could you please
send me some snippets which can help me to understand your comment?
If your not sure how to add and interface to your miniport I'd suggest reading up on COM, at least the IUnknown functions. Or you could avoid the need for an additional interface by adding parameters to your miniport creation routines and constructors. The downside there is you will no longer be able to use the DEFINE_STD_CONSTRUCTOR() macro.
Below is the complete wave filter diagram which I need to implement.

       //
        //                      +---------+       +--------+
        //                       | Wave |        | Topo  |
        //                       |          |        |          |
        //    Capture <---  |3      1|<===|3       1|<--- Line In
        //   (WAVEIN)     |          |        |          |
        //                       |          |        |          |
        //   Render --->    |0      2|===>|0       2|---> Line Out
        //   (WAVEOUT)  |         |        |           |
        //                       |          |        |          |
        //     Capture <--- |7      5|<===|7       5|<--- Line In
        //   (WAVEIN)     |          |        |          |
        //                       |          |        |          |
        //       Render --->|4       6|===>|4      6|<--- Line Out
        //   (WAVEOUT)  |          |        |          |
        //                       |           |        |          |
        //      Capture <---|11     9|<===|11     9|<--- Line In
        //     (WAVEIN)   |          |        |           |
        //                       |          |        |           |
        //      Render --->|8     10|===> |8     10|<--- Line Out
        //  (WAVEOUT)  |          |        |           |
        //                       |          |        |          |
        //   Capture <---  |15    13|<===|15   13|<--- Line In
        //   (WAVEIN)    |           |        |          |
        //                      |           |        |          |
        //      Render --->|12    14|===>|12   14|<--- Line Out
        //  (WAVEOUT)  |           |       |           |
        //                      |           |       |           |
        //     Monitor --->|16        |       |           |
        //  (WAVEOUT)+-----------+     +----------+
        //
     //

Please let me know, if it is possible at all,  in such a scenario how
to make my channels/devices (PINs) to be visible to mmsdk APIs and
make my driver works properly.
The system will only expose one capture pin and one render pin from each subdevice through the legacy APIs.


- Tom

Other related posts: