reactos/drivers/dd/sndblst
diff -u -r1.1 -r1.2
--- card.c 20 Jan 2004 19:35:59 -0000 1.1
+++ card.c 28 Mar 2004 20:44:09 -0000 1.2
@@ -5,14 +5,12 @@
*/
#include <ddk/ntddk.h>
-
-#include <debug.h>
#include "sndblst.h"
VOID SetOutputSampleRate(UINT BasePort, UINT SampleRate)
{
// This only works for DSP v4.xx ONLY - need a workaround!
- DbgPrint("Setting output sample rate\n");
+ DPRINT("Setting output sample rate\n");
// WAIT
// if (! WaitToSend(BasePort))
@@ -26,7 +24,7 @@
VOID EnableSpeaker(UINT BasePort, BOOLEAN SpeakerOn)
{
- DbgPrint("Setting speaker status %d\n", SpeakerOn);
+ DPRINT("Setting speaker status %d\n", SpeakerOn);
// if (! WaitForWrite(BasePort))
// return;
@@ -37,7 +35,7 @@
BOOLEAN IsSpeakerEnabled(UINT BasePort)
{
- DbgPrint("Obtaining speaker status\n");
+ DPRINT("Obtaining speaker status\n");
// if (! WaitToSend(BasePort))
// return FALSE;
@@ -54,7 +52,7 @@
{
CHAR Command;
- DbgPrint("BeginPlayback(%d, %d, %d, %d)\n", BasePort, BitDepth, Channels, BlockSize);
+ DPRINT("BeginPlayback(%d, %d, %d, %d)\n", BasePort, BitDepth, Channels, BlockSize);
// switch(BitDepth)
// {
@@ -63,7 +61,7 @@
// default : Command = 0xc0;
// }
- DbgPrint("Initiating playback\n");
+ DPRINT("Initiating playback\n");
// TEMPORARY:
SB_WRITE_BYTE(BasePort, 0xc6);
reactos/drivers/dd/sndblst
diff -u -r1.3 -r1.4
--- dma.c 10 Feb 2004 16:22:55 -0000 1.3
+++ dma.c 28 Mar 2004 20:44:09 -0000 1.4
@@ -3,9 +3,6 @@
*/
#include <ddk/ntddk.h>
-
-#include <debug.h>
-
#include "sndblst.h"
@@ -46,7 +43,7 @@
UINT zzz;
PUCHAR VirtualAddress = (PUCHAR) MmGetMdlVirtualAddress(Device->Mdl);
- DbgPrint("IoMapTransfer\n");
+ DPRINT("IoMapTransfer\n");
IoMapTransfer(Device->Adapter,
Device->Mdl,
MapRegisterBase,
@@ -54,14 +51,14 @@
&Device->BufferSize, // is this right?
TRUE);
- DbgPrint("VBuffer == 0x%x (really 0x%x?) Bufsize == %u\n", Device->VirtualBuffer, MmGetPhysicalAddress(Device->VirtualBuffer), Device->BufferSize);
+ DPRINT("VBuffer == 0x%x (really 0x%x?) Bufsize == %u\n", Device->VirtualBuffer, MmGetPhysicalAddress(Device->VirtualBuffer), Device->BufferSize);
- DbgPrint("Writing %u bytes of garbage...\n", Device->BufferSize);
+ DPRINT("Writing %u bytes of garbage...\n", Device->BufferSize);
// Write some garbage:
for (zzz = 0; zzz < Device->BufferSize; zzz ++)
*(VirtualAddress + zzz) = (UCHAR) zzz % 200;
- DbgPrint("done\n");
+ DPRINT("done\n");
KeSetEvent(Context, 0, FALSE);
@@ -79,7 +76,7 @@
// Buffersize should already be set but it isn't yet !
Device->BufferSize = SB_BUFSIZE;
- DbgPrint("Bufsize == %u\n", Device->BufferSize);
+ DPRINT("Bufsize == %u\n", Device->BufferSize);
RtlZeroMemory(&Desc, sizeof(DEVICE_DESCRIPTION));
@@ -102,74 +99,74 @@
// Desc.MinimumLength = 0;
Desc.DmaPort = 0;
- DbgPrint("Calling HalGetAdapter(), asking for %d mapped regs\n", MappedRegs);
+ DPRINT("Calling HalGetAdapter(), asking for %d mapped regs\n", MappedRegs);
Device->Adapter = HalGetAdapter(&Desc, &MappedRegs);
- DbgPrint("Called\n");
+ DPRINT("Called\n");
if (! Device->Adapter)
{
- DbgPrint("HalGetAdapter() FAILED\n");
+ DPRINT("HalGetAdapter() FAILED\n");
return FALSE;
}
- DbgPrint("Bufsize == %u\n", Device->BufferSize);
+ DPRINT("Bufsize == %u\n", Device->BufferSize);
if (MappedRegs < BYTES_TO_PAGES(Device->BufferSize))
{
- DbgPrint("Could only allocate %u mapping registers\n", MappedRegs);
+ DPRINT("Could only allocate %u mapping registers\n", MappedRegs);
if (MappedRegs == 0)
return FALSE;
Device->BufferSize = MappedRegs * PAGE_SIZE;
- DbgPrint("Bufsize == %u\n", Device->BufferSize);
+ DPRINT("Bufsize == %u\n", Device->BufferSize);
}
- DbgPrint("Allocated %u mapping registers\n", MappedRegs);
+ DPRINT("Allocated %u mapping registers\n", MappedRegs);
// Check if we already have memory here...
// Check to make sure we're >= minimum
- DbgPrint("Allocating buffer\n");
+ DPRINT("Allocating buffer\n");
- DbgPrint("Bufsize == %u\n", Device->BufferSize);
+ DPRINT("Bufsize == %u\n", Device->BufferSize);
Device->VirtualBuffer = HalAllocateCommonBuffer(Device->Adapter, Device->BufferSize,
&Device->Buffer, FALSE);
// For some reason BufferSize == 0 here?!
- DbgPrint("Buffer == 0x%x Bufsize == %u\n", Device->Buffer, Device->BufferSize);
+ DPRINT("Buffer == 0x%x Bufsize == %u\n", Device->Buffer, Device->BufferSize);
if (! Device->VirtualBuffer)
{
- DbgPrint("Could not allocate buffer :(\n");
+ DPRINT("Could not allocate buffer :(\n");
// should try again with smaller buffer...
return FALSE;
}
- DbgPrint("Buffer == 0x%x Bufsize == %u\n", Device->Buffer, Device->BufferSize);
+ DPRINT("Buffer == 0x%x Bufsize == %u\n", Device->Buffer, Device->BufferSize);
- DbgPrint("Calling IoAllocateMdl()\n");
+ DPRINT("Calling IoAllocateMdl()\n");
Device->Mdl = IoAllocateMdl(Device->VirtualBuffer, Device->BufferSize, FALSE, FALSE, NULL);
- DbgPrint("Bufsize == %u\n", Device->BufferSize);
+ DPRINT("Bufsize == %u\n", Device->BufferSize);
// IS THIS RIGHT:
if (! Device->VirtualBuffer)
{
- DbgPrint("IoAllocateMdl() FAILED\n");
+ DPRINT("IoAllocateMdl() FAILED\n");
// Free the HAL buffer
return FALSE;
}
- DbgPrint("VBuffer == 0x%x Mdl == %u Bufsize == %u\n", Device->VirtualBuffer, Device->Mdl, Device->BufferSize);
+ DPRINT("VBuffer == 0x%x Mdl == %u Bufsize == %u\n", Device->VirtualBuffer, Device->Mdl, Device->BufferSize);
- DbgPrint("Calling MmBuildMdlForNonPagedPool\n");
+ DPRINT("Calling MmBuildMdlForNonPagedPool\n");
MmBuildMdlForNonPagedPool(Device->Mdl);
- DbgPrint("Bufsize == %u\n", Device->BufferSize);
+ DPRINT("Bufsize == %u\n", Device->BufferSize);
// part II:
KeInitializeEvent(&DMAEvent, SynchronizationEvent, FALSE);
@@ -177,7 +174,7 @@
IoAllocateAdapterChannel(Device->Adapter, DeviceObject,
BYTES_TO_PAGES(Device->BufferSize),
SoundProgramDMA, &DMAEvent);
- DbgPrint("VBuffer == 0x%x Bufsize == %u\n", Device->VirtualBuffer, Device->BufferSize);
+ DPRINT("VBuffer == 0x%x Bufsize == %u\n", Device->VirtualBuffer, Device->BufferSize);
// Lower IRQL
KeWaitForSingleObject(&DMAEvent, Executive, KernelMode, FALSE, NULL);
reactos/drivers/dd/sndblst
diff -u -r1.1 -r1.2
--- portio.c 20 Jan 2004 19:35:59 -0000 1.1
+++ portio.c 28 Mar 2004 20:44:09 -0000 1.2
@@ -13,12 +13,11 @@
#include <ddk/ntddk.h>
#include "sndblst.h"
-
BOOLEAN WaitToSend(UINT BasePort)
{
int TimeOut;
- DbgPrint("WaitToSend ");
+ DPRINT("WaitToSend ");
// Check if it's OK to send
for (TimeOut = SB_TIMEOUT;
@@ -28,11 +27,11 @@
// If a time-out occurs, we report failure
if (! TimeOut)
{
- DbgPrint("FAILED\n");
+ DPRINT("FAILED\n");
return FALSE;
}
- DbgPrint("SUCCEEDED\n");
+ DPRINT("SUCCEEDED\n");
return TRUE;
}
@@ -41,7 +40,7 @@
{
int TimeOut;
- DbgPrint("WaitToReceive ");
+ DPRINT("WaitToReceive ");
// Check if it's OK to receive
for (TimeOut = SB_TIMEOUT;
@@ -51,11 +50,11 @@
// If a time-out occurs, we report failure
if (! TimeOut)
{
- DbgPrint("FAILED\n");
+ DPRINT("FAILED\n");
return FALSE;
}
- DbgPrint("SUCCEEDED\n");
+ DPRINT("SUCCEEDED\n");
return TRUE;
}
@@ -67,9 +66,9 @@
BOOLEAN Status;
UCHAR DSP_Major, DSP_Minor;
- DbgPrint("InitSoundCard() called\n");
+ DPRINT("InitSoundCard() called\n");
- DbgPrint("Resetting sound card\n");
+ DPRINT("Resetting sound card\n");
// if (!WaitToSend(BasePort))
// return FALSE;
@@ -79,7 +78,7 @@
// Check if it's OK to receive (some cards will ignore the above reset
// command and so will not issue an ACK, so time out is NOT an error)
- DbgPrint("Waiting for an ACK\n");
+ DPRINT("Waiting for an ACK\n");
if (WaitToReceive(BasePort))
{
// Check to make sure the reset was acknowledged:
@@ -88,7 +87,7 @@
TimeOut --);
}
- DbgPrint("Querying DSP version\n");
+ DPRINT("Querying DSP version\n");
if (! WaitToSend(BasePort))
return FALSE;
@@ -100,9 +99,9 @@
DSP_Major = SB_READ_DATA(BasePort);
DSP_Minor = SB_READ_DATA(BasePort);
- DbgPrint("DSP v%d.%d\n", DSP_Major, DSP_Minor);
+ DPRINT("DSP v%d.%d\n", DSP_Major, DSP_Minor);
- DbgPrint("Sound card initialized!\n");
+ DPRINT("Sound card initialized!\n");
return (DSP_Major * 256) + DSP_Minor;
}