Author: janderwald
Date: Tue May 5 17:58:56 2009
New Revision: 40794
URL:
http://svn.reactos.org/svn/reactos?rev=40794&view=rev
Log:
- Add IPortWaveRT, IPortWaveRTStream, IMiniportWaveRTStream,
IMiniportWaveRTStreamNotification, IMiniportWaveRT interface
- Add KSAUDIO_POSITION, KSRTAUDIO_HWLATENCY, KSRTAUDIO_HWREGISTER structure
Modified:
trunk/reactos/include/ddk/portcls.h
trunk/reactos/include/psdk/ksmedia.h
Modified: trunk/reactos/include/ddk/portcls.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/portcls.h?rev=…
==============================================================================
--- trunk/reactos/include/ddk/portcls.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/portcls.h [iso-8859-1] Tue May 5 17:58:56 2009
@@ -1591,6 +1591,235 @@
typedef IMiniportWavePci *PMINIPORTWAVEPCI;
+
+#if !defined(DEFINE_ABSTRACT_MINIPORTWAVERTSTREAM)
+
+#define DEFINE_ABSTRACT_MINIPORTWAVERTSTREAM() \
+ STDMETHOD_(NTSTATUS,SetFormat) \
+ ( THIS_ \
+ IN PKSDATAFORMAT DataFormat \
+ ) PURE; \
+ STDMETHOD_(NTSTATUS,SetState) \
+ ( THIS_ \
+ IN KSSTATE State \
+ ) PURE; \
+ STDMETHOD_(NTSTATUS,GetPosition) \
+ ( THIS_ \
+ OUT PKSAUDIO_POSITION Position \
+ ) PURE; \
+ STDMETHOD_(NTSTATUS,AllocateAudioBuffer) \
+ ( THIS_ \
+ IN ULONG RequestedSize, \
+ OUT PMDL *AudioBufferMdl, \
+ OUT ULONG *ActualSize, \
+ OUT ULONG *OffsetFromFirstPage, \
+ OUT MEMORY_CACHING_TYPE *CacheType \
+ ) PURE; \
+ STDMETHOD_(VOID,FreeAudioBuffer) \
+ ( THIS_ \
+ IN PMDL AudioBufferMdl, \
+ IN ULONG BufferSize \
+ ) PURE; \
+ STDMETHOD_(VOID,GetHWLatency) \
+ ( THIS_ \
+ OUT KSRTAUDIO_HWLATENCY *hwLatency \
+ ) PURE; \
+ STDMETHOD_(NTSTATUS,GetPositionRegister) \
+ ( THIS_ \
+ OUT KSRTAUDIO_HWREGISTER *Register \
+ ) PURE; \
+ STDMETHOD_(NTSTATUS,GetClockRegister) \
+ ( THIS_ \
+ OUT KSRTAUDIO_HWREGISTER *Register \
+ ) PURE;
+
+#endif
+
+
+/* ===============================================================
+ IAdapterPowerManagement Interface
+*/
+
+#if (NTDDI_VERSION >= NTDDI_VISTA)
+/* ===============================================================
+ IPortWaveRT Interface
+*/
+
+DEFINE_GUID(CLSID_PortWaveRT, 0xcc9be57a, 0xeb9e, 0x42b4, 0x94, 0xfc, 0xc, 0xad, 0x3d,
0xbc, 0xe7, 0xfa);
+DEFINE_GUID(IID_IPortWaveRT, 0x339ff909, 0x68a9, 0x4310, 0xb0, 0x9b, 0x27, 0x4e, 0x96,
0xee, 0x4c, 0xbd);
+
+#undef INTERFACE
+#define INTERFACE IPortWaveRT
+
+DECLARE_INTERFACE_(IPortWaveRT,IPort)
+{
+ DEFINE_ABSTRACT_UNKNOWN() // For IUnknown
+
+ DEFINE_ABSTRACT_PORT() // For IPort
+};
+
+typedef IPortWaveRT *PPORTWAVERT;
+
+
+/* ===============================================================
+ IPortWaveRTStream Interface
+*/
+
+#undef INTERFACE
+#define INTERFACE IPortWaveRTStream
+
+DEFINE_GUID(IID_IPortWaveRTStream, 0x1809ce5a, 0x64bc, 0x4e62, 0xbd, 0x7d, 0x95, 0xbc,
0xe4, 0x3d, 0xe3, 0x93);
+
+DECLARE_INTERFACE_(IPortWaveRTStream, IUnknown)
+{
+ DEFINE_ABSTRACT_UNKNOWN()
+
+ STDMETHOD_(PMDL, AllocatePagesForMdl)
+ ( THIS_
+ IN PHYSICAL_ADDRESS HighAddress,
+ IN SIZE_T TotalBytes
+ ) PURE;
+
+ STDMETHOD_(PMDL, AllocateContiguousPagesForMdl)
+ ( THIS_
+ IN PHYSICAL_ADDRESS LowAddress,
+ IN PHYSICAL_ADDRESS HighAddress,
+ IN SIZE_T TotalBytes
+ ) PURE;
+
+ STDMETHOD_(PVOID, MapAllocatedPages)
+ ( THIS_
+ IN PMDL MemoryDescriptorList,
+ IN MEMORY_CACHING_TYPE CacheType
+ ) PURE;
+
+ STDMETHOD_(VOID, UnmapAllocatedPages)
+ ( THIS_
+ IN PVOID BaseAddress,
+ IN PMDL MemoryDescriptorList
+ ) PURE;
+
+ STDMETHOD_(VOID, FreePagesFromMdl)
+ ( THIS_
+ IN PMDL MemoryDescriptorList
+ ) PURE;
+
+ STDMETHOD_(ULONG, GetPhysicalPagesCount)
+ ( THIS_
+ IN PMDL MemoryDescriptorList
+ ) PURE;
+
+ STDMETHOD_(PHYSICAL_ADDRESS, GetPhysicalPageAddress)
+ ( THIS_
+ IN PMDL MemoryDescriptorList,
+ IN ULONG Index
+ ) PURE;
+};
+
+typedef IPortWaveRTStream *PPORTWAVERTSTREAM;
+
+
+/* ===============================================================
+ IMiniportWaveRTStream Interface
+*/
+
+#undef INTERFACE
+#define INTERFACE IMiniportWaveRTStream
+
+DEFINE_GUID(IID_IMiniportWaveRTStream, 0xac9ab, 0xfaab, 0x4f3d, 0x94, 0x55, 0x6f, 0xf8,
0x30, 0x6a, 0x74, 0xa0);
+
+DECLARE_INTERFACE_(IMiniportWaveRTStream, IUnknown)
+{
+ DEFINE_ABSTRACT_UNKNOWN()
+ DEFINE_ABSTRACT_MINIPORTWAVERTSTREAM()
+};
+
+typedef IMiniportWaveRTStream *PMINIPORTWAVERTSTREAM;
+
+
+/* ===============================================================
+ IMiniportWaveRTStreamNotification Interface
+*/
+
+#undef INTERFACE
+#define INTERFACE IMiniportWaveRTStreamNotification
+
+DEFINE_GUID(IID_IMiniportWaveRTStreamNotification, 0x23759128, 0x96f1, 0x423b, 0xab,
0x4d, 0x81, 0x63, 0x5b, 0xcf, 0x8c, 0xa1);
+
+DECLARE_INTERFACE_(IMiniportWaveRTStreamNotification, IMiniportWaveRTStream)
+{
+ DEFINE_ABSTRACT_UNKNOWN()
+
+ DEFINE_ABSTRACT_MINIPORTWAVERTSTREAM()
+
+ STDMETHOD_(NTSTATUS,AllocateBufferWithNotification)
+ ( THIS_
+ IN ULONG NotificationCount,
+ IN ULONG RequestedSize,
+ OUT PMDL *AudioBufferMdl,
+ OUT ULONG *ActualSize,
+ OUT ULONG *OffsetFromFirstPage,
+ OUT MEMORY_CACHING_TYPE *CacheType
+ ) PURE;
+
+ STDMETHOD_(VOID,FreeBufferWithNotification)
+ ( THIS_
+ IN PMDL AudioBufferMdl,
+ IN ULONG BufferSize
+ ) PURE;
+
+ STDMETHOD_(NTSTATUS,RegisterNotificationEvent)
+ ( THIS_
+ IN PKEVENT NotificationEvent
+ ) PURE;
+
+ STDMETHOD_(NTSTATUS,UnregisterNotificationEvent)
+ ( THIS_
+ IN PKEVENT NotificationEvent
+ ) PURE;
+};
+
+/* ===============================================================
+ IMiniportWaveRT Interface
+*/
+
+#undef INTERFACE
+#define INTERFACE IMiniportWaveRT
+
+DEFINE_GUID(IID_IMiniportWaveRT, 0xf9fc4d6, 0x6061, 0x4f3c, 0xb1, 0xfc, 0x7, 0x5e, 0x35,
0xf7, 0x96, 0xa);
+
+DECLARE_INTERFACE_(IMiniportWaveRT, IMiniport)
+{
+ DEFINE_ABSTRACT_UNKNOWN()
+
+ DEFINE_ABSTRACT_MINIPORT()
+
+ STDMETHOD_(NTSTATUS,Init)
+ ( THIS_
+ IN PUNKNOWN UnknownAdapter,
+ IN PRESOURCELIST ResourceList,
+ IN PPORTWAVERT Port
+ ) PURE;
+
+ STDMETHOD_(NTSTATUS,NewStream)
+ ( THIS_
+ OUT PMINIPORTWAVERTSTREAM * Stream,
+ IN PPORTWAVERTSTREAM PortStream,
+ IN ULONG Pin,
+ IN BOOLEAN Capture,
+ IN PKSDATAFORMAT DataFormat
+ ) PURE;
+
+ STDMETHOD_(NTSTATUS,GetDeviceDescription)
+ ( THIS_
+ OUT PDEVICE_DESCRIPTION DeviceDescription
+ ) PURE;
+};
+
+typedef IMiniportWaveRT *PMINIPORTWAVERT;
+
+#endif
+
/* ===============================================================
IAdapterPowerManagement Interface
*/
Modified: trunk/reactos/include/psdk/ksmedia.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ksmedia.h?rev…
==============================================================================
--- trunk/reactos/include/psdk/ksmedia.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/ksmedia.h [iso-8859-1] Tue May 5 17:58:56 2009
@@ -575,4 +575,28 @@
ULONG Reserved;
} KSNODEPROPERTY_AUDIO_CHANNEL, *PKSNODEPROPERTY_AUDIO_CHANNEL;
+typedef struct {
+#if defined(_NTDDK_)
+ ULONGLONG PlayOffset;
+ ULONGLONG WriteOffset;
+#else
+ DWORDLONG PlayOffset;
+ DWORDLONG WriteOffset;
#endif
+} KSAUDIO_POSITION, *PKSAUDIO_POSITION;
+
+typedef struct {
+ ULONG FifoSize;
+ ULONG ChipsetDelay;
+ ULONG CodecDelay;
+} KSRTAUDIO_HWLATENCY, *PKSRTAUDIO_HWLATENCY;
+
+typedef struct {
+ PVOID Register;
+ ULONG Width;
+ ULONGLONG Numerator;
+ ULONGLONG Denominator;
+ ULONG Accuracy;
+} KSRTAUDIO_HWREGISTER, *PKSRTAUDIO_HWREGISTER;
+
+#endif