[wdmaudiodev] Re: Need help in KS Topology Test - WinBlue, Wave test- Certification

  • To: wdmaudiodev <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Fri, 28 Aug 2015 14:15:50 -0700

GetModes() actually gets called 4 times. Twice to get the buffer size,
where I always copy 1 to *NumSignalProcessingModes and return
STATUS_SUCCESS. Third time, it hands me a buffer of 16 bytes, where I copy
AUDIO_SIGNALPROCESSINGMODE_RAW and return STATUS_SUCCESS. The fourth time,
it gets called for the bridge pin where I return STATUS_NOT_SUPPORTED.
After running the test, it does say that the driver supports raw mode, so I
figured GetModes() has been implemented correctly.

*Warm regards,*
Parinitha Kashyap

On Fri, Aug 28, 2015 at 2:05 PM, Matthew van Eerde <
Matthew.van.Eerde@xxxxxxxxxxxxx> wrote:

You can see how it looks when it’s working by installing the SysVad driver
and running the test.




https://github.com/Microsoft/Windows-driver-samples/tree/master/audio/sysvad



One thing I left out last time: you should expect GetModes() to be called
twice. The first time, portcls.sys wants to know how many modes you
support; set *NumSignalProcessingModes = 1. The second time, portcls.sys
will hand you a buffer of just the right size (you should validate this);
you should copy all the modes you support (all one of them) into this
buffer.



*From:* wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:
wdmaudiodev-bounce@xxxxxxxxxxxxx] *On Behalf Of *Parinitha Kashyap
*Sent:* Friday, August 28, 2015 1:37 PM

*To:* wdmaudiodev
*Cc:* Girish Pattabiraman
*Subject:* [wdmaudiodev] Re: Need help in KS Topology Test - WinBlue,
Wave test- Certification



Does the pin instantiated with RAW mode need to be of a specific wave
format? Like the sampling rate to be 48kHZ?


*Warm regards,*

Parinitha Kashyap



On Wed, Aug 26, 2015 at 5:53 PM, Parinitha Kashyap <
parinitha.kashyap@xxxxxxxxx> wrote:

Hi Matthew,



So, I tried putting logs in all the different places in the
MiniPort::NewStream method and also the Stream::Init call. After every
stage, I have a NT_SUCCESS(ntStatus) call. It returns true every time. I
tried removing small pieces of code from the interface implementation and
when I remove the memcpy_s call, I get the audio back. I thought there must
be something going wrong with this copy call. I printed out the exact hex
data that is being copied to SignalProcessingMode and it is exactly similar
to the AUDIO_SIGNALPROCESSINGMODE_RAW hex value, but still no audio. I
might be missing some part of the code elsewhere. Is there any data format
that I need to handle? Any place where I have to implement the audio signal
processing attribute or pass it as a parameter in any function?? Is the
StreamCreated call in CMiniportWaveRTStream::Init method necessary?


*Warm regards,*

Parinitha Kashyap



On Tue, Aug 25, 2015 at 12:04 PM, Matthew van Eerde <
Matthew.van.Eerde@xxxxxxxxxxxxx> wrote:

Has it got anything to do with the failure



Definitely.



'Driver supports processing modes but the preferred formats donot have
the attribute flag set, so setting it



The test is complaining that the driver returned a “preferred format” that
does not have any attributes. This is fine.



*From:* wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:
wdmaudiodev-bounce@xxxxxxxxxxxxx] *On Behalf Of *Parinitha Kashyap
*Sent:* Tuesday, August 25, 2015 11:26 AM


*To:* wdmaudiodev
*Cc:* Girish Pattabiraman
*Subject:* [wdmaudiodev] Re: Need help in KS Topology Test - WinBlue,
Wave test- Certification



Ok. But just a thought. This is happening after I implemented the audio
signal processing interface. Has it got anything to do with the failure? In
KS Topology test, it says that 'Driver supports processing modes but the
preferred formats donot have the attribute flag set, so setting it [hr =
E_INVALIDARG (0x80070057)]'. What format is it talking about here? Since KS
pin creation returns ERROR_NO_MATCH, I was wondering if it was missing any
format.


*Warm regards,*

Parinitha Kashyap



On Tue, Aug 25, 2015 at 8:34 AM, Matthew van Eerde <
Matthew.van.Eerde@xxxxxxxxxxxxx> wrote:

OK. The error in your screenshot means that KsCreatePin is failing.
Sometimes this fails because your NewStream method returns a failing
NTSTATUS; sometimes it fails without calling into your NewStream method.



*From:* wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:
wdmaudiodev-bounce@xxxxxxxxxxxxx] *On Behalf Of *Parinitha Kashyap
*Sent:* Monday, August 24, 2015 5:04 PM


*To:* wdmaudiodev
*Cc:* Girish Pattabiraman
*Subject:* [wdmaudiodev] Re: Need help in KS Topology Test - WinBlue,
Wave test- Certification



Yes, new stream is being called. I put dbgprint logs at some places. It
looks like the pin initialization is a success too.


*Warm regards,*

Parinitha Kashyap



On Mon, Aug 24, 2015 at 8:16 AM, Matthew van Eerde <
Matthew.van.Eerde@xxxxxxxxxxxxx> wrote:

Is your NewStream function actually being called?



*From:* wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:
wdmaudiodev-bounce@xxxxxxxxxxxxx] *On Behalf Of *Parinitha Kashyap
*Sent:* Friday, August 21, 2015 6:50 PM
*To:* wdmaudiodev
*Cc:* Girish Pattabiraman


*Subject:* [wdmaudiodev] Re: Need help in KS Topology Test - WinBlue,
Wave test- Certification



Ok, so I did all the validation and the rest of the steps as you said. The
'Verify audio effects discovery' test passed after making this change but
the audio is not coming out of the driver. KS Topology test and wave test
show failures in pin creation. The exact error is shown in the screenshots
attached. The maximum no. of instances that our streaming pin allows is 1.
If the pin is already allocated, we return STATUS_INVALID_DEVICE_REQUEST. I
do not know if this is creating a problem. KSCreatePin returns 1169. When I
looked in MSDN, it said that if any data format is missing it might throw
this error, It also said that pin creation checks if appropriate attributes
are supported. So, I implemented extracting the data format attributes in
the new stream and checking if buffers are allocated correctly for the
attribute
KSATTRIBUTE_AUDIOSIGNALPROCESSING_MODE (GetAttributesFromAttributeList),
but the pin creation still fails.


*Warm regards,*

Parinitha Kashyap



On Thu, Aug 20, 2015 at 8:24 AM, Matthew van Eerde <
Matthew.van.Eerde@xxxxxxxxxxxxx> wrote:

The sample implementation of GetModes is here:




https://github.com/Microsoft/Windows-driver-samples/blob/master/audio/sysvad/EndpointsCommon/minwavert.cpp



I see you have a comment that says to do validation, but you’re not
actually doing the validation.



The way GetModes works is:

1) Do the validation as it says in the comment

2) Verify that *NumSignalProcessingModes is big enough (on input,
this is set to the size of the buffer, in GUIDs)

3) Write the appropriate number of mode GUIDs to the memory

4) Set *NumSignalProcessingModes to the number of mode GUIDs that
you wrote



*From:* wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:
wdmaudiodev-bounce@xxxxxxxxxxxxx] *On Behalf Of *Parinitha Kashyap
*Sent:* Wednesday, August 19, 2015 3:32 PM
*To:* Girish Pattabiraman
*Cc:* wdmaudiodev


*Subject:* [wdmaudiodev] Re: Need help in KS Topology Test - WinBlue,
Wave test- Certification



I have attached the screenshot as well.


*Warm regards,*

Parinitha Kashyap



On Wed, Aug 19, 2015 at 3:00 PM, Parinitha Kashyap <
parinitha.kashyap@xxxxxxxxx> wrote:

yes, I am doing that.


*Warm regards,*

Parinitha Kashyap



On Wed, Aug 19, 2015 at 2:53 PM, Girish Pattabiraman <
girish.pattabiraman@xxxxxxxxx> wrote:

Are you handling IID_IMiniportAudioSignalProcessing in
NonDelegatingQueryInterface?



Sent from Mail <http://go.microsoft.com/fwlink/?LinkId=550986> for
Windows 10






*From: *Parinitha Kashyap
*Sent: *Wednesday, August 19, 2015 2:48 PM
*To: *wdmaudiodev
*Subject: *[wdmaudiodev] Re: Need help in KS Topology Test - WinBlue,
Wave test- Certification





Hello,



I implemented the IMiniportAudioSignalProcessing interface on my
wavecyclic driver as follows since 'raw' mode needs to be reported:

STDMETHODIMP_(NTSTATUS) CPhorusMiniport::GetModes

(

_In_ ULONG Pin,

_Out_writes_opt_(*NumSignalProcessingModes) GUID*
SignalProcessingModes,

_Inout_ ULONG*
NumSignalProcessingModes

)

/*



1. If Pin is not a valid pin number,

return STATUS_INVALID_PARAMETER.



2. If Pin is a valid pin number and it supports n modes (n>0),

init out-parameters and return STATUS_SUCCESS.



3. Else this pin doesn't support any mode,

return STATUS_NOT_SUPPORTED.

example: bridge pins or another mode-not-aware pins.



*/

{

DPF_ENTER_PAGED();



//DPF_ENTER(("[CMiniportWaveRT::GetModes]"));



NTSTATUS ntStatus = STATUS_SUCCESS;

errno_t err;

GUID mode = AUDIO_SIGNALPROCESSINGMODE_RAW;



// copy supported processing modes

err = memcpy_s(

SignalProcessingModes,

sizeof(GUID),

&mode,

sizeof(GUID)

);



if(err) {

ntStatus = STATUS_UNSUCCESSFUL;

}



return ntStatus;

}



After running the test, I still get the error *'ERROR: Pin[00] :
KSPROPERTY_AUDIOSIGNALPROCESSING_MODES is required but not supported*' in
the task 'KS Topology Filters\KS Pins\Check Processing Modes' along with
*'**FAIL: Pin[00] : DeviceIoControl failed to get basic support for pin
property {4F67B528-30C9-40DE-B2FB-859DDD1F3470}/0, returned error code 31*'.
I get the same deviceIOControl error in the task 'KS Topology Filters\KS
Pins\Check Pin Instance Count' as well. In the method
'PropertyHandlerBasic', we do check if the property request type is
KSPROPERTY_TYPE_BASICSUPPORT and assign the relevant valuesize. Anything
else required to be done in GetModes??


*Warm regards,*

Parinitha Kashyap



On Wed, Aug 5, 2015 at 4:31 PM, Matthew van Eerde <
Matthew.van.Eerde@xxxxxxxxxxxxx> wrote:

KSPROPERTY_AUDIOSIGNALPROCESSING_MODES is a new property for all audio
drivers that was introduced in Windows 8.1.



portcls miniports can implement IMiniportAudioSignalProcessing to have
portcls.sys support the property on their behalf.



The SysVad sample driver shows how to implement it:
https://github.com/Microsoft/Windows-driver-samples/tree/master/audio/sysvad



*From:* wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:
wdmaudiodev-bounce@xxxxxxxxxxxxx] *On Behalf Of *Parinitha Kashyap
*Sent:* Wednesday, August 5, 2015 4:22 PM
*To:* wdmaudiodev@xxxxxxxxxxxxx
*Subject:* [wdmaudiodev] Need help in KS Topology Test - WinBlue, Wave
test - Certification



Hi,



My driver is a virtual sound driver based on wavecyclic. I am running
tests on windows 10 RTM using the latest HLK software (v10.0.26624.0) and
the latest HLK filters. I am getting a failure in KS Topology Test -
WinBlue in the sub task 'KS Topology Filters\KS Pins\Check Processing
Modes'. The error is *'ERROR: Pin[00] :
KSPROPERTY_AUDIOSIGNALPROCESSING_MODES is required but not supported*'.
When I ran this test on win 8 on the same driver, it passed. Will Microsoft
release filters to pass this test? Or is this an extra requirement for the
wavecyclic drivers on win 10 to have the new DDI for audio signal
processing modes implemented?



The same error occurs in wave test for the sub tests
'WDMAudio::WaveTest::TAEF_Render_VerifyRawOrDefaultProcessingSupported#4'
and
'WDMAudio::WaveTest::TAEF_Render_VerifyRawOrDefaultProcessingSupported#5'.
The exact error text for wave test is as follows: *FAIL: The pin 0
doesn't support KSPROPERTY_AUDIOSIGNALPROCESSING_MODES*. As in KS
Topology test, the wave test passed on win 8 with the same driver.



I have attached a screenshot for the wave test.



Pls help.



Thanks,

*Warm regards,*

Parinitha Kashyap





















Other related posts: