[wdmaudiodev] Re: KSEVENT_PINCAPS_FORMATCHANGE event and the PCEVENT_VERB_ADD

  • From: Kol <wdmaudio@xxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Thu, 31 Oct 2013 12:07:03 +0100

Hi all,

I can confirm this behavior from Neetu with my drivers.
My drivers work like expected under Windows 7 but since Win 8 and 8.1 the don't change the SR if I trigger the SR to change via:
/*IAudioEndpointFormatControl::ResetToDefault*/
from a Client.

I'm missing also the *KSPROPERTY_TYPE_GET* calls after calling "/*ResetToDefault*/" in my Client.

Also I getting strange calls on the *KSPROPERTY_TYPE_SET* flag with undefined
*/pWfx->Format.nChannels
/*or*/
/**//**/pWfx->Format.nSamplesPerSec /*
values.

Something like 35859 for nChannels or 298799533 for nSamplesPerSec for example.
Snippet Snippet Snippet
Any suggestion why ?

Best Regards,

Kol

Am 10.09.2013 11:40, schrieb Nikku B:
Hi Matthew,

On windows 8.1 I am noticing that after raising event on on all pins, I get calls for KSPROPERTY_TYPE_SET on all pins but I do not receive calls for KSPROPERTY_TYPE_GET.

In KSPROPERTY_TYPE_SET, I receive request to set last selected sample rate - driver sends STATUS_NO_MATCH to this. Still I do not see any KSPROPERTY_TYPE_GET calls.

Why is this happening?

cheers,
Neetu


On Tue, Sep 3, 2013 at 9:45 PM, Matthew van Eerde <Matthew.van.Eerde@xxxxxxxxxxxxx <mailto:Matthew.van.Eerde@xxxxxxxxxxxxx>> wrote:

    Raise the event for each pin that you want to be requeried.

    For example, suppose that Ch 1/2 Out, Ch 3/4 Out, and Ch 1/2 In
    are all at 44.1 kHz.

    Then the user goes into the Sound control panel and changes Ch 1/2
    Out to 48 kHz.

    You should raise the event on Ch 3/4 Out and Ch 1/2 In. When
    Windows renegotiates the device format on those endpoints, insist
    on a 48 kHz format; decry any support for 48 kHz.

    *From:*wdmaudiodev-bounce@xxxxxxxxxxxxx
    <mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx>
    [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx
    <mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx>] *On Behalf Of *Jesko
    Quenzer
    *Sent:* Monday, August 26, 2013 12:47 AM
    *To:* wdmaudiodev@xxxxxxxxxxxxx <mailto:wdmaudiodev@xxxxxxxxxxxxx>
    *Subject:* [wdmaudiodev] KSEVENT_PINCAPS_FORMATCHANGE event and
    the PCEVENT_VERB_ADD

    Hi,

    I try to add the "Dynamic Format Change Support" which is
    documented in here:
    http://msdn.microsoft.com/en-us/library/windows/hardware/gg463055.aspxto
    my miniport driver.
    I was able to register the events to get calls to my
    EventHandlerFormatChange and to my PropertyHandlerPinProposeForma
    function (both taken from the document above).

    I also see the KSPROPERTY_TYPE_SET and KSPROPERTY_TYPE_GET calls
    and everything seem to be OK.

    There are some things I'm missing or do not understand well:

    For example I have a device which provides Ch 1/2 and Ch 3/4 Out
    and Input 1/2 and I want to keep the sample rate
    settings  synchronised for all of them.
    So I guess I should get a KSPROPERTY_TYPE_GET for each device
    after I changed the sample rate for one of them to synchronise the
    others to the new "default" sample rate.
    Is this correct ?

    The problem is I never get this call. I only get a call to
    KSPROPERTY_TYPE_GET once when I open the device in the Windows CPL.

    There are two parts in the sample code I don't understand and are
    probably related:

    NTSTATUS CMiniportHelper::GenerateFormatChangeEvent()
    which calls:
    m_pPortEvents->GenerateEventList(...,...,...);

    where should I instantiate the pPortEvents and where do I call the
    GenerateFormatChangeEvent ?

    The source code(which I didn't write by my self) calls once:

    pPort->QueryInterface (IID_IPortEvents,  (PVOID *)&pPortEvents);

    in my Adapter->StartDevice function. Should I keep this instance ?

    also the "case PCEVENT_VERB_ADD:"  in the
    EventHandlerFormatChange is never called, only  "case
    PCEVENT_VERB_SUPPORT:" is called.

    Any suggestion what I'm doing wrong ?

    Another thing is how can I distinguish which pin is opened in the
    CPL ?

    Any idea ?

    Thanks and Regards,



Other related posts: