ReactOS 0.4.15-dev-7918-g2a2556c
rtminiport.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/* The file rtminiport.h was reviewed by LCA in June 2011 and is acceptable for use by Microsoft. */
9
10#ifndef _RTMINIPORT_H_
11#define _RTMINIPORT_H_
12
13#include "shared.h"
14
15#if (NTDDI_VERSION >= NTDDI_VISTA)
16
17/*****************************************************************************
18 * Constants
19 *****************************************************************************
20 */
23
25 {48000, 44100, 32000, 22050, 16000, 11025, 8000};
27 {48000, 32000, 16000, 8000};
28
30const int PIN_WAVEIN_OFFSET = (PIN_WAVEIN / 2);
31const int PIN_MICIN_OFFSET = (PIN_MICIN / 2);
32
33/*****************************************************************************
34 * Forward References
35 *****************************************************************************
36 */
38
40(
42);
43
44/*****************************************************************************
45 * Classes
46 *****************************************************************************
47 */
48
49/*****************************************************************************
50 * CAC97MiniportWaveRT
51 *****************************************************************************
52 * AC97 wave PCI miniport. This object is associated with the device and is
53 * created when the device is started. The class inherits IMiniportWaveRT
54 * so it can expose this interface, CUnknown so it automatically gets
55 * reference counting and aggregation support, and IPowerNotify for ACPI
56 * power management notification.
57 */
58class CAC97MiniportWaveRT : public IMiniportWaveRT,
59 public IPowerNotify,
60 public CUnknown
61{
62private:
63 // The stream class accesses a lot of private member variables.
64 // A better way would be to abstract the access through member
65 // functions which on the other hand would produce more overhead
66 // both in CPU time and programming time.
68
69 //
70 // CAC97MiniportWaveRT private variables
71 //
73 PPORT Port; // Port driver object.
74 PADAPTERCOMMON AdapterCommon; // Adapter common object.
75 PINTERRUPTSYNC InterruptSync; // Interrupt Sync.
76 DEVICE_POWER_STATE m_PowerState; // advanced power control.
77 DWORD m_dwChannelMask; // Channel config for speaker positions.
78 WORD m_wChannels; // Number of channels.
79
80 /*************************************************************************
81 * CAC97MiniportWaveRT methods
82 *************************************************************************
83 * These are private member functions used internally by the object. See
84 * MINWAVE.CPP for specific descriptions.
85 */
86
87 //
88 // Checks and connects the miniport to the resources.
89 //
91 (
93 );
94
95 //
96 // Tests the data format but not the sample rate.
97 //
99 (
102 );
103
104 // Test for standard sample rate support and fill the data range information
105 // in the structures below.
107
108public:
109 /*************************************************************************
110 * The following two macros are from STDUNK.H. DECLARE_STD_UNKNOWN()
111 * defines inline IUnknown implementations that use CUnknown's aggregation
112 * support. NonDelegatingQueryInterface() is declared, but it cannot be
113 * implemented generically. Its definition appears in MINWAVE.CPP.
114 * DEFINE_STD_CONSTRUCTOR() defines inline a constructor which accepts
115 * only the outer unknown, which is used for aggregation. The standard
116 * create macro (in MINWAVE.CPP) uses this constructor.
117 */
121
122 //
123 // Include IMiniportWaveRT (public/exported) methods
124 //
126
127 //
128 // IPowerNotify methods
129 //
131
132 //
133 // This static functions is the interrupt service routine which is
134 // not stream related, but services all streams at once.
135 //
137 (
139 IN PVOID StaticContext
140 );
141
142 //
143 // This is the property handler for KSPROPERTY_AUDIO_CHANNEL_CONFIG of the
144 // DAC node.
145 //
147 (
148 IN PPCPROPERTY_REQUEST PropertyRequest
149 );
150};
151
152#endif // (NTDDI_VERSION >= NTDDI_VISTA)
153
154#endif // _RTMINIPORT_H_
155
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS ProcessResources(IN PRESOURCELIST ResourceList)
Definition: rtminiport.cpp:82
DEFINE_STD_CONSTRUCTOR(CAC97MiniportWaveRT)
DEVICE_POWER_STATE m_PowerState
Definition: rtminiport.h:76
PINTERRUPTSYNC InterruptSync
Definition: rtminiport.h:75
static NTSTATUS InterruptServiceRoutine(IN PINTERRUPTSYNC InterruptSync, IN PVOID StaticContext)
static NTSTATUS PropertyChannelConfig(IN PPCPROPERTY_REQUEST PropertyRequest)
PADAPTERCOMMON AdapterCommon
Definition: rtminiport.h:74
CAC97MiniportWaveRTStream * Streams[PIN_MICIN_OFFSET+1]
Definition: rtminiport.h:72
NTSTATUS TestDataFormat(IN PKSDATAFORMAT Format, IN WavePins Pin)
NTSTATUS BuildDataRangeInformation(void)
WavePins
Definition: shared.h:317
@ PIN_MICIN
Definition: shared.h:322
@ PIN_WAVEOUT
Definition: shared.h:318
@ PIN_WAVEIN
Definition: shared.h:320
IAC97AdapterCommon * PADAPTERCOMMON
Definition: shared.h:488
IN PDCB IN VBO IN ULONG IN BOOLEAN Pin
Definition: fatprocs.h:427
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
enum _DEVICE_POWER_STATE DEVICE_POWER_STATE
IInterruptSync * PINTERRUPTSYNC
Definition: portcls.h:888
IResourceList * PRESOURCELIST
Definition: portcls.h:442
IPort * PPORT
Definition: portcls.h:1105
const DWORD dwMicSampleRates[MIC_SAMPLERATES_TESTED]
Definition: rtminiport.h:26
const int PIN_WAVEIN_OFFSET
Definition: rtminiport.h:30
const int MIC_SAMPLERATES_TESTED
Definition: rtminiport.h:22
const DWORD dwWaveSampleRates[WAVE_SAMPLERATES_TESTED]
Definition: rtminiport.h:24
const int WAVE_SAMPLERATES_TESTED
Definition: rtminiport.h:21
const int PIN_MICIN_OFFSET
Definition: rtminiport.h:31
const int PIN_WAVEOUT_OFFSET
Definition: rtminiport.h:29
NTSTATUS CreateAC97MiniportWaveRTStream(OUT CAC97MiniportWaveRTStream **pRTStream)
Definition: rtstream.cpp:38
#define IN
Definition: typedefs.h:39
#define OUT
Definition: typedefs.h:40
_Must_inspect_result_ _In_ WDFIORESREQLIST _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFIORESLIST * ResourceList
Definition: wdfresource.h:309