14const GUID KSPROPSETID_Sysaudio = {0xCBE3FAA0L, 0xCC75, 0x11D0, {0xB4, 0x65, 0x00, 0x00, 0x1A, 0x18, 0x18, 0xE6}};
15const GUID KSPROPSETID_Sysaudio_Pin = {0xA3A53220L, 0xC6E4, 0x11D0, {0xB4, 0x65, 0x00, 0x00, 0x1A, 0x18, 0x18, 0xE6}};
16const GUID KSPROPSETID_General = {0x1464EDA5L, 0x6A8F, 0x11D1, {0x9A, 0xA7, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}};
17const GUID KSPROPSETID_Pin = {0x8C134960L, 0x51AD, 0x11CF, {0x87, 0x8A, 0x94, 0xF8, 0x01, 0xC1, 0x00, 0x00}};
18const GUID KSPROPSETID_Connection = {0x1D58C920L, 0xAC9B, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}};
19const GUID KSPROPSETID_Topology = {0x720D4AC0L, 0x7533, 0x11D0, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}};
20const GUID KSDATAFORMAT_TYPE_AUDIO = {0x73647561L, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
21const GUID KSDATAFORMAT_SUBTYPE_PCM = {0x00000001L, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
22const GUID KSDATAFORMAT_SPECIFIER_WAVEFORMATEX = {0x05589f81L, 0xc356, 0x11ce, {0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a}};
155 PinRequest->
PinId = PinId;
161 MultipleItem->
Count = 1;
162 MultipleItem->
Size = ClientFormat->DataFormat.FormatSize;
164 RtlMoveMemory(MultipleItem + 1, ClientFormat, ClientFormat->DataFormat.FormatSize);
197 DPRINT(
"Property Request KSPROPERTY_PIN_DATARANGES failed with %x\n",
Status);
216 MixerFormat->DataFormat.Flags = 0;
217 MixerFormat->DataFormat.Reserved = 0;
221 MixerFormat->DataFormat.SampleSize = 4;
222 MixerFormat->WaveFormatEx.wFormatTag = ClientFormat->WaveFormatEx.wFormatTag;
225 MixerFormat->WaveFormatEx.nChannels = 2;
227 MixerFormat->WaveFormatEx.wBitsPerSample = 16;
230 MixerFormat->WaveFormatEx.nChannels =
min(ClientFormat->WaveFormatEx.nChannels, AudioRange->
MaximumChannels);
234#ifdef KMIXER_RESAMPLING_IMPLEMENTED
240 MixerFormat->WaveFormatEx.cbSize = 0;
241 MixerFormat->WaveFormatEx.nBlockAlign = (MixerFormat->WaveFormatEx.nChannels * MixerFormat->WaveFormatEx.wBitsPerSample) / 8;
242 MixerFormat->WaveFormatEx.nAvgBytesPerSec = MixerFormat->WaveFormatEx.nChannels * MixerFormat->WaveFormatEx.nSamplesPerSec * (MixerFormat->WaveFormatEx.wBitsPerSample / 8);
251 DPRINT1(
"\nNum Max Channels %u Channels %u Old Channels %u\n Max SampleRate %u SampleRate %u Old SampleRate %u\n Max BitsPerSample %u BitsPerSample %u Old BitsPerSample %u\n",
252 AudioRange->
MaximumChannels, MixerFormat->WaveFormatEx.nChannels, ClientFormat->WaveFormatEx.nChannels,
253 AudioRange->
MaximumSampleFrequency, MixerFormat->WaveFormatEx.nSamplesPerSec, ClientFormat->WaveFormatEx.nSamplesPerSec,
254 AudioRange->
MaximumBitsPerSample, MixerFormat->WaveFormatEx.wBitsPerSample, ClientFormat->WaveFormatEx.wBitsPerSample);
409 DPRINT(
"KsSynchronousIoControlDevice failed with %x for KSPROPERTY_GENERAL_COMPONENTID\n",
Status);
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char UINT32 ACPI_STATUS const char UINT32 const char const char UINT32 ComponentId
_In_ PCHAR _In_ ULONG DeviceNumber
#define STATUS_NOT_IMPLEMENTED
#define NT_SUCCESS(StatCode)
KSDDKAPI NTSTATUS NTAPI KsSynchronousIoControlDevice(IN PFILE_OBJECT FileObject, IN KPROCESSOR_MODE RequestorMode, IN ULONG IoControl, IN PVOID InBuffer, IN ULONG InSize, OUT PVOID OutBuffer, IN ULONG OutSize, OUT PULONG BytesReturned)
const GUID KSPROPSETID_Sysaudio
NTSTATUS SetIrpIoStatus(IN PIRP Irp, IN NTSTATUS Status, IN ULONG Length)
NTSTATUS HandleSysAudioFilterPinProperties(PIRP Irp, PKSPROPERTY Property, PSYSAUDIODEVEXT DeviceExtension)
const GUID KSPROPSETID_Pin
NTSTATUS ComputeCompatibleFormat(IN PKSAUDIO_DEVICE_ENTRY Entry, IN ULONG PinId, IN PKSDATAFORMAT_WAVEFORMATEX ClientFormat, OUT PKSDATAFORMAT_WAVEFORMATEX MixerFormat)
NTSTATUS SysAudioHandleProperty(PDEVICE_OBJECT DeviceObject, PIRP Irp)
const GUID KSDATAFORMAT_TYPE_AUDIO
NTSTATUS SysAudioOpenVirtualDevice(IN PIRP Irp, IN ULONG DeviceNumber, PSYSAUDIODEVEXT DeviceExtension)
const GUID KSDATAFORMAT_SPECIFIER_WAVEFORMATEX
NTSTATUS GetPinInstanceCount(PKSAUDIO_DEVICE_ENTRY Entry, PKSPIN_CINSTANCES PinInstances, PKSPIN_CONNECT PinConnect)
const GUID KSPROPSETID_Sysaudio_Pin
PKSAUDIO_DEVICE_ENTRY GetListEntry(IN PLIST_ENTRY Head, IN ULONG Index)
const GUID KSDATAFORMAT_SUBTYPE_PCM
const GUID KSPROPSETID_General
const GUID KSPROPSETID_Topology
#define KSPROPERTY_TYPE_SET
struct KSIDENTIFIER * PKSPROPERTY
#define KSPROPERTY_TYPE_GET
IN PDCB IN VBO IN ULONG IN BOOLEAN Pin
NTSYSAPI NTSTATUS WINAPI RtlStringFromGUID(REFGUID, PUNICODE_STRING)
#define IOCTL_KS_PROPERTY
struct KSP_PIN * PKSP_PIN
@ KSPROPERTY_PIN_DATAINTERSECTION
@ KSPROPERTY_PIN_CINSTANCES
@ KSPROPERTY_PIN_DATARANGES
#define KSPROPSETID_Connection
struct KSMULTIPLE_ITEM * PKSMULTIPLE_ITEM
@ KSPROPERTY_GENERAL_COMPONENTID
PVOID AllocateItem(IN POOL_TYPE PoolType, IN SIZE_T NumberOfBytes)
VOID FreeItem(IN PVOID Item)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define IoCompleteRequest
#define STATUS_BUFFER_TOO_SMALL
base of all file and directory entries
ULONG MaximumBitsPerSample
ULONG MaximumSampleFrequency
ULONG MinimumSampleFrequency
LIST_ENTRY KsAudioDeviceList
ULONG NumberOfKsAudioDevices
struct _IO_STACK_LOCATION::@1575::@1576 DeviceIoControl
union _IO_STACK_LOCATION::@1575 Parameters
#define RtlMoveMemory(Destination, Source, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_INVALID_PARAMETER
#define STATUS_UNSUCCESSFUL
#define STATUS_MORE_ENTRIES
_In_ WDFCOLLECTION _In_ ULONG Index
_In_ PDEVICE_OBJECT DeviceObject
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_ ULONG _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesReturned
#define IsEqualGUIDAligned(guid1, guid2)