Go to TogaWare.com Home Page.
GNU/Linux Desktop Survival Guide
by Graham Williams
Google

Setting Up Your Audio Chip


Generally, any onboard sound card identified is set as the default on boot (/dev/dsp). Additional sound cards (e.g., the SB Live! on Athens (104.7)) are identified as alternatives (/dev/dsp1, etc.). To make the alternative sound card the default, load the appropriate modules in the order you wish them to be assigned in /etc/modules. For Athens (104.7) this involved:

  snd-emu10k1x
  snd-intel8x0

Or else set up the appropriate configuration file (/etc/modprobe.d/sound). For Athens (104.7) this involved:

  alias snd-card-0 snd-emu10k1x
  options snd-emu10k1x index=0
  alias snd-card-1 snd-intel8x0
  options snd-intel8x0 index=1

To use the ALSA drivers you simply need to install the right packages (for a 2.6 kernel or newer):

  $ wajig install alsa-base alsa-utils alsa-oss

Then configure the sound card(s) using alsaconf. This allows the selection of one sound card from many, if you have more than one. Select one will ensure, right there, that the appropriate modules are loaded and /dev/dsp will be set up appropriately. This directly modifies /etc/modprobe.d/sound so if you have modified it yourself don't use alsaconf.

Once your have the card working, perhaps with alsaconf, run a mixer (e.g., alsamixer to set the volume control:

  $ alsamixer

And store the default volume settings you have chosen with:

  $ alsactl store

If multiple cards are configured to run at the same time (i.e., not using alsaconf as above, but instead loading modules for both cards) then some audio applications allow or need the selection of the desired device for the output, usually by selecting the card model. This is true for xmms although, when using ALSA, the OSS option seems to work whilst the ALSA one does not?

A second sound card can also be accessed using the Gnome mixer if both cards are enabled:

Image gnome-mixer-dual
From a command line:

  $ alsamixer -c 1

An alternative, if rather messy, way to make the second sound card the default, you could add the following code to the end of /etc/init.d/bootmisc.sh, where the second sound card is /dev/dsp1:

DEFAULTCARD=1
for f in dsp audio mixer ; do
  mv /dev/$f /dev/${f}0 ;
  ln -s /dev/${f}${DEFAULTCARD} /dev/${f} ;
done

Copyright © 1995-2006 [email protected]
Contribue and access the PDF Version