Skip to content

Commit 28f8fc7

Browse files
authored
Updates to SysVAD (#527)
* Fixed build errors when disabling sideband, * A note about the SysVAD sample and HLK testing.
1 parent aaeca58 commit 28f8fc7

File tree

8 files changed

+25
-1
lines changed

8 files changed

+25
-1
lines changed

audio/sysvad/EndpointsCommon/mintopo.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,7 @@ Return Value:
581581
return ntStatus;
582582
}
583583

584+
584585
#if defined(SYSVAD_BTH_BYPASS) || defined(SYSVAD_USB_SIDEBAND)
585586
//=============================================================================
586587
#pragma code_seg()

audio/sysvad/EndpointsCommon/mintopo.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ class CMiniportTopology :
3333
{
3434
private:
3535
eDeviceType m_DeviceType;
36+
37+
3638
union {
3739
PVOID m_DeviceContext;
3840
#if defined(SYSVAD_BTH_BYPASS) || defined(SYSVAD_USB_SIDEBAND)
@@ -55,6 +57,7 @@ class CMiniportTopology :
5557
m_DeviceType(DeviceType),
5658
m_DeviceContext(DeviceContext)
5759
{
60+
5861
#if defined(SYSVAD_BTH_BYPASS) || defined(SYSVAD_USB_SIDEBAND)
5962
if (IsSidebandDevice())
6063
{
@@ -85,6 +88,7 @@ class CMiniportTopology :
8588
_In_reads_(cJackDescriptions) PKSJACK_DESCRIPTION *JackDescriptions,
8689
_In_ DWORD JackCapabilities
8790
);
91+
8892

8993
#if defined(SYSVAD_BTH_BYPASS) || defined(SYSVAD_USB_SIDEBAND)
9094
BOOL IsSidebandDevice()

audio/sysvad/EndpointsCommon/speakertoptable.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ PKSJACK_DESCRIPTION SpeakerJackDescriptions[] =
104104
&SpeakerJackDescBridge
105105
};
106106

107+
107108
//=============================================================================
108109
static
109110
PCCONNECTION_DESCRIPTOR SpeakerTopoMiniportConnections[] =
@@ -133,7 +134,6 @@ PCPROPERTY_ITEM PropertiesSpeakerTopoFilter[] =
133134
}
134135
};
135136

136-
137137
DEFINE_PCAUTOMATION_TABLE_PROP(AutomationSpeakerTopoFilter, PropertiesSpeakerTopoFilter);
138138

139139
//=============================================================================

audio/sysvad/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,3 +175,11 @@ On the target computer, in a Command Prompt window, enter **devmgmt.msc** to ope
175175
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.
176176

177177
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.
178+
179+
## HLK testing
180+
181+
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.
182+
183+
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.
184+
185+
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.
50 Bytes
Binary file not shown.

audio/sysvad/adapter.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,6 +1177,7 @@ Return Value:
11771177
switch (stack->MinorFunction)
11781178
{
11791179

1180+
#ifdef SYSVAD_USB_SIDEBAND
11801181
case IRP_MN_QUERY_DEVICE_RELATIONS:
11811182

11821183
switch (stack->Parameters.QueryDeviceRelations.Type)
@@ -1203,6 +1204,7 @@ Return Value:
12031204
break;
12041205
}
12051206
break;
1207+
#endif // SYSVAD_USB_SIDEBAND
12061208

12071209
case IRP_MN_REMOVE_DEVICE:
12081210
case IRP_MN_SURPRISE_REMOVAL:

audio/sysvad/common.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,9 @@ class CAdapterCommon :
302302

303303
STDMETHODIMP_(VOID) Cleanup();
304304

305+
#ifdef SYSVAD_USB_SIDEBAND
305306
STDMETHODIMP_(NTSTATUS) UpdatePowerRelations(_In_ PIRP Irp);
307+
#endif // SYSVAD_USB_SIDEBAND
306308

307309
//=====================================================================
308310
// friends
@@ -608,7 +610,9 @@ Return Value:
608610

609611
InterlockedDecrement(&CAdapterCommon::m_AdapterInstances);
610612
ASSERT(CAdapterCommon::m_AdapterInstances == 0);
613+
#ifdef SYSVAD_USB_SIDEBAND
611614
ASSERT(IsListEmpty(&m_PowerRelations));
615+
#endif // SYSVAD_USB_SIDEBAND
612616
} // ~CAdapterCommon
613617

614618
//=============================================================================
@@ -2300,6 +2304,7 @@ CAdapterCommon::Cleanup()
23002304
EmptySubdeviceCache();
23012305
}
23022306

2307+
#ifdef SYSVAD_USB_SIDEBAND
23032308
//=============================================================================
23042309
#pragma code_seg("PAGE")
23052310
NTSTATUS
@@ -2426,6 +2431,7 @@ CAdapterCommon::UpdatePowerRelations(_In_ PIRP Irp)
24262431

24272432
return status;
24282433
}
2434+
#endif // SYSVAD_USB_SIDEBAND
24292435

24302436
//=============================================================================
24312437
#pragma code_seg("PAGE")

audio/sysvad/common.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ typedef struct _PIN_DEVICE_FORMATS_AND_MODES
206206

207207
} PIN_DEVICE_FORMATS_AND_MODES, *PPIN_DEVICE_FORMATS_AND_MODES;
208208

209+
209210
//
210211
// Parameter module handler function prototypes.
211212
//
@@ -670,7 +671,9 @@ DECLARE_INTERFACE_(IAdapterCommon, IUnknown)
670671

671672
STDMETHOD_(VOID, Cleanup)();
672673

674+
#ifdef SYSVAD_USB_SIDEBAND
673675
STDMETHOD_(NTSTATUS, UpdatePowerRelations)(_In_ PIRP Irp);
676+
#endif // SYSVAD_USB_SIDEBAND
674677

675678
STDMETHOD_(NTSTATUS, NotifyEndpointPair)
676679
(

0 commit comments

Comments
 (0)