ReactOS 0.4.15-dev-5672-gf73ac17
CMiniportStream Class Reference

#include <stream.h>

Inheritance diagram for CMiniportStream:
Collaboration diagram for CMiniportStream:

Public Member Functions

 ~CMiniportStream ()
 
void ResetDMA (void)
 
void PauseDMA (void)
 
void ResumeDMA (ULONG state=DMA_ENGINE_ON)
 
int GetBuffPos (DWORD *buffPos)
 
void WriteReg8 (ULONG addr, UCHAR data)
 
void WriteReg16 (ULONG addr, USHORT data)
 
void WriteReg32 (ULONG addr, ULONG data)
 
UCHAR ReadReg8 (ULONG addr)
 
USHORT ReadReg16 (ULONG addr)
 
ULONG ReadReg32 (ULONG addr)
 
 STDMETHODIMP_ (NTSTATUS) SetFormat(_In_ PKSDATAFORMAT Format)
 
void PowerChangeNotify (IN POWER_STATE NewState)
 
virtual void PowerChangeNotify_ (IN POWER_STATE NewState)
 
ULONG GetCurrentSampleRate (void)
 
NTSTATUS Init (IN CMiniport *Miniport_, IN PUNKNOWN PortStream, IN WavePins Pin_, IN BOOLEAN Capture_, IN PKSDATAFORMAT DataFormat_, OUT PSERVICEGROUP *ServiceGroup_)
 
virtual void InterruptServiceRoutine () PURE
 
virtual NTSTATUS Init_ () PURE
 
NTSTATUS NonDelegatingQueryInterface (_In_ REFIID Interface, _COM_Outptr_ PVOID *Object, _In_ REFIID iStream, _In_ PUNKNOWN stream)
 
NTSTATUS SetState (_In_ KSSTATE State)
 
NTSTATUS NormalizePhysicalPosition (_Inout_ PLONGLONG PhysicalPosition)
 
PVOID BDList_Alloc ()
 
void BDList_Free ()
 
void UpdateLviCyclic ()
 

Public Attributes

CMiniportMiniport
 
WavePins Pin
 
BOOL Capture
 
WORD NumberOfChannels
 
DEVICE_POWER_STATE m_PowerState
 
PPORTSTREAM_ PortStream
 
PKSDATAFORMAT_WAVEFORMATEX DataFormat
 
PSERVICEGROUP ServiceGroup
 
ULONG CurrentRate
 
ULONG DMAEngineState
 
ULONG m_ulBDAddr
 
PHYSICAL_ADDRESS BDList_PhysAddr
 
tBDEntryBDList
 
 IMP_IDrmAudioStream
 

Private Member Functions

UCHAR UpdateDMA (void)
 

Detailed Description

Definition at line 37 of file stream.h.

Constructor & Destructor Documentation

◆ ~CMiniportStream()

CMiniportStream::~CMiniportStream ( )

Definition at line 201 of file stream.cpp.

202{
203 if (Miniport)
204 {
205 //
206 // Disable interrupts and stop DMA just in case.
207 //
209 {
210 WriteReg8 (X_CR, (UCHAR)0);
211
212 //
213 // Update also the topology miniport if this was the render stream.
214 //
215 if (Miniport->AdapterCommon->GetMiniportTopology () &&
216 (Pin == PIN_WAVEOUT))
217 {
218 Miniport->AdapterCommon->GetMiniportTopology ()->SetCopyProtectFlag (FALSE);
219 }
220 }
221
222 //
223 // Remove stream from miniport Streams array.
224 //
225 if (Miniport->Streams[Pin/2] == this)
226 {
227 Miniport->Streams[Pin/2] = NULL;
228 }
229 }
230
234}
CMiniport * Miniport
Definition: stream.h:42
PPORTSTREAM_ PortStream
Definition: stream.h:48
PSERVICEGROUP ServiceGroup
Definition: stream.h:55
void WriteReg8(ULONG addr, UCHAR data)
Definition: stream.cpp:623
WavePins Pin
Definition: stream.h:43
CMiniportStream * Streams[PIN_MICIN_OFFSET+1]
Definition: miniport.h:29
PADAPTERCOMMON AdapterCommon
Definition: miniport.h:31
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
void __fastcall obj_Release(void **ppvObject)
Definition: miniport.cpp:1273
@ PIN_WAVEOUT
Definition: shared.h:318
const ULONG X_CR
Definition: ichreg.h:56
unsigned char UCHAR
Definition: xmlstorage.h:181

Member Function Documentation

◆ BDList_Alloc()

PVOID CMiniportStream::BDList_Alloc ( )

Definition at line 11 of file stream2.cpp.

12{
13 // get DMA_ADAPTER object
14 PDMA_ADAPTER AdapterObject = (PDMA_ADAPTER)
15 Miniport->DmaChannel->GetAdapterObject();
16
17 // allocate DBList
18 BDList = (tBDEntry *)AdapterObject->DmaOperations->
19 AllocateCommonBuffer (AdapterObject,
20 MAX_BDL_ENTRIES * sizeof (tBDEntry),
22 return BDList;
23}
tBDEntry * BDList
Definition: stream.h:61
PHYSICAL_ADDRESS BDList_PhysAddr
Definition: stream.h:60
PDMACHANNEL DmaChannel
Definition: miniport.h:33
const int MAX_BDL_ENTRIES
Definition: stream.h:16
struct _DMA_OPERATIONS * DmaOperations
Definition: iotypes.h:2295
struct _DMA_ADAPTER * PDMA_ADAPTER

Referenced by CMiniportWaveCyclicStream::Init_(), and CMiniportWaveICHStream::Init_().

◆ BDList_Free()

void CMiniportStream::BDList_Free ( )

Definition at line 25 of file stream2.cpp.

26{
27 if (BDList)
28 {
29 // get DMA_ADAPTER object
30 PDMA_ADAPTER AdapterObject = (PDMA_ADAPTER)
31 Miniport->DmaChannel->GetAdapterObject();
32
33 // free DBList
34 AdapterObject->DmaOperations->
35 FreeCommonBuffer (AdapterObject,
39 FALSE);
40 BDList = NULL;
41 }
42}
#define PAGE_SIZE
Definition: env_spec_w32.h:49

Referenced by CMiniportWaveCyclicStream::~CMiniportWaveCyclicStream(), and CMiniportWaveICHStream::~CMiniportWaveICHStream().

◆ GetBuffPos()

int CMiniportStream::GetBuffPos ( DWORD buffPos)

Definition at line 508 of file stream.cpp.

512{
513 int nCurrentIndex;
514 DWORD RegisterX_PICB;
515
517 {
518 *buffPos = 0;
519 return 0;
520 }
521
522 //
523 // Repeat this until we get the same reading twice. This will prevent
524 // jumps when we are near the end of the buffer.
525 //
526 do
527 {
528 nCurrentIndex = ReadReg8(X_CIV);
529
530 RegisterX_PICB = ReadReg16 (X_PICB);
531 } while (nCurrentIndex != (int)ReadReg8(X_CIV));
532
533 *buffPos = (BDList[nCurrentIndex].wLength - RegisterX_PICB) * 2;
534 return nCurrentIndex;
535}
UCHAR ReadReg8(ULONG addr)
Definition: stream.cpp:629
USHORT ReadReg16(ULONG addr)
Definition: stream.cpp:631
ULONG DMAEngineState
Definition: stream.h:57
const int DMA_ENGINE_OFF
Definition: stream.h:4
unsigned long DWORD
Definition: ntddk_ex.h:95
const ULONG X_PICB
Definition: ichreg.h:54
const ULONG X_CIV
Definition: ichreg.h:51
WORD wLength
Definition: stream.h:32

◆ GetCurrentSampleRate()

ULONG CMiniportStream::GetCurrentSampleRate ( void  )
inline

Definition at line 130 of file stream.h.

131 {
132 return CurrentRate;
133 }
ULONG CurrentRate
Definition: stream.h:56

◆ Init()

NTSTATUS CMiniportStream::Init ( IN CMiniport Miniport_,
IN PUNKNOWN  PortStream,
IN WavePins  Pin_,
IN BOOLEAN  Capture_,
IN PKSDATAFORMAT  DataFormat_,
OUT PSERVICEGROUP ServiceGroup_ 
)

Definition at line 64 of file stream.cpp.

73{
74 PAGED_CODE ();
75
76 DOUT (DBG_PRINT, ("[CMiniportStream::Init]"));
77
78 ASSERT (Miniport_);
79 ASSERT (DataFormat_);
80
81 //
82 // The rule here is that we return when we fail without a cleanup.
83 // The destructor will relase the allocated memory.
84 //
85 NTSTATUS ntStatus = STATUS_SUCCESS;
86
87 //
88 // Save miniport pointer and addref it.
89 //
90 obj_AddRef(Miniport_, (PVOID *)&Miniport);
91
92 //
93 // Save portstream interface pointer and addref it.
94 //
95 obj_AddRef(PortStream_, (PVOID *)&PortStream);
96
97
98 //
99 // Save channel ID and capture flag.
100 //
101 Pin = Pin_;
102 Capture = Capture_;
103
104 //
105 // Save data format and current sample rate.
106 //
108 CurrentRate = DataFormat->WaveFormatEx.nSamplesPerSec;
109 NumberOfChannels = DataFormat->WaveFormatEx.nChannels;
110
111
112 if (ServiceGroup_)
113 {
114
115 //
116 // Create a service group (a DPC abstraction/helper) to help with
117 // interrupts.
118 //
119 ntStatus = PcNewServiceGroup (&ServiceGroup, NULL);
120 if (!NT_SUCCESS (ntStatus))
121 {
122 DOUT (DBG_ERROR, ("Failed to create a service group!"));
123 return ntStatus;
124 }
125 }
126
127 //
128 // Store the base address of this DMA engine.
129 //
130 if (Capture)
131 {
132 //
133 // could be PCM or MIC capture
134 //
135 if (Pin == PIN_WAVEIN)
136 {
137 // Base address for DMA registers.
139 }
140 else
141 {
142 // Base address for DMA registers.
144 }
145 }
146 else // render
147 {
148 // Base address for DMA registers.
150 }
151
152 //
153 // Reset the DMA and set the BD list pointer.
154 //
155 ResetDMA ();
156
157 //
158 // Now set the requested sample rate. In case of a failure, the object
159 // gets destroyed and releases all memory etc.
160 //
161 ntStatus = SetFormat (DataFormat_);
162 if (!NT_SUCCESS (ntStatus))
163 {
164 DOUT (DBG_ERROR, ("Stream init SetFormat call failed!"));
165 return ntStatus;
166 }
167
168 //
169 // Initialize the device state.
170 //
172
173 //
174 // Call miniport specific init routine
175 //
176 ntStatus = Init_();
177 if (!NT_SUCCESS (ntStatus))
178 {
179 return ntStatus;
180 }
181
182 //
183 // Setup the Buffer Descriptor Base Address (BDBA) register.
184 //
186
187 //
188 // Pass the ServiceGroup pointer to portcls.
189 //
190 obj_AddRef(ServiceGroup, (PVOID *)ServiceGroup_);
191
192 //
193 // Store the stream pointer, it is used by the ISR.
194 //
195 Miniport->Streams[Pin/2] = this;
196
197 return STATUS_SUCCESS;
198}
#define PAGED_CODE()
LONG NTSTATUS
Definition: precomp.h:26
struct _Capture Capture
Definition: capture.h:24
WORD NumberOfChannels
Definition: stream.h:45
void WriteReg32(ULONG addr, ULONG data)
Definition: stream.cpp:627
void ResetDMA(void)
Definition: stream.cpp:544
virtual NTSTATUS Init_() PURE
DEVICE_POWER_STATE m_PowerState
Definition: stream.h:46
ULONG m_ulBDAddr
Definition: stream.h:58
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
void __fastcall obj_AddRef(PUNKNOWN obj, void **ppvObject)
Definition: miniport.cpp:1264
#define DOUT(lvl, strings)
Definition: debug.h:82
@ PIN_WAVEIN
Definition: shared.h:320
const ULONG PI_BDBAR
Definition: ichreg.h:21
const ULONG PO_BDBAR
Definition: ichreg.h:28
const ULONG MC_BDBAR
Definition: ichreg.h:35
struct KSDATAFORMAT_WAVEFORMATEX * PKSDATAFORMAT_WAVEFORMATEX
#define ASSERT(a)
Definition: mode.c:44
#define DBG_ERROR
Definition: nfs41_debug.h:78
@ PowerDeviceD0
Definition: ntpoapi.h:49
NTSTATUS NTAPI PcNewServiceGroup(OUT PSERVICEGROUP *OutServiceGroup, IN PUNKNOWN OuterUnknown OPTIONAL)
#define STATUS_SUCCESS
Definition: shellext.h:65
ULONG LowPart
Definition: typedefs.h:106
#define DBG_PRINT(ppi, ch, level)
Definition: win32kdebug.h:168

Referenced by CAC97MiniportWaveRTStream::Init().

◆ Init_()

virtual NTSTATUS CMiniportStream::Init_ ( )
virtual

Reimplemented in CMiniportWaveCyclicStream, and CMiniportWaveICHStream.

Referenced by Init().

◆ InterruptServiceRoutine()

virtual void CMiniportStream::InterruptServiceRoutine ( )
virtual

◆ NonDelegatingQueryInterface()

NTSTATUS CMiniportStream::NonDelegatingQueryInterface ( _In_ REFIID  Interface,
_COM_Outptr_ PVOID Object,
_In_ REFIID  iStream,
_In_ PUNKNOWN  stream 
)

Definition at line 18 of file stream.cpp.

25{
26 PAGED_CODE ();
27
28 ASSERT (Object);
29
30 DOUT (DBG_PRINT, ("[CMiniportStream::NonDelegatingQueryInterface]"));
31
32 //
33 // Convert for IID_IMiniportXXXStream
34 //
35 if (IsEqualGUIDAligned (Interface, iStream))
36 {
38 }
39 //
40 // Convert for IID_IDrmAudioStream
41 //
42 else if (IsEqualGUIDAligned (Interface, IID_IDrmAudioStream))
43 {
45 }
46 //
47 // Convert for IID_IUnknown
48 //
50 {
52 }
53 else
54 {
55 *Object = NULL;
57 }
58
59 ((PUNKNOWN)*Object)->AddRef ();
60 return STATUS_SUCCESS;
61}
const GUID IID_IUnknown
IUnknown * PUNKNOWN
Definition: com_apitest.h:45
IDrmAudioStream * PDRMAUDIOSTREAM
Definition: drmk.h:109
Definition: parse.h:23
void * PVOID
Definition: typedefs.h:50
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
Definition: wdffdo.h:465
#define IsEqualGUIDAligned(guid1, guid2)
Definition: wdm.template.h:235

◆ NormalizePhysicalPosition()

NTSTATUS CMiniportStream::NormalizePhysicalPosition ( _Inout_ PLONGLONG  PhysicalPosition)

Definition at line 138 of file stream2.cpp.

142{
143 ULONG SampleSize;
144
145 DOUT (DBG_PRINT, ("NormalizePhysicalPosition"));
146
147 //
148 // Determine the sample size in bytes
149 //
150 SampleSize = DataFormat->WaveFormatEx.nChannels * 2;
151
152 //
153 // Calculate the time in 100ns steps.
154 //
155 *PhysicalPosition = (_100NS_UNITS_PER_SECOND / SampleSize *
156 *PhysicalPosition) / CurrentRate;
157
158 return STATUS_SUCCESS;
159}
#define _100NS_UNITS_PER_SECOND
Definition: portcls.h:159
uint32_t ULONG
Definition: typedefs.h:59

◆ PauseDMA()

void CMiniportStream::PauseDMA ( void  )

Definition at line 614 of file stream.cpp.

615{
616 DOUT (DBG_PRINT, ("PauseDMA"));
617
619 UpdateDMA();
620}
UCHAR UpdateDMA(void)
Definition: stream.cpp:493
const int DMA_ENGINE_PAUSE
Definition: stream.h:5

Referenced by SetState().

◆ PowerChangeNotify()

void CMiniportStream::PowerChangeNotify ( IN POWER_STATE  NewState)

Definition at line 288 of file stream.cpp.

292{
293 DOUT (DBG_PRINT, ("[CMiniportStream::PowerChangeNotify]"));
294
295 //
296 // We don't have to check the power state, that's already done by the wave
297 // miniport.
298 //
299
300 DOUT (DBG_POWER, ("Changing state to D%d.",
301 (ULONG)NewState.DeviceState - (ULONG)PowerDeviceD0));
302
303 switch (NewState.DeviceState)
304 {
305 case PowerDeviceD0:
306 //
307 // If we are coming from D2 or D3 we have to restore the registers cause
308 // there might have been a power loss.
309 //
311 {
312 PowerChangeNotify_(NewState);
313 }
314 break;
315
316 case PowerDeviceD1:
317 // Here we do nothing. The device has still enough power to keep all
318 // it's register values.
319 break;
320
321 case PowerDeviceD2:
322 case PowerDeviceD3:
323 //
324 // If we power down to D2 or D3 we might loose power, so we have to be
325 // aware of the DMA engine resetting. In that case a play would start
326 // with scatter gather entry 0 (the current index is read only).
327 // This is fine with the RT port.
328 //
329
330 PowerChangeNotify_(NewState);
331
332 break;
333 }
334
335 //
336 // Save the new state. This local value is used to determine when to
337 // cache property accesses and when to permit the driver from accessing
338 // the hardware.
339 //
340 m_PowerState = NewState.DeviceState;
341 DOUT (DBG_POWER, ("Entering D%d",
343
344}
virtual void PowerChangeNotify_(IN POWER_STATE NewState)
Definition: stream2.cpp:51
const int DBG_POWER
Definition: debug.h:23
@ PowerDeviceD1
Definition: ntpoapi.h:50
@ PowerDeviceD2
Definition: ntpoapi.h:51
@ PowerDeviceD3
Definition: ntpoapi.h:52

Referenced by STDMETHODIMP_().

◆ PowerChangeNotify_()

void CMiniportStream::PowerChangeNotify_ ( IN POWER_STATE  NewState)
virtual

Reimplemented in CMiniportWaveICHStream.

Definition at line 50 of file stream2.cpp.

54{
55 if(NewState.DeviceState == PowerDeviceD0)
56 {
57 //
58 // The scatter gather list is already arranged. A reset of the DMA
59 // brings all pointers to the default state. From there we can start.
60 //
61
62 ResetDMA ();
63 }
64 else
65 {
66 // Disable interrupts and stop DMA just in case.
67 Miniport->AdapterCommon->WriteBMControlRegister (m_ulBDAddr + X_CR, (UCHAR)0);
68 }
69}

Referenced by PowerChangeNotify().

◆ ReadReg16()

USHORT CMiniportStream::ReadReg16 ( ULONG  addr)

Definition at line 631 of file stream.cpp.

631 { return Miniport->AdapterCommon->
632 ReadBMControlRegister16 (m_ulBDAddr + addr); }
GLenum const GLvoid * addr
Definition: glext.h:9621

Referenced by GetBuffPos(), CMiniportWaveICHStream::GetNewMappings(), and CMiniportWaveICHStream::ReleaseUsedMappings().

◆ ReadReg32()

ULONG CMiniportStream::ReadReg32 ( ULONG  addr)

Definition at line 633 of file stream.cpp.

633 { return Miniport->AdapterCommon->
634 ReadBMControlRegister32 (m_ulBDAddr + addr); }

◆ ReadReg8()

UCHAR CMiniportStream::ReadReg8 ( ULONG  addr)

Definition at line 629 of file stream.cpp.

629 { return Miniport->AdapterCommon->
630 ReadBMControlRegister8 (m_ulBDAddr + addr); }

Referenced by GetBuffPos(), CMiniportWaveICHStream::ReleaseUsedMappings(), ResetDMA(), UpdateDMA(), and UpdateLviCyclic().

◆ ResetDMA()

void CMiniportStream::ResetDMA ( void  )

Definition at line 544 of file stream.cpp.

545{
546 DOUT (DBG_PRINT, ("ResetDMA"));
547
548 //
549 // Turn off DMA engine (or make sure it's turned off)
550 //
552 UCHAR RegisterValue = UpdateDMA();
553
554 //
555 // Reset all register contents.
556 //
557 RegisterValue |= CR_RR;
558 WriteReg8(X_CR, RegisterValue);
559
560 //
561 // Wait until reset condition is cleared by HW; should not take long.
562 //
563 ULONG count = 0;
564 BOOL bTimedOut = TRUE;
565 do
566 {
567 if (!(ReadReg8(X_CR) & CR_RR))
568 {
569 bTimedOut = FALSE;
570 break;
571 }
573 } while (count++ < 10);
574
575 if (bTimedOut)
576 {
577 DOUT (DBG_ERROR, ("ResetDMA TIMEOUT!!"));
578 }
579
580 //
581 // We only want interrupts upon completion.
582 //
583 RegisterValue = CR_IOCE | CR_LVBIE;
584 WriteReg8(X_CR, RegisterValue);
585
586 //
587 // Setup the Buffer Descriptor Base Address (BDBA) register.
588 //
590}
VOID NTAPI KeStallExecutionProcessor(IN ULONG MicroSeconds)
Definition: ntoskrnl.c:81
#define TRUE
Definition: types.h:120
unsigned int BOOL
Definition: ntddk_ex.h:94
GLuint GLuint GLsizei count
Definition: gl.h:1545
const UCHAR CR_IOCE
Definition: ichreg.h:96
const UCHAR CR_RR
Definition: ichreg.h:100
const UCHAR CR_LVBIE
Definition: ichreg.h:98

Referenced by Init(), PowerChangeNotify_(), CMiniportWaveICHStream::PowerChangeNotify_(), and SetState().

◆ ResumeDMA()

void CMiniportStream::ResumeDMA ( ULONG  state = DMA_ENGINE_ON)

Definition at line 599 of file stream.cpp.

600{
601 DOUT (DBG_PRINT, ("ResumeDMA"));
602
604 UpdateDMA();
605}
static int state
Definition: maze.c:121

Referenced by CMiniportWaveICHStream::GetNewMappings(), and SetState().

◆ SetState()

NTSTATUS CMiniportStream::SetState ( _In_ KSSTATE  State)

Definition at line 77 of file stream2.cpp.

81{
82 DOUT (DBG_PRINT, ("[CMiniportStream::SetState]"));
83 DOUT (DBG_STREAM, ("SetState to %d", State));
84
85
86 //
87 // Start or stop the DMA engine dependent of the state.
88 //
89 switch (State)
90 {
91 case KSSTATE_STOP:
92 // We reset the DMA engine which will also reset the position pointers.
93 ResetDMA ();
94 break;
95
96 case KSSTATE_ACQUIRE:
97 break;
98
99 case KSSTATE_PAUSE:
100 // pause now.
101 PauseDMA ();
102 break;
103
104 case KSSTATE_RUN:
105 //
106 // Let's rock.
107 //
108 // Make sure we are not running already.
110 {
111 return STATUS_SUCCESS;
112 }
113
114 // Kick DMA again just in case.
115 ResumeDMA ();
117 break;
118 }
119
120 return STATUS_SUCCESS;
121}
void ResumeDMA(ULONG state=DMA_ENGINE_ON)
Definition: stream.cpp:599
void UpdateLviCyclic()
Definition: stream.h:172
void PauseDMA(void)
Definition: stream.cpp:614
const int DBG_STREAM
Definition: debug.h:22
const int DMA_ENGINE_ON
Definition: stream.h:7
@ KSSTATE_ACQUIRE
Definition: ks.h:1216
@ KSSTATE_PAUSE
Definition: ks.h:1217
@ KSSTATE_RUN
Definition: ks.h:1218
@ KSSTATE_STOP
Definition: ks.h:1215

◆ STDMETHODIMP_()

CMiniportStream::STDMETHODIMP_ ( NTSTATUS  )

◆ UpdateDMA()

UCHAR CMiniportStream::UpdateDMA ( void  )
private

Definition at line 493 of file stream.cpp.

494{
495 // get X_CR register value
496 UCHAR RegisterValue = ReadReg8(X_CR);
497 UCHAR RegisterValueNew = RegisterValue & ~CR_RPBM;
499 RegisterValueNew |= CR_RPBM;
500
501 // write X_CR register value
502 if(RegisterValue != RegisterValueNew)
503 WriteReg8(X_CR, RegisterValueNew);
504 return RegisterValueNew;
505}
const UCHAR CR_RPBM
Definition: ichreg.h:99

Referenced by PauseDMA(), ResetDMA(), and ResumeDMA().

◆ UpdateLviCyclic()

void CMiniportStream::UpdateLviCyclic ( )
inline

Definition at line 172 of file stream.h.

173 {
174 UCHAR CIV = ReadReg8(X_CIV);
175 WriteReg8(X_LVI, (CIV-1) & BDL_MASK);
176 }
const int BDL_MASK
Definition: stream.h:21
const ULONG X_LVI
Definition: ichreg.h:52

Referenced by CMiniportWaveCyclicStream::InterruptServiceRoutine(), CMiniportWaveICHStream::InterruptServiceRoutine(), and SetState().

◆ WriteReg16()

void CMiniportStream::WriteReg16 ( ULONG  addr,
USHORT  data 
)

Definition at line 625 of file stream.cpp.

626 WriteBMControlRegister (m_ulBDAddr + addr, data); }
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950

◆ WriteReg32()

void CMiniportStream::WriteReg32 ( ULONG  addr,
ULONG  data 
)

Definition at line 627 of file stream.cpp.

628 WriteBMControlRegister (m_ulBDAddr + addr, data); }

Referenced by Init(), and ResetDMA().

◆ WriteReg8()

void CMiniportStream::WriteReg8 ( ULONG  addr,
UCHAR  data 
)

Member Data Documentation

◆ BDList

◆ BDList_PhysAddr

PHYSICAL_ADDRESS CMiniportStream::BDList_PhysAddr

Definition at line 60 of file stream.h.

Referenced by BDList_Alloc(), BDList_Free(), Init(), and ResetDMA().

◆ Capture

BOOL CMiniportStream::Capture

Definition at line 44 of file stream.h.

◆ CurrentRate

ULONG CMiniportStream::CurrentRate

◆ DataFormat

PKSDATAFORMAT_WAVEFORMATEX CMiniportStream::DataFormat

Definition at line 52 of file stream.h.

◆ DMAEngineState

ULONG CMiniportStream::DMAEngineState

Definition at line 57 of file stream.h.

Referenced by GetBuffPos(), PauseDMA(), ResetDMA(), ResumeDMA(), SetState(), and UpdateDMA().

◆ IMP_IDrmAudioStream

CMiniportStream::IMP_IDrmAudioStream

Definition at line 98 of file stream.h.

◆ m_PowerState

DEVICE_POWER_STATE CMiniportStream::m_PowerState

Definition at line 46 of file stream.h.

Referenced by Init(), and PowerChangeNotify().

◆ m_ulBDAddr

ULONG CMiniportStream::m_ulBDAddr

◆ Miniport

◆ NumberOfChannels

WORD CMiniportStream::NumberOfChannels

Definition at line 45 of file stream.h.

Referenced by CMiniportWaveICHStream::GetNewMappings(), Init(), and STDMETHODIMP_().

◆ Pin

WavePins CMiniportStream::Pin

Definition at line 43 of file stream.h.

Referenced by Init(), and ~CMiniportStream().

◆ PortStream

◆ ServiceGroup

PSERVICEGROUP CMiniportStream::ServiceGroup

The documentation for this class was generated from the following files: