The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.
Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/
could you, pls, advise w/ the following topic
I'm implementing Win audio driver which exposes virtual micarray and speaker (see simpleaudiosample for ex.). It has WaveRT and Topology miniports for both speaker and mic. What I need is to change number of supported channels dynamically at runtime.
Basically, driver is based on simpleaudiosample example from ms. What I'm doing to change is:
1. Get custom IOCTL w/ new channel number;
2. Handover this channel number to mic and speaker WaveRTs;
3. In each WaveRT I do the following:
3.1. Update EndpointMinipair->DeviceMaxChannels to a new channel value;
3.2. Update streaming pin's audio format data range (have only one entry) w/ new max channel number;
3.3. Update streaming pin's array with supported device formats and modes (basically formats in this structure) w/ new max channel number;
3.4. Emit KSEVENT_PINCAPS_FORMATCHANGE event for streaming pin (event is present in automation table for streaming pin and properly registered in port driver w/ AddEventToEventList() upon PCEVENT_VERB_ADD);
My expectation is that upon KSEVENT_PINCAPS_FORMATCHANGE , port driver will call KSPROPERTY_PIN_PROPOSEDATAFORMAT (implemented only set) / KSPROPERTY_PIN_PROPOSEDATAFORMA2 (implemented only get) and IMiniportWaveRT::DataRangeIntersection(), and will adjust streaming pin's format to new number of channels. My expectation to vary number of channels to any value in the range [0;32].
Problem is that:
I've tried to debug different things, but could not solve 'NOT OK' case. I also don't understand why there is difference between speaker and mic when KSEVENT_PINCAPS_FORMATCHANGE is emitted (mic: initialized, speaker: not). Could you, pls, share your expertise and help me to clarify how to find the root cause of 'NOT OK' case? Thank you for your time
|Upcoming OSR Seminars
|OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
|13-17 May 2024
|1-5 Apr 2024
|Internals & Software Drivers
|11-15 Mar 2024
|Writing WDF Drivers
|20-24 May 2024