
		Advanced Linux Sound Architecture - Driver
		==========================================
			    Installation guide


The ALSA driver replaces the OSS/Free driver.  Since version 0.4.0,
ALSA has supported only 2.2 or later kernels. The 2.0 kernels are no
longer supported.

You must compile the kernel with sound support (CONFIG_SOUND on
2.2/2.4 kernels) either as module or built-in.  You do not need to
select any of the other sound modules apart from sound support.

Before installing this driver, it will be helpful to read carefully
the documentation for insmod, modprobe, kmod and for the isapnp
module if you have an ISA PnP soundcard.


Module option name change after 0.9.0rc3
========================================

Note that module option names were changed in 0.9.0rc4. The 'snd_' prefix
was removed. You may use script in utils directory (module-options) to
convert your older /etc/modules.conf to newer one.


Quick install
=============

1) You must have full configured source for the Linux kernel which you
   want to use for the ALSA drivers. Note that ALSA drivers are part
   of the kernel, so there is necessary to resolve all symbol dependencies
   between the used kernel and ALSA driver code. Partly installed kernels
   (for example from distributor makers) can be unuseable for this action.
2) You must turn on sound support (soundcore module).
3) Run './configure' script.
   If you do not want ISA PnP support, use --with-isapnp=no switch.
   If you want sequencer support, use --with-sequencer=yes switch.
   If you do not want OSS/Free emulation, use --with-oss=no switch.
   If you want turn on debug mode use --with-debug=full switch.
   If you want debug soundcard detection try --with-debug=detect switch.
   If you have kernel source code in another directory than /usr/src/linux,
   use --with-kernel=<kernel_directory>.
   Example: ./configure --with-debug=full
4) Run 'make'.
5) Run 'make install'.
6) Run the './snddevices' script to create new sound devices in /dev directory.
   Skip this step, if you have a kernel with the DEVFS support.
7) Edit your /etc/modules.conf (see the kmod support section below).
8) Run 'modprobe snd-xxxx' where xxxx is the name of your card.
   Note: All ALSA ISA drivers support ISA PnP natively, so you don't need
         isapnptools any more.  Don't use both together.  It will
         conflict.  For disabling the ALSA ISA PnP support, specify
         --with-isapnp=no configure switch.

You can also look at the utils/alsasound file. This script is designed for
the RedHat distribution, but it can be used with other distributions which
use System V style rc init scripts.

Note: All mixer channels are muted by default. You must use a native
      or OSS mixer program to unmute appropriate channels (for example a
      mixer from the alsa-utils package).

Note: This document notices the /etc/modules.conf file. Many current
      distributions uses the old /etc/conf.modules file. Both names are
      valid.


Basic Configurations
====================

See alsa-kernel/Documentation/ALSA-Configuration.txt
(or Documentation/sounds/alsa/ALSA-Configuration.txt in linux-2.6
 kernel tree).


Driver cannot be activated?
===========================

1) You can check your soundcard setup again and read this install file
   (module parameters) carefully.
2) If you have got ISA PnP soundcard:
   native ISA PnP support: is your setup in /proc/isapnp correct?
3) If you have *non*-ISA PnP card:
   set isapnp=0 module option?  Otherwise the driver probes only the
   ISA PnP cards.
3) The driver is not still working: remake driver with:
     ./configure --with-debug=detect; make clean; make
   Reinsert new driver modules to kernel and look to /var/log/messages if
   there are some messages. If these messages do not help you, please
   create a new ticket in our bug reporting system.


Compilation from CVS sources
============================

You need GNU packages autoconf and automake installed in your system
to compile CVS sources of alsa-driver package.

For compilation you can use these commands:

	make ALSAKERNELDIR=../alsa-kernel all-deps
		(if the alsa-kernel-dir is really there)
	aclocal
	autoconf
	./configure
	make dep
	make

The included cvscompile script does this job for you.

Note: Some automake packages have missing aclocal program. Use newer version
      in the case.


Cross-compiling
===============

Use '--with-cross=prefix' parameter for the configure script.

Example:
  './configure --with-cross=arm-linux- --with-kernel=/home/ipaq/kernel/linux'.


Autoloading on Older Kernels
============================

On 2.2 or 2.4 kernels, you have to set the additional aliases for
auto-loading via kmod in /etc/modules.conf:

----- /etc/modules.conf
# ALSA portion
alias char-major-116 snd
# OSS/Free portion
alias char-major-14 soundcore
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
----- /etc/modules.conf

The aliases sound-service-x-y define the add-on modules for ALSA
OSS emulation.  For the second or later card, define more aliases
for mixer and pcm in addition, such as:

----- /etc/modules.conf
# OSS/Free portion - card #2
alias sound-service-1-0 snd-mixer-oss
alias sound-service-1-3 snd-pcm-oss
alias sound-service-1-12 snd-pcm-oss
----- /etc/modules.conf

You don't need to define service 1 and 8 for the second or later
cards.

If you want to autoclean your modules, you should put below line to your
/etc/crontab:

*/10 * * * *   root  /sbin/modprobe -rs snd-card-0 snd-card-1; /sbin/rmmod -as

You may also want to extend the soundcard list to follow your requirements.


Additional Modules
==================

  Module snd-msnd-pinnacle
  ------------------------

    Module for Turtle Beach MultiSound Pinnacle/Fiji soundcards.

    io		- Port # for pinnacle/fiji card
    irq		- IRQ # for pinnalce/fiji card
    mem		- Memory address (0xb0000, 0xc8000, 0xd0000, 0xd8000,
		  0xe0000 or 0xe8000)
    write_ndelay - enable write ndelay
    calibrate_signal - calibrate signal (?)

    Module supports only one card.

  Module snd-pdplus
  -----------------

    Module for Sek'D/Marian Prodif Plus soundcards.

    silent_exit	- Do not reset when driver is unloaded.
    init_adat	- Initialise the card in ADAT mode (instead of in digital stereo).

    Module supports up to 8 cards.

  Module snd-serialmidi
  ---------------------

    Module for generic serial MIDI adapters.

    sdev	- Device file string for serial device
		  (default = "/dev/ttyS0")
    speed	- Speed in bauds. (9600,19200,38400,57600,115200)
		  (default = 38400)
    adaptor	- Type of adaptor.
                  0 = Soundcanvas, 1 = MS-124T, 2 = MS-124W S/A,
		  3 = MS-124W M/B
    devices	- Number of devices assigned to the card.  Default is 1.
  		  When this is more than 1, multiple serial devices (up
		  to 8) are assigned to a single card.  The number of
		  the tail of the device file name is increased for
		  each device.
    handshake	- Enable/disable handshaking (default = 1)	

    Module supports up to 8 cards.

  Module snd-usb-usx2y
  --------------------

    Module for Tascam USB US-122 and US-428 devices.

    This module supports up to 8 cards, autoprobe and hotplugging.

    Note: you need to load the firmware via usx2yloader utility included
          in alsa-tools and alsa-firmware packages.

  Module snd-hdspm
  ----------------

    Module for RME HDSP MADI board.

    precise_ptr		- Enable precise pointer, or disable.
    line_outs_monitor	- Send playback streams to analog outs by default.
    enable_monitor	- Enable Analog Out on Channel 63/64 by default.

    See docs/hdspm.txt for details.

  Module snd-emu10k1x
  -------------------

    Module for Creative Emu10k1X (SB Live Dell OEM version)

    Module supports up to 8 cards.

  Module snd-atiixp-modem
  -----------------------

    Module for ATI IXP 150/200/250 AC97 modem

    Module supports up to 8 cards.


Trouble Shooting
================

Unresolved symbol with RedHat 9
-------------------------------

Run depmod -ae and check which symbol is missing.
If the unresolved symbol is "schedule_work", tihis is because RedHat
shipped the kernel with incomplete implementation of workqueue.
For solving this problem, run the following on the top of alsa-driver
directory:

	% touch include/linux/workqueue.h

and run "make clean", "make" again.
