ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

mixer.c
Go to the documentation of this file.
00001 /*
00002  * COPYRIGHT:        See COPYING in the top level directory
00003  * PROJECT:          ReactOS kernel
00004  * FILE:             drivers/dd/sound/mixer.c
00005  * PURPOSE:          Wave Mixer?
00006  * PROGRAMMER:       ?
00007  *
00008  * UPDATE HISTORY:
00009  *              ??/??/??: Created
00010  *      10/23/02: Steven Edwards (Steven_Ed4153@yahoo.com)
00011  *            Minor build fixes
00012  */
00013 
00014 #include "sb16.h"
00015 #include "dsp.h"
00016 #include "mixer.h"
00017 
00018 unsigned char read_mixer(unsigned short base,unsigned char reg)
00019 {
00020 
00021 //  outb(base+0x04,reg);
00022 //  return inb(base+0x05);
00023     return 0;
00024 }
00025 
00026 unsigned char get_irq(SB16* sb16)
00027 {
00028     unsigned char irq;
00029     irq=(read_mixer(sb16->base,MIXER_INTERRUPT_SETUP_REGISTER)&0x0f);
00030 
00031     if(irq==1) sb16->irq=2;
00032     if(irq==2) sb16->irq=5;
00033     if(irq==4) sb16->irq=7;
00034     if(irq==8) sb16->irq=10;
00035     return 0;
00036 }
00037 
00038 void get_dma(SB16* sb16)
00039 {
00040     unsigned char hi,lo,result=read_mixer(sb16->base,MIXER_DMA_SETUP_REGISTER);
00041   hi=result&0xE0;
00042   lo=result&0x0B;
00043   if(hi==0x80) sb16->dma16=7;
00044   if(hi==0x40) sb16->dma16=6;
00045   if(hi==0x20) sb16->dma16=5;
00046 
00047   if(lo==0x08) sb16->dma8=3;
00048   if(lo==0x02) sb16->dma8=1;
00049   if(lo==0x01) sb16->dma8=0;
00050 }

Generated on Fri May 25 2012 04:15:50 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.