mirror of
https://github.com/reactos/reactos.git
synced 2024-07-10 14:45:06 +00:00
- Silence tons of debug messages
- Add file headers for portcls - Remove StringFromCLSID hack and replace it with RtlStringFromGUID - Implement PcCompletePendingPropertyRequest, KsoGetIrpTargetFromIrp, KsoGetIrpTargetFromFileObject - Re-use WorkItem / WorkItem context in sysaudio svn path=/trunk/; revision=40351
This commit is contained in:
parent
3147006bd2
commit
345900effc
|
@ -321,7 +321,7 @@ KsAllocateObjectHeader(
|
|||
{
|
||||
RtlMoveMemory(ObjectClass, IoStack->FileObject->FileName.Buffer, 38 * sizeof(WCHAR));
|
||||
ObjectClass[38] = L'\0';
|
||||
DPRINT1("ObjectClass %S\n", ObjectClass);
|
||||
DPRINT("ObjectClass %S\n", ObjectClass);
|
||||
}
|
||||
}
|
||||
/* allocate the object header */
|
||||
|
@ -369,7 +369,7 @@ KsAllocateObjectHeader(
|
|||
*Header = ObjectHeader;
|
||||
|
||||
|
||||
DPRINT1("KsAllocateObjectHeader ObjectClass %S FileObject %p, ObjectHeader %p\n", ObjectClass, IoStack->FileObject, ObjectHeader);
|
||||
DPRINT("KsAllocateObjectHeader ObjectClass %S FileObject %p, ObjectHeader %p\n", ObjectClass, IoStack->FileObject, ObjectHeader);
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
|
||||
|
@ -727,7 +727,7 @@ KsCreate(
|
|||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
KIRQL OldLevel;
|
||||
|
||||
DPRINT1("KS / CREATE\n");
|
||||
DPRINT("KS / CREATE\n");
|
||||
/* get current stack location */
|
||||
//IoStack = IoGetCurrentIrpStackLocation(Irp);
|
||||
/* get device extension */
|
||||
|
@ -766,7 +766,7 @@ KsClose(
|
|||
/* get current stack location */
|
||||
IoStack = IoGetCurrentIrpStackLocation(Irp);
|
||||
|
||||
DPRINT1("KS / CLOSE\n");
|
||||
DPRINT("KS / CLOSE\n");
|
||||
|
||||
if (IoStack->FileObject && IoStack->FileObject->FsContext)
|
||||
{
|
||||
|
@ -794,7 +794,7 @@ KsDeviceControl(
|
|||
/* get current stack location */
|
||||
IoStack = IoGetCurrentIrpStackLocation(Irp);
|
||||
|
||||
DPRINT1("KS / DeviceControl\n");
|
||||
DPRINT("KS / DeviceControl\n");
|
||||
if (IoStack->FileObject && IoStack->FileObject->FsContext)
|
||||
{
|
||||
ObjectHeader = (PKSIOBJECT_HEADER) IoStack->FileObject->FsContext;
|
||||
|
@ -822,7 +822,7 @@ KsRead(
|
|||
/* get current stack location */
|
||||
IoStack = IoGetCurrentIrpStackLocation(Irp);
|
||||
|
||||
DPRINT1("KS / Read\n");
|
||||
DPRINT("KS / Read\n");
|
||||
if (IoStack->FileObject && IoStack->FileObject->FsContext)
|
||||
{
|
||||
ObjectHeader = (PKSIOBJECT_HEADER) IoStack->FileObject->FsContext;
|
||||
|
@ -850,7 +850,7 @@ KsWrite(
|
|||
/* get current stack location */
|
||||
IoStack = IoGetCurrentIrpStackLocation(Irp);
|
||||
|
||||
DPRINT1("KS / Write\n");
|
||||
DPRINT("KS / Write\n");
|
||||
if (IoStack->FileObject && IoStack->FileObject->FsContext)
|
||||
{
|
||||
ObjectHeader = (PKSIOBJECT_HEADER) IoStack->FileObject->FsContext;
|
||||
|
@ -878,7 +878,7 @@ KsFlushBuffers(
|
|||
/* get current stack location */
|
||||
IoStack = IoGetCurrentIrpStackLocation(Irp);
|
||||
|
||||
DPRINT1("KS / FlushBuffers\n");
|
||||
DPRINT("KS / FlushBuffers\n");
|
||||
if (IoStack->FileObject && IoStack->FileObject->FsContext)
|
||||
{
|
||||
ObjectHeader = (PKSIOBJECT_HEADER) IoStack->FileObject->FsContext;
|
||||
|
@ -906,7 +906,7 @@ KsQuerySecurity(
|
|||
/* get current stack location */
|
||||
IoStack = IoGetCurrentIrpStackLocation(Irp);
|
||||
|
||||
DPRINT1("KS / QuerySecurity\n");
|
||||
DPRINT("KS / QuerySecurity\n");
|
||||
if (IoStack->FileObject && IoStack->FileObject->FsContext)
|
||||
{
|
||||
ObjectHeader = (PKSIOBJECT_HEADER) IoStack->FileObject->FsContext;
|
||||
|
@ -934,7 +934,7 @@ KsSetSecurity(
|
|||
/* get current stack location */
|
||||
IoStack = IoGetCurrentIrpStackLocation(Irp);
|
||||
|
||||
DPRINT1("KS / SetSecurity\n");
|
||||
DPRINT("KS / SetSecurity\n");
|
||||
if (IoStack->FileObject && IoStack->FileObject->FsContext)
|
||||
{
|
||||
ObjectHeader = (PKSIOBJECT_HEADER) IoStack->FileObject->FsContext;
|
||||
|
@ -1019,7 +1019,7 @@ KsDispatchIrp(
|
|||
*/
|
||||
|
||||
IoStack = IoGetCurrentIrpStackLocation(Irp);
|
||||
DPRINT1("KsDispatchIrp %x\n", IoStack->MajorFunction);
|
||||
DPRINT("KsDispatchIrp %x\n", IoStack->MajorFunction);
|
||||
|
||||
switch (IoStack->MajorFunction)
|
||||
{
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <ntifs.h>
|
||||
#include <ntddk.h>
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
#include <portcls.h>
|
||||
#include <ks.h>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Kernel Streaming
|
||||
* FILE: drivers/multimedia/portcls/adapter.c
|
||||
* FILE: drivers/wdm/audio/backpln/portcls/api.c
|
||||
* PURPOSE: Port Class driver / DriverEntry and IRP handlers
|
||||
* PROGRAMMER: Andrew Greenwood
|
||||
*
|
||||
|
@ -61,7 +61,7 @@ PcInitializeAdapterDriver(
|
|||
DriverObject->DriverExtension->AddDevice = AddDevice;
|
||||
|
||||
/* KS handles these */
|
||||
DPRINT1("Setting KS function handlers\n");
|
||||
DPRINT("Setting KS function handlers\n");
|
||||
KsSetMajorFunctionHandler(DriverObject, IRP_MJ_CLOSE);
|
||||
KsSetMajorFunctionHandler(DriverObject, IRP_MJ_DEVICE_CONTROL);
|
||||
KsSetMajorFunctionHandler(DriverObject, IRP_MJ_FLUSH_BUFFERS);
|
||||
|
@ -70,7 +70,7 @@ PcInitializeAdapterDriver(
|
|||
KsSetMajorFunctionHandler(DriverObject, IRP_MJ_SET_SECURITY);
|
||||
KsSetMajorFunctionHandler(DriverObject, IRP_MJ_WRITE);
|
||||
|
||||
DPRINT1("PortCls has finished initializing the adapter driver\n");
|
||||
DPRINT("PortCls has finished initializing the adapter driver\n");
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Kernel Streaming
|
||||
* FILE: drivers/wdm/audio/backpln/portcls/api.c
|
||||
* PURPOSE: Port api functions
|
||||
* PROGRAMMER: Johannes Anderwald
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
|
||||
/*
|
||||
|
@ -74,6 +82,38 @@ PcUnregisterIoTimeout(
|
|||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
PcCompletePendingPropertyRequest(
|
||||
IN PPCPROPERTY_REQUEST PropertyRequest,
|
||||
IN NTSTATUS NtStatus)
|
||||
{
|
||||
/* sanity checks */
|
||||
|
||||
if (!PropertyRequest)
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
|
||||
ASSERT(PropertyRequest->Irp);
|
||||
ASSERT(NtStatus != STATUS_PENDING);
|
||||
|
||||
/* set the final status code */
|
||||
PropertyRequest->Irp->IoStatus.Status = NtStatus;
|
||||
|
||||
/* complete the irp */
|
||||
IoCompleteRequest(PropertyRequest->Irp, IO_SOUND_INCREMENT);
|
||||
|
||||
/* free the property request */
|
||||
ExFreePool(PropertyRequest);
|
||||
|
||||
/* return success */
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Kernel Streaming
|
||||
* FILE: drivers/wdm/audio/backpln/portcls/connection.c
|
||||
* PURPOSE: portcls physical connection registration
|
||||
* PROGRAMMER: Johannes Anderwald
|
||||
*/
|
||||
|
||||
|
||||
#include "private.h"
|
||||
|
||||
|
||||
|
@ -106,7 +115,7 @@ PcRegisterPhysicalConnection(
|
|||
IN ULONG ToPin)
|
||||
{
|
||||
|
||||
DPRINT1("PcRegisterPhysicalConnection\n");
|
||||
DPRINT("PcRegisterPhysicalConnection\n");
|
||||
|
||||
if (!DeviceObject || !FromUnknown || !ToUnknown)
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Kernel Streaming
|
||||
* FILE: drivers/wdm/audio/backpln/portcls/dispatcher.c
|
||||
* PURPOSE: portcls generic dispatcher
|
||||
* PROGRAMMER: Johannes Anderwald
|
||||
*/
|
||||
|
||||
|
||||
#include "private.h"
|
||||
|
||||
NTSTATUS
|
||||
|
@ -221,7 +230,7 @@ NewDispatchObject(
|
|||
IoStack->FileObject->FsContext2 = (PVOID)Target;
|
||||
|
||||
Status = KsAllocateObjectHeader(&ObjectHeader, 1, CreateItem, Irp, &DispatchTable);
|
||||
DPRINT1("KsAllocateObjectHeader result %x\n", Status);
|
||||
DPRINT("KsAllocateObjectHeader result %x\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
/*
|
||||
ReactOS Kernel Streaming
|
||||
Port Class / Library Init and Cleanup
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Kernel Streaming
|
||||
* FILE: drivers/wdm/audio/backpln/portcls/dll.c
|
||||
* PURPOSE: portcls generic dispatcher
|
||||
* PROGRAMMER: Andrew Greenwood
|
||||
*/
|
||||
|
||||
Author: Andrew Greenwood
|
||||
|
||||
Notes:
|
||||
-
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
ULONG NTAPI
|
||||
ULONG
|
||||
NTAPI
|
||||
DllInitialize(ULONG Unknown)
|
||||
{
|
||||
return 0;
|
||||
|
@ -22,7 +22,8 @@ DllInitialize(ULONG Unknown)
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
ULONG NTAPI
|
||||
ULONG
|
||||
NTAPI
|
||||
DllUnload(VOID)
|
||||
{
|
||||
return 0;
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Kernel Streaming
|
||||
* FILE: drivers/wdm/audio/backpln/portcls/dma_slave.c
|
||||
* PURPOSE: portcls dma support object
|
||||
* PROGRAMMER: Johannes Anderwald
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
|
||||
|
||||
|
@ -523,7 +531,7 @@ PcNewDmaChannel(
|
|||
This->MaxMapRegisters = MapRegisters;
|
||||
|
||||
*OutDmaChannel = (PVOID)(&This->lpVtbl);
|
||||
DPRINT1("PcNewDmaChannel result %p\n", *OutDmaChannel);
|
||||
DPRINT("PcNewDmaChannel result %p\n", *OutDmaChannel);
|
||||
return STATUS_SUCCESS;
|
||||
|
||||
}
|
||||
|
|
|
@ -1,20 +1,18 @@
|
|||
/*
|
||||
ReactOS Kernel Streaming
|
||||
Port Class / Digital Rights Management
|
||||
|
||||
Author: Andrew Greenwood
|
||||
|
||||
Notes:
|
||||
These are convenience functions for accessing DRM facilities, as
|
||||
documented here:
|
||||
http://www.osronline.com/ddkx/stream/aud-prop_9f77.htm
|
||||
*/
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Kernel Streaming
|
||||
* FILE: drivers/wdm/audio/backpln/portcls/drm.c
|
||||
* PURPOSE: portcls drm functions
|
||||
* PROGRAMMER: Andrew Greenwood
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
#include <portcls.h>
|
||||
#include <drmk.h>
|
||||
|
||||
NTSTATUS NTAPI
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
PcAddContentHandlers(
|
||||
IN ULONG ContentId,
|
||||
IN PVOID *paHandlers,
|
||||
|
@ -23,7 +21,11 @@ PcAddContentHandlers(
|
|||
return DrmAddContentHandlers(ContentId, paHandlers, NumHandlers);
|
||||
}
|
||||
|
||||
NTSTATUS NTAPI
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
PcCreateContentMixed(
|
||||
IN PULONG paContentId,
|
||||
IN ULONG cContentId,
|
||||
|
@ -32,14 +34,22 @@ PcCreateContentMixed(
|
|||
return DrmCreateContentMixed(paContentId, cContentId, pMixedContentId);
|
||||
}
|
||||
|
||||
NTSTATUS NTAPI
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
PcDestroyContent(
|
||||
IN ULONG ContentId)
|
||||
{
|
||||
return DrmDestroyContent(ContentId);
|
||||
}
|
||||
|
||||
NTSTATUS NTAPI
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
PcForwardContentToDeviceObject(
|
||||
IN ULONG ContentId,
|
||||
IN PVOID Reserved,
|
||||
|
@ -48,7 +58,11 @@ PcForwardContentToDeviceObject(
|
|||
return DrmForwardContentToDeviceObject(ContentId, Reserved, DrmForward);
|
||||
}
|
||||
|
||||
NTSTATUS NTAPI
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
PcForwardContentToFileObject(
|
||||
IN ULONG ContentId,
|
||||
IN PFILE_OBJECT FileObject)
|
||||
|
@ -56,7 +70,11 @@ PcForwardContentToFileObject(
|
|||
return DrmForwardContentToFileObject(ContentId, FileObject);
|
||||
}
|
||||
|
||||
NTSTATUS NTAPI
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
PcForwardContentToInterface(
|
||||
IN ULONG ContentId,
|
||||
IN PUNKNOWN pUnknown,
|
||||
|
@ -65,7 +83,11 @@ PcForwardContentToInterface(
|
|||
return DrmForwardContentToInterface(ContentId, pUnknown, NumMethods);
|
||||
}
|
||||
|
||||
NTSTATUS NTAPI
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
PcGetContentRights(
|
||||
IN ULONG ContentId,
|
||||
OUT PDRMRIGHTS DrmRights)
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Kernel Streaming
|
||||
* FILE: drivers/wdm/audio/backpln/portcls/drm_port.c
|
||||
* PURPOSE: portcls drm port object
|
||||
* PROGRAMMER: Johannes Anderwald
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
|
||||
typedef struct
|
||||
|
@ -43,7 +51,7 @@ IDrmPort2_fnQueryInterface(
|
|||
IN REFIID refiid,
|
||||
OUT PVOID* Output)
|
||||
{
|
||||
WCHAR Buffer[100];
|
||||
UNICODE_STRING GuidString;
|
||||
IDrmPort2Impl * This = (IDrmPort2Impl*)iface;
|
||||
|
||||
if (IsEqualGUIDAligned(refiid, &IID_IDrmPort) ||
|
||||
|
@ -55,8 +63,11 @@ IDrmPort2_fnQueryInterface(
|
|||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
StringFromCLSID(refiid, Buffer);
|
||||
DPRINT1("IDrmPort2_QueryInterface no interface!!! iface %S\n", Buffer);
|
||||
if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS)
|
||||
{
|
||||
DPRINT1("IDrmPort2_QueryInterface no interface!!! iface %S\n", GuidString.Buffer);
|
||||
RtlFreeUnicodeString(&GuidString);
|
||||
}
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Kernel Streaming
|
||||
* FILE: drivers/wdm/audio/backpln/portcls/filter_wavecyclic.c
|
||||
* PURPOSE: portcls wave cyclic filter
|
||||
* PROGRAMMER: Johannes Anderwald
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
|
||||
typedef struct
|
||||
|
|
|
@ -1,8 +1,14 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Kernel Streaming
|
||||
* FILE: drivers/wdm/audio/backpln/portcls/guids.c
|
||||
* PURPOSE: portcls guid mess
|
||||
* PROGRAMMER: Johannes Anderwald
|
||||
*/
|
||||
|
||||
|
||||
#include "private.h"
|
||||
|
||||
|
||||
|
||||
|
||||
const GUID CLSID_PortTopology = {0xb4c90a32L, 0x5791, 0x11d0, {0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44}};
|
||||
const GUID CLSID_PortMidi = {0xb4c90a43L, 0x5791, 0x11d0, {0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44}};
|
||||
const GUID CLSID_PortWaveCyclic = {0xb4c90a2aL, 0x5791, 0x11d0, {0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44}};
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Kernel Streaming
|
||||
* FILE: drivers/wdm/audio/backpln/portcls/interrupt.c
|
||||
* PURPOSE: portcls interrupt object
|
||||
* PROGRAMMER: Johannes Anderwald
|
||||
*/
|
||||
|
||||
|
||||
#include "private.h"
|
||||
|
||||
typedef struct
|
||||
|
@ -39,7 +48,7 @@ IInterruptSync_fnQueryInterface(
|
|||
{
|
||||
IInterruptSyncImpl * This = (IInterruptSyncImpl*)iface;
|
||||
|
||||
DPRINT1("IInterruptSync_fnQueryInterface: This %p\n", This);
|
||||
DPRINT("IInterruptSync_fnQueryInterface: This %p\n", This);
|
||||
|
||||
if (IsEqualGUIDAligned(refiid, &IID_IInterruptSync) ||
|
||||
IsEqualGUIDAligned(refiid, &IID_IUnknown))
|
||||
|
@ -59,7 +68,7 @@ IInterruptSync_fnAddRef(
|
|||
{
|
||||
IInterruptSyncImpl * This = (IInterruptSyncImpl*)iface;
|
||||
|
||||
DPRINT1("IInterruptSync_AddRef: This %p\n", This);
|
||||
DPRINT("IInterruptSync_AddRef: This %p\n", This);
|
||||
|
||||
return InterlockedIncrement(&This->ref);
|
||||
}
|
||||
|
@ -75,7 +84,7 @@ IInterruptSync_fnRelease(
|
|||
|
||||
InterlockedDecrement(&This->ref);
|
||||
|
||||
DPRINT1("IInterruptSync_Release: This %p new ref %u\n", This, This->ref);
|
||||
DPRINT("IInterruptSync_Release: This %p new ref %u\n", This, This->ref);
|
||||
|
||||
if (This->ref == 0)
|
||||
{
|
||||
|
@ -86,9 +95,8 @@ IInterruptSync_fnRelease(
|
|||
FreeItem(Entry, TAG_PORTCLASS);
|
||||
}
|
||||
|
||||
//This->ResourceList->lpVtbl->Release(This->ResourceList);
|
||||
//FreeItem(This, TAG_PORTCLASS);
|
||||
DPRINT1("IInterruptSync_Release: complete\n");
|
||||
This->ResourceList->lpVtbl->Release(This->ResourceList);
|
||||
FreeItem(This, TAG_PORTCLASS);
|
||||
return 0;
|
||||
}
|
||||
/* Return new reference count */
|
||||
|
@ -106,7 +114,7 @@ IInterruptSynchronizedRoutine(
|
|||
IN PVOID ServiceContext)
|
||||
{
|
||||
IInterruptSyncImpl * This = (IInterruptSyncImpl*)ServiceContext;
|
||||
//DPRINT1("IInterruptSynchronizedRoutine This %p SyncRoutine %p Context %p\n", This, This->SyncRoutine, This->DynamicContext);
|
||||
DPRINT("IInterruptSynchronizedRoutine This %p SyncRoutine %p Context %p\n", This, This->SyncRoutine, This->DynamicContext);
|
||||
return This->SyncRoutine((IInterruptSync*)&This->lpVtbl, This->DynamicContext);
|
||||
}
|
||||
|
||||
|
@ -120,7 +128,7 @@ IInterruptSync_fnCallSynchronizedRoutine(
|
|||
KIRQL OldIrql;
|
||||
IInterruptSyncImpl * This = (IInterruptSyncImpl*)iface;
|
||||
|
||||
//DPRINT1("IInterruptSync_fnCallSynchronizedRoutine This %p Routine %p DynamicContext %p Irql %x Interrupt %p\n", This, Routine, DynamicContext, KeGetCurrentIrql(), This->Interrupt);
|
||||
DPRINT("IInterruptSync_fnCallSynchronizedRoutine This %p Routine %p DynamicContext %p Irql %x Interrupt %p\n", This, Routine, DynamicContext, KeGetCurrentIrql(), This->Interrupt);
|
||||
|
||||
if (!This->Interrupt)
|
||||
{
|
||||
|
@ -152,7 +160,7 @@ IInterruptSync_fnGetKInterrupt(
|
|||
IN IInterruptSync * iface)
|
||||
{
|
||||
IInterruptSyncImpl * This = (IInterruptSyncImpl*)iface;
|
||||
DPRINT1("IInterruptSynchronizedRoutine\n");
|
||||
DPRINT("IInterruptSynchronizedRoutine\n");
|
||||
|
||||
return This->Interrupt;
|
||||
}
|
||||
|
@ -233,7 +241,7 @@ IInterruptSync_fnConnect(
|
|||
NTSTATUS Status;
|
||||
PCM_PARTIAL_RESOURCE_DESCRIPTOR Descriptor;
|
||||
|
||||
DPRINT1("IInterruptSync_fnConnect\n");
|
||||
DPRINT("IInterruptSync_fnConnect\n");
|
||||
|
||||
Descriptor = This->ResourceList->lpVtbl->FindTranslatedEntry(This->ResourceList, CmResourceTypeInterrupt, This->ResourceIndex);
|
||||
if (!Descriptor)
|
||||
|
@ -254,7 +262,7 @@ IInterruptSync_fnConnect(
|
|||
Descriptor->u.Interrupt.Affinity,
|
||||
FALSE);
|
||||
|
||||
DPRINT1("IInterruptSync_fnConnect result %x\n", Status);
|
||||
DPRINT("IInterruptSync_fnConnect result %x\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -265,7 +273,7 @@ IInterruptSync_fnDisconnect(
|
|||
IN IInterruptSync * iface)
|
||||
{
|
||||
IInterruptSyncImpl * This = (IInterruptSyncImpl*)iface;
|
||||
DPRINT1("IInterruptSync_fnDisconnect\n");
|
||||
DPRINT("IInterruptSync_fnDisconnect\n");
|
||||
|
||||
if (!This->Interrupt)
|
||||
{
|
||||
|
@ -288,7 +296,7 @@ IInterruptSync_fnRegisterServiceRoutine(
|
|||
PSYNC_ENTRY NewEntry;
|
||||
IInterruptSyncImpl * This = (IInterruptSyncImpl*)iface;
|
||||
|
||||
DPRINT1("IInterruptSync_fnRegisterServiceRoutine\n");
|
||||
DPRINT("IInterruptSync_fnRegisterServiceRoutine\n");
|
||||
|
||||
NewEntry = AllocateItem(NonPagedPool, sizeof(SYNC_ENTRY), TAG_PORTCLASS);
|
||||
if (!NewEntry)
|
||||
|
@ -332,7 +340,7 @@ PcNewInterruptSync(
|
|||
{
|
||||
IInterruptSyncImpl * This;
|
||||
|
||||
DPRINT1("PcNewInterruptSync entered OutInterruptSync %p OuterUnknown %p ResourceList %p ResourceIndex %u Mode %d\n",
|
||||
DPRINT("PcNewInterruptSync entered OutInterruptSync %p OuterUnknown %p ResourceList %p ResourceIndex %u Mode %d\n",
|
||||
OutInterruptSync, OuterUnknown, ResourceList, ResourceIndex, Mode);
|
||||
|
||||
if (!OutInterruptSync || !ResourceList || Mode > InterruptSyncModeRepeat || Mode < 0)
|
||||
|
@ -358,7 +366,7 @@ PcNewInterruptSync(
|
|||
KeInitializeSpinLock(&This->Lock);
|
||||
|
||||
*OutInterruptSync = (PINTERRUPTSYNC)&This->lpVtbl;
|
||||
DPRINT1("PcNewInterruptSync success %p\n", *OutInterruptSync);
|
||||
DPRINT("PcNewInterruptSync success %p\n", *OutInterruptSync);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS
|
||||
* FILE: drivers/multimedia/portcls/irp.c
|
||||
* FILE: drivers/wdm/audio/backpln/portcls/irp.c
|
||||
* PURPOSE: Port Class driver / IRP Handling
|
||||
* PROGRAMMER: Andrew Greenwood
|
||||
*
|
||||
* Johannes Anderwald
|
||||
* HISTORY:
|
||||
* 27 Jan 07 Created
|
||||
*/
|
||||
|
@ -13,30 +13,6 @@
|
|||
#include "private.h"
|
||||
#include <portcls.h>
|
||||
|
||||
/*
|
||||
A safe place for IRPs to be bounced to, if no handler has been
|
||||
set. Whether this is a good idea or not...?
|
||||
*/
|
||||
#if 0
|
||||
static
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
IrpStub(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp)
|
||||
{
|
||||
NTSTATUS status = STATUS_NOT_SUPPORTED;
|
||||
|
||||
Irp->IoStatus.Status = STATUS_NOT_SUPPORTED;
|
||||
Irp->IoStatus.Information = 0;
|
||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||
|
||||
DPRINT1("IRP Stub called\n");
|
||||
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
Handles IRP_MJ_CREATE, which occurs when someone wants to make use of
|
||||
a device.
|
||||
|
@ -47,7 +23,7 @@ PortClsCreate(
|
|||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp)
|
||||
{
|
||||
DPRINT1("PortClsCreate called\n");
|
||||
DPRINT("PortClsCreate called\n");
|
||||
|
||||
return KsDispatchIrp(DeviceObject, Irp);
|
||||
}
|
||||
|
@ -68,7 +44,7 @@ PortClsPnp(
|
|||
PIO_STACK_LOCATION IoStack;
|
||||
IResourceList* resource_list = NULL;
|
||||
|
||||
DPRINT1("PortClsPnp called\n");
|
||||
DPRINT("PortClsPnp called\n");
|
||||
|
||||
DeviceExt = (PPCLASS_DEVICE_EXTENSION) DeviceObject->DeviceExtension;
|
||||
IoStack = IoGetCurrentIrpStackLocation(Irp);
|
||||
|
@ -165,7 +141,7 @@ PortClsPower(
|
|||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp)
|
||||
{
|
||||
DPRINT1("PortClsPower called\n");
|
||||
DPRINT("PortClsPower called\n");
|
||||
|
||||
/* TODO */
|
||||
|
||||
|
@ -186,7 +162,7 @@ PortClsSysControl(
|
|||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp)
|
||||
{
|
||||
DPRINT1("PortClsSysControl called\n");
|
||||
DPRINT("PortClsSysControl called\n");
|
||||
|
||||
/* TODO */
|
||||
|
||||
|
@ -215,7 +191,7 @@ PcDispatchIrp(
|
|||
{
|
||||
PIO_STACK_LOCATION IoStack;
|
||||
|
||||
DPRINT1("PcDispatchIrp called - handling IRP in PortCls\n");
|
||||
DPRINT("PcDispatchIrp called - handling IRP in PortCls\n");
|
||||
|
||||
IoStack = IoGetCurrentIrpStackLocation(Irp);
|
||||
|
||||
|
@ -287,8 +263,6 @@ PcForwardIrpSynchronous(
|
|||
PPCLASS_DEVICE_EXTENSION DeviceExt;
|
||||
NTSTATUS Status;
|
||||
|
||||
DPRINT1("PcForwardIrpSynchronous\n");
|
||||
|
||||
DeviceExt = (PPCLASS_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
||||
|
||||
/* initialize the notification event */
|
||||
|
@ -296,8 +270,6 @@ PcForwardIrpSynchronous(
|
|||
|
||||
IoCopyCurrentIrpStackLocationToNext(Irp);
|
||||
|
||||
DPRINT1("PcForwardIrpSynchronous %p Irp %p\n", DeviceExt->PrevDeviceObject, Irp);
|
||||
|
||||
IoSetCompletionRoutine(Irp, CompletionRoutine, (PVOID)&Event, TRUE, TRUE, TRUE);
|
||||
|
||||
/* now call the driver */
|
||||
|
@ -309,6 +281,5 @@ PcForwardIrpSynchronous(
|
|||
KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE, NULL);
|
||||
Status = STATUS_SUCCESS;
|
||||
}
|
||||
DPRINT1("Returning status %x\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Kernel Streaming
|
||||
* FILE: drivers/multimedia/portcls/irpstream.c
|
||||
* FILE: drivers/wdm/audio/backpln/portcls/irpstream.c
|
||||
* PURPOSE: IRP Stream handling
|
||||
* PROGRAMMER: Johannes Anderwald
|
||||
*
|
||||
* HISTORY:
|
||||
* 27 Jan 07 Created
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
|
|
|
@ -1,19 +1,13 @@
|
|||
/*
|
||||
ReactOS Operating System
|
||||
|
||||
Port Class API
|
||||
IMiniPortMidi Implementation
|
||||
|
||||
by Andrew Greenwood
|
||||
|
||||
REFERENCE:
|
||||
http://www.osronline.com/ddkx/stream/audmp-routines_64vn.htm
|
||||
*/
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Kernel Streaming
|
||||
* FILE: drivers/wdm/audio/backpln/portcls/miniport.c
|
||||
* PURPOSE: Miniport construction api
|
||||
* PROGRAMMER: Andrew Greenwood
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
|
@ -24,7 +18,7 @@ PcNewMiniport(
|
|||
{
|
||||
NTSTATUS Status = STATUS_INVALID_PARAMETER;
|
||||
|
||||
DPRINT1("PcNewMiniport entered\n");
|
||||
DPRINT("PcNewMiniport entered\n");
|
||||
|
||||
if (!OutMiniport)
|
||||
{
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Kernel Streaming
|
||||
* FILE: drivers/wdm/audio/backpln/portcls/miniport_dmus.c
|
||||
* PURPOSE: DirectMusic miniport
|
||||
* PROGRAMMER: Johannes Anderwald
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
|
||||
typedef struct
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Kernel Streaming
|
||||
* FILE: drivers/wdm/audio/backpln/portcls/miniport_fmsynth.c
|
||||
* PURPOSE: Miniport FM Synth
|
||||
* PROGRAMMER: Johannes Anderwald
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Kernel Streaming
|
||||
* FILE: drivers/wdm/audio/backpln/portcls/pin_wavecyclic.c
|
||||
* PURPOSE: WaveCyclic IRP Audio Pin
|
||||
* PROGRAMMER: Johannes Anderwald
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
|
||||
typedef struct
|
||||
|
@ -335,7 +343,7 @@ IPortPinWaveCyclic_fnNewIrpTarget(
|
|||
IN PIRP Irp,
|
||||
IN KSOBJECT_CREATE *CreateObject)
|
||||
{
|
||||
DPRINT1("IPortPinWaveCyclic_fnNewIrpTarget\n");
|
||||
UNIMPLEMENTED
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
|
@ -353,7 +361,7 @@ IPortPinWaveCyclic_HandleKsProperty(
|
|||
|
||||
IoStack = IoGetCurrentIrpStackLocation(Irp);
|
||||
|
||||
//DPRINT1("IPortPinWave_HandleKsProperty entered\n");
|
||||
DPRINT("IPortPinWave_HandleKsProperty entered\n");
|
||||
|
||||
if (IoStack->Parameters.DeviceIoControl.InputBufferLength < sizeof(KSPROPERTY))
|
||||
{
|
||||
|
@ -513,8 +521,7 @@ IPortPinWaveCyclic_HandleKsStream(
|
|||
{
|
||||
IPortPinWaveCyclicImpl * This = (IPortPinWaveCyclicImpl*)iface;
|
||||
|
||||
DPRINT1("IPortPinWaveCyclic_HandleKsStream entered State %u Stream %p\n", This->State, This->Stream);
|
||||
DbgBreakPoint();
|
||||
DPRINT("IPortPinWaveCyclic_HandleKsStream entered State %u Stream %p\n", This->State, This->Stream);
|
||||
|
||||
return STATUS_PENDING;
|
||||
}
|
||||
|
@ -783,7 +790,7 @@ IPortPinWaveCyclic_fnFastRead(
|
|||
PIRP Irp;
|
||||
IPortPinWaveCyclicImpl * This = (IPortPinWaveCyclicImpl*)iface;
|
||||
|
||||
DPRINT1("IPortPinWaveCyclic_fnFastRead entered\n");
|
||||
DPRINT("IPortPinWaveCyclic_fnFastRead entered\n");
|
||||
|
||||
Packet = (PCONTEXT_WRITE)Buffer;
|
||||
|
||||
|
@ -798,7 +805,7 @@ IPortPinWaveCyclic_fnFastRead(
|
|||
if (This->IrpQueue->lpVtbl->MinimumDataAvailable(This->IrpQueue) == TRUE && This->State != KSSTATE_RUN)
|
||||
{
|
||||
/* some should initiate a state request but didnt do it */
|
||||
DPRINT1("Starting stream with %lu mappings Offset %u\n", This->IrpQueue->lpVtbl->NumMappings(This->IrpQueue), This->ActiveIrpOffset);
|
||||
DPRINT1("Starting stream with %lu mappings\n", This->IrpQueue->lpVtbl->NumMappings(This->IrpQueue));
|
||||
|
||||
This->Stream->lpVtbl->SetState(This->Stream, KSSTATE_RUN);
|
||||
This->State = KSSTATE_RUN;
|
||||
|
@ -827,7 +834,7 @@ IPortPinWaveCyclic_fnFastWrite(
|
|||
PIRP Irp;
|
||||
IPortPinWaveCyclicImpl * This = (IPortPinWaveCyclicImpl*)iface;
|
||||
|
||||
//DPRINT1("IPortPinWaveCyclic_fnFastWrite entered\n");
|
||||
DPRINT("IPortPinWaveCyclic_fnFastWrite entered\n");
|
||||
|
||||
Packet = (PCONTEXT_WRITE)Buffer;
|
||||
|
||||
|
@ -854,7 +861,7 @@ IPortPinWaveCyclic_fnFastWrite(
|
|||
if (This->IrpQueue->lpVtbl->MinimumDataAvailable(This->IrpQueue) == TRUE && This->State != KSSTATE_RUN)
|
||||
{
|
||||
/* some should initiate a state request but didnt do it */
|
||||
DPRINT1("Starting stream with %lu mappings Offset %u\n", This->IrpQueue->lpVtbl->NumMappings(This->IrpQueue), This->ActiveIrpOffset);
|
||||
DPRINT1("Starting stream with %lu\n", This->IrpQueue->lpVtbl->NumMappings(This->IrpQueue));
|
||||
|
||||
This->Stream->lpVtbl->SetState(This->Stream, KSSTATE_RUN);
|
||||
This->State = KSSTATE_RUN;
|
||||
|
|
|
@ -1,7 +1,13 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Kernel Streaming
|
||||
* FILE: drivers/wdm/audio/backpln/portcls/pool.c
|
||||
* PURPOSE: Memory functions
|
||||
* PROGRAMMER: Johannes Anderwald
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
|
||||
|
||||
|
||||
PVOID
|
||||
AllocateItem(
|
||||
IN POOL_TYPE PoolType,
|
||||
|
|
|
@ -1,29 +1,14 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Kernel Streaming
|
||||
* FILE: drivers/wdm/audio/backpln/portcls/port.c
|
||||
* PURPOSE: Port construction API
|
||||
* PROGRAMMER: Johannes Anderwald
|
||||
* Andrew Greenwood
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
|
||||
NTSTATUS StringFromCLSID(
|
||||
const CLSID *id, /* [in] GUID to be converted */
|
||||
LPWSTR idstr /* [out] pointer to buffer to contain converted guid */
|
||||
) {
|
||||
static const char hex[] = "0123456789ABCDEF";
|
||||
WCHAR *s;
|
||||
int i;
|
||||
|
||||
swprintf(idstr, L"{%08X-%04X-%04X-%02X%02X-",
|
||||
id->Data1, id->Data2, id->Data3,
|
||||
id->Data4[0], id->Data4[1]);
|
||||
s = &idstr[25];
|
||||
|
||||
/* 6 hex bytes */
|
||||
for (i = 2; i < 8; i++) {
|
||||
*s++ = hex[id->Data4[i]>>4];
|
||||
*s++ = hex[id->Data4[i] & 0xf];
|
||||
}
|
||||
|
||||
*s++ = '}';
|
||||
*s++ = '\0';
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
NTSTATUS
|
||||
|
@ -33,9 +18,9 @@ PcNewPort(
|
|||
IN REFCLSID ClassId)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
WCHAR Buffer[100];
|
||||
UNICODE_STRING GuidString;
|
||||
|
||||
DPRINT1("PcNewPort entered\n");
|
||||
DPRINT("PcNewPort entered\n");
|
||||
|
||||
if (!OutPort)
|
||||
{
|
||||
|
@ -56,8 +41,11 @@ PcNewPort(
|
|||
else
|
||||
{
|
||||
|
||||
StringFromCLSID(ClassId, Buffer);
|
||||
DPRINT1("unknown interface %S\n", Buffer);
|
||||
if (RtlStringFromGUID(ClassId, &GuidString) == STATUS_SUCCESS)
|
||||
{
|
||||
DPRINT1("unknown interface %S\n", GuidString.Buffer);
|
||||
RtlFreeUnicodeString(&GuidString);
|
||||
}
|
||||
|
||||
Status = STATUS_NOT_SUPPORTED;
|
||||
return Status;
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Kernel Streaming
|
||||
* FILE: drivers/wdm/audio/backpln/portcls/port_dmus.c
|
||||
* PURPOSE: DirectMusic Port driver
|
||||
* PROGRAMMER: Johannes Anderwald
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
|
||||
typedef struct
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Kernel Streaming
|
||||
* FILE: drivers/wdm/audio/backpln/portcls/port_midi.c
|
||||
* PURPOSE: Midi Port driver
|
||||
* PROGRAMMER: Johannes Anderwald
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
|
||||
typedef struct
|
||||
|
@ -45,10 +53,10 @@ IPortMidi_fnQueryInterface(
|
|||
IN REFIID refiid,
|
||||
OUT PVOID* Output)
|
||||
{
|
||||
WCHAR Buffer[100];
|
||||
UNICODE_STRING GuidString;
|
||||
IPortMidiImpl * This = (IPortMidiImpl*)iface;
|
||||
|
||||
DPRINT1("IPortMidi_fnQueryInterface\n");
|
||||
DPRINT("IPortMidi_fnQueryInterface\n");
|
||||
|
||||
if (IsEqualGUIDAligned(refiid, &IID_IPortMidi) ||
|
||||
IsEqualGUIDAligned(refiid, &IID_IPort) ||
|
||||
|
@ -74,9 +82,11 @@ IPortMidi_fnQueryInterface(
|
|||
return NewIDrmPort((PDRMPORT2*)Output);
|
||||
}
|
||||
|
||||
StringFromCLSID(refiid, Buffer);
|
||||
DPRINT1("IPortMidi_fnQueryInterface no iface %S\n", Buffer);
|
||||
KeBugCheckEx(0, 0, 0, 0, 0);
|
||||
if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS)
|
||||
{
|
||||
DPRINT1("IPortMidi_fnQueryInterface no interface!!! iface %S\n", GuidString.Buffer);
|
||||
RtlFreeUnicodeString(&GuidString);
|
||||
}
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
|
@ -148,7 +158,7 @@ IPortMidi_fnInit(
|
|||
NTSTATUS Status;
|
||||
IPortMidiImpl * This = (IPortMidiImpl*)iface;
|
||||
|
||||
DPRINT1("IPortMidi_fnInit entered This %p DeviceObject %p Irp %p UnknownMiniport %p UnknownAdapter %p ResourceList %p\n",
|
||||
DPRINT("IPortMidi_fnInit entered This %p DeviceObject %p Irp %p UnknownMiniport %p UnknownAdapter %p ResourceList %p\n",
|
||||
This, DeviceObject, Irp, UnknownMiniport, UnknownAdapter, ResourceList);
|
||||
|
||||
if (This->bInitialized)
|
||||
|
@ -210,7 +220,7 @@ IPortMidi_fnInit(
|
|||
This->pDescriptor);
|
||||
|
||||
|
||||
DPRINT1("IPortMidi_fnInit success\n");
|
||||
DPRINT("IPortMidi_fnInit success\n");
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -331,9 +341,9 @@ ISubDevice_fnNewIrpTarget(
|
|||
IN PIRP Irp,
|
||||
IN KSOBJECT_CREATE *CreateObject)
|
||||
{
|
||||
IPortMidiImpl * This = (IPortMidiImpl*)CONTAINING_RECORD(iface, IPortMidiImpl, lpVtblSubDevice);
|
||||
//IPortMidiImpl * This = (IPortMidiImpl*)CONTAINING_RECORD(iface, IPortMidiImpl, lpVtblSubDevice);
|
||||
|
||||
DPRINT1("ISubDevice_NewIrpTarget this %p\n", This);
|
||||
UNIMPLEMENTED
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
|
@ -343,9 +353,9 @@ NTAPI
|
|||
ISubDevice_fnReleaseChildren(
|
||||
IN ISubdevice *iface)
|
||||
{
|
||||
IPortMidiImpl * This = (IPortMidiImpl*)CONTAINING_RECORD(iface, IPortMidiImpl, lpVtblSubDevice);
|
||||
//IPortMidiImpl * This = (IPortMidiImpl*)CONTAINING_RECORD(iface, IPortMidiImpl, lpVtblSubDevice);
|
||||
|
||||
DPRINT1("ISubDevice_ReleaseChildren this %p\n", This);
|
||||
UNIMPLEMENTED
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
|
@ -358,7 +368,7 @@ ISubDevice_fnGetDescriptor(
|
|||
{
|
||||
IPortMidiImpl * This = (IPortMidiImpl*)CONTAINING_RECORD(iface, IPortMidiImpl, lpVtblSubDevice);
|
||||
|
||||
DPRINT1("ISubDevice_GetDescriptor this %p\n", This);
|
||||
DPRINT("ISubDevice_GetDescriptor this %p\n", This);
|
||||
*Descriptor = This->SubDeviceDescriptor;
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
@ -459,7 +469,7 @@ NewPortMidi(
|
|||
This->ref = 1;
|
||||
*OutPort = (PPORT)(&This->lpVtbl);
|
||||
|
||||
DPRINT1("NewPortMidi result %p\n", *OutPort);
|
||||
DPRINT("NewPortMidi result %p\n", *OutPort);
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Kernel Streaming
|
||||
* FILE: drivers/wdm/audio/backpln/portcls/port_topology.c
|
||||
* PURPOSE: Topology Port driver
|
||||
* PROGRAMMER: Johannes Anderwald
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
|
||||
typedef struct
|
||||
|
@ -70,10 +78,10 @@ IPortTopology_fnQueryInterface(
|
|||
IN REFIID refiid,
|
||||
OUT PVOID* Output)
|
||||
{
|
||||
WCHAR Buffer[100];
|
||||
UNICODE_STRING GuidString;
|
||||
IPortTopologyImpl * This = (IPortTopologyImpl*)iface;
|
||||
|
||||
DPRINT1("IPortTopology_fnQueryInterface\n");
|
||||
DPRINT("IPortTopology_fnQueryInterface\n");
|
||||
|
||||
if (IsEqualGUIDAligned(refiid, &IID_IPortTopology) ||
|
||||
IsEqualGUIDAligned(refiid, &IID_IPort) ||
|
||||
|
@ -94,9 +102,11 @@ IPortTopology_fnQueryInterface(
|
|||
return NewPortClsVersion((PPORTCLSVERSION*)Output);
|
||||
}
|
||||
|
||||
StringFromCLSID(refiid, Buffer);
|
||||
DPRINT1("IPortTopology_fnQueryInterface no iface %S\n", Buffer);
|
||||
KeBugCheckEx(0, 0, 0, 0, 0);
|
||||
if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS)
|
||||
{
|
||||
DPRINT1("IPortTopology_fnQueryInterface no interface!!! iface %S\n", GuidString.Buffer);
|
||||
RtlFreeUnicodeString(&GuidString);
|
||||
}
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
|
@ -167,7 +177,7 @@ IPortTopology_fnInit(
|
|||
NTSTATUS Status;
|
||||
IPortTopologyImpl * This = (IPortTopologyImpl*)iface;
|
||||
|
||||
DPRINT1("IPortTopology_fnInit entered This %p DeviceObject %p Irp %p UnknownMiniport %p UnknownAdapter %p ResourceList %p\n",
|
||||
DPRINT("IPortTopology_fnInit entered This %p DeviceObject %p Irp %p UnknownMiniport %p UnknownAdapter %p ResourceList %p\n",
|
||||
This, DeviceObject, Irp, UnknownMiniport, UnknownAdapter, ResourceList);
|
||||
|
||||
if (This->bInitialized)
|
||||
|
@ -227,7 +237,7 @@ IPortTopology_fnInit(
|
|||
This->pDescriptor);
|
||||
|
||||
|
||||
DPRINT1("IPortTopology_fnInit success\n");
|
||||
DPRINT("IPortTopology_fnInit success\n");
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -326,9 +336,9 @@ ISubDevice_fnNewIrpTarget(
|
|||
IN PIRP Irp,
|
||||
IN KSOBJECT_CREATE *CreateObject)
|
||||
{
|
||||
IPortTopologyImpl * This = (IPortTopologyImpl*)CONTAINING_RECORD(iface, IPortTopologyImpl, lpVtblSubDevice);
|
||||
//IPortTopologyImpl * This = (IPortTopologyImpl*)CONTAINING_RECORD(iface, IPortTopologyImpl, lpVtblSubDevice);
|
||||
|
||||
DPRINT1("ISubDevice_NewIrpTarget this %p\n", This);
|
||||
UNIMPLEMENTED
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
|
@ -338,9 +348,9 @@ NTAPI
|
|||
ISubDevice_fnReleaseChildren(
|
||||
IN ISubdevice *iface)
|
||||
{
|
||||
IPortTopologyImpl * This = (IPortTopologyImpl*)CONTAINING_RECORD(iface, IPortTopologyImpl, lpVtblSubDevice);
|
||||
//IPortTopologyImpl * This = (IPortTopologyImpl*)CONTAINING_RECORD(iface, IPortTopologyImpl, lpVtblSubDevice);
|
||||
|
||||
DPRINT1("ISubDevice_ReleaseChildren this %p\n", This);
|
||||
UNIMPLEMENTED
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
|
@ -353,7 +363,7 @@ ISubDevice_fnGetDescriptor(
|
|||
{
|
||||
IPortTopologyImpl * This = (IPortTopologyImpl*)CONTAINING_RECORD(iface, IPortTopologyImpl, lpVtblSubDevice);
|
||||
|
||||
DPRINT1("ISubDevice_GetDescriptor this %p\n", This);
|
||||
DPRINT("ISubDevice_GetDescriptor this %p\n", This);
|
||||
*Descriptor = This->SubDeviceDescriptor;
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
@ -468,7 +478,7 @@ CreatePinWorkerRoutine(
|
|||
DPRINT("Pin %p\n", Pin);
|
||||
}
|
||||
|
||||
DPRINT1("CreatePinWorkerRoutine completing irp %p\n", WorkerContext->Irp);
|
||||
DPRINT("CreatePinWorkerRoutine completing irp %p\n", WorkerContext->Irp);
|
||||
WorkerContext->Irp->IoStatus.Status = Status;
|
||||
WorkerContext->Irp->IoStatus.Information = 0;
|
||||
IoCompleteRequest(WorkerContext->Irp, IO_SOUND_INCREMENT);
|
||||
|
@ -492,7 +502,7 @@ PcCreateItemDispatch(
|
|||
PPIN_WORKER_CONTEXT Context;
|
||||
PIO_WORKITEM WorkItem;
|
||||
|
||||
DPRINT1("PcCreateItemDispatch called DeviceObject %p\n", DeviceObject);
|
||||
DPRINT("PcCreateItemDispatch called DeviceObject %p\n", DeviceObject);
|
||||
|
||||
/* access the create item */
|
||||
CreateItem = KSCREATE_ITEM_IRP_STORAGE(Irp);
|
||||
|
@ -556,7 +566,7 @@ PcCreateItemDispatch(
|
|||
NULL);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("Failed to get filter object\n");
|
||||
DPRINT("Failed to get filter object\n");
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -566,7 +576,7 @@ PcCreateItemDispatch(
|
|||
/* create the dispatch object */
|
||||
Status = NewDispatchObject(Irp, Filter);
|
||||
|
||||
DPRINT1("Filter %p\n", Filter);
|
||||
DPRINT("Filter %p\n", Filter);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -598,7 +608,7 @@ PcCreateItemDispatch(
|
|||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||
return STATUS_INSUFFICIENT_RESOURCES;
|
||||
}
|
||||
DPRINT1("Queueing IRP %p Irql %u\n", Irp, KeGetCurrentIrql());
|
||||
DPRINT("Queueing IRP %p Irql %u\n", Irp, KeGetCurrentIrql());
|
||||
Irp->IoStatus.Information = 0;
|
||||
Irp->IoStatus.Status = STATUS_PENDING;
|
||||
IoMarkIrpPending(Irp);
|
||||
|
@ -629,7 +639,7 @@ NewPortTopology(
|
|||
This->lpVtblSubDevice = &vt_ISubdeviceVtbl;
|
||||
This->ref = 1;
|
||||
*OutPort = (PPORT)(&This->lpVtbl);
|
||||
DPRINT1("NewPortTopology result %p\n", *OutPort);
|
||||
DPRINT("NewPortTopology result %p\n", *OutPort);
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Kernel Streaming
|
||||
* FILE: drivers/wdm/audio/backpln/portcls/port_wavecyclic.c
|
||||
* PURPOSE: WaveCyclic Port Driver
|
||||
* PROGRAMMER: Johannes Anderwald
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
|
||||
typedef struct
|
||||
|
@ -96,7 +104,7 @@ IPortEvents_fnQueryInterface(
|
|||
{
|
||||
IPortWaveCyclicImpl * This = (IPortWaveCyclicImpl*)CONTAINING_RECORD(iface, IPortWaveCyclicImpl, lpVtblPortEvents);
|
||||
|
||||
DPRINT1("IPortEvents_fnQueryInterface entered\n");
|
||||
DPRINT("IPortEvents_fnQueryInterface entered\n");
|
||||
|
||||
if (IsEqualGUIDAligned(refiid, &IID_IPortEvents) ||
|
||||
IsEqualGUIDAligned(refiid, &IID_IUnknown))
|
||||
|
@ -115,7 +123,7 @@ IPortEvents_fnAddRef(
|
|||
IPortEvents* iface)
|
||||
{
|
||||
IPortWaveCyclicImpl * This = (IPortWaveCyclicImpl*)CONTAINING_RECORD(iface, IPortWaveCyclicImpl, lpVtblPortEvents);
|
||||
DPRINT1("IPortEvents_fnQueryInterface entered\n");
|
||||
DPRINT("IPortEvents_fnQueryInterface entered\n");
|
||||
return InterlockedIncrement(&This->ref);
|
||||
}
|
||||
|
||||
|
@ -126,7 +134,8 @@ IPortEvents_fnRelease(
|
|||
IPortEvents* iface)
|
||||
{
|
||||
IPortWaveCyclicImpl * This = (IPortWaveCyclicImpl*)CONTAINING_RECORD(iface, IPortWaveCyclicImpl, lpVtblPortEvents);
|
||||
DPRINT1("IPortEvents_fnRelease entered\n");
|
||||
|
||||
DPRINT("IPortEvents_fnRelease entered\n");
|
||||
InterlockedDecrement(&This->ref);
|
||||
|
||||
if (This->ref == 0)
|
||||
|
@ -145,7 +154,7 @@ IPortEvents_fnAddEventToEventList(
|
|||
IPortEvents* iface,
|
||||
IN PKSEVENT_ENTRY EventEntry)
|
||||
{
|
||||
DPRINT1("IPortEvents_fnAddEventToEventList stub\n");
|
||||
UNIMPLEMENTED
|
||||
}
|
||||
|
||||
|
||||
|
@ -161,7 +170,7 @@ IPortEvents_fnGenerateEventList(
|
|||
IN BOOL NodeEvent,
|
||||
IN ULONG NodeId)
|
||||
{
|
||||
DPRINT1("IPortEvents_fnGenerateEventList stub\n");
|
||||
UNIMPLEMENTED
|
||||
}
|
||||
|
||||
static IPortEventsVtbl vt_IPortEvents =
|
||||
|
@ -184,8 +193,9 @@ IPortWaveCyclic_fnQueryInterface(
|
|||
IN REFIID refiid,
|
||||
OUT PVOID* Output)
|
||||
{
|
||||
WCHAR Buffer[100];
|
||||
UNICODE_STRING GuidString;
|
||||
IPortWaveCyclicImpl * This = (IPortWaveCyclicImpl*)iface;
|
||||
|
||||
if (IsEqualGUIDAligned(refiid, &IID_IPortWaveCyclic) ||
|
||||
IsEqualGUIDAligned(refiid, &IID_IUnknown))
|
||||
{
|
||||
|
@ -215,9 +225,11 @@ IPortWaveCyclic_fnQueryInterface(
|
|||
return NewIDrmPort((PDRMPORT2*)Output);
|
||||
}
|
||||
|
||||
StringFromCLSID(refiid, Buffer);
|
||||
DPRINT1("IPortWaveCyclic_fnQueryInterface no interface!!! iface %S\n", Buffer);
|
||||
KeBugCheckEx(0, 0, 0, 0, 0);
|
||||
if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS)
|
||||
{
|
||||
DPRINT1("IPortWaveCyclic_fnQueryInterface no interface!!! iface %S\n", GuidString.Buffer);
|
||||
RtlFreeUnicodeString(&GuidString);
|
||||
}
|
||||
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
@ -301,7 +313,7 @@ IPortWaveCyclic_fnInit(
|
|||
PPOWERNOTIFY PowerNotify;
|
||||
IPortWaveCyclicImpl * This = (IPortWaveCyclicImpl*)iface;
|
||||
|
||||
DPRINT1("IPortWaveCyclic_Init entered %p\n", This);
|
||||
DPRINT("IPortWaveCyclic_Init entered %p\n", This);
|
||||
|
||||
if (This->bInitialized)
|
||||
{
|
||||
|
@ -389,7 +401,7 @@ IPortWaveCyclic_fnInit(
|
|||
ResourceList->lpVtbl->AddRef(ResourceList);
|
||||
|
||||
|
||||
DPRINT1("IPortWaveCyclic successfully initialized\n");
|
||||
DPRINT("IPortWaveCyclic successfully initialized\n");
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -573,7 +585,7 @@ ISubDevice_fnNewIrpTarget(
|
|||
IPortFilterWaveCyclic * Filter;
|
||||
IPortWaveCyclicImpl * This = (IPortWaveCyclicImpl*)CONTAINING_RECORD(iface, IPortWaveCyclicImpl, lpVtblSubDevice);
|
||||
|
||||
DPRINT1("ISubDevice_NewIrpTarget this %p\n", This);
|
||||
DPRINT("ISubDevice_NewIrpTarget this %p\n", This);
|
||||
|
||||
if (This->Filter)
|
||||
{
|
||||
|
@ -605,9 +617,9 @@ NTAPI
|
|||
ISubDevice_fnReleaseChildren(
|
||||
IN ISubdevice *iface)
|
||||
{
|
||||
IPortWaveCyclicImpl * This = (IPortWaveCyclicImpl*)CONTAINING_RECORD(iface, IPortWaveCyclicImpl, lpVtblSubDevice);
|
||||
//IPortWaveCyclicImpl * This = (IPortWaveCyclicImpl*)CONTAINING_RECORD(iface, IPortWaveCyclicImpl, lpVtblSubDevice);
|
||||
|
||||
DPRINT1("ISubDevice_ReleaseChildren this %p\n", This);
|
||||
UNIMPLEMENTED
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
|
@ -746,7 +758,7 @@ NewPortWaveCyclic(
|
|||
This->ref = 1;
|
||||
*OutPort = (PPORT)(&This->lpVtbl);
|
||||
|
||||
DPRINT1("NewPortWaveCyclic %p\n", *OutPort);
|
||||
DPRINT("NewPortWaveCyclic %p\n", *OutPort);
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Kernel Streaming
|
||||
* FILE: drivers/wdm/audio/backpln/portcls/port_wavepci.c
|
||||
* PURPOSE: Wave PCI Port driver
|
||||
* PROGRAMMER: Johannes Anderwald
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
|
||||
typedef struct
|
||||
|
@ -55,7 +63,7 @@ IPortEvents_fnQueryInterface(
|
|||
{
|
||||
IPortWavePciImpl * This = (IPortWavePciImpl*)CONTAINING_RECORD(iface, IPortWavePciImpl, lpVtblPortEvents);
|
||||
|
||||
DPRINT1("IPortEvents_fnQueryInterface entered\n");
|
||||
DPRINT("IPortEvents_fnQueryInterface entered\n");
|
||||
|
||||
if (IsEqualGUIDAligned(refiid, &IID_IPortEvents) ||
|
||||
IsEqualGUIDAligned(refiid, &IID_IUnknown))
|
||||
|
@ -74,7 +82,7 @@ IPortEvents_fnAddRef(
|
|||
IPortEvents* iface)
|
||||
{
|
||||
IPortWavePciImpl * This = (IPortWavePciImpl*)CONTAINING_RECORD(iface, IPortWavePciImpl, lpVtblPortEvents);
|
||||
DPRINT1("IPortEvents_fnAddRef entered\n");
|
||||
DPRINT("IPortEvents_fnAddRef entered\n");
|
||||
return InterlockedIncrement(&This->ref);
|
||||
}
|
||||
|
||||
|
@ -85,7 +93,7 @@ IPortEvents_fnRelease(
|
|||
IPortEvents* iface)
|
||||
{
|
||||
IPortWavePciImpl * This = (IPortWavePciImpl*)CONTAINING_RECORD(iface, IPortWavePciImpl, lpVtblPortEvents);
|
||||
DPRINT1("IPortEvents_fnRelease entered\n");
|
||||
DPRINT("IPortEvents_fnRelease entered\n");
|
||||
InterlockedDecrement(&This->ref);
|
||||
|
||||
if (This->ref == 0)
|
||||
|
@ -104,7 +112,7 @@ IPortEvents_fnAddEventToEventList(
|
|||
IPortEvents* iface,
|
||||
IN PKSEVENT_ENTRY EventEntry)
|
||||
{
|
||||
DPRINT1("IPortEvents_fnAddEventToEventList stub\n");
|
||||
UNIMPLEMENTED
|
||||
}
|
||||
|
||||
|
||||
|
@ -120,7 +128,7 @@ IPortEvents_fnGenerateEventList(
|
|||
IN BOOL NodeEvent,
|
||||
IN ULONG NodeId)
|
||||
{
|
||||
DPRINT1("IPortEvents_fnGenerateEventList stub\n");
|
||||
UNIMPLEMENTED
|
||||
}
|
||||
|
||||
static IPortEventsVtbl vt_IPortEvents =
|
||||
|
@ -146,7 +154,7 @@ IServiceSink_fnQueryInterface(
|
|||
{
|
||||
IPortWavePciImpl * This = (IPortWavePciImpl*)CONTAINING_RECORD(iface, IPortWavePciImpl, lpVtblServiceSink);
|
||||
|
||||
DPRINT1("IServiceSink_fnQueryInterface entered\n");
|
||||
DPRINT("IServiceSink_fnQueryInterface entered\n");
|
||||
|
||||
if (IsEqualGUIDAligned(refiid, &IID_IServiceSink) ||
|
||||
IsEqualGUIDAligned(refiid, &IID_IUnknown))
|
||||
|
@ -165,7 +173,7 @@ IServiceSink_fnAddRef(
|
|||
IServiceSink* iface)
|
||||
{
|
||||
IPortWavePciImpl * This = (IPortWavePciImpl*)CONTAINING_RECORD(iface, IPortWavePciImpl, lpVtblServiceSink);
|
||||
DPRINT1("IServiceSink_fnAddRef entered\n");
|
||||
DPRINT("IServiceSink_fnAddRef entered\n");
|
||||
return InterlockedIncrement(&This->ref);
|
||||
}
|
||||
|
||||
|
@ -176,7 +184,7 @@ IServiceSink_fnRelease(
|
|||
IServiceSink* iface)
|
||||
{
|
||||
IPortWavePciImpl * This = (IPortWavePciImpl*)CONTAINING_RECORD(iface, IPortWavePciImpl, lpVtblServiceSink);
|
||||
DPRINT1("IServiceSink_fnRelease entered\n");
|
||||
DPRINT("IServiceSink_fnRelease entered\n");
|
||||
InterlockedDecrement(&This->ref);
|
||||
|
||||
if (This->ref == 0)
|
||||
|
@ -195,7 +203,7 @@ IServiceSink_fnRequestService(
|
|||
IServiceSink* iface)
|
||||
{
|
||||
IPortWavePciImpl * This = (IPortWavePciImpl*)CONTAINING_RECORD(iface, IPortWavePciImpl, lpVtblServiceSink);
|
||||
DPRINT1("IServiceSink_fnRequestService entered\n");
|
||||
DPRINT("IServiceSink_fnRequestService entered\n");
|
||||
if (This->Miniport)
|
||||
{
|
||||
This->Miniport->lpVtbl->Service(This->Miniport);
|
||||
|
@ -222,10 +230,10 @@ IPortWavePci_fnQueryInterface(
|
|||
IN REFIID refiid,
|
||||
OUT PVOID* Output)
|
||||
{
|
||||
WCHAR Buffer[100];
|
||||
UNICODE_STRING GuidString;
|
||||
IPortWavePciImpl * This = (IPortWavePciImpl*)iface;
|
||||
|
||||
DPRINT1("IPortWavePci_fnQueryInterface entered\n");
|
||||
DPRINT("IPortWavePci_fnQueryInterface entered\n");
|
||||
|
||||
if (IsEqualGUIDAligned(refiid, &IID_IPortWavePci) ||
|
||||
IsEqualGUIDAligned(refiid, &IID_IUnknown))
|
||||
|
@ -257,9 +265,12 @@ IPortWavePci_fnQueryInterface(
|
|||
return NewPortClsVersion((PPORTCLSVERSION*)Output);
|
||||
}
|
||||
|
||||
StringFromCLSID(refiid, Buffer);
|
||||
DPRINT1("IPortWavePci_fnQueryInterface no interface!!! iface %S\n", Buffer);
|
||||
KeBugCheckEx(0, 0, 0, 0, 0);
|
||||
if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS)
|
||||
{
|
||||
DPRINT1("IPortWavePci_fnQueryInterface no interface!!! iface %S\n", GuidString.Buffer);
|
||||
RtlFreeUnicodeString(&GuidString);
|
||||
}
|
||||
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
|
@ -271,7 +282,7 @@ IPortWavePci_fnAddRef(
|
|||
{
|
||||
IPortWavePciImpl * This = (IPortWavePciImpl*)iface;
|
||||
|
||||
DPRINT1("IPortWavePci_fnAddRef entered\n");
|
||||
DPRINT("IPortWavePci_fnAddRef entered\n");
|
||||
|
||||
return InterlockedIncrement(&This->ref);
|
||||
}
|
||||
|
@ -284,7 +295,7 @@ IPortWavePci_fnRelease(
|
|||
{
|
||||
IPortWavePciImpl * This = (IPortWavePciImpl*)iface;
|
||||
|
||||
DPRINT1("IPortWavePci_fnRelease entered\n");
|
||||
DPRINT("IPortWavePci_fnRelease entered\n");
|
||||
|
||||
InterlockedDecrement(&This->ref);
|
||||
|
||||
|
@ -305,12 +316,12 @@ ServiceNotifyRoutine(
|
|||
IN PVOID SystemArgument1,
|
||||
IN PVOID SystemArgument2)
|
||||
{
|
||||
DPRINT1("ServiceNotifyRoutine entered %p %p %p\n", DeferredContext, SystemArgument1, SystemArgument2);
|
||||
DPRINT("ServiceNotifyRoutine entered %p %p %p\n", DeferredContext, SystemArgument1, SystemArgument2);
|
||||
|
||||
IPortWavePciImpl * This = (IPortWavePciImpl*)DeferredContext;
|
||||
if (This->ServiceGroup && This->bInitialized)
|
||||
{
|
||||
DPRINT1("ServiceGroup %p\n", This->ServiceGroup);
|
||||
DPRINT("ServiceGroup %p\n", This->ServiceGroup);
|
||||
This->ServiceGroup->lpVtbl->RequestService(This->ServiceGroup);
|
||||
}
|
||||
}
|
||||
|
@ -334,7 +345,7 @@ IPortWavePci_fnInit(
|
|||
PPOWERNOTIFY PowerNotify;
|
||||
IPortWavePciImpl * This = (IPortWavePciImpl*)iface;
|
||||
|
||||
DPRINT1("IPortWavePci_fnInit entered with This %p, DeviceObject %p Irp %p UnknownMiniport %p, UnknownAdapter %p ResourceList %p\n",
|
||||
DPRINT("IPortWavePci_fnInit entered with This %p, DeviceObject %p Irp %p UnknownMiniport %p, UnknownAdapter %p ResourceList %p\n",
|
||||
This, DeviceObject, Irp, UnknownMiniport, UnknownAdapter, ResourceList);
|
||||
|
||||
if (This->bInitialized)
|
||||
|
@ -458,7 +469,7 @@ IPortWavePci_fnNewRegistryKey(
|
|||
{
|
||||
IPortWavePciImpl * This = (IPortWavePciImpl*)iface;
|
||||
|
||||
DPRINT1("IPortWavePci_fnNewRegistryKey entered\n");
|
||||
DPRINT("IPortWavePci_fnNewRegistryKey entered\n");
|
||||
|
||||
if (!This->bInitialized)
|
||||
{
|
||||
|
@ -488,7 +499,7 @@ IPortWavePci_fnGetDeviceProperty(
|
|||
{
|
||||
IPortWavePciImpl * This = (IPortWavePciImpl*)iface;
|
||||
|
||||
DPRINT1("IPortWavePci_fnGetDeviceProperty entered\n");
|
||||
DPRINT("IPortWavePci_fnGetDeviceProperty entered\n");
|
||||
|
||||
if (!This->bInitialized)
|
||||
{
|
||||
|
@ -520,7 +531,7 @@ IPortWavePci_fnNewMasterDmaChannel(
|
|||
DEVICE_DESCRIPTION DeviceDescription;
|
||||
IPortWavePciImpl * This = (IPortWavePciImpl*)iface;
|
||||
|
||||
DPRINT1("IPortWavePci_fnNewMasterDmaChannel This %p entered\n", This);
|
||||
DPRINT("IPortWavePci_fnNewMasterDmaChannel This %p entered\n", This);
|
||||
|
||||
Status = PcDmaMasterDescription(ResourceList, ScatterGather, Dma32BitAddresses, IgnoreCount, Dma64BitAddresses, DmaWidth, DmaSpeed, MaximumLength, DmaPort, &DeviceDescription);
|
||||
if (NT_SUCCESS(Status))
|
||||
|
@ -617,9 +628,9 @@ ISubDevice_fnNewIrpTarget(
|
|||
IN PIRP Irp,
|
||||
IN KSOBJECT_CREATE *CreateObject)
|
||||
{
|
||||
IPortWavePciImpl * This = (IPortWavePciImpl*)CONTAINING_RECORD(iface, IPortWavePciImpl, lpVtblSubDevice);
|
||||
//IPortWavePciImpl * This = (IPortWavePciImpl*)CONTAINING_RECORD(iface, IPortWavePciImpl, lpVtblSubDevice);
|
||||
|
||||
DPRINT1("ISubDevice_NewIrpTarget this %p\n", This);
|
||||
UNIMPLEMENTED
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
|
@ -629,9 +640,9 @@ NTAPI
|
|||
ISubDevice_fnReleaseChildren(
|
||||
IN ISubdevice *iface)
|
||||
{
|
||||
IPortWavePciImpl * This = (IPortWavePciImpl*)CONTAINING_RECORD(iface, IPortWavePciImpl, lpVtblSubDevice);
|
||||
//IPortWavePciImpl * This = (IPortWavePciImpl*)CONTAINING_RECORD(iface, IPortWavePciImpl, lpVtblSubDevice);
|
||||
|
||||
DPRINT1("ISubDevice_ReleaseChildren this %p\n", This);
|
||||
UNIMPLEMENTED
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
|
@ -746,6 +757,6 @@ NewPortWavePci(
|
|||
This->ref = 1;
|
||||
|
||||
*OutPort = (PPORT)&This->lpVtbl;
|
||||
DPRINT1("NewPortWavePci %p\n", *OutPort);
|
||||
DPRINT("NewPortWavePci %p\n", *OutPort);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Kernel Streaming
|
||||
* FILE: drivers/wdm/audio/backpln/portcls/port_wavepcistream.c
|
||||
* PURPOSE: Wave PCI Stream object
|
||||
* PROGRAMMER: Johannes Anderwald
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
|
||||
typedef struct
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
<file>irpstream.c</file>
|
||||
<file>interrupt.c</file>
|
||||
<file>drm.c</file>
|
||||
<file>stubs.c</file>
|
||||
<file>undoc.c</file>
|
||||
<file>resource.c</file>
|
||||
<file>registry.c</file>
|
||||
|
|
|
@ -1,7 +1,13 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Kernel Streaming
|
||||
* FILE: drivers/wdm/audio/backpln/portcls/power.c
|
||||
* PURPOSE: Power support functions
|
||||
* PROGRAMMER: Johannes Anderwald
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
|
@ -17,7 +23,7 @@ PcRegisterAdapterPowerManagement(
|
|||
PPCLASS_DEVICE_EXTENSION DeviceExt;
|
||||
IAdapterPowerManagement * pPower;
|
||||
|
||||
DPRINT1("PcRegisterAdapterPowerManagement pUnknown %p pvContext %p\n", pUnknown, pvContext);
|
||||
DPRINT("PcRegisterAdapterPowerManagement pUnknown %p pvContext %p\n", pUnknown, pvContext);
|
||||
|
||||
if (!pUnknown || !pvContext)
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
|
@ -35,7 +41,7 @@ PcRegisterAdapterPowerManagement(
|
|||
}
|
||||
|
||||
DeviceExt->AdapterPowerManagement = pPower;
|
||||
DPRINT1("PcRegisterAdapterPowerManagement success %x\n", Status);
|
||||
DPRINT("PcRegisterAdapterPowerManagement success %x\n", Status);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -109,10 +109,6 @@ FreeItem(
|
|||
IN PVOID Item,
|
||||
IN ULONG Tag);
|
||||
|
||||
NTSTATUS StringFromCLSID(
|
||||
const CLSID *id,
|
||||
LPWSTR idstr);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
NewIrpQueue(
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Kernel Streaming
|
||||
* FILE: drivers/wdm/audio/backpln/portcls/propertyhandler.c
|
||||
* PURPOSE: Pin property handler
|
||||
* PROGRAMMER: Johannes Anderwald
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
|
||||
NTSTATUS
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Kernel Streaming
|
||||
* FILE: drivers/wdm/audio/backpln/portcls/registry.c
|
||||
* PURPOSE: Registry access object
|
||||
* PROGRAMMER: Johannes Anderwald
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
|
||||
typedef struct
|
||||
|
@ -193,7 +201,7 @@ IRegistryKey_fnQueryValueKey(
|
|||
OUT PULONG ResultLength)
|
||||
{
|
||||
IRegistryKeyImpl * This = (IRegistryKeyImpl*)iface;
|
||||
DPRINT1("IRegistryKey_fnQueryValueKey entered %p value %wZ\n", This, ValueName);
|
||||
DPRINT("IRegistryKey_fnQueryValueKey entered %p value %wZ\n", This, ValueName);
|
||||
return ZwQueryValueKey(This->hKey, ValueName, KeyValueInformationClass, KeyValueInformation, Length, ResultLength);
|
||||
}
|
||||
|
||||
|
@ -208,7 +216,7 @@ IRegistryKey_fnSetValueKey(
|
|||
)
|
||||
{
|
||||
IRegistryKeyImpl * This = (IRegistryKeyImpl*)iface;
|
||||
DPRINT1("IRegistryKey_fnSetValueKey entered %S\n", ValueName->Buffer);
|
||||
DPRINT("IRegistryKey_fnSetValueKey entered %S\n", ValueName->Buffer);
|
||||
return ZwSetValueKey(This->hKey, ValueName, 0, Type, Data, DataSize);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS
|
||||
* FILE: drivers/multimedia/portcls/helpers/ResourceList.c
|
||||
* FILE: drivers/wdm/audio/backpln/portcls/resource.c
|
||||
* PURPOSE: Port Class driver / ResourceList implementation
|
||||
* PROGRAMMER: Andrew Greenwood
|
||||
*
|
||||
* Johannes Anderwald
|
||||
* HISTORY:
|
||||
* 27 Jan 07 Created
|
||||
*/
|
||||
|
@ -24,8 +24,6 @@ typedef struct CResourceList
|
|||
PCM_RESOURCE_LIST UntranslatedResourceList;
|
||||
} IResourceListImpl;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Basic IUnknown methods
|
||||
*/
|
||||
|
@ -37,7 +35,7 @@ IResourceList_fnQueryInterface(
|
|||
IN REFIID refiid,
|
||||
OUT PVOID* Output)
|
||||
{
|
||||
WCHAR Buffer[100];
|
||||
UNICODE_STRING GuidString;
|
||||
|
||||
IResourceListImpl * This = (IResourceListImpl*)iface;
|
||||
if (IsEqualGUIDAligned(refiid, &IID_IResourceList) ||
|
||||
|
@ -47,16 +45,12 @@ IResourceList_fnQueryInterface(
|
|||
InterlockedIncrement(&This->ref);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
#if 0
|
||||
else if (IsEqualGUIDAligned(refiid, &IID_IDrmPort) ||
|
||||
IsEqualGUIDAligned(refiid, &IID_IDrmPort2))
|
||||
|
||||
if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS)
|
||||
{
|
||||
return NewIDrmPort((PDRMPORT2*)Output);
|
||||
DPRINT1("IResourceList_QueryInterface no interface!!! iface %S\n", GuidString.Buffer);
|
||||
RtlFreeUnicodeString(&GuidString);
|
||||
}
|
||||
#endif
|
||||
StringFromCLSID(refiid, Buffer);
|
||||
DPRINT1("IResourceList_fnQueryInterface no interface!!! iface %S\n", Buffer);
|
||||
KeBugCheckEx(0, 0, 0, 0, 0);
|
||||
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
@ -122,7 +116,7 @@ IResourceList_fnNumberOfEntriesOfType(
|
|||
for (Index = 0; Index < This->TranslatedResourceList->List[0].PartialResourceList.Count; Index ++ )
|
||||
{
|
||||
PartialDescriptor = &This->TranslatedResourceList->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! */
|
||||
|
@ -345,7 +339,7 @@ PcNewResourceList(
|
|||
|
||||
/* TODO: Validate parameters */
|
||||
|
||||
DPRINT1("PcNewResourceList\n");
|
||||
DPRINT("PcNewResourceList\n");
|
||||
|
||||
NewList = AllocateItem(PoolType, sizeof(IResourceListImpl), TAG_PORTCLASS);
|
||||
|
||||
|
@ -411,7 +405,7 @@ PcNewResourceSublist(
|
|||
|
||||
Parent = (IResourceListImpl*)ParentList;
|
||||
|
||||
DPRINT1("PcNewResourceSublist entered\n");
|
||||
DPRINT("PcNewResourceSublist entered\n");
|
||||
|
||||
if (!Parent->TranslatedResourceList->List->PartialResourceList.Count ||
|
||||
!Parent->UntranslatedResourceList->List->PartialResourceList.Count)
|
||||
|
@ -453,6 +447,6 @@ PcNewResourceSublist(
|
|||
|
||||
*OutResourceList = (IResourceList*)&NewList->lpVtbl;
|
||||
|
||||
DPRINT1("PcNewResourceSublist OutResourceList %p OuterUnknown %p ParentList %p\n", *OutResourceList, OuterUnknown, ParentList);
|
||||
DPRINT("PcNewResourceSublist OutResourceList %p OuterUnknown %p ParentList %p\n", *OutResourceList, OuterUnknown, ParentList);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Kernel Streaming
|
||||
* FILE: drivers/wdm/audio/backpln/portcls/service_group.c
|
||||
* PURPOSE: ServiceGroup object implementation
|
||||
* PROGRAMMER: Johannes Anderwald
|
||||
*/
|
||||
|
||||
|
||||
#include "private.h"
|
||||
|
||||
typedef struct
|
||||
|
@ -35,8 +44,9 @@ IServiceGroup_fnQueryInterface(
|
|||
IN REFIID refiid,
|
||||
OUT PVOID* Output)
|
||||
{
|
||||
WCHAR Buffer[100];
|
||||
UNICODE_STRING GuidString;
|
||||
IServiceGroupImpl * This = (IServiceGroupImpl*)iface;
|
||||
|
||||
if (IsEqualGUIDAligned(refiid, &IID_IServiceGroup) ||
|
||||
IsEqualGUIDAligned(refiid, &IID_IServiceSink) ||
|
||||
IsEqualGUIDAligned(refiid, &IID_IUnknown))
|
||||
|
@ -46,8 +56,11 @@ IServiceGroup_fnQueryInterface(
|
|||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
StringFromCLSID(refiid, Buffer);
|
||||
DPRINT1("IPortWaveCyclic_fnQueryInterface no interface!!! iface %S\n", Buffer);
|
||||
if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS)
|
||||
{
|
||||
DPRINT1("IServiceGroup_fnQueryInterface no interface!!! iface %S\n", GuidString.Buffer);
|
||||
RtlFreeUnicodeString(&GuidString);
|
||||
}
|
||||
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
@ -262,7 +275,7 @@ PcNewServiceGroup(
|
|||
{
|
||||
IServiceGroupImpl * This;
|
||||
|
||||
DPRINT1("PcNewServiceGroup entered\n");
|
||||
DPRINT("PcNewServiceGroup entered\n");
|
||||
|
||||
This = AllocateItem(NonPagedPool, sizeof(IServiceGroupImpl), TAG_PORTCLASS);
|
||||
if (!This)
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS
|
||||
* FILE: drivers/multimedia/portcls/stubs.c
|
||||
* PURPOSE: Port Class driver / Stubs
|
||||
* PROGRAMMER: Andrew Greenwood
|
||||
*
|
||||
* HISTORY:
|
||||
* 27 Jan 07 Created
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
#include <portcls.h>
|
||||
|
||||
/* ===============================================================
|
||||
Properties
|
||||
*/
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
NTSTATUS NTAPI
|
||||
PcCompletePendingPropertyRequest(
|
||||
IN PPCPROPERTY_REQUEST PropertyRequest,
|
||||
IN NTSTATUS NtStatus)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
|
@ -1,11 +1,22 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Kernel Streaming
|
||||
* FILE: drivers/wdm/audio/backpln/portcls/api.c
|
||||
* PURPOSE: Port api functions
|
||||
* PROGRAMMER: Johannes Anderwald
|
||||
*/
|
||||
|
||||
/*
|
||||
Undocumented PortCls exports
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
#include <portcls.h>
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
KsoDispatchCreateWithGenericFactory(
|
||||
LONG Unknown,
|
||||
PIRP Irp)
|
||||
|
@ -14,23 +25,42 @@ KsoDispatchCreateWithGenericFactory(
|
|||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
void
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
IIrpTarget *
|
||||
NTAPI
|
||||
KsoGetIrpTargetFromFileObject(
|
||||
LONG Unknown)
|
||||
PFILE_OBJECT FileObject)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return;
|
||||
ASSERT(FileObject);
|
||||
|
||||
/* IrpTarget is stored in FsContext2 */
|
||||
return FileObject->FsContext2;
|
||||
}
|
||||
|
||||
void
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
IIrpTarget *
|
||||
NTAPI
|
||||
KsoGetIrpTargetFromIrp(
|
||||
LONG Unknown)
|
||||
PIRP Irp)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return;
|
||||
PKSOBJECT_CREATE_ITEM CreateItem;
|
||||
|
||||
/* access the create item */
|
||||
CreateItem = KSCREATE_ITEM_IRP_STORAGE(Irp);
|
||||
|
||||
/* IIrpTarget is stored in Context member */
|
||||
return CreateItem->Context;
|
||||
}
|
||||
|
||||
void
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
VOID
|
||||
NTAPI
|
||||
PcAcquireFormatResources(
|
||||
LONG Unknown,
|
||||
LONG Unknown2,
|
||||
|
|
|
@ -18,8 +18,7 @@ Dispatch_fnDeviceIoControl(
|
|||
|
||||
IoStack = IoGetCurrentIrpStackLocation(Irp);
|
||||
|
||||
DPRINT1("Dispatch_fnDeviceIoControl Unhandeled %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode);
|
||||
DbgBreakPoint();
|
||||
UNIMPLEMENTED
|
||||
|
||||
Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
|
||||
Irp->IoStatus.Information = 0;
|
||||
|
@ -33,7 +32,7 @@ Dispatch_fnRead(
|
|||
PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp)
|
||||
{
|
||||
DPRINT1("Dispatch_fnRead called DeviceObject %p Irp %p\n", DeviceObject);
|
||||
UNIMPLEMENTED
|
||||
|
||||
Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
|
||||
Irp->IoStatus.Information = 0;
|
||||
|
@ -47,7 +46,7 @@ Dispatch_fnWrite(
|
|||
PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp)
|
||||
{
|
||||
DPRINT1("Dispatch_fnWrite called DeviceObject %p Irp %p\n", DeviceObject);
|
||||
UNIMPLEMENTED
|
||||
|
||||
Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
|
||||
Irp->IoStatus.Information = 0;
|
||||
|
@ -61,9 +60,7 @@ Dispatch_fnFlush(
|
|||
PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp)
|
||||
{
|
||||
DPRINT1("Dispatch_fnFlush called DeviceObject %p Irp %p\n", DeviceObject);
|
||||
//FIXME
|
||||
// cleanup resources
|
||||
UNIMPLEMENTED
|
||||
Irp->IoStatus.Status = STATUS_SUCCESS;
|
||||
Irp->IoStatus.Information = 0;
|
||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||
|
@ -76,10 +73,8 @@ Dispatch_fnClose(
|
|||
PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp)
|
||||
{
|
||||
DPRINT1("Dispatch_fnClose called DeviceObject %p Irp %p\n", DeviceObject);
|
||||
UNIMPLEMENTED
|
||||
|
||||
//FIXME
|
||||
// cleanup resources
|
||||
Irp->IoStatus.Status = STATUS_SUCCESS;
|
||||
Irp->IoStatus.Information = 0;
|
||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||
|
@ -92,7 +87,7 @@ Dispatch_fnQuerySecurity(
|
|||
PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp)
|
||||
{
|
||||
DPRINT1("Dispatch_fnQuerySecurity called DeviceObject %p Irp %p\n", DeviceObject);
|
||||
UNIMPLEMENTED
|
||||
|
||||
Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
|
||||
Irp->IoStatus.Information = 0;
|
||||
|
@ -107,7 +102,7 @@ Dispatch_fnSetSecurity(
|
|||
PIRP Irp)
|
||||
{
|
||||
|
||||
DPRINT1("Dispatch_fnSetSecurity called DeviceObject %p Irp %p\n", DeviceObject);
|
||||
UNIMPLEMENTED
|
||||
|
||||
Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
|
||||
Irp->IoStatus.Information = 0;
|
||||
|
@ -128,7 +123,7 @@ Dispatch_fnFastDeviceIoControl(
|
|||
PIO_STATUS_BLOCK IoStatus,
|
||||
PDEVICE_OBJECT DeviceObject)
|
||||
{
|
||||
DPRINT1("Dispatch_fnFastDeviceIoControl called DeviceObject %p Irp %p\n", DeviceObject);
|
||||
UNIMPLEMENTED
|
||||
|
||||
|
||||
return FALSE;
|
||||
|
@ -147,7 +142,7 @@ Dispatch_fnFastRead(
|
|||
PIO_STATUS_BLOCK IoStatus,
|
||||
PDEVICE_OBJECT DeviceObject)
|
||||
{
|
||||
DPRINT1("Dispatch_fnFastRead called DeviceObject %p Irp %p\n", DeviceObject);
|
||||
UNIMPLEMENTED
|
||||
|
||||
return FALSE;
|
||||
|
||||
|
@ -165,7 +160,7 @@ Dispatch_fnFastWrite(
|
|||
PIO_STATUS_BLOCK IoStatus,
|
||||
PDEVICE_OBJECT DeviceObject)
|
||||
{
|
||||
DPRINT1("Dispatch_fnFastWrite called DeviceObject %p Irp %p\n", DeviceObject);
|
||||
UNIMPLEMENTED
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -200,7 +195,7 @@ DispatchCreateKMix(
|
|||
IoStatus = IoGetCurrentIrpStackLocation(Irp);
|
||||
Buffer = IoStatus->FileObject->FileName.Buffer;
|
||||
|
||||
DPRINT1("DispatchCreateKMix entered\n");
|
||||
DPRINT("DispatchCreateKMix entered\n");
|
||||
|
||||
if (Buffer)
|
||||
{
|
||||
|
@ -219,7 +214,7 @@ DispatchCreateKMix(
|
|||
/* allocate object header */
|
||||
Status = KsAllocateObjectHeader(&ObjectHeader, 0, NULL, Irp, &DispatchTable);
|
||||
|
||||
DPRINT1("KsAllocateObjectHeader result %x\n", Status);
|
||||
DPRINT("KsAllocateObjectHeader result %x\n", Status);
|
||||
/* complete the irp */
|
||||
Irp->IoStatus.Information = 0;
|
||||
Irp->IoStatus.Status = Status;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <portcls.h>
|
||||
#include <ks.h>
|
||||
#include <ksmedia.h>
|
||||
#define YDEBUG
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
#include <samplerate.h>
|
||||
|
|
|
@ -210,7 +210,7 @@ Pin_fnRead(
|
|||
PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp)
|
||||
{
|
||||
DPRINT1("Pin_fnRead called DeviceObject %p Irp %p\n", DeviceObject);
|
||||
UNIMPLEMENTED
|
||||
|
||||
Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
|
||||
Irp->IoStatus.Information = 0;
|
||||
|
@ -218,29 +218,13 @@ Pin_fnRead(
|
|||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
PinWriteCompletionRoutine(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp,
|
||||
IN PVOID Context)
|
||||
{
|
||||
PIRP CIrp = (PIRP)Context;
|
||||
|
||||
CIrp->IoStatus.Status = STATUS_SUCCESS;
|
||||
CIrp->IoStatus.Information = 0;
|
||||
IoCompleteRequest(CIrp, IO_NO_INCREMENT);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
Pin_fnWrite(
|
||||
PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp)
|
||||
{
|
||||
DPRINT1("Pin_fnWrite called DeviceObject %p Irp %p\n", DeviceObject);
|
||||
|
||||
UNIMPLEMENTED
|
||||
|
||||
Irp->IoStatus.Information = 0;
|
||||
Irp->IoStatus.Status = STATUS_SUCCESS;
|
||||
|
@ -254,7 +238,7 @@ Pin_fnFlush(
|
|||
PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp)
|
||||
{
|
||||
DPRINT1("Pin_fnFlush called DeviceObject %p Irp %p\n", DeviceObject);
|
||||
UNIMPLEMENTED
|
||||
|
||||
Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
|
||||
Irp->IoStatus.Information = 0;
|
||||
|
@ -268,7 +252,7 @@ Pin_fnClose(
|
|||
PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp)
|
||||
{
|
||||
DPRINT1("Pin_fnClose called DeviceObject %p Irp %p\n", DeviceObject);
|
||||
UNIMPLEMENTED
|
||||
|
||||
Irp->IoStatus.Status = STATUS_SUCCESS;
|
||||
Irp->IoStatus.Information = 0;
|
||||
|
@ -282,7 +266,7 @@ Pin_fnQuerySecurity(
|
|||
PDEVICE_OBJECT DeviceObject,
|
||||
PIRP Irp)
|
||||
{
|
||||
DPRINT1("Pin_fnQuerySecurity called DeviceObject %p Irp %p\n", DeviceObject);
|
||||
UNIMPLEMENTED
|
||||
|
||||
Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
|
||||
Irp->IoStatus.Information = 0;
|
||||
|
@ -297,7 +281,7 @@ Pin_fnSetSecurity(
|
|||
PIRP Irp)
|
||||
{
|
||||
|
||||
DPRINT1("Pin_fnSetSecurity called DeviceObject %p Irp %p\n", DeviceObject);
|
||||
UNIMPLEMENTED
|
||||
|
||||
Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
|
||||
Irp->IoStatus.Information = 0;
|
||||
|
@ -318,7 +302,7 @@ Pin_fnFastDeviceIoControl(
|
|||
PIO_STATUS_BLOCK IoStatus,
|
||||
PDEVICE_OBJECT DeviceObject)
|
||||
{
|
||||
DPRINT1("Pin_fnFastDeviceIoControl called DeviceObject %p Irp %p\n", DeviceObject);
|
||||
UNIMPLEMENTED
|
||||
|
||||
|
||||
return FALSE;
|
||||
|
@ -337,8 +321,7 @@ Pin_fnFastRead(
|
|||
PIO_STATUS_BLOCK IoStatus,
|
||||
PDEVICE_OBJECT DeviceObject)
|
||||
{
|
||||
DPRINT1("Pin_fnFastRead called DeviceObject %p Irp %p\n", DeviceObject);
|
||||
|
||||
UNIMPLEMENTED
|
||||
return FALSE;
|
||||
|
||||
}
|
||||
|
@ -362,7 +345,7 @@ Pin_fnFastWrite(
|
|||
PKSDATAFORMAT_WAVEFORMATEX Formats;
|
||||
PKSDATAFORMAT_WAVEFORMATEX InputFormat, OutputFormat;
|
||||
|
||||
//DPRINT1("Pin_fnFastWrite called DeviceObject %p Irp %p\n", DeviceObject);
|
||||
DPRINT("Pin_fnFastWrite called DeviceObject %p Irp %p\n", DeviceObject);
|
||||
|
||||
Formats = (PKSDATAFORMAT_WAVEFORMATEX)FileObject->FsContext2;
|
||||
|
||||
|
@ -370,12 +353,12 @@ Pin_fnFastWrite(
|
|||
OutputFormat = (Formats + 1);
|
||||
StreamHeader = (PKSSTREAM_HEADER)Buffer;
|
||||
|
||||
#if 0
|
||||
DPRINT1("Num Channels %u Old Channels %u\n SampleRate %u Old SampleRate %u\n BitsPerSample %u Old BitsPerSample %u\n",
|
||||
|
||||
DPRINT("Num Channels %u Old Channels %u\n SampleRate %u Old SampleRate %u\n BitsPerSample %u Old BitsPerSample %u\n",
|
||||
InputFormat->WaveFormatEx.nChannels, OutputFormat->WaveFormatEx.nChannels,
|
||||
InputFormat->WaveFormatEx.nSamplesPerSec, OutputFormat->WaveFormatEx.nSamplesPerSec,
|
||||
InputFormat->WaveFormatEx.wBitsPerSample, OutputFormat->WaveFormatEx.wBitsPerSample);
|
||||
#endif
|
||||
|
||||
|
||||
if (InputFormat->WaveFormatEx.wBitsPerSample != OutputFormat->WaveFormatEx.wBitsPerSample)
|
||||
{
|
||||
|
|
|
@ -98,7 +98,7 @@ WdmAudPnp(
|
|||
{
|
||||
PIO_STACK_LOCATION IrpStack;
|
||||
|
||||
DPRINT1("WdmAudPnp called\n");
|
||||
DPRINT("WdmAudPnp called\n");
|
||||
|
||||
IrpStack = IoGetCurrentIrpStackLocation(Irp);
|
||||
|
||||
|
@ -124,7 +124,7 @@ WdmAudCreate(
|
|||
|
||||
PWDMAUD_DEVICE_EXTENSION DeviceExtension;
|
||||
|
||||
DPRINT1("WdmAudCreate\n");
|
||||
DPRINT("WdmAudCreate\n");
|
||||
|
||||
DeviceExtension = (PWDMAUD_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
||||
|
||||
|
@ -165,7 +165,7 @@ WdmAudClose(
|
|||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PIRP Irp)
|
||||
{
|
||||
DPRINT1("WdmAudClose\n");
|
||||
DPRINT("WdmAudClose\n");
|
||||
|
||||
#if KS_IMPLEMENTED
|
||||
Status = KsDereferenceSoftwareBusObject(DeviceExtension->DeviceHeader);
|
||||
|
@ -194,7 +194,7 @@ WdmAudCleanup(
|
|||
WDMAUD_CLIENT *pClient;
|
||||
ULONG Index;
|
||||
|
||||
DPRINT1("WdmAudCleanup\n");
|
||||
DPRINT("WdmAudCleanup\n");
|
||||
|
||||
IoStack = IoGetCurrentIrpStackLocation(Irp);
|
||||
|
||||
|
@ -224,7 +224,7 @@ WdmAudCleanup(
|
|||
Irp->IoStatus.Status = STATUS_SUCCESS;
|
||||
Irp->IoStatus.Information = 0;
|
||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||
DPRINT1("WdmAudCleanup complete\n");
|
||||
DPRINT("WdmAudCleanup complete\n");
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <ntddk.h>
|
||||
#include <portcls.h>
|
||||
#include <ks.h>
|
||||
#define YDEBUG
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
#include <ksmedia.h>
|
||||
#include <mmsystem.h>
|
||||
|
|
|
@ -6,14 +6,6 @@
|
|||
* PROGRAMMER: Johannes Anderwald
|
||||
*/
|
||||
|
||||
#include <ntifs.h>
|
||||
#include <ntddk.h>
|
||||
#include <portcls.h>
|
||||
#include <ks.h>
|
||||
#include <ksmedia.h>
|
||||
#include <math.h>
|
||||
#define YDEBUG
|
||||
#include <debug.h>
|
||||
#include "sysaudio.h"
|
||||
|
||||
const GUID KSPROPSETID_Sysaudio = {0xCBE3FAA0L, 0xCC75, 0x11D0, {0xB4, 0x65, 0x00, 0x00, 0x1A, 0x18, 0x18, 0xE6}};
|
||||
|
@ -230,7 +222,6 @@ CreatePinWorkerRoutine(
|
|||
SetIrpIoStatus(WorkerContext->Irp, STATUS_NO_MEMORY, 0);
|
||||
ExFreePool(WorkerContext->DispatchContext);
|
||||
ExFreePool(WorkerContext->MixerFormat);
|
||||
ExFreePool(WorkerContext);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -251,7 +242,6 @@ CreatePinWorkerRoutine(
|
|||
DPRINT1("Failed to create Mixer Pin with %x\n", Status);
|
||||
SetIrpIoStatus(WorkerContext->Irp, STATUS_UNSUCCESSFUL, 0);
|
||||
ExFreePool(WorkerContext->DispatchContext);
|
||||
ExFreePool(WorkerContext);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -268,7 +258,6 @@ CreatePinWorkerRoutine(
|
|||
DPRINT1("Failed to create Mixer Pin with %x\n", Status);
|
||||
SetIrpIoStatus(WorkerContext->Irp, STATUS_UNSUCCESSFUL, 0);
|
||||
ExFreePool(WorkerContext->DispatchContext);
|
||||
ExFreePool(WorkerContext);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -283,7 +272,7 @@ CreatePinWorkerRoutine(
|
|||
else
|
||||
Status = KsCreatePin(WorkerContext->Entry->Handle, WorkerContext->PinConnect, GENERIC_READ | GENERIC_WRITE, &RealPinHandle);
|
||||
|
||||
DPRINT1("Status %x\n", Status);
|
||||
DPRINT("Status %x\n", Status);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
PKSDATAFORMAT_WAVEFORMATEX RequestedFormat = (PKSDATAFORMAT_WAVEFORMATEX)(WorkerContext->PinConnect + 1);
|
||||
|
@ -295,7 +284,7 @@ CreatePinWorkerRoutine(
|
|||
/* The mixer pin format should have been accepted */
|
||||
ObDereferenceObject(WorkerContext->DispatchContext->MixerFileObject);
|
||||
ZwClose(WorkerContext->DispatchContext->hMixerPin);
|
||||
ASSERT(0);
|
||||
KeBugCheck(0);
|
||||
}
|
||||
|
||||
SetIrpIoStatus(WorkerContext->Irp, STATUS_UNSUCCESSFUL, 0);
|
||||
|
@ -314,7 +303,6 @@ CreatePinWorkerRoutine(
|
|||
DPRINT1("Failed to get file object with %x\n", Status);
|
||||
SetIrpIoStatus(WorkerContext->Irp, STATUS_UNSUCCESSFUL, 0);
|
||||
ExFreePool(WorkerContext->DispatchContext);
|
||||
ExFreePool(WorkerContext);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -346,7 +334,6 @@ CreatePinWorkerRoutine(
|
|||
DPRINT1("Failed to get file object with %x %p\n", Status, WorkerContext->Entry->Pins[WorkerContext->PinConnect->PinId].PinHandle);
|
||||
SetIrpIoStatus(WorkerContext->Irp, STATUS_UNSUCCESSFUL, 0);
|
||||
ExFreePool(WorkerContext->DispatchContext);
|
||||
ExFreePool(WorkerContext);
|
||||
return;
|
||||
}
|
||||
WorkerContext->DispatchContext->FileObject = FileObject;
|
||||
|
@ -369,7 +356,7 @@ CreatePinWorkerRoutine(
|
|||
|
||||
}
|
||||
|
||||
DPRINT("creating virtual pin\n");
|
||||
DPRINT1("creating virtual pin\n");
|
||||
/* now create the virtual audio pin which is exposed to wdmaud */
|
||||
Status = KsCreatePin(Filter, WorkerContext->PinConnect, GENERIC_READ | GENERIC_WRITE, &VirtualPinHandle);
|
||||
|
||||
|
@ -384,7 +371,6 @@ CreatePinWorkerRoutine(
|
|||
|
||||
SetIrpIoStatus(WorkerContext->Irp, STATUS_UNSUCCESSFUL, 0);
|
||||
ExFreePool(WorkerContext->DispatchContext);
|
||||
ExFreePool(WorkerContext);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -400,7 +386,6 @@ CreatePinWorkerRoutine(
|
|||
ZwClose(VirtualPinHandle);
|
||||
SetIrpIoStatus(WorkerContext->Irp, STATUS_UNSUCCESSFUL, 0);
|
||||
ExFreePool(WorkerContext->DispatchContext);
|
||||
ExFreePool(WorkerContext);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -463,7 +448,6 @@ CreatePinWorkerRoutine(
|
|||
*((PHANDLE)WorkerContext->Irp->UserBuffer) = VirtualPinHandle;
|
||||
|
||||
SetIrpIoStatus(WorkerContext->Irp, STATUS_SUCCESS, sizeof(HANDLE));
|
||||
ExFreePool(WorkerContext);
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
|
@ -651,6 +635,61 @@ ComputeCompatibleFormat(
|
|||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
GetPinInstanceCount(
|
||||
PKSAUDIO_DEVICE_ENTRY Entry,
|
||||
PKSPIN_CINSTANCES PinInstances,
|
||||
PKSPIN_CONNECT PinConnect)
|
||||
{
|
||||
KSP_PIN PinRequest;
|
||||
ULONG BytesReturned;
|
||||
|
||||
/* query the instance count */
|
||||
PinRequest.PinId = PinConnect->PinId;
|
||||
PinRequest.Property.Set = KSPROPSETID_Pin;
|
||||
PinRequest.Property.Flags = KSPROPERTY_TYPE_GET;
|
||||
PinRequest.Property.Id = KSPROPERTY_PIN_CINSTANCES;
|
||||
|
||||
return KsSynchronousIoControlDevice(Entry->FileObject, KernelMode, IOCTL_KS_PROPERTY, (PVOID)&PinRequest, sizeof(KSP_PIN), (PVOID)PinInstances, sizeof(KSPIN_CINSTANCES), &BytesReturned);
|
||||
|
||||
}
|
||||
|
||||
VOID
|
||||
CloseExistingPin(
|
||||
PSYSAUDIO_CLIENT ClientInfo,
|
||||
PSYSAUDIO_INSTANCE_INFO InstanceInfo,
|
||||
PKSPIN_CONNECT PinConnect)
|
||||
{
|
||||
ULONG Index, SubIndex;
|
||||
PDISPATCH_CONTEXT DispatchContext;
|
||||
|
||||
/* scan the clientinfo if the client has already opened device with the specified pin */
|
||||
for (Index = 0; Index < ClientInfo->NumDevices; Index++)
|
||||
{
|
||||
if (ClientInfo->Devs[Index].DeviceId == InstanceInfo->DeviceNumber)
|
||||
{
|
||||
if (ClientInfo->Devs[Index].ClientHandlesCount)
|
||||
{
|
||||
for(SubIndex = 0; SubIndex < ClientInfo->Devs[Index].ClientHandlesCount; SubIndex++)
|
||||
{
|
||||
if (ClientInfo->Devs[Index].ClientHandles[SubIndex].PinId == PinConnect->PinId)
|
||||
{
|
||||
/* the pin has been already opened by the client, re-use it */
|
||||
ASSERT(ClientInfo->Devs[Index].ClientHandles[SubIndex].bHandle == FALSE);
|
||||
|
||||
DispatchContext = ClientInfo->Devs[Index].ClientHandles[SubIndex].DispatchContext;
|
||||
ObDereferenceObject(DispatchContext->MixerFileObject);
|
||||
ObDereferenceObject(DispatchContext->FileObject);
|
||||
ZwClose(DispatchContext->hMixerPin);
|
||||
ZwClose(DispatchContext->Handle);
|
||||
ClientInfo->Devs[Index].ClientHandles[SubIndex].PinId = (ULONG)-1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
HandleSysAudioFilterPinCreation(
|
||||
|
@ -669,12 +708,9 @@ HandleSysAudioFilterPinCreation(
|
|||
KSP_PIN PinRequest;
|
||||
NTSTATUS Status;
|
||||
KSPIN_CINSTANCES PinInstances;
|
||||
PIO_WORKITEM WorkItem;
|
||||
PPIN_WORKER_CONTEXT WorkerContext;
|
||||
PDISPATCH_CONTEXT DispatchContext;
|
||||
ULONG Index, SubIndex;
|
||||
BOOL CreateMixerPin;
|
||||
ULONG DeviceId;
|
||||
PKSDATAFORMAT_WAVEFORMATEX MixerFormat = NULL, ClientFormat;
|
||||
|
||||
|
||||
|
@ -730,14 +766,11 @@ HandleSysAudioFilterPinCreation(
|
|||
return SetIrpIoStatus(Irp, STATUS_INVALID_PARAMETER, 0);
|
||||
}
|
||||
|
||||
Retry:
|
||||
/* get the instances count */
|
||||
PinRequest.PinId = PinConnect->PinId;
|
||||
PinRequest.Property.Set = KSPROPSETID_Pin;
|
||||
PinRequest.Property.Flags = KSPROPERTY_TYPE_GET;
|
||||
PinRequest.Property.Id = KSPROPERTY_PIN_CINSTANCES;
|
||||
/* close existing pin first */
|
||||
CloseExistingPin(ClientInfo, InstanceInfo, PinConnect);
|
||||
|
||||
Status = KsSynchronousIoControlDevice(Entry->FileObject, KernelMode, IOCTL_KS_PROPERTY, (PVOID)&PinRequest, sizeof(KSP_PIN), (PVOID)&PinInstances, sizeof(KSPIN_CINSTANCES), &BytesReturned);
|
||||
/* query instance count */
|
||||
Status = GetPinInstanceCount(Entry, &PinInstances, PinConnect);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT("Property Request KSPROPERTY_PIN_GLOBALCINSTANCES failed with %x\n", Status);
|
||||
|
@ -750,7 +783,6 @@ Retry:
|
|||
return SetIrpIoStatus(Irp, STATUS_UNSUCCESSFUL, 0);
|
||||
}
|
||||
|
||||
|
||||
/* check the format */
|
||||
PinRequest.PinId = PinConnect->PinId;
|
||||
PinRequest.Property.Set = KSPROPSETID_Pin;
|
||||
|
@ -788,38 +820,6 @@ Retry:
|
|||
CreateMixerPin = TRUE;
|
||||
}
|
||||
|
||||
DeviceId = (ULONG)-1;
|
||||
|
||||
/* scan the clientinfo if the client has already opened device with the specified pin */
|
||||
for (Index = 0; Index < ClientInfo->NumDevices; Index++)
|
||||
{
|
||||
if (ClientInfo->Devs[Index].DeviceId == InstanceInfo->DeviceNumber)
|
||||
{
|
||||
DeviceId = Index;
|
||||
if (ClientInfo->Devs[Index].ClientHandlesCount)
|
||||
{
|
||||
for(SubIndex = 0; SubIndex < ClientInfo->Devs[Index].ClientHandlesCount; SubIndex++)
|
||||
{
|
||||
if (ClientInfo->Devs[Index].ClientHandles[SubIndex].PinId == PinConnect->PinId)
|
||||
{
|
||||
/* the pin has been already opened by the client, re-use it */
|
||||
ASSERT(ClientInfo->Devs[Index].ClientHandles[SubIndex].bHandle == FALSE);
|
||||
|
||||
DispatchContext = ClientInfo->Devs[Index].ClientHandles[SubIndex].DispatchContext;
|
||||
ObDereferenceObject(DispatchContext->MixerFileObject);
|
||||
ObDereferenceObject(DispatchContext->FileObject);
|
||||
ZwClose(DispatchContext->hMixerPin);
|
||||
ZwClose(DispatchContext->Handle);
|
||||
ClientInfo->Devs[Index].ClientHandles[SubIndex].PinId = (ULONG)-1;
|
||||
goto Retry;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ASSERT(DeviceId != (ULONG)-1);
|
||||
|
||||
if (PinInstances.CurrentCount == PinInstances.PossibleCount)
|
||||
{
|
||||
/* pin already exists */
|
||||
|
@ -834,44 +834,31 @@ Retry:
|
|||
}
|
||||
}
|
||||
|
||||
WorkItem = IoAllocateWorkItem(DeviceObject);
|
||||
if (!WorkItem)
|
||||
{
|
||||
if (MixerFormat)
|
||||
ExFreePool(MixerFormat);
|
||||
Irp->IoStatus.Information = 0;
|
||||
Irp->IoStatus.Status = STATUS_INSUFFICIENT_RESOURCES;
|
||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||
return STATUS_INSUFFICIENT_RESOURCES;
|
||||
}
|
||||
|
||||
/* create worker context */
|
||||
WorkerContext = ExAllocatePool(NonPagedPool, sizeof(PIN_WORKER_CONTEXT));
|
||||
if (!WorkerContext)
|
||||
{
|
||||
/* invalid parameters */
|
||||
if (MixerFormat)
|
||||
ExFreePool(MixerFormat);
|
||||
IoFreeWorkItem(WorkItem);
|
||||
return SetIrpIoStatus(Irp, STATUS_NO_MEMORY, 0);
|
||||
}
|
||||
ASSERT(DeviceExtension->WorkItem);
|
||||
ASSERT(DeviceExtension->WorkerContext);
|
||||
|
||||
/* create worker context */
|
||||
DispatchContext = ExAllocatePool(NonPagedPool, sizeof(DISPATCH_CONTEXT));
|
||||
if (!DispatchContext)
|
||||
{
|
||||
/* invalid parameters */
|
||||
if (MixerFormat)
|
||||
{
|
||||
ExFreePool(MixerFormat);
|
||||
IoFreeWorkItem(WorkItem);
|
||||
ExFreePool(WorkerContext);
|
||||
}
|
||||
return SetIrpIoStatus(Irp, STATUS_NO_MEMORY, 0);
|
||||
}
|
||||
|
||||
// FIXME
|
||||
// mutal exclusion
|
||||
|
||||
/* get worker context */
|
||||
WorkerContext = (PPIN_WORKER_CONTEXT)DeviceExtension->WorkerContext;
|
||||
|
||||
/* prepare context */
|
||||
RtlZeroMemory(WorkerContext, sizeof(PIN_WORKER_CONTEXT));
|
||||
RtlZeroMemory(DispatchContext, sizeof(DISPATCH_CONTEXT));
|
||||
|
||||
DPRINT1("PinInstances.CurrentCount %u\n", PinInstances.CurrentCount);
|
||||
DPRINT("PinInstances.CurrentCount %u\n", PinInstances.CurrentCount);
|
||||
|
||||
if (PinInstances.CurrentCount < PinInstances.PossibleCount)
|
||||
{
|
||||
|
@ -893,7 +880,7 @@ Retry:
|
|||
IoMarkIrpPending(Irp);
|
||||
Irp->IoStatus.Status = STATUS_PENDING;
|
||||
Irp->IoStatus.Information = 0;
|
||||
IoQueueWorkItem(WorkItem, CreatePinWorkerRoutine, DelayedWorkQueue, (PVOID)WorkerContext);
|
||||
IoQueueWorkItem(DeviceExtension->WorkItem, CreatePinWorkerRoutine, DelayedWorkQueue, (PVOID)WorkerContext);
|
||||
|
||||
/* mark irp as pending */
|
||||
return STATUS_PENDING;
|
||||
|
@ -969,7 +956,7 @@ SysAudioHandleProperty(
|
|||
Status = KsSynchronousIoControlDevice(Entry->FileObject, KernelMode, IOCTL_KS_PROPERTY, (PVOID)&PropertyRequest, sizeof(KSPROPERTY), (PVOID)&ComponentId, sizeof(KSCOMPONENTID), &BytesReturned);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("KsSynchronousIoControlDevice failed with %x for KSPROPERTY_GENERAL_COMPONENTID\n", Status);
|
||||
DPRINT("KsSynchronousIoControlDevice failed with %x for KSPROPERTY_GENERAL_COMPONENTID\n", Status);
|
||||
return SetIrpIoStatus(Irp, Status, 0);
|
||||
}
|
||||
RtlMoveMemory(Irp->UserBuffer, &ComponentId, sizeof(KSCOMPONENTID));
|
||||
|
@ -1019,14 +1006,13 @@ SysAudioHandleProperty(
|
|||
else if (Property->Id == (ULONG)-1)
|
||||
{
|
||||
/* ros specific pin creation request */
|
||||
DPRINT1("Initiating create request\n");
|
||||
DPRINT("Initiating create request\n");
|
||||
return HandleSysAudioFilterPinCreation(Irp, Property, DeviceExtension, DeviceObject);
|
||||
}
|
||||
}
|
||||
|
||||
RtlStringFromGUID(&Property->Set, &GuidString);
|
||||
DPRINT1("Unhandeled property Set |%S| Id %u Flags %x\n", GuidString.Buffer, Property->Id, Property->Flags);
|
||||
DbgBreakPoint();
|
||||
RtlFreeUnicodeString(&GuidString);
|
||||
return SetIrpIoStatus(Irp, STATUS_UNSUCCESSFUL, 0);
|
||||
}
|
||||
|
|
|
@ -6,14 +6,6 @@
|
|||
* PROGRAMMER: Johannes Anderwald
|
||||
*/
|
||||
|
||||
#include <ntifs.h>
|
||||
#include <ntddk.h>
|
||||
#include <portcls.h>
|
||||
#include <ks.h>
|
||||
#include <ksmedia.h>
|
||||
#include <math.h>
|
||||
#define YDEBUG
|
||||
#include <debug.h>
|
||||
#include "sysaudio.h"
|
||||
|
||||
const GUID GUID_DEVICE_INTERFACE_ARRIVAL = {0xCB3A4004L, 0x46F0, 0x11D0, {0xB0, 0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F}};
|
||||
|
@ -38,7 +30,7 @@ FilterPinWorkerRoutine(
|
|||
PKSAUDIO_DEVICE_ENTRY DeviceEntry = (PKSAUDIO_DEVICE_ENTRY)Context;
|
||||
|
||||
|
||||
DPRINT1("Querying filter...\n");
|
||||
DPRINT("Querying filter...\n");
|
||||
|
||||
PropertyRequest.Set = KSPROPSETID_Pin;
|
||||
PropertyRequest.Flags = KSPROPERTY_TYPE_GET;
|
||||
|
|
|
@ -6,14 +6,6 @@
|
|||
* PROGRAMMER: Johannes Anderwald
|
||||
*/
|
||||
|
||||
#include <ntifs.h>
|
||||
#include <ntddk.h>
|
||||
#include <portcls.h>
|
||||
#include <ks.h>
|
||||
#include <ksmedia.h>
|
||||
#include <math.h>
|
||||
#define YDEBUG
|
||||
#include <debug.h>
|
||||
#include "sysaudio.h"
|
||||
|
||||
NTSTATUS
|
||||
|
@ -95,10 +87,10 @@ Dispatch_fnClose(
|
|||
DeviceExtension = (PSYSAUDIODEVEXT)DeviceObject->DeviceExtension;
|
||||
|
||||
|
||||
DPRINT1("Client %p NumDevices %u\n", Client, Client->NumDevices);
|
||||
DPRINT("Client %p NumDevices %u\n", Client, Client->NumDevices);
|
||||
for(Index = 0; Index < Client->NumDevices; Index++)
|
||||
{
|
||||
DPRINT1("Index %u Device %u Handels Count %u\n", Index, Client->Devs[Index].DeviceId, Client->Devs[Index].ClientHandlesCount);
|
||||
DPRINT("Index %u Device %u Handels Count %u\n", Index, Client->Devs[Index].DeviceId, Client->Devs[Index].ClientHandlesCount);
|
||||
if (Client->Devs[Index].ClientHandlesCount)
|
||||
{
|
||||
Entry = GetListEntry(&DeviceExtension->KsAudioDeviceList, Client->Devs[Index].DeviceId);
|
||||
|
@ -111,7 +103,7 @@ Dispatch_fnClose(
|
|||
|
||||
if (Client->Devs[Index].ClientHandles[SubIndex].bHandle)
|
||||
{
|
||||
DPRINT1("Closing handle %p\n", Client->Devs[Index].ClientHandles[SubIndex].hPin);
|
||||
DPRINT("Closing handle %p\n", Client->Devs[Index].ClientHandles[SubIndex].hPin);
|
||||
|
||||
ZwClose(Client->Devs[Index].ClientHandles[SubIndex].hPin);
|
||||
Entry->Pins[Client->Devs[Index].ClientHandles[SubIndex].PinId].References--;
|
||||
|
@ -132,7 +124,7 @@ Dispatch_fnClose(
|
|||
//DPRINT1("Index %u DeviceIndex %u Pin %u References %u\n", Index, Client->Devs[Index].DeviceId, SubIndex, Entry->Pins[Client->Devs[Index].ClientHandles[SubIndex].PinId].References);
|
||||
if (!Entry->Pins[Client->Devs[Index].ClientHandles[SubIndex].PinId].References)
|
||||
{
|
||||
DPRINT1("Closing pin %p\n", Entry->Pins[Client->Devs[Index].ClientHandles[SubIndex].PinId].PinHandle);
|
||||
DPRINT("Closing pin %p\n", Entry->Pins[Client->Devs[Index].ClientHandles[SubIndex].PinId].PinHandle);
|
||||
|
||||
ZwClose(Entry->Pins[Client->Devs[Index].ClientHandles[SubIndex].PinId].PinHandle);
|
||||
Entry->Pins[Client->Devs[Index].ClientHandles[SubIndex].PinId].PinHandle = NULL;
|
||||
|
@ -148,8 +140,6 @@ Dispatch_fnClose(
|
|||
|
||||
ExFreePool(Client);
|
||||
|
||||
//FIXME
|
||||
// cleanup resources
|
||||
Irp->IoStatus.Status = STATUS_SUCCESS;
|
||||
Irp->IoStatus.Information = 0;
|
||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||
|
@ -274,7 +264,7 @@ DispatchCreateSysAudio(
|
|||
IoStatus = IoGetCurrentIrpStackLocation(Irp);
|
||||
Buffer = IoStatus->FileObject->FileName.Buffer;
|
||||
|
||||
DPRINT1("DispatchCreateSysAudio entered\n");
|
||||
DPRINT("DispatchCreateSysAudio entered\n");
|
||||
|
||||
if (Buffer)
|
||||
{
|
||||
|
|
|
@ -9,15 +9,6 @@
|
|||
* 8 Jul 07 Started basic implementation
|
||||
*/
|
||||
|
||||
#include <ntifs.h>
|
||||
#include <ntddk.h>
|
||||
#include <portcls.h>
|
||||
#include <ks.h>
|
||||
#include <ksmedia.h>
|
||||
#include <math.h>
|
||||
#define YDEBUG
|
||||
#include <debug.h>
|
||||
//#include <dxsdk/mediaobj.h>
|
||||
#include "sysaudio.h"
|
||||
|
||||
|
||||
|
@ -149,6 +140,23 @@ SysAudio_InstallDevice(
|
|||
goto cleanup;
|
||||
}
|
||||
|
||||
/* allocate work item */
|
||||
DeviceExtension->WorkItem = IoAllocateWorkItem(DeviceObject);
|
||||
if (!DeviceExtension->WorkItem)
|
||||
{
|
||||
DPRINT1("Failed to allocate work item\n");
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* allocate work item context */
|
||||
DeviceExtension->WorkerContext = ExAllocatePool(NonPagedPool, sizeof(PIN_WORKER_CONTEXT));
|
||||
if (!DeviceExtension->WorkerContext)
|
||||
{
|
||||
DPRINT1("Failed to allocate work item context\n");
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
||||
/* Load kmixer */
|
||||
Status = SysAudioOpenKMixer(DeviceExtension);
|
||||
if (!NT_SUCCESS(Status))
|
||||
|
|
|
@ -6,14 +6,6 @@
|
|||
* PROGRAMMER: Johannes Anderwald
|
||||
*/
|
||||
|
||||
#include <ntifs.h>
|
||||
#include <ntddk.h>
|
||||
#include <portcls.h>
|
||||
#include <ks.h>
|
||||
#include <ksmedia.h>
|
||||
#include <math.h>
|
||||
#define YDEBUG
|
||||
#include <debug.h>
|
||||
#include "sysaudio.h"
|
||||
|
||||
NTSTATUS
|
||||
|
@ -308,7 +300,6 @@ Pin_fnFastWrite(
|
|||
|
||||
Context = (PDISPATCH_CONTEXT)FileObject->FsContext2;
|
||||
|
||||
#if 1
|
||||
if (Context->hMixerPin && Context->MixerFileObject)
|
||||
{
|
||||
Status = KsStreamIo(Context->MixerFileObject, NULL, NULL, NULL, NULL, 0, IoStatus, Buffer, Length, KSSTREAM_WRITE, KernelMode);
|
||||
|
@ -318,7 +309,7 @@ Pin_fnFastWrite(
|
|||
return FALSE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Status = KsStreamIo(Context->FileObject, NULL, NULL, NULL, NULL, 0, IoStatus, Buffer, Length, KSSTREAM_WRITE, KernelMode);
|
||||
if (Status == STATUS_SUCCESS)
|
||||
return TRUE;
|
||||
|
|
|
@ -1,6 +1,15 @@
|
|||
#ifndef SYSAUDIO_H__
|
||||
#define SYSAUDIO_H__
|
||||
|
||||
#include <ntifs.h>
|
||||
#include <ntddk.h>
|
||||
#include <portcls.h>
|
||||
#include <ks.h>
|
||||
#include <ksmedia.h>
|
||||
#include <math.h>
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
typedef struct
|
||||
{
|
||||
BOOL bHandle; // indicates if an audio pin can be instantated more than once
|
||||
|
@ -66,6 +75,9 @@ typedef struct
|
|||
PFILE_OBJECT KMixerFileObject; // mixer file object
|
||||
HANDLE KMixerHandle; // mixer file handle
|
||||
|
||||
PIO_WORKITEM WorkItem; // work item for pin creation
|
||||
PVOID WorkerContext; // work item context
|
||||
|
||||
}SYSAUDIODEVEXT, *PSYSAUDIODEVEXT;
|
||||
|
||||
// struct DISPATCH_CONTEXT
|
||||
|
|
Loading…
Reference in a new issue