[PORTCLS]

- Silence most dprints of portcls
- Remove dead code
- Fix a bug in PcCreateSubdeviceDescriptor

svn path=/trunk/; revision=43618
This commit is contained in:
Johannes Anderwald 2009-10-19 18:54:01 +00:00
parent 8869f7edc2
commit 25db485c93
31 changed files with 195 additions and 343 deletions

View file

@ -28,11 +28,11 @@ PcInitializeAdapterDriver(
IN PUNICODE_STRING RegistryPathName,
IN PDRIVER_ADD_DEVICE AddDevice)
{
DPRINT1("PcInitializeAdapterDriver\n");
DPRINT("PcInitializeAdapterDriver\n");
PC_ASSERT_IRQL_EQUAL(PASSIVE_LEVEL);
// Our IRP handlers
DPRINT1("Setting IRP handlers\n");
DPRINT("Setting IRP handlers\n");
DriverObject->MajorFunction[IRP_MJ_CREATE] = PcDispatchIrp;
DriverObject->MajorFunction[IRP_MJ_PNP] = PcDispatchIrp;
DriverObject->MajorFunction[IRP_MJ_POWER] = PcDispatchIrp;
@ -79,7 +79,7 @@ PcAddAdapterDevice(
PDEVICE_OBJECT PrevDeviceObject;
PPCLASS_DEVICE_EXTENSION portcls_ext = NULL;
DPRINT1("PcAddAdapterDevice called\n");
DPRINT("PcAddAdapterDevice called\n");
PC_ASSERT_IRQL_EQUAL(PASSIVE_LEVEL);
if (!DriverObject || !PhysicalDeviceObject || !StartDevice)
@ -215,7 +215,7 @@ PcRegisterSubdevice(
UNICODE_STRING RefName;
PSYMBOLICLINK_ENTRY SymEntry;
DPRINT1("PcRegisterSubdevice DeviceObject %p Name %S Unknown %p\n", DeviceObject, Name, Unknown);
DPRINT("PcRegisterSubdevice DeviceObject %p Name %S Unknown %p\n", DeviceObject, Name, Unknown);
PC_ASSERT_IRQL_EQUAL(PASSIVE_LEVEL);
@ -240,7 +240,7 @@ PcRegisterSubdevice(
Status = Unknown->QueryInterface(IID_ISubdevice, (LPVOID*)&SubDevice);
if (!NT_SUCCESS(Status))
{
DPRINT1("No ISubdevice interface\n");
DPRINT("No ISubdevice interface\n");
// the provided port driver doesnt support ISubdevice
return STATUS_INVALID_PARAMETER;
}
@ -249,7 +249,7 @@ PcRegisterSubdevice(
Status = SubDevice->GetDescriptor(&SubDeviceDescriptor);
if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to get subdevice descriptor %x\n", Status);
DPRINT("Failed to get subdevice descriptor %x\n", Status);
SubDevice->Release();
return STATUS_UNSUCCESSFUL;
}
@ -260,7 +260,7 @@ PcRegisterSubdevice(
{
// failed to attach
SubDevice->Release();
DPRINT1("KsAddObjectCreateItemToDeviceHeader failed with %x\n", Status);
DPRINT("KsAddObjectCreateItemToDeviceHeader failed with %x\n", Status);
return Status;
}

View file

@ -92,7 +92,7 @@ PcRegisterIoTimeout(
TimerContext = (PTIMER_CONTEXT)AllocateItem(NonPagedPool, sizeof(TIMER_CONTEXT), TAG_PORTCLASS);
if (!TimerContext)
{
DPRINT1("Failed to allocate memory\n");
DPRINT("Failed to allocate memory\n");
return STATUS_INSUFFICIENT_RESOURCES;
}

View file

@ -82,7 +82,7 @@ CDmaChannelInit::QueryInterface(
PUNKNOWN(*Output)->AddRef();
return STATUS_SUCCESS;
}
DPRINT1("No interface!!!\n");
DPRINT("No interface!!!\n");
return STATUS_UNSUCCESSFUL;
}
@ -101,20 +101,20 @@ CDmaChannelInit::AllocateBuffer(
// Did the caller already allocate a buffer ?*/
if (m_Buffer)
{
DPRINT1("CDmaChannelInit_AllocateBuffer free common buffer first \n");
DPRINT("CDmaChannelInit_AllocateBuffer free common buffer first \n");
return STATUS_UNSUCCESSFUL;
}
m_Buffer = m_pAdapter->DmaOperations->AllocateCommonBuffer(m_pAdapter, BufferSize, &m_Address, FALSE);
if (!m_Buffer)
{
DPRINT1("CDmaChannelInit_AllocateBuffer fAllocateCommonBuffer failed \n");
DPRINT("CDmaChannelInit_AllocateBuffer fAllocateCommonBuffer failed \n");
return STATUS_UNSUCCESSFUL;
}
m_BufferSize = BufferSize;
m_AllocatedBufferSize = BufferSize;
DPRINT1("CDmaChannelInit::AllocateBuffer Success Buffer %p BufferSize %u Address %x\n", m_Buffer, BufferSize, m_Address);
DPRINT("CDmaChannelInit::AllocateBuffer Success Buffer %p BufferSize %u Address %x\n", m_Buffer, BufferSize, m_Address);
return STATUS_SUCCESS;
}
@ -162,7 +162,7 @@ CDmaChannelInit::FreeBuffer()
if (!m_Buffer)
{
DPRINT1("CDmaChannelInit_FreeBuffer allocate common buffer first \n");
DPRINT("CDmaChannelInit_FreeBuffer allocate common buffer first \n");
return;
}
@ -222,6 +222,7 @@ ULONG
NTAPI
CDmaChannelInit::BufferSize()
{
DPRINT("BufferSize %u\n", m_BufferSize);
return m_BufferSize;
}
@ -255,6 +256,8 @@ CDmaChannelInit::ReadCounter()
if (!m_DmaStarted || Counter >= m_LastTransferCount)
Counter = 0;
DPRINT("ReadCounter %u\n", Counter);
return Counter;
}

View file

@ -57,7 +57,7 @@ CDrmPort2::QueryInterface(
if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS)
{
DPRINT1("IDrmPort2_QueryInterface no interface!!! iface %S\n", GuidString.Buffer);
DPRINT("IDrmPort2_QueryInterface no interface!!! iface %S\n", GuidString.Buffer);
RtlFreeUnicodeString(&GuidString);
}
return STATUS_UNSUCCESSFUL;

View file

@ -138,7 +138,7 @@ CPortFilterDMus::DeviceIoControl(
if (IoStack->Parameters.DeviceIoControl.IoControlCode != IOCTL_KS_PROPERTY)
{
DPRINT1("Unhandled function %lx Length %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode, IoStack->Parameters.DeviceIoControl.InputBufferLength);
DPRINT("Unhandled function %lx Length %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode, IoStack->Parameters.DeviceIoControl.InputBufferLength);
Irp->IoStatus.Status = STATUS_SUCCESS;

View file

@ -95,7 +95,7 @@ CPortFilterTopology::DeviceIoControl(
if (IoStack->Parameters.DeviceIoControl.IoControlCode != IOCTL_KS_PROPERTY)
{
DPRINT1("Unhandled function %lx Length %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode, IoStack->Parameters.DeviceIoControl.InputBufferLength);
DPRINT("Unhandled function %lx Length %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode, IoStack->Parameters.DeviceIoControl.InputBufferLength);
Irp->IoStatus.Status = STATUS_SUCCESS;

View file

@ -141,9 +141,9 @@ CPortFilterWaveCyclic::DeviceIoControl(
if (IoStack->Parameters.DeviceIoControl.IoControlCode != IOCTL_KS_PROPERTY)
{
DPRINT1("Unhandled function %lx Length %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode, IoStack->Parameters.DeviceIoControl.InputBufferLength);
DPRINT("Unhandled function %lx Length %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode, IoStack->Parameters.DeviceIoControl.InputBufferLength);
Irp->IoStatus.Status = STATUS_SUCCESS;
Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return STATUS_SUCCESS;
@ -336,7 +336,6 @@ CPortFilterWaveCyclic::FreePin(
if (m_Pins[Index] == Pin)
{
m_Descriptor->Factory.Instances[Index].CurrentPinInstanceCount--;
m_Pins[Index]->Release();
m_Pins[Index] = NULL;
return STATUS_SUCCESS;
}

View file

@ -143,7 +143,7 @@ CPortFilterWavePci::DeviceIoControl(
if (IoStack->Parameters.DeviceIoControl.IoControlCode != IOCTL_KS_PROPERTY)
{
DPRINT1("Unhandled function %lx Length %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode, IoStack->Parameters.DeviceIoControl.InputBufferLength);
DPRINT("Unhandled function %lx Length %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode, IoStack->Parameters.DeviceIoControl.InputBufferLength);
Irp->IoStatus.Status = STATUS_SUCCESS;

View file

@ -147,7 +147,7 @@ CPortFilterWaveRT::DeviceIoControl(
if (IoStack->Parameters.DeviceIoControl.IoControlCode != IOCTL_KS_PROPERTY)
{
DPRINT1("Unhandled function %lx Length %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode, IoStack->Parameters.DeviceIoControl.InputBufferLength);
DPRINT("Unhandled function %lx Length %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode, IoStack->Parameters.DeviceIoControl.InputBufferLength);
Irp->IoStatus.Status = STATUS_SUCCESS;

View file

@ -797,6 +797,8 @@ DECLARE_INTERFACE_(IPortPinWaveCyclic, IIrpTarget)
STDMETHOD_(PMINIPORT, GetMiniport)(THIS) PURE;
};
typedef IPortPinWaveCyclic *PPORTPINWAVECYCLIC;
#define IMP_IPortPinWaveCyclic \
IMP_IIrpTarget; \
STDMETHODIMP_(NTSTATUS) Init(THIS_ \

View file

@ -82,7 +82,7 @@ CInterruptSync::QueryInterface(
return STATUS_SUCCESS;
}
DPRINT1("CInterruptSync::QueryInterface: this %p UNKNOWN interface requested\n", this);
DPRINT("CInterruptSync::QueryInterface: this %p UNKNOWN interface requested\n", this);
return STATUS_UNSUCCESSFUL;
}

View file

@ -126,7 +126,7 @@ PortClsPnp(
return PcCompleteIrp(DeviceObject, Irp, Status);
}
DPRINT1("unhandled function %u\n", IoStack->MinorFunction);
DPRINT("unhandled function %u\n", IoStack->MinorFunction);
Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
@ -182,7 +182,7 @@ PortClsShutdown(
if (DeviceExtension->AdapterPowerManagement)
{
// release adapter power management
DPRINT1("Power %u\n", DeviceExtension->AdapterPowerManagement->Release());
DPRINT("Power %u\n", DeviceExtension->AdapterPowerManagement->Release());
}
Irp->IoStatus.Status = STATUS_SUCCESS;
@ -229,7 +229,7 @@ PcDispatchIrp(
return PortClsShutdown(DeviceObject, Irp);
default:
DPRINT1("Unhandled function %x\n", IoStack->MajorFunction);
DPRINT("Unhandled function %x\n", IoStack->MajorFunction);
break;
};

View file

@ -108,6 +108,8 @@ CIrpQueue::AddMapping(
NTSTATUS Status = STATUS_SUCCESS;
PIO_STACK_LOCATION IoStack;
PC_ASSERT(KeGetCurrentIrql() == PASSIVE_LEVEL);
// get current irp stack location
IoStack = IoGetCurrentIrpStackLocation(Irp);
@ -126,7 +128,7 @@ CIrpQueue::AddMapping(
// check for success
if (!NT_SUCCESS(Status))
{
DPRINT1("KsProbeStreamIrp failed with %x\n", Status);
DPRINT("KsProbeStreamIrp failed with %x\n", Status);
return Status;
}
}
@ -135,7 +137,7 @@ CIrpQueue::AddMapping(
PC_ASSERT(Header);
PC_ASSERT(Irp->MdlAddress);
DPRINT1("Size %u DataUsed %u FrameExtent %u SizeHeader %u NumDataAvailable %u OutputLength %u\n", Header->Size, Header->DataUsed, Header->FrameExtent, sizeof(KSSTREAM_HEADER), m_NumDataAvailable, IoStack->Parameters.DeviceIoControl.OutputBufferLength);
DPRINT("Size %u DataUsed %u FrameExtent %u SizeHeader %u NumDataAvailable %u OutputLength %u\n", Header->Size, Header->DataUsed, Header->FrameExtent, sizeof(KSSTREAM_HEADER), m_NumDataAvailable, IoStack->Parameters.DeviceIoControl.OutputBufferLength);
Header->Data = MmGetSystemAddressForMdlSafe(Irp->MdlAddress, NormalPagePriority);
PC_ASSERT(Header->Data);

View file

@ -238,7 +238,7 @@ SetStreamWorkerRoutineDMus(
{
// reset start stream
This->m_IrpQueue->CancelBuffers(); //FIX function name
DPRINT1("Stopping PreCompleted %u PostCompleted %u\n", This->m_PreCompleted, This->m_PostCompleted);
DPRINT("Stopping PreCompleted %u PostCompleted %u\n", This->m_PreCompleted, This->m_PostCompleted);
}
}
}
@ -546,7 +546,7 @@ CloseStreamRoutineDMus(
if (Stream)
{
DPRINT1("Closing stream at Irql %u\n", KeGetCurrentIrql());
DPRINT("Closing stream at Irql %u\n", KeGetCurrentIrql());
Stream->Release();
}
}
@ -564,14 +564,14 @@ CPortPinDMus::Close(
Ctx = (PCLOSESTREAM_CONTEXT)AllocateItem(NonPagedPool, sizeof(CLOSESTREAM_CONTEXT), TAG_PORTCLASS);
if (!Ctx)
{
DPRINT1("Failed to allocate stream context\n");
DPRINT("Failed to allocate stream context\n");
goto cleanup;
}
Ctx->WorkItem = IoAllocateWorkItem(DeviceObject);
if (!Ctx->WorkItem)
{
DPRINT1("Failed to allocate work item\n");
DPRINT("Failed to allocate work item\n");
goto cleanup;
}
@ -714,14 +714,14 @@ CPortPinDMus::Init(
}
else
{
DPRINT1("Unexpected Communication %u DataFlow %u\n", KsPinDescriptor->Communication, KsPinDescriptor->DataFlow);
DPRINT("Unexpected Communication %u DataFlow %u\n", KsPinDescriptor->Communication, KsPinDescriptor->DataFlow);
KeBugCheck(0);
}
Status = NewIrpQueue(&m_IrpQueue);
if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to allocate IrpQueue with %x\n", Status);
DPRINT("Failed to allocate IrpQueue with %x\n", Status);
return Status;
}
@ -762,7 +762,7 @@ CPortPinDMus::Init(
Status = m_ServiceGroup->AddMember(PSERVICESINK(this));
if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to add pin to service group\n");
DPRINT("Failed to add pin to service group\n");
return Status;
}
m_ServiceGroup->SupportDelayedService();
@ -771,7 +771,7 @@ CPortPinDMus::Init(
Status = m_IrpQueue->Init(ConnectDetails, m_Format, DeviceObject, 0, 0, NULL);
if (!NT_SUCCESS(Status))
{
DPRINT1("IrpQueue_Init failed with %x\n", Status);
DPRINT("IrpQueue_Init failed with %x\n", Status);
return Status;
}

View file

@ -41,13 +41,10 @@ protected:
VOID UpdateCommonBuffer(ULONG Position, ULONG MaxTransferCount);
VOID UpdateCommonBufferOverlap(ULONG Position, ULONG MaxTransferCount);
VOID NTAPI SetStreamState(IN KSSTATE State);
NTSTATUS NTAPI HandleKsStream(IN PIRP Irp);
NTSTATUS NTAPI HandleKsProperty(IN PIRP Irp);
friend VOID NTAPI CloseStreamRoutineWaveCyclic(IN PDEVICE_OBJECT DeviceObject, IN PVOID Context);
friend VOID NTAPI SetStreamWorkerRoutineWaveCyclic(IN PDEVICE_OBJECT DeviceObject, IN PVOID Context);
friend NTSTATUS NTAPI PinWaveCyclicState(IN PIRP Irp, IN PKSIDENTIFIER Request, IN OUT PVOID Data);
friend NTSTATUS NTAPI PinWaveCyclicDataFormat(IN PIRP Irp, IN PKSIDENTIFIER Request, IN OUT PVOID Data);
friend NTSTATUS NTAPI PinWaveCyclicAudioPosition(IN PIRP Irp, IN PKSIDENTIFIER Request, IN OUT PVOID Data);
@ -211,7 +208,7 @@ PinWaveCyclicAudioPosition(
// copy audio position
RtlMoveMemory(Data, &Pin->m_Position, sizeof(KSAUDIO_POSITION));
DPRINT1("Play %lu Record %lu\n", Pin->m_Position.PlayOffset, Pin->m_Position.WriteOffset);
DPRINT("Play %lu Record %lu\n", Pin->m_Position.PlayOffset, Pin->m_Position.WriteOffset);
Irp->IoStatus.Information = sizeof(KSAUDIO_POSITION);
return STATUS_SUCCESS;
}
@ -355,7 +352,7 @@ PinWaveCyclicDataFormat(
PC_ASSERT(IsEqualGUIDAligned(((PKSDATAFORMAT_WAVEFORMATEX)NewDataFormat)->DataFormat.Specifier, KSDATAFORMAT_SPECIFIER_WAVEFORMATEX));
DPRINT1("NewDataFormat: Channels %u Bits %u Samples %u\n", ((PKSDATAFORMAT_WAVEFORMATEX)NewDataFormat)->WaveFormatEx.nChannels,
DPRINT("NewDataFormat: Channels %u Bits %u Samples %u\n", ((PKSDATAFORMAT_WAVEFORMATEX)NewDataFormat)->WaveFormatEx.nChannels,
((PKSDATAFORMAT_WAVEFORMATEX)NewDataFormat)->WaveFormatEx.wBitsPerSample,
((PKSDATAFORMAT_WAVEFORMATEX)NewDataFormat)->WaveFormatEx.nSamplesPerSec);
#endif
@ -490,111 +487,6 @@ CPortPinWaveCyclic::UpdateCommonBufferOverlap(
}
}
VOID
NTAPI
SetStreamWorkerRoutineWaveCyclic(
IN PDEVICE_OBJECT DeviceObject,
IN PVOID Context)
{
CPortPinWaveCyclic * This;
PSETSTREAM_CONTEXT Ctx = (PSETSTREAM_CONTEXT)Context;
KSSTATE State;
ULONG MinimumDataThreshold;
ULONG MaximumDataThreshold;
This = Ctx->Pin;
State = Ctx->State;
IoFreeWorkItem(Ctx->WorkItem);
FreeItem(Ctx, TAG_PORTCLASS);
// Has the audio stream resumed?
if (This->m_IrpQueue->NumMappings() && State == KSSTATE_STOP)
return;
// Has the audio state already been set?
if (This->m_State == State)
return;
// Set the state
if (NT_SUCCESS(This->m_Stream->SetState(State)))
{
// Set internal state
This->m_State = State;
if (This->m_State == KSSTATE_STOP)
{
// reset start stream
This->m_IrpQueue->CancelBuffers(); //FIX function name
// increase stop counter
This->m_StopCount++;
// get current data threshold
MinimumDataThreshold = This->m_IrpQueue->GetMinimumDataThreshold();
// get maximum data threshold
MaximumDataThreshold = ((PKSDATAFORMAT_WAVEFORMATEX)This->m_Format)->WaveFormatEx.nAvgBytesPerSec;
// increase minimum data threshold by a third sec
MinimumDataThreshold += This->m_FrameSize * 10;
// assure it has not exceeded
MinimumDataThreshold = min(MinimumDataThreshold, MaximumDataThreshold);
// store minimum data threshold
This->m_IrpQueue->SetMinimumDataThreshold(MinimumDataThreshold);
DPRINT1("Stopping TotalPackets %u StopCount %u\n", This->m_TotalPackets, This->m_StopCount);
}
if (This->m_State == KSSTATE_RUN)
{
DPRINT1("State RUN %x MinAvailable %u CommonBufferSize %u Offset %u\n", State, This->m_IrpQueue->MinimumDataAvailable(), This->m_CommonBufferSize, This->m_CommonBufferOffset);
}
}
}
VOID
NTAPI
CPortPinWaveCyclic::SetStreamState(
IN KSSTATE State)
{
PDEVICE_OBJECT DeviceObject;
PIO_WORKITEM WorkItem;
PSETSTREAM_CONTEXT Context;
PC_ASSERT(KeGetCurrentIrql() <= DISPATCH_LEVEL);
// Has the audio stream resumed?
if (m_IrpQueue->NumMappings() && State == KSSTATE_STOP)
return;
// Has the audio state already been set?
if (m_State == State)
return;
// Get device object
DeviceObject = GetDeviceObject(m_Port);
// allocate set state context
Context = (PSETSTREAM_CONTEXT)AllocateItem(NonPagedPool, sizeof(SETSTREAM_CONTEXT), TAG_PORTCLASS);
if (!Context)
return;
// allocate work item
WorkItem = IoAllocateWorkItem(DeviceObject);
if (!WorkItem)
{
ExFreePool(Context);
return;
}
Context->Pin = this;
Context->WorkItem = WorkItem;
Context->State = State;
// queue the work item
IoQueueWorkItem(WorkItem, SetStreamWorkerRoutineWaveCyclic, DelayedWorkQueue, (PVOID)Context);
}
VOID
NTAPI
CPortPinWaveCyclic::RequestService()
@ -609,7 +501,6 @@ CPortPinWaveCyclic::RequestService()
Status = m_IrpQueue->GetMapping(&Buffer, &BufferSize);
if (!NT_SUCCESS(Status))
{
//SetStreamState(This, KSSTATE_STOP);
return;
}
@ -638,7 +529,6 @@ CPortPinWaveCyclic::NewIrpTarget(
IN KSOBJECT_CREATE *CreateObject)
{
UNIMPLEMENTED
DbgBreakPoint();
return STATUS_UNSUCCESSFUL;
}
@ -660,7 +550,7 @@ CPortPinWaveCyclic::HandleKsProperty(
if (IoStack->Parameters.DeviceIoControl.IoControlCode != IOCTL_KS_PROPERTY)
{
DPRINT1("Unhandled function %lx Length %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode, IoStack->Parameters.DeviceIoControl.InputBufferLength);
DPRINT("Unhandled function %lx Length %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode, IoStack->Parameters.DeviceIoControl.InputBufferLength);
Irp->IoStatus.Status = STATUS_SUCCESS;
@ -675,7 +565,7 @@ CPortPinWaveCyclic::HandleKsProperty(
Property = (PKSPROPERTY)IoStack->Parameters.DeviceIoControl.Type3InputBuffer;
RtlStringFromGUID(Property->Set, &GuidString);
DPRINT1("Unhandeled property Set |%S| Id %u Flags %x\n", GuidString.Buffer, Property->Id, Property->Flags);
DPRINT("Unhandeled property Set |%S| Id %u Flags %x\n", GuidString.Buffer, Property->Id, Property->Flags);
RtlFreeUnicodeString(&GuidString);
}
@ -792,127 +682,82 @@ CPortPinWaveCyclic::Flush(
return KsDispatchInvalidDeviceRequest(DeviceObject, Irp);
}
VOID
NTAPI
CloseStreamRoutineWaveCyclic(
IN PDEVICE_OBJECT DeviceObject,
IN PVOID Context)
{
PMINIPORTWAVECYCLICSTREAM Stream;
CPortPinWaveCyclic * This;
NTSTATUS Status;
PCLOSESTREAM_CONTEXT Ctx = (PCLOSESTREAM_CONTEXT)Context;
This = (CPortPinWaveCyclic*)Ctx->Pin;
if (This->m_State != KSSTATE_STOP)
{
// stop stream in case it hasn't been
Status = This->m_Stream->SetState(KSSTATE_STOP);
if (!NT_SUCCESS(Status))
DPRINT1("Warning: failed to stop stream with %x\n", Status);
This->m_State = KSSTATE_STOP;
}
if (This->m_Format)
{
// free format
ExFreePool(This->m_Format);
This->m_Format = NULL;
}
if (This->m_IrpQueue)
{
This->m_IrpQueue->Release();
}
// complete the irp
Ctx->Irp->IoStatus.Information = 0;
Ctx->Irp->IoStatus.Status = STATUS_SUCCESS;
IoCompleteRequest(Ctx->Irp, IO_NO_INCREMENT);
// free the work item
IoFreeWorkItem(Ctx->WorkItem);
// free work item ctx
FreeItem(Ctx, TAG_PORTCLASS);
// release reference to port driver
This->m_Port->Release();
// release reference to filter instance
This->m_Filter->Release();
if (This->m_Stream)
{
Stream = This->m_Stream;
This->m_Stream = NULL;
This->m_Filter->FreePin(This);
DPRINT1("Closing stream at Irql %u\n", KeGetCurrentIrql());
Stream->Release();
}
}
NTSTATUS
NTAPI
CPortPinWaveCyclic::Close(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
PCLOSESTREAM_CONTEXT Ctx;
DPRINT("CPortPinWaveCyclic::Close entered\n");
DPRINT1("CPortPinWaveCyclic::Close entered\n");
PC_ASSERT_IRQL(PASSIVE_LEVEL);
if (m_Format)
{
// free format
ExFreePool(m_Format);
m_Format = NULL;
}
if (m_IrpQueue)
{
// fixme cancel irps
m_IrpQueue->Release();
}
if (m_Port)
{
// release reference to port driver
m_Port->Release();
m_Port = NULL;
}
if (m_ServiceGroup)
{
// remove member from service group
m_ServiceGroup->RemoveMember(PSERVICESINK(this));
m_ServiceGroup = NULL;
}
if (m_Stream)
{
// allocate a close context
Ctx = (PCLOSESTREAM_CONTEXT)AllocateItem(NonPagedPool, sizeof(CLOSESTREAM_CONTEXT), TAG_PORTCLASS);
if (!Ctx)
if (m_State != KSSTATE_STOP)
{
DPRINT1("Failed to allocate stream context\n");
goto cleanup;
// stop stream
NTSTATUS Status = m_Stream->SetState(KSSTATE_STOP);
if (!NT_SUCCESS(Status))
{
DPRINT("Warning: failed to stop stream with %x\n", Status);
PC_ASSERT(0);
}
}
// allocate work context
Ctx->WorkItem = IoAllocateWorkItem(DeviceObject);
if (!Ctx->WorkItem)
{
DPRINT1("Failed to allocate work item\n");
goto cleanup;
}
// setup the close context
Ctx->Irp = Irp;
Ctx->Pin = this;
// set state to stop
m_State = KSSTATE_STOP;
IoMarkIrpPending(Irp);
Irp->IoStatus.Information = 0;
Irp->IoStatus.Status = STATUS_PENDING;
// remove member from service group
m_ServiceGroup->RemoveMember(PSERVICESINK(this));
DPRINT("Closing stream at Irql %u\n", KeGetCurrentIrql());
// release stream
m_Stream->Release();
// defer work item
IoQueueWorkItem(Ctx->WorkItem, CloseStreamRoutineWaveCyclic, DelayedWorkQueue, (PVOID)Ctx);
// Return result
return STATUS_PENDING;
}
if (m_Filter)
{
// release reference to filter instance
m_Filter->FreePin((PPORTPINWAVECYCLIC)this);
m_Filter->Release();
m_Filter = NULL;
}
Irp->IoStatus.Information = 0;
Irp->IoStatus.Status = STATUS_SUCCESS;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
delete this;
return STATUS_SUCCESS;
cleanup:
if (Ctx)
FreeItem(Ctx, TAG_PORTCLASS);
Irp->IoStatus.Information = 0;
Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return STATUS_UNSUCCESSFUL;
}
NTSTATUS
@ -1022,7 +867,7 @@ CPortPinWaveCyclic::Init(
}
else
{
DPRINT1("Unexpected Communication %u DataFlow %u\n", KsPinDescriptor->Communication, KsPinDescriptor->DataFlow);
DPRINT("Unexpected Communication %u DataFlow %u\n", KsPinDescriptor->Communication, KsPinDescriptor->DataFlow);
KeBugCheck(0);
}
@ -1040,7 +885,7 @@ CPortPinWaveCyclic::Init(
if (NT_SUCCESS(Status))
{
DRMRIGHTS DrmRights;
DPRINT1("Got IID_IDrmAudioStream interface %p\n", DrmAudio);
DPRINT("Got IID_IDrmAudioStream interface %p\n", DrmAudio);
DrmRights.CopyProtect = FALSE;
DrmRights.Reserved = 0;
@ -1087,7 +932,7 @@ CPortPinWaveCyclic::Init(
Status = m_ServiceGroup->AddMember(PSERVICESINK(this));
if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to add pin to service group\n");
DPRINT("Failed to add pin to service group\n");
return Status;
}
@ -1138,9 +983,10 @@ CPortPinWaveCyclic::Init(
m_Port = Port;
m_Filter = Filter;
DPRINT1("Setting state to acquire %x\n", m_Stream->SetState(KSSTATE_ACQUIRE));
DPRINT1("Setting state to pause %x\n", m_Stream->SetState(KSSTATE_PAUSE));
m_State = KSSTATE_PAUSE;
DPRINT("Setting state to acquire %x\n", m_Stream->SetState(KSSTATE_ACQUIRE));
DPRINT("Setting state to pause %x\n", m_Stream->SetState(KSSTATE_PAUSE));
DPRINT("Setting state to run %x\n", m_Stream->SetState(KSSTATE_RUN));
m_State = KSSTATE_RUN;
return STATUS_SUCCESS;

View file

@ -181,7 +181,7 @@ PinWavePciAudioPosition(
// copy audio position
RtlMoveMemory(Data, &Pin->m_Position, sizeof(KSAUDIO_POSITION));
DPRINT1("Play %lu Record %lu\n", Pin->m_Position.PlayOffset, Pin->m_Position.WriteOffset);
DPRINT("Play %lu Record %lu\n", Pin->m_Position.PlayOffset, Pin->m_Position.WriteOffset);
Irp->IoStatus.Information = sizeof(KSAUDIO_POSITION);
return STATUS_SUCCESS;
}
@ -325,7 +325,7 @@ PinWavePciDataFormat(
PC_ASSERT(IsEqualGUIDAligned(((PKSDATAFORMAT_WAVEFORMATEX)NewDataFormat)->DataFormat.Specifier, KSDATAFORMAT_SPECIFIER_WAVEFORMATEX));
DPRINT1("NewDataFormat: Channels %u Bits %u Samples %u\n", ((PKSDATAFORMAT_WAVEFORMATEX)NewDataFormat)->WaveFormatEx.nChannels,
DPRINT("NewDataFormat: Channels %u Bits %u Samples %u\n", ((PKSDATAFORMAT_WAVEFORMATEX)NewDataFormat)->WaveFormatEx.nChannels,
((PKSDATAFORMAT_WAVEFORMATEX)NewDataFormat)->WaveFormatEx.wBitsPerSample,
((PKSDATAFORMAT_WAVEFORMATEX)NewDataFormat)->WaveFormatEx.nSamplesPerSec);
#endif
@ -470,7 +470,7 @@ CPortPinWavePci::SetState(KSSTATE State)
// store minimum data threshold
m_IrpQueue->SetMinimumDataThreshold(MinimumDataThreshold);
DPRINT1("Stopping TotalCompleted %u StopCount %u MinimumDataThreshold %u\n", m_TotalPackets, m_StopCount, MinimumDataThreshold);
DPRINT("Stopping TotalCompleted %u StopCount %u MinimumDataThreshold %u\n", m_TotalPackets, m_StopCount, MinimumDataThreshold);
}
if (m_State == KSSTATE_RUN)
{
@ -608,7 +608,7 @@ CPortPinWavePci::HandleKsProperty(
if (IoStack->Parameters.DeviceIoControl.IoControlCode != IOCTL_KS_PROPERTY)
{
DPRINT1("Unhandled function %lx Length %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode, IoStack->Parameters.DeviceIoControl.InputBufferLength);
DPRINT("Unhandled function %lx Length %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode, IoStack->Parameters.DeviceIoControl.InputBufferLength);
Irp->IoStatus.Status = STATUS_SUCCESS;
@ -623,7 +623,7 @@ CPortPinWavePci::HandleKsProperty(
Property = (PKSPROPERTY)IoStack->Parameters.DeviceIoControl.Type3InputBuffer;
RtlStringFromGUID(Property->Set, &GuidString);
DPRINT1("Unhandeled property Set |%S| Id %u Flags %x\n", GuidString.Buffer, Property->Id, Property->Flags);
DPRINT("Unhandeled property Set |%S| Id %u Flags %x\n", GuidString.Buffer, Property->Id, Property->Flags);
RtlFreeUnicodeString(&GuidString);
}
@ -787,7 +787,7 @@ CPortPinWavePci::CloseStream()
{
Stream = m_Stream;
m_Stream = 0;
DPRINT1("Closing stream at Irql %u\n", KeGetCurrentIrql());
DPRINT("Closing stream at Irql %u\n", KeGetCurrentIrql());
Stream->Release();
}
}
@ -830,14 +830,14 @@ CPortPinWavePci::Close(
Ctx = (PCLOSESTREAM_CONTEXT)AllocateItem(NonPagedPool, sizeof(CLOSESTREAM_CONTEXT), TAG_PORTCLASS);
if (!Ctx)
{
DPRINT1("Failed to allocate stream context\n");
DPRINT("Failed to allocate stream context\n");
goto cleanup;
}
Ctx->WorkItem = IoAllocateWorkItem(DeviceObject);
if (!Ctx->WorkItem)
{
DPRINT1("Failed to allocate work item\n");
DPRINT("Failed to allocate work item\n");
goto cleanup;
}
@ -980,7 +980,7 @@ CPortPinWavePci::Init(
}
else
{
DPRINT1("Unexpected Communication %u DataFlow %u\n", KsPinDescriptor->Communication, KsPinDescriptor->DataFlow);
DPRINT("Unexpected Communication %u DataFlow %u\n", KsPinDescriptor->Communication, KsPinDescriptor->DataFlow);
KeBugCheck(0);
}
@ -1004,7 +1004,7 @@ CPortPinWavePci::Init(
Status = m_ServiceGroup->AddMember(PSERVICESINK(this));
if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to add pin to service group\n");
DPRINT("Failed to add pin to service group\n");
return Status;
}
m_ServiceGroup->SupportDelayedService();
@ -1016,7 +1016,7 @@ CPortPinWavePci::Init(
Status = m_Stream->GetAllocatorFraming(&m_AllocatorFraming);
if (!NT_SUCCESS(Status))
{
DPRINT1("GetAllocatorFraming failed with %x\n", Status);
DPRINT("GetAllocatorFraming failed with %x\n", Status);
return Status;
}
@ -1058,7 +1058,7 @@ CPortPinWavePci::Init(
Status = m_IrpQueue->Init(ConnectDetails, m_Format, DeviceObject, m_AllocatorFraming.FrameSize, m_AllocatorFraming.FileAlignment, NULL);
if (!NT_SUCCESS(Status))
{
DPRINT1("IrpQueue_Init failed with %x\n", Status);
DPRINT("IrpQueue_Init failed with %x\n", Status);
return Status;
}

View file

@ -130,7 +130,7 @@ SetStreamWorkerRoutine(
{
// reset start stream
This->m_IrpQueue->CancelBuffers(); //FIX function name
DPRINT1("Stopping PreCompleted %u PostCompleted %u\n", This->m_PreCompleted, This->m_PostCompleted);
DPRINT("Stopping PreCompleted %u PostCompleted %u\n", This->m_PreCompleted, This->m_PostCompleted);
}
if (This->m_State == KSSTATE_RUN)
@ -249,7 +249,7 @@ CPortPinWaveRT::HandleKsProperty(
{
Status = m_Stream->SetState(*State);
DPRINT1("Setting state %u %x\n", *State, Status);
DPRINT("Setting state %u %x\n", *State, Status);
if (NT_SUCCESS(Status))
{
m_State = *State;
@ -303,7 +303,7 @@ CPortPinWaveRT::HandleKsProperty(
ASSERT(m_State == KSSTATE_STOP);
#endif
DPRINT1("NewDataFormat: Channels %u Bits %u Samples %u\n", ((PKSDATAFORMAT_WAVEFORMATEX)NewDataFormat)->WaveFormatEx.nChannels,
DPRINT("NewDataFormat: Channels %u Bits %u Samples %u\n", ((PKSDATAFORMAT_WAVEFORMATEX)NewDataFormat)->WaveFormatEx.nChannels,
((PKSDATAFORMAT_WAVEFORMATEX)NewDataFormat)->WaveFormatEx.wBitsPerSample,
((PKSDATAFORMAT_WAVEFORMATEX)NewDataFormat)->WaveFormatEx.nSamplesPerSec);
@ -321,7 +321,7 @@ CPortPinWaveRT::HandleKsProperty(
return STATUS_SUCCESS;
}
}
DPRINT1("Failed to set format\n");
DPRINT("Failed to set format\n");
Irp->IoStatus.Information = 0;
Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
@ -331,7 +331,7 @@ CPortPinWaveRT::HandleKsProperty(
{
if (!m_Format)
{
DPRINT1("No format\n");
DPRINT("No format\n");
Irp->IoStatus.Information = 0;
Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
@ -355,7 +355,7 @@ CPortPinWaveRT::HandleKsProperty(
}
RtlStringFromGUID(Property->Set, &GuidString);
DPRINT1("Unhandeled property Set |%S| Id %u Flags %x\n", GuidString.Buffer, Property->Id, Property->Flags);
DPRINT("Unhandeled property Set |%S| Id %u Flags %x\n", GuidString.Buffer, Property->Id, Property->Flags);
RtlFreeUnicodeString(&GuidString);
Irp->IoStatus.Status = STATUS_NOT_IMPLEMENTED;
@ -414,7 +414,6 @@ CPortPinWaveRT::DeviceIoControl(
}
UNIMPLEMENTED
DbgBreakPoint();
Irp->IoStatus.Information = 0;
Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
@ -511,7 +510,7 @@ CloseStreamRoutine(
{
Stream = This->m_Stream;
This->m_Stream = NULL;
DPRINT1("Closing stream at Irql %u\n", KeGetCurrentIrql());
DPRINT("Closing stream at Irql %u\n", KeGetCurrentIrql());
Stream->Release();
}
}
@ -529,14 +528,14 @@ CPortPinWaveRT::Close(
Ctx = (PCLOSESTREAM_CONTEXT)AllocateItem(NonPagedPool, sizeof(CLOSESTREAM_CONTEXT), TAG_PORTCLASS);
if (!Ctx)
{
DPRINT1("Failed to allocate stream context\n");
DPRINT("Failed to allocate stream context\n");
goto cleanup;
}
Ctx->WorkItem = IoAllocateWorkItem(DeviceObject);
if (!Ctx->WorkItem)
{
DPRINT1("Failed to allocate work item\n");
DPRINT("Failed to allocate work item\n");
goto cleanup;
}
@ -696,7 +695,7 @@ CPortPinWaveRT::Init(
}
else
{
DPRINT1("Unexpected Communication %u DataFlow %u\n", KsPinDescriptor->Communication, KsPinDescriptor->DataFlow);
DPRINT("Unexpected Communication %u DataFlow %u\n", KsPinDescriptor->Communication, KsPinDescriptor->DataFlow);
KeBugCheck(0);
}
@ -713,21 +712,21 @@ CPortPinWaveRT::Init(
Status = m_Stream->AllocateAudioBuffer(16384 * 11, &m_Mdl, &m_CommonBufferSize, &m_CommonBufferOffset, &m_CacheType);
if (!NT_SUCCESS(Status))
{
DPRINT1("AllocateAudioBuffer failed with %x\n", Status);
DPRINT("AllocateAudioBuffer failed with %x\n", Status);
goto cleanup;
}
m_CommonBuffer = MmGetSystemAddressForMdlSafe(m_Mdl, NormalPagePriority);
if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to get system address %x\n", Status);
DPRINT("Failed to get system address %x\n", Status);
IoFreeMdl(m_Mdl);
m_Mdl = NULL;
goto cleanup;
}
DPRINT1("Setting state to acquire %x\n", m_Stream->SetState(KSSTATE_ACQUIRE));
DPRINT1("Setting state to pause %x\n", m_Stream->SetState(KSSTATE_PAUSE));
DPRINT("Setting state to acquire %x\n", m_Stream->SetState(KSSTATE_ACQUIRE));
DPRINT("Setting state to pause %x\n", m_Stream->SetState(KSSTATE_PAUSE));
m_State = KSSTATE_PAUSE;
return STATUS_SUCCESS;

View file

@ -47,7 +47,7 @@ PcNewPort(
if (RtlStringFromGUID(ClassId, &GuidString) == STATUS_SUCCESS)
{
DPRINT1("unknown interface %S\n", GuidString.Buffer);
DPRINT("unknown interface %S\n", GuidString.Buffer);
RtlFreeUnicodeString(&GuidString);
}

View file

@ -139,7 +139,7 @@ CPortDMus::QueryInterface(
if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS)
{
DPRINT1("IPortMidi_fnQueryInterface no interface!!! iface %S\n", GuidString.Buffer);
DPRINT("IPortMidi_fnQueryInterface no interface!!! iface %S\n", GuidString.Buffer);
RtlFreeUnicodeString(&GuidString);
}
return STATUS_UNSUCCESSFUL;
@ -225,7 +225,7 @@ CPortDMus::Init(
Status = Miniport->GetDescription(&m_pDescriptor);
if (!NT_SUCCESS(Status))
{
DPRINT1("failed to get description\n");
DPRINT("failed to get description\n");
Miniport->Release();
m_bInitialized = FALSE;
return Status;
@ -250,7 +250,7 @@ CPortDMus::Init(
Status = MidiMiniport->GetDescription(&m_pDescriptor);
if (!NT_SUCCESS(Status))
{
DPRINT1("failed to get description\n");
DPRINT("failed to get description\n");
MidiMiniport->Release();
m_bInitialized = FALSE;
return Status;
@ -278,7 +278,7 @@ CPortDMus::Init(
if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to create descriptior\n");
DPRINT("Failed to create descriptior\n");
if (Miniport)
Miniport->Release();

View file

@ -171,7 +171,7 @@ CPortTopology::QueryInterface(
if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS)
{
DPRINT1("IPortTopology_fnQueryInterface no interface!!! iface %S\n", GuidString.Buffer);
DPRINT("IPortTopology_fnQueryInterface no interface!!! iface %S\n", GuidString.Buffer);
RtlFreeUnicodeString(&GuidString);
}
return STATUS_UNSUCCESSFUL;
@ -219,14 +219,14 @@ CPortTopology::Init(
if (m_bInitialized)
{
DPRINT1("IPortTopology_Init called again\n");
DPRINT("IPortTopology_Init called again\n");
return STATUS_SUCCESS;
}
Status = UnknownMiniport->QueryInterface(IID_IMiniportTopology, (PVOID*)&Miniport);
if (!NT_SUCCESS(Status))
{
DPRINT1("IPortTopology_Init called with invalid IMiniport adapter\n");
DPRINT("IPortTopology_Init called with invalid IMiniport adapter\n");
return STATUS_INVALID_PARAMETER;
}
@ -239,7 +239,7 @@ CPortTopology::Init(
Status = Miniport->Init(UnknownAdapter, ResourceList, this);
if (!NT_SUCCESS(Status))
{
DPRINT1("IPortTopology_Init failed with %x\n", Status);
DPRINT("IPortTopology_Init failed with %x\n", Status);
m_bInitialized = FALSE;
Miniport->Release();
return Status;
@ -249,7 +249,7 @@ CPortTopology::Init(
Status = Miniport->GetDescription(&m_pDescriptor);
if (!NT_SUCCESS(Status))
{
DPRINT1("failed to get description\n");
DPRINT("failed to get description\n");
Miniport->Release();
m_bInitialized = FALSE;
return Status;
@ -371,7 +371,7 @@ NTSTATUS
NTAPI
CPortTopology::ReleaseChildren()
{
DPRINT1("ISubDevice_fnReleaseChildren\n");
DPRINT("ISubDevice_fnReleaseChildren\n");
// release the filter
m_Filter->Release();
@ -468,7 +468,7 @@ CreatePinWorkerRoutine(
WorkerContext->Irp,
NULL);
DPRINT1("CreatePinWorkerRoutine Status %x\n", Status);
DPRINT("CreatePinWorkerRoutine Status %x\n", Status);
if (NT_SUCCESS(Status))
{
@ -505,7 +505,7 @@ PcCreatePinDispatch(
// sanity check
PC_ASSERT(CreateItem);
DPRINT1("PcCreatePinDispatch called DeviceObject %p %S Name\n", DeviceObject, CreateItem->ObjectClass.Buffer);
DPRINT("PcCreatePinDispatch called DeviceObject %p %S Name\n", DeviceObject, CreateItem->ObjectClass.Buffer);
Filter = (IIrpTarget*)CreateItem->Context;
@ -517,7 +517,7 @@ PcCreatePinDispatch(
Status = KsReferenceSoftwareBusObject(DeviceExt->KsDeviceHeader);
if (!NT_SUCCESS(Status) && Status != STATUS_NOT_IMPLEMENTED)
{
DPRINT1("PcCreatePinDispatch failed to reference device header\n");
DPRINT("PcCreatePinDispatch failed to reference device header\n");
FreeItem(Entry, TAG_PORTCLASS);
goto cleanup;
@ -577,7 +577,7 @@ PcCreateItemDispatch(
// access the create item
CreateItem = KSCREATE_ITEM_IRP_STORAGE(Irp);
DPRINT1("PcCreateItemDispatch called DeviceObject %p %S Name\n", DeviceObject, CreateItem->ObjectClass.Buffer);
DPRINT("PcCreateItemDispatch called DeviceObject %p %S Name\n", DeviceObject, CreateItem->ObjectClass.Buffer);
// get the subdevice
SubDevice = (ISubdevice*)CreateItem->Context;
@ -589,7 +589,7 @@ PcCreateItemDispatch(
Status = KsReferenceSoftwareBusObject(DeviceExt->KsDeviceHeader);
if (!NT_SUCCESS(Status) && Status != STATUS_NOT_IMPLEMENTED)
{
DPRINT1("PcCreateItemDispatch failed to reference device header\n");
DPRINT("PcCreateItemDispatch failed to reference device header\n");
FreeItem(Entry, TAG_PORTCLASS);
goto cleanup;
@ -606,7 +606,7 @@ PcCreateItemDispatch(
NULL);
if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to get filter object\n");
DPRINT("Failed to get filter object\n");
Irp->IoStatus.Status = Status;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return Status;

View file

@ -181,7 +181,7 @@ CPortWaveCyclic::QueryInterface(
if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS)
{
DPRINT1("IPortWaveCyclic_fnQueryInterface no interface!!! iface %S\n", GuidString.Buffer);
DPRINT("IPortWaveCyclic_fnQueryInterface no interface!!! iface %S\n", GuidString.Buffer);
RtlFreeUnicodeString(&GuidString);
}
@ -268,7 +268,7 @@ CPortWaveCyclic::Init(
Status = Miniport->GetDescription(&m_pDescriptor);
if (!NT_SUCCESS(Status))
{
DPRINT1("failed to get description\n");
DPRINT("failed to get description\n");
Miniport->Release();
m_bInitialized = FALSE;
return Status;
@ -292,7 +292,7 @@ CPortWaveCyclic::Init(
if (!NT_SUCCESS(Status))
{
DPRINT1("PcCreateSubdeviceDescriptor failed with %x\n", Status);
DPRINT("PcCreateSubdeviceDescriptor failed with %x\n", Status);
Miniport->Release();
m_bInitialized = FALSE;
return Status;

View file

@ -201,7 +201,7 @@ CPortWavePci::QueryInterface(
if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS)
{
DPRINT1("IPortWavePci_fnQueryInterface no interface!!! iface %S\n", GuidString.Buffer);
DPRINT("IPortWavePci_fnQueryInterface no interface!!! iface %S\n", GuidString.Buffer);
RtlFreeUnicodeString(&GuidString);
}
@ -269,7 +269,7 @@ CPortWavePci::Init(
Status = Miniport->GetDescription(&m_pDescriptor);
if (!NT_SUCCESS(Status))
{
DPRINT1("failed to get description\n");
DPRINT("failed to get description\n");
Miniport->Release();
m_bInitialized = FALSE;
return Status;
@ -294,7 +294,7 @@ CPortWavePci::Init(
if (!NT_SUCCESS(Status))
{
DPRINT1("PcCreateSubdeviceDescriptor failed with %x\n", Status);
DPRINT("PcCreateSubdeviceDescriptor failed with %x\n", Status);
Miniport->Release();
m_bInitialized = FALSE;
return Status;
@ -489,7 +489,7 @@ NTAPI
CPortWavePci::GetDescriptor(
IN SUBDEVICE_DESCRIPTOR ** Descriptor)
{
DPRINT1("ISubDevice_GetDescriptor this %p\n", this);
DPRINT("ISubDevice_GetDescriptor this %p\n", this);
*Descriptor = m_SubDeviceDescriptor;
return STATUS_SUCCESS;
}

View file

@ -174,7 +174,7 @@ CPortWaveRT::QueryInterface(
if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS)
{
DPRINT1("IPortWaveRT_fnQueryInterface no interface!!! iface %S\n", GuidString.Buffer);
DPRINT("IPortWaveRT_fnQueryInterface no interface!!! iface %S\n", GuidString.Buffer);
RtlFreeUnicodeString(&GuidString);
}
@ -256,7 +256,7 @@ CPortWaveRT::Init(
Status = Miniport->GetDescription(&m_pDescriptor);
if (!NT_SUCCESS(Status))
{
DPRINT1("failed to get description\n");
DPRINT("failed to get description\n");
Miniport->Release();
m_bInitialized = FALSE;
return Status;
@ -280,7 +280,7 @@ CPortWaveRT::Init(
if (!NT_SUCCESS(Status))
{
DPRINT1("PcCreateSubdeviceDescriptor failed with %x\n", Status);
DPRINT("PcCreateSubdeviceDescriptor failed with %x\n", Status);
Miniport->Release();
m_bInitialized = FALSE;
return Status;

View file

@ -81,7 +81,7 @@ CPortWaveRTStreamInit::AllocateContiguousPagesForMdl(
Buffer = MmAllocateContiguousMemorySpecifyCache(TotalBytes, LowAddress, HighAddress, RtlConvertUlongToLargeInteger(0), MmNonCached);
if (!Buffer)
{
DPRINT1("MmAllocateContiguousMemorySpecifyCache failed\n");
DPRINT("MmAllocateContiguousMemorySpecifyCache failed\n");
return NULL;
}
@ -92,13 +92,13 @@ CPortWaveRTStreamInit::AllocateContiguousPagesForMdl(
Mdl = MmAllocatePagesForMdl(Address, HighAddress, RtlConvertUlongToLargeInteger(0), TotalBytes);
if (!Mdl)
{
DPRINT1("MmAllocatePagesForMdl failed\n");
DPRINT("MmAllocatePagesForMdl failed\n");
return NULL;
}
if (MmGetMdlByteCount(Mdl) < TotalBytes)
{
DPRINT1("ByteCount %u Required %u\n", MmGetMdlByteCount(Mdl), TotalBytes);
DPRINT("ByteCount %u Required %u\n", MmGetMdlByteCount(Mdl), TotalBytes);
MmFreePagesFromMdl(Mdl);
ExFreePool(Mdl);
return NULL;
@ -157,7 +157,7 @@ CPortWaveRTStreamInit::GetPhysicalPageAddress(
Pages = ADDRESS_AND_SIZE_TO_SPAN_PAGES(0, MmGetMdlByteCount(MemoryDescriptorList));
if (Pages <= Index)
{
DPRINT1("OutOfBounds: Pages %u Index %u\n", Pages, Index);
DPRINT("OutOfBounds: Pages %u Index %u\n", Pages, Index);
return RtlConvertUlongToLargeInteger(0);
}

View file

@ -32,7 +32,7 @@ PcRegisterAdapterPowerManagement(
Status = pUnknown->QueryInterface(IID_IAdapterPowerManagement, (PVOID*)&pPower);
if (!NT_SUCCESS(Status))
{
DPRINT1("PcRegisterAdapterPowerManagement no IAdapterPowerManagement interface %x\n", Status);
DPRINT("PcRegisterAdapterPowerManagement no IAdapterPowerManagement interface %x\n", Status);
DeviceExt->AdapterPowerManagement = NULL;
return STATUS_SUCCESS;
}

View file

@ -124,13 +124,13 @@ HandlePhysicalConnection(
if (RequestLength < sizeof(KSP_PIN))
{
// input buffer must be at least sizeof KSP_PIN
DPRINT1("input length too small\n");
DPRINT("input length too small\n");
return STATUS_INVALID_PARAMETER;
}
if (IsListEmpty(&Descriptor->PhysicalConnectionList))
{
DPRINT1("no connection\n");
DPRINT("no connection\n");
return STATUS_NOT_FOUND;
}
@ -201,7 +201,7 @@ PinPropertyHandler(
Status = IrpTarget->QueryInterface(IID_IPort, (PVOID*)&Port);
if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to obtain IPort interface from filter\n");
DPRINT("Failed to obtain IPort interface from filter\n");
Irp->IoStatus.Information = 0;
Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
return STATUS_UNSUCCESSFUL;
@ -211,7 +211,7 @@ PinPropertyHandler(
Status = Port->QueryInterface(IID_ISubdevice, (PVOID*)&SubDevice);
if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to obtain ISubdevice interface from port driver\n");
DPRINT("Failed to obtain ISubdevice interface from port driver\n");
KeBugCheck(0);
}

View file

@ -64,7 +64,6 @@ CRegistryKey::QueryInterface(
}
DPRINT("IRegistryKey_QueryInterface: This %p\n", this);
DbgBreakPoint();
return STATUS_UNSUCCESSFUL;
}
@ -154,7 +153,7 @@ CRegistryKey::NewSubKey(
Status = ZwCreateKey(&hKey, KEY_READ | KEY_WRITE, &Attributes, 0, NULL, 0, Disposition);
if (!NT_SUCCESS(Status))
{
DPRINT1("CRegistryKey::NewSubKey failed with %x\n", Status);
DPRINT("CRegistryKey::NewSubKey failed with %x\n", Status);
return Status;
}

View file

@ -69,7 +69,7 @@ CResourceList::QueryInterface(
if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS)
{
DPRINT1("IResourceList_QueryInterface no interface!!! iface %S\n", GuidString.Buffer);
DPRINT("IResourceList_QueryInterface no interface!!! iface %S\n", GuidString.Buffer);
RtlFreeUnicodeString(&GuidString);
}
@ -107,7 +107,7 @@ CResourceList::NumberOfEntriesOfType(
{
PartialDescriptor = &m_TranslatedResourceList->List[0].PartialResourceList.PartialDescriptors[Index];
UnPartialDescriptor = &m_UntranslatedResourceList->List[0].PartialResourceList.PartialDescriptors[Index];
DPRINT1("Descriptor Type %u\n", PartialDescriptor->Type);
DPRINT("Descriptor Type %u\n", PartialDescriptor->Type);
if (PartialDescriptor->Type == Type)
{
// Yay! Finally found one that matches!
@ -116,15 +116,15 @@ CResourceList::NumberOfEntriesOfType(
if (PartialDescriptor->Type == CmResourceTypeInterrupt)
{
DPRINT1("Index %u TRANS Interrupt Number Affinity %x Level %u Vector %u\n", Index, PartialDescriptor->u.Interrupt.Affinity, PartialDescriptor->u.Interrupt.Level, PartialDescriptor->u.Interrupt.Vector, PartialDescriptor->u.Port.Start.LowPart, PartialDescriptor->Flags);
DPRINT1("Index %u UNTRANS Interrupt Number Affinity %x Level %u Vector %u\n", Index, UnPartialDescriptor->u.Interrupt.Affinity, UnPartialDescriptor->u.Interrupt.Level, UnPartialDescriptor->u.Interrupt.Vector, PartialDescriptor->u.Port.Start.LowPart, PartialDescriptor->Flags);
DPRINT("Index %u TRANS Interrupt Number Affinity %x Level %u Vector %u Flags %x Share %x\n", Index, PartialDescriptor->u.Interrupt.Affinity, PartialDescriptor->u.Interrupt.Level, PartialDescriptor->u.Interrupt.Vector, PartialDescriptor->Flags, PartialDescriptor->ShareDisposition);
DPRINT("Index %u UNTRANS Interrupt Number Affinity %x Level %u Vector %u Flags %x Share %x\\n", Index, UnPartialDescriptor->u.Interrupt.Affinity, UnPartialDescriptor->u.Interrupt.Level, UnPartialDescriptor->u.Interrupt.Vector, UnPartialDescriptor->Flags, UnPartialDescriptor->ShareDisposition);
}
else if (PartialDescriptor->Type == CmResourceTypePort)
{
DPRINT1("Index %u TRANS Port Length %u Start %u %u Flags %x\n", Index, PartialDescriptor->u.Port.Length, PartialDescriptor->u.Port.Start.HighPart, PartialDescriptor->u.Port.Start.LowPart, PartialDescriptor->Flags);
DPRINT1("Index %u UNTRANS Port Length %u Start %u %u Flags %x\n", Index, UnPartialDescriptor->u.Port.Length, UnPartialDescriptor->u.Port.Start.HighPart, UnPartialDescriptor->u.Port.Start.LowPart, UnPartialDescriptor->Flags);
}
else if (PartialDescriptor->Type == CmResourceTypePort)
{
DPRINT("Index %u TRANS Port Length %u Start %u %u Flags %x Share %x\n", Index, PartialDescriptor->u.Port.Length, PartialDescriptor->u.Port.Start.HighPart, PartialDescriptor->u.Port.Start.LowPart, PartialDescriptor->Flags, PartialDescriptor->ShareDisposition);
DPRINT("Index %u UNTRANS Port Length %u Start %u %u Flags %x Share %x\n", Index, UnPartialDescriptor->u.Port.Length, UnPartialDescriptor->u.Port.Start.HighPart, UnPartialDescriptor->u.Port.Start.LowPart, UnPartialDescriptor->Flags, UnPartialDescriptor->ShareDisposition);
}
}
DPRINT("Found %d type %d\n", Count, Type);

View file

@ -93,7 +93,7 @@ CServiceGroup::QueryInterface(
if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS)
{
DPRINT1("CServiceGroup::QueryInterface no interface!!! iface %S\n", GuidString.Buffer);
DPRINT("CServiceGroup::QueryInterface no interface!!! iface %S\n", GuidString.Buffer);
RtlFreeUnicodeString(&GuidString);
}

View file

@ -229,14 +229,14 @@ PcHandlePropertyWithTable(
if (Status != STATUS_PENDING)
{
//DPRINT1("Status %x ValueSize %u
//DPRINT("Status %x ValueSize %u
Irp->IoStatus.Information = PropertyRequest->ValueSize;
ExFreePool(PropertyRequest);
}
#if 0
RtlStringFromGUID(Property->Property.Set, &GuidString);
DPRINT1("Id %u Flags %x Set %S FlagsItem %x Status %x\n", Property->Property.Id, Property->Property.Flags, GuidString.Buffer, PropertyItem->Flags, Status);
DPRINT("Id %u Flags %x Set %S FlagsItem %x Status %x\n", Property->Property.Id, Property->Property.Flags, GuidString.Buffer, PropertyItem->Flags, Status);
RtlFreeUnicodeString(&GuidString);
#endif
return Status;
@ -245,7 +245,7 @@ PcHandlePropertyWithTable(
}
#if 0
RtlStringFromGUID(Property->Property.Set, &GuidString);
DPRINT1("Id %u Flags %x Set %S Status %x\n", Property->Property.Id, Property->Property.Flags, GuidString.Buffer, Status);
DPRINT("Id %u Flags %x Set %S Status %x\n", Property->Property.Id, Property->Property.Flags, GuidString.Buffer, Status);
RtlFreeUnicodeString(&GuidString);
#endif
}
@ -310,12 +310,12 @@ DumpFilterDescriptor(
PPCPROPERTY_ITEM PropertyItem;
UNICODE_STRING GuidString;
DPRINT1("======================\n");
DPRINT1("Descriptor Automation Table%p\n",FilterDescription->AutomationTable);
DPRINT("======================\n");
DPRINT("Descriptor Automation Table%p\n",FilterDescription->AutomationTable);
if (FilterDescription->AutomationTable)
{
DPRINT1("FilterPropertiesCount %u FilterPropertySize %u Expected %u\n", FilterDescription->AutomationTable->PropertyCount, FilterDescription->AutomationTable->PropertyItemSize, sizeof(PCPROPERTY_ITEM));
DPRINT("FilterPropertiesCount %u FilterPropertySize %u Expected %u\n", FilterDescription->AutomationTable->PropertyCount, FilterDescription->AutomationTable->PropertyItemSize, sizeof(PCPROPERTY_ITEM));
if (FilterDescription->AutomationTable->PropertyCount)
{
PropertyItem = (PPCPROPERTY_ITEM)FilterDescription->AutomationTable->Properties;
@ -323,7 +323,7 @@ DumpFilterDescriptor(
for(Index = 0; Index < FilterDescription->AutomationTable->PropertyCount; Index++)
{
RtlStringFromGUID(*PropertyItem->Set, &GuidString);
DPRINT1("Index %u GUID %S Id %u Flags %x\n", Index, GuidString.Buffer, PropertyItem->Id, PropertyItem->Flags);
DPRINT("Index %u GUID %S Id %u Flags %x\n", Index, GuidString.Buffer, PropertyItem->Id, PropertyItem->Flags);
PropertyItem = (PPCPROPERTY_ITEM)((ULONG_PTR)PropertyItem + FilterDescription->AutomationTable->PropertyItemSize);
}
@ -331,8 +331,7 @@ DumpFilterDescriptor(
}
DPRINT1("======================\n");
DbgBreakPoint();
DPRINT("======================\n");
}
NTSTATUS
@ -451,13 +450,16 @@ PcCreateSubdeviceDescriptor(
{
RtlMoveMemory(&Descriptor->Factory.KsPinDescriptor[Index], &SrcDescriptor->KsPinDescriptor, sizeof(KSPIN_DESCRIPTOR));
DPRINT("Index %u DataRangeCount %u\n", Index, SrcDescriptor->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;
Descriptor->Factory.Instances[Index].MaxFilterInstanceCount = SrcDescriptor->MaxFilterInstanceCount;
Descriptor->Factory.Instances[Index].MaxGlobalInstanceCount = SrcDescriptor->MaxGlobalInstanceCount;
Descriptor->Factory.Instances[Index].MinFilterInstanceCount = SrcDescriptor->MinFilterInstanceCount;
SrcDescriptor = (PPCPIN_DESCRIPTOR)((ULONG_PTR)SrcDescriptor + FilterDescription->PinSize);
}
}
Descriptor->DeviceDescriptor = FilterDescription;
*OutSubdeviceDescriptor = Descriptor;
return STATUS_SUCCESS;

View file

@ -81,7 +81,7 @@ CUnregisterSubdevice::UnregisterSubdevice(
Status = Unknown->QueryInterface(IID_ISubdevice, (LPVOID*)&SubDevice);
if (!NT_SUCCESS(Status))
{
DPRINT1("No ISubdevice interface\n");
DPRINT("No ISubdevice interface\n");
// the provided port driver doesnt support ISubdevice
return STATUS_INVALID_PARAMETER;
}
@ -89,7 +89,7 @@ CUnregisterSubdevice::UnregisterSubdevice(
Status = SubDevice->GetDescriptor(&SubDeviceDescriptor);
if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to retrieve subdevice descriptor %x\n", Status);
DPRINT("Failed to retrieve subdevice descriptor %x\n", Status);
// the provided port driver doesnt support ISubdevice
return STATUS_INVALID_PARAMETER;
}