[wdmaudiodev] KSEVENT_PINCAPS_FORMATCHANGE event and the PCEVENT_VERB_ADD

  • From: "Jesko Quenzer" <jesko@xxxxxxxxxxxxx>
  • To: <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Mon, 26 Aug 2013 09:47:29 +0200

Hi,
 
I try to add the "Dynamic Format Change Support" which is documented in
here:
http://msdn.microsoft.com/en-us/library/windows/hardware/gg463055.aspx
<http://msdn.microsoft.com/en-us/library/windows/hardware/gg463055.aspx>
to my miniport driver.
I was able to register the events to get calls to my
EventHandlerFormatChange and to my PropertyHandlerPinProposeForma
function (both taken from the document above). 
 
I also see the KSPROPERTY_TYPE_SET and KSPROPERTY_TYPE_GET calls and
everything seem to be OK.
 
There are some things I'm missing or do not understand well:
 
For example I have a device which provides Ch 1/2 and Ch 3/4 Out and
Input 1/2 and I want to keep the sample rate settings  synchronised for
all of them.
So I guess I should get a KSPROPERTY_TYPE_GET for each device after I
changed the sample rate for one of them to synchronise the others to the
new "default" sample rate.
Is this correct ?
 
The problem is I never get this call. I only get a call to
KSPROPERTY_TYPE_GET once when I open the device in the Windows CPL.
 
There are two parts in the sample code I don't understand and are
probably related:
 
NTSTATUS CMiniportHelper::GenerateFormatChangeEvent()
which calls:
m_pPortEvents->GenerateEventList(...,...,...);
 
where should I instantiate the pPortEvents and where do I call the
GenerateFormatChangeEvent ?
The source code(which I didn't write by my self) calls once:
pPort->QueryInterface (IID_IPortEvents,  (PVOID *)&pPortEvents);
in my Adapter->StartDevice function. Should I keep this instance ?
 
also  the "case PCEVENT_VERB_ADD:"  in the EventHandlerFormatChange is
never called, only  "case PCEVENT_VERB_SUPPORT:" is called.
 
Any suggestion what I'm doing wrong ?
 
Another thing is how can I distinguish which pin is opened in the CPL ?
Any idea ?
 
Thanks and Regards,

Other related posts: