Regarding issue 2, what event causes your application to look for the new endpoint in mmdevapi? Ideally, the application should implement IMMNotificationClient to receive mmdevapi notifications about endpoint changes. See http://msdn.microsoft.com/en-us/library/dd371417(VS.85).aspx. (I think the number of your issues 1 and 2 flip-flopped between your first and last messages.) Frank Yerrace Microsoft Corporation This posting is provided "AS IS" with no warranties, and confers no rights. From: wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of StarXing@xxxxxxxxxxxxxx Sent: Friday, June 05, 2009 1:18 AM To: wdmaudiodev@xxxxxxxxxxxxx Subject: [wdmaudiodev] Re: Problems about dynamic audio subdevice on Vista The 2 issues still exist after changing the device registration order (create port, register physical connection, register subdevice). 1) The endpoint still LOST randomly. However, the endpoint will appear after restarting "Windows Audio Endpoint Builder" service. 2) The endpoint can not be found through MMDevice API randomly, if we try to locate it sooner after the endpoint registration. In this case, we could find the endpoint if we retry several times. It seems that the MMDevice API needs some time to update the device endpoint info. So I have 2 questions: About issue1: How should driver informs Audio Endpoint Builder to reenumerate the endpoints? About issue2: I want to know the latency between device registration and MMDevice API get the device information. How long do I need to wait for the API ready (MMDevice API populate the endpoint info)? Thanks. HW -----邮件原件----- 发件人: wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx> [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] 代表 Jeff Pages 发送时间: Friday, June 05, 2009 11:36 AM 收件人: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx> 主题: [wdmaudiodev] Re: Problems about dynamic audio subdevice on Vista The ac97 sample is wrong in this respect for Vista. The registering the topology subdevice MUST be the last thing you do, and unregistering it must be the first thing. There was a post from one of the Microsoft people some time back about this. Apparently the audio engine starts building an endpoint when the topology port is registered, but if the wave subdevice and/or physical connection isn't present all hell breaks loose. Jeff ________________________________ 发件人: wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] 代表 StarXing@xxxxxxxxxxxxxx 发送时间: Friday, June 05, 2009 11:22 AM 收件人: wdmaudiodev@xxxxxxxxxxxxx 主题: [wdmaudiodev] 答复: Re: Problems about dynamic audio subdevice on Vista Thanks Jeff. I follows the WDK ac97 samples to instantiate/uninstantiate the audio subdevice, and in most cases it works well. That is: create wave/topology port/miniport -> register wave/topology subdevice -> register physical connection when instantiating subdevice and remove physical connection -> unregister wave/topology subdevcie->release ports when uninstantiating subdevices. I doubt whether this is a timing issue. That is to say, I should wait some for the audio subsystem to prepare the audio api's well. Thanks again. Regards. HW ________________________________ 发件人: wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] 代表 Jeff Pages 发送时间: Friday, June 05, 2009 11:06 AM 收件人: wdmaudiodev@xxxxxxxxxxxxx 主题: [wdmaudiodev] Re: Problems about dynamic audio subdevice on Vista Make sure that when a subdevice is instantiated, you create the wave and topology ports/miniports, register the physical connection, THEN register the wave subdevice and finally the topology subdevice. Likewise when removing a subdevice, unregister the topology subdevice first, then the wave subdevice, the physical connection and finally release the ports. Apparently if it's not done in that order, a race condition can occur which does what you're describing. Jeff ----- Original Message ----- From: StarXing@xxxxxxxxxxxxxx<mailto:StarXing@xxxxxxxxxxxxxx> To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx> Sent: Friday, June 05, 2009 12:49 PM Subject: [wdmaudiodev] Problems about dynamic audio subdevice on Vista Hello everyone, I am develping an audio driver which implement dynamic audio subdevice on windows vista. The audio subdevice can be instantiated/uninstantiated on behalf of user's request through deviceIO control. Afterinstantiating the audio subdevice, the user would like to locate thate audio endpoints through MMDevice API and render through that device. In most cases these are running without trouble except two strange issues. 1) Can't locate the audio subdevice through MMDevice API although we can see it in system audio control panel 2) Can't see the audio subdevice in system audio control panel In case 2, the audio subdevice will appear in system audio control panel if we restart the "Windows Audio Endpoint Builder" services. Any pointers on these 2 issues are greatly appreciated. Thanks and regards, HW