[ros-diffs] [janderwald] 39143: - Fix registered guids for IPortMidi - Fix InterfaceGuids array in IPortTopology - Add a hack to prevent es1371 driver from crashing

janderwald at svn.reactos.org janderwald at svn.reactos.org
Tue Jan 27 18:54:47 CET 2009


Author: janderwald
Date: Tue Jan 27 11:54:46 2009
New Revision: 39143

URL: http://svn.reactos.org/svn/reactos?rev=39143&view=rev
Log:
- Fix registered guids for IPortMidi
- Fix InterfaceGuids array in IPortTopology 
- Add a hack to prevent es1371 driver from crashing

Modified:
    trunk/reactos/drivers/wdm/audio/backpln/portcls/dma_slave.c
    trunk/reactos/drivers/wdm/audio/backpln/portcls/port_midi.c
    trunk/reactos/drivers/wdm/audio/backpln/portcls/port_topology.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/portcls/dma_slave.c?rev=39143&r1=39142&r2=39143&view=diff
==============================================================================
--- 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] Tue Jan 27 11:54:46 2009
@@ -116,7 +116,7 @@
     //FIXME
     // retry with different size on failure
 
-    This->Buffer = This->pAdapter->DmaOperations->AllocateCommonBuffer(This->pAdapter, BufferSize, &This->Address, TRUE);
+    This->Buffer = This->pAdapter->DmaOperations->AllocateCommonBuffer(This->pAdapter, BufferSize, &This->Address, FALSE);
     if (!This->Buffer)
     {
         DPRINT1("IDmaChannelSlave_AllocateBuffer fAllocateCommonBuffer failed \n");
@@ -125,7 +125,7 @@
 
     This->BufferSize = BufferSize;
     This->AllocatedBufferSize = BufferSize;
-    DPRINT1("IDmaChannelSlave_fnAllocateBuffer Success Buffer %u Address %ull\n", BufferSize, This->Address);
+    DPRINT1("IDmaChannelSlave_fnAllocateBuffer Success Buffer %u Address %x %p\n", BufferSize, This->Address, PhysicalAddressConstraint);
 
     return STATUS_SUCCESS;
 }
@@ -226,10 +226,19 @@
 IDmaChannelSlave_fnPhysicalAdress(
     IN IDmaChannelSlave * iface)
 {
-    IDmaChannelSlaveImpl * This = (IDmaChannelSlaveImpl*)iface;
-
-    DPRINT("IDmaChannelSlave_PhysicalAdress: This %p\n", This);
-    return This->Address;
+    PHYSICAL_ADDRESS Address;
+    IDmaChannelSlaveImpl * This = (IDmaChannelSlaveImpl*)iface;
+    DPRINT("IDmaChannelSlave_PhysicalAdress: This %p Virtuell %p Physical High %x Low %x%\n", This, This->Buffer, This->Address.HighPart, This->Address.LowPart);
+
+#if 1
+
+    /// HACK
+    /// Prevent ES1371 driver from crashing by returning the vaddr instead of physical address
+    Address.QuadPart = (ULONG_PTR)This->Buffer;
+#else
+    Address.QuadPart = This->Address.QuadPart;
+#endif
+    return Address;
 }
 
 VOID

Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/port_midi.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/portcls/port_midi.c?rev=39143&r1=39142&r2=39143&view=diff
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/port_midi.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/port_midi.c [iso-8859-1] Tue Jan 27 11:54:46 2009
@@ -18,16 +18,19 @@
     PSUBDEVICE_DESCRIPTOR SubDeviceDescriptor;
 }IPortMidiImpl;
 
-
 static GUID InterfaceGuids[3] = 
 {
-    {
-        /// KS_CATEGORY_TOPOLOGY
-        0xDDA54A40, 0x1E4C, 0x11D1, {0xA0, 0x50, 0x40, 0x57, 0x05, 0xC1, 0x00, 0x00}
-    },
     {
         /// KS_CATEGORY_AUDIO
         0x6994AD04, 0x93EF, 0x11D0, {0xA3, 0xCC, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}
+    },
+    {
+        /// KS_CATEGORY_RENDER
+        0x65E8773E, 0x8F56, 0x11D0, {0xA3, 0xB9, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}
+    },
+    {
+        /// KS_CATEGORY_CAPTURE
+        0x65E8773D, 0x8F56, 0x11D0, {0xA3, 0xB9, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}
     }
 };
 
@@ -64,6 +67,11 @@
     else if (IsEqualGUIDAligned(refiid, &IID_IPortClsVersion))
     {
         return NewPortClsVersion((PPORTCLSVERSION*)Output);
+    }
+    else if (IsEqualGUIDAligned(refiid, &IID_IDrmPort) ||
+             IsEqualGUIDAligned(refiid, &IID_IDrmPort2))
+    {
+        return NewIDrmPort((PDRMPORT2*)Output);
     }
 
     StringFromCLSID(refiid, Buffer);
@@ -190,7 +198,7 @@
 
     /* create the subdevice descriptor */
     Status = PcCreateSubdeviceDescriptor(&This->SubDeviceDescriptor, 
-                                         2,
+                                         3,
                                          InterfaceGuids, 
                                          0, 
                                          NULL,

Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/port_topology.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/portcls/port_topology.c?rev=39143&r1=39142&r2=39143&view=diff
==============================================================================
--- 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] Tue Jan 27 11:54:46 2009
@@ -18,7 +18,7 @@
 }IPortTopologyImpl;
 
 
-static GUID InterfaceGuids[3] = 
+static GUID InterfaceGuids[2] = 
 {
     {
         /// KS_CATEGORY_TOPOLOGY



More information about the Ros-diffs mailing list