Gentoo Linux Audio Install

Content:

1. ALSA

The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI functionality to the Linux operating system.

The kernel has to be checked for proper setup. Especially if you have a manual configuration. ALSA requires:

# lspci | grep audio                                (check for the audio device)
# cd /usr/src/linux; make menuconfig                      (Configure the kernel)
# make && make modules_install                             (Compile your kernel)
# mount /boot/                                        (mount the boot partition)
# cp arch/i386/boot/bzImage /boot                         (Copy over the kernel)
# cp .config /boot/config                               (Backup the config file)

The basic drivers are already part of the kernel. So we just intall the add-ons.

# nano -w /etc/make.conf                                  (set ALSA_CARDS="...")
# emerge alsa-utils                                      (Install the utilities)
# nano -w /etc/modules.d/alsa                            (Configure the modules)
# update-modules                                                   (Update them)
# /etc/init.d/alsasound start                                          (Test it)
# rc-update add alsasound boot                                  (Add it at boot)

Now we want to set-up the sound mixing. This can be done interactively on the console with:

# alsamixer                                                (Unmute the channels)

Or via individual commands such as:

# amixer controls                                   (Show the possible controls)
# amixer set PCM on 31                   (Set the PCM playback state and volume)
# amixer <other controls>                             (Set other control values)

OK, ready to listen to it?

# aplay <somefile.wav>                                                 (Test it)

alsaplayer also does the job:

# mkdir /etc/portage                                                    (Remove)
# echo 'media-sound/alsaplayer ~x86' > /etc/portage/package.keywords  (the mask)
# emerge alsaplayer                                (Command line user interface)
# alsaplayer <somefile>                                                (Play it)

2. CD ripper

A Better CD Encoder (ABCDE) is a frontend command-line utility that grabs tracks off a CD, encodes them to ogg or mp3 format, and builds a corresponding playlist.

# USE="-xmms -arts" emerge abcde                   (Command line user interface)
# USE="-gtk" emerge lame                     (It should have come automatically)
# nano -w /etc/abcde/abcde.conf                                   (Configure it)

eject is a nice tool when automating CD ripping. It seems to me that it was bundled in previous versions of abcde.

# emerge search eject                                         (Check if install)
# emerge eject                                                      (Install it)
# eject                                                           (Open CD tray)
# eject -t                                                       (Close CD tray)

3. Ikke's volume manager

Ikke's volume manager (ivman) can be used to run arbitrary commands when events or conditions occur. It allows to define the action to be taken when an audio CD is inserted.

# ACCEPT_KEYWORDS="~x86" USE="-qt -gtk -X" emerge ivman             (Install it)
# nano -w /etc/ivman/IvmConfigActions.xml                         (Configure it)
# /etc/init.d/hald start                                    (start HAL and DBUS)
# /etc/init.d/ivman start                                 (start volume manager)

Insert a data CD and check if it gets mounted.

If everything works, we can add them to the startup list.

# rc-update add hald default                                   (add HAL and DBUS)
# rc-update add ivman default                                (add volume manager)