Hello Guys, I am able to Pass above mentioned test cases by using KeQueryPerformanceCounter() instead of KeQueryInterruptTime() in GetPosition function. I am having GetPosition() function implementation same as MSVAD sample driver. But now after using KeQueryPerformanceCounter() function, i am getting new failures as below, 1) Standard Streaming\Rendering Performance Tests\Duration & Length (standard streaming) Successfully instantiated KSPIN_DATAFLOW_IN pin KSPIN_DATAFLOW_IN pin is currently in state KSSTATE_STOP; want it to be in state KSSTATE_PAUSE Setting KSPIN_DATAFLOW_IN pin to state KSSTATE_ACQUIRE Setting KSPIN_DATAFLOW_IN pin to state KSSTATE_PAUSE KSPIN_DATAFLOW_IN pin is currently in state KSSTATE_PAUSE; want it to be in state KSSTATE_RUN Setting KSPIN_DATAFLOW_IN pin to state KSSTATE_RUN PASS: Length was reported correctly. Length: Measured: 16000 bytes Expected: 16000 bytes Error: 0 bytes Time reading before starting of wait preiod: 1591.286 ms Time reading at the end of wait preiod: 3611.309 ms Duration: Measured: 2020.022 ms Expected: 2000.000 ms Error: 20.022 ms (1.001 %) FAIL: The duration error for this format exceeds the acceptable limit of 1.000 % 2) Standard Streaming\Rendering Performance Tests\Position Drift and Jitter Successfully instantiated KSPIN_DATAFLOW_IN pin Submitting 16000 bytes to the pin KSPIN_DATAFLOW_IN pin is currently in state KSSTATE_STOP; want it to be in state KSSTATE_PAUSE Setting KSPIN_DATAFLOW_IN pin to state KSSTATE_ACQUIRE Setting KSPIN_DATAFLOW_IN pin to state KSSTATE_PAUSE Submitting IOCTL_KS_WRITE_STREAM IRP ... IRP is pending... KSPIN_DATAFLOW_IN pin is currently in state KSSTATE_PAUSE; want it to be in state KSSTATE_RUN Setting KSPIN_DATAFLOW_IN pin to state KSSTATE_RUN GetPosition function too slow GetPosition function too slow GetPosition function too slow GetPosition function too slow GetPosition function too slow GetPosition function too slow KSPIN_DATAFLOW_IN pin is currently in state KSSTATE_RUN; want it to be in state KSSTATE_STOP Setting KSPIN_DATAFLOW_IN pin to state KSSTATE_PAUSE Setting KSPIN_DATAFLOW_IN pin to state KSSTATE_ACQUIRE Setting KSPIN_DATAFLOW_IN pin to state KSSTATE_STOP KSPIN_DATAFLOW_IN pin is currently in state KSSTATE_STOP; want it to be in state KSSTATE_STOP ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SampleRate calculated from histogram (method of least squares) Collected 100 data points Specified sample rate = 8000.000 bytes/sec, 8000.000 samples/sec Calculated sample rate = 7713.399 bytes/sec, 7713.399 samples/sec Error = -3.583 % FAIL: The sample rate drift for this format exceeds the acceptable limit of 1.000 % Please help me out. Thanks, Gaurav On Tue, Apr 1, 2014 at 7:52 PM, Gaurav Khuntale <gauravkhuntale@xxxxxxxxx>wrote: > Hello, > > I am working on virtual audio driver which is based on wavecyclic port > driver. I have modified MSVAD sample driver. I want to pass KS-Position > test for the driver, but its failing in below test case, > > Standard Streaming\Rendering Performance Tests\Startup Latency (standard > streaming) > Successfully instantiated KSPIN_DATAFLOW_IN pin > Submitting 16000 bytes to the pin > KSPIN_DATAFLOW_IN pin is currently in state KSSTATE_STOP; want it to > be in state KSSTATE_PAUSE > Setting KSPIN_DATAFLOW_IN pin to state KSSTATE_ACQUIRE > Setting KSPIN_DATAFLOW_IN pin to state KSSTATE_PAUSE > Submitting IOCTL_KS_WRITE_STREAM IRP ... > IRP is pending... > KSPIN_DATAFLOW_IN pin is currently in state KSSTATE_PAUSE; want it to > be in state KSSTATE_RUN > Setting KSPIN_DATAFLOW_IN pin to state KSSTATE_RUN > Setting pin to KSSTATE_RUN took 3329.262 ms > Testing First non-zero position reported = 16 bytes, (3331.034 ms) > First non-zero position reported = 16 bytes, (16 samples), (2.000 ms) > Time of first non-zero position = 1666.32 ms (+/- 1664.72 ms) > Adjusted latency = 1664.316 ms (+/- 1664.718 ms) > FAIL: The (adjusted) latency for this format exceeds the acceptable > limit of 15.000 ms > > KSPIN_DATAFLOW_IN pin is currently in state KSSTATE_PAUSE; want it to be > in state KSSTATE_RUN > Setting KSPIN_DATAFLOW_IN pin to state KSSTATE_RUN > Setting pin to KSSTATE_RUN took 0.740 ms > Testing First non-zero position reported = 48 bytes, (3461.821 ms) > First non-zero position reported = 48 bytes, (24 samples), (3.000 ms) > Time of first non-zero position = 2.5067 ms (+/- 0.437625 ms) > Time equivalent of first non-zero position (3.000 ms) is greater than > the time the pin has been in the run state (2.944 ms) > FAIL: First non-zero position is too high. > Number of runs 1 > > My understanding from the logs is, its trying to measure latency between > the total time the pin is in run state and the respective time value of > first non-zero position that driver is reporting. Is my understanding > correct ? > I observed the same failures for MSVAD sample driver. I also tried using > different timer functions like KeQueryInterruptTime(), KeQuerySystemTime() > as i thought it may be issue of timer accuracy. > Can anyone please help me to understand what exactly test is trying? > > Thanks, > Gaurav > >