[wdmaudiodev] Re: Audio Miniport Driver Design Question

  • From: "Chinmay Mahata" <chinmay.mahata@xxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Tue, 7 Aug 2007 17:59:41 +0530

Dear Tom and Jeff,

   Thanks a lot for your help. As you suggested, I installed 4 wave
subdevices (waveA, waveB, waveC and waveD) for the 4 ports and 1
topology subdevice in my driver. I am passing ResourceList only when I
install waveA device and do processresources, for the rest of the
subdevices I am passing NULL. The wave miniport and wave miniport
stream code are same. Only I added an instance number (port number)
member in the wave miniport class using an IUnknown interface, as you
suggested.
   Now I am able to see all my ports from the mmsdk api. And seems the
driver is working fine. I am really very much grateful to both of you
for your help.


Thanking you both again.

Best regards,
--Chinmay



On 8/3/07, Jeff Pages <jeff@xxxxxxxxxxxxxxxx> wrote:
> I've implemented multiple ports on a card (which has only one PCI ID and set
> of resources) using the multiple subdevices approach and it works just fine.
> Each port has its own wave and topology subdevice, and within each I have an
> "instance" field that I initialise when the subdevices are created so I can
> tell them apart later on. As Tom suggested, you need to use a different
> subdevice name for each instance ("waveA", "topoA", etc) which correspond to
> entries in the INF file, and don't forget to set the MaxObjects value in
> your call to PcAddAdapterDevice to the sum of all your wave and topology
> subdevices.
>
> Jeff Pages
> Innes Corporation Pty Ltd
>
> ----- Original Message -----
> From: "Chinmay Mahata" <chinmay.mahata@xxxxxxxxx>
> To: <wdmaudiodev@xxxxxxxxxxxxx>
> Cc: "Tom Eckert" <teckert@xxxxxxxxxxxxxxxx>
> Sent: Thursday, August 02, 2007 2:27 AM
> Subject: [wdmaudiodev] Re: Audio Miniport Driver Design Question
>
>
> > Dear Tom,
> >
> >    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.
> >  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.
> >
> >
> > ===>
> > "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?
> >
> > 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.
> >
> >  Please send me your comments and suggestions.
> > If you need some more info please let me know.
> >
> > Thanks in advance.
> >
> > With best regards,
> > --Chinmay
> >
> >
> >
> >
> > On 7/31/07, Tom Eckert <teckert@xxxxxxxxxxxxxxxx> wrote:
> >> Chinmay,
> >> If you want your ports to be reported as separate devices by the legacy
> >> APIs you need separate subdevices, i.e.:
> >>
> >>   InstallSubdevice(..., "WaveA",...);
> >>   InstallSubdevice(..., "WaveB",...);
> >>   InstallSubdevice(..., "WaveC",...);
> >>   InstallSubdevice(..., "WaveD",...);
> >>
> >> And you will need AddInterface entries for each in the INF.
> >>
> >> 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().
> >>
> >> - Tom
> >>
> >>
> >> Chinmay Mahata wrote:
> >> > Dear All,
> >> >     I have to develop an WDM Audio Miniport driver for a PCI device
> >> > which has 4 physical ports (A, B, C, D), all 4 ports can work as an
> >> > input device/channel as well as an output device/channel. The platform
> >> > is WinXP SP2. I've already implemented the driver based on DDK sb16
> >> > and AC97 sample for only one pair of channels (1 input, 1 output). I
> >> > seems it is working fine.
> >> >
> >> > Now I should implement support for the rest of the channels, but I
> >> > don't have any idea how.
> >> >
> >> >    Here I am giving some details of my device:
> >> >
> >> > Form the PCI bus controller I got the ResourceList with MemoryCount =
> >> > 1, IRQCount=1 and the DevPrivCount=1. Since the memoryCount is one, in
> >> > my driver code (adapter.cpp) I installed two subdevices.
> >> >
> >> >   InstallSubdevice(..., "Wave",...);
> >> >   InstallSubdevice(..., "Topology",...);
> >> >
> >> > To implement the 4 input and 4 output devices/channels, I created
> >> > Filter factories for 4 input   devices/channels (for waveIn streams)
> >> > and 4 output devices/channels (for waveOut streams). Each
> >> > devices/channels have their own set of pins and nodes. I do not know
> >> > how to reflect these filters in the INF file under RENDER or CAPTURE
> >> > classes.
> >> >
> >> >    Now even if, the driver (sys) is installed without any error, we
> >> > can not see all the devices/channels from the user application.
> >> >
> >> > Here my queries are:
> >> > 1. How to reflect all the render and capture channels/devices in the
> >> > INF file ( I have only one installed subdevice named "Wave")?
> >> > 2. How to make my channels/devices to be visible to mmsdk APIs?
> >> >
> >> > Please let me know if you need any more details.
> >> >
> >> >   I will appreciate for any suggestions and helps.
> >> >
> >> >
> >> > Best regards,
> >> > --Chinmay
> >> > ******************
> >> >
> >> > 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/
> >>
> >>
> > ******************
> >
> > 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/
>
>
******************

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: