[wdmaudiodev] Re: Changing device format

  • From: AI Developer <developer@xxxxxxxxxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Thu, 18 Jun 2009 14:39:13 +0530

Thank You!!!

This is a very welcome change, and will solve a number of issues for our devices.

After reading your reply, I also found the document "Windows 7 Changes related to Audio Drivers", which, not surprisingly is also written by you.

Thanks.
Devendra.

Cheng-mean Liu (SOCCER) wrote:
Windows 7 supports dynamic device format change, here is some information on this feature.  



Dynamic Format Change Support 

	Before Windows 7, once an audio driver was loaded there was no way for drivers to notify the audio stack that its format capabilities had changed and needed to be reparsed without unloading and reloading the driver.  This caused some issues in scenarios such as the following:
*	There are audio devices that come with the capability to dynamically change their supported formats via hardware buttons/switches on the device.  Users needed to unload and reload the driver to get the new capabilities before Windows 7.
*	The supported formats available to an HDMI audio endpoint are related to the active display mode.  When switching display modes, HDMI endpoints would end up with an incorrect list of supported formats if the driver was not unloaded and reloaded.
*	Some SysFX APOs that come with 3rd party driver packages might add new device format such as AC3 in an encoding APO.  However, when this APO was disabled (most likely from the UI), the lack of supported format change notification would cause the wrong supported format list to be exposed.
For above reasons, the support for Dynamic Format Change was added to Windows 7.
	There are two methods for triggering the audio stack to re-evaluate a device's format capabilities.  One method is for the driver to initiate a KS event.  The KSEVENT_PINCAPS_FORMATCHANGE event in event set KSEVENTSETID_PinCapsChange was created for audio drivers to notify the audio stack of a device format capability change. (See http://msdn.microsoft.com/en-us/library/dd573912.aspx
for details). The other method is through the IAudioEndpointFormatControl  interface on the endpoint for MMDevApi applications. The MMDevApi clients (like an IHV's APO) can call IAudioEndpointFormatControl:: ResetToDefault on an endpoint to request the audio stack to re-evaluate an endpoint's device format capabilities.  For more IAudioEndpointFormatControl details, see MSDN http://msdn.microsoft.com/en-us/library/dd408145(VS.85).aspx


">> If not, how are HDMI Audio Sinks properly supported?"

This is exactly how HMDI dynamic format is supported in Windows 7 HD Audio Class Driver.

Cheng-mean Liu

-----Original Message-----
From: wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of AI Developer
Sent: Wednesday, June 17, 2009 3:44 AM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: Changing device format

Hi Uwe,

That (dynamically adding/removing subdevices) is what we're doing now, 
but I was hoping for a better/cleaner approach, specially since Hakon 
had referred to it in this post.

Thanks.
Devendra.

uwekirst wrote:
  
I think seting the format is similar to settings the sampling 
frequency, both is not possible any longer within Vista.
If you are looking through this list, you will find a possible 
solution (from the point of view of the driver developer): Dynamically 
install different drivers, each one supports one format (or sf) only.
Its also possible to install/uninstall subdevices (no need to install 
the complete driver).
/Uwe


AI Developer schrieb:
    
Looking through the list archives, I saw this posting (from Oct. 2007):

      
There is no supported/documented way to set the default device format
programmatically/dynamically from the device on Vista. This is a user
only setting on this OS version.

There have been many requests for this design to change and we are
looking into this for the next version of Windows (no - the next 
version
of Windows does not mean Service Pack 1) especially since it will be
required to properly support HDMI Audio sinks.

HakonS, Windows Sound Team PM
  
        
Has this been done yet?

If yes, what's the mechainsm?

If not, how are HDMI Audio Sinks properly supported?

Thanks.
Devendra.

******************

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: