ReactOS 0.4.16-dev-197-g92996da
wavecyclicstream.h
Go to the documentation of this file.
1/********************************************************************************
2** Copyright (c) 1998-2000 Microsoft Corporation. All Rights Reserved.
3**
4** Portions Copyright (c) 1998-1999 Intel Corporation
5**
6********************************************************************************/
7
8#ifndef _ICHWAVE_H_
9#define _ICHWAVE_H_
10
11#include "shared.h"
12#include "miniport.h"
13
14
15//*****************************************************************************
16// Data Structures and Typedefs
17//*****************************************************************************
18
19//
20// This is a description of one mapping entry. It contains information
21// about the buffer and a tag which is used for "cancel mappings".
22// For one mapping that is described here, there is an entry in the
23// scatter gather engine.
24//
25typedef struct tagMapData
26{
27 ULONG ulTag; //tag, a simple counter.
28 PHYSICAL_ADDRESS PhysAddr; //phys. addr. of buffer
29 PVOID pVirtAddr; //virt. addr. of buffer
30 ULONG ulBufferLength; //buffer length
32
33//
34// Structure needed to keep track of the BDL tables.
35// This structure is seperated from tBDEntry because we want to
36// have it in cached memory (and not along with tBDEntry in non-
37// cached memory).
38//
39typedef struct tagBDList
40{
41 tBDEntry *pBDEntryBackup;// needed for rearranging the BDList
42 tMapData *pMapData; // mapping list
43 tMapData *pMapDataBackup;// needed for rearranging the BDList
44 int nHead; // index for the BDL Head
45 int nTail; // index for the BDL Tail
46 ULONG ulTagCounter; // the tag is a simple counter.
47 int nBDEntries; // number of entries.
49
50
51
52//*****************************************************************************
53// Classes
54//*****************************************************************************
55
56/*****************************************************************************
57 * CMiniportWaveCyclicStream
58 *****************************************************************************
59 * AC97 wave miniport stream.
60 */
61class CMiniportWaveCyclicStream : public IMiniportWaveCyclicStream,
62 public CUnknown,
63 public CMiniportStream
64{
65private:
67
68 /*************************************************************************
69 * CMiniportWaveCyclicStream methods
70 *************************************************************************
71 *
72 * These are private member functions used internally by the object. See
73 * ICHWAVE.CPP for specific descriptions.
74 */
75
78
80
81public:
82 /*************************************************************************
83 * The following two macros are from STDUNK.H. DECLARE_STD_UNKNOWN()
84 * defines inline IUnknown implementations that use CUnknown's aggregation
85 * support. NonDelegatingQueryInterface() is declared, but it cannot be
86 * implemented generically. Its definition appears in ICHWAVE.CPP.
87 * DEFINE_STD_CONSTRUCTOR() defines inline a constructor which accepts
88 * only the outer unknown, which is used for aggregation. The standard
89 * create macro (in ICHWAVE.CPP) uses this constructor.
90 */
93
95
96 /*************************************************************************
97 * Include IMiniportWaveCyclicStream (public/exported) methods.
98 *************************************************************************
99 */
101
102 /*************************************************************************
103 * CMiniportWaveCyclicStream methods
104 *************************************************************************
105 */
106
107 //
108 // Initializes the Stream object.
109 //
110 NTSTATUS Init_();
111
113};
114
115#endif
116
LONG NTSTATUS
Definition: precomp.h:26
CMiniport * Miniport
Definition: stream.h:42
DEFINE_STD_CONSTRUCTOR(CMiniportWaveCyclicStream)
CMiniportWaveCyclic * Wave()
unsigned long DWORD
Definition: ntddk_ex.h:95
tBDEntry * pBDEntryBackup
tMapData * pMapData
ULONG ulTagCounter
tMapData * pMapDataBackup
PHYSICAL_ADDRESS PhysAddr
ULONG ulBufferLength
uint32_t ULONG
Definition: typedefs.h:59
struct tagBDList tBDList
struct tagMapData tMapData