So are you calling IoSetDeviceInterfaceState on the interface for the subdevice?
Jeff Pages wrote:
No, it doesn't, because there's still only one topology subdevice (which describes the endpoints that appear in the audio control panel), and only one of the wave subdevices is ever registered on the system at any given time. It's like the software equivalent of having plug-in daughter boards, each supporting only one sampling rate, but only one can ever be plugged in at a time.Jeff ----- Original Message ----- From: "Matt Gonzalez" <matt@xxxxxxxxxxxxx> To: <wdmaudiodev@xxxxxxxxxxxxx> Sent: Thursday, January 11, 2007 11:03 AMSubject: [wdmaudiodev] Re: External clock synchronization and sample rate issueDoesn't that give you three different audio devices in the audio control panel?Jeff Pages wrote:Hi Philip,Here's the original suggestion I got from Frank Yarrace (this was on the 14th November 2006) - it probably expresses it a bit more clearly than I did:Here is another possible alternative solution that we've talked about here. If the number of different configurations is small (such as the three alternatives of 44.1, 48,and 96KHz) then your driver can implement a different PnP device interface ("subdevice" in portcls terminology) for each of the three configurations. Each device interface supports only one sample rate, like you said below "create just one entry in the pin data range table and make its sampling rate equal to the hardware rate." One device interface supports only 44.1, another supports only 48, and another supports only 96. Your driver reads the state of your hardware's sample rate selector control and enables only the one device interface (subdevice) that corresponds to that configuration and disables the others.----- Original Message ----- From: "Philip Lukidis" <plukidis@xxxxxxxxxxxxx> To: <wdmaudiodev@xxxxxxxxxxxxx> Sent: Thursday, January 11, 2007 10:08 AMSubject: [wdmaudiodev] Re: External clock synchronization and sample rate issueThanks for your response, I'll read up on this and see if this will help me. Again, thanks.Philip Lukidis-----Original Message----- From: wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx]On Behalf Of Jeff Pages Sent: Wednesday, January 10, 2007 5:55 PM To: wdmaudiodev@xxxxxxxxxxxxx Subject: [wdmaudiodev] Re: External clock synchronization and sample rate issue I had a similar problem, where I wanted the audio engine sampling rate of each endpoint to match the hardware clock on my card which was set globally in a driver property page. One of the Microsoft people suggested I have several different wave miniports (each with a different name) defined in my inf file and driver, with each supporting only one sampling rate in its pin datarange structure, and only instantiating the one corresponding to the hardware clock. Since my driver was unloaded and reloaded if the hardware clock was changed in my Device Manager property page, this was pretty easy to implement and worked well. In your case, where the external clock can change while the driver's running, you might be able to use the IUnregisterPhysicalConnection and IUnregisterSubdevice interfaces to remove the current subdevice and then activate and register the one corresponding to the new rate (see the stuff on Dynamic Audio Subdevices in the WDK). Jeff Pages Innes Corporation Pty Ltd----- Original Message ----- From: "Philip Lukidis" <plukidis@xxxxxxxxxxxxx>To: <wdmaudiodev@xxxxxxxxxxxxx> Sent: Thursday, January 11, 2007 9:20 AM Subject: [wdmaudiodev] External clock synchronization and sample rate issue > Hello. I'm wondering if anyone else has any clue about solving this > issue. My audio device can be clocked from an external source. For > example, the audio format of the device can be set to 16 bits 44100 in the > advanced tab in the MS audio cpl, and thereafter using our own control > panel be clocked off an external source which is at the same rate of > 44100. > > Now say that the external source's clock changes from 44100 to 48000. > Under XP, my datarange intersection handler would merely constrain the > format's sample rate to match the new external sample rate. Under Vista, > the system will never try to send at any other rate other than what is the > selected rate in the advanced tab of the audio device. > > Does anyone have a suggestion as to how to cope with this? Is there a way > to programmatically change the selected format of the device? Or is there > another approach? > > thank you, > > Philip Lukidis > ****************** > > WDMAUDIODEV addresses: > Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx > Subscribe:mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribeUnsubscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribeModerator: mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx URL to WDMAUDIODEV page: http://www.wdmaudiodev.com/****************** WDMAUDIODEV addresses: Post message: mailto:wdmaudiodev@xxxxxxxxxxxxxSubscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe Unsubscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribeModerator: mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx URL to WDMAUDIODEV page: http://www.wdmaudiodev.com/ ****************** WDMAUDIODEV addresses: Post message: mailto:wdmaudiodev@xxxxxxxxxxxxxSubscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe Unsubscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribeModerator: mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx URL to WDMAUDIODEV page: http://www.wdmaudiodev.com/****************** WDMAUDIODEV addresses: Post message: mailto:wdmaudiodev@xxxxxxxxxxxxxSubscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe Unsubscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribeModerator: 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=subscribeUnsubscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribeModerator: 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=subscribeUnsubscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribeModerator: 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/