Skip to content

Latest commit

 

History

History
103 lines (67 loc) · 4.05 KB

nf-portcls-pcaddstreamresource.md

File metadata and controls

103 lines (67 loc) · 4.05 KB
UID title description old-location tech.root ms.date keywords ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames f1_keywords topic_type api_type api_location api_name
NF:portcls.PcAddStreamResource
PcAddStreamResource function (portcls.h)
PcAddStreamResource adds a stream resource.
audio\pcaddstreamresource.htm
audio
05/08/2018
PcAddStreamResource function
PcAddStreamResource, PcAddStreamResource function [Audio Devices], audio.pcaddstreamresource, portcls/PcAddStreamResource
portcls.h
Windows
Windows 10
Windows Server 2016
Portcls.lib
NA
PASSIVE_LEVEL
Windows
PcAddStreamResource
portcls/PcAddStreamResource
APIRef
kbSyntax
DllExport
NA
PcAddStreamResource

PcAddStreamResource function

-description

PcAddStreamResource adds a stream resource. Two type of stream resources are supported: interrupts and driver-owned threads. PcAddStreamResource can be called by any non-audio WaveRT miniport driver that has interrupts/threads associated with an audio stream. It can also be called by audio WaveRT miniport drivers.

-parameters

-param PhysicalDeviceObject [in]

PDEVICE_OBJECT - The PDO of the device stack using this resource.

-param ResourceSet [in]

PVOID - Reserved for future use, set to NULL. Only device-scoped resources are supported at this time.

-param ResourceDescriptor [in]

PPCSTREAMRESOURCE_DESCRIPTOR - The resource to add. For more information, see PCSTREAMRESOURCE_DESCRIPTOR.

-param ResourceHandle [out]

PCSTREAMRESOURCE* - The location that will hold the resource handle. For more information, see PcRemoveStreamResource.

-returns

STATUS_SUCCESS – The driver was able to register the resource of the specified PDO.

STATUS_INVALID_PARAMETER – The driver returns this error if it finds any other parameter invalid, aside from the specific cases for other error status instances.

Additional standard status codes may be returned.

-remarks

To help ensure glitch-free operation, audio drivers must register their streaming resources with portcls. This allows the OS to manage resources to avoid interference between audio streaming and other subsystems.

Stream resources are any resources used by the audio driver to process audio streams or ensure audio data flow.

All audio drivers must register their stream resources with the audio class driver. Driver registers the following resource types: interrupts, driver-owned threads and dependencies on other audio stack’s resources (example: parallel audio driver stacks). See the definition of PCSTREAMRESOURCE_DESCRIPTOR for more information.

Audio driver must make sure the resource is valid when making this call.

Audio drivers that only run in Windows 10 can use PcAddStreamResource and PcRemoveStreamResource. For Audio waveRT miniport drivers that need to also run under previous versions of Windows, use AddStreamResource and RemoveStreamResource.

-see-also

PCSTREAMRESOURCE_DESCRIPTOR

PcRemoveStreamResource