[wdmaudiodev] Re: Showing Advanced Tab for capture audio endpoint in Vista

  • From: Mitchell Rundle <mitchr@xxxxxxxxxxxxx>
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Tue, 31 Oct 2006 10:08:08 -0800

Generally this means that it could not detect support of any PCM format at all. 
 Does your host (I/O) pin have PCM dataranges?  Is your dataintersection 
handler returning a success code for any formats?

Here's some more info...

Various components in the audio core (including the code for the "Advanced" 
page in mmsys.cpl" call an implementation of 
IKsFormatSupport::IsFormatSupported (see devicetopology.h) which is implemented 
like:

HRESULT IsFormatSupported
(
    PKSDATAFORMAT   pKsFormat,
    DWORD           cbKsFormat,
    BOOL*           pbSupported
)
{
  1) Check for support using KSPROPERTY_PIN_PROPOSEDATAFORMAT.
     This is unambiguous and very efficient.  If this property is supported,
     then we know at this point whether or not this format is supported.
     This property wasn't used prior to Vista though, so few if any existing
     drivers support it.  If you are working on a driver, please consider
     implementing support for this.

  2) Look for exact match in dataranges (only for 1 and 2 channel formats).
     This is somewhat error prone and is only done to handle some broken 
drivers.
     It will probably be removed in the next version of Windows.

  3) Create a KSDATARANGE_AUDIO that describes pKsFormat and call 
KSPROPERTY_PIN_DATAINTERSECTION
     This is also somewhat limited, particularly for multichannel formats, 
because KSDATARANGE_AUDIO
     doesn't have minchannels or channelmask field.

  4) If the driver says that KSPROPERTY_PIN_DATAINTERSECTION isn't supported, 
then
     re-examine the dataranges and infer support.  This is quite error prone 
and only
     done in a last ditch effort.
}


... now back to mmsys.cpl.  The first call it makes to IsFormatSupported is 
just trying to ask "Do you support PCM at all?".  It does so by passing a 
KSDATAFORMAT (not KSDATAFORMAT_AUDIO) like this one

    KSDATAFORMAT format = {0};

    format.FormatSize = sizeof(KSDATAFORMAT);
    format.MajorFormat = KSDATAFORMAT_TYPE_AUDIO;
    format.SubFormat = KSDATAFORMAT_SUBTYPE_PCM;
    format.Specifier = KSDATAFORMAT_SPECIFIER_WAVEFORMATEX;

If that fails, then you won't get the "advanced" page, so I'm guessing that 
this may be the problem.  Referring to the pseudocode above, this format will 
probably be handled at step 2 because dataranges are sufficient to determine 
whether PCM in general is supported.  So the first thing I'd look at is your 
dataranges.  If those look okay, step through your dataintersection handler and 
make sure it's returning STATUS_SUCCESS for this format.

Hopefully you find some useful info in this rambling.  :)

Regards,
Mitch Rundle
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.


-----Original Message-----
From: wdmaudiodev-bounce@xxxxxxxxxxxxx 
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of KS
Sent: Sunday, October 29, 2006 6:08 AM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Showing Advanced Tab for capture audio endpoint in Vista

Hi,

I'm trying to write an AVStream driver for a capturing audio endpoint. I'm
trying to get the Advanced Tab to show for my endpoint so that users can
select the format type to capture for the endpoint. I've implemented the
handler for the DataRangeIntersection, but I still do not see the Advanced
Tab showing for my endpoints although I'm receiving calls to the
DataRangeIntersection handler. Anyone can give any advice as to what else is
required to get the Advanced Tab to show? Thanks

KS

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

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: