1 /******************************************************************************** 2 ** Copyright (c) 1998-2000 Microsoft Corporation. All Rights Reserved. 3 ** 4 ** Portions Copyright (c) 1998-1999 Intel Corporation 5 ** 6 ********************************************************************************/ 7 8 /* The file rtstream.h was reviewed by LCA in June 2011 and is acceptable for use by Microsoft. */ 9 10 #ifndef _RTSTREAM_H_ 11 #define _RTSTREAM_H_ 12 13 #include "shared.h" 14 15 #if (NTDDI_VERSION >= NTDDI_VISTA) 16 17 //***************************************************************************** 18 // Defines 19 //***************************************************************************** 20 21 // 22 // The scatter gather can (only) handle 32 entries 23 // 24 const int MAX_BDL_ENTRIES = 32; 25 26 // 27 // Mask for accessing the scatter gather entries with a counter. 28 // 29 const int BDL_MASK = 31; 30 31 32 //***************************************************************************** 33 // Classes 34 //***************************************************************************** 35 36 /***************************************************************************** 37 * CAC97MiniportWaveRTStream 38 ***************************************************************************** 39 * AC97 wave miniport stream. 40 */ 41 class CAC97MiniportWaveRTStream : public IMiniportWaveRTStream, 42 public CUnknown, 43 public CMiniportStream 44 { 45 private: 46 // 47 // CAC97MiniportWaveRTStream private variables 48 // 49 DEVICE_POWER_STATE m_PowerState; // Current power state of the device. 50 51 52 int mapEntries; 53 tBDEntry *BDList; 54 PMDL BDListMdl; 55 56 57 /************************************************************************* 58 * CAC97MiniportWaveRTStream methods 59 ************************************************************************* 60 * 61 * These are private member functions used internally by the object. See 62 * ICHWAVE.CPP for specific descriptions. 63 */ 64 65 public: 66 /************************************************************************* 67 * The following two macros are from STDUNK.H. DECLARE_STD_UNKNOWN() 68 * defines inline IUnknown implementations that use CUnknown's aggregation 69 * support. NonDelegatingQueryInterface() is declared, but it cannot be 70 * implemented generically. Its definition appears in ICHWAVE.CPP. 71 * DEFINE_STD_CONSTRUCTOR() defines inline a constructor which accepts 72 * only the outer unknown, which is used for aggregation. The standard 73 * create macro (in ICHWAVE.CPP) uses this constructor. 74 */ 75 DECLARE_STD_UNKNOWN (); 76 DEFINE_STD_CONSTRUCTOR (CAC97MiniportWaveRTStream); 77 78 ~CAC97MiniportWaveRTStream (); 79 80 /************************************************************************* 81 * Include IMiniportWaveRTStream (public/exported) methods. 82 ************************************************************************* 83 */ 84 IMP_IMiniportWaveRTStream; 85 86 /************************************************************************* 87 * CAC97MiniportWaveRTStream methods 88 ************************************************************************* 89 */ 90 91 // 92 // Initializes the Stream object. 93 // 94 NTSTATUS Init 95 ( 96 IN CAC97MiniportWaveRT *Miniport_, 97 IN PPORTWAVERTSTREAM PortStream, 98 IN ULONG Channel, 99 IN BOOLEAN Capture, 100 IN PKSDATAFORMAT DataFormat 101 ); 102 103 // 104 // Friends 105 // 106 friend 107 NTSTATUS CAC97MiniportWaveRT::InterruptServiceRoutine 108 ( 109 IN PINTERRUPTSYNC InterruptSync, 110 IN PVOID StaticContext 111 ); 112 }; 113 114 #endif // (NTDDI_VERSION >= NTDDI_VISTA) 115 116 #endif // _RTSTREAM_H_ 117 118 119