diff options
| author | Daniel Rugerio <[email protected]> | 2020-05-13 16:23:40 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-05-13 16:23:40 -0700 |
| commit | bf0b0fe11d8b301cdfcc6d13f12a778cdd1c14b5 (patch) | |
| tree | 55938bebdfe634226f0c1ee7822cbcdb4879f975 /audio/sysvad/EndpointsCommon | |
| parent | b78312cfe7990524cb46a1453ad2e013586857a0 (diff) | |
Update to SysVAD, Wave test and public sample of KS Position Test (#496)147237
* Update to Wave test and public sample of KS Position test.
* Update to the SysVAD audio driver sample.
* Add the PnpLockDown property.
Diffstat (limited to 'audio/sysvad/EndpointsCommon')
| -rw-r--r-- | audio/sysvad/EndpointsCommon/mintopo.cpp | 2 | ||||
| -rw-r--r-- | audio/sysvad/EndpointsCommon/mintopo.h | 14 | ||||
| -rw-r--r-- | audio/sysvad/EndpointsCommon/minwavertstream.cpp | 4 | ||||
| -rw-r--r-- | audio/sysvad/EndpointsCommon/speakertopo.cpp | 1 | ||||
| -rw-r--r-- | audio/sysvad/EndpointsCommon/speakertoptable.h | 13 |
5 files changed, 18 insertions, 16 deletions
diff --git a/audio/sysvad/EndpointsCommon/mintopo.cpp b/audio/sysvad/EndpointsCommon/mintopo.cpp index 28ddf419..4f2bf4fa 100644 --- a/audio/sysvad/EndpointsCommon/mintopo.cpp +++ b/audio/sysvad/EndpointsCommon/mintopo.cpp @@ -570,7 +570,7 @@ Return Value: // 0x00000002 - JACKDESC2_DYNAMIC_FORMAT_CHANGE_CAPABILITY // pDesc->JackCapabilities = JackCapabilities; - + ntStatus = STATUS_SUCCESS; } } diff --git a/audio/sysvad/EndpointsCommon/mintopo.h b/audio/sysvad/EndpointsCommon/mintopo.h index 4aa3d2de..266fc81d 100644 --- a/audio/sysvad/EndpointsCommon/mintopo.h +++ b/audio/sysvad/EndpointsCommon/mintopo.h @@ -73,17 +73,17 @@ public: NTSTATUS PropertyHandlerJackDescription ( - _In_ PPCPROPERTY_REQUEST PropertyRequest, - _In_ ULONG cJackDescriptions, - _In_reads_(cJackDescriptions) PKSJACK_DESCRIPTION * JackDescriptions + _In_ PPCPROPERTY_REQUEST PropertyRequest, + _In_ ULONG cJackDescriptions, + _In_reads_(cJackDescriptions) PKSJACK_DESCRIPTION *JackDescriptions ); NTSTATUS PropertyHandlerJackDescription2 ( - _In_ PPCPROPERTY_REQUEST PropertyRequest, - _In_ ULONG cJackDescriptions, - _In_reads_(cJackDescriptions) PKSJACK_DESCRIPTION * JackDescriptions, - _In_ DWORD JackCapabilities + _In_ PPCPROPERTY_REQUEST PropertyRequest, + _In_ ULONG cJackDescriptions, + _In_reads_(cJackDescriptions) PKSJACK_DESCRIPTION *JackDescriptions, + _In_ DWORD JackCapabilities ); #if defined(SYSVAD_BTH_BYPASS) || defined(SYSVAD_USB_SIDEBAND) diff --git a/audio/sysvad/EndpointsCommon/minwavertstream.cpp b/audio/sysvad/EndpointsCommon/minwavertstream.cpp index 93ecdcf3..499d5b38 100644 --- a/audio/sysvad/EndpointsCommon/minwavertstream.cpp +++ b/audio/sysvad/EndpointsCommon/minwavertstream.cpp @@ -968,12 +968,12 @@ NTSTATUS CMiniportWaveRTStream::GetReadPacket // Return next packet number to be read *PacketNumber = availablePacketNumber; - // Compute and return timestamp corresponding to start of the available packet. In a real hardware + // Compute and return timestamp corresponding to the end of the available packet. In a real hardware // driver, the timestamp would be computed in a driver and hardware specific manner. In this sample // driver, it is extrapolated from the sample driver's internal simulated position correlation // [m_ullLinearPosition @ m_ullDmaTimeStamp] and the sample's internal 64-bit packet counter, subtracting // 1 from the packet counter to compute the time at the start of that last completed packet. - ULONGLONG linearPositionOfAvailablePacket = (packetCounter - 1) * (m_ulDmaBufferSize / m_ulNotificationsPerBuffer); + ULONGLONG linearPositionOfAvailablePacket = packetCounter * (m_ulDmaBufferSize / m_ulNotificationsPerBuffer); // Need to divide by (1000 * 10000 because m_ulDmaMovementRate is average bytes per sec ULONGLONG carryForwardBytes = (hnsElapsedTimeCarryForward * m_ulDmaMovementRate) / 10000000; ULONGLONG deltaLinearPosition = ullLinearPosition + carryForwardBytes - linearPositionOfAvailablePacket; diff --git a/audio/sysvad/EndpointsCommon/speakertopo.cpp b/audio/sysvad/EndpointsCommon/speakertopo.cpp index cca4dac9..fee3d542 100644 --- a/audio/sysvad/EndpointsCommon/speakertopo.cpp +++ b/audio/sysvad/EndpointsCommon/speakertopo.cpp @@ -22,7 +22,6 @@ Abstract: #pragma code_seg("PAGE") - //============================================================================= NTSTATUS PropertyHandler_SpeakerTopoFilter diff --git a/audio/sysvad/EndpointsCommon/speakertoptable.h b/audio/sysvad/EndpointsCommon/speakertoptable.h index 50f58c7b..eb12173a 100644 --- a/audio/sysvad/EndpointsCommon/speakertoptable.h +++ b/audio/sysvad/EndpointsCommon/speakertoptable.h @@ -85,7 +85,7 @@ PCPIN_DESCRIPTOR SpeakerTopoMiniportPins[] = //============================================================================= static -KSJACK_DESCRIPTION SpeakerJackDescSpeakers = +KSJACK_DESCRIPTION SpeakerJackDescBridge = { KSAUDIO_SPEAKER_STEREO, 0xB3C98C, // Color spec for green @@ -101,7 +101,7 @@ static PKSJACK_DESCRIPTION SpeakerJackDescriptions[] = { NULL, - &SpeakerJackDescSpeakers + &SpeakerJackDescBridge }; //============================================================================= @@ -120,17 +120,20 @@ PCPROPERTY_ITEM PropertiesSpeakerTopoFilter[] = { &KSPROPSETID_Jack, KSPROPERTY_JACK_DESCRIPTION, - KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT, + KSPROPERTY_TYPE_GET | + KSPROPERTY_TYPE_BASICSUPPORT, PropertyHandler_SpeakerTopoFilter }, { &KSPROPSETID_Jack, KSPROPERTY_JACK_DESCRIPTION2, - KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT, + KSPROPERTY_TYPE_GET | + KSPROPERTY_TYPE_BASICSUPPORT, PropertyHandler_SpeakerTopoFilter } }; + DEFINE_PCAUTOMATION_TABLE_PROP(AutomationSpeakerTopoFilter, PropertiesSpeakerTopoFilter); //============================================================================= @@ -152,4 +155,4 @@ PCFILTER_DESCRIPTOR SpeakerTopoMiniportFilterDescriptor = }; #endif // _SYSVAD_SPEAKERTOPTABLE_H_ - + |
