2#define STR_MODULENAME "AC97 Miniport: "
304#pragma code_seg("PAGE")
337 if (PropertyRequest->ValueSize <
sizeof(
LONG))
341 if (PropertyRequest->Value)
406 int nWavePlaybackEntries = 0;
407 int nWaveRecordingEntries = 0;
412 DOUT (
DBG_PRINT, (
"[CMiniport::BuildDataRangeInformation]"));
460 nWavePlaybackEntries++;
490 nWaveRecordingEntries++;
551 ASSERT (OutFilterDescriptor);
587 PVOID ResultantFormat,
588 PULONG ResultantFormatLength
610 DOUT (
DBG_PRINT, (
"[DataRangeIntersection] We don't support DSOUND specifier"));
640 DOUT (
DBG_WARNING, (
"[DataRangeIntersection] Mono requested for WaveIn or WaveOut"));
672 if (nMaxChannels & 0x01)
771 DOUT (
DBG_STREAM, (
"[DataRangeIntersection] Frequency: %d, Channels: %d, bps: %d, ChannelMask: %X",
811 DOUT (
DBG_VSR, (
"[NewStream] TestDataFormat failed!"));
902 DOUT (
DBG_WARNING, (
"[TestDataFormat] Unsupported WAVEFORMATEXTENSIBLE!"));
930 DOUT (
DBG_WARNING, (
"[TestDataFormat] Invalid Number of Channels for PIN_MICIN!"));
937 DOUT (
DBG_WARNING, (
"[TestDataFormat] Invalid Number of Channels for PIN_WAVEIN!"));
944 DOUT (
DBG_WARNING, (
"[TestDataFormat] Invalid Number of Channels for PIN_WAVEOUT!"));
955 DOUT (
DBG_STREAM, (
"[TestDataFormat] PCMEX - Frequency: %d, Channels: %d, bps: %d, ChannelMask: %X",
961 DOUT (
DBG_STREAM, (
"[TestDataFormat] PCM - Frequency: %d, Channels: %d, bps: %d",
1029 DOUT (
DBG_ERROR, (
"Failed to connect the ISR with InterruptSync!"));
1090 DOUT (
DBG_ERROR, (
"Unknown configuration for wave miniport!"));
1127 DOUT (
DBG_ERROR, (
"Failed to connect the ISR with InterruptSync!"));
1155 DOUT (
DBG_PRINT, (
"[CMiniport::NonDelegatingQueryInterface]"));
1222 NTSTATUS ntStatus = UnknownAdapter->
1326 USHORT DMAStatusRegister;
1365 if (!GlobalStatus || (GlobalStatus == 0xFFFFFFFF))
1380 ReadBMControlRegister16 (
PO_SR);
1412 ReadBMControlRegister16 (
PI_SR);
1441 ReadBMControlRegister16 (
MC_SR);
@ AC97REG_RECORD_SAMPLERATE
@ AC97REG_FRONT_SAMPLERATE
virtual void InterruptServiceRoutine() PURE
void PowerChangeNotify(IN POWER_STATE NewState)
ULONG GetCurrentSampleRate(void)
NTSTATUS ProcessResources(IN PRESOURCELIST ResourceList)
PINTERRUPTSYNC InterruptSync
NTSTATUS BuildDataRangeInformation(void)
CMiniportStream * Streams[PIN_MICIN_OFFSET+1]
DEVICE_POWER_STATE m_PowerState
NTSTATUS ValidateFormat(IN PKSDATAFORMAT DataFormat, IN WavePins Pin)
PADAPTERCOMMON AdapterCommon
NTSTATUS TestDataFormat(IN PKSDATAFORMAT Format, IN WavePins Pin)
static NTSTATUS NTAPI PropertyChannelConfig(IN PPCPROPERTY_REQUEST PropertyRequest)
static NTSTATUS NTAPI InterruptServiceRoutine(IN PINTERRUPTSYNC InterruptSync, IN PVOID StaticContext)
NTSTATUS NonDelegatingQueryInterface(_In_ REFIID Interface, _COM_Outptr_ PVOID *Object, _In_ REFIID iMiniPort, _In_ PMINIPORT miniPort)
_In_ PRESOURCELIST _In_ PPORT Port_
KSDATAFORMAT * PKSDATAFORMAT
#define NT_SUCCESS(StatCode)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
static KSDATARANGE_AUDIO PinDataRangesMicStream[MIC_SAMPLERATES_TESTED]
static KSDATARANGE_AUDIO PinDataRangesPCMStreamRender[WAVE_SAMPLERATES_TESTED]
void __fastcall obj_AddRef(PUNKNOWN obj, void **ppvObject)
static PCPROPERTY_ITEM PropertiesDAC[]
static PKSDATARANGE PinDataRangePointersAnalogBridge[]
static PCPIN_DESCRIPTOR MiniportPins[]
static KSDATARANGE PinDataRangesAnalogBridge[]
static PKSDATARANGE PinDataRangePointersPCMStreamRender[WAVE_SAMPLERATES_TESTED]
void __fastcall obj_Release(void **ppvObject)
static PKSDATARANGE PinDataRangePointersPCMStreamCapture[WAVE_SAMPLERATES_TESTED]
static PKSDATARANGE PinDataRangePointersMicStream[MIC_SAMPLERATES_TESTED]
static KSDATARANGE_AUDIO PinDataRangesPCMStreamCapture[WAVE_SAMPLERATES_TESTED]
static PCNODE_DESCRIPTOR MiniportNodes[]
static PCCONNECTION_DESCRIPTOR MiniportConnections[]
static PCFILTER_DESCRIPTOR MiniportFilterDescriptor
STDMETHODIMP_(void) CMiniport
#define DOUT(lvl, strings)
void __fastcall obj_AddRef(PUNKNOWN obj, void **ppvObject)
const DWORD dwMicSampleRates[MIC_SAMPLERATES_TESTED]
const int PIN_WAVEIN_OFFSET
const int MIC_SAMPLERATES_TESTED
void __fastcall obj_Release(void **ppvObject)
const DWORD dwWaveSampleRates[WAVE_SAMPLERATES_TESTED]
const int WAVE_SAMPLERATES_TESTED
const int PIN_MICIN_OFFSET
const int PIN_WAVEOUT_OFFSET
@ PINC_CENTER_LFE_PRESENT
@ NODEC_PCM_VSR_INDEPENDENT_RATES
#define KSPROPERTY_TYPE_SET
#define STATICGUIDOF(guid)
IN PDCB IN VBO IN ULONG IN BOOLEAN Pin
const ULONG GLOB_STA_PIINT
const ULONG GLOB_STA_POINT
const ULONG GLOB_STA_MINT
NTSTATUS NTAPI PcNewInterruptSync(OUT PINTERRUPTSYNC *OutInterruptSync, IN PUNKNOWN OuterUnknown OPTIONAL, IN PRESOURCELIST ResourceList, IN ULONG ResourceIndex, IN INTERRUPTSYNCMODE Mode)
#define KSDATAFORMAT_SPECIFIER_NONE
union KSDATAFORMAT KSDATARANGE
@ KSPIN_COMMUNICATION_NONE
@ KSPIN_COMMUNICATION_SINK
union KSDATAFORMAT * PKSDATARANGE
static PCPIN_DESCRIPTOR MiniportPins[]
static PCNODE_DESCRIPTOR MiniportNodes[]
static PCCONNECTION_DESCRIPTOR MiniportConnections[]
static PCFILTER_DESCRIPTOR MiniportFilterDescriptor
WAVEFORMATPCMEX * PWAVEFORMATPCMEX
static HRESULT QueryInterface(REFIID, void **)
static ULONG WINAPI AddRef(IStream *iface)
#define _Use_decl_annotations_
#define UNREFERENCED_PARAMETER(P)
#define STATUS_NOT_SUPPORTED
#define STATUS_DEVICE_CONFIGURATION_ERROR
IInterruptSync * PINTERRUPTSYNC
IResourceList * PRESOURCELIST
#define DEFINE_PCAUTOMATION_TABLE_PROP(AutomationTable, PropertyTable)
IMiniportWavePci * PMINIPORTWAVEPCI
@ InterruptSyncModeNormal
IPowerNotify * PPOWERNOTIFY
#define STATUS_BUFFER_TOO_SMALL
#define STATUS_BUFFER_OVERFLOW
ULONG MinimumBitsPerSample
ULONG MaximumBitsPerSample
ULONG MaximumSampleFrequency
ULONG MinimumSampleFrequency
KSPIN_DESCRIPTOR KsPinDescriptor
union WAVEFORMATEXTENSIBLE::@3033 Samples
#define STATUS_INVALID_PARAMETER
#define STATUS_UNSUCCESSFUL
#define STATUS_INSUFFICIENT_RESOURCES
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
_In_ WDFREQUEST _In_ size_t OutputBufferLength
_Must_inspect_result_ _In_ WDFIORESREQLIST _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFIORESLIST * ResourceList
#define IsEqualGUIDAligned(guid1, guid2)
#define DBG_PRINT(ppi, ch, level)
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject