MessageI was able to get the Volume Control mixer enabled by putting in the Values structure mentioned below as well as putting in a support handler (all it does is return STATUS_SUCCESS). However none of the control work, do I need to send AVC commands (this is a 1394 audio device) down to the device to adjust the volume and the mute settings, perhaps implement something in the support handler, or do I need to do something else that will make these controls functional? One other question. I have in my set of mixers which includes: Wave, SW Synth and CD Player. I assume these mixers are put there by KMixer, and they seem to do a fine job of controlling the volume or muting it, but how can I get rid of these mixers so I can control volume, mute, and balance all by myself? Thanks again for all your help, John ----- Original Message ----- From: John D. Farmer To: wdmaudiodev@xxxxxxxxxxxxx Sent: Wednesday, August 25, 2004 7:18 AM Subject: [wdmaudiodev] Re: AVStream Mixer Problems DJ, I have filled in the Values member of the structure using the &VolumeValues found in the following code: static KSPROPERTY_STEPPING_LONG VolumeRangeAndStep [] = { { 1, // SteppingDelta 0, // Reserved -32767, // Minimum 32767 // Maximum } }; static KSPROPERTY_MEMBERSLIST VolumeMembersList [] = { { { KSPROPERTY_MEMBER_RANGES, sizeof (VolumeRangeAndStep), SIZEOF_ARRAY (VolumeRangeAndStep), 0 }, (PVOID) VolumeRangeAndStep }, }; static KSPROPERTY_VALUES VolumeValues = { { STATICGUIDOF (KSPROPTYPESETID_General), VT_I4, 0 }, SIZEOF_ARRAY (VolumeMembersList), VolumeMembersList }; This still doesnt seem to make a difference, because the Volume Control mixer is still disabled. Thanks, John ----- Original Message ----- From: DJ Sisolak To: wdmaudiodev@xxxxxxxxxxxxx Sent: Tuesday, August 24, 2004 3:52 PM Subject: [wdmaudiodev] Re: AVStream Mixer Problems Hello Harry, You are correct that if the "Values" member of the structure is filled in then AVStream will make the proper responses as well as filling in a "SupportHandler". John, have you filled in either of these entries? DJ This posting is provided "AS IS" with no warranties, and confers no rights. ---------------------------------------------------------------------------- From: wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Harry Graham Sent: Tuesday, August 24, 2004 3:26 PM To: 'wdmaudiodev@xxxxxxxxxxxxx' Subject: [wdmaudiodev] Re: AVStream Mixer Problems DJ, I find this to be very strange. The DDK explicitly states the following under the "SupportHandler" member of KSPROPERTY_ITEM: Basic support queries, range queries, and relations queries are automatically handled by AVStream, which returns the relevant values from other members of this KSPROPERTY_ITEM structure. Since the range values are already defined by the "Values" member of KSPROPERTY_ITEM of the KSPROPERTY_SET of the KSAUTOMATION_TABLE in the KSNODE_DESCRIPTOR in the KSFILTER_DESCRIPTOR, it makes sense to me that AVStream should be handling the Basic Support Queries. Is the documentation wrong on this? Harry -----Original Message----- From: DJ Sisolak [mailto:dsisolak@xxxxxxxxxxxxxxxxxxxxxx] Sent: Tuesday, August 24, 2004 2:54 PM To: wdmaudiodev@xxxxxxxxxxxxx Subject: [wdmaudiodev] Re: AVStream Mixer Problems Hello John, It appears from what you have said below that a critical piece is missing. Look at the KSPROPERTY_ITEM structure you have filled in for the Volume node. You will notice a field in the structure for the "PFNKSHANDLER SupportHandler". This is the function that is called by the audio stack to determine the ranges and channels of volume controls, mutes, etc. This function is described in the DDK in the "Basic Support Queries for Audio Properties" section. DJ This posting is provided "AS IS" with no warranties, and confers no rights. -------------------------------------------------------------------------- From: wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of John D. Farmer Sent: Tuesday, August 24, 2004 2:13 PM To: wdmaudiodev@xxxxxxxxxxxxx Subject: [wdmaudiodev] Re: AVStream Mixer Problems I've got the controls all set up, now when I go to the Sounds and Audio Devices I see a 'Volume Control' mixer added to my Playback volume controls. When I bring up the 'Volume Control' mixer all the sliders on the mixer are disabled. I have implemented the KSEVENT_CONTROL_CHANGE event for these nodes, and I have implemented the KSPROPSETID_Audio properties (KSPROPERTY_AUDIO_VOLUME_LEVEL and KSPROPERTY_AUDIO_CPU_RESOURCES) for the volume nodes, as well as the Get/Set Property Handler for KSPROPERTY_AUDIO_VOLUME_LEVEL (I keep a value of the current volume, and give it back for the Get, and for the Set I check the requested volume level and if it is within range I save that value off as the current volume value and return success). I have implemented the Get Property Handler on the KSPROPERTY_AUDIO_CPU_RESOURCES. I have also implemented the KSPROPERTY_AUDIO_MUTE Property and the Get/Set Property Handlers for the Volume Control mixer (again I save off the state of the mute and give it back for the Get and I change the current mute value and return success for the Set), but when I click on the check box in the Volume Control mixer it nothing seems to happen. I can see the change happening in KS Studio after I've made the change, but I can still hear sound out of my device. So what do I need to do to enable the sliders on the Volume Control mixer and get my mute to work? Thanks, John Farmer ----- Original Message ----- From: DJ Sisolak To: wdmaudiodev@xxxxxxxxxxxxx Sent: Friday, August 20, 2004 1:27 PM Subject: [wdmaudiodev] Re: AVStream Mixer Problems OK, I misunderstood your original message to read that the volume and mute controls were all before the SUM node. So it would appear that for some reason the controls themselves are not currently functioning or at least not sending responses to requests, or perhaps there is a problem in the BASIC_SUPPORT responses. There could be quite a few reasons for this. You stated below that: I assume once I implement the Master Volume mixer that the controls on the 'Device volume' and 'Speaker settings' sections will be enabled. So how do I implement the Master Volume mixer? Does this mean that you have not yet implemented the controls? Unlike portcls drivers, avstream topologies are not separated from the streaming. They are part of the same "filter factory". Creation of a filter from the filter factory would instantiate the streaming and topology for that filter. Thanks, DJ Sisolak Microsoft Corp. This posting is provided "AS IS" with no warranties, and confers no rights. ------------------------------------------------------------------------ From: wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of John D. Farmer Sent: Friday, August 20, 2004 11:27 AM To: wdmaudiodev@xxxxxxxxxxxxx Subject: [wdmaudiodev] Re: AVStream Mixer Problems I've tried a number of different topologies, as I mentioned before I looked at the topologies of other soundcards and this seems to be the most correct: static KSTOPOLOGY_CONNECTION MiniportConnections[] = { //FromNode------------------FromPin-----ToNode----------------------ToPin { KSFILTER_NODE, 1, KSNODE_SPEAKER_VOLUME, 1 }, { KSNODE_SPEAKER_VOLUME, 0, KSNODE_SPEAKER_MUTE, 1 }, { KSNODE_SPEAKER_MUTE, 0, KSNODE_ANALOG_OUT_SUM, 1 }, { KSFILTER_NODE, 3, KSNODE_MICROPHONE_VOLUME, 1 }, { KSNODE_MICROPHONE_VOLUME, 0, KSNODE_MICROPHONE_MUTE, 1 }, { KSNODE_MICROPHONE_MUTE, 0, KSNODE_ANALOG_OUT_SUM, 2 }, { KSNODE_ANALOG_OUT_SUM, 0, KSNODE_MASTER_VOLUME, 1 }, { KSNODE_MASTER_VOLUME, 0, KSNODE_MASTER_MUTE, 1 }, { KSNODE_MASTER_MUTE, 0, KSFILTER_NODE, 0 } }; and looks something like this in KS Studio: =================================== 1 0-|| Vol -> Mute \ / - || - {} 0 3 -{} || Vol -> Mute -- Sum -> Volume -> Mute/ || -o 2 =================================== ----- Original Message ----- From: DJ Sisolak To: wdmaudiodev@xxxxxxxxxxxxx Sent: Friday, August 20, 2004 11:12 AM Subject: [wdmaudiodev] Re: AVStream Mixer Problems Hello John, I am guessing the problem you are seeing is due to the placement of the SUM node in your topology. When the topology parser in wdmaud sees this node it assumes there is some sort of branching going on and looks downstream for master controls. Thus if your Volume and mute controls are upstream fro this node they would not be considered the master. What is the exact topology you are describing? Thanks, DJ Sisolak Microsoft Corp. This posting is provided "AS IS" with no warranties, and confers no rights. ---------------------------------------------------------------------- From: wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of John D. Farmer Sent: Friday, August 20, 2004 9:47 AM To: wdmaudiodev@xxxxxxxxxxxxx Subject: [wdmaudiodev] AVStream Mixer Problems Greetings, I'm creating a AVStream audio device that registers itself as a audio playback device. When I select the device as my default playback device, I can hear the sound and everything is fine and good. But now I am working on implementing the audio mixer for the device (e.g. Volume, Mute, Microphone Volume, ect). When I open up the Sounds and Audio Devices control panel, 'Device volume' section is grayed out as well as the buttons in the 'Speaker settings' section on the Volume tab. When I go to the Audio tab I can access the Volume and Advanced buttons for both my Sound playback and Sound recording. If I choose the Volume button for Sound playback, I see my Wave, CD Audio, and SW Synth mixers, but I seem to lack the Master Volume mixer. If I go to the properties in Sndvol32 for my device I see "Playback" and "Recording" radio buttons. Under playback I see the same mixers as I saw previously, and under Recording I see no volume controls. I assume once I implement the Master Volume mixer that the controls on the 'Device volume' and 'Speaker settings' sections will be enabled. So how do I implement the Master Volume mixer? I've created a simple wave topology that implements Volume, Mute, SUM, ADC and DAC nodes for my speaker and microphone pins. When I look in KS Studio I see my driver under the KSCATEGORY_AUDIO Filter Factories as a Audio device (or a \wave device). I looked at other soundcards on different systems and they also seem to have a Mixer node (or a \topology device). I assume that these soundcard drivers are portcls drivers. When I instantiate both of these filters they automatically connect (I've seen this behavior before in the MSVAD sample and understand the theory of how these filters work together). So is there a way to create a Topology Filter and a Wave Filter for my device, or does AVStream do it a different way. I see that portcls drivers uses PcRegisterSubDevice to register these filters but I have been unable to find the AVStream equivalent. Any help would be greatly appreciated. Regards, John Farmer