mirror of
https://github.com/reactos/reactos.git
synced 2024-10-23 14:36:11 +00:00
Fixed a few minor problems so the driver compiles with the current ROS headers etc.
It still doesn't really do much apart from play a buffer of silence when loaded, but maybe someone can help me with this :) svn path=/trunk/; revision=7922
This commit is contained in:
parent
4b2257966c
commit
392b65e4a7
|
@ -92,7 +92,7 @@ BOOLEAN CreateDMA(PDEVICE_OBJECT DeviceObject)
|
||||||
Desc.Dma32BitAddresses = FALSE; // I don't think we can
|
Desc.Dma32BitAddresses = FALSE; // I don't think we can
|
||||||
Desc.IgnoreCount = FALSE; // Should be OK
|
Desc.IgnoreCount = FALSE; // Should be OK
|
||||||
Desc.Reserved1 = 0;
|
Desc.Reserved1 = 0;
|
||||||
Desc.Reserved2 = 0;
|
// Desc.Reserved2 = 0;
|
||||||
Desc.BusNumber = 0;
|
Desc.BusNumber = 0;
|
||||||
Desc.DmaChannel = Device->DMA; // Our channel :)
|
Desc.DmaChannel = Device->DMA; // Our channel :)
|
||||||
Desc.InterfaceType = Isa; // (BusType == MicroChannel) ? MicroChannel : Isa;
|
Desc.InterfaceType = Isa; // (BusType == MicroChannel) ? MicroChannel : Isa;
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
//#define NDEBUG
|
//#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
#include <rosrtl/string.h>
|
||||||
|
|
||||||
#include "sndblst.h"
|
#include "sndblst.h"
|
||||||
|
|
||||||
|
@ -34,8 +35,9 @@ NTSTATUS InitDevice(
|
||||||
// PDEVICE_INSTANCE Instance = Context;
|
// PDEVICE_INSTANCE Instance = Context;
|
||||||
PDEVICE_OBJECT DeviceObject; // = Context;
|
PDEVICE_OBJECT DeviceObject; // = Context;
|
||||||
PDEVICE_EXTENSION Parameters; // = DeviceObject->DeviceExtension;
|
PDEVICE_EXTENSION Parameters; // = DeviceObject->DeviceExtension;
|
||||||
UNICODE_STRING DeviceName = UNICODE_STRING_INITIALIZER(L"\\Device\\SoundBlaster_Out_0");
|
UNICODE_STRING DeviceName = ROS_STRING_INITIALIZER(L"\\Device\\WaveOut"); // CHANGE THESE!
|
||||||
UNICODE_STRING SymlinkName = UNICODE_STRING_INITIALIZER(L"\\??\\SoundBlaster_Out_0");
|
UNICODE_STRING SymlinkName = ROS_STRING_INITIALIZER(L"\\??\\WaveOut");
|
||||||
|
|
||||||
// CONFIG Config;
|
// CONFIG Config;
|
||||||
RTL_QUERY_REGISTRY_TABLE Table[2];
|
RTL_QUERY_REGISTRY_TABLE Table[2];
|
||||||
NTSTATUS s;
|
NTSTATUS s;
|
||||||
|
@ -43,7 +45,7 @@ NTSTATUS InitDevice(
|
||||||
UCHAR DSP_Major = 0, DSP_Minor = 0;
|
UCHAR DSP_Major = 0, DSP_Minor = 0;
|
||||||
|
|
||||||
// This is TEMPORARY, to ensure that we don't process more than 1 device.
|
// This is TEMPORARY, to ensure that we don't process more than 1 device.
|
||||||
// I'll remove this limitation in the future.
|
// This limitation should be removed in future.
|
||||||
if (DeviceCount > 0)
|
if (DeviceCount > 0)
|
||||||
{
|
{
|
||||||
DPRINT("Sorry - only 1 device supported by Sound Blaster driver at present :(\n");
|
DPRINT("Sorry - only 1 device supported by Sound Blaster driver at present :(\n");
|
||||||
|
@ -256,7 +258,7 @@ BlasterDeviceControl(PDEVICE_OBJECT DeviceObject,
|
||||||
* RETURNS: Success or failure
|
* RETURNS: Success or failure
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
/* PIO_STACK_LOCATION Stack;
|
PIO_STACK_LOCATION Stack;
|
||||||
PDEVICE_EXTENSION DeviceExtension;
|
PDEVICE_EXTENSION DeviceExtension;
|
||||||
UINT ByteCount;
|
UINT ByteCount;
|
||||||
PBYTE Data;
|
PBYTE Data;
|
||||||
|
@ -268,7 +270,7 @@ BlasterDeviceControl(PDEVICE_OBJECT DeviceObject,
|
||||||
|
|
||||||
switch(Stack->Parameters.DeviceIoControl.IoControlCode)
|
switch(Stack->Parameters.DeviceIoControl.IoControlCode)
|
||||||
{
|
{
|
||||||
case IOCTL_MIDI_PLAY :
|
/* case IOCTL_MIDI_PLAY :
|
||||||
{
|
{
|
||||||
DPRINT("Received IOCTL_MIDI_PLAY\n");
|
DPRINT("Received IOCTL_MIDI_PLAY\n");
|
||||||
Data = (PBYTE) Irp->AssociatedIrp.SystemBuffer;
|
Data = (PBYTE) Irp->AssociatedIrp.SystemBuffer;
|
||||||
|
@ -289,6 +291,7 @@ BlasterDeviceControl(PDEVICE_OBJECT DeviceObject,
|
||||||
|
|
||||||
return(STATUS_SUCCESS);
|
return(STATUS_SUCCESS);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
return(STATUS_SUCCESS);
|
return(STATUS_SUCCESS);
|
||||||
|
|
Loading…
Reference in a new issue