summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorswallace <swallace@FreeBSD.org>1995-03-05 22:11:57 +0000
committerswallace <swallace@FreeBSD.org>1995-03-05 22:11:57 +0000
commit5f6a57e19b7def5cdea2a672b848261358bed2bc (patch)
tree1e658d49b82bceaa8111746c76cabe83b379a832
parenta7d260fe54e3d7b22ab803370579706759b72f8b (diff)
downloadFreeBSD-src-5f6a57e19b7def5cdea2a672b848261358bed2bc.zip
FreeBSD-src-5f6a57e19b7def5cdea2a672b848261358bed2bc.tar.gz
Revert to earlier code which contains FreeBSD snd[1-7] probe information,
$Id$ information, and other code to make sound driver compile and work correctly with FreeBSD. Integrate changes obtained from Sujal Patel. These changes are: o local.h: reverse option logic from EXCLUDE_* to AUDIO_* o pas2_mixer.c: small addition o ad1848.c: minor change with macro names o sequencer.c: minor change with note check o many spelling corrections in comments in about every other file
-rw-r--r--sys/i386/isa/sound/ad1848.c1
-rw-r--r--sys/i386/isa/sound/adlib_card.c1
-rw-r--r--sys/i386/isa/sound/audio.c1
-rw-r--r--sys/i386/isa/sound/dev_table.c1
-rw-r--r--sys/i386/isa/sound/dev_table.h6
-rw-r--r--sys/i386/isa/sound/finetune.h1
-rw-r--r--sys/i386/isa/sound/gus_card.c3
-rw-r--r--sys/i386/isa/sound/gus_hw.h4
-rw-r--r--sys/i386/isa/sound/gus_linearvol.h3
-rw-r--r--sys/i386/isa/sound/gus_midi.c1
-rw-r--r--sys/i386/isa/sound/gus_vol.c2
-rw-r--r--sys/i386/isa/sound/gus_wave.c16
-rw-r--r--sys/i386/isa/sound/ics2101.c1
-rw-r--r--sys/i386/isa/sound/local.h11
-rw-r--r--sys/i386/isa/sound/midi_ctrl.h3
-rw-r--r--sys/i386/isa/sound/midi_synth.c1
-rw-r--r--sys/i386/isa/sound/midi_synth.h3
-rw-r--r--sys/i386/isa/sound/midibuf.c1
-rw-r--r--sys/i386/isa/sound/mpu401.c9
-rw-r--r--sys/i386/isa/sound/opl3.c27
-rw-r--r--sys/i386/isa/sound/opl3.h1
-rw-r--r--sys/i386/isa/sound/pas.h3
-rw-r--r--sys/i386/isa/sound/pas2_card.c13
-rw-r--r--sys/i386/isa/sound/pas2_midi.c1
-rw-r--r--sys/i386/isa/sound/pas2_mixer.c1
-rw-r--r--sys/i386/isa/sound/pas2_pcm.c10
-rw-r--r--sys/i386/isa/sound/patmgr.c3
-rw-r--r--sys/i386/isa/sound/pss.c3
-rw-r--r--sys/i386/isa/sound/sb.h3
-rw-r--r--sys/i386/isa/sound/sb16_dsp.c12
-rw-r--r--sys/i386/isa/sound/sb16_midi.c5
-rw-r--r--sys/i386/isa/sound/sb_card.c1
-rw-r--r--sys/i386/isa/sound/sb_dsp.c7
-rw-r--r--sys/i386/isa/sound/sb_midi.c1
-rw-r--r--sys/i386/isa/sound/sb_mixer.c3
-rw-r--r--sys/i386/isa/sound/sb_mixer.h1
-rw-r--r--sys/i386/isa/sound/sequencer.c1
-rw-r--r--sys/i386/isa/sound/sound_calls.h7
-rw-r--r--sys/i386/isa/sound/sound_config.h13
-rw-r--r--sys/i386/isa/sound/sound_switch.c1
-rw-r--r--sys/i386/isa/sound/sound_timer.c1
-rw-r--r--sys/i386/isa/sound/sys_timer.c1
-rw-r--r--sys/i386/isa/sound/tuning.h3
-rw-r--r--sys/i386/isa/sound/uart6850.c1
44 files changed, 156 insertions, 36 deletions
diff --git a/sys/i386/isa/sound/ad1848.c b/sys/i386/isa/sound/ad1848.c
index ec9e93e..c3637e9 100644
--- a/sys/i386/isa/sound/ad1848.c
+++ b/sys/i386/isa/sound/ad1848.c
@@ -29,6 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * ad1848.c,v 1.3 1994/10/01 05:46:01 davidg Exp
*/
#define DEB(x)
diff --git a/sys/i386/isa/sound/adlib_card.c b/sys/i386/isa/sound/adlib_card.c
index 6365069..ec3810b 100644
--- a/sys/i386/isa/sound/adlib_card.c
+++ b/sys/i386/isa/sound/adlib_card.c
@@ -25,6 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * ad1848.c,v 1.3 1994/10/01 05:46:01 davidg Exp
*/
#include "sound_config.h"
diff --git a/sys/i386/isa/sound/audio.c b/sys/i386/isa/sound/audio.c
index d5a4acc..d6c716f3 100644
--- a/sys/i386/isa/sound/audio.c
+++ b/sys/i386/isa/sound/audio.c
@@ -25,6 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * audio.c,v 1.6 1994/10/01 02:16:29 swallace Exp
*/
#include "sound_config.h"
diff --git a/sys/i386/isa/sound/dev_table.c b/sys/i386/isa/sound/dev_table.c
index 1eb57bb..7f0f987 100644
--- a/sys/i386/isa/sound/dev_table.c
+++ b/sys/i386/isa/sound/dev_table.c
@@ -25,6 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * dev_table.c,v 1.6 1994/10/01 02:16:31 swallace Exp
*/
#define _DEV_TABLE_C_
diff --git a/sys/i386/isa/sound/dev_table.h b/sys/i386/isa/sound/dev_table.h
index 12b20ba..e082ecb 100644
--- a/sys/i386/isa/sound/dev_table.h
+++ b/sys/i386/isa/sound/dev_table.h
@@ -26,8 +26,8 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
-
-*/
+ * $Id: dev_table.h,v 1.9 1995/02/13 22:49:03 jkh Exp $
+ */
#ifndef _DEV_TABLE_H_
#define _DEV_TABLE_H_
@@ -237,7 +237,7 @@ struct sound_timer_operations {
#ifndef EXCLUDE_SB
{SNDCARD_SB, "SoundBlaster", attach_sb_card, probe_sb},
#endif
-#if !defined(EXCLUDE_SB) && !defined(EXCLUDE_SB16)
+#if !defined(EXCLUDE_SB) && !defined(EXCLUDE_SB16) && !defined(EXCLUDE_SBPRO)
#ifndef EXCLUDE_AUDIO
{SNDCARD_SB16, "SoundBlaster16", sb16_dsp_init, sb16_dsp_detect},
#endif
diff --git a/sys/i386/isa/sound/finetune.h b/sys/i386/isa/sound/finetune.h
index b86a0eb..6c17d74 100644
--- a/sys/i386/isa/sound/finetune.h
+++ b/sys/i386/isa/sound/finetune.h
@@ -23,6 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * finetune.h,v 1.3 1994/08/02 07:39:51 davidg Exp
*/
unsigned short finetune_table[128] =
diff --git a/sys/i386/isa/sound/gus_card.c b/sys/i386/isa/sound/gus_card.c
index 1e2449d..42f4315 100644
--- a/sys/i386/isa/sound/gus_card.c
+++ b/sys/i386/isa/sound/gus_card.c
@@ -25,6 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * gus_card.c,v 1.11 1994/10/14 09:04:19 jkh Exp
*/
#include "sound_config.h"
@@ -169,7 +170,7 @@ gusintr (int irq)
/*
* Some extra code for the 16 bit sampling option
*/
-#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_GUS16)
+#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_GUS16) && !defined(EXCLUDE_GUS)
int
probe_gus_db16 (struct address_info *hw_config)
diff --git a/sys/i386/isa/sound/gus_hw.h b/sys/i386/isa/sound/gus_hw.h
index f97a0b8..e0932e6 100644
--- a/sys/i386/isa/sound/gus_hw.h
+++ b/sys/i386/isa/sound/gus_hw.h
@@ -1,4 +1,6 @@
-
+/*
+ * gus_hw.h,v 1.3 1994/08/02 07:39:54 davidg Exp
+ */
/*
* I/O addresses
*/
diff --git a/sys/i386/isa/sound/gus_linearvol.h b/sys/i386/isa/sound/gus_linearvol.h
index 7ad0c30..f6c4f31 100644
--- a/sys/i386/isa/sound/gus_linearvol.h
+++ b/sys/i386/isa/sound/gus_linearvol.h
@@ -1,3 +1,6 @@
+/*
+ * gus_linearvol.h,v 1.2 1994/08/02 07:39:57 davidg Exp
+ */
static unsigned short gus_linearvol[128] = {
0x0000, 0x08ff, 0x09ff, 0x0a80, 0x0aff, 0x0b40, 0x0b80, 0x0bc0,
0x0bff, 0x0c20, 0x0c40, 0x0c60, 0x0c80, 0x0ca0, 0x0cc0, 0x0ce0,
diff --git a/sys/i386/isa/sound/gus_midi.c b/sys/i386/isa/sound/gus_midi.c
index 87aea62..c10c4ca 100644
--- a/sys/i386/isa/sound/gus_midi.c
+++ b/sys/i386/isa/sound/gus_midi.c
@@ -25,6 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * gus_midi.c,v 1.6 1994/10/01 02:16:39 swallace Exp
*/
#include "sound_config.h"
diff --git a/sys/i386/isa/sound/gus_vol.c b/sys/i386/isa/sound/gus_vol.c
index 055a117..e2a09fd 100644
--- a/sys/i386/isa/sound/gus_vol.c
+++ b/sys/i386/isa/sound/gus_vol.c
@@ -2,6 +2,8 @@
* gus_vol.c - Compute volume for GUS.
*
* Greg Lee 1993.
+ *
+ * gus_vol.c,v 1.5 1994/10/01 02:16:40 swallace Exp
*/
#include "sound_config.h"
#ifndef EXCLUDE_GUS
diff --git a/sys/i386/isa/sound/gus_wave.c b/sys/i386/isa/sound/gus_wave.c
index f050725..750a313 100644
--- a/sys/i386/isa/sound/gus_wave.c
+++ b/sys/i386/isa/sound/gus_wave.c
@@ -25,12 +25,16 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * $Id: gus_wave.c,v 1.11 1995/01/04 20:07:27 pst Exp $
*/
#include "sound_config.h"
#include <machine/ultrasound.h>
#include "gus_hw.h"
+#undef OUTB
+#define OUTB(val, port) outb(port, val)
+
#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_GUS)
#define MAX_SAMPLE 128
@@ -781,7 +785,7 @@ gus_initialize (void)
gus_select_voice (0); /* This disables writes to IRQ/DMA reg */
- gusintr (0,NULL); /* Serve pending interrupts */
+ gusintr (0); /* Serve pending interrupts */
RESTORE_INTR (flags);
}
@@ -2936,7 +2940,11 @@ gus_wave_init (long mem_start, int irq, int dma)
}
+#ifdef __FreeBSD__
+ printk ("snd4: <Gravis UltraSound %s (%dk)>", model_num, (int) gus_mem_size / 1024);
+#else /* __FreeBSD__ */
printk (" <Gravis UltraSound %s (%dk)>", model_num, (int) gus_mem_size / 1024);
+#endif /* __FreeBSD__ */
#ifndef SCO
sprintf (gus_info.name, "Gravis UltraSound %s (%dk)", model_num, (int) gus_mem_size / 1024);
@@ -2976,7 +2984,12 @@ gus_wave_init (long mem_start, int irq, int dma)
{
audio_devs[gus_devnum = num_audiodevs++] = &gus_sampling_operations;
audio_devs[gus_devnum]->dmachan = dma;
+#ifndef NO_AUTODMA
audio_devs[gus_devnum]->buffcount = 1;
+#else
+ audio_devs[gus_devnum]->flags &= ~DMA_AUTOMODE;
+ audio_devs[gus_devnum]->buffcount = DSP_BUFFCOUNT;
+#endif
audio_devs[gus_devnum]->buffsize = DSP_BUFFSIZE;
}
else
@@ -3052,6 +3065,7 @@ do_loop_irq (int voice)
pcm_active = 0; /* Signal to the play_next_pcm_block routine */
case LMODE_PCM:
{
+ int orig_qlen = pcm_qlen;
int flag; /* 0 or 2 */
pcm_qlen--;
diff --git a/sys/i386/isa/sound/ics2101.c b/sys/i386/isa/sound/ics2101.c
index c2f1d21..190c74e 100644
--- a/sys/i386/isa/sound/ics2101.c
+++ b/sys/i386/isa/sound/ics2101.c
@@ -25,6 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * ics2101.c,v 1.4 1994/10/01 02:16:43 swallace Exp
*/
#include "sound_config.h"
diff --git a/sys/i386/isa/sound/local.h b/sys/i386/isa/sound/local.h
index 479b706..7c1f8d7 100644
--- a/sys/i386/isa/sound/local.h
+++ b/sys/i386/isa/sound/local.h
@@ -1,6 +1,6 @@
/* for FreeBSD */
/*
- * local.h,v 1.11 1994/11/01 17:26:50 ache Exp
+ * $Id: local.h,v 1.11 1994/11/01 17:26:50 ache Exp
*/
#include "snd.h"
@@ -24,9 +24,9 @@
#define SELECTED_SOUND_OPTIONS 0xffffffff
#define SOUND_VERSION_STRING "2.90-2"
#define SOUND_CONFIG_DATE "Sun Feb 5 14:38:12 EST 1995"
-#define SOUND_CONFIG_BY "smpatel"
-#define SOUND_CONFIG_HOST "xi.dorm.umd.edu"
-#define SOUND_CONFIG_DOMAIN "dorm.umd.edu"
+#define SOUND_CONFIG_BY "freebsd-hackers"
+#define SOUND_CONFIG_HOST "freebsd.org"
+#define SOUND_CONFIG_DOMAIN "freebsd.org"
/* Reversed the VoxWare EXCLUDE options -Sujal Patel (smpatel@wam.umd.edu) */
@@ -87,6 +87,7 @@
#undef EXCLUDE_PSS
#endif
#ifdef AUDIO_GUS16
+#undef EXCLUDE_GUS
#undef EXCLUDE_GUS16
#endif
#ifdef AUDIO_GUSMAX
@@ -97,11 +98,9 @@
#endif
#ifdef AUDIO_SBPRO
#undef EXCLUDE_SBPRO
-#undef EXCLUDE_SB
#endif
#ifdef AUDIO_SB16
#undef EXCLUDE_SB16
-#undef EXCLUDE_SB
#endif
#ifdef AUDIO_YM3812
#undef EXCLUDE_YM3812
diff --git a/sys/i386/isa/sound/midi_ctrl.h b/sys/i386/isa/sound/midi_ctrl.h
index 616b591..75b6fd8 100644
--- a/sys/i386/isa/sound/midi_ctrl.h
+++ b/sys/i386/isa/sound/midi_ctrl.h
@@ -1,3 +1,6 @@
+/*
+ * midi_ctrl.h,v 1.2 1994/10/01 02:16:45 swallace Exp
+ */
static unsigned char ctrl_def_values[128] =
{
0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, /* 0 to 7 */
diff --git a/sys/i386/isa/sound/midi_synth.c b/sys/i386/isa/sound/midi_synth.c
index fd6d8bd..d63e1ab 100644
--- a/sys/i386/isa/sound/midi_synth.c
+++ b/sys/i386/isa/sound/midi_synth.c
@@ -25,6 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * midi_synth.c,v 1.2 1994/10/01 02:16:46 swallace Exp
*/
#include "sound_config.h"
diff --git a/sys/i386/isa/sound/midi_synth.h b/sys/i386/isa/sound/midi_synth.h
index 04075e2..373cd01 100644
--- a/sys/i386/isa/sound/midi_synth.h
+++ b/sys/i386/isa/sound/midi_synth.h
@@ -1,3 +1,6 @@
+/*
+ * midi_synth.h,v 1.2 1994/10/01 02:16:47 swallace Exp
+ */
int midi_synth_ioctl (int dev,
unsigned int cmd, unsigned int arg);
int midi_synth_kill_note (int dev, int channel, int note, int velocity);
diff --git a/sys/i386/isa/sound/midibuf.c b/sys/i386/isa/sound/midibuf.c
index ae0ddc3..d7f4d3c 100644
--- a/sys/i386/isa/sound/midibuf.c
+++ b/sys/i386/isa/sound/midibuf.c
@@ -25,6 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * midibuf.c,v 1.6 1994/10/01 02:16:48 swallace Exp
*/
#include "sound_config.h"
diff --git a/sys/i386/isa/sound/mpu401.c b/sys/i386/isa/sound/mpu401.c
index 40be066..3932b31 100644
--- a/sys/i386/isa/sound/mpu401.c
+++ b/sys/i386/isa/sound/mpu401.c
@@ -25,6 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * mpu401.c,v 1.9 1994/10/01 02:16:49 swallace Exp
*/
#define USE_SEQ_MACROS
@@ -1048,7 +1049,11 @@ attach_mpu401 (long mem_start, struct address_info *hw_config)
MPU_CAP_CLS | MPU_CAP_2PORT;
revision_char = (devc->revision == 0x7f) ? 'M' : ' ';
+#ifdef __FreeBSD__
+ printk ("snd5: <MQX-%d%c MIDI Interface>",
+#else
printk (" <MQX-%d%c MIDI Interface>",
+#endif
ports,
revision_char);
#ifndef SCO
@@ -1068,7 +1073,11 @@ attach_mpu401 (long mem_start, struct address_info *hw_config)
devc->capabilities |= MPU_CAP_SYNC | MPU_CAP_FSK;
+#ifdef __FreeBSD__
+ printk ("snd5: <MPU-401 MIDI Interface %d.%d%c>",
+#else
printk (" <MPU-401 MIDI Interface %d.%d%c>",
+#endif
(devc->version & 0xf0) >> 4,
devc->version & 0x0f,
revision_char);
diff --git a/sys/i386/isa/sound/opl3.c b/sys/i386/isa/sound/opl3.c
index 0acd0c6..8c943a2 100644
--- a/sys/i386/isa/sound/opl3.c
+++ b/sys/i386/isa/sound/opl3.c
@@ -25,12 +25,11 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * opl3.c,v 1.7 1994/10/01 02:16:50 swallace Exp
*/
/*
* Major improvements to the FM handling 30AUG92 by Rob Hooft,
- */
-/*
* hooft@chem.ruu.nl
*/
@@ -1175,7 +1174,11 @@ opl3_init (long mem_start)
opl3_ok = 1;
if (opl3_enabled)
{
+#ifdef __FreeBSD__
+ printk ("snd1: <Yamaha OPL-3 FM>");
+#else
printk (" <Yamaha OPL-3 FM>");
+#endif
fm_model = 2;
voice_alloc->max_voice = nr_voices = 18;
fm_info.nr_drums = 0;
@@ -1190,23 +1193,19 @@ opl3_init (long mem_start)
else
physical_voices[i].ioaddr = right_address;
+ /* Enable OPL-3 mode */
+ opl3_command (right_address, OPL3_MODE_REGISTER, OPL3_ENABLE);
- opl3_command (right_address, OPL3_MODE_REGISTER, OPL3_ENABLE); /*
- * Enable
- * OPL-3
- * mode
- */
- opl3_command (right_address, CONNECTION_SELECT_REGISTER, 0x00); /*
- * Select
- * all
- * 2-OP
- * *
- * voices
- */
+ /* Select all 2-OP voices */
+ opl3_command (right_address, CONNECTION_SELECT_REGISTER, 0x00);
}
else
{
+#ifdef __FreeBSD__
+ printk ("snd1: <Yamaha 2-OP FM>");
+#else
printk (" <Yamaha 2-OP FM>");
+#endif
fm_model = 1;
voice_alloc->max_voice = nr_voices = 9;
fm_info.nr_drums = 0;
diff --git a/sys/i386/isa/sound/opl3.h b/sys/i386/isa/sound/opl3.h
index 21e6122..5fa6aa5 100644
--- a/sys/i386/isa/sound/opl3.h
+++ b/sys/i386/isa/sound/opl3.h
@@ -24,6 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * $Id: opl3.c,v 1.7 1994/10/01 02:16:50 swallace Exp
*/
/*
diff --git a/sys/i386/isa/sound/pas.h b/sys/i386/isa/sound/pas.h
index 9759542..bdb9c56 100644
--- a/sys/i386/isa/sound/pas.h
+++ b/sys/i386/isa/sound/pas.h
@@ -1,3 +1,6 @@
+/*
+ * pas.h,v 1.6 1994/10/01 12:42:17 ache Exp
+ */
/* */
/* Port addresses and bit fields for the Media Vision Pro AudioSpectrum second generation sound cards. */
/* */
diff --git a/sys/i386/isa/sound/pas2_card.c b/sys/i386/isa/sound/pas2_card.c
index 8086cfb..b846d63 100644
--- a/sys/i386/isa/sound/pas2_card.c
+++ b/sys/i386/isa/sound/pas2_card.c
@@ -26,6 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * pas2_card.c,v 1.11 1994/10/01 12:42:17 ache Exp
*/
#include "sound_config.h"
@@ -45,6 +46,7 @@ static int pas_intr_mask = 0;
static int pas_irq = 0;
static char pas_model;
+static unsigned char board_rev_id;
static char *pas_model_names[] =
{"", "Pro AudioSpectrum+", "CDPC", "Pro AudioSpectrum 16", "Pro AudioSpectrum 16D"};
@@ -74,9 +76,9 @@ pas_write (unsigned char data, int ioaddr)
* The Revision D cards have a problem with their MVA508 interface. The
* kludge-o-rama fix is to make a 16-bit quantity with identical LSB and
* MSBs out of the output byte and to do a 16-bit out to the mixer port -
- * 1. We need to do this because there was access problems, not timing
- * problems.
+ * 1.
*/
+
void
mix_write (unsigned char data, int ioaddr)
{
@@ -378,9 +380,14 @@ attach_pas_card (long mem_start, struct address_info *hw_config)
if (detect_pas_hw (hw_config))
{
- if (pas_model = pas_read (CHIP_REV))
+ board_rev_id = pas_read (BOARD_REV_ID);
+ if (pas_model = pas_read (CHIP_REV))
{
+#ifdef __FreeBSD__
+ printk ("snd3: <%s rev %d>", pas_model_names[(int) pas_model], board_rev_id);
+#else /* __FreeBSD__ */
printk (" <%s rev %d>", pas_model_names[(int) pas_model], pas_read (BOARD_REV_ID));
+#endif /* __FreeBSD__ */
}
if (config_pas_hw (hw_config))
diff --git a/sys/i386/isa/sound/pas2_midi.c b/sys/i386/isa/sound/pas2_midi.c
index 1c6bf59..7a2e238 100644
--- a/sys/i386/isa/sound/pas2_midi.c
+++ b/sys/i386/isa/sound/pas2_midi.c
@@ -25,6 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * pas2_midi.c,v 1.6 1994/10/01 02:16:55 swallace Exp
*/
#include "sound_config.h"
diff --git a/sys/i386/isa/sound/pas2_mixer.c b/sys/i386/isa/sound/pas2_mixer.c
index bd53bc0..18c64e5 100644
--- a/sys/i386/isa/sound/pas2_mixer.c
+++ b/sys/i386/isa/sound/pas2_mixer.c
@@ -27,6 +27,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * $Id: pas2_mixer.c,v 1.7 1994/10/01 02:16:56 swallace Exp $
*/
#include "sound_config.h"
diff --git a/sys/i386/isa/sound/pas2_pcm.c b/sys/i386/isa/sound/pas2_pcm.c
index e756431..d07628f 100644
--- a/sys/i386/isa/sound/pas2_pcm.c
+++ b/sys/i386/isa/sound/pas2_pcm.c
@@ -26,6 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * pas2_pcm.c,v 1.7 1994/10/01 02:16:57 swallace Exp
*/
#include "sound_config.h"
@@ -78,14 +79,14 @@ pcm_set_speed (int arg)
tmp = pas_read (FILTER_FREQUENCY);
- /*
+/*
* Set anti-aliasing filters according to sample rate. You really *NEED*
* to enable this feature for all normal recording unless you want to
* experiment with aliasing effects.
* These filters apply to the selected "recording" source.
* I (pfw) don't know the encoding of these 5 bits. The values shown
* come from the SDK found on ftp.uwp.edu:/pub/msdos/proaudio/.
-*/
+ */
#if !defined NO_AUTO_FILTER_SET
tmp &= 0xe0;
if (pcm_speed >= 2 * 17897)
@@ -404,7 +405,12 @@ pas_pcm_init (long mem_start, struct address_info *hw_config)
{
audio_devs[my_devnum = num_audiodevs++] = &pas_pcm_operations;
audio_devs[my_devnum]->dmachan = hw_config->dma;
+#ifndef NO_AUTODMA
audio_devs[my_devnum]->buffcount = 1;
+#else
+ audio_devs[my_devnum]->flags &= ~DMA_AUTOMODE;
+ audio_devs[my_devnum]->buffcount = DSP_BUFFCOUNT;
+#endif
audio_devs[my_devnum]->buffsize = 2 * DSP_BUFFSIZE;
}
else
diff --git a/sys/i386/isa/sound/patmgr.c b/sys/i386/isa/sound/patmgr.c
index 97ca465..b4c4dc6 100644
--- a/sys/i386/isa/sound/patmgr.c
+++ b/sys/i386/isa/sound/patmgr.c
@@ -25,6 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * patmgr.c,v 1.7 1994/10/01 02:16:58 swallace Exp
*/
#define PATMGR_C
@@ -131,7 +132,7 @@ pmgr_write (int dev, struct fileinfo *file, snd_rw_buf * buf, int count)
return RET_ERROR (EIO);
}
- COPY_FROM_USER (mbox[dev], buf, 0, 4);
+ COPY_FROM_USER ((caddr_t)mbox[dev], buf, 0, 4);
if (*(unsigned char *) mbox[dev] == SEQ_FULLSIZE)
{
diff --git a/sys/i386/isa/sound/pss.c b/sys/i386/isa/sound/pss.c
index 6e35d1b..839f142 100644
--- a/sys/i386/isa/sound/pss.c
+++ b/sys/i386/isa/sound/pss.c
@@ -44,7 +44,8 @@
marc.hoffman@analog.com
- */
+ * $Id: pss.c,v 1.2 1994/10/01 02:17:00 swallace Exp $
+ */
#include "sound_config.h"
#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_PSS)
diff --git a/sys/i386/isa/sound/sb.h b/sys/i386/isa/sound/sb.h
index bb8ae12..0a7dd93 100644
--- a/sys/i386/isa/sound/sb.h
+++ b/sys/i386/isa/sound/sb.h
@@ -1,3 +1,6 @@
+/*
+ * sb.h,v 1.2 1994/08/02 07:40:34 davidg Exp
+ */
#define DSP_RESET (sbc_base + 0x6)
#define DSP_READ (sbc_base + 0xA)
#define DSP_WRITE (sbc_base + 0xC)
diff --git a/sys/i386/isa/sound/sb16_dsp.c b/sys/i386/isa/sound/sb16_dsp.c
index a669cc5..af28780 100644
--- a/sys/i386/isa/sound/sb16_dsp.c
+++ b/sys/i386/isa/sound/sb16_dsp.c
@@ -27,6 +27,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * sb16_dsp.c,v 1.8 1994/10/01 02:17:02 swallace Exp
*/
#define DEB(x)
@@ -38,7 +39,7 @@
#include "sb.h"
#include "sb_mixer.h"
-#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_SB16) && !defined(EXCLUDE_SB) && !defined(EXCLUDE_AUDIO)
+#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_SB16) && !defined(EXCLUDE_SB) && !defined(EXCLUDE_AUDIO) && !defined(EXCLUDE_SBPRO)
extern int sbc_base;
@@ -476,13 +477,22 @@ sb16_dsp_init (long mem_start, struct address_info *hw_config)
sprintf (sb16_dsp_operations.name, "SoundBlaster 16 %d.%d", sbc_major, sbc_minor);
#endif
+#ifdef __FreeBSD__
+ printk ("snd6: <%s>", sb16_dsp_operations.name);
+#else
printk (" <%s>", sb16_dsp_operations.name);
+#endif
if (num_audiodevs < MAX_AUDIO_DEV)
{
audio_devs[my_dev = num_audiodevs++] = &sb16_dsp_operations;
audio_devs[my_dev]->dmachan = hw_config->dma;
+#ifndef NO_AUTODMA
audio_devs[my_dev]->buffcount = 1;
+#else
+ audio_devs[my_dev]->flags &= ~DMA_AUTOMODE;
+ audio_devs[my_dev]->buffcount = DSP_BUFFCOUNT;
+#endif
audio_devs[my_dev]->buffsize = DSP_BUFFSIZE;
}
else
diff --git a/sys/i386/isa/sound/sb16_midi.c b/sys/i386/isa/sound/sb16_midi.c
index e40fe87..ec412a6 100644
--- a/sys/i386/isa/sound/sb16_midi.c
+++ b/sys/i386/isa/sound/sb16_midi.c
@@ -25,6 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * sb16_midi.c,v 1.4 1994/10/01 02:17:03 swallace Exp
*/
#include "sound_config.h"
@@ -224,7 +225,11 @@ attach_sb16midi (long mem_start, struct address_info *hw_config)
return mem_start;
}
+#ifdef __FreeBSD__
+ printk ("snd7: <SoundBlaster MPU-401>");
+#else
printk (" <SoundBlaster MPU-401>");
+#endif
std_midi_synth.midi_dev = my_dev = num_midis;
midi_devs[num_midis++] = &sb16midi_operations;
diff --git a/sys/i386/isa/sound/sb_card.c b/sys/i386/isa/sound/sb_card.c
index f7588e1..19a34d7 100644
--- a/sys/i386/isa/sound/sb_card.c
+++ b/sys/i386/isa/sound/sb_card.c
@@ -25,6 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * sb_card.c,v 1.5 1994/08/02 07:40:39 davidg Exp
*/
#include "sound_config.h"
diff --git a/sys/i386/isa/sound/sb_dsp.c b/sys/i386/isa/sound/sb_dsp.c
index 8eca7d3..7444286 100644
--- a/sys/i386/isa/sound/sb_dsp.c
+++ b/sys/i386/isa/sound/sb_dsp.c
@@ -29,6 +29,7 @@
* Hunyue Yau Jan 6 1994
* Added code to support Sound Galaxy NX Pro
*
+ * $Id: sb_dsp.c,v 1.22 1994/12/10 22:55:50 ats Exp $
*/
#include "sound_config.h"
@@ -737,7 +738,7 @@ sb_dsp_detect (struct address_info *hw_config)
#ifndef EXCLUDE_AUDIO
static struct audio_operations sb_dsp_operations =
{
- "SoundBlaster",
+ "SoundBlaster ",
NOTHING_SPECIAL,
AFMT_U8, /* Just 8 bits. Poor old SB */
NULL,
@@ -823,7 +824,11 @@ sb_dsp_init (long mem_start, struct address_info *hw_config)
#endif
}
+#ifdef __FreeBSD__
+ printk ("snd2: <%s>", sb_dsp_operations.name);
+#else
printk (" <%s>", sb_dsp_operations.name);
+#endif
#ifndef EXCLUDE_AUDIO
#if !defined(EXCLUDE_SB16) && !defined(EXCLUDE_SBPRO)
diff --git a/sys/i386/isa/sound/sb_midi.c b/sys/i386/isa/sound/sb_midi.c
index 51ebf78..4e48e65 100644
--- a/sys/i386/isa/sound/sb_midi.c
+++ b/sys/i386/isa/sound/sb_midi.c
@@ -25,6 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * $Id: sb_midi.c,v 1.4 1994/10/01 02:17:05 swallace Exp $
*/
#include "sound_config.h"
diff --git a/sys/i386/isa/sound/sb_mixer.c b/sys/i386/isa/sound/sb_mixer.c
index ef26e5b..40a4b03 100644
--- a/sys/i386/isa/sound/sb_mixer.c
+++ b/sys/i386/isa/sound/sb_mixer.c
@@ -30,11 +30,12 @@
* Hunyue Yau Jan 6 1994
* Added code to support the Sound Galaxy NX Pro mixer.
*
+ * sb_mixer.c,v 1.4 1994/10/01 02:17:07 swallace Exp
*/
#include "sound_config.h"
-#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_SB)
+#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_SB) && !defined(EXCLUDE_SBPRO)
#define __SB_MIXER_C__
#include "sb.h"
diff --git a/sys/i386/isa/sound/sb_mixer.h b/sys/i386/isa/sound/sb_mixer.h
index 1a5fc8a..495b040 100644
--- a/sys/i386/isa/sound/sb_mixer.h
+++ b/sys/i386/isa/sound/sb_mixer.h
@@ -29,6 +29,7 @@
* Hunyue Yau Jan 6 1994
* Added defines for the Sound Galaxy NX Pro mixer.
*
+ * sb_mixer.h,v 1.4 1994/10/01 02:17:08 swallace Exp
*/
#define SBPRO_RECORDING_DEVICES (SOUND_MASK_LINE | SOUND_MASK_MIC | SOUND_MASK_CD)
diff --git a/sys/i386/isa/sound/sequencer.c b/sys/i386/isa/sound/sequencer.c
index eb55507..66194ed 100644
--- a/sys/i386/isa/sound/sequencer.c
+++ b/sys/i386/isa/sound/sequencer.c
@@ -25,6 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * $Id: sequencer.c,v 1.7 1994/10/01 02:17:09 swallace Exp $
*/
#define SEQUENCER_C
diff --git a/sys/i386/isa/sound/sound_calls.h b/sys/i386/isa/sound/sound_calls.h
index ce1ba06..5bb43d0 100644
--- a/sys/i386/isa/sound/sound_calls.h
+++ b/sys/i386/isa/sound/sound_calls.h
@@ -1,7 +1,12 @@
/*
* DMA buffer calls
+ *
+ * $Id: sound_calls.h,v 1.7 1994/10/01 02:17:10 swallace Exp $
*/
+#ifndef _MACHINE_ISA_SOUND_H_
+#define _MACHINE_ISA_SOUND_H_
+
int DMAbuf_open(int dev, int mode);
int DMAbuf_release(int dev, int mode);
int DMAbuf_getwrbuffer(int dev, char **buf, int *size);
@@ -241,3 +246,5 @@ int pss_ioctl (int dev, struct fileinfo *file,
unsigned int cmd, unsigned int arg);
int pss_lseek (int dev, struct fileinfo *file, off_t offset, int orig);
long pss_init(long mem_start);
+
+#endif /* _MACHINE_ISA_SOUND_H_ */
diff --git a/sys/i386/isa/sound/sound_config.h b/sys/i386/isa/sound/sound_config.h
index 11d388f..23ffcfe 100644
--- a/sys/i386/isa/sound/sound_config.h
+++ b/sys/i386/isa/sound/sound_config.h
@@ -26,6 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * $Id: sound_config.h,v 1.6 1994/10/01 02:17:11 swallace Exp $
*/
#include "local.h"
@@ -116,6 +117,18 @@ If your card has nonstandard I/O address or IRQ number, change defines
#define GUS_DMA 6
#endif
+#ifndef GUS16_BASE
+#define GUS16_BASE 0x530
+#endif
+
+#ifndef GUS16_IRQ
+#define GUS16_IRQ 7
+#endif
+
+#ifndef GUS16_DMA
+#define GUS16_DMA 3
+#endif
+
#ifndef MPU_BASE
#define MPU_BASE 0x330
#endif
diff --git a/sys/i386/isa/sound/sound_switch.c b/sys/i386/isa/sound/sound_switch.c
index fe73aea..129ee39 100644
--- a/sys/i386/isa/sound/sound_switch.c
+++ b/sys/i386/isa/sound/sound_switch.c
@@ -25,6 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * sound_switch.c,v 1.4 1994/10/01 02:17:12 swallace Exp
*/
#include "sound_config.h"
diff --git a/sys/i386/isa/sound/sound_timer.c b/sys/i386/isa/sound/sound_timer.c
index c6544c8..91a9f41 100644
--- a/sys/i386/isa/sound/sound_timer.c
+++ b/sys/i386/isa/sound/sound_timer.c
@@ -26,6 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * sound_timer.c,v 1.2 1994/10/01 02:17:13 swallace Exp
*/
#define SEQUENCER_C
diff --git a/sys/i386/isa/sound/sys_timer.c b/sys/i386/isa/sound/sys_timer.c
index 1000045..27a333e 100644
--- a/sys/i386/isa/sound/sys_timer.c
+++ b/sys/i386/isa/sound/sys_timer.c
@@ -26,6 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * sys_timer.c,v 1.2 1994/10/01 02:17:16 swallace Exp
*/
#define SEQUENCER_C
diff --git a/sys/i386/isa/sound/tuning.h b/sys/i386/isa/sound/tuning.h
index 858e1fe..936ff6a 100644
--- a/sys/i386/isa/sound/tuning.h
+++ b/sys/i386/isa/sound/tuning.h
@@ -1,3 +1,6 @@
+/*
+ * tuning.h,v 1.2 1994/08/02 07:41:00 davidg Exp
+ */
#ifdef SEQUENCER_C
unsigned short semitone_tuning[24] =
diff --git a/sys/i386/isa/sound/uart6850.c b/sys/i386/isa/sound/uart6850.c
index ca63135..95d88a3 100644
--- a/sys/i386/isa/sound/uart6850.c
+++ b/sys/i386/isa/sound/uart6850.c
@@ -26,6 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * uart6850.c,v 1.2 1994/10/01 02:17:17 swallace Exp
*/
#include "sound_config.h"
OpenPOWER on IntegriCloud