NTSTATUS CMiniportWaveRT::GetDeviceChannelCount ( _In_ ULONG _ulNodeId, _In_ eChannelTargetType _targetType, _Out_ UINT32 *_pulChannelCount ) { NTSTATUS ntStatus = STATUS_INVALID_DEVICE_REQUEST; PAGED_CODE (); ASSERT(_pulChannelCount); DPF_ENTER(("[CMiniportWaveRT::GetChannelCount]")); IF_TRUE_ACTION_JUMP(_ulNodeId != KSNODE_WAVE_AUDIO_ENGINE, ntStatus = STATUS_INVALID_DEVICE_REQUEST, Exit); switch (_targetType) { case eVolumeAttribute: ntStatus = GetVolumeChannelCount(_pulChannelCount); break; case eMuteAttribute: ntStatus = GetMuteChannelCount(_pulChannelCount); break; case ePeakMeterAttribute: ntStatus = GetPeakMeterChannelCount(_pulChannelCount); break; default: ntStatus = STATUS_INVALID_DEVICE_REQUEST; break; } Exit: return ntStatus; }
/*----------------------------------------------------------------------------- IMiniportAudioEngineNode::GetSupportedDeviceFormats Decscription: GetSupportedDeviceFormats get the complete format list supported by the hw Audio Engine Parameters: _In_ _ulNodeId: node id for the target audio engine node _Out_ pFormat: a buffer pointer for receiving the supported device formats _In_ ulBufferSize: a pointer to a ULONG variable that has the size of the buffer pointed by pFormat Return Value: Appropriate NTSTATUS code Called at PASSIVE_LEVEL Remarks -------------------------------------------------------------------------------------------------------------------------*/ STDMETHODIMP_(NTSTATUS) CMiniportWaveRT::GetSupportedDeviceFormats(_In_ ULONG _ulNodeId, _Out_ KSMULTIPLE_ITEM* _pFormat, _In_ ULONG _ulBufferSize) { PKSDATAFORMAT_WAVEFORMATEXTENSIBLE pDeviceFormats; ULONG cDeviceFormats; NTSTATUS ntStatus = STATUS_INVALID_DEVICE_REQUEST; PAGED_CODE (); ASSERT(_pFormat); DPF_ENTER(("[CMiniportWaveRT::GetSupportedDeviceFormats]")); IF_TRUE_ACTION_JUMP(_ulNodeId != KSNODE_WAVE_AUDIO_ENGINE, ntStatus = STATUS_INVALID_DEVICE_REQUEST, Exit); cDeviceFormats = GetAudioEngineSupportedDeviceFormats(&pDeviceFormats); KSMULTIPLE_ITEM *pKsMulti = static_cast<KSMULTIPLE_ITEM*>(_pFormat); pKsMulti->Size = sizeof(KSMULTIPLE_ITEM) + sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE) * cDeviceFormats; pKsMulti->Count = cDeviceFormats; IF_TRUE_ACTION_JUMP(_ulBufferSize < pKsMulti->Size, ntStatus = STATUS_BUFFER_TOO_SMALL, Exit); RtlCopyMemory((PVOID)(pKsMulti + 1), pDeviceFormats, sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE) * cDeviceFormats); ntStatus = STATUS_SUCCESS; Exit: return ntStatus; }
CMiniportTopologySYSVAD::~CMiniportTopologySYSVAD ( void ) /*++ Routine Description: Topology miniport destructor Arguments: Return Value: void --*/ { PAGED_CODE(); DPF_ENTER(("[%s]",__FUNCTION__)); SAFE_RELEASE(m_AdapterCommon); SAFE_RELEASE(m_PortEvents); } // ~CMiniportTopologySYSVAD
//============================================================================= CMiniportWaveCyclicStream::~CMiniportWaveCyclicStream ( void ) /*++ Routine Description: Destructor for wavecyclicstream Arguments: Return Value: NT status code. --*/ { PAGED_CODE(); DPF_ENTER(("[CMiniportWaveCyclicStream::~CMiniportWaveCyclicStream]")); if (NULL != m_pMiniportLocal) { m_pMiniportLocal->m_arInstanceCounts[m_ulPin] = 0; } } // ~CMiniportWaveCyclicStream
/*----------------------------------------------------------------------------- IMiniportAudioEngineNode::GetDeviceAttributeSteppings Decscription: When handling volume, mute, and meter related KS properties, Portcls calls this method, inside its property handlers, to know the property stepping information for the corresponding KS property. Parameters: _In_ _ulNodeId: node id for the target audio engine node _In_ _targetType: the query target (volume. mute, or peak meter) _Out_ _pKsPropMembHead: a pointer to a PKSPROPERTY_STEPPING_LONG variable for receiving returned channel count information _In_ ulBufferSize: a pointer to a ULONG variable that has the size of the buffer pointed by _pKsPropMembHead Return Value: Appropriate NTSTATUS code Called at PASSIVE_LEVEL Remarks -------------------------------------------------------------------------------------------------------------------------*/ NTSTATUS CMiniportWaveRT::GetDeviceAttributeSteppings(_In_ ULONG _ulNodeId, _In_ eChannelTargetType _targetType, _Out_ PKSPROPERTY_STEPPING_LONG _pKsPropMembHead, _In_ UINT32 _ui32DataSize) { NTSTATUS ntStatus = STATUS_INVALID_DEVICE_REQUEST; PAGED_CODE (); DPF_ENTER(("[CMiniportWaveRT::GetDeviceAttributeSteppings]")); IF_TRUE_ACTION_JUMP(_ulNodeId != KSNODE_WAVE_AUDIO_ENGINE, ntStatus = STATUS_INVALID_DEVICE_REQUEST, Exit); switch (_targetType) { case eVolumeAttribute: ntStatus = GetVolumeSteppings(_pKsPropMembHead, _ui32DataSize);; break; case eMuteAttribute: ntStatus = GetMuteSteppings(_pKsPropMembHead, _ui32DataSize);; break; case ePeakMeterAttribute: ntStatus = GetPeakMeterSteppings(_pKsPropMembHead, _ui32DataSize);; break; default: ntStatus = STATUS_INVALID_DEVICE_REQUEST; break; } Exit: return ntStatus; }
/*----------------------------------------------------------------------------- IMiniportStreamAudioEngineNode::SetStreamChannelVolume Decscription: When handling SET volume KS property for the device, Portcls calls this method, inside its property handlers, to set the current setting on the specific channel. Parameters: _In_ Channel: the target channel for this GET volume operation _In_ TargetVolume: volume value to set _In_ CurveType: type of curve to apply to the ramp _In_ CurveDuration: amount of time in hns over which to ramp the volume Return Value: Appropriate NTSTATUS code Called at PASSIVE_LEVEL Remarks -------------------------------------------------------------------------------------------------------------------------*/ STDMETHODIMP_(NTSTATUS) CMiniportWaveRTStream::SetStreamChannelVolume ( _In_ UINT32 Channel, _In_ LONG TargetVolume, _In_ AUDIO_CURVE_TYPE CurveType, _In_ ULONGLONG CurveDuration ) { UNREFERENCED_PARAMETER(CurveType); UNREFERENCED_PARAMETER(CurveDuration); NTSTATUS ntStatus = STATUS_INVALID_DEVICE_REQUEST; PAGED_CODE (); DPF_ENTER(("[CMiniportWaveRTStream::SetStreamChannelVolume]")); // Snap the volume level to our range of steppings. LONG lVolume = VOLUME_NORMALIZE_IN_RANGE(TargetVolume); // If Channel is ALL_CHANNELS_ID, then set the level on all channels if ( ALL_CHANNELS_ID == Channel ) { for (UINT32 i = 0; i < m_pWfExt->Format.nChannels; i++) { ntStatus = SetChannelVolume(i, lVolume); } } else { ntStatus = SetChannelVolume(Channel, lVolume); } return ntStatus; }
CMiniportWaveCyclicStreamMSVAD::TransferCount ( void ) /*++ Routine Description: The TransferCount function returns the size in bytes of the buffer currently being transferred by a DMA object. Callers of TransferCount can run at any IRQL. Arguments: Return Value: ULONG - The return value is the size in bytes of the buffer currently being transferred. --*/ { DPF_ENTER(("[CMiniportWaveCyclicStreamMSVAD::TransferCount]")); return m_ulDmaBufferSize; }
CMiniportTopologyMSVAD::~CMiniportTopologyMSVAD ( void ) /*++ Routine Description: Topology miniport destructor Arguments: Return Value: void --*/ { PAGED_CODE(); DPF_ENTER(("[%s]",__FUNCTION__)); if (m_AdapterCommon) { m_AdapterCommon->Release(); } } // ~CMiniportTopologyMSVAD
CMiniportTopologyMSVAD::CMiniportTopologyMSVAD ( void ) /*++ Routine Description: Topology miniport constructor Arguments: Return Value: void --*/ { PAGED_CODE(); DPF_ENTER(("[%s]",__FUNCTION__)); m_AdapterCommon = NULL; m_FilterDescriptor = NULL; } // CMiniportTopologyMSVAD
/*----------------------------------------------------------------------------- IMiniportStreamAudioEngineNode::GetStreamChannelCount Decscription: When handling volume, mute, and meter related KS properties, Portcls calls this method, inside its property handlers, to know the number of channels for the corresponding KS property. Parameters: _In_ _targetType: the query target (volume, mute, or peak meter) _Out_ _pulChannelCount: a pointer to a UINT32 variable for receiving returned channel count information Return Value: Appropriate NTSTATUS code Called at PASSIVE_LEVEL Remarks -------------------------------------------------------------------------------------------------------------------------*/ NTSTATUS CMiniportWaveRTStream::GetStreamChannelCount(_In_ eChannelTargetType _targetType,_Out_ UINT32 *_pulChannelCount) { NTSTATUS ntStatus = STATUS_INVALID_DEVICE_REQUEST; PAGED_CODE (); DPF_ENTER(("[CMiniportWaveRTStream::GetStreamChannelCount]")); switch (_targetType) { case eVolumeAttribute: ntStatus = GetVolumeChannelCount(_pulChannelCount); break; case eMuteAttribute: ntStatus = GetMuteChannelCount(_pulChannelCount); break; case ePeakMeterAttribute: ntStatus = GetPeakMeterChannelCount(_pulChannelCount); break; default: ntStatus = STATUS_INVALID_DEVICE_REQUEST; break; } return ntStatus; }
CMiniportWaveCyclicStreamMSVAD::PhysicalAddress ( void ) /*++ Routine Description: MaximumBufferSize returns the size in bytes of the largest buffer this DMA object is configured to support. Callers of MaximumBufferSize can run at any IRQL Arguments: Return Value: PHYSICAL_ADDRESS - The return value is the size in bytes of the largest buffer this DMA object is configured to support. --*/ { DPF_ENTER(("[CMiniportWaveCyclicStreamMSVAD::PhysicalAddress]")); PHYSICAL_ADDRESS pAddress; pAddress.QuadPart = (LONGLONG) m_pvDmaBuffer; return pAddress; } // PhysicalAddress
NTSTATUS CMiniportWaveRTStream::GetScoStreamNtStatus() /*++ Routine Description: Checks if the Bluetooth SCO HFP connection is up, if not, an error is returned. Return Value: NT status code. --*/ { DPF_ENTER(("[CMiniportWaveRTStream::GetScoStreamNtStatus]")); NTSTATUS ntStatus = STATUS_INVALID_DEVICE_STATE; if (m_ScoOpen) { PBTHHFPDEVICECOMMON bthHfpDevice; ASSERT(m_pMiniport->IsBthHfpDevice()); bthHfpDevice = m_pMiniport->GetBthHfpDevice(); // weak ref. ASSERT(bthHfpDevice != NULL); if (bthHfpDevice->GetStreamStatus()) { ntStatus = STATUS_SUCCESS; } } return ntStatus; }
//============================================================================= STDMETHODIMP_(ULONG) CMiniportWaveCyclicStream::SetNotificationFreq( IN ULONG Interval, OUT PULONG FramingSize ) /*++ Routine Description: The SetNotificationFrequency function sets the frequency at which notification interrupts are generated. Callers of SetNotificationFrequency should run at IRQL PASSIVE_LEVEL. Arguments: Interval - Value indicating the interval between interrupts, expressed in milliseconds FramingSize - Pointer to a ULONG value where the number of bytes equivalent to Interval milliseconds is returned Return Value: NT status code. --*/ { PAGED_CODE(); ASSERT(FramingSize); DPF_ENTER(("[CMiniportWaveCyclicStream::SetNotificationFreq]")); m_pMiniport->m_NotificationInterval = Interval; *FramingSize = m_usBlockAlign * m_pMiniport->m_SamplingFrequency * Interval / 1000; return m_pMiniport->m_NotificationInterval; } // SetNotificationFreq
CMiniportWaveCyclicStreamMSVAD::GetAdapterObject ( void ) /*++ Routine Description: The GetAdapterObject function returns the DMA object's internal adapter object. Callers of GetAdapterObject can run at any IRQL. Arguments: Return Value: PADAPTER_OBJECT - The return value is the object's internal adapter object. --*/ { DPF_ENTER(("[CMiniportWaveCyclicStreamMSVAD::GetAdapterObject]")); // MSVAD does not have need a physical DMA channel. Therefore it // does not have physical DMA structure. return NULL; } // GetAdapterObject
//============================================================================= NTSTATUS PropertyHandler_TopoFilter(IN PPCPROPERTY_REQUEST PropertyRequest) /*++ Routine Description: Redirects property request to miniport object Arguments: PropertyRequest - Return Value: NT status code. --*/ { PAGED_CODE(); ASSERT(PropertyRequest); DPF_ENTER(("[PropertyHandler_TopoFilter]")); // PropertryRequest structure is filled by portcls. // MajorTarget is a pointer to miniport object for miniports. // NTSTATUS ntStatus = STATUS_INVALID_DEVICE_REQUEST; PCMiniportTopology pMiniport = (PCMiniportTopology)PropertyRequest->MajorTarget; if (IsEqualGUIDAligned(*PropertyRequest->PropertyItem->Set, KSPROPSETID_Jack) && (PropertyRequest->PropertyItem->Id == KSPROPERTY_JACK_DESCRIPTION)) { ntStatus = pMiniport->PropertyHandlerJackDescription(PropertyRequest); } return ntStatus; } // PropertyHandler_TopoFilter
CMiniportWaveCyclicStreamMSVAD::FreeBuffer ( void ) /*++ Routine Description: The FreeBuffer function frees the buffer allocated by AllocateBuffer. Because the buffer is automatically freed when the DMA object is deleted, this function is not normally used. Callers of FreeBuffer should run at IRQL PASSIVE_LEVEL. Arguments: Return Value: void --*/ { PAGED_CODE(); DPF_ENTER(("[CMiniportWaveCyclicStreamMSVAD::FreeBuffer]")); if ( m_pvDmaBuffer ) { ExFreePoolWithTag( m_pvDmaBuffer, SNEAKY_POOLTAG ); m_ulDmaBufferSize = 0; } } // FreeBuffer
//============================================================================= STDMETHODIMP CMiniportTopology::GetDescription(OUT PPCFILTER_DESCRIPTOR * OutFilterDescriptor) /*++ Routine Description: The GetDescription function gets a pointer to a filter description. It provides a location to deposit a pointer in miniport's description structure. This is the placeholder for the FromNode or ToNode fields in connections which describe connections to the filter's pins. Arguments: OutFilterDescriptor - Pointer to the filter description. Return Value: NT status code. --*/ { PAGED_CODE(); ASSERT(OutFilterDescriptor); DPF_ENTER(("[%s]",__FUNCTION__)); *OutFilterDescriptor = m_FilterDescriptor; return (STATUS_SUCCESS); } // GetDescription
//============================================================================= NTSTATUS CMiniportTopology::PropertyHandlerCpuResources(IN PPCPROPERTY_REQUEST PropertyRequest) /*++ Routine Description: Processes KSPROPERTY_AUDIO_CPURESOURCES Arguments: PropertyRequest - property request structure Return Value: NT status code. --*/ { PAGED_CODE(); DPF_ENTER(("[%s]",__FUNCTION__)); NTSTATUS ntStatus = STATUS_INVALID_DEVICE_REQUEST; if (PropertyRequest->Verb & KSPROPERTY_TYPE_BASICSUPPORT) { ntStatus = PropertyHandler_BasicSupport(PropertyRequest, KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT, VT_ILLEGAL); } else if (PropertyRequest->Verb & KSPROPERTY_TYPE_GET) { ntStatus = ValidatePropertyParams(PropertyRequest, sizeof(ULONG)); if (NT_SUCCESS(ntStatus)) { *(PLONG(PropertyRequest->Value)) = KSAUDIO_CPU_RESOURCES_HOST_CPU; PropertyRequest->ValueSize = sizeof(LONG); } } return ntStatus; } // PropertyHandlerCpuResources
CMiniportWaveCyclicStreamMSVAD::SetBufferSize ( IN ULONG BufferSize ) /*++ Routine Description: The SetBufferSize function sets the current buffer size. This value is set to the allocated buffer size when AllocateBuffer is called. The DMA object does not actually use this value internally. This value is maintained by the object to allow its various clients to communicate the intended size of the buffer. Callers of SetBufferSize can run at any IRQL. Arguments: BufferSize - Current size in bytes. Return Value: void --*/ { DPF_ENTER(("[CMiniportWaveCyclicStreamMSVAD::SetBufferSize]")); if ( BufferSize <= m_ulDmaBufferSize ) { m_ulDmaBufferSize = BufferSize; } else { DPF(D_ERROR, ("Tried to enlarge dma buffer size")); } } // SetBufferSize
//============================================================================= NTSTATUS PropertyHandler_Topology ( IN PPCPROPERTY_REQUEST PropertyRequest ) /*++ Routine Description: Redirects property request to miniport object Arguments: PropertyRequest - Return Value: NT status code. --*/ { PAGED_CODE(); ASSERT(PropertyRequest); DPF_ENTER(("[PropertyHandler_Topology]")); return ((PCMiniportTopology) (PropertyRequest->MajorTarget))->PropertyHandlerGeneric ( PropertyRequest ); } // PropertyHandler_Topology
//============================================================================= CMiniportWaveCyclicStream::~CMiniportWaveCyclicStream ( void ) /*++ Routine Description: Destructor for wavecyclicstream Arguments: Return Value: NT status code. --*/ { PAGED_CODE(); DPF_ENTER(("[CMiniportWaveCyclicStream::~CMiniportWaveCyclicStream]")); if (NULL != m_pMiniportLocal) { if (m_fCapture) { m_pMiniportLocal->m_fCaptureAllocated = FALSE; } else { m_pMiniportLocal->m_fRenderAllocated = FALSE; } } } // ~CMiniportWaveCyclicStream
//============================================================================= CMiniportWaveCyclicStream::~CMiniportWaveCyclicStream(void) /*++ Routine Description: Destructor for wavecyclicstream Arguments: Return Value: NT status code. --*/ { PAGED_CODE(); DPF_ENTER(("[CMiniportWaveCyclicStream::~CMiniportWaveCyclicStream]")); if (m_pTimer) { KeCancelTimer(m_pTimer); ExFreePoolWithTag(m_pTimer, MSVAD_POOLTAG); } if (m_pDpc) { ExFreePoolWithTag( m_pDpc, MSVAD_POOLTAG ); } // Free the DMA buffer FreeBuffer(); if (NULL != m_pMiniport) { if (m_fCapture) { m_pMiniport->m_fCaptureAllocated = FALSE; } else { m_pMiniport->m_fRenderAllocated = FALSE; } } } // ~CMiniportWaveCyclicStream
/*----------------------------------------------------------------------------- IMiniportStreamAudioEngineNode::GetStreamAttributeSteppings Decscription: When handling volume, mute, and meter related KS properties, Portcls calls this method, inside its property handlers, to know the property stepping information for the corresponding KS property. Parameters: _In_ _targetType: the query target (volume. mute, or peak meter) _Out_ _pKsPropMembHead: a pointer to a PKSPROPERTY_STEPPING_LONG variable for receiving returned channel count information _In_ ulBufferSize: a pointer to a ULONG variable that has the size of the buffer pointed by _pKsPropMembHead Return Value: Appropriate NTSTATUS code Called at PASSIVE_LEVEL Remarks -------------------------------------------------------------------------------------------------------------------------*/ NTSTATUS CMiniportWaveRTStream::GetStreamAttributeSteppings(_In_ eChannelTargetType _targetType, _Out_ PKSPROPERTY_STEPPING_LONG _pKsPropMembHead, _In_ UINT32 _ui32DataSize) { NTSTATUS ntStatus = STATUS_INVALID_DEVICE_REQUEST; PAGED_CODE (); DPF_ENTER(("[CMiniportWaveRTStream::GetDeviceAttributeSteppings]")); switch (_targetType) { case eVolumeAttribute: ntStatus = GetVolumeSteppings(_pKsPropMembHead, _ui32DataSize);; break; case eMuteAttribute: ntStatus = GetMuteSteppings(_pKsPropMembHead, _ui32DataSize);; break; case ePeakMeterAttribute: ntStatus = GetPeakMeterSteppings(_pKsPropMembHead, _ui32DataSize);; break; default: ntStatus = STATUS_INVALID_DEVICE_REQUEST; break; } return ntStatus; }
//============================================================================= NTSTATUS CMiniportTopologyMSVAD::Init ( IN PUNKNOWN UnknownAdapter_, IN PPORTTOPOLOGY Port_ ) /*++ Routine Description: Initializes the topology miniport. Arguments: UnknownAdapter - Port_ - Pointer to topology port Return Value: NT status code. --*/ { UNREFERENCED_PARAMETER(Port_); PAGED_CODE(); ASSERT(UnknownAdapter_); ASSERT(Port_); DPF_ENTER(("[CMiniportTopologyMSVAD::Init]")); NTSTATUS ntStatus; ntStatus = UnknownAdapter_->QueryInterface ( IID_IAdapterCommon, (PVOID *) &m_AdapterCommon ); if (NT_SUCCESS(ntStatus)) { m_AdapterCommon->MixerReset(); } if (!NT_SUCCESS(ntStatus)) { // clean up AdapterCommon if (m_AdapterCommon) { m_AdapterCommon->Release(); m_AdapterCommon = NULL; } } return ntStatus; } // Init
//============================================================================= STDMETHODIMP CMiniportTopology::Init ( IN PUNKNOWN UnknownAdapter, IN PRESOURCELIST ResourceList, IN PPORTTOPOLOGY Port_ ) /*++ Routine Description: The Init function initializes the miniport. Callers of this function should run at IRQL PASSIVE_LEVEL Arguments: UnknownAdapter - A pointer to the Iuknown interface of the adapter object. ResourceList - Pointer to the resource list to be supplied to the miniport during initialization. The port driver is free to examine the contents of the ResourceList. The port driver will not be modify the ResourceList contents. Port - Pointer to the topology port object that is linked with this miniport. Return Value: NT status code. --*/ { UNREFERENCED_PARAMETER(ResourceList); PAGED_CODE(); ASSERT(UnknownAdapter); ASSERT(Port_); DPF_ENTER(("[CMiniportTopology::Init]")); NTSTATUS ntStatus; ntStatus = CMiniportTopologyMSVAD::Init ( UnknownAdapter, Port_ ); if (NT_SUCCESS(ntStatus)) { m_FilterDescriptor = &MiniportFilterDescriptor; m_AdapterCommon->MixerMuxWrite(KSPIN_TOPO_MIC_SOURCE); } return ntStatus; } // Init
/*----------------------------------------------------------------------------- IMiniportStreamAudioEngineNode::GetLfxState Description: Portcls calls this method to get a offload stream's Lfx state Parameters _Out_ pbEnable: a pointer to a BOOL value for receieving the returned LFX state Return Value: Appropriate NTSTATUS code Called at PASSIVE_LEVEL Remarks The Lfx operations (on the offload stream) inside HW Audio Engine (such as src, dsp, and other special effects) are hidden from the software audio stack. So, the driver should return TRUE if any one of the effects is on and returns FALSE when all the opertations are off. -------------------------------------------------------------------------------------------------------------------------*/ NTSTATUS CMiniportWaveRTStream::GetLfxState(_Out_ BOOL *_pbEnable) { PAGED_CODE (); DPF_ENTER(("[CMiniportWaveRTStream::GetLfxState]")); *_pbEnable = m_bLfxEnabled; return STATUS_SUCCESS; }
//============================================================================= NTSTATUS CMiniportTopologyMSVAD::DataRangeIntersection ( IN ULONG PinId, IN PKSDATARANGE ClientDataRange, IN PKSDATARANGE MyDataRange, IN ULONG OutputBufferLength, OUT PVOID ResultantFormat OPTIONAL, OUT PULONG ResultantFormatLength ) /*++ Routine Description: The DataRangeIntersection function determines the highest quality intersection of two data ranges. Topology miniport does nothing. Arguments: PinId - Pin for which data intersection is being determined. ClientDataRange - Pointer to KSDATARANGE structure which contains the data range submitted by client in the data range intersection property request MyDataRange - Pin's data range to be compared with client's data range OutputBufferLength - Size of the buffer pointed to by the resultant format parameter ResultantFormat - Pointer to value where the resultant format should be returned ResultantFormatLength - Actual length of the resultant format that is placed at ResultantFormat. This should be less than or equal to OutputBufferLength Return Value: NT status code. --*/ { UNREFERENCED_PARAMETER(PinId); UNREFERENCED_PARAMETER(ClientDataRange); UNREFERENCED_PARAMETER(MyDataRange); UNREFERENCED_PARAMETER(OutputBufferLength); UNREFERENCED_PARAMETER(ResultantFormat); UNREFERENCED_PARAMETER(ResultantFormatLength); PAGED_CODE(); DPF_ENTER(("[%s]",__FUNCTION__)); return (STATUS_NOT_IMPLEMENTED); } // DataRangeIntersection
/*----------------------------------------------------------------------------- IMiniportStreamAudioEngineNode::GetStreamChannelVolume Decscription: When handling GET volume KS property for the device, Portcls calls this method, inside its property handlers, to get the current setting on the specific channel. Parameters: _In_ _uiChannel: the target channel for this GET volume operation _Out_ _pVolume: a pointer to a LONG variable for receiving returned information Return Value: Appropriate NTSTATUS code Called at PASSIVE_LEVEL Remarks -------------------------------------------------------------------------------------------------------------------------*/ NTSTATUS CMiniportWaveRTStream::GetStreamChannelVolume(_In_ UINT32 _uiChannel, _Out_ LONG *_pVolume) { PAGED_CODE (); DPF_ENTER(("[CMiniportWaveRTStream::GetStreamChannelVolume]")); *_pVolume = m_plVolumeLevel[_uiChannel]; return STATUS_SUCCESS; }
/*----------------------------------------------------------------------------- IMiniportStreamAudioEngineNode::SetLfxState Decscription: Portcls calls this method to set a offload stream's Lfx state Parameters: _In_ bEnable: a BOOL value. TRU: to enable Lfx, FALSE: to disable Lfx Return Value: Appropriate NTSTATUS code Called at PASSIVE_LEVEL Remarks The local operations (on the offload stream) inside HW Audio Engine (such as src, dsp, and other special effects) are hidden from the software audio stack. So, when handling disabling Lfx, the driver should ALL the effects. When enabling Lfx, it's up the driver+HW Audio Engine to decide what opertations to turn on when they see appropriate. -------------------------------------------------------------------------------------------------------------------------*/ NTSTATUS CMiniportWaveRTStream::SetLfxState(_In_ BOOL _bEnable) { PAGED_CODE (); DPF_ENTER(("[CMiniportWaveRTStream::SetGfxState]")); UNREFERENCED_PARAMETER(_bEnable); m_bLfxEnabled = _bEnable; return STATUS_SUCCESS; }
NTSTATUS CMiniportWaveRT::GetVolumeChannelCount(_Out_ UINT32 *_pulChannelCount) { NTSTATUS ntStatus = STATUS_SUCCESS; PAGED_CODE (); ASSERT (_pulChannelCount); DPF_ENTER(("[CMiniportWaveRT::GetVolumeChannelCount]")); *_pulChannelCount = m_DeviceMaxChannels; return ntStatus; }