mirror of
https://github.com/reactos/reactos.git
synced 2025-04-28 01:11:35 +00:00
- Implement enumerating mixer source and destination lines
svn path=/trunk/; revision=43224
This commit is contained in:
parent
3f5443deba
commit
83836038f7
4 changed files with 1089 additions and 143 deletions
|
@ -319,9 +319,11 @@ WdmAudControlDeviceType(
|
||||||
KSPIN_DATAFLOW DataFlow;
|
KSPIN_DATAFLOW DataFlow;
|
||||||
PWDMAUD_DEVICE_EXTENSION DeviceExtension;
|
PWDMAUD_DEVICE_EXTENSION DeviceExtension;
|
||||||
|
|
||||||
|
DeviceExtension = (PWDMAUD_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
||||||
|
|
||||||
if (DeviceInfo->DeviceType == MIXER_DEVICE_TYPE)
|
if (DeviceInfo->DeviceType == MIXER_DEVICE_TYPE)
|
||||||
{
|
{
|
||||||
DeviceInfo->DeviceCount = GetNumOfMixerDevices(DeviceObject);
|
DeviceInfo->DeviceCount = DeviceExtension->MixerInfoCount;
|
||||||
return SetIrpIoStatus(Irp, STATUS_SUCCESS, sizeof(WDMAUD_DEVICE_INFO));
|
return SetIrpIoStatus(Irp, STATUS_SUCCESS, sizeof(WDMAUD_DEVICE_INFO));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -336,7 +338,7 @@ WdmAudControlDeviceType(
|
||||||
Pin.Property.Id = KSPROPERTY_SYSAUDIO_DEVICE_COUNT;
|
Pin.Property.Id = KSPROPERTY_SYSAUDIO_DEVICE_COUNT;
|
||||||
Pin.Property.Flags = KSPROPERTY_TYPE_GET;
|
Pin.Property.Flags = KSPROPERTY_TYPE_GET;
|
||||||
|
|
||||||
DeviceExtension = (PWDMAUD_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
|
||||||
Status = KsSynchronousIoControlDevice(DeviceExtension->FileObject, KernelMode, IOCTL_KS_PROPERTY, (PVOID)&Pin, sizeof(KSPROPERTY), (PVOID)&Count, sizeof(ULONG), &BytesReturned);
|
Status = KsSynchronousIoControlDevice(DeviceExtension->FileObject, KernelMode, IOCTL_KS_PROPERTY, (PVOID)&Pin, sizeof(KSPROPERTY), (PVOID)&Count, sizeof(ULONG), &BytesReturned);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
|
@ -706,9 +708,11 @@ WdmAudCapabilities(
|
||||||
|
|
||||||
DPRINT("WdmAudCapabilities entered\n");
|
DPRINT("WdmAudCapabilities entered\n");
|
||||||
|
|
||||||
|
DeviceExtension = (PWDMAUD_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
||||||
|
|
||||||
if (DeviceInfo->DeviceType == MIXER_DEVICE_TYPE)
|
if (DeviceInfo->DeviceType == MIXER_DEVICE_TYPE)
|
||||||
{
|
{
|
||||||
Status = WdmAudMixerCapabilities(DeviceObject, DeviceInfo, ClientInfo);
|
Status = WdmAudMixerCapabilities(DeviceObject, DeviceInfo, ClientInfo, DeviceExtension);
|
||||||
return SetIrpIoStatus(Irp, Status, sizeof(WDMAUD_DEVICE_INFO));
|
return SetIrpIoStatus(Irp, Status, sizeof(WDMAUD_DEVICE_INFO));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -727,7 +731,7 @@ WdmAudCapabilities(
|
||||||
|
|
||||||
RtlZeroMemory(&ComponentId, sizeof(KSCOMPONENTID));
|
RtlZeroMemory(&ComponentId, sizeof(KSCOMPONENTID));
|
||||||
|
|
||||||
DeviceExtension = (PWDMAUD_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
|
||||||
Status = KsSynchronousIoControlDevice(DeviceExtension->FileObject, KernelMode, IOCTL_KS_PROPERTY, (PVOID)&PinProperty, sizeof(KSP_PIN), (PVOID)&ComponentId, sizeof(KSCOMPONENTID), &BytesReturned);
|
Status = KsSynchronousIoControlDevice(DeviceExtension->FileObject, KernelMode, IOCTL_KS_PROPERTY, (PVOID)&PinProperty, sizeof(KSP_PIN), (PVOID)&ComponentId, sizeof(KSCOMPONENTID), &BytesReturned);
|
||||||
if (NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
|
|
|
@ -76,6 +76,9 @@ WdmAudInstallDevice(
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Status = WdmAudMixerInitialize(DeviceObject);
|
||||||
|
DPRINT("WdmAudMixerInitialize Status %x\n", Status);
|
||||||
|
|
||||||
DeviceObject->Flags |= DO_DIRECT_IO | DO_POWER_PAGABLE;
|
DeviceObject->Flags |= DO_DIRECT_IO | DO_POWER_PAGABLE;
|
||||||
DeviceObject->Flags &= ~ DO_DEVICE_INITIALIZING;
|
DeviceObject->Flags &= ~ DO_DEVICE_INITIALIZING;
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -8,6 +8,7 @@
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <ksmedia.h>
|
#include <ksmedia.h>
|
||||||
|
#include <mmreg.h>
|
||||||
#include <mmsystem.h>
|
#include <mmsystem.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -32,6 +33,29 @@ typedef struct
|
||||||
|
|
||||||
}WDMAUD_CLIENT, *PWDMAUD_CLIENT;
|
}WDMAUD_CLIENT, *PWDMAUD_CLIENT;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
LIST_ENTRY Entry;
|
||||||
|
ULONG PinId;
|
||||||
|
PFILE_OBJECT FileObject;
|
||||||
|
MIXERLINEW Line;
|
||||||
|
LPMIXERCONTROLW LineControls;
|
||||||
|
}MIXERLINE_SOURCE, *LPMIXERLINE_SOURCE;
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
HANDLE hMixer;
|
||||||
|
PFILE_OBJECT MixerFileObject;
|
||||||
|
|
||||||
|
MIXERCAPSW MixCaps;
|
||||||
|
MIXERLINEW DestinationLine;
|
||||||
|
|
||||||
|
LIST_ENTRY SourceLineList;
|
||||||
|
|
||||||
|
}MIXER_INFO, *LPMIXER_INFO;
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
LIST_ENTRY Entry;
|
LIST_ENTRY Entry;
|
||||||
|
@ -51,6 +75,10 @@ typedef struct
|
||||||
HANDLE hSysAudio;
|
HANDLE hSysAudio;
|
||||||
PFILE_OBJECT FileObject;
|
PFILE_OBJECT FileObject;
|
||||||
|
|
||||||
|
ULONG MixerInfoCount;
|
||||||
|
LPMIXER_INFO MixerInfo;
|
||||||
|
|
||||||
|
|
||||||
}WDMAUD_DEVICE_EXTENSION, *PWDMAUD_DEVICE_EXTENSION;
|
}WDMAUD_DEVICE_EXTENSION, *PWDMAUD_DEVICE_EXTENSION;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
@ -118,7 +146,8 @@ NTSTATUS
|
||||||
WdmAudMixerCapabilities(
|
WdmAudMixerCapabilities(
|
||||||
IN PDEVICE_OBJECT DeviceObject,
|
IN PDEVICE_OBJECT DeviceObject,
|
||||||
IN PWDMAUD_DEVICE_INFO DeviceInfo,
|
IN PWDMAUD_DEVICE_INFO DeviceInfo,
|
||||||
IN PWDMAUD_CLIENT ClientInfo);
|
IN PWDMAUD_CLIENT ClientInfo,
|
||||||
|
IN PWDMAUD_DEVICE_EXTENSION DeviceExtension);
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
|
@ -160,6 +189,9 @@ WdmAudGetControlDetails(
|
||||||
IN PWDMAUD_DEVICE_INFO DeviceInfo,
|
IN PWDMAUD_DEVICE_INFO DeviceInfo,
|
||||||
IN PWDMAUD_CLIENT ClientInfo);
|
IN PWDMAUD_CLIENT ClientInfo);
|
||||||
|
|
||||||
|
NTSTATUS
|
||||||
|
WdmAudMixerInitialize(
|
||||||
|
IN PDEVICE_OBJECT DeviceObject);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue