Differences between revisions 72 and 73
Revision 72 as of 2005-03-20 07:26:26
Size: 5516
Editor: anonymous
Comment:
Revision 73 as of 2005-03-20 07:28:12
Size: 5460
Editor: anonymous
Comment:
Deletions are marked like this. Additions are marked like this.
Line 8: Line 8:
ALSA is compatible with applications written to the ["OSS"] ABI (see OSS Emulation), but you cannot use both ALSA and OSS ''drivers'' at the same time (see the ALSA-OSS section above). Applications written for ["OSS"] will work with ALSA.  However,t you cannot use both ALSA and OSS ''drivers'' at the same time.
Line 10: Line 10:
N.B. Alsa driver names always start with '''snd-''' N.B. ALSA driver names always start with '''snd-''' .

["Sound"]


["ALSA"], the Advanced Linux Sound Architecture, is both a project and a body of software. The project was started because the OSS architecture is technically weak in some respects, and the free variant of OSS (see ["OSSFree"]) lacks some drivers available only in the commercial variant. For several years the ["ALSA"] software was developed separately from Linux. The drivers were added to the Linux codebase during the 2.5 development series and became the standard sound driver system in Linux 2.6.

["ALSA"] is not just a set of ["sound"] drivers; it is also a library with an extensible ["API"] that gives applications access to the latest features of sound cards (e.g., multiple sound channels, Dolby ?"AC3", etc.). ALSA provides efficient support for many applications (e.g., ["XMMS"]), is fully modularized, is [http://en.wikipedia.org/wiki/Symmetric_multiprocessing wiki:?SMP] and thread-safe.

Applications written for ["OSS"] will work with ALSA. However,t you cannot use both ALSA and OSS drivers at the same time.

N.B. ALSA driver names always start with snd- .

Packages

  • libasound2
  • libasound2-doc
  • alsa-base
  • alsa-utils
  • alsa-oss
  • alsamixergui

Alsaconf

Recent alsa-base packages are designed to "just" work with hotplug and discover. The alsa-base package does not load modules; instead, hotplug or discover detects the sound hardware and loads the right ALSA modules and then alsa-base takes care of setting usable mixer levels.

You can also run ["alsaconf"]. This program uses a different method of detecting hardware and if it thinks it has figured out what module is needed, it generates a /etc/modutils/sound or /etc/modprobe.d/sound file (depending on whether you are running Linux 2.4 or 2.6, respectively). With the latter file in place, the module in question will be loaded when the "snd" module is loaded. It suffices then to load the snd module in order to load the driver module for your specific hardware. To make use of this module loading mechanism you probably need to add "snd" to /etc/modules.

Find out which sound chipset your soundcard is using

You can try to detect and configure your sound card manually.

  • If you have a PCI soundcard, do an '["lspci"] -v' to list all available pci devices. The list will most probably include a reference to a multimedia audio device: that is your SoundCard.

  • If you use a ISA PNP card, utilize the command ["pnpdump"]
  • For a ["USB"] card, use ["hotplug"].

You could now have a look at the [http://www.alsa-project.org/alsa-doc/ ALSA soundcard matrix] to find out which driver name can be used for the chipset you found.

ALSA and OSS

If your system is already configured to load OSS drivers for your sound card then look at your current module loader configuration files. There will be entries for the OSS modules that will give you clues about which chipsets your sound cards have. Don't forget to disable these entries.

If you don't unload the OSS modules then the ALSA driver will not be able to start because the OSS driver will be using the hardware resources associated with your sound card. If you see a message about "sound card not detected" and you are sure you have the right ALSA driver, this is probably the reason.

See also: [http://alsa.opensrc.org/index.php?page=alsa-oss aoss].

To load the ALSA driver, simply modprobe it.

Test

Test the driver, using aplay, mplay or xmms for example

To test midi, you can use ["aplaymidi"].

Troubleshooting

To see what indexes have been assigned to cards, run:

  cat /proc/asound/cards

The first card that ALSA finds is usually given index 0 and thus is usually the 'default' sound card. If you are unlucky then the first sound card found is one that it not suitable for playing system sounds. There are two ways to fix this problem.

1. Force the cards to load in a different order. I chose this route, and added the following to my /etc/modprobe.d/sound:

  options snd-trident index=0
  options snd-usb-audio index=1

This forces my Trident card to be the default (card 0) and my USB microphone to be card 1.

2. Change the default card by editing /etc/asound.conf or ~/.asoundrc

Version

Look at /proc/asound/version.

More information

For more information, read the README.Debian files in the alsa-base and alsa-source packages or check out http://www.alsa-project.org and http://alsa.opensrc.org.

See also: AlsaMidi.

New, just in:

Older