ReactOS 0.4.15-dev-7918-g2a2556c
mixer.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: drivers/dd/sound/mixer.c
5 * PURPOSE: Wave Mixer?
6 * PROGRAMMER: ?
7 *
8 * UPDATE HISTORY:
9 * ??/??/??: Created
10 * 10/23/02: Steven Edwards (Steven_Ed4153@yahoo.com)
11 * Minor build fixes
12 */
13
14#include "sb16.h"
15#include "dsp.h"
16#include "mixer.h"
17
18unsigned char read_mixer(unsigned short base,unsigned char reg)
19{
20
21// outb(base+0x04,reg);
22// return inb(base+0x05);
23 return 0;
24}
25
26unsigned char get_irq(SB16* sb16)
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}
37
39{
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}
void get_dma(SB16 *sb16)
Definition: mixer.c:38
unsigned char read_mixer(unsigned short base, unsigned char reg)
Definition: mixer.c:18
unsigned char get_irq(SB16 *sb16)
Definition: mixer.c:26
SB16 sb16
Definition: sound.c:26
unsigned char irq
Definition: dsp.h:13
GLuint64EXT * result
Definition: glext.h:11304
static int reg
Definition: i386-dis.c:1290
#define MIXER_DMA_SETUP_REGISTER
Definition: mixer.h:2
#define MIXER_INTERRUPT_SETUP_REGISTER
Definition: mixer.h:1
Definition: sb16.h:2
unsigned char dma16
Definition: sb16.h:6
unsigned char irq
Definition: sb16.h:4
unsigned short base
Definition: sb16.h:3
unsigned char dma8
Definition: sb16.h:5