[wdmaudiodev] Inter-driver memory buffer design question (clarification)

  • From: "Raymond Bily" <RBily@xxxxxxxxxxxxxxx>
  • To: <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Wed, 19 Jul 2006 13:07:57 -0700

My earlier query was fairly general, so I would like to specify my thoughts
and would like feedback from anybody who finds a flaw with my plan, or has
an alternative suggestion:


(1)    I am trying to avoid sharing the buffer between User Mode and Kernel
Mode (in the various documentation, it appears that this has more overhead,
less security, and potential other pitfalls).  Therefore, I am trying to do
the buffer sharing between two instances of a driver while staying in Kernel


(2)    In reading Microsoft's "Locks.doc" (aka "Locks, Deadlocks, and
Synchronization), it appears I have a choice of using a "Kernel Mutex" or a
"Fast Mutex" to do the equivalent of a Mutex in the app world.  I suppose
that using the "Kernel Mutex" is sufficient, right?


(3)    The remaining problem is that I also need to identify the best way to
communicate between these driver instances.  One thought is to use the IOCTL
mechanism for each driver to communicate to the app calling it (which his
the same app), and have the app manage the passing of the buffer pointer and
the Kernel Mutex to the other.  Is this the only (or best way) to do this?
Are there any other options of passing pointers between two driver






-----Original Message-----
From: wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Raymond Bily
Sent: Tuesday, July 18, 2006 4:30 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Inter-driver memory buffer


Hi all,


I am trying to send audio data (via a shared buffer) from one "instance" to
another.  In particular, I am trying to send audio buffers between the
Capture and Render PIN's of a variation of the MSVAD driver.  It appears
from my testing that the driver code for waveIn (Capture) and waveOut
(Render) does not share any memory, so I am trying to figure out the best
way to pass data from one to the other.


Does anybody have a suggestion of the best way of sharing a memory block?
Even if I do allocate with ExAllocatePoolWithTag, how do I pass it to the
other driver instance?


I know this sounds kind of basic, but I'm pretty new to driver programming.
Any hints or thoughts would be great appreciated!!




Raymond Bily
BrightArrow Technologies, Inc.


Other related posts:

  • » [wdmaudiodev] Inter-driver memory buffer design question (clarification)