mirror of
https://github.com/reactos/reactos.git
synced 2025-08-07 13:23:10 +00:00
[KS]
- Add comment for using ms portcls in ReactOS [WDMAUD_KERNEL] - Handle error [SYSAUDIO] - Fix several bugs in the mixer handling code - Disable kmixer untill all issues are resolved svn path=/trunk/; revision=43879
This commit is contained in:
parent
24c6ff3165
commit
514a0e7f08
4 changed files with 33 additions and 8 deletions
|
@ -888,6 +888,10 @@ ProbeMdl:
|
||||||
goto ProbeMdl;
|
goto ProbeMdl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
// HACK for MS PORTCLS
|
||||||
|
HeaderSize = Length;
|
||||||
|
#endif
|
||||||
/* probe user mode buffers */
|
/* probe user mode buffers */
|
||||||
if (Length && ( (!HeaderSize) || (Length % HeaderSize == 0) || ((ProbeFlags & KSPROBE_ALLOWFORMATCHANGE) && (Length == sizeof(KSSTREAM_HEADER))) ) )
|
if (Length && ( (!HeaderSize) || (Length % HeaderSize == 0) || ((ProbeFlags & KSPROBE_ALLOWFORMATCHANGE) && (Length == sizeof(KSSTREAM_HEADER))) ) )
|
||||||
{
|
{
|
||||||
|
@ -1940,7 +1944,7 @@ KsSetMajorFunctionHandler(
|
||||||
IN ULONG MajorFunction)
|
IN ULONG MajorFunction)
|
||||||
{
|
{
|
||||||
DPRINT("KsSetMajorFunctionHandler Function %x\n", MajorFunction);
|
DPRINT("KsSetMajorFunctionHandler Function %x\n", MajorFunction);
|
||||||
#if 0
|
#if 1
|
||||||
// HACK
|
// HACK
|
||||||
// for MS PORTCLS
|
// for MS PORTCLS
|
||||||
//
|
//
|
||||||
|
|
|
@ -1888,6 +1888,12 @@ WdmAudGetLineInfo(
|
||||||
}
|
}
|
||||||
|
|
||||||
MixerLineSrc = GetSourceMixerLineByComponentType(&DeviceExtension->MixerInfo[(ULONG_PTR)DeviceInfo->hDevice], DeviceInfo->u.MixLine.dwComponentType);
|
MixerLineSrc = GetSourceMixerLineByComponentType(&DeviceExtension->MixerInfo[(ULONG_PTR)DeviceInfo->hDevice], DeviceInfo->u.MixLine.dwComponentType);
|
||||||
|
if (!MixerLineSrc)
|
||||||
|
{
|
||||||
|
DPRINT1("Failed to find component type %x\n", DeviceInfo->u.MixLine.dwComponentType);
|
||||||
|
return SetIrpIoStatus(Irp, STATUS_UNSUCCESSFUL, 0);
|
||||||
|
}
|
||||||
|
|
||||||
ASSERT(MixerLineSrc);
|
ASSERT(MixerLineSrc);
|
||||||
|
|
||||||
/* copy cached data */
|
/* copy cached data */
|
||||||
|
|
|
@ -208,7 +208,7 @@ ComputeCompatibleFormat(
|
||||||
|
|
||||||
MultipleItem = (PKSMULTIPLE_ITEM)(PinRequest + 1);
|
MultipleItem = (PKSMULTIPLE_ITEM)(PinRequest + 1);
|
||||||
MultipleItem->Count = 1;
|
MultipleItem->Count = 1;
|
||||||
MultipleItem->Size = sizeof(KSMULTIPLE_ITEM) + ClientFormat->DataFormat.FormatSize;
|
MultipleItem->Size = ClientFormat->DataFormat.FormatSize;
|
||||||
|
|
||||||
RtlMoveMemory(MultipleItem + 1, ClientFormat, ClientFormat->DataFormat.FormatSize);
|
RtlMoveMemory(MultipleItem + 1, ClientFormat, ClientFormat->DataFormat.FormatSize);
|
||||||
/* Query the miniport data intersection handler */
|
/* Query the miniport data intersection handler */
|
||||||
|
@ -229,7 +229,7 @@ ComputeCompatibleFormat(
|
||||||
|
|
||||||
if (Status != STATUS_MORE_ENTRIES)
|
if (Status != STATUS_MORE_ENTRIES)
|
||||||
{
|
{
|
||||||
/* Failed to data ranges */
|
/* Failed to get data ranges */
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -276,7 +276,7 @@ ComputeCompatibleFormat(
|
||||||
MixerFormat->WaveFormatEx.wBitsPerSample = 16;
|
MixerFormat->WaveFormatEx.wBitsPerSample = 16;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
MixerFormat->WaveFormatEx.nChannels = min(ClientFormat->WaveFormatEx.nSamplesPerSec, AudioRange->MaximumChannels);
|
MixerFormat->WaveFormatEx.nChannels = min(ClientFormat->WaveFormatEx.nChannels, AudioRange->MaximumChannels);
|
||||||
MixerFormat->WaveFormatEx.wBitsPerSample = AudioRange->MaximumBitsPerSample;
|
MixerFormat->WaveFormatEx.wBitsPerSample = AudioRange->MaximumBitsPerSample;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ Pin_fnDeviceIoControl(
|
||||||
PDISPATCH_CONTEXT Context;
|
PDISPATCH_CONTEXT Context;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
ULONG BytesReturned;
|
ULONG BytesReturned;
|
||||||
PFILE_OBJECT FileObject;
|
PFILE_OBJECT FileObject = NULL;
|
||||||
PIO_STACK_LOCATION IoStack;
|
PIO_STACK_LOCATION IoStack;
|
||||||
|
|
||||||
DPRINT("Pin_fnDeviceIoControl called DeviceObject %p Irp %p\n", DeviceObject, Irp);
|
DPRINT("Pin_fnDeviceIoControl called DeviceObject %p Irp %p\n", DeviceObject, Irp);
|
||||||
|
@ -131,7 +131,7 @@ Pin_fnClose(
|
||||||
PDISPATCH_CONTEXT Context;
|
PDISPATCH_CONTEXT Context;
|
||||||
PIO_STACK_LOCATION IoStack;
|
PIO_STACK_LOCATION IoStack;
|
||||||
|
|
||||||
DPRINT("Pin_fnClose called DeviceObject %p Irp %p\n", DeviceObject, Irp);
|
//DPRINT("Pin_fnClose called DeviceObject %p Irp %p\n", DeviceObject, Irp);
|
||||||
|
|
||||||
/* Get current stack location */
|
/* Get current stack location */
|
||||||
IoStack = IoGetCurrentIrpStackLocation(Irp);
|
IoStack = IoGetCurrentIrpStackLocation(Irp);
|
||||||
|
@ -143,7 +143,11 @@ Pin_fnClose(
|
||||||
{
|
{
|
||||||
ZwClose(Context->Handle);
|
ZwClose(Context->Handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Context->hMixerPin)
|
||||||
|
{
|
||||||
ZwClose(Context->hMixerPin);
|
ZwClose(Context->hMixerPin);
|
||||||
|
}
|
||||||
|
|
||||||
ExFreePool(Context);
|
ExFreePool(Context);
|
||||||
|
|
||||||
|
@ -217,7 +221,7 @@ CreateMixerPinAndSetFormat(
|
||||||
{
|
{
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
HANDLE PinHandle;
|
HANDLE PinHandle;
|
||||||
PFILE_OBJECT FileObject;
|
PFILE_OBJECT FileObject = NULL;
|
||||||
|
|
||||||
Status = KsCreatePin(KMixerHandle, PinConnect, GENERIC_READ | GENERIC_WRITE, &PinHandle);
|
Status = KsCreatePin(KMixerHandle, PinConnect, GENERIC_READ | GENERIC_WRITE, &PinHandle);
|
||||||
|
|
||||||
|
@ -242,6 +246,7 @@ CreateMixerPinAndSetFormat(
|
||||||
{
|
{
|
||||||
ObDereferenceObject(FileObject);
|
ObDereferenceObject(FileObject);
|
||||||
ZwClose(PinHandle);
|
ZwClose(PinHandle);
|
||||||
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
ObDereferenceObject(FileObject);
|
ObDereferenceObject(FileObject);
|
||||||
|
@ -298,6 +303,13 @@ InstantiatePins(
|
||||||
/* Let's try to create the audio irp pin */
|
/* Let's try to create the audio irp pin */
|
||||||
Status = KsCreatePin(DeviceEntry->Handle, Connect, GENERIC_READ | GENERIC_WRITE, &RealPinHandle);
|
Status = KsCreatePin(DeviceEntry->Handle, Connect, GENERIC_READ | GENERIC_WRITE, &RealPinHandle);
|
||||||
|
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
/* FIXME disable kmixer
|
||||||
|
*/
|
||||||
|
return STATUS_UNSUCCESSFUL;
|
||||||
|
}
|
||||||
|
#if 0
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
/* the audio irp pin didnt accept the input format
|
/* the audio irp pin didnt accept the input format
|
||||||
|
@ -340,6 +352,7 @@ InstantiatePins(
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
DeviceEntry->Pins[Connect->PinId].References = 0;
|
DeviceEntry->Pins[Connect->PinId].References = 0;
|
||||||
|
|
||||||
|
@ -349,6 +362,8 @@ InstantiatePins(
|
||||||
DispatchContext->AudioEntry = DeviceEntry;
|
DispatchContext->AudioEntry = DeviceEntry;
|
||||||
|
|
||||||
|
|
||||||
|
DPRINT1("RealPinHandle %p\n", RealPinHandle);
|
||||||
|
|
||||||
/* Do we need to transform the audio stream */
|
/* Do we need to transform the audio stream */
|
||||||
if (OutputFormat != NULL)
|
if (OutputFormat != NULL)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue