2014-02-06 11:18:34 +00:00
|
|
|
#ifndef _WDMAUD_PCH_
|
|
|
|
#define _WDMAUD_PCH_
|
|
|
|
|
2009-01-28 02:06:55 +00:00
|
|
|
#include <portcls.h>
|
2009-02-25 15:55:21 +00:00
|
|
|
#include <mmsystem.h>
|
2009-02-12 20:13:19 +00:00
|
|
|
|
2009-02-20 17:52:47 +00:00
|
|
|
#include "interface.h"
|
2009-02-12 20:13:19 +00:00
|
|
|
|
2010-11-01 22:21:24 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
PMDL Mdl;
|
|
|
|
ULONG Length;
|
|
|
|
ULONG Function;
|
2015-03-14 17:50:30 +00:00
|
|
|
PFILE_OBJECT FileObject;
|
2010-11-01 22:21:24 +00:00
|
|
|
}WDMAUD_COMPLETION_CONTEXT, *PWDMAUD_COMPLETION_CONTEXT;
|
|
|
|
|
|
|
|
|
2009-06-08 21:37:20 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
HANDLE Handle;
|
|
|
|
SOUND_DEVICE_TYPE Type;
|
2009-06-10 18:28:15 +00:00
|
|
|
ULONG FilterId;
|
|
|
|
ULONG PinId;
|
2009-11-13 14:13:22 +00:00
|
|
|
PRKEVENT NotifyEvent;
|
2009-06-08 21:37:20 +00:00
|
|
|
}WDMAUD_HANDLE, *PWDMAUD_HANDLE;
|
|
|
|
|
2009-02-20 17:52:47 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
2009-11-13 01:48:28 +00:00
|
|
|
LIST_ENTRY Entry;
|
2009-02-20 17:52:47 +00:00
|
|
|
HANDLE hProcess;
|
2009-02-22 18:58:51 +00:00
|
|
|
ULONG NumPins;
|
2009-06-08 21:37:20 +00:00
|
|
|
WDMAUD_HANDLE * hPins;
|
2009-02-12 20:13:19 +00:00
|
|
|
|
2009-11-13 01:48:28 +00:00
|
|
|
LIST_ENTRY MixerEventList;
|
2009-02-20 17:52:47 +00:00
|
|
|
}WDMAUD_CLIENT, *PWDMAUD_CLIENT;
|
2009-01-28 02:06:55 +00:00
|
|
|
|
2010-10-15 02:24:35 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
LIST_ENTRY Entry;
|
|
|
|
ULONG NotificationType;
|
|
|
|
ULONG Value;
|
|
|
|
HANDLE hMixer;
|
|
|
|
}EVENT_ENTRY, *PEVENT_ENTRY;
|
|
|
|
|
2009-01-28 15:24:57 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
LIST_ENTRY Entry;
|
|
|
|
UNICODE_STRING SymbolicLink;
|
2009-02-20 17:52:47 +00:00
|
|
|
}SYSAUDIO_ENTRY, *PSYSAUDIO_ENTRY;
|
2009-01-28 15:24:57 +00:00
|
|
|
|
2009-01-28 02:06:55 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
KSDEVICE_HEADER DeviceHeader;
|
|
|
|
PVOID SysAudioNotification;
|
|
|
|
|
2009-02-20 17:52:47 +00:00
|
|
|
BOOL DeviceInterfaceSupport;
|
|
|
|
|
|
|
|
KSPIN_LOCK Lock;
|
2009-01-28 15:24:57 +00:00
|
|
|
ULONG NumSysAudioDevices;
|
|
|
|
LIST_ENTRY SysAudioDeviceList;
|
2009-06-07 18:22:24 +00:00
|
|
|
HANDLE hSysAudio;
|
|
|
|
PFILE_OBJECT FileObject;
|
2009-11-13 01:48:28 +00:00
|
|
|
LIST_ENTRY WdmAudClientList;
|
2013-05-30 22:07:40 +00:00
|
|
|
|
|
|
|
ULONG SysAudioDeviceCount;
|
|
|
|
PIO_WORKITEM WorkItem;
|
|
|
|
KEVENT InitializationCompletionEvent;
|
|
|
|
ULONG WorkItemActive;
|
|
|
|
|
2015-03-14 17:50:30 +00:00
|
|
|
PDEVICE_OBJECT NextDeviceObject;
|
2009-01-28 02:06:55 +00:00
|
|
|
}WDMAUD_DEVICE_EXTENSION, *PWDMAUD_DEVICE_EXTENSION;
|
|
|
|
|
2010-02-11 21:04:57 +00:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
PWDMAUD_CLIENT ClientInfo;
|
|
|
|
PWDMAUD_DEVICE_EXTENSION DeviceExtension;
|
|
|
|
SOUND_DEVICE_TYPE DeviceType;
|
|
|
|
}PIN_CREATE_CONTEXT, *PPIN_CREATE_CONTEXT;
|
|
|
|
|
|
|
|
|
2009-10-02 10:57:24 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
OpenWavePin(
|
|
|
|
IN PWDMAUD_DEVICE_EXTENSION DeviceExtension,
|
|
|
|
IN ULONG FilterId,
|
|
|
|
IN ULONG PinId,
|
|
|
|
IN LPWAVEFORMATEX WaveFormatEx,
|
|
|
|
IN ACCESS_MASK DesiredAccess,
|
|
|
|
OUT PHANDLE PinHandle);
|
|
|
|
|
2009-02-20 17:52:47 +00:00
|
|
|
NTSTATUS
|
|
|
|
WdmAudRegisterDeviceInterface(
|
|
|
|
IN PDEVICE_OBJECT PhysicalDeviceObject,
|
|
|
|
IN PWDMAUD_DEVICE_EXTENSION DeviceExtension);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
WdmAudOpenSysAudioDevices(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject,
|
|
|
|
IN PWDMAUD_DEVICE_EXTENSION DeviceExtension);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
WdmAudOpenSysaudio(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject,
|
|
|
|
IN PWDMAUD_CLIENT *pClient);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
WdmAudDeviceControl(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject,
|
|
|
|
IN PIRP Irp);
|
2009-01-28 02:06:55 +00:00
|
|
|
|
2009-10-07 10:41:34 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
WdmAudReadWrite(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject,
|
|
|
|
IN PIRP Irp);
|
|
|
|
|
2009-03-06 19:06:21 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
WdmAudWrite(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject,
|
|
|
|
IN PIRP Irp);
|
|
|
|
|
2009-06-08 21:37:20 +00:00
|
|
|
NTSTATUS
|
|
|
|
WdmAudControlOpenMixer(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject,
|
|
|
|
IN PIRP Irp,
|
|
|
|
IN PWDMAUD_DEVICE_INFO DeviceInfo,
|
|
|
|
IN PWDMAUD_CLIENT ClientInfo);
|
|
|
|
|
2017-06-24 13:54:10 +00:00
|
|
|
NTSTATUS
|
|
|
|
WdmAudControlCloseMixer(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject,
|
|
|
|
IN PIRP Irp,
|
|
|
|
IN PWDMAUD_DEVICE_INFO DeviceInfo,
|
|
|
|
IN PWDMAUD_CLIENT ClientInfo,
|
|
|
|
IN ULONG Index);
|
|
|
|
|
2017-10-08 09:29:17 +00:00
|
|
|
VOID
|
|
|
|
WdmAudCloseAllMixers(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject,
|
|
|
|
IN PWDMAUD_CLIENT ClientInfo,
|
|
|
|
IN ULONG Index);
|
|
|
|
|
2009-10-02 10:57:24 +00:00
|
|
|
NTSTATUS
|
|
|
|
WdmAudControlOpenWave(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject,
|
|
|
|
IN PIRP Irp,
|
|
|
|
IN PWDMAUD_DEVICE_INFO DeviceInfo,
|
|
|
|
IN PWDMAUD_CLIENT ClientInfo);
|
|
|
|
|
2010-10-31 14:34:41 +00:00
|
|
|
NTSTATUS
|
|
|
|
WdmAudControlOpenMidi(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject,
|
|
|
|
IN PIRP Irp,
|
|
|
|
IN PWDMAUD_DEVICE_INFO DeviceInfo,
|
|
|
|
IN PWDMAUD_CLIENT ClientInfo);
|
2009-10-02 10:57:24 +00:00
|
|
|
|
2009-06-08 21:37:20 +00:00
|
|
|
ULONG
|
|
|
|
GetNumOfMixerDevices(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
SetIrpIoStatus(
|
|
|
|
IN PIRP Irp,
|
|
|
|
IN NTSTATUS Status,
|
|
|
|
IN ULONG Length);
|
2009-03-06 19:06:21 +00:00
|
|
|
|
2009-09-24 14:54:58 +00:00
|
|
|
NTSTATUS
|
|
|
|
WdmAudOpenSysAudioDevice(
|
|
|
|
IN LPWSTR DeviceName,
|
|
|
|
OUT PHANDLE Handle);
|
|
|
|
|
2009-09-24 19:24:22 +00:00
|
|
|
NTSTATUS
|
|
|
|
FindProductName(
|
|
|
|
IN LPWSTR PnpName,
|
|
|
|
IN ULONG ProductNameSize,
|
|
|
|
OUT LPWSTR ProductName);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
WdmAudMixerCapabilities(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject,
|
|
|
|
IN PWDMAUD_DEVICE_INFO DeviceInfo,
|
2009-09-29 12:26:48 +00:00
|
|
|
IN PWDMAUD_CLIENT ClientInfo,
|
|
|
|
IN PWDMAUD_DEVICE_EXTENSION DeviceExtension);
|
2009-09-24 19:24:22 +00:00
|
|
|
|
2009-10-02 10:57:24 +00:00
|
|
|
NTSTATUS
|
|
|
|
WdmAudWaveCapabilities(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject,
|
|
|
|
IN PWDMAUD_DEVICE_INFO DeviceInfo,
|
|
|
|
IN PWDMAUD_CLIENT ClientInfo,
|
|
|
|
IN PWDMAUD_DEVICE_EXTENSION DeviceExtension);
|
|
|
|
|
2010-10-31 14:34:41 +00:00
|
|
|
NTSTATUS
|
|
|
|
WdmAudMidiCapabilities(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject,
|
|
|
|
IN PWDMAUD_DEVICE_INFO DeviceInfo,
|
|
|
|
IN PWDMAUD_CLIENT ClientInfo,
|
|
|
|
IN PWDMAUD_DEVICE_EXTENSION DeviceExtension);
|
|
|
|
|
2009-09-26 00:57:22 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
WdmAudFrameSize(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject,
|
|
|
|
IN PIRP Irp,
|
|
|
|
IN PWDMAUD_DEVICE_INFO DeviceInfo,
|
|
|
|
IN PWDMAUD_CLIENT ClientInfo);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
WdmAudGetLineInfo(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject,
|
|
|
|
IN PIRP Irp,
|
|
|
|
IN PWDMAUD_DEVICE_INFO DeviceInfo,
|
|
|
|
IN PWDMAUD_CLIENT ClientInfo);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
WdmAudGetLineControls(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject,
|
|
|
|
IN PIRP Irp,
|
|
|
|
IN PWDMAUD_DEVICE_INFO DeviceInfo,
|
|
|
|
IN PWDMAUD_CLIENT ClientInfo);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
WdmAudSetControlDetails(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject,
|
|
|
|
IN PIRP Irp,
|
|
|
|
IN PWDMAUD_DEVICE_INFO DeviceInfo,
|
2009-11-13 01:48:28 +00:00
|
|
|
IN PWDMAUD_CLIENT ClientInfo);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
WdmAudGetMixerEvent(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject,
|
|
|
|
IN PIRP Irp,
|
|
|
|
IN PWDMAUD_DEVICE_INFO DeviceInfo,
|
2009-09-26 00:57:22 +00:00
|
|
|
IN PWDMAUD_CLIENT ClientInfo);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
WdmAudGetControlDetails(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject,
|
|
|
|
IN PIRP Irp,
|
|
|
|
IN PWDMAUD_DEVICE_INFO DeviceInfo,
|
|
|
|
IN PWDMAUD_CLIENT ClientInfo);
|
|
|
|
|
2009-09-29 12:26:48 +00:00
|
|
|
NTSTATUS
|
|
|
|
WdmAudMixerInitialize(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject);
|
2009-09-26 00:57:22 +00:00
|
|
|
|
2009-10-02 10:57:24 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
WdmAudWaveInitialize(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject);
|
|
|
|
|
2010-02-11 21:04:57 +00:00
|
|
|
ULONG
|
2009-10-02 10:57:24 +00:00
|
|
|
ClosePin(
|
|
|
|
IN PWDMAUD_CLIENT ClientInfo,
|
|
|
|
IN ULONG FilterId,
|
|
|
|
IN ULONG PinId,
|
|
|
|
IN SOUND_DEVICE_TYPE DeviceType);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
InsertPinHandle(
|
|
|
|
IN PWDMAUD_CLIENT ClientInfo,
|
|
|
|
IN ULONG FilterId,
|
|
|
|
IN ULONG PinId,
|
|
|
|
IN SOUND_DEVICE_TYPE DeviceType,
|
|
|
|
IN HANDLE PinHandle,
|
|
|
|
IN ULONG FreeIndex);
|
|
|
|
|
2009-10-26 23:10:05 +00:00
|
|
|
NTSTATUS
|
2010-02-11 21:04:57 +00:00
|
|
|
GetSysAudioDevicePnpName(
|
2009-10-26 23:10:05 +00:00
|
|
|
IN PDEVICE_OBJECT DeviceObject,
|
|
|
|
IN ULONG DeviceIndex,
|
2010-02-11 21:04:57 +00:00
|
|
|
OUT LPWSTR * Device);
|
2009-10-26 23:10:05 +00:00
|
|
|
|
|
|
|
NTSTATUS
|
2010-02-11 21:04:57 +00:00
|
|
|
OpenSysAudioDeviceByIndex(
|
2009-10-26 23:10:05 +00:00
|
|
|
IN PDEVICE_OBJECT DeviceObject,
|
2010-02-11 21:04:57 +00:00
|
|
|
IN ULONG DeviceIndex,
|
|
|
|
IN PHANDLE DeviceHandle,
|
|
|
|
IN PFILE_OBJECT * FileObject);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
OpenDevice(
|
|
|
|
IN LPWSTR Device,
|
|
|
|
OUT PHANDLE DeviceHandle,
|
|
|
|
OUT PFILE_OBJECT * FileObject);
|
|
|
|
|
|
|
|
ULONG
|
2011-03-16 21:07:25 +00:00
|
|
|
WdmAudGetMixerDeviceCount(VOID);
|
2010-02-11 21:04:57 +00:00
|
|
|
|
|
|
|
ULONG
|
2011-03-16 21:07:25 +00:00
|
|
|
WdmAudGetWaveInDeviceCount(VOID);
|
2010-02-11 21:04:57 +00:00
|
|
|
|
|
|
|
ULONG
|
2011-03-16 21:07:25 +00:00
|
|
|
WdmAudGetWaveOutDeviceCount(VOID);
|
2010-02-11 21:04:57 +00:00
|
|
|
|
2010-10-31 14:34:41 +00:00
|
|
|
ULONG
|
2011-03-16 21:07:25 +00:00
|
|
|
WdmAudGetMidiInDeviceCount(VOID);
|
2010-10-31 14:34:41 +00:00
|
|
|
|
|
|
|
ULONG
|
2011-03-16 21:07:25 +00:00
|
|
|
WdmAudGetMidiOutDeviceCount(VOID);
|
2009-10-26 23:10:05 +00:00
|
|
|
|
2010-02-11 21:04:57 +00:00
|
|
|
NTSTATUS
|
|
|
|
WdmAudGetPnpNameByIndexAndType(
|
|
|
|
IN ULONG DeviceIndex,
|
|
|
|
IN SOUND_DEVICE_TYPE DeviceType,
|
|
|
|
OUT LPWSTR *Device);
|
|
|
|
|
|
|
|
|
|
|
|
/* sup.c */
|
|
|
|
|
|
|
|
ULONG
|
|
|
|
GetSysAudioDeviceCount(
|
|
|
|
IN PDEVICE_OBJECT DeviceObject);
|
2010-06-11 12:28:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
PVOID
|
|
|
|
AllocateItem(
|
|
|
|
IN POOL_TYPE PoolType,
|
|
|
|
IN SIZE_T NumberOfBytes);
|
|
|
|
|
|
|
|
VOID
|
|
|
|
FreeItem(
|
|
|
|
IN PVOID Item);
|
|
|
|
|
2014-02-06 11:18:34 +00:00
|
|
|
#endif /* _WDMAUD_PCH_ */
|