diff --git a/audio/sysvad/EndpointsCommon/mintopo.cpp b/audio/sysvad/EndpointsCommon/mintopo.cpp index 4f2bf4fab..4e417c4a3 100644 --- a/audio/sysvad/EndpointsCommon/mintopo.cpp +++ b/audio/sysvad/EndpointsCommon/mintopo.cpp @@ -581,6 +581,7 @@ Return Value: return ntStatus; } + #if defined(SYSVAD_BTH_BYPASS) || defined(SYSVAD_USB_SIDEBAND) //============================================================================= #pragma code_seg() diff --git a/audio/sysvad/EndpointsCommon/mintopo.h b/audio/sysvad/EndpointsCommon/mintopo.h index 266fc81d5..b4eda617a 100644 --- a/audio/sysvad/EndpointsCommon/mintopo.h +++ b/audio/sysvad/EndpointsCommon/mintopo.h @@ -33,6 +33,8 @@ class CMiniportTopology : { private: eDeviceType m_DeviceType; + + union { PVOID m_DeviceContext; #if defined(SYSVAD_BTH_BYPASS) || defined(SYSVAD_USB_SIDEBAND) @@ -55,6 +57,7 @@ class CMiniportTopology : m_DeviceType(DeviceType), m_DeviceContext(DeviceContext) { + #if defined(SYSVAD_BTH_BYPASS) || defined(SYSVAD_USB_SIDEBAND) if (IsSidebandDevice()) { @@ -85,6 +88,7 @@ class CMiniportTopology : _In_reads_(cJackDescriptions) PKSJACK_DESCRIPTION *JackDescriptions, _In_ DWORD JackCapabilities ); + #if defined(SYSVAD_BTH_BYPASS) || defined(SYSVAD_USB_SIDEBAND) BOOL IsSidebandDevice() diff --git a/audio/sysvad/EndpointsCommon/speakertoptable.h b/audio/sysvad/EndpointsCommon/speakertoptable.h index eb12173a0..6850c0cfb 100644 --- a/audio/sysvad/EndpointsCommon/speakertoptable.h +++ b/audio/sysvad/EndpointsCommon/speakertoptable.h @@ -104,6 +104,7 @@ PKSJACK_DESCRIPTION SpeakerJackDescriptions[] = &SpeakerJackDescBridge }; + //============================================================================= static PCCONNECTION_DESCRIPTOR SpeakerTopoMiniportConnections[] = @@ -133,7 +134,6 @@ PCPROPERTY_ITEM PropertiesSpeakerTopoFilter[] = } }; - DEFINE_PCAUTOMATION_TABLE_PROP(AutomationSpeakerTopoFilter, PropertiesSpeakerTopoFilter); //============================================================================= diff --git a/audio/sysvad/README.md b/audio/sysvad/README.md index 281af1ad1..3a799ba2b 100644 --- a/audio/sysvad/README.md +++ b/audio/sysvad/README.md @@ -175,3 +175,11 @@ On the target computer, in a Command Prompt window, enter **devmgmt.msc** to ope On the target computer, open Control Panel and navigate to **Hardware and Sound** \> **Manage audio devices**. In the Sound dialog box, select the speaker icon labeled as *SYSVAD (with APO Extensions)*, then click **Set Default**, but do not click **OK**. This will keep the Sound dialog box open. Locate an MP3 or other audio file on the target computer and double-click to play it. Then in the Sound dialog box, verify that there is activity in the volume level indicator associated with the *SYSVAD (with APO Extensions)* driver. + +## HLK testing + +The sample uploaded here is tested using the latest HLK version available to make sure it passes all audio tests in the current playlist. However, since it is a virtual audio driver it does not implement audio mixing and simulates capture and loopback by generating a tone. Given these limitations, there are some HLK tests that are expected to fail because they rely on the described functionality. + +In the case of audio tests, one of these exceptions is the Hardware Offload of Audio Processing Test. This test is aimed at devices that support offload capabilities and performs checks to make sure that the device complies with the appropiate requirements. In the particular case of SysVAD, this test will fail for endpoints with offload and loopback. + +For endpoints with offload, the test will fail because the driver includes offload pins but it does not implement a mixer with volume, mute and peak meter nodes, etc. For the case of endpoints with loopback, the test will fail because the driver simulates loopback by returning a sine tone instead of performing real mixing of streams in host and/or offload pins. \ No newline at end of file diff --git a/audio/sysvad/TabletAudioSample/ComponentizedAudioSample.inx b/audio/sysvad/TabletAudioSample/ComponentizedAudioSample.inx index ccaa73273..8f04a934e 100644 Binary files a/audio/sysvad/TabletAudioSample/ComponentizedAudioSample.inx and b/audio/sysvad/TabletAudioSample/ComponentizedAudioSample.inx differ diff --git a/audio/sysvad/adapter.cpp b/audio/sysvad/adapter.cpp index 7cfa54ee3..cc7960a55 100644 --- a/audio/sysvad/adapter.cpp +++ b/audio/sysvad/adapter.cpp @@ -1177,6 +1177,7 @@ Return Value: switch (stack->MinorFunction) { +#ifdef SYSVAD_USB_SIDEBAND case IRP_MN_QUERY_DEVICE_RELATIONS: switch (stack->Parameters.QueryDeviceRelations.Type) @@ -1203,6 +1204,7 @@ Return Value: break; } break; +#endif // SYSVAD_USB_SIDEBAND case IRP_MN_REMOVE_DEVICE: case IRP_MN_SURPRISE_REMOVAL: diff --git a/audio/sysvad/common.cpp b/audio/sysvad/common.cpp index f88ca093b..9292c96d5 100644 --- a/audio/sysvad/common.cpp +++ b/audio/sysvad/common.cpp @@ -302,7 +302,9 @@ class CAdapterCommon : STDMETHODIMP_(VOID) Cleanup(); +#ifdef SYSVAD_USB_SIDEBAND STDMETHODIMP_(NTSTATUS) UpdatePowerRelations(_In_ PIRP Irp); +#endif // SYSVAD_USB_SIDEBAND //===================================================================== // friends @@ -608,7 +610,9 @@ Return Value: InterlockedDecrement(&CAdapterCommon::m_AdapterInstances); ASSERT(CAdapterCommon::m_AdapterInstances == 0); +#ifdef SYSVAD_USB_SIDEBAND ASSERT(IsListEmpty(&m_PowerRelations)); +#endif // SYSVAD_USB_SIDEBAND } // ~CAdapterCommon //============================================================================= @@ -2300,6 +2304,7 @@ CAdapterCommon::Cleanup() EmptySubdeviceCache(); } +#ifdef SYSVAD_USB_SIDEBAND //============================================================================= #pragma code_seg("PAGE") NTSTATUS @@ -2426,6 +2431,7 @@ CAdapterCommon::UpdatePowerRelations(_In_ PIRP Irp) return status; } +#endif // SYSVAD_USB_SIDEBAND //============================================================================= #pragma code_seg("PAGE") diff --git a/audio/sysvad/common.h b/audio/sysvad/common.h index 794b37976..8ce0a866f 100644 --- a/audio/sysvad/common.h +++ b/audio/sysvad/common.h @@ -206,6 +206,7 @@ typedef struct _PIN_DEVICE_FORMATS_AND_MODES } PIN_DEVICE_FORMATS_AND_MODES, *PPIN_DEVICE_FORMATS_AND_MODES; + // // Parameter module handler function prototypes. // @@ -670,7 +671,9 @@ DECLARE_INTERFACE_(IAdapterCommon, IUnknown) STDMETHOD_(VOID, Cleanup)(); +#ifdef SYSVAD_USB_SIDEBAND STDMETHOD_(NTSTATUS, UpdatePowerRelations)(_In_ PIRP Irp); +#endif // SYSVAD_USB_SIDEBAND STDMETHOD_(NTSTATUS, NotifyEndpointPair) (