Sound Card Driver version 2.0

This directory contains the driver for various PC soundcards. 
The following cards are supported:

AdLib
SoundBlaster (1.0-2.0) and compatibles, including
  ThunderBoard and Ati Stereo F/X.
SoundBlaster Pro and SB Pro 2
(SB 16 not supported yet but may work somehow).
ProAudioSpectrum 16
  (The original ProAudioSpectrum and the PAS+ are not supported 
  (and propably will remain unsupported)).

If you have any problems, please contact me.

Installation
------------

IMPORTANT!

The installation procedure has changed since 1.0c and 1.99.9. The
snd-driv -package contains just the subdirectory sound. You have to
cd to the appropriate directory before unarchiving it (see the following).

This assumes your Linux kernel sources are in the directory
/usr/src/linux.

- You must have Linux (0.99.9 or later) sources installed before
  installing the driver. You will also need gcc.
  The MPU-401 support requires Linux 0.99.11 or later.

- cd /usr/src

	or

  cd /usr/src/linux/drivers (if you have Linux 0.99.13 or later).

  Alternatively you may unarchive the driver package under suitable
  directory (for example /usr/local/sound) and to use symbolic links.
  It could be little bit tricky so don't do this if you don't know how
  to do it.
  This method could make it easier to install subsequent kernel 
  versions. You don't need to reinstall the sound driver package but just
  the symbolic link.

- Unarchive the driver package
  (gunzip -c snd-driv-2.0.tar.gz | tar xvf -).

- If your Linux version is 0.99.12 or earlier, you will have problems
  with missing <linux/malloc.h>. You could solve this problem by building an
  empty /usr/include/linux/malloc.h or by removing the include from the
  sound/linux/os.h (don't forget to put it back when you install
  Linux 0.99.13 or later).

- cd /usr/src/linux
- make config
- make dep
- make (or watever you have used to compile your kernel).

- Ensure that you boot with the kernel containing the driver.
  This is the most common problem during the installation.

- To build the device files you need to run the enclosed shell scrip 
  (see below).

- Copy the sound/ultrasound.h  and sound/soundcard.h to /usr/include/sys.
  (Remove the old ones from /usr/include/sys /usr/include/linux first).

Problems
--------

If you have any kind of problems, there is a debugging feature which
could help you to solve the problem. To use it, just execute the
command:

	cat /dev/sndstat 

and look at the output. It should display some usefull info about the
driver configuration. If there is no /dev/sndstat 
(/dev/sndstat: No such file or directory), ensure that you have executed the
soundinstall script (at the end of this file). The message: 
/dev/dsp: No such device means that you don't have the sound driver installed
on your kernel or the driver version is earlier than 1.99.6.


- /dev/???????: No such file or directory.
Run the script at the end of this file.

- /dev/???????: No such device.
You have not booted with a kernel containing the driver or the I/O address
configuration doesn't match your hardaware. 

- The module player (str) plays just a second and then stops completely.
You have incorrect IRQ settings (usual with SB cards).

- There is pauses in the playback of the module player (str).
The str program requires more than 40% of the speed of a 486/50 to play
without pauses at 44 kHz speed. A 386/25 can hardly play faster than 22 kHz.
You should use lower speed (-s speed), buy a faster computer or a Gravis 
UltraSound card. (If you already have GUS, you should use gmod and not the
str). If the DSP_BUFFSIZE in the sound/local.h is less than (nr_channels*
speed_in_Hz * (bits/8))/2, it could explain the pausing problem. Also check
that the turbo swich is on and don't run applications like weather forecasting
on background. Sometimes (very rarely) an IRQ conflict can cause similar
problems with SB cards.
If you want to play modules on a 386sx while recompiling the world, buy a GUS.
It runs without burning your CPU.

Hannu Savolainen
hsavolai@cs.helsinki.fi

----------------- cut here ------------------------------
#!/bin/sh
#
#	soudinstall		
#
#		by Craig Metz - cmetz@thor.tjhsst.edu
#
# Create the devices
#
#	Mixer 		(14, 0)
#
if [ -e /dev/mixer ]; then 
	rm -f /dev/mixer 
fi
mknod -m 666 /dev/mixer c 14 0
#
#	Sequencer	(14, 1)
#
if [ -e /dev/sequencer ]; then
	rm -f /dev/sequencer
fi
mknod -m 666 /dev/sequencer c 14 1
#
#	MIDI		(14, 2)	[ Not implemented ]
#
if [ -e /dev/midi ]; then
	rm -f /dev/midi
fi
mknod -m 666 /dev/midi c 14 2
#
#	DSP		(14, 3)
#
if [ -e /dev/dsp ]; then
	rm -f /dev/dsp
fi
mknod -m 666 /dev/dsp c 14 3
#
#	SPARC audio	(14, 4)	[ Not fully implemented ]
#
if [ -e /dev/audio ]; then
	rm -f /dev/audio
fi
mknod -m 666 /dev/audio c 14 4
#
#	DSP2		(14, 19) /dev/dsp for the second soundcard.
#				Also the SB emulation part of the
#				PAS16 card.
#
if [ -e /dev/dsp1 ]; then
	rm -f /dev/dsp1
fi
mknod -m 666 /dev/dsp1 c 14 19
#
#	SPARC audio1	(14, 20) [ Not fully implemented ]
#				/dev/audio for the second soundcard.
#				Also the SB emulation part of the
#				PAS16 card.
#
if [ -e /dev/audio1 ]; then
	rm -f /dev/audio1
fi
mknod -m 666 /dev/audio1 c 14 20
#
#	/dev/sndstat	(14,6)	For debugging purposes
#
if [ -e /dev/sndstat ]; then
	rm -f /dev/sndstat
fi
mknod -m 666 /dev/sndstat c 14 6
exit 0
