[PORTCLS]
[reactos.git] / reactos / drivers / wdm / audio / backpln / portcls / dma_slave.cpp
index d4c1e7c..7aefa8e 100644 (file)
@@ -82,7 +82,7 @@ CDmaChannelInit::QueryInterface(
         PUNKNOWN(*Output)->AddRef();
         return STATUS_SUCCESS;
     }
-    DPRINT1("No interface!!!\n");
+    DPRINT("No interface!!!\n");
     return STATUS_UNSUCCESSFUL;
 }
 
@@ -101,20 +101,20 @@ CDmaChannelInit::AllocateBuffer(
     // Did the caller already allocate a buffer ?*/
     if (m_Buffer)
     {
-        DPRINT1("CDmaChannelInit_AllocateBuffer free common buffer first \n");
+        DPRINT("CDmaChannelInit_AllocateBuffer free common buffer first \n");
         return STATUS_UNSUCCESSFUL;
     }
 
     m_Buffer = m_pAdapter->DmaOperations->AllocateCommonBuffer(m_pAdapter, BufferSize, &m_Address, FALSE);
     if (!m_Buffer)
     {
-        DPRINT1("CDmaChannelInit_AllocateBuffer fAllocateCommonBuffer failed \n");
+        DPRINT("CDmaChannelInit_AllocateBuffer fAllocateCommonBuffer failed \n");
         return STATUS_UNSUCCESSFUL;
     }
 
     m_BufferSize = BufferSize;
     m_AllocatedBufferSize = BufferSize;
-    DPRINT1("CDmaChannelInit::AllocateBuffer Success Buffer %p BufferSize %u Address %x\n", m_Buffer, BufferSize, m_Address);
+    DPRINT("CDmaChannelInit::AllocateBuffer Success Buffer %p BufferSize %u Address %x\n", m_Buffer, BufferSize, m_Address);
 
     return STATUS_SUCCESS;
 }
@@ -162,7 +162,7 @@ CDmaChannelInit::FreeBuffer()
 
     if (!m_Buffer)
     {
-        DPRINT1("CDmaChannelInit_FreeBuffer allocate common buffer first \n");
+        DPRINT("CDmaChannelInit_FreeBuffer allocate common buffer first \n");
         return;
     }
 
@@ -194,6 +194,19 @@ CDmaChannelInit::MaximumBufferSize()
     return m_MaximumBufferSize;
 }
 
+#ifdef _MSC_VER
+
+PHYSICAL_ADDRESS
+NTAPI
+CDmaChannelInit::PhysicalAddress()
+{
+    DPRINT("CDmaChannelInit_PhysicalAdress: this %p Virtuell %p Physical High %x Low %x%\n", this, m_Buffer, m_Address.HighPart, m_Address.LowPart);
+
+    return m_Address;
+}
+
+#else
+
 PHYSICAL_ADDRESS
 NTAPI
 CDmaChannelInit::PhysicalAddress(
@@ -208,6 +221,9 @@ CDmaChannelInit::PhysicalAddress(
     return Result;
 }
 
+
+#endif
+
 VOID
 NTAPI
 CDmaChannelInit::SetBufferSize(
@@ -222,6 +238,8 @@ ULONG
 NTAPI
 CDmaChannelInit::BufferSize()
 {
+    DPRINT("BufferSize %u\n", m_BufferSize);
+    PC_ASSERT(m_BufferSize);
     return m_BufferSize;
 }
 
@@ -255,6 +273,8 @@ CDmaChannelInit::ReadCounter()
     if (!m_DmaStarted || Counter >= m_LastTransferCount)
         Counter = 0;
 
+    DPRINT("ReadCounter %u\n", Counter);
+
     return Counter;
 }