diff options
Diffstat (limited to 'sys/i386/isa/sound/sound_config.h')
-rw-r--r-- | sys/i386/isa/sound/sound_config.h | 183 |
1 files changed, 65 insertions, 118 deletions
diff --git a/sys/i386/isa/sound/sound_config.h b/sys/i386/isa/sound/sound_config.h index 6c53c8cdd0cd..a802763a805d 100644 --- a/sys/i386/isa/sound/sound_config.h +++ b/sys/i386/isa/sound/sound_config.h @@ -2,8 +2,7 @@ * * A driver for Soundcards, misc configuration parameters. * - * - * Copyright by Hannu Savolainen 1993 + * Copyright by Hannu Savolainen 1995 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -28,33 +27,27 @@ * */ -#include "local.h" - -#if defined(ISC) || defined(SCO) || defined(SVR42) -#define GENERIC_SYSV -#endif - /* - * Disable the AD1848 driver if there are no other drivers requiring it. + * many variables should be reduced to a range. Here define a macro */ -#if defined(EXCLUDE_GUS16) && defined(EXCLUDE_MSS) && defined(EXCLUDE_PSS) && defined(EXCLUDE_GUSMAX) -#define EXCLUDE_AD1848 -#endif - +#define RANGE(var, low, high) (var) = \ + ((var)<(low)?(low) : (var)>(high)?(high) : (var)) + #undef CONFIGURE_SOUNDCARD #undef DYNAMIC_BUFFER -#ifdef KERNEL_SOUNDCARD +#include <i386/isa/sound/local.h> + #define CONFIGURE_SOUNDCARD #define DYNAMIC_BUFFER #undef LOADABLE_SOUNDCARD -#endif -#ifdef EXCLUDE_SEQUENCER -#define EXCLUDE_MIDI -#define EXCLUDE_YM3812 -#define EXCLUDE_OPL3 +#include <i386/isa/sound/os.h> +#include <i386/isa/sound/soundvers.h> + +#if defined(ISC) || defined(SCO) || defined(SVR42) +#define GENERIC_SYSV #endif #ifndef SND_DEFAULT_ENABLE @@ -63,80 +56,6 @@ #ifdef CONFIGURE_SOUNDCARD -/* ****** IO-address, DMA and IRQ settings **** - -If your card has nonstandard I/O address or IRQ number, change defines - for the following settings in your kernel Makefile */ - -#ifndef SBC_BASE -#define SBC_BASE 0x220 /* 0x220 is the factory default. */ -#endif - -#ifndef SBC_IRQ -#define SBC_IRQ 7 /* IQR7 is the factory default. */ -#endif - -#ifndef SBC_DMA -#define SBC_DMA 1 -#endif - -#ifndef SB16_DMA -#define SB16_DMA 6 -#endif - -#ifndef SB16MIDI_BASE -#define SB16MIDI_BASE 0x300 -#endif - -#ifndef PAS_BASE -#define PAS_BASE 0x388 -#endif - -#ifndef PAS_IRQ -#define PAS_IRQ 5 -#endif - -#ifndef PAS_DMA -#define PAS_DMA 3 -#endif - -#ifndef GUS_BASE -#define GUS_BASE 0x220 -#endif - -#ifndef GUS_IRQ -#define GUS_IRQ 15 -#endif - -#ifndef GUS_MIDI_IRQ -#define GUS_MIDI_IRQ GUS_IRQ -#endif - -#ifndef GUS_DMA -#define GUS_DMA 6 -#endif - -#ifndef MPU_BASE -#define MPU_BASE 0x330 -#endif - -#ifndef MPU_IRQ -#define MPU_IRQ 6 -#endif - -/* Echo Personal Sound System */ -#ifndef PSS_BASE -#define PSS_BASE 0x220 /* 0x240 or */ -#endif - -#ifndef PSS_IRQ -#define PSS_IRQ 7 -#endif - -#ifndef PSS_DMA -#define PSS_DMA 1 -#endif - #ifndef MAX_REALTIME_FACTOR #define MAX_REALTIME_FACTOR 4 #endif @@ -150,20 +69,36 @@ If your card has nonstandard I/O address or IRQ number, change defines 4k for SB. If you change the DSP_BUFFSIZE, don't modify this file. - Use the make config command instead. */ + Use the make config command instead. Seems to allow only 4K, 16K, + 32K, 64K. + */ #ifndef DSP_BUFFSIZE -#define DSP_BUFFSIZE (4096) +#define DSP_BUFFSIZE (32760) #endif #ifndef DSP_BUFFCOUNT -#define DSP_BUFFCOUNT 2 /* 2 is recommended. */ +#define DSP_BUFFCOUNT 1 /* 1 is recommended. */ #endif -#define DMA_AUTOINIT 0x10 +#define DMA_AUTOINIT 0x10 /* XXX never used */ #define FM_MONO 0x388 /* This is the I/O address used by AdLib */ +#ifndef AWE32_BASE +#define AWE32_BASE 0x620 /* Default = 0x620-3, 0xA20-3, 0xE20-3 */ +#endif + +#ifndef PAS_BASE +#define PAS_BASE 0x388 +#endif + +#ifdef JAZZ16 +#ifndef JAZZ_DMA16 +#define JAZZ_DMA16 5 +#endif +#endif + /* SEQ_MAX_QUEUE is the maximum number of sequencer events buffered by the driver. (There is no need to alter this) */ #define SEQ_MAX_QUEUE 1024 @@ -181,6 +116,7 @@ If your card has nonstandard I/O address or IRQ number, change defines */ #define SND_NDEVS 256 /* Number of supported devices */ + #define SND_DEV_CTL 0 /* Control port /dev/mixer */ #define SND_DEV_SEQ 1 /* Sequencer output /dev/sequencer (FM synthesizer and MIDI output) */ @@ -190,7 +126,7 @@ If your card has nonstandard I/O address or IRQ number, change defines #define SND_DEV_DSP16 5 /* Like /dev/dsp but 16 bits/sample */ #define SND_DEV_STATUS 6 /* /dev/sndstat */ /* #7 not in use now. Was in 2.4. Free for use after v3.0. */ -#define SND_DEV_SEQ2 8 /* /dev/sequecer, level 2 interface */ +#define SND_DEV_SEQ2 8 /* /dev/sequencer, level 2 interface */ #define SND_DEV_SNDPROC 9 /* /dev/sndproc for programmable devices */ #define SND_DEV_PSS SND_DEV_SNDPROC @@ -200,34 +136,44 @@ If your card has nonstandard I/O address or IRQ number, change defines #define OFF 0 #define MAX_AUDIO_DEV 5 -#define MAX_MIXER_DEV 2 +#define MAX_MIXER_DEV 5 #define MAX_SYNTH_DEV 3 #define MAX_MIDI_DEV 6 #define MAX_TIMER_DEV 3 struct fileinfo { - int mode; /* Open mode */ - }; + int mode; /* Open mode */ + int flags; + int dummy; /* Reference to file-flags. OS-dependent. */ +}; struct address_info { int io_base; int irq; int dma; + int dma2; + int always_detect; /* 1=Trust me, it's there */ + char *name; + sound_os_info *osp; /* OS specific info */ + int card_subtype; /* Driver specific. Usually 0 */ }; #define SYNTH_MAX_VOICES 32 struct voice_alloc_info { - int max_voice; - int used_voices; - int ptr; /* For device specific use */ - unsigned short map[SYNTH_MAX_VOICES]; /* (ch << 8) | (note+1) */ - }; + int max_voice; + int used_voices; + int ptr; /* For device specific use */ + unsigned short map[SYNTH_MAX_VOICES]; /* (ch << 8) | (note+1) */ + int timestamp; + int alloc_times[SYNTH_MAX_VOICES]; +}; struct channel_info { - int pgm_num; - unsigned char controllers[128]; - }; + int pgm_num; + int bender_value; + unsigned char controllers[128]; +}; /* * Process wakeup reasons @@ -238,21 +184,22 @@ struct channel_info { #define WK_SIGNAL 0x04 #define WK_SLEEP 0x08 -#define OPEN_READ 1 -#define OPEN_WRITE 2 -#define OPEN_READWRITE 3 +#define OPEN_READ PCM_ENABLE_INPUT +#define OPEN_WRITE PCM_ENABLE_OUTPUT +#define OPEN_READWRITE (OPEN_READ|OPEN_WRITE) -#include "os.h" -#include "sound_calls.h" -#include "dev_table.h" +#include <i386/isa/sound/sound_calls.h> +#include <i386/isa/sound/dev_table.h> #ifndef DEB #define DEB(x) +#endif +#ifndef DDB +/* #define DDB(x) x XXX */ +#define DDB(x) +#endif #define TIMER_ARMED 121234 #define TIMER_NOT_ARMED 1 -#define FUTURE_VERSION -#endif - #endif |