This document refers to sadp support of Advanced Linux Sound
Architecture: <http://www.alsa-project.org>

How ALSA appears to me.
=======================
ALSA really a front edge in Linux development. The ALSA team
has come up with some interesting ideas. Some of those are
incorporated in SADP, and this is only a start.

ALSA driver is not designed to co-exist with OSS/LSD, so that
you need a real trick if you want to switch from ALSA to OSS/LSD
or vice versa (contact me for details). It claims to be fully
OSS/LSD compatible but I don't know any emulator that is 100%
equivalent to the real thing - ALSA is not an exception.
Abncence of stereo BASS and TREBLE support, different list of
mixer devices, no SYNTH support are the examples of this
incompatibility.

ALSA is a growing creature, ambitious and immature as many of those.
In their rapid aspiration forward, ALSA team does not have time
to look back. It results in abscence of backward compatibility,
and inadequate or incomplete support of some ISA sound cards.
In particular ALSA driver does not provide a hadrware level
of 8-bit support for 16-bit sound cards, while 8-bit cards
might not work at all! I have a serious problem with recording
on Gravis Ultrasound (classic).

For recent PCI cards switch to ALSA might be an advantage, 
because it provides a more comprehesive support for these
cards. You also might find it to be the only free driver
for your PCI sound card.

ALSA support with SADP. 
=======================

Abscence of backward compatibility is a serious problem
for an application that wants to be a backware compatible.
SADP has been tested with ALSA 0.4.1 and 0.5.6, but there
is no guarantee that it will compile with some intermediate
releases, and SADP tries to do the best to overcome that.

As opposed to other ALSA application, SADP accesses ALSA
driver directly: IT DOES NOT NEED ALSA LIBRARY. I believe
that mandatory requirement to use alsalib in application
to be a bit awkward and even ridiculous. Advantages to
no-lib approach are:

	- Ability to use symbolic links for ALSA devices
	- Ability to use SADP in case you are trapped by
	  successfull driver installation and failure to
	  install the library
	- No need to upgrade alsalib with upgrading the
	  driver.
	- SADP can be used as a test to find where to
	  problem comes from (driver or library) in case
	  other ALSA utilities don't work	

Disadvantages of this are:

	- No access to software-compatible modes
	- A bigger chance that SADP will stop working with
	  future ALSA versions.

-------------------

Since 8 bit support for 16-bit cards is not always provided,
SADP might ignore a 8-bit mode request and use 16-bit mode
instead.


Configuring SADP for ALSA support.
==================================
Configuration script automatically disables native ALSA
support, if ALSA support is not present. If ALSA is installed
you can disable native ALSA support in favour of OSS protocol: 

	./configure --without-alsa

Alternatively, you can disable ALSA support for a particular
device, by commenting out following lines in sadp_config.h

	#define ALSA_DSP_SUPPORT
	#define ALSA_MIXER_SUPPORT

These are interpreted in combination with "DSP_SUPPORT" and
"MIXER_SUPPORT". Thus, if module does not compile because
od "broken" DSP(pcm) support, you can comment out
"ALSA_DSP_SUPPORT" leaving "DSP_SUPPORT" active - in this
case OSS emulation will be used for DSP.

By default, SADP will use memory mapping for ALSA 0.5.x and
a PCM (DSP) device that allows it. Memory mapping can be 
disabled by commenting out line

	#define ALSA_MMAP_SUPPORT

in sadp_config.h


Command line parameters related to ALSA support.
================================================

Switch from ALSA support for a binary module is available
during command line. You can refer to a device (dsp, mixer)
by its number or by name. If device is referred by number,
and ALSA is enabled, SADP will try ALSA support (with 
C<device_number> and D0) and if fails, will attempt to use
OSS protocol for specified device.

Examples:
---------
# Example 1
	sadp  -A1
	xsadp -adev 1 
# Use /dev/snd/pcmC1D0, if fails use /dev/dsp1
#
#------------------
#
	sadp  -Adsp
	xsadp -adev dsp
# Always use /dev/dsp - don't try ALSA support
#
#------------------
#
# ALSA 0.5.x example, don't append 'c' for 0.4.x
	sadp  -Asnd/pcmC0D1c
	xsadp -adev snd/pcmC0D1c
# Use ALSA card 0 device 1, don't try OSS emulation



In particular, you can combine native ALSA with 
OSS emulation:

	xsadp -adev 0 -mdev mixer
# Use card 0 for dsp (try ALSA first) and OSS-protocol
# for mixer.


