ReactOS 0.4.15-dev-8119-g4fb2fdb
speaker.c File Reference
#include "precomp.h"
Include dependency graph for speaker.c:

Go to the source code of this file.

Functions

NTSTATUS SbDspEnableSpeaker (IN PUCHAR BasePort, IN ULONG Timeout)
 
NTSTATUS SbDspDisableSpeaker (IN PUCHAR BasePort, IN ULONG Timeout)
 
NTSTATUS SbDspIsSpeakerEnabled (IN PUCHAR BasePort, OUT PBOOLEAN IsEnabled, IN ULONG Timeout)
 

Function Documentation

◆ SbDspDisableSpeaker()

NTSTATUS SbDspDisableSpeaker ( IN PUCHAR  BasePort,
IN ULONG  Timeout 
)

Definition at line 27 of file speaker.c.

30{
31 return SbDspWrite(BasePort, SB_DSP_SPEAKER_OFF, Timeout);
32}
static ULONG Timeout
Definition: ping.c:61
NTSTATUS SbDspWrite(IN PUCHAR BasePort, IN UCHAR DataByte, IN ULONG Timeout)
Definition: dsp_io.c:99
#define SB_DSP_SPEAKER_OFF
Definition: sbdsp.h:76

◆ SbDspEnableSpeaker()

NTSTATUS SbDspEnableSpeaker ( IN PUCHAR  BasePort,
IN ULONG  Timeout 
)

Definition at line 19 of file speaker.c.

22{
23 return SbDspWrite(BasePort, SB_DSP_SPEAKER_ON, Timeout);
24}
#define SB_DSP_SPEAKER_ON
Definition: sbdsp.h:75

◆ SbDspIsSpeakerEnabled()

NTSTATUS SbDspIsSpeakerEnabled ( IN PUCHAR  BasePort,
OUT PBOOLEAN  IsEnabled,
IN ULONG  Timeout 
)

Definition at line 38 of file speaker.c.

42{
44 UCHAR SpeakerStatus = 0;
45
46 if ( ! IsEnabled )
48
49 /* Request the speaker status */
51 if ( Status != STATUS_SUCCESS )
52 return Status;
53
54 /* Obtain the status */
55 Status = SbDspRead(BasePort, &SpeakerStatus, Timeout);
56 if ( Status != STATUS_SUCCESS )
57 return Status;
58
59 DbgPrint("SBDSP - SpeakerStatus is %02x\n", SpeakerStatus);
60 *IsEnabled = (SpeakerStatus == 0xFF);
61
62 return STATUS_SUCCESS;
63}
LONG NTSTATUS
Definition: precomp.h:26
return pProvider IsEnabled(ProviderControl)
Status
Definition: gdiplustypes.h:25
#define DbgPrint
Definition: hal.h:12
#define STATUS_INVALID_PARAMETER_2
Definition: ntstatus.h:476
NTSTATUS SbDspRead(IN PUCHAR BasePort, OUT PUCHAR DataByte, IN ULONG Timeout)
Definition: dsp_io.c:120
#define SB_DSP_SPEAKER_STATUS
Definition: sbdsp.h:77
#define STATUS_SUCCESS
Definition: shellext.h:65
unsigned char UCHAR
Definition: xmlstorage.h:181