Three things come to mind:|
a. Seems like you should specify the event on the device(filter) not the stream(pin) - that's what the documentation you refer to says(it talks about automation table of the filter descriptor, not of pin descriptor). And correspondingly should be calling StreamClassDeviceNotification.
b. Note that MyEventHandler is called to "enable" the event. It simply means that "somebody" is interested in listening to your events. For AVStream drivers (and I assume also for Stream class minidrivers), this is optional.
c. Once you set things up, examine your filters with KsStudio (or whatever they have for Win7!), to make sure your events are being exposed properly. You may use existing PortClass mini-port drivers(or samples) for comparison. You can perhaps even register for, and verify that the events are being fired properly with KsStudio (or some other tool).
Neetu Sand wrote:
Hi, Thanks for your responses. @Karthik - I already saw that post and am doing things the way they describe. @Tim - Yes, We should be notifying the event whenever there is a format change from driver side but we should be receive the format changes event from class driver as well. At least this is my interpretation based on the following link: http://msdn.microsoft.com/en-us/library/dd573912.aspx where it says: "In the preceding code example, the MyEventHandler custom event handler must monitor the KSEVENT_PINCAPS_FORMATCHANGE event .." Also I am making sure that I call "StreamClassStreamNotification" from streaming minidriver whenever there is a format change but class driver does not seem to enumerate format again. Let me know what you think. Thanks, Neetu. On 9/10/09, Neetu Sand <neetu.freelist@xxxxxxxxx> wrote:Hi, I am trying to implement code so that our driver can report new format capabilities under Win 7 using "Dynamic format changes". Our audio driver has been written using "Streaming minidriver" model. So I am using KSEVENT_PINCAPS_FORMATCHANGE event to implement this. In order to do this I do the following in audio minidriver: - Added KSEVENT_TABLE with a KSEVENT_ITEM entry for KSEVENT_PINCAPS_FORMATCHANGE. - Added KSEVENT_SET_TABLE with a KSEVENT_SET entry for KSEVENTSETID_PinCapsChange. - Added event details in structure- HW_STREAM_INFORMATION. - Implemented StrMiniEvent. - Provided "HwEventRoutine" in Open Stream call. I am not receiving any event callbacks from class driver so I am wondering if I am doing something wrong here. Any help is appreciated. Thanks, Neetu.****************** 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/