mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 21:12:59 +00:00
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys.
This commit is contained in:
parent
b94e2d8ca0
commit
c2c66aff7d
24198 changed files with 0 additions and 37285 deletions
66
sdk/lib/drivers/sound/legacy/hardware.c
Normal file
66
sdk/lib/drivers/sound/legacy/hardware.c
Normal file
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
ReactOS Sound System
|
||||
Hardware interaction helper
|
||||
|
||||
Author:
|
||||
Andrew Greenwood (silverblade@reactos.org)
|
||||
|
||||
History:
|
||||
25 May 2008 - Created
|
||||
|
||||
Notes:
|
||||
This uses some obsolete calls (eg: HalGetInterruptVector).
|
||||
Might be worth updating this in future to use some of the
|
||||
recommended functions like IoReportDetectedDevice and
|
||||
IoReportResourceForDetection...
|
||||
*/
|
||||
|
||||
#include <ntddk.h>
|
||||
#include <ntddsnd.h>
|
||||
#include <debug.h>
|
||||
|
||||
/* NOTE: Disconnect using IoDisconnectInterrupt */
|
||||
|
||||
NTSTATUS
|
||||
LegacyAttachInterrupt(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN UCHAR Irq,
|
||||
IN PKSERVICE_ROUTINE ServiceRoutine,
|
||||
OUT PKINTERRUPT* InterruptObject)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
ULONG Vector;
|
||||
KIRQL IrqLevel;
|
||||
KAFFINITY Affinity;
|
||||
|
||||
DPRINT("Obtaining interrupt vector");
|
||||
|
||||
Vector = HalGetInterruptVector(Isa,
|
||||
0,
|
||||
Irq,
|
||||
Irq,
|
||||
&IrqLevel,
|
||||
&Affinity);
|
||||
|
||||
DPRINT("Vector %d", Vector);
|
||||
DPRINT("Connecting IRQ %d", Irq);
|
||||
|
||||
Status = IoConnectInterrupt(InterruptObject,
|
||||
ServiceRoutine,
|
||||
DeviceObject,
|
||||
NULL,
|
||||
Vector,
|
||||
IrqLevel,
|
||||
IrqLevel,
|
||||
Latched,
|
||||
FALSE,
|
||||
Affinity,
|
||||
FALSE);
|
||||
|
||||
if ( Status == STATUS_INVALID_PARAMETER )
|
||||
{
|
||||
Status = STATUS_DEVICE_CONFIGURATION_ERROR;
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue