summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/sound/gus_wave.c
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 /sys/i386/isa/sound/gus_wave.c
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
Diffstat (limited to 'sys/i386/isa/sound/gus_wave.c')
-rw-r--r--sys/i386/isa/sound/gus_wave.c16
1 files changed, 15 insertions, 1 deletions
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--;
OpenPOWER on IntegriCloud