Author: janderwald Date: Fri Apr 24 00:33:27 2009 New Revision: 40674
URL: http://svn.reactos.org/svn/reactos?rev=40674&view=rev Log: - Remove unused file - Fix Es1370mp / Es1371mp driver installation. However, no sound yet. Needs more investigation
Removed: trunk/reactos/drivers/wdm/audio/backpln/portcls/PortWavePci.cpp Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/dma_slave.c trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.h
Removed: trunk/reactos/drivers/wdm/audio/backpln/portcls/PortWavePci.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/p... ============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/PortWavePci.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/PortWavePci.cpp (removed) @@ -1,31 +1,0 @@ -/* - ReactOS Operating System - Port Class API / IPort Implementation - - by Andrew Greenwood -*/ - -#include "private.h" - -NTSTATUS -IPortWavePci::NewMasterDmaChannel( - OUT PDMACHANNEL* DmaChannel, - IN PUNKNOWN OuterUnknown, - IN POOL_TYPE PoolType, - IN PRESOURCELIST ResourceList OPTIONAL, - IN BOOL ScatterGather, - IN BOOL Dma32BitAddresses, - IN BOOL Dma64BitAddresses, - IN DMA_WIDTH DmaWidth, - IN DMA_SPEED DmaSpeed, - IN ULONG MaximumLength, - IN ULONG DmaPort) -{ - return STATUS_UNSUCCESSFUL; -} - -VOID -IPortWavePci::Notify( - IN PSERVICEGROUP ServiceGroup) -{ -}
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/dma_slave.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/p... ============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/dma_slave.c [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/dma_slave.c [iso-8859-1] Fri Apr 24 00:33:27 2009 @@ -1,7 +1,7 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS Kernel Streaming - * FILE: drivers/wdm/audio/backpln/portcls/dma_slave.c + * FILE: drivers/wdm/audio/backpln/portcls/dma_Init.c * PURPOSE: portcls dma support object * PROGRAMMER: Johannes Anderwald */ @@ -11,7 +11,7 @@
typedef struct { - IDmaChannelSlaveVtbl *lpVtbl; + IDmaChannelInitVtbl *lpVtbl;
LONG ref;
@@ -36,10 +36,7 @@ PMDL Mdl; BOOLEAN WriteToDevice;
-}IDmaChannelSlaveImpl; - -const GUID IID_IDmaChannel; - +}IDmaChannelInitImpl;
//--------------------------------------------------------------- // IUnknown methods @@ -48,12 +45,12 @@
NTSTATUS NTAPI -IDmaChannelSlave_fnQueryInterface( - IDmaChannelSlave * iface, +IDmaChannelInit_fnQueryInterface( + IDmaChannelInit * iface, IN REFIID refiid, OUT PVOID* Output) { - IDmaChannelSlaveImpl * This = (IDmaChannelSlaveImpl*)iface; + IDmaChannelInitImpl * This = (IDmaChannelInitImpl*)iface;
if (IsEqualGUIDAligned(refiid, &IID_IUnknown) || IsEqualGUIDAligned(refiid, &IID_IDmaChannel) || @@ -63,32 +60,32 @@ InterlockedIncrement(&This->ref); return STATUS_SUCCESS; } - + DPRINT1("No interface!!!\n"); return STATUS_UNSUCCESSFUL; }
ULONG -STDMETHODCALLTYPE -IDmaChannelSlave_fnAddRef( - IDmaChannelSlave * iface) -{ - IDmaChannelSlaveImpl * This = (IDmaChannelSlaveImpl*)iface; - - DPRINT("IDmaChannelSlave_AddRef: This %p\n", This); +NTAPI +IDmaChannelInit_fnAddRef( + IDmaChannelInit * iface) +{ + IDmaChannelInitImpl * This = (IDmaChannelInitImpl*)iface; + + DPRINT("IDmaChannelInit_AddRef: This %p\n", This);
return InterlockedIncrement(&This->ref); }
ULONG -STDMETHODCALLTYPE -IDmaChannelSlave_fnRelease( - IDmaChannelSlave* iface) -{ - IDmaChannelSlaveImpl * This = (IDmaChannelSlaveImpl*)iface; +NTAPI +IDmaChannelInit_fnRelease( + IDmaChannelInit* iface) +{ + IDmaChannelInitImpl * This = (IDmaChannelInitImpl*)iface;
InterlockedDecrement(&This->ref);
- DPRINT("IDmaChannelSlave_Release: This %p new ref %u\n", This, This->ref); + DPRINT("IDmaChannelInit_Release: This %p new ref %u\n", This, This->ref);
if (This->ref == 0) { @@ -104,91 +101,94 @@ // IDmaChannel methods //
- NTSTATUS NTAPI -IDmaChannelSlave_fnAllocateBuffer( - IN IDmaChannelSlave * iface, +IDmaChannelInit_fnAllocateBuffer( + IN IDmaChannelInit * iface, IN ULONG BufferSize, IN PPHYSICAL_ADDRESS PhysicalAddressConstraint OPTIONAL) { - IDmaChannelSlaveImpl * This = (IDmaChannelSlaveImpl*)iface; + IDmaChannelInitImpl * This = (IDmaChannelInitImpl*)iface; + + ASSERT_IRQL_EQUAL(PASSIVE_LEVEL);
/* Did the caller already allocate a buffer ?*/ if (This->Buffer) { - DPRINT1("IDmaChannelSlave_AllocateBuffer free common buffer first \n"); + DPRINT1("IDmaChannelInit_AllocateBuffer free common buffer first \n"); return STATUS_UNSUCCESSFUL; }
This->Buffer = This->pAdapter->DmaOperations->AllocateCommonBuffer(This->pAdapter, BufferSize, &This->Address, FALSE); if (!This->Buffer) { - DPRINT1("IDmaChannelSlave_AllocateBuffer fAllocateCommonBuffer failed \n"); + DPRINT1("IDmaChannelInit_AllocateBuffer fAllocateCommonBuffer failed \n"); return STATUS_UNSUCCESSFUL; }
This->BufferSize = BufferSize; This->AllocatedBufferSize = BufferSize; - DPRINT1("IDmaChannelSlave_fnAllocateBuffer Success Buffer %p BufferSize %u Address %x\n", This->Buffer, BufferSize, This->Address); + DPRINT1("IDmaChannelInit_fnAllocateBuffer Success Buffer %p BufferSize %u Address %x\n", This->Buffer, BufferSize, This->Address);
return STATUS_SUCCESS; }
ULONG NTAPI -IDmaChannelSlave_fnAllocatedBufferSize( - IN IDmaChannelSlave * iface) -{ - IDmaChannelSlaveImpl * This = (IDmaChannelSlaveImpl*)iface; - - DPRINT("IDmaChannelSlave_AllocatedBufferSize: This %p BufferSize %u\n", This, This->BufferSize); +IDmaChannelInit_fnAllocatedBufferSize( + IN IDmaChannelInit * iface) +{ + IDmaChannelInitImpl * This = (IDmaChannelInitImpl*)iface; + + DPRINT("IDmaChannelInit_AllocatedBufferSize: This %p BufferSize %u\n", This, This->BufferSize); return This->AllocatedBufferSize; }
VOID NTAPI -IDmaChannelSlave_fnCopyFrom( - IN IDmaChannelSlave * iface, +IDmaChannelInit_fnCopyFrom( + IN IDmaChannelInit * iface, IN PVOID Destination, IN PVOID Source, IN ULONG ByteCount ) { - IDmaChannelSlaveImpl * This = (IDmaChannelSlaveImpl*)iface; - - DPRINT("IDmaChannelSlave_CopyFrom: This %p Destination %p Source %p ByteCount %u\n", This, Destination, Source, ByteCount); + IDmaChannelInitImpl * This = (IDmaChannelInitImpl*)iface; + + DPRINT("IDmaChannelInit_CopyFrom: This %p Destination %p Source %p ByteCount %u\n", This, Destination, Source, ByteCount);
iface->lpVtbl->CopyTo(iface, Destination, Source, ByteCount); }
VOID NTAPI -IDmaChannelSlave_fnCopyTo( - IN IDmaChannelSlave * iface, +IDmaChannelInit_fnCopyTo( + IN IDmaChannelInit * iface, IN PVOID Destination, IN PVOID Source, IN ULONG ByteCount ) { - IDmaChannelSlaveImpl * This = (IDmaChannelSlaveImpl*)iface; - - DPRINT("IDmaChannelSlave_CopyTo: This %p Destination %p Source %p ByteCount %u\n", This, Destination, Source, ByteCount); + IDmaChannelInitImpl * This = (IDmaChannelInitImpl*)iface; + + DPRINT("IDmaChannelInit_CopyTo: This %p Destination %p Source %p ByteCount %u\n", This, Destination, Source, ByteCount); RtlCopyMemory(Destination, Source, ByteCount); }
VOID NTAPI -IDmaChannelSlave_fnFreeBuffer( - IN IDmaChannelSlave * iface) -{ - IDmaChannelSlaveImpl * This = (IDmaChannelSlaveImpl*)iface; - - DPRINT("IDmaChannelSlave_FreeBuffer: This %p\n", This); +IDmaChannelInit_fnFreeBuffer( + IN IDmaChannelInit * iface) +{ + IDmaChannelInitImpl * This = (IDmaChannelInitImpl*)iface; + + DPRINT("IDmaChannelInit_FreeBuffer: This %p\n", This); + + ASSERT_IRQL_EQUAL(PASSIVE_LEVEL);
if (!This->Buffer) { - DPRINT1("IDmaChannelSlave_FreeBuffer allocate common buffer first \n"); + DPRINT1("IDmaChannelInit_FreeBuffer allocate common buffer first \n"); return; }
@@ -206,59 +206,60 @@
PADAPTER_OBJECT NTAPI -IDmaChannelSlave_fnGetAdapterObject( - IN IDmaChannelSlave * iface) -{ - IDmaChannelSlaveImpl * This = (IDmaChannelSlaveImpl*)iface; - - DPRINT("IDmaChannelSlave_GetAdapterObject: This %p\n", This); +IDmaChannelInit_fnGetAdapterObject( + IN IDmaChannelInit * iface) +{ + IDmaChannelInitImpl * This = (IDmaChannelInitImpl*)iface; + + DPRINT("IDmaChannelInit_GetAdapterObject: This %p\n", This); return (PADAPTER_OBJECT)This->pAdapter; }
ULONG NTAPI -IDmaChannelSlave_fnMaximumBufferSize( - IN IDmaChannelSlave * iface) -{ - IDmaChannelSlaveImpl * This = (IDmaChannelSlaveImpl*)iface; - - DPRINT("IDmaChannelSlave_MaximumBufferSize: This %p\n", This); +IDmaChannelInit_fnMaximumBufferSize( + IN IDmaChannelInit * iface) +{ + IDmaChannelInitImpl * This = (IDmaChannelInitImpl*)iface; + + DPRINT("IDmaChannelInit_MaximumBufferSize: This %p\n", This); return This->MaximumBufferSize; }
PHYSICAL_ADDRESS NTAPI -IDmaChannelSlave_fnPhysicalAdress( - IN IDmaChannelSlave * iface) -{ - PHYSICAL_ADDRESS Address; - - IDmaChannelSlaveImpl * This = (IDmaChannelSlaveImpl*)iface; - DPRINT("IDmaChannelSlave_PhysicalAdress: This %p Virtuell %p Physical High %x Low %x%\n", This, This->Buffer, This->Address.HighPart, This->Address.LowPart); - - Address = This->Address; - return Address; +IDmaChannelInit_fnPhysicalAdress( + IN IDmaChannelInit * iface, + PPHYSICAL_ADDRESS Address) +{ + PHYSICAL_ADDRESS Result; + IDmaChannelInitImpl * This = (IDmaChannelInitImpl*)iface; + DPRINT("IDmaChannelInit_PhysicalAdress: This %p Virtuell %p Physical High %x Low %x%\n", This, This->Buffer, This->Address.HighPart, This->Address.LowPart); + + Address->QuadPart = This->Address.QuadPart; + Result.QuadPart = (PtrToUlong(Address)); + return Result; }
VOID NTAPI -IDmaChannelSlave_fnSetBufferSize( - IN IDmaChannelSlave * iface, +IDmaChannelInit_fnSetBufferSize( + IN IDmaChannelInit * iface, IN ULONG BufferSize) { - IDmaChannelSlaveImpl * This = (IDmaChannelSlaveImpl*)iface; - - DPRINT("IDmaChannelSlave_SetBufferSize: This %p\n", This); + IDmaChannelInitImpl * This = (IDmaChannelInitImpl*)iface; + + DPRINT("IDmaChannelInit_SetBufferSize: This %p\n", This); This->BufferSize = BufferSize;
}
ULONG NTAPI -IDmaChannelSlave_fnBufferSize( - IN IDmaChannelSlave * iface) -{ - IDmaChannelSlaveImpl * This = (IDmaChannelSlaveImpl*)iface; +IDmaChannelInit_fnBufferSize( + IN IDmaChannelInit * iface) +{ + IDmaChannelInitImpl * This = (IDmaChannelInitImpl*)iface;
return This->BufferSize; } @@ -266,33 +267,35 @@
PVOID NTAPI -IDmaChannelSlave_fnSystemAddress( - IN IDmaChannelSlave * iface) -{ - IDmaChannelSlaveImpl * This = (IDmaChannelSlaveImpl*)iface; - - DPRINT("IDmaChannelSlave_SystemAddress: This %p\n", This); +IDmaChannelInit_fnSystemAddress( + IN IDmaChannelInit * iface) +{ + IDmaChannelInitImpl * This = (IDmaChannelInitImpl*)iface; + + DPRINT("IDmaChannelInit_SystemAddress: This %p\n", This); return This->Buffer; }
ULONG NTAPI -IDmaChannelSlave_fnTransferCount( - IN IDmaChannelSlave * iface) -{ - IDmaChannelSlaveImpl * This = (IDmaChannelSlaveImpl*)iface; - - DPRINT("IDmaChannelSlave_TransferCount: This %p\n", This); +IDmaChannelInit_fnTransferCount( + IN IDmaChannelInit * iface) +{ + IDmaChannelInitImpl * This = (IDmaChannelInitImpl*)iface; + + DPRINT("IDmaChannelInit_TransferCount: This %p\n", This); return This->LastTransferCount; }
ULONG NTAPI -IDmaChannelSlave_fnReadCounter( - IN IDmaChannelSlave * iface) +IDmaChannelInit_fnReadCounter( + IN IDmaChannelInit * iface) { ULONG Counter; - IDmaChannelSlaveImpl * This = (IDmaChannelSlaveImpl*)iface; + IDmaChannelInitImpl * This = (IDmaChannelInitImpl*)iface; + + ASSERT_IRQL(DISPATCH_LEVEL);
Counter = This->pAdapter->DmaOperations->ReadDmaCounter(This->pAdapter);
@@ -311,7 +314,7 @@ IN PVOID Context) { ULONG Length; - IDmaChannelSlaveImpl * This = (IDmaChannelSlaveImpl*)Context; + IDmaChannelInitImpl * This = (IDmaChannelInitImpl*)Context;
Length = This->MapSize; This->MapRegisterBase = MapRegisterBase; @@ -333,17 +336,19 @@
NTSTATUS NTAPI -IDmaChannelSlave_fnStart( - IN IDmaChannelSlave * iface, +IDmaChannelInit_fnStart( + IN IDmaChannelInit * iface, ULONG MapSize, BOOLEAN WriteToDevice) { NTSTATUS Status; ULONG MapRegisters; KIRQL OldIrql; - IDmaChannelSlaveImpl * This = (IDmaChannelSlaveImpl*)iface; - - DPRINT("IDmaChannelSlave_Start: This %p\n", This); + IDmaChannelInitImpl * This = (IDmaChannelInitImpl*)iface; + + DPRINT("IDmaChannelInit_Start: This %p\n", This); + + ASSERT_IRQL_EQUAL(PASSIVE_LEVEL);
if (This->DmaStarted) return STATUS_UNSUCCESSFUL; @@ -379,13 +384,14 @@
NTSTATUS NTAPI -IDmaChannelSlave_fnStop( - IN IDmaChannelSlave * iface) +IDmaChannelInit_fnStop( + IN IDmaChannelInit * iface) { KIRQL OldIrql; - IDmaChannelSlaveImpl * This = (IDmaChannelSlaveImpl*)iface; - - DPRINT("IDmaChannelSlave_fnStop: This %p\n", This); + IDmaChannelInitImpl * This = (IDmaChannelInitImpl*)iface; + + DPRINT("IDmaChannelInit_fnStop: This %p\n", This); + ASSERT_IRQL(DISPATCH_LEVEL);
if (!This->DmaStarted) return STATUS_SUCCESS; @@ -413,15 +419,17 @@
NTSTATUS NTAPI -IDmaChannelSlave_fnWaitForTC( - IN IDmaChannelSlave * iface, +IDmaChannelInit_fnWaitForTC( + IN IDmaChannelInit * iface, ULONG Timeout) { ULONG RetryCount; ULONG BytesRemaining; ULONG PrevBytesRemaining;
- IDmaChannelSlaveImpl * This = (IDmaChannelSlaveImpl*)iface; + IDmaChannelInitImpl * This = (IDmaChannelInitImpl*)iface; + + ASSERT_IRQL_EQUAL(PASSIVE_LEVEL);
BytesRemaining = This->pAdapter->DmaOperations->ReadDmaCounter(This->pAdapter); if (!BytesRemaining) @@ -454,30 +462,73 @@
}
-IDmaChannelSlaveVtbl vt_IDmaChannelSlaveVtbl = +NTSTATUS +NTAPI +IDmaChannelInit_fnInit( + IN IDmaChannelInit * iface, + IN PDEVICE_DESCRIPTION DeviceDescription, + IN PDEVICE_OBJECT DeviceObject) +{ + INTERFACE_TYPE BusType; + NTSTATUS Status; + PDMA_ADAPTER Adapter; + PPCLASS_DEVICE_EXTENSION DeviceExt; + ULONG MapRegisters; + ULONG ResultLength; + IDmaChannelInitImpl * This = (IDmaChannelInitImpl*)iface; + + /* Get bus type */ + Status = IoGetDeviceProperty(DeviceObject, DevicePropertyLegacyBusType, sizeof(BusType), (PVOID)&BusType, &ResultLength); + if (NT_SUCCESS(Status)) + { + DeviceDescription->InterfaceType = BusType; + } + /* Fetch device extension */ + DeviceExt = (PPCLASS_DEVICE_EXTENSION) DeviceObject->DeviceExtension; + /* Acquire dma adapter */ + Adapter = IoGetDmaAdapter(DeviceExt->PhysicalDeviceObject, DeviceDescription, &MapRegisters); + if (!Adapter) + { + FreeItem(This, TAG_PORTCLASS); + return STATUS_DEVICE_CONFIGURATION_ERROR; + } + + /* initialize object */ + This->ref = 1; + This->pAdapter = Adapter; + This->pDeviceObject = DeviceObject; + This->MaximumBufferSize = DeviceDescription->MaximumLength; + This->MaxMapRegisters = MapRegisters; + + return STATUS_SUCCESS; +} + + +IDmaChannelInitVtbl vt_IDmaChannelInitVtbl = { /* IUnknown methods */ - IDmaChannelSlave_fnQueryInterface, - IDmaChannelSlave_fnAddRef, - IDmaChannelSlave_fnRelease, + IDmaChannelInit_fnQueryInterface, + IDmaChannelInit_fnAddRef, + IDmaChannelInit_fnRelease, /* IDmaChannel methods */ - IDmaChannelSlave_fnAllocateBuffer, - IDmaChannelSlave_fnFreeBuffer, - IDmaChannelSlave_fnTransferCount, - IDmaChannelSlave_fnMaximumBufferSize, - IDmaChannelSlave_fnAllocatedBufferSize, - IDmaChannelSlave_fnBufferSize, - IDmaChannelSlave_fnSetBufferSize, - IDmaChannelSlave_fnSystemAddress, - IDmaChannelSlave_fnPhysicalAdress, - IDmaChannelSlave_fnGetAdapterObject, - IDmaChannelSlave_fnCopyTo, - IDmaChannelSlave_fnCopyFrom, - /* IDmaChannelSlave methods */ - IDmaChannelSlave_fnStart, - IDmaChannelSlave_fnStop, - IDmaChannelSlave_fnReadCounter, - IDmaChannelSlave_fnWaitForTC + IDmaChannelInit_fnAllocateBuffer, + IDmaChannelInit_fnFreeBuffer, + IDmaChannelInit_fnTransferCount, + IDmaChannelInit_fnMaximumBufferSize, + IDmaChannelInit_fnAllocatedBufferSize, + IDmaChannelInit_fnBufferSize, + IDmaChannelInit_fnSetBufferSize, + IDmaChannelInit_fnSystemAddress, + IDmaChannelInit_fnPhysicalAdress, + IDmaChannelInit_fnGetAdapterObject, + IDmaChannelInit_fnCopyTo, + IDmaChannelInit_fnCopyFrom, + /* IDmaChannelInit methods */ + IDmaChannelInit_fnStart, + IDmaChannelInit_fnStop, + IDmaChannelInit_fnReadCounter, + IDmaChannelInit_fnWaitForTC, + IDmaChannelInit_fnInit };
@@ -493,48 +544,26 @@ IN PDEVICE_OBJECT DeviceObject) { NTSTATUS Status; - PDMA_ADAPTER Adapter; - ULONG MapRegisters; - INTERFACE_TYPE BusType; - ULONG ResultLength; - PPCLASS_DEVICE_EXTENSION DeviceExt; - - IDmaChannelSlaveImpl * This; + IDmaChannelInitImpl * This;
DPRINT("OutDmaChannel %p OuterUnknown %p PoolType %p DeviceDescription %p DeviceObject %p\n", OutDmaChannel, OuterUnknown, PoolType, DeviceDescription, DeviceObject);
- This = AllocateItem(PoolType, sizeof(IDmaChannelSlaveImpl), TAG_PORTCLASS); + This = AllocateItem(PoolType, sizeof(IDmaChannelInitImpl), TAG_PORTCLASS); if (!This) { return STATUS_INSUFFICIENT_RESOURCES; }
- DeviceExt = (PPCLASS_DEVICE_EXTENSION) DeviceObject->DeviceExtension; - - Status = IoGetDeviceProperty(DeviceObject, DevicePropertyLegacyBusType, sizeof(BusType), (PVOID)&BusType, &ResultLength); + /* initialize object */ + Status = IDmaChannelInit_fnInit((IDmaChannelInit*)This, DeviceDescription, DeviceObject); if (NT_SUCCESS(Status)) { - DeviceDescription->InterfaceType = BusType; - } - - Adapter = IoGetDmaAdapter(DeviceExt->PhysicalDeviceObject, DeviceDescription, &MapRegisters); - if (!Adapter) - { - FreeItem(This, TAG_PORTCLASS); - return STATUS_DEVICE_CONFIGURATION_ERROR; - } - - /* initialize object */ - This->ref = 1; - This->lpVtbl = &vt_IDmaChannelSlaveVtbl; - This->pAdapter = Adapter; - This->pDeviceObject = DeviceObject; - This->MaximumBufferSize = DeviceDescription->MaximumLength; - This->MaxMapRegisters = MapRegisters; - - *OutDmaChannel = (PVOID)(&This->lpVtbl); - DPRINT("PcNewDmaChannel result %p\n", *OutDmaChannel); - return STATUS_SUCCESS; - -} + /* store result */ + This->lpVtbl = &vt_IDmaChannelInitVtbl; + *OutDmaChannel = (PVOID)(&This->lpVtbl); + } + + return Status; + +}
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/p... ============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.h [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.h [iso-8859-1] Fri Apr 24 00:33:27 2009 @@ -520,4 +520,60 @@ STDMETHOD_(PMINIPORT, GetMiniport)(THIS); };
+/***************************************************************************** + * IDmaChannelInit + ***************************************************************************** + */ + +#undef INTERFACE +#define INTERFACE IDmaChannelInit + +DECLARE_INTERFACE_(IDmaChannelInit, IUnknown) +{ + DEFINE_ABSTRACT_UNKNOWN() + + STDMETHOD_(NTSTATUS,AllocateBuffer)(THIS_ + IN ULONG BufferSize, + IN PPHYSICAL_ADDRESS PhysicalAddressConstraint OPTIONAL); + + STDMETHOD_(VOID, FreeBuffer)(THIS); + STDMETHOD_(ULONG, TransferCount)(THIS); + STDMETHOD_(ULONG, MaximumBufferSize)(THIS); + STDMETHOD_(ULONG, AllocatedBufferSize)(THIS); + STDMETHOD_(ULONG, BufferSize)(THIS); + + STDMETHOD_(VOID, SetBufferSize)(THIS_ + IN ULONG BufferSize); + + STDMETHOD_(PVOID, SystemAddress)(THIS); + STDMETHOD_(PHYSICAL_ADDRESS, PhysicalAddress)(THIS_ + IN PPHYSICAL_ADDRESS Address); + + STDMETHOD_(PADAPTER_OBJECT, GetAdapterObject)(THIS); + + STDMETHOD_(VOID, CopyTo)(THIS_ + IN PVOID Destination, + IN PVOID Source, + IN ULONG ByteCount); + + STDMETHOD_(VOID, CopyFrom)(THIS_ + IN PVOID Destination, + IN PVOID Source, + IN ULONG ByteCount); + + STDMETHOD_(NTSTATUS, Start)( THIS_ + IN ULONG MapSize, + IN BOOLEAN WriteToDevice) PURE; + + STDMETHOD_(NTSTATUS, Stop)( THIS ) PURE; + STDMETHOD_(ULONG, ReadCounter)( THIS ) PURE; + + STDMETHOD_(NTSTATUS, WaitForTC)( THIS_ + ULONG Timeout) PURE; + + STDMETHOD_(NTSTATUS, Init)( THIS_ + IN PDEVICE_DESCRIPTION DeviceDescription, + IN PDEVICE_OBJECT DeviceObject) PURE; +}; + #endif