diff options
| author | Girish Pattabiraman <[email protected]> | 2018-11-12 18:08:19 -0800 |
|---|---|---|
| committer | Adonais Romero González <[email protected]> | 2018-11-12 18:08:19 -0800 |
| commit | 995e20f6dbca7ad10a039fa62a2de69eed092ffc (patch) | |
| tree | 67075f06fd8aaedad732d6c73b682c6e0fda9dba /audio/sysvad/EndpointsCommon/usbhsspeakertopo.cpp | |
| parent | c9110a3bc1634a5be8e7922119ad383311104095 (diff) | |
RS5 Updates (#311)
* Format Changes
==============
* Add KSEVENT_PINCAPS_FORMATCHANGE to Bluetooth HFP Endpoints
* Remove 8 bit formats from Bluetooth HFP Endpoints
Name Template
==============
* Bluetooth Endpoints are now based on templates in INF and then customized with endpoints specific data
Sideband Common Interface for future Sideband buses
===================================================
* Add ISidebandDevice
* Add current directory to TabletAudioSample include path. Remove unused compiler flags.
* RS4 bug fixes
* Replace FastMutex with Spinlock for DeviceFormatsAndModes to work well at DISPATCH_LEVEL
* Resync with Microsoft-master branch
* Replace FastMutex with Spinlock for DeviceFormatsAndModes to work well at DISPATCH_LEVEL
* RS5 updates:
- USB Sideband implementation
- Power management options: _USE_IPortClsRuntimePower, _USE_SingleComponentMultiFxStates
Diffstat (limited to 'audio/sysvad/EndpointsCommon/usbhsspeakertopo.cpp')
| -rw-r--r-- | audio/sysvad/EndpointsCommon/usbhsspeakertopo.cpp | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/audio/sysvad/EndpointsCommon/usbhsspeakertopo.cpp b/audio/sysvad/EndpointsCommon/usbhsspeakertopo.cpp new file mode 100644 index 00000000..21d5fa8c --- /dev/null +++ b/audio/sysvad/EndpointsCommon/usbhsspeakertopo.cpp @@ -0,0 +1,113 @@ +/*++ + +Copyright (c) Microsoft Corporation All Rights Reserved + +Module Name: + + usbhsspeakertopo.cpp + +Abstract: + + Implementation of topology miniport for the USB Headset speaker (external). + +--*/ +#ifdef SYSVAD_USB_SIDEBAND + +#pragma warning (disable : 4127) + +#include <sysvad.h> +#include "simple.h" +#include "mintopo.h" +#include "usbhstopo.h" +#include "usbhsspeakertopo.h" +#include "usbhsspeakertoptable.h" + +//============================================================================= +#pragma code_seg("PAGE") +NTSTATUS +PropertyHandler_UsbHsSpeakerTopoFilter +( + _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_UsbHsSpeakerTopoFilter]")); + + // PropertryRequest structure is filled by portcls. + // MajorTarget is a pointer to miniport object for miniports. + // + NTSTATUS ntStatus = STATUS_INVALID_DEVICE_REQUEST; + + // + // This line shows how to get a pointer to the miniport topology object. + // + PCMiniportTopology pMiniport = (PCMiniportTopology)PropertyRequest->MajorTarget; + UNREFERENCED_VAR(pMiniport); + + if (IsEqualGUIDAligned(*PropertyRequest->PropertyItem->Set, KSPROPSETID_Jack)) + { + switch(PropertyRequest->PropertyItem->Id) + { + case KSPROPERTY_JACK_DESCRIPTION: + ntStatus = PropertyHandler_UsbHsJackDescription( + PropertyRequest, + ARRAYSIZE(UsbHsSpeakerJackDescriptions), + UsbHsSpeakerJackDescriptions); + break; + + case KSPROPERTY_JACK_DESCRIPTION2: + ntStatus = PropertyHandler_UsbHsJackDescription2( + PropertyRequest, + ARRAYSIZE(UsbHsSpeakerJackDescriptions), + UsbHsSpeakerJackDescriptions); + break; + + case KSPROPERTY_JACK_CONTAINERID: + ntStatus = PropertyHandler_UsbHsJackContainerId( + PropertyRequest, + ARRAYSIZE(UsbHsSpeakerJackDescriptions), + UsbHsSpeakerJackDescriptions); + break; + } + } + + return ntStatus; +} // PropertyHandler_UsbHsSpeakerTopoFilter + +//============================================================================= +#pragma code_seg() +NTSTATUS +PropertyHandler_UsbHsSpeakerTopoFilterEvent +( + _In_ PPCEVENT_REQUEST EventRequest +) +{ + ASSERT(EventRequest); + + DPF_ENTER(("[PropertyHandler_UsbHsSpeakerTopoFilterEvent]")); + + return PropertyHandler_UsbHsTopoNodeEvent(EventRequest); +} + +#pragma code_seg() +#endif // SYSVAD_USB_SIDEBAND + + |
