mirror of
https://github.com/reactos/reactos.git
synced 2024-10-05 00:43:21 +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
|
@ -888,6 +888,10 @@ ProbeMdl:
|
|||
goto ProbeMdl;
|
||||
}
|
||||
|
||||
#if 0
|
||||
// HACK for MS PORTCLS
|
||||
HeaderSize = Length;
|
||||
#endif
|
||||
/* probe user mode buffers */
|
||||
if (Length && ( (!HeaderSize) || (Length % HeaderSize == 0) || ((ProbeFlags & KSPROBE_ALLOWFORMATCHANGE) && (Length == sizeof(KSSTREAM_HEADER))) ) )
|
||||
{
|
||||
|
@ -1940,7 +1944,7 @@ KsSetMajorFunctionHandler(
|
|||
IN ULONG MajorFunction)
|
||||
{
|
||||
DPRINT("KsSetMajorFunctionHandler Function %x\n", MajorFunction);
|
||||
#if 0
|
||||
#if 1
|
||||
// HACK
|
||||
// for MS PORTCLS
|
||||
//
|
||||
|
|
|
@ -1888,6 +1888,12 @@ WdmAudGetLineInfo(
|
|||
}
|
||||
|
||||
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);
|
||||
|
||||
/* copy cached data */
|
||||
|
|
|
@ -208,7 +208,7 @@ ComputeCompatibleFormat(
|
|||
|
||||
MultipleItem = (PKSMULTIPLE_ITEM)(PinRequest + 1);
|
||||
MultipleItem->Count = 1;
|
||||
MultipleItem->Size = sizeof(KSMULTIPLE_ITEM) + ClientFormat->DataFormat.FormatSize;
|
||||
MultipleItem->Size = ClientFormat->DataFormat.FormatSize;
|
||||
|
||||
RtlMoveMemory(MultipleItem + 1, ClientFormat, ClientFormat->DataFormat.FormatSize);
|
||||
/* Query the miniport data intersection handler */
|
||||
|
@ -229,7 +229,7 @@ ComputeCompatibleFormat(
|
|||
|
||||
if (Status != STATUS_MORE_ENTRIES)
|
||||
{
|
||||
/* Failed to data ranges */
|
||||
/* Failed to get data ranges */
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -276,7 +276,7 @@ ComputeCompatibleFormat(
|
|||
MixerFormat->WaveFormatEx.wBitsPerSample = 16;
|
||||
|
||||
#else
|
||||
MixerFormat->WaveFormatEx.nChannels = min(ClientFormat->WaveFormatEx.nSamplesPerSec, AudioRange->MaximumChannels);
|
||||
MixerFormat->WaveFormatEx.nChannels = min(ClientFormat->WaveFormatEx.nChannels, AudioRange->MaximumChannels);
|
||||
MixerFormat->WaveFormatEx.wBitsPerSample = AudioRange->MaximumBitsPerSample;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ Pin_fnDeviceIoControl(
|
|||
PDISPATCH_CONTEXT Context;
|
||||
NTSTATUS Status;
|
||||
ULONG BytesReturned;
|
||||
PFILE_OBJECT FileObject;
|
||||
PFILE_OBJECT FileObject = NULL;
|
||||
PIO_STACK_LOCATION IoStack;
|
||||
|
||||
DPRINT("Pin_fnDeviceIoControl called DeviceObject %p Irp %p\n", DeviceObject, Irp);
|
||||
|
@ -131,7 +131,7 @@ Pin_fnClose(
|
|||
PDISPATCH_CONTEXT Context;
|
||||
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 */
|
||||
IoStack = IoGetCurrentIrpStackLocation(Irp);
|
||||
|
@ -143,7 +143,11 @@ Pin_fnClose(
|
|||
{
|
||||
ZwClose(Context->Handle);
|
||||
}
|
||||
ZwClose(Context->hMixerPin);
|
||||
|
||||
if (Context->hMixerPin)
|
||||
{
|
||||
ZwClose(Context->hMixerPin);
|
||||
}
|
||||
|
||||
ExFreePool(Context);
|
||||
|
||||
|
@ -217,7 +221,7 @@ CreateMixerPinAndSetFormat(
|
|||
{
|
||||
NTSTATUS Status;
|
||||
HANDLE PinHandle;
|
||||
PFILE_OBJECT FileObject;
|
||||
PFILE_OBJECT FileObject = NULL;
|
||||
|
||||
Status = KsCreatePin(KMixerHandle, PinConnect, GENERIC_READ | GENERIC_WRITE, &PinHandle);
|
||||
|
||||
|
@ -242,6 +246,7 @@ CreateMixerPinAndSetFormat(
|
|||
{
|
||||
ObDereferenceObject(FileObject);
|
||||
ZwClose(PinHandle);
|
||||
return Status;
|
||||
}
|
||||
|
||||
ObDereferenceObject(FileObject);
|
||||
|
@ -298,6 +303,13 @@ InstantiatePins(
|
|||
/* Let's try to create the audio irp pin */
|
||||
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))
|
||||
{
|
||||
/* the audio irp pin didnt accept the input format
|
||||
|
@ -340,6 +352,7 @@ InstantiatePins(
|
|||
return Status;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
DeviceEntry->Pins[Connect->PinId].References = 0;
|
||||
|
||||
|
@ -349,6 +362,8 @@ InstantiatePins(
|
|||
DispatchContext->AudioEntry = DeviceEntry;
|
||||
|
||||
|
||||
DPRINT1("RealPinHandle %p\n", RealPinHandle);
|
||||
|
||||
/* Do we need to transform the audio stream */
|
||||
if (OutputFormat != NULL)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue