Author: janderwald
Date: Mon Jan 26 11:38:22 2009
New Revision: 39115
URL:
http://svn.reactos.org/svn/reactos?rev=39115&view=rev
Log:
- Use InterlockedIncrement, InterlockedDecrement over intrinsics
- Fix ordering of IDmaChannelSlaveVtbl which led to an infinite loop
- Add a few guids
- Fix parameter for KeWaitForSingleObject (spotted by Christoph)
- Also check for IID_IPort in IPortTopology
- Fix priority boost IServiceGroup
Modified:
trunk/reactos/drivers/wdm/audio/backpln/portcls/dma_slave.c
trunk/reactos/drivers/wdm/audio/backpln/portcls/guids.c
trunk/reactos/drivers/wdm/audio/backpln/portcls/irp.c
trunk/reactos/drivers/wdm/audio/backpln/portcls/port_topology.c
trunk/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild
trunk/reactos/drivers/wdm/audio/backpln/portcls/private.h
trunk/reactos/drivers/wdm/audio/backpln/portcls/service_group.c
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/dma_slave.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/dma_slave.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/dma_slave.c [iso-8859-1] Mon Jan 26
11:38:22 2009
@@ -68,7 +68,7 @@
DPRINT("IDmaChannelSlave_AddRef: This %p\n", This);
- return _InterlockedIncrement(&This->ref);
+ return InterlockedIncrement(&This->ref);
}
ULONG
@@ -78,7 +78,7 @@
{
IDmaChannelSlaveImpl * This = (IDmaChannelSlaveImpl*)iface;
- _InterlockedDecrement(&This->ref);
+ InterlockedDecrement(&This->ref);
DPRINT("IDmaChannelSlave_Release: This %p new ref %u\n", This,
This->ref);
@@ -102,7 +102,7 @@
IDmaChannelSlave_fnAllocateBuffer(
IN IDmaChannelSlave * iface,
IN ULONG BufferSize,
- IN PPHYSICAL_ADDRESS PhysicalAddressConstraint OPTIONAL)
+ IN PPHYSICAL_ADDRESS PhysicalAddressConstraint OPTIONAL)
{
IDmaChannelSlaveImpl * This = (IDmaChannelSlaveImpl*)iface;
@@ -125,6 +125,8 @@
This->BufferSize = BufferSize;
This->AllocatedBufferSize = BufferSize;
+ DPRINT1("IDmaChannelSlave_fnAllocateBuffer Success Buffer %u Address
%ull\n", BufferSize, This->Address);
+
return STATUS_SUCCESS;
}
@@ -185,7 +187,7 @@
return;
}
- This->pAdapter->DmaOperations->FreeCommonBuffer(This->pAdapter,
This->AllocatedBufferSize, This->Address, This->Buffer, TRUE);
+ This->pAdapter->DmaOperations->FreeCommonBuffer(This->pAdapter,
This->AllocatedBufferSize, This->Address, This->Buffer, FALSE);
This->Buffer = NULL;
This->AllocatedBufferSize = 0;
This->Address.QuadPart = 0LL;
@@ -458,8 +460,8 @@
IDmaChannelSlave_fnSystemAddress,
IDmaChannelSlave_fnPhysicalAdress,
IDmaChannelSlave_fnGetAdapterObject,
+ IDmaChannelSlave_fnCopyTo,
IDmaChannelSlave_fnCopyFrom,
- IDmaChannelSlave_fnCopyTo,
/* IDmaChannelSlave methods */
IDmaChannelSlave_fnStart,
IDmaChannelSlave_fnStop,
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/guids.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/guids.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/guids.c [iso-8859-1] Mon Jan 26
11:38:22 2009
@@ -19,13 +19,13 @@
const GUID CLSID_MiniportDriverFmSynth;
const GUID CLSID_MiniportDriverFmSynthWithVol;
+const GUID IID_IPort = {0xb4c90a25L, 0x5791, 0x11d0, {0x86, 0xf9, 0x00, 0xa0, 0xc9,
0x11, 0xb5, 0x44}};
const GUID IID_IDrmPort = {0x286D3DF8L, 0xCA22, 0x4E2E, {0xB9, 0xBC, 0x20, 0xB4, 0xF0,
0xE2, 0x01, 0xCE}};
const GUID IID_IDrmPort2 = {0x1ACCE59CL, 0x7311, 0x4B6B, {0x9F, 0xBA, 0xCC, 0x3B, 0xA5,
0x9A, 0xCD, 0xCE}};
const GUID IID_IInterruptSync = {0x22C6AC63L, 0x851B, 0x11D0, {0x9A, 0x7F, 0x00, 0xAA,
0x00, 0x38, 0xAC, 0xFE}};
const GUID IID_IPortWavePci = {0xb4c90a50L, 0x5791, 0x11d0, {0x86, 0xf9, 0x00, 0xa0,
0xc9, 0x11, 0xb5, 0x44}};
const GUID IID_IMiniportWavePci = {0xb4c90a52L, 0x5791, 0x11d0, {0x86, 0xf9, 0x00, 0xa0,
0xc9, 0x11, 0xb5, 0x44}};
const GUID IID_IAdapterPowerManagement = {0x793417D0L, 0x35FE, 0x11D1, {0xAD, 0x08, 0x00,
0xA0, 0xC9, 0x0A, 0xB1, 0xB0}};
-
const GUID IID_IMiniportWaveCyclic = {0xb4c90a27L, 0x5791, 0x11d0, {0x86, 0xf9, 0x00,
0xa0, 0xc9, 0x11, 0xb5, 0x44}};
const GUID IID_IPortWaveCyclic = {0xb4c90a26L, 0x5791, 0x11d0, {0x86, 0xf9, 0x00, 0xa0,
0xc9, 0x11, 0xb5, 0x44}};
@@ -41,6 +41,18 @@
const GUID IID_IUnknown = {0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0xC0, 0x00, 0x00,
0x00, 0x00, 0x46}};
const GUID IID_IPortEvents = {0xA80F29C4L, 0x5498, 0x11D2, {0x95, 0xD9, 0x00, 0xC0, 0x4F,
0xB9, 0x25, 0xD3}};
+//FIXME
+//
+const GUID KS_CATEGORY_AUDIO = {0x6994AD04, 0x93EF, 0x11D0, {0xA3, 0xCC, 0x00, 0xA0,
0xC9, 0x22, 0x31, 0x96}};
+const GUID KS_CATEGORY_RENDER = {0x65E8773E, 0x8F56, 0x11D0, {0xA3, 0xB9, 0x00, 0xA0,
0xC9, 0x22, 0x31, 0x96}};
+const GUID KS_CATEGORY_CAPTURE = {0x65E8773D, 0x8F56, 0x11D0, {0xA3, 0xB9, 0x00, 0xA0,
0xC9, 0x22, 0x31, 0x96}};
+const GUID KS_CATEGORY_TOPOLOGY = {0xDDA54A40, 0x1E4C, 0x11D1, {0xA0, 0x50, 0x40, 0x57,
0x05, 0xC1, 0x00, 0x00}};
+
+
+const GUID KSDATAFORMAT_TYPE_AUDIO = {0x73647561L, 0x0000, 0x0010, {0x80,
0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
+const GUID KSDATAFORMAT_SUBTYPE_PCM = {0x00000001, 0x0000, 0x0010, {0x80,
0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
+const GUID KSDATAFORMAT_SPECIFIER_WAVEFORMATEX = {0x05589f81L, 0xc356, 0x11ce, {0xbf,
0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a}};
+
///
/// undocumented guids
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/irp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/irp.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/irp.c [iso-8859-1] Mon Jan 26 11:38:22
2009
@@ -322,7 +322,7 @@
if (Status == STATUS_PENDING)
{
/* not yet, lets wait a bit */
- KeWaitForSingleObject(&Event, Executive, FALSE, FALSE, NULL);
+ KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE, NULL);
Status = STATUS_SUCCESS;
}
DPRINT1("Returning status %x\n", Status);
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/port_topology.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/port_topology.c [iso-8859-1]
(original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/port_topology.c [iso-8859-1] Mon Jan
26 11:38:22 2009
@@ -70,6 +70,7 @@
DPRINT1("IPortTopology_fnQueryInterface\n");
if (IsEqualGUIDAligned(refiid, &IID_IPortTopology) ||
+ IsEqualGUIDAligned(refiid, &IID_IPort) ||
IsEqualGUIDAligned(refiid, &IID_IUnknown))
{
*Output = &This->lpVtbl;
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild [iso-8859-1]
(original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild [iso-8859-1] Mon Jan 26
11:38:22 2009
@@ -10,6 +10,7 @@
<library>drmk</library>
<library>rtl</library>
<library>hal</library>
+ <library>libcntpr</library>
<file>api.c</file>
<file>connection.c</file>
<file>dll.c</file>
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/private.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/private.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/private.h [iso-8859-1] Mon Jan 26
11:38:22 2009
@@ -17,7 +17,10 @@
#include "interfaces.h"
#include <ks.h>
+#include <ksmedia.h>
#include <stdio.h>
+#include <math.h>
+#include <intrin.h>
#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) +
((D)<<24))
#define TAG_PORTCLASS TAG('P', 'C', 'L', 'S')
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/service_group.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/service_group.c [iso-8859-1]
(original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/service_group.c [iso-8859-1] Mon Jan
26 11:38:22 2009
@@ -177,7 +177,7 @@
{
IServiceGroupImpl * This = (IServiceGroupImpl*)DeferredContext;
IServiceGroup_fnRequestService((IServiceGroup*)DeferredContext);
- KeSetEvent(&This->DpcEvent, 0, FALSE);
+ KeSetEvent(&This->DpcEvent, IO_SOUND_INCREMENT, FALSE);
}
@@ -243,7 +243,7 @@
};
/*
- * @unimplemented
+ * @implemented
*/
NTSTATUS NTAPI
PcNewServiceGroup(