ReactOS  0.4.14-dev-1314-gacf135d
mixer.c File Reference
#include "sb16.h"
#include "dsp.h"
#include "mixer.h"
Include dependency graph for mixer.c:

Go to the source code of this file.

Functions

unsigned char read_mixer (unsigned short base, unsigned char reg)
 
unsigned char get_irq (SB16 *sb16)
 
void get_dma (SB16 *sb16)
 

Function Documentation

◆ get_dma()

void get_dma ( SB16 sb16)

Definition at line 38 of file mixer.c.

39 {
40  unsigned char hi,lo,result=read_mixer(sb16->base,MIXER_DMA_SETUP_REGISTER);
41  hi=result&0xE0;
42  lo=result&0x0B;
43  if(hi==0x80) sb16->dma16=7;
44  if(hi==0x40) sb16->dma16=6;
45  if(hi==0x20) sb16->dma16=5;
46 
47  if(lo==0x08) sb16->dma8=3;
48  if(lo==0x02) sb16->dma8=1;
49  if(lo==0x01) sb16->dma8=0;
50 }
unsigned char read_mixer(unsigned short base, unsigned char reg)
Definition: mixer.c:18
SB16 sb16
Definition: sound.c:26
#define MIXER_DMA_SETUP_REGISTER
Definition: mixer.h:2
unsigned char dma16
Definition: sb16.h:6
unsigned char dma8
Definition: sb16.h:5
unsigned short base
Definition: sb16.h:3
GLuint64EXT * result
Definition: glext.h:11304

Referenced by sb16_getenvironment().

◆ get_irq()

unsigned char get_irq ( SB16 sb16)

Definition at line 26 of file mixer.c.

27 {
28  unsigned char irq;
30 
31  if(irq==1) sb16->irq=2;
32  if(irq==2) sb16->irq=5;
33  if(irq==4) sb16->irq=7;
34  if(irq==8) sb16->irq=10;
35  return 0;
36 }
unsigned char irq
Definition: dsp.h:13
unsigned char read_mixer(unsigned short base, unsigned char reg)
Definition: mixer.c:18
#define MIXER_INTERRUPT_SETUP_REGISTER
Definition: mixer.h:1
SB16 sb16
Definition: sound.c:26
unsigned char irq
Definition: sb16.h:4
unsigned short base
Definition: sb16.h:3

Referenced by sb16_getenvironment().

◆ read_mixer()

unsigned char read_mixer ( unsigned short  base,
unsigned char  reg 
)

Definition at line 18 of file mixer.c.

19 {
20 
21 // outb(base+0x04,reg);
22 // return inb(base+0x05);
23  return 0;
24 }

Referenced by get_dma(), and get_irq().