diff options
Diffstat (limited to 'audio/sysvad/TabletAudioSample/spdiftopo.cpp')
| -rw-r--r-- | audio/sysvad/TabletAudioSample/spdiftopo.cpp | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/audio/sysvad/TabletAudioSample/spdiftopo.cpp b/audio/sysvad/TabletAudioSample/spdiftopo.cpp new file mode 100644 index 00000000..f715e41d --- /dev/null +++ b/audio/sysvad/TabletAudioSample/spdiftopo.cpp @@ -0,0 +1,85 @@ +/*++ + +Copyright (c) Microsoft Corporation All Rights Reserved + +Module Name: + + spdiftopo.cpp + +Abstract: + + Implementation of topology miniport for the spdif (internal). + +--*/ + +#pragma warning (disable : 4127) + +#include <sysvad.h> +#include "simple.h" +#include "mintopo.h" +#include "spdiftopo.h" +#include "spdiftoptable.h" + + +#pragma code_seg("PAGE") + +//============================================================================= +NTSTATUS +PropertyHandler_SpdifTopoFilter +( + _In_ PPCPROPERTY_REQUEST PropertyRequest +) +/*++ + +Routine Description: + + Redirects property request to miniport object + +Arguments: + + PropertyRequest - + +Return Value: + + NT status code. + +--*/ +{ + PAGED_CODE(); + + ASSERT(PropertyRequest); + + DPF_ENTER(("[PropertyHandler_SpdifTopoFilter]")); + + // PropertryRequest structure is filled by portcls. + // MajorTarget is a pointer to miniport object for miniports. + // + NTSTATUS ntStatus = STATUS_INVALID_DEVICE_REQUEST; + PCMiniportTopology pMiniport = (PCMiniportTopology)PropertyRequest->MajorTarget; + + if (IsEqualGUIDAligned(*PropertyRequest->PropertyItem->Set, KSPROPSETID_Jack)) + { + if (PropertyRequest->PropertyItem->Id == KSPROPERTY_JACK_DESCRIPTION) + { + ntStatus = pMiniport->PropertyHandlerJackDescription( + PropertyRequest, + ARRAYSIZE(SpdifJackDescriptions), + SpdifJackDescriptions + ); + } + else if (PropertyRequest->PropertyItem->Id == KSPROPERTY_JACK_DESCRIPTION2) + { + ntStatus = pMiniport->PropertyHandlerJackDescription2( + PropertyRequest, + ARRAYSIZE(SpdifJackDescriptions), + SpdifJackDescriptions, + 0 // jack capabilities + ); + } + } + + return ntStatus; +} // PropertyHandler_SpdifTopoFilter + +#pragma code_seg() + |
