mirror of
https://github.com/reactos/reactos.git
synced 2024-08-01 09:01:13 +00:00
- Fix enumerating of KSDATARANGES
- Increment pin instance count when a new pin is created - Complete IRP on close request for filter - Make sure IRP Status block is set when completing played stream IRP - Silence debug prints - Enumerating number of channels and data formats should now work svn path=/trunk/; revision=39740
This commit is contained in:
parent
8f47f51547
commit
93ce0dce1f
|
@ -112,7 +112,7 @@ KsPinPropertyHandler(
|
||||||
KSP_PIN * Pin;
|
KSP_PIN * Pin;
|
||||||
KSMULTIPLE_ITEM * Item;
|
KSMULTIPLE_ITEM * Item;
|
||||||
PIO_STACK_LOCATION IoStack;
|
PIO_STACK_LOCATION IoStack;
|
||||||
ULONG Size;
|
ULONG Size, Index;
|
||||||
PVOID Buffer;
|
PVOID Buffer;
|
||||||
|
|
||||||
IoStack = IoGetCurrentIrpStackLocation(Irp);
|
IoStack = IoGetCurrentIrpStackLocation(Irp);
|
||||||
|
@ -161,8 +161,11 @@ KsPinPropertyHandler(
|
||||||
Irp->IoStatus.Information = 0;
|
Irp->IoStatus.Information = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Size = sizeof(KSMULTIPLE_ITEM);
|
||||||
Size = sizeof(KSMULTIPLE_ITEM) + sizeof(KSDATARANGE) * Descriptor[Pin->PinId].DataRangesCount;
|
for (Index = 0; Index < Descriptor[Pin->PinId].DataRangesCount; Index++)
|
||||||
|
{
|
||||||
|
Size += Descriptor[Pin->PinId].DataRanges[Index]->FormatSize;
|
||||||
|
}
|
||||||
|
|
||||||
if (IoStack->Parameters.DeviceIoControl.OutputBufferLength < Size)
|
if (IoStack->Parameters.DeviceIoControl.OutputBufferLength < Size)
|
||||||
{
|
{
|
||||||
|
@ -174,7 +177,13 @@ KsPinPropertyHandler(
|
||||||
Item = (KSMULTIPLE_ITEM*)Buffer;
|
Item = (KSMULTIPLE_ITEM*)Buffer;
|
||||||
Item->Size = Size;
|
Item->Size = Size;
|
||||||
Item->Count = Descriptor[Pin->PinId].DataRangesCount;
|
Item->Count = Descriptor[Pin->PinId].DataRangesCount;
|
||||||
RtlMoveMemory((PVOID)(Item + 1), Descriptor[Pin->PinId].DataRanges, Descriptor[Pin->PinId].DataRangesCount * sizeof(KSDATARANGE));
|
|
||||||
|
Data = (PUCHAR)(Item +1);
|
||||||
|
for (Index = 0; Index < Descriptor[Pin->PinId].DataRangesCount; Index++)
|
||||||
|
{
|
||||||
|
RtlMoveMemory(Data, Descriptor[Pin->PinId].DataRanges[Index], Descriptor[Pin->PinId].DataRanges[Index]->FormatSize);
|
||||||
|
Data = ((PUCHAR)Data + Descriptor[Pin->PinId].DataRanges[Index]->FormatSize);
|
||||||
|
}
|
||||||
|
|
||||||
Irp->IoStatus.Status = STATUS_SUCCESS;
|
Irp->IoStatus.Status = STATUS_SUCCESS;
|
||||||
Irp->IoStatus.Information = Size;
|
Irp->IoStatus.Information = Size;
|
||||||
|
|
|
@ -129,6 +129,10 @@ IPortFilterWaveCyclic_fnNewIrpTarget(
|
||||||
|
|
||||||
/* store result */
|
/* store result */
|
||||||
*OutTarget = (IIrpTarget*)Pin;
|
*OutTarget = (IIrpTarget*)Pin;
|
||||||
|
|
||||||
|
/* increment current instance count */
|
||||||
|
Descriptor->Factory.Instances[ConnectDetails->PinId].CurrentPinInstanceCount++;
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,8 +148,8 @@ IPortFilterWaveCyclic_fnDeviceIoControl(
|
||||||
{
|
{
|
||||||
PIO_STACK_LOCATION IoStack;
|
PIO_STACK_LOCATION IoStack;
|
||||||
ISubdevice *SubDevice = NULL;
|
ISubdevice *SubDevice = NULL;
|
||||||
SUBDEVICE_DESCRIPTOR * Descriptor = NULL;
|
SUBDEVICE_DESCRIPTOR * Descriptor;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
#if defined(DBG)
|
#if defined(DBG)
|
||||||
IPortFilterWaveCyclicImpl * This = (IPortFilterWaveCyclicImpl *)iface;
|
IPortFilterWaveCyclicImpl * This = (IPortFilterWaveCyclicImpl *)iface;
|
||||||
#endif
|
#endif
|
||||||
|
@ -155,8 +159,8 @@ IPortFilterWaveCyclic_fnDeviceIoControl(
|
||||||
ASSERT(This->Port->lpVtbl->QueryInterface(This->Port, &IID_ISubdevice, (PVOID*)&SubDevice) == STATUS_SUCCESS);
|
ASSERT(This->Port->lpVtbl->QueryInterface(This->Port, &IID_ISubdevice, (PVOID*)&SubDevice) == STATUS_SUCCESS);
|
||||||
ASSERT(SubDevice != NULL);
|
ASSERT(SubDevice != NULL);
|
||||||
|
|
||||||
Status = SubDevice->lpVtbl->GetDescriptor(SubDevice, &Descriptor);
|
Status = SubDevice->lpVtbl->GetDescriptor(SubDevice, &Descriptor);
|
||||||
ASSERT(Status == STATUS_SUCCESS);
|
ASSERT(Status == STATUS_SUCCESS);
|
||||||
ASSERT(Descriptor != NULL);
|
ASSERT(Descriptor != NULL);
|
||||||
|
|
||||||
SubDevice->lpVtbl->Release(SubDevice);
|
SubDevice->lpVtbl->Release(SubDevice);
|
||||||
|
@ -213,6 +217,14 @@ IPortFilterWaveCyclic_fnClose(
|
||||||
IN PDEVICE_OBJECT DeviceObject,
|
IN PDEVICE_OBJECT DeviceObject,
|
||||||
IN PIRP Irp)
|
IN PIRP Irp)
|
||||||
{
|
{
|
||||||
|
DPRINT1("IPortFilterWaveCyclic_fnClose entered\n");
|
||||||
|
|
||||||
|
//FIXME
|
||||||
|
//close all pin instances
|
||||||
|
|
||||||
|
Irp->IoStatus.Status = STATUS_SUCCESS;
|
||||||
|
Irp->IoStatus.Information = 0;
|
||||||
|
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||||
|
|
||||||
return STATUS_UNSUCCESSFUL;
|
return STATUS_UNSUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,7 +102,7 @@ typedef struct
|
||||||
ULONG MaxGlobalInstanceCount;
|
ULONG MaxGlobalInstanceCount;
|
||||||
ULONG MaxFilterInstanceCount;
|
ULONG MaxFilterInstanceCount;
|
||||||
ULONG MinFilterInstanceCount;
|
ULONG MinFilterInstanceCount;
|
||||||
ULONG CurrentFilterInstanceCount;
|
ULONG CurrentPinInstanceCount;
|
||||||
|
|
||||||
}PIN_INSTANCE_INFO, *PPIN_INSTANCE_INFO;
|
}PIN_INSTANCE_INFO, *PPIN_INSTANCE_INFO;
|
||||||
|
|
||||||
|
|
|
@ -124,6 +124,8 @@ IServiceSink_fnRequestService(
|
||||||
{
|
{
|
||||||
if (This->ActiveIrp)
|
if (This->ActiveIrp)
|
||||||
{
|
{
|
||||||
|
This->ActiveIrp->IoStatus.Status = STATUS_SUCCESS;
|
||||||
|
This->ActiveIrp->IoStatus.Information = This->ActiveIrpBufferSize;
|
||||||
IoCompleteRequest(This->ActiveIrp, IO_SOUND_INCREMENT);
|
IoCompleteRequest(This->ActiveIrp, IO_SOUND_INCREMENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,7 +169,7 @@ IServiceSink_fnRequestService(
|
||||||
|
|
||||||
|
|
||||||
Status = This->Stream->lpVtbl->GetPosition(This->Stream, &Position);
|
Status = This->Stream->lpVtbl->GetPosition(This->Stream, &Position);
|
||||||
DPRINT1("Position %u BufferSize %u ActiveIrpOffset %u\n", Position, This->CommonBufferSize, This->ActiveIrpOffset);
|
DPRINT("Position %u BufferSize %u ActiveIrpOffset %u\n", Position, This->CommonBufferSize, This->ActiveIrpOffset);
|
||||||
|
|
||||||
if (Position < This->CommonBufferOffset)
|
if (Position < This->CommonBufferOffset)
|
||||||
{
|
{
|
||||||
|
@ -176,7 +178,7 @@ IServiceSink_fnRequestService(
|
||||||
|
|
||||||
BytesToCopy = min(BufferLength, IrpLength);
|
BytesToCopy = min(BufferLength, IrpLength);
|
||||||
|
|
||||||
DPRINT1("Copying %u Remaining %u\n", BytesToCopy, IrpLength);
|
DPRINT("Copying %u Remaining %u\n", BytesToCopy, IrpLength);
|
||||||
|
|
||||||
if (BytesToCopy)
|
if (BytesToCopy)
|
||||||
{
|
{
|
||||||
|
@ -193,7 +195,7 @@ IServiceSink_fnRequestService(
|
||||||
IrpLength = This->ActiveIrpBufferSize - This->ActiveIrpOffset;
|
IrpLength = This->ActiveIrpBufferSize - This->ActiveIrpOffset;
|
||||||
BytesToCopy = min(BufferLength, IrpLength);
|
BytesToCopy = min(BufferLength, IrpLength);
|
||||||
|
|
||||||
DPRINT1("Copying %u Remaining %u\n", BytesToCopy, IrpLength);
|
DPRINT("Copying %u Remaining %u\n", BytesToCopy, IrpLength);
|
||||||
|
|
||||||
if (BytesToCopy)
|
if (BytesToCopy)
|
||||||
{
|
{
|
||||||
|
@ -209,13 +211,13 @@ IServiceSink_fnRequestService(
|
||||||
IrpLength = This->ActiveIrpBufferSize - This->ActiveIrpOffset;
|
IrpLength = This->ActiveIrpBufferSize - This->ActiveIrpOffset;
|
||||||
|
|
||||||
BytesToCopy = min(BufferLength, IrpLength);
|
BytesToCopy = min(BufferLength, IrpLength);
|
||||||
DPRINT1("Copying %u Remaining %u\n", BytesToCopy, IrpLength);
|
DPRINT("Copying %u Remaining %u\n", BytesToCopy, IrpLength);
|
||||||
|
|
||||||
if (!BytesToCopy)
|
if (!BytesToCopy)
|
||||||
{
|
{
|
||||||
This->Stream->lpVtbl->SetState(This->Stream, KSSTATE_PAUSE);
|
This->Stream->lpVtbl->SetState(This->Stream, KSSTATE_PAUSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
This->DmaChannel->lpVtbl->CopyTo(This->DmaChannel,
|
This->DmaChannel->lpVtbl->CopyTo(This->DmaChannel,
|
||||||
(PUCHAR)This->CommonBuffer + This->CommonBufferOffset,
|
(PUCHAR)This->CommonBuffer + This->CommonBufferOffset,
|
||||||
|
@ -567,6 +569,12 @@ IPortPinWaveCyclic_fnDeviceIoControl(
|
||||||
}
|
}
|
||||||
|
|
||||||
UNIMPLEMENTED
|
UNIMPLEMENTED
|
||||||
|
DbgBreakPoint();
|
||||||
|
|
||||||
|
Irp->IoStatus.Information = 0;
|
||||||
|
Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
|
||||||
|
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||||
|
|
||||||
return STATUS_UNSUCCESSFUL;
|
return STATUS_UNSUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -619,8 +627,15 @@ IPortPinWaveCyclic_fnClose(
|
||||||
IN PDEVICE_OBJECT DeviceObject,
|
IN PDEVICE_OBJECT DeviceObject,
|
||||||
IN PIRP Irp)
|
IN PIRP Irp)
|
||||||
{
|
{
|
||||||
|
DPRINT1("IPortPinWaveCyclic_fnClose\n");
|
||||||
|
|
||||||
return STATUS_UNSUCCESSFUL;
|
//FIXME
|
||||||
|
|
||||||
|
Irp->IoStatus.Information = 0;
|
||||||
|
Irp->IoStatus.Status = STATUS_SUCCESS;
|
||||||
|
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||||
|
|
||||||
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -624,7 +624,7 @@ ISubDevice_fnGetDescriptor(
|
||||||
|
|
||||||
*Descriptor = This->SubDeviceDescriptor;
|
*Descriptor = This->SubDeviceDescriptor;
|
||||||
|
|
||||||
DPRINT1("ISubDevice_GetDescriptor this %p desc %p\n", This, This->SubDeviceDescriptor);
|
DPRINT("ISubDevice_GetDescriptor this %p desc %p\n", This, This->SubDeviceDescriptor);
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
#include <ntddk.h>
|
#include <ntddk.h>
|
||||||
#include <portcls.h>
|
#include <portcls.h>
|
||||||
#define YDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
#include <dmusicks.h>
|
#include <dmusicks.h>
|
||||||
|
|
|
@ -25,7 +25,7 @@ HandlePropertyInstances(
|
||||||
else
|
else
|
||||||
Instances->PossibleCount = Descriptor->Factory.Instances[Pin->PinId].MaxFilterInstanceCount;
|
Instances->PossibleCount = Descriptor->Factory.Instances[Pin->PinId].MaxFilterInstanceCount;
|
||||||
|
|
||||||
Instances->CurrentCount = Descriptor->Factory.Instances[Pin->PinId].CurrentFilterInstanceCount;
|
Instances->CurrentCount = Descriptor->Factory.Instances[Pin->PinId].CurrentPinInstanceCount;
|
||||||
|
|
||||||
Irp->IoStatus.Information = sizeof(KSPIN_CINSTANCES);
|
Irp->IoStatus.Information = sizeof(KSPIN_CINSTANCES);
|
||||||
Irp->IoStatus.Status = STATUS_SUCCESS;
|
Irp->IoStatus.Status = STATUS_SUCCESS;
|
||||||
|
@ -222,7 +222,6 @@ PcPropertyHandler(
|
||||||
|
|
||||||
RtlStringFromGUID(&Property->Set, &GuidString);
|
RtlStringFromGUID(&Property->Set, &GuidString);
|
||||||
DPRINT1("Unhandeled property: Set %S Id %u Flags %x\n", GuidString.Buffer, Property->Id, Property->Flags);
|
DPRINT1("Unhandeled property: Set %S Id %u Flags %x\n", GuidString.Buffer, Property->Id, Property->Flags);
|
||||||
DbgBreakPoint();
|
|
||||||
RtlFreeUnicodeString(&GuidString);
|
RtlFreeUnicodeString(&GuidString);
|
||||||
Irp->IoStatus.Information = 0;
|
Irp->IoStatus.Information = 0;
|
||||||
Irp->IoStatus.Status = STATUS_NOT_IMPLEMENTED;
|
Irp->IoStatus.Status = STATUS_NOT_IMPLEMENTED;
|
||||||
|
|
|
@ -33,7 +33,7 @@ IRegistryKey_fnRelease(
|
||||||
IRegistryKeyImpl * This = (IRegistryKeyImpl*)iface;
|
IRegistryKeyImpl * This = (IRegistryKeyImpl*)iface;
|
||||||
|
|
||||||
InterlockedDecrement(&This->ref);
|
InterlockedDecrement(&This->ref);
|
||||||
DPRINT1("IRegistryKey_fnRelease ref %u this %p entered\n", This->ref, This);
|
DPRINT("IRegistryKey_fnRelease ref %u this %p entered\n", This->ref, This);
|
||||||
if (This->ref == 0)
|
if (This->ref == 0)
|
||||||
{
|
{
|
||||||
if (This->hKey)
|
if (This->hKey)
|
||||||
|
@ -55,7 +55,7 @@ IRegistryKey_fnQueryInterface(
|
||||||
OUT PVOID* Output)
|
OUT PVOID* Output)
|
||||||
{
|
{
|
||||||
IRegistryKeyImpl * This = (IRegistryKeyImpl*)iface;
|
IRegistryKeyImpl * This = (IRegistryKeyImpl*)iface;
|
||||||
DPRINT1("IRegistryKey_fnQueryInterface entered\n");
|
DPRINT("IRegistryKey_fnQueryInterface entered\n");
|
||||||
if (IsEqualGUIDAligned(refiid, &IID_IRegistryKey))
|
if (IsEqualGUIDAligned(refiid, &IID_IRegistryKey))
|
||||||
{
|
{
|
||||||
*Output = (PVOID)&This->lpVtbl;
|
*Output = (PVOID)&This->lpVtbl;
|
||||||
|
@ -64,7 +64,7 @@ IRegistryKey_fnQueryInterface(
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("IRegistryKey_QueryInterface: This %p unknown iid\n", This, This->ref);
|
DPRINT("IRegistryKey_QueryInterface: This %p unknown iid\n", This, This->ref);
|
||||||
KeBugCheckEx(0,0,0,0,0);
|
DbgBreakPoint();
|
||||||
return STATUS_UNSUCCESSFUL;
|
return STATUS_UNSUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ IRegistryKey_fnDeleteKey(
|
||||||
IN IRegistryKey* iface)
|
IN IRegistryKey* iface)
|
||||||
{
|
{
|
||||||
IRegistryKeyImpl * This = (IRegistryKeyImpl*)iface;
|
IRegistryKeyImpl * This = (IRegistryKeyImpl*)iface;
|
||||||
DPRINT1("IRegistryKey_fnDeleteKey entered\n");
|
DPRINT("IRegistryKey_fnDeleteKey entered\n");
|
||||||
return ZwDeleteKey(This->hKey);
|
return ZwDeleteKey(This->hKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ IRegistryKey_fnEnumerateKey(
|
||||||
OUT PULONG ResultLength)
|
OUT PULONG ResultLength)
|
||||||
{
|
{
|
||||||
IRegistryKeyImpl * This = (IRegistryKeyImpl*)iface;
|
IRegistryKeyImpl * This = (IRegistryKeyImpl*)iface;
|
||||||
DPRINT1("IRegistryKey_fnEnumerateKey entered\n");
|
DPRINT("IRegistryKey_fnEnumerateKey entered\n");
|
||||||
return ZwEnumerateKey(This->hKey, Index, KeyInformationClass, KeyInformation, Length, ResultLength);
|
return ZwEnumerateKey(This->hKey, Index, KeyInformationClass, KeyInformation, Length, ResultLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ IRegistryKey_fnEnumerateKeyValue(
|
||||||
OUT PULONG ResultLength)
|
OUT PULONG ResultLength)
|
||||||
{
|
{
|
||||||
IRegistryKeyImpl * This = (IRegistryKeyImpl*)iface;
|
IRegistryKeyImpl * This = (IRegistryKeyImpl*)iface;
|
||||||
DPRINT1("IRegistryKey_fnEnumerateKeyValue entered\n");
|
DPRINT("IRegistryKey_fnEnumerateKeyValue entered\n");
|
||||||
return ZwEnumerateValueKey(This->hKey, Index, KeyValueInformationClass, KeyValueInformation, Length, ResultLength);
|
return ZwEnumerateValueKey(This->hKey, Index, KeyValueInformationClass, KeyValueInformation, Length, ResultLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,13 +124,16 @@ IRegistryKey_fnNewSubKey(
|
||||||
HANDLE hKey;
|
HANDLE hKey;
|
||||||
IRegistryKeyImpl * NewThis, *This = (IRegistryKeyImpl*)iface;
|
IRegistryKeyImpl * NewThis, *This = (IRegistryKeyImpl*)iface;
|
||||||
|
|
||||||
DPRINT1("IRegistryKey_fnNewSubKey entered\n");
|
DPRINT("IRegistryKey_fnNewSubKey entered %S\n", SubKeyName);
|
||||||
|
|
||||||
InitializeObjectAttributes(&Attributes, SubKeyName, 0, This->hKey, NULL);
|
InitializeObjectAttributes(&Attributes, SubKeyName, 0, This->hKey, NULL);
|
||||||
Status = ZwCreateKey(&hKey, KEY_READ | KEY_WRITE, &Attributes, 0, NULL, 0, Disposition);
|
Status = ZwCreateKey(&hKey, KEY_READ | KEY_WRITE, &Attributes, 0, NULL, 0, Disposition);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
DPRINT1("IRegistryKey_fnNewSubKey failed with %x\n", Status);
|
||||||
|
DbgBreakPoint();
|
||||||
return Status;
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
NewThis = AllocateItem(NonPagedPool, sizeof(IRegistryKeyImpl), TAG_PORTCLASS);
|
NewThis = AllocateItem(NonPagedPool, sizeof(IRegistryKeyImpl), TAG_PORTCLASS);
|
||||||
if (!NewThis)
|
if (!NewThis)
|
||||||
|
@ -143,11 +146,11 @@ IRegistryKey_fnNewSubKey(
|
||||||
OuterUnknown->lpVtbl->AddRef(OuterUnknown);
|
OuterUnknown->lpVtbl->AddRef(OuterUnknown);
|
||||||
|
|
||||||
NewThis->hKey = hKey;
|
NewThis->hKey = hKey;
|
||||||
NewThis->ref = 2;
|
NewThis->ref = 1;
|
||||||
NewThis->lpVtbl = &vt_IRegistryKey;
|
NewThis->lpVtbl = &vt_IRegistryKey;
|
||||||
*RegistrySubKey = (PREGISTRYKEY)&NewThis->lpVtbl;
|
*RegistrySubKey = (PREGISTRYKEY)&NewThis->lpVtbl;
|
||||||
|
|
||||||
DPRINT1("IRegistryKey_fnNewSubKey RESULT %p\n", *RegistrySubKey );
|
DPRINT("IRegistryKey_fnNewSubKey RESULT %p\n", *RegistrySubKey );
|
||||||
|
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -162,7 +165,7 @@ IRegistryKey_fnQueryKey(
|
||||||
OUT PULONG ResultLength)
|
OUT PULONG ResultLength)
|
||||||
{
|
{
|
||||||
IRegistryKeyImpl * This = (IRegistryKeyImpl*)iface;
|
IRegistryKeyImpl * This = (IRegistryKeyImpl*)iface;
|
||||||
DPRINT1("IRegistryKey_fnQueryKey entered\n");
|
DPRINT("IRegistryKey_fnQueryKey entered\n");
|
||||||
return ZwQueryKey(This->hKey, KeyInformationClass, KeyInformation, Length, ResultLength);
|
return ZwQueryKey(This->hKey, KeyInformationClass, KeyInformation, Length, ResultLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,8 +176,9 @@ IRegistryKey_fnQueryRegistryValues(
|
||||||
IN PRTL_QUERY_REGISTRY_TABLE QueryTable,
|
IN PRTL_QUERY_REGISTRY_TABLE QueryTable,
|
||||||
IN PVOID Context OPTIONAL)
|
IN PVOID Context OPTIONAL)
|
||||||
{
|
{
|
||||||
IRegistryKeyImpl * This = (IRegistryKeyImpl*)iface;
|
//IRegistryKeyImpl * This = (IRegistryKeyImpl*)iface;
|
||||||
DPRINT1("IRegistryKey_QueryRegistryValues: This %p\n", This);
|
UNIMPLEMENTED
|
||||||
|
DbgBreakPoint();
|
||||||
return STATUS_UNSUCCESSFUL;
|
return STATUS_UNSUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,7 +208,7 @@ IRegistryKey_fnSetValueKey(
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
IRegistryKeyImpl * This = (IRegistryKeyImpl*)iface;
|
IRegistryKeyImpl * This = (IRegistryKeyImpl*)iface;
|
||||||
DPRINT1("IRegistryKey_fnSetValueKey entered\n");
|
DPRINT1("IRegistryKey_fnSetValueKey entered %S\n", ValueName->Buffer);
|
||||||
return ZwSetValueKey(This->hKey, ValueName, 0, Type, Data, DataSize);
|
return ZwSetValueKey(This->hKey, ValueName, 0, Type, Data, DataSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -245,7 +249,7 @@ PcNewRegistryKey(
|
||||||
IRegistryKeyImpl * This;
|
IRegistryKeyImpl * This;
|
||||||
PPCLASS_DEVICE_EXTENSION DeviceExt;
|
PPCLASS_DEVICE_EXTENSION DeviceExt;
|
||||||
|
|
||||||
DPRINT1("PcNewRegistryKey entered\n");
|
DPRINT("PcNewRegistryKey entered\n");
|
||||||
|
|
||||||
if (!OutRegistryKey)
|
if (!OutRegistryKey)
|
||||||
return STATUS_INVALID_PARAMETER;
|
return STATUS_INVALID_PARAMETER;
|
||||||
|
@ -290,7 +294,8 @@ PcNewRegistryKey(
|
||||||
else if (RegistryKeyType == DeviceInterfaceRegistryKey)
|
else if (RegistryKeyType == DeviceInterfaceRegistryKey)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
/* FIXME */
|
||||||
DPRINT1("fixme\n");
|
UNIMPLEMENTED
|
||||||
|
DbgBreakPoint();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
|
@ -313,7 +318,7 @@ PcNewRegistryKey(
|
||||||
This->ref = 2;
|
This->ref = 2;
|
||||||
|
|
||||||
*OutRegistryKey = (PREGISTRYKEY)&This->lpVtbl;
|
*OutRegistryKey = (PREGISTRYKEY)&This->lpVtbl;
|
||||||
DPRINT1("PcNewRegistryKey result %p\n", *OutRegistryKey);
|
DPRINT("PcNewRegistryKey result %p\n", *OutRegistryKey);
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -147,7 +147,8 @@ PcCreateSubdeviceDescriptor(
|
||||||
IN PPCFILTER_DESCRIPTOR FilterDescription)
|
IN PPCFILTER_DESCRIPTOR FilterDescription)
|
||||||
{
|
{
|
||||||
SUBDEVICE_DESCRIPTOR * Descriptor;
|
SUBDEVICE_DESCRIPTOR * Descriptor;
|
||||||
ULONG Index;
|
ULONG Index, SubIndex;
|
||||||
|
PKSDATARANGE DataRange;
|
||||||
NTSTATUS Status = STATUS_INSUFFICIENT_RESOURCES;
|
NTSTATUS Status = STATUS_INSUFFICIENT_RESOURCES;
|
||||||
|
|
||||||
Descriptor = AllocateItem(NonPagedPool, sizeof(SUBDEVICE_DESCRIPTOR), TAG_PORTCLASS);
|
Descriptor = AllocateItem(NonPagedPool, sizeof(SUBDEVICE_DESCRIPTOR), TAG_PORTCLASS);
|
||||||
|
@ -164,7 +165,6 @@ PcCreateSubdeviceDescriptor(
|
||||||
|
|
||||||
if (FilterPropertiesCount)
|
if (FilterPropertiesCount)
|
||||||
{
|
{
|
||||||
|
|
||||||
/// FIXME
|
/// FIXME
|
||||||
/// handle driver properties
|
/// handle driver properties
|
||||||
Descriptor->FilterPropertySet.Properties = AllocateItem(NonPagedPool, sizeof(KSPROPERTY_SET) * FilterPropertiesCount, TAG_PORTCLASS);
|
Descriptor->FilterPropertySet.Properties = AllocateItem(NonPagedPool, sizeof(KSPROPERTY_SET) * FilterPropertiesCount, TAG_PORTCLASS);
|
||||||
|
@ -198,7 +198,31 @@ PcCreateSubdeviceDescriptor(
|
||||||
for(Index = 0; Index < FilterDescription->PinCount; Index++)
|
for(Index = 0; Index < FilterDescription->PinCount; Index++)
|
||||||
{
|
{
|
||||||
RtlMoveMemory(&Descriptor->Factory.KsPinDescriptor[Index], &FilterDescription->Pins[Index].KsPinDescriptor, FilterDescription->PinSize);
|
RtlMoveMemory(&Descriptor->Factory.KsPinDescriptor[Index], &FilterDescription->Pins[Index].KsPinDescriptor, FilterDescription->PinSize);
|
||||||
Descriptor->Factory.Instances[Index].CurrentFilterInstanceCount = 0;
|
|
||||||
|
if (FilterDescription->Pins[Index].KsPinDescriptor.DataRangesCount)
|
||||||
|
{
|
||||||
|
Descriptor->Factory.KsPinDescriptor[Index].DataRanges = AllocateItem(NonPagedPool, FilterDescription->Pins[Index].KsPinDescriptor.DataRangesCount * sizeof(PKSDATARANGE), TAG_PORTCLASS);
|
||||||
|
if(!Descriptor->Factory.KsPinDescriptor[Index].DataRanges)
|
||||||
|
goto cleanup;
|
||||||
|
|
||||||
|
for (SubIndex = 0; SubIndex < FilterDescription->Pins[Index].KsPinDescriptor.DataRangesCount; SubIndex++)
|
||||||
|
{
|
||||||
|
DataRange = AllocateItem(NonPagedPool, FilterDescription->Pins[Index].KsPinDescriptor.DataRanges[SubIndex]->FormatSize, TAG_PORTCLASS);
|
||||||
|
if (!DataRange)
|
||||||
|
goto cleanup;
|
||||||
|
|
||||||
|
RtlMoveMemory(DataRange,
|
||||||
|
FilterDescription->Pins[Index].KsPinDescriptor.DataRanges[SubIndex],
|
||||||
|
FilterDescription->Pins[Index].KsPinDescriptor.DataRanges[SubIndex]->FormatSize);
|
||||||
|
|
||||||
|
((PKSDATAFORMAT*)Descriptor->Factory.KsPinDescriptor[Index].DataRanges)[SubIndex] = DataRange;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Descriptor->Factory.KsPinDescriptor[Index].DataRangesCount = FilterDescription->Pins[Index].KsPinDescriptor.DataRangesCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
Descriptor->Factory.Instances[Index].CurrentPinInstanceCount = 0;
|
||||||
Descriptor->Factory.Instances[Index].MaxFilterInstanceCount = FilterDescription->Pins[Index].MaxFilterInstanceCount;
|
Descriptor->Factory.Instances[Index].MaxFilterInstanceCount = FilterDescription->Pins[Index].MaxFilterInstanceCount;
|
||||||
Descriptor->Factory.Instances[Index].MaxGlobalInstanceCount = FilterDescription->Pins[Index].MaxGlobalInstanceCount;
|
Descriptor->Factory.Instances[Index].MaxGlobalInstanceCount = FilterDescription->Pins[Index].MaxGlobalInstanceCount;
|
||||||
Descriptor->Factory.Instances[Index].MinFilterInstanceCount = FilterDescription->Pins[Index].MinFilterInstanceCount;
|
Descriptor->Factory.Instances[Index].MinFilterInstanceCount = FilterDescription->Pins[Index].MinFilterInstanceCount;
|
||||||
|
|
|
@ -351,7 +351,7 @@ CheckFormatSupport(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DataRangeAudio->MaximumBitsPerSample <= 16 && DataRangeAudio->MaximumBitsPerSample >= 16)
|
if (DataRangeAudio->MinimumBitsPerSample <= 16 && DataRangeAudio->MaximumBitsPerSample >= 16)
|
||||||
{
|
{
|
||||||
Result |= Mono16Bit;
|
Result |= Mono16Bit;
|
||||||
if (DataRangeAudio->MaximumChannels >= 2)
|
if (DataRangeAudio->MaximumChannels >= 2)
|
||||||
|
@ -449,26 +449,31 @@ WdmAudCapabilities(
|
||||||
IsEqualGUIDAligned(&DataRangeAudio->DataRange.SubFormat, &KSDATAFORMAT_SUBTYPE_PCM) &&
|
IsEqualGUIDAligned(&DataRangeAudio->DataRange.SubFormat, &KSDATAFORMAT_SUBTYPE_PCM) &&
|
||||||
IsEqualGUIDAligned(&DataRangeAudio->DataRange.Specifier, &KSDATAFORMAT_SPECIFIER_WAVEFORMATEX))
|
IsEqualGUIDAligned(&DataRangeAudio->DataRange.Specifier, &KSDATAFORMAT_SPECIFIER_WAVEFORMATEX))
|
||||||
{
|
{
|
||||||
|
DPRINT("Min Sample %u Max Sample %u Min Bits %u Max Bits %u Max Channel %u\n", DataRangeAudio->MinimumSampleFrequency, DataRangeAudio->MaximumSampleFrequency,
|
||||||
|
DataRangeAudio->MinimumBitsPerSample, DataRangeAudio->MaximumBitsPerSample, DataRangeAudio->MaximumChannels);
|
||||||
|
|
||||||
dwFormats |= CheckFormatSupport(DataRangeAudio, 11025, WAVE_FORMAT_1M08, WAVE_FORMAT_1S08, WAVE_FORMAT_1M16, WAVE_FORMAT_1S16);
|
dwFormats |= CheckFormatSupport(DataRangeAudio, 11025, WAVE_FORMAT_1M08, WAVE_FORMAT_1S08, WAVE_FORMAT_1M16, WAVE_FORMAT_1S16);
|
||||||
dwFormats |= CheckFormatSupport(DataRangeAudio, 22050, WAVE_FORMAT_2M08, WAVE_FORMAT_2S08, WAVE_FORMAT_2M16, WAVE_FORMAT_2S16);
|
dwFormats |= CheckFormatSupport(DataRangeAudio, 22050, WAVE_FORMAT_2M08, WAVE_FORMAT_2S08, WAVE_FORMAT_2M16, WAVE_FORMAT_2S16);
|
||||||
dwFormats |= CheckFormatSupport(DataRangeAudio, 44100, WAVE_FORMAT_4M08, WAVE_FORMAT_4S08, WAVE_FORMAT_4M16, WAVE_FORMAT_4S16);
|
dwFormats |= CheckFormatSupport(DataRangeAudio, 44100, WAVE_FORMAT_4M08, WAVE_FORMAT_4S08, WAVE_FORMAT_4M16, WAVE_FORMAT_4S16);
|
||||||
dwFormats |= CheckFormatSupport(DataRangeAudio, 48000, WAVE_FORMAT_48M08, WAVE_FORMAT_48S08, WAVE_FORMAT_48M16, WAVE_FORMAT_48S16);
|
dwFormats |= CheckFormatSupport(DataRangeAudio, 48000, WAVE_FORMAT_48M08, WAVE_FORMAT_48S08, WAVE_FORMAT_48M16, WAVE_FORMAT_48S16);
|
||||||
dwFormats |= CheckFormatSupport(DataRangeAudio, 96000, WAVE_FORMAT_96M08, WAVE_FORMAT_96S08, WAVE_FORMAT_96M16, WAVE_FORMAT_96S16);
|
dwFormats |= CheckFormatSupport(DataRangeAudio, 96000, WAVE_FORMAT_96M08, WAVE_FORMAT_96S08, WAVE_FORMAT_96M16, WAVE_FORMAT_96S16);
|
||||||
|
|
||||||
|
|
||||||
wChannels = DataRangeAudio->MaximumChannels;
|
wChannels = DataRangeAudio->MaximumChannels;
|
||||||
dwSupport = WAVECAPS_VOLUME; //FIXME get info from nodes
|
dwSupport = WAVECAPS_VOLUME; //FIXME get info from nodes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
DataRange = (PKSDATARANGE)((PUCHAR)DataRange + DataRange->FormatSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
DeviceInfo->u.WaveOutCaps.dwFormats = dwFormats;
|
DeviceInfo->u.WaveOutCaps.dwFormats = dwFormats;
|
||||||
DeviceInfo->u.WaveOutCaps.dwSupport = dwSupport;
|
DeviceInfo->u.WaveOutCaps.dwSupport = dwSupport;
|
||||||
DeviceInfo->u.WaveOutCaps.wChannels = wChannels;
|
DeviceInfo->u.WaveOutCaps.wChannels = wChannels;
|
||||||
|
DeviceInfo->u.WaveOutCaps.szPname[0] = L'\0';
|
||||||
|
|
||||||
|
|
||||||
ExFreePool(MultipleItem);
|
ExFreePool(MultipleItem);
|
||||||
|
|
||||||
return SetIrpIoStatus(Irp, Status, sizeof(WDMAUD_DEVICE_INFO));
|
return SetIrpIoStatus(Irp, Status, sizeof(WDMAUD_DEVICE_INFO));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue