Author: janderwald
Date: Tue Feb 24 21:38:39 2009
New Revision: 39740
URL:
http://svn.reactos.org/svn/reactos?rev=39740&view=rev
Log:
- 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
Modified:
trunk/reactos/drivers/ksfilter/ks/connectivity.c
trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_wavecyclic.c
trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.h
trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.c
trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.c
trunk/reactos/drivers/wdm/audio/backpln/portcls/private.h
trunk/reactos/drivers/wdm/audio/backpln/portcls/propertyhandler.c
trunk/reactos/drivers/wdm/audio/backpln/portcls/registry.c
trunk/reactos/drivers/wdm/audio/backpln/portcls/undoc.c
trunk/reactos/drivers/wdm/audio/legacy/wdmaud/control.c
Modified: trunk/reactos/drivers/ksfilter/ks/connectivity.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/connec…
==============================================================================
--- trunk/reactos/drivers/ksfilter/ks/connectivity.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/ksfilter/ks/connectivity.c [iso-8859-1] Tue Feb 24 21:38:39
2009
@@ -112,7 +112,7 @@
KSP_PIN * Pin;
KSMULTIPLE_ITEM * Item;
PIO_STACK_LOCATION IoStack;
- ULONG Size;
+ ULONG Size, Index;
PVOID Buffer;
IoStack = IoGetCurrentIrpStackLocation(Irp);
@@ -161,8 +161,11 @@
Irp->IoStatus.Information = 0;
break;
}
-
- Size = sizeof(KSMULTIPLE_ITEM) + sizeof(KSDATARANGE) *
Descriptor[Pin->PinId].DataRangesCount;
+ Size = sizeof(KSMULTIPLE_ITEM);
+ for (Index = 0; Index < Descriptor[Pin->PinId].DataRangesCount;
Index++)
+ {
+ Size += Descriptor[Pin->PinId].DataRanges[Index]->FormatSize;
+ }
if (IoStack->Parameters.DeviceIoControl.OutputBufferLength < Size)
{
@@ -174,7 +177,13 @@
Item = (KSMULTIPLE_ITEM*)Buffer;
Item->Size = Size;
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.Information = Size;
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_wavecyclic.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_wavecyclic.c [iso-8859-1]
(original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_wavecyclic.c [iso-8859-1] Tue
Feb 24 21:38:39 2009
@@ -129,6 +129,10 @@
/* store result */
*OutTarget = (IIrpTarget*)Pin;
+
+ /* increment current instance count */
+
Descriptor->Factory.Instances[ConnectDetails->PinId].CurrentPinInstanceCount++;
+
return Status;
}
@@ -144,8 +148,8 @@
{
PIO_STACK_LOCATION IoStack;
ISubdevice *SubDevice = NULL;
- SUBDEVICE_DESCRIPTOR * Descriptor = NULL;
- NTSTATUS Status;
+ SUBDEVICE_DESCRIPTOR * Descriptor;
+ NTSTATUS Status;
#if defined(DBG)
IPortFilterWaveCyclicImpl * This = (IPortFilterWaveCyclicImpl *)iface;
#endif
@@ -155,8 +159,8 @@
ASSERT(This->Port->lpVtbl->QueryInterface(This->Port,
&IID_ISubdevice, (PVOID*)&SubDevice) == STATUS_SUCCESS);
ASSERT(SubDevice != NULL);
- Status = SubDevice->lpVtbl->GetDescriptor(SubDevice, &Descriptor);
- ASSERT(Status == STATUS_SUCCESS);
+ Status = SubDevice->lpVtbl->GetDescriptor(SubDevice, &Descriptor);
+ ASSERT(Status == STATUS_SUCCESS);
ASSERT(Descriptor != NULL);
SubDevice->lpVtbl->Release(SubDevice);
@@ -213,6 +217,14 @@
IN PDEVICE_OBJECT DeviceObject,
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;
}
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.h [iso-8859-1] Tue Feb 24
21:38:39 2009
@@ -102,7 +102,7 @@
ULONG MaxGlobalInstanceCount;
ULONG MaxFilterInstanceCount;
ULONG MinFilterInstanceCount;
- ULONG CurrentFilterInstanceCount;
+ ULONG CurrentPinInstanceCount;
}PIN_INSTANCE_INFO, *PPIN_INSTANCE_INFO;
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.c [iso-8859-1]
(original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.c [iso-8859-1] Tue Feb
24 21:38:39 2009
@@ -124,6 +124,8 @@
{
if (This->ActiveIrp)
{
+ This->ActiveIrp->IoStatus.Status = STATUS_SUCCESS;
+ This->ActiveIrp->IoStatus.Information =
This->ActiveIrpBufferSize;
IoCompleteRequest(This->ActiveIrp, IO_SOUND_INCREMENT);
}
@@ -167,7 +169,7 @@
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)
{
@@ -176,7 +178,7 @@
BytesToCopy = min(BufferLength, IrpLength);
- DPRINT1("Copying %u Remaining %u\n", BytesToCopy, IrpLength);
+ DPRINT("Copying %u Remaining %u\n", BytesToCopy, IrpLength);
if (BytesToCopy)
{
@@ -193,7 +195,7 @@
IrpLength = This->ActiveIrpBufferSize - This->ActiveIrpOffset;
BytesToCopy = min(BufferLength, IrpLength);
- DPRINT1("Copying %u Remaining %u\n", BytesToCopy, IrpLength);
+ DPRINT("Copying %u Remaining %u\n", BytesToCopy, IrpLength);
if (BytesToCopy)
{
@@ -209,13 +211,13 @@
IrpLength = This->ActiveIrpBufferSize - This->ActiveIrpOffset;
BytesToCopy = min(BufferLength, IrpLength);
- DPRINT1("Copying %u Remaining %u\n", BytesToCopy, IrpLength);
+ DPRINT("Copying %u Remaining %u\n", BytesToCopy, IrpLength);
if (!BytesToCopy)
- {
+ {
This->Stream->lpVtbl->SetState(This->Stream, KSSTATE_PAUSE);
return;
- }
+ }
This->DmaChannel->lpVtbl->CopyTo(This->DmaChannel,
(PUCHAR)This->CommonBuffer +
This->CommonBufferOffset,
@@ -567,6 +569,12 @@
}
UNIMPLEMENTED
+ DbgBreakPoint();
+
+ Irp->IoStatus.Information = 0;
+ Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
+ IoCompleteRequest(Irp, IO_NO_INCREMENT);
+
return STATUS_UNSUCCESSFUL;
}
@@ -619,8 +627,15 @@
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
-
- return STATUS_UNSUCCESSFUL;
+ DPRINT1("IPortPinWaveCyclic_fnClose\n");
+
+ //FIXME
+
+ Irp->IoStatus.Information = 0;
+ Irp->IoStatus.Status = STATUS_SUCCESS;
+ IoCompleteRequest(Irp, IO_NO_INCREMENT);
+
+ return STATUS_SUCCESS;
}
/*
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.c [iso-8859-1]
(original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.c [iso-8859-1] Tue Feb
24 21:38:39 2009
@@ -624,7 +624,7 @@
*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;
}
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/private.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/private.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/private.h [iso-8859-1] Tue Feb 24
21:38:39 2009
@@ -9,7 +9,7 @@
#include <ntddk.h>
#include <portcls.h>
-#define YDEBUG
+#define NDEBUG
#include <debug.h>
#include <dmusicks.h>
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/propertyhandler.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/propertyhandler.c [iso-8859-1]
(original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/propertyhandler.c [iso-8859-1] Tue Feb
24 21:38:39 2009
@@ -25,7 +25,7 @@
else
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.Status = STATUS_SUCCESS;
@@ -222,7 +222,6 @@
RtlStringFromGUID(&Property->Set, &GuidString);
DPRINT1("Unhandeled property: Set %S Id %u Flags %x\n", GuidString.Buffer,
Property->Id, Property->Flags);
- DbgBreakPoint();
RtlFreeUnicodeString(&GuidString);
Irp->IoStatus.Information = 0;
Irp->IoStatus.Status = STATUS_NOT_IMPLEMENTED;
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/registry.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/registry.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/registry.c [iso-8859-1] Tue Feb 24
21:38:39 2009
@@ -33,7 +33,7 @@
IRegistryKeyImpl * This = (IRegistryKeyImpl*)iface;
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->hKey)
@@ -55,7 +55,7 @@
OUT PVOID* Output)
{
IRegistryKeyImpl * This = (IRegistryKeyImpl*)iface;
- DPRINT1("IRegistryKey_fnQueryInterface entered\n");
+ DPRINT("IRegistryKey_fnQueryInterface entered\n");
if (IsEqualGUIDAligned(refiid, &IID_IRegistryKey))
{
*Output = (PVOID)&This->lpVtbl;
@@ -64,7 +64,7 @@
}
DPRINT("IRegistryKey_QueryInterface: This %p unknown iid\n", This,
This->ref);
-KeBugCheckEx(0,0,0,0,0);
+ DbgBreakPoint();
return STATUS_UNSUCCESSFUL;
}
@@ -74,7 +74,7 @@
IN IRegistryKey* iface)
{
IRegistryKeyImpl * This = (IRegistryKeyImpl*)iface;
- DPRINT1("IRegistryKey_fnDeleteKey entered\n");
+ DPRINT("IRegistryKey_fnDeleteKey entered\n");
return ZwDeleteKey(This->hKey);
}
@@ -89,7 +89,7 @@
OUT PULONG ResultLength)
{
IRegistryKeyImpl * This = (IRegistryKeyImpl*)iface;
- DPRINT1("IRegistryKey_fnEnumerateKey entered\n");
+ DPRINT("IRegistryKey_fnEnumerateKey entered\n");
return ZwEnumerateKey(This->hKey, Index, KeyInformationClass, KeyInformation,
Length, ResultLength);
}
@@ -104,7 +104,7 @@
OUT PULONG ResultLength)
{
IRegistryKeyImpl * This = (IRegistryKeyImpl*)iface;
- DPRINT1("IRegistryKey_fnEnumerateKeyValue entered\n");
+ DPRINT("IRegistryKey_fnEnumerateKeyValue entered\n");
return ZwEnumerateValueKey(This->hKey, Index, KeyValueInformationClass,
KeyValueInformation, Length, ResultLength);
}
@@ -124,13 +124,16 @@
HANDLE hKey;
IRegistryKeyImpl * NewThis, *This = (IRegistryKeyImpl*)iface;
- DPRINT1("IRegistryKey_fnNewSubKey entered\n");
+ DPRINT("IRegistryKey_fnNewSubKey entered %S\n", SubKeyName);
InitializeObjectAttributes(&Attributes, SubKeyName, 0, This->hKey, NULL);
Status = ZwCreateKey(&hKey, KEY_READ | KEY_WRITE, &Attributes, 0, NULL, 0,
Disposition);
if (!NT_SUCCESS(Status))
+ {
+ DPRINT1("IRegistryKey_fnNewSubKey failed with %x\n", Status);
+ DbgBreakPoint();
return Status;
-
+ }
NewThis = AllocateItem(NonPagedPool, sizeof(IRegistryKeyImpl), TAG_PORTCLASS);
if (!NewThis)
@@ -143,11 +146,11 @@
OuterUnknown->lpVtbl->AddRef(OuterUnknown);
NewThis->hKey = hKey;
- NewThis->ref = 2;
+ NewThis->ref = 1;
NewThis->lpVtbl = &vt_IRegistryKey;
*RegistrySubKey = (PREGISTRYKEY)&NewThis->lpVtbl;
- DPRINT1("IRegistryKey_fnNewSubKey RESULT %p\n", *RegistrySubKey );
+ DPRINT("IRegistryKey_fnNewSubKey RESULT %p\n", *RegistrySubKey );
return STATUS_SUCCESS;
}
@@ -162,7 +165,7 @@
OUT PULONG ResultLength)
{
IRegistryKeyImpl * This = (IRegistryKeyImpl*)iface;
- DPRINT1("IRegistryKey_fnQueryKey entered\n");
+ DPRINT("IRegistryKey_fnQueryKey entered\n");
return ZwQueryKey(This->hKey, KeyInformationClass, KeyInformation, Length,
ResultLength);
}
@@ -173,8 +176,9 @@
IN PRTL_QUERY_REGISTRY_TABLE QueryTable,
IN PVOID Context OPTIONAL)
{
- IRegistryKeyImpl * This = (IRegistryKeyImpl*)iface;
- DPRINT1("IRegistryKey_QueryRegistryValues: This %p\n", This);
+ //IRegistryKeyImpl * This = (IRegistryKeyImpl*)iface;
+ UNIMPLEMENTED
+ DbgBreakPoint();
return STATUS_UNSUCCESSFUL;
}
@@ -204,7 +208,7 @@
)
{
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);
}
@@ -245,7 +249,7 @@
IRegistryKeyImpl * This;
PPCLASS_DEVICE_EXTENSION DeviceExt;
- DPRINT1("PcNewRegistryKey entered\n");
+ DPRINT("PcNewRegistryKey entered\n");
if (!OutRegistryKey)
return STATUS_INVALID_PARAMETER;
@@ -290,7 +294,8 @@
else if (RegistryKeyType == DeviceInterfaceRegistryKey)
{
/* FIXME */
- DPRINT1("fixme\n");
+ UNIMPLEMENTED
+ DbgBreakPoint();
}
if (!NT_SUCCESS(Status))
@@ -313,7 +318,7 @@
This->ref = 2;
*OutRegistryKey = (PREGISTRYKEY)&This->lpVtbl;
- DPRINT1("PcNewRegistryKey result %p\n", *OutRegistryKey);
+ DPRINT("PcNewRegistryKey result %p\n", *OutRegistryKey);
return STATUS_SUCCESS;
}
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/undoc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/undoc.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/undoc.c [iso-8859-1] Tue Feb 24
21:38:39 2009
@@ -147,7 +147,8 @@
IN PPCFILTER_DESCRIPTOR FilterDescription)
{
SUBDEVICE_DESCRIPTOR * Descriptor;
- ULONG Index;
+ ULONG Index, SubIndex;
+ PKSDATARANGE DataRange;
NTSTATUS Status = STATUS_INSUFFICIENT_RESOURCES;
Descriptor = AllocateItem(NonPagedPool, sizeof(SUBDEVICE_DESCRIPTOR),
TAG_PORTCLASS);
@@ -164,7 +165,6 @@
if (FilterPropertiesCount)
{
-
/// FIXME
/// handle driver properties
Descriptor->FilterPropertySet.Properties = AllocateItem(NonPagedPool,
sizeof(KSPROPERTY_SET) * FilterPropertiesCount, TAG_PORTCLASS);
@@ -198,7 +198,31 @@
for(Index = 0; Index < FilterDescription->PinCount; Index++)
{
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].MaxGlobalInstanceCount =
FilterDescription->Pins[Index].MaxGlobalInstanceCount;
Descriptor->Factory.Instances[Index].MinFilterInstanceCount =
FilterDescription->Pins[Index].MinFilterInstanceCount;
Modified: trunk/reactos/drivers/wdm/audio/legacy/wdmaud/control.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/legacy/w…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/legacy/wdmaud/control.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/legacy/wdmaud/control.c [iso-8859-1] Tue Feb 24
21:38:39 2009
@@ -351,7 +351,7 @@
}
}
- if (DataRangeAudio->MaximumBitsPerSample <= 16 &&
DataRangeAudio->MaximumBitsPerSample >= 16)
+ if (DataRangeAudio->MinimumBitsPerSample <= 16 &&
DataRangeAudio->MaximumBitsPerSample >= 16)
{
Result |= Mono16Bit;
if (DataRangeAudio->MaximumChannels >= 2)
@@ -449,26 +449,31 @@
IsEqualGUIDAligned(&DataRangeAudio->DataRange.SubFormat,
&KSDATAFORMAT_SUBTYPE_PCM) &&
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, 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, 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);
+
wChannels = DataRangeAudio->MaximumChannels;
dwSupport = WAVECAPS_VOLUME; //FIXME get info from nodes
}
}
}
-
+ DataRange = (PKSDATARANGE)((PUCHAR)DataRange + DataRange->FormatSize);
}
DeviceInfo->u.WaveOutCaps.dwFormats = dwFormats;
DeviceInfo->u.WaveOutCaps.dwSupport = dwSupport;
DeviceInfo->u.WaveOutCaps.wChannels = wChannels;
+ DeviceInfo->u.WaveOutCaps.szPname[0] = L'\0';
+
ExFreePool(MultipleItem);
-
return SetIrpIoStatus(Irp, Status, sizeof(WDMAUD_DEVICE_INFO));
}