Skip to content

Commit

Permalink
Updates to SysVAD (#527)
Browse files Browse the repository at this point in the history
* Fixed build errors when disabling sideband,
* A note about the SysVAD sample and HLK testing.
  • Loading branch information
darugeri committed Sep 10, 2020
1 parent aaeca58 commit 28f8fc7
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 1 deletion.
1 change: 1 addition & 0 deletions audio/sysvad/EndpointsCommon/mintopo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,7 @@ Return Value:
return ntStatus;
}


#if defined(SYSVAD_BTH_BYPASS) || defined(SYSVAD_USB_SIDEBAND)
//=============================================================================
#pragma code_seg()
Expand Down
4 changes: 4 additions & 0 deletions audio/sysvad/EndpointsCommon/mintopo.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ class CMiniportTopology :
{
private:
eDeviceType m_DeviceType;


union {
PVOID m_DeviceContext;
#if defined(SYSVAD_BTH_BYPASS) || defined(SYSVAD_USB_SIDEBAND)
Expand All @@ -55,6 +57,7 @@ class CMiniportTopology :
m_DeviceType(DeviceType),
m_DeviceContext(DeviceContext)
{

#if defined(SYSVAD_BTH_BYPASS) || defined(SYSVAD_USB_SIDEBAND)
if (IsSidebandDevice())
{
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion audio/sysvad/EndpointsCommon/speakertoptable.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ PKSJACK_DESCRIPTION SpeakerJackDescriptions[] =
&SpeakerJackDescBridge
};


//=============================================================================
static
PCCONNECTION_DESCRIPTOR SpeakerTopoMiniportConnections[] =
Expand Down Expand Up @@ -133,7 +134,6 @@ PCPROPERTY_ITEM PropertiesSpeakerTopoFilter[] =
}
};


DEFINE_PCAUTOMATION_TABLE_PROP(AutomationSpeakerTopoFilter, PropertiesSpeakerTopoFilter);

//=============================================================================
Expand Down
8 changes: 8 additions & 0 deletions audio/sysvad/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Binary file modified audio/sysvad/TabletAudioSample/ComponentizedAudioSample.inx
Binary file not shown.
2 changes: 2 additions & 0 deletions audio/sysvad/adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1177,6 +1177,7 @@ Return Value:
switch (stack->MinorFunction)
{

#ifdef SYSVAD_USB_SIDEBAND
case IRP_MN_QUERY_DEVICE_RELATIONS:

switch (stack->Parameters.QueryDeviceRelations.Type)
Expand All @@ -1203,6 +1204,7 @@ Return Value:
break;
}
break;
#endif // SYSVAD_USB_SIDEBAND

case IRP_MN_REMOVE_DEVICE:
case IRP_MN_SURPRISE_REMOVAL:
Expand Down
6 changes: 6 additions & 0 deletions audio/sysvad/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,9 @@ class CAdapterCommon :

STDMETHODIMP_(VOID) Cleanup();

#ifdef SYSVAD_USB_SIDEBAND
STDMETHODIMP_(NTSTATUS) UpdatePowerRelations(_In_ PIRP Irp);
#endif // SYSVAD_USB_SIDEBAND

//=====================================================================
// friends
Expand Down Expand Up @@ -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

//=============================================================================
Expand Down Expand Up @@ -2300,6 +2304,7 @@ CAdapterCommon::Cleanup()
EmptySubdeviceCache();
}

#ifdef SYSVAD_USB_SIDEBAND
//=============================================================================
#pragma code_seg("PAGE")
NTSTATUS
Expand Down Expand Up @@ -2426,6 +2431,7 @@ CAdapterCommon::UpdatePowerRelations(_In_ PIRP Irp)

return status;
}
#endif // SYSVAD_USB_SIDEBAND

//=============================================================================
#pragma code_seg("PAGE")
Expand Down
3 changes: 3 additions & 0 deletions audio/sysvad/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
//
Expand Down Expand Up @@ -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)
(
Expand Down

0 comments on commit 28f8fc7

Please sign in to comment.