Setting up alsa.
first you need to make sure what kernel you have, just for good orders sake

, do like this:
Code: Select all
redeeman@redeeman: ~$ uname -r
2.6.1-rc1-love3
good, i have a 2.6 kernel, then alsa is included in the kernel (and i have the love-sources patch which includes newest snapshot)
we need to enable module loading to load the alsa modules. to do this we will cd into /usr/src/linux, as linux is a symlink to the current kernel, we will also check that its correct
(yes, i know my symlink points to 2.6.0 source, but i only have that)
Code: Select all
redeeman@redeeman: ~$ su
Password:
root@redeeman: /home/redeeman$ cd /usr/src/
root@redeeman: /usr/src$ ls -l linux
lrwxr-xr-x 1 root root 20 Jan 2 19:16 linux -> /usr/src/linux-2.6.0
root@redeeman: /usr/src$ cd linux
root@redeeman: /usr/src/linux$ make menuconfig
now see that linux points to the linux kernel dir, then its fine, if you by some reason dont have the link, do like this:
and now we have got the link, and we are able to cd into it.
then you enable module loading, and then we need to enable
only sound support, not any specific drivers.
when that is done you build the kernel and install.
then we need to install the alsa driver, which is alsa-driver in portage, just take the lastest stable release, i only have the unstable to test.
latest unmasked is right now 0.9.8, and i know that release works, as i have tested in that one, so now we will check which alsa packages we have got, and then uninstall, and install the ones we need again.
Code: Select all
redeeman@redeeman: ~$ su
Password:
root@redeeman: /home/redeeman$ qpkg -I -v | grep alsa
media-libs/alsa-oss-1.0.0_rc2 *
media-libs/alsa-lib-1.0.0_rc2 *
media-sound/alsa-utils-1.0.0_rc2 *
media-plugins/alsa-xmms-0.9.12 *
root@redeeman: /home/redeeman$ emerge --unmerge alsa-oss alsa-lib alsa-utils alsa-xmms -p
>>> These are the packages that I would unmerge:
media-sound/alsa-utils
selected: 1.0.0_rc2
protected: none
omitted: none
media-libs/alsa-oss
selected: 0.9.8
protected: none
omitted: none
media-plugins/alsa-xmms
selected: 0.9.12
protected: none
omitted: none
media-libs/alsa-lib
selected: 1.0.0_rc2
protected: none
omitted: none
>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.
root@redeeman: /home/redeeman$ emerge alsa-lib alsa-driver alsa-oss alsa-utils -p
These are the packages that I would merge, in order:
Calculating dependencies ...done!
[ebuild R ] media-libs/alsa-lib-1.0.0_rc2
[ebuild N ] media-sound/alsa-driver-1.0.0_rc2
[ebuild R ] media-libs/alsa-oss-1.0.0_rc2
[ebuild R ] media-sound/alsa-utils-1.0.0_rc2
root@redeeman: /home/redeeman$ etc-update
Scanning Configuration files...
Exiting: Nothing left to do; exiting. :)
root@redeeman: /home/redeeman$
yes, i know alsa-driver is now, but that is because i have drivers built in, and dont need it. we will come to that.
and no, i didnt have any config files to update, but you probably will, (i just did a -p because i already have installed).
now its time to edit /etc/modules.d/alsa, what we need to do, is uncomment some lines, and then change to our card!
Code: Select all
# Alsa 0.9.X kernel modules' configuration file.
# $Header: /home/cvsroot/gentoo-x86/media-sound/alsa-utils/files/alsa-modules.conf-rc,v 1.1 2003/08/05 21:07:55 johnm Exp $
# ALSA portion
alias char-major-116 snd
# OSS/Free portion
alias char-major-14 soundcore
##
## IMPORTANT:
## You need to customise this section for your specific sound card(s)
## and then run `update-modules' command.
## Read alsa-driver's INSTALL file in /usr/share/doc for more info.
##
## ALSA portion
alias snd-card-0 snd-cmipci
## alias snd-card-1 snd-ens1371
## OSS/Free portion
alias sound-slot-0 snd-card-0
## alias sound-slot-1 snd-card-1
##
# OSS/Free portion - card #1
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
## 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
alias /dev/mixer snd-mixer-oss
alias /dev/dsp snd-pcm-oss
alias /dev/midi snd-seq-oss
# Set this to the correct number of cards.
options snd cards_limit=1
here i already have my stuff uncommented, so what you basically have to do, is uncomment following lines:
Code: Select all
alias char-major-116 snd
alias char-major-14 soundcore
alias sound-slot-0 snd-card-0
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
alias /dev/mixer snd-mixer-oss
alias /dev/dsp snd-pcm-oss
alias /dev/midi snd-seq-oss
options snd cards_limit=1
and then you need to edit this line:
to:
Code: Select all
snd-<whatever_your_card_driver_is>
my card is a cmedia 8738. and uses the driver snd-cmipci.
then we update modules, and stuff.
Code: Select all
root@redeeman: /home/redeeman$ update-modules
and then we add alsasound to the default runlevel, and start it now
Code: Select all
root@redeeman: /home/redeeman$ update-modules
root@redeeman: /home/redeeman$ /etc/init.d/alsasound start
* ALSA Detected...
* Restoring Mixer Levels [ ok ]
now we use the tool alsamixer to unmute our device, simply start alsamixer and unmute your master and/or pcm.
and now we are done, and are ready to follow my steps to get a working dmix plugin (software mixing)
Setting up for 2.6
if you are using 2.6.0, you probably have a little more experience.
then just enable alsa in kernel. with your needed drivers, and remember to install version 0.9.7 of the alsa tools, driver and lib. 2.6.0 includes that release
and then there shouldnt be anything more, just follow the other generic steps for 2.5.
FAQ
you made a spelling mistake???
probably thousands. pm me and i will correct![/code]