ReactOS  0.4.15-dev-5120-gfb68e76
wavepciminiport.cpp File Reference
#include "wavepciminiport.h"
#include "wavepcistream.h"
Include dependency graph for wavepciminiport.cpp:

Go to the source code of this file.

Macros

#define STR_MODULENAME   "AC97 Wave: "
 

Functions

 IMP_CMiniport (CMiniportWaveICH, IID_IMiniportWavePci) NTSTATUS CreateAC97MiniportWavePCI(OUT PUNKNOWN *Unknown
 
IN IN PUNKNOWN UnknownOuter _When_ ((PoolType &NonPagedPoolMustSucceed) !=0, __drv_reportError("Must succeed pool allocations are forbidden. " "Allocation failures cause a system crash")) IN POOL_TYPE PoolType)
 
 STDMETHODIMP_ (NTSTATUS) CMiniportWaveICH
 
 STDMETHODIMP_ (void) CMiniportWaveICH
 

Variables

IN REFCLSID
 
IN IN PUNKNOWN UnknownOuter OPTIONAL
 

Macro Definition Documentation

◆ STR_MODULENAME

#define STR_MODULENAME   "AC97 Wave: "

Definition at line 11 of file wavepciminiport.cpp.

Function Documentation

◆ _When_()

IN IN PUNKNOWN UnknownOuter _When_ ( (PoolType &NonPagedPoolMustSucceed) !  = 0,
__drv_reportError("Must succeed pool allocations are forbidden. " "Allocation failures cause a system crash")   
)

Definition at line 34 of file wavepciminiport.cpp.

39 {
40  PAGED_CODE ();
41 
42  ASSERT (Unknown);
43 
44  DOUT (DBG_PRINT, ("[CreateAC97MiniportWavePCI]"));
45 
46  STD_CREATE_BODY_WITH_TAG_(CMiniportWaveICH,Unknown,UnknownOuter,PoolType,
48 }
#define DOUT(lvl, strings)
Definition: debug.h:82
IMiniportWavePci * PMINIPORTWAVEPCI
Definition: portcls.h:1695
#define ASSERT(a)
Definition: mode.c:44
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ _Strict_type_match_ POOL_TYPE _In_opt_ ULONG PoolTag
Definition: wdfmemory.h:159
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3810
const int DBG_PRINT
Definition: debug.h:17
#define PAGED_CODE()

◆ IMP_CMiniport()

IMP_CMiniport ( CMiniportWaveICH  ,
IID_IMiniportWavePci   
)

◆ STDMETHODIMP_() [1/2]

STDMETHODIMP_ ( NTSTATUS  )

Definition at line 56 of file wavepciminiport.cpp.

63 {
64  PAGED_CODE ();
65 
66  //
67  // No miniport service group
68  //
69  *ServiceGroup_ = NULL;
70 
71  NTSTATUS ntStatus = CMiniport::Init(
72  UnknownAdapter,
74  Port_
75  );
76 
77  if (!NT_SUCCESS (ntStatus))
78  {
79  return ntStatus;
80  }
81 
82  //
83  // Create the DMA Channel object.
84  //
85  ntStatus = Port->NewMasterDmaChannel (&DmaChannel, // OutDmaChannel
86  NULL, // OuterUnknown (opt)
87  NonPagedPool, // Pool Type
88  NULL, // ResourceList (opt)
89  TRUE, // ScatterGather
90  TRUE, // Dma32BitAddresses
91  FALSE, // Dma64BitAddresses
92  FALSE, // IgnoreCount
93  Width32Bits, // DmaWidth
94  MaximumDmaSpeed, // DmaSpeed
95  0x1FFFE, // MaximumLength (128KByte -2)
96  0); // DmaPort
97  if (!NT_SUCCESS (ntStatus))
98  {
99  DOUT (DBG_ERROR, ("Failed on NewMasterDmaChannel!"));
100  return ntStatus;
101  }
102 
103  //
104  // On failure object is destroyed which cleans up.
105  //
106  return ntStatus;
107 }
CPPORT Port[4]
Definition: headless.c:35
#define TRUE
Definition: types.h:120
LONG NTSTATUS
Definition: precomp.h:26
BOOL Init(PUSERCONNECT UserCon)
Definition: dllmain.c:386
#define DOUT(lvl, strings)
Definition: debug.h:82
_Must_inspect_result_ _In_ WDFIORESREQLIST _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFIORESLIST * ResourceList
Definition: wdfresource.h:304
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
const int DBG_ERROR
Definition: debug.h:19
#define NULL
Definition: types.h:112
#define PAGED_CODE()

◆ STDMETHODIMP_() [2/2]

STDMETHODIMP_ ( void  )

Definition at line 211 of file wavepciminiport.cpp.

212 {
213  // not needed
214 }

Variable Documentation

◆ OPTIONAL

IN IN PUNKNOWN UnknownOuter OPTIONAL

Definition at line 32 of file wavepciminiport.cpp.

◆ REFCLSID

IN REFCLSID

Definition at line 32 of file wavepciminiport.cpp.