|
Next: Bringing your hat up Up: Installing Planet CCRMA on Previous: Installing apt (Advanced Package
|
|
mkbootdisk kernel_version
|
See the mkbootdisk man page for details. To find out what is the kernel version you are currently running type ``uname -r'', the result of which should be the argument to mkbootdisk. Make sure you can indeed boot from the bootdisk.
|
apt-get -o RPM::Install-Options::=--oldpackage install planetccrma-core
|
If you have a machine with multiple processors you probably want to install the multiprocessor kernel and alsa sound drivers in addition to the single processor versions. Installing this package will install both Planet CCRMA kernels:
|
apt-get -o RPM::Install-Options::=--oldpackage install planetccrma-core-smp
|
If you want to install the RedHat kernel with capabilities type:
|
apt-get -o RPM::Install-Options::=--oldpackage install planetccrma-core-redhat
|
Or type this for a machine with multiple processors:
|
apt-get -o RPM::Install-Options::=--oldpackage install planetccrma-core-redhat-smp
|
Of course you can install both kernels and choose which one to boot from at the grub prompt.
|
Note for laptop users and the Planet CCRMA kernel: after
rebooting into the new kernel make sure that the cooling fan starts
working when you start using the machine. The new kernel includes the
latest ACPI (Advanced Configuration and Power Interface) at that
should make power management work on newer laptops, but I have seen
one laptop that did not like the ACPI enabled kernel and had to be
rebooted with acpi turned off for the fan to work. Go figure...
To turn ACPI off edit the /boot/grub/grub.conf file and add ``acpi=off'' at the end of the kernel line that corresponds to kernel 2.4.26-1.ll, and reboot the machine. |
|
apt-get install kernel-source#2.4.26-1.ll.rh90.ccrma
|
(or .rh80 or .rh73 if you are running RedHat 8.0 or 7.3, or rhfc1.ccrma if you are running Fedora Core 1). or type this for the RedHat kernel:
|
apt-get install kernel-source#2.4.20-31.1.caps.rh90
|
The source will be installed in /usr/src/linux-2.4.26-1.ll (or 2.4.20-31.1.caps), the software you are compiling might be smart enough to discover its location. If it is not, you may have to create a link from /usr/src/linux to /usr/src/linux-2.4.26-1.ll. To do that type:
|
ln -s /usr/src/linux-2.4.26-1.ll /usr/src/linux
|
At this point you are ready to configure alsa. If your sound card is a PCI card and it is supported by ALSA then most probably it will possible to configure it by using alsaconf:
Type ``/usr/sbin/alsaconf'' in a terminal window and follow the prompts (when it asks whether you want to modify the configuration answer ``yes''). The last steps (starting the alsa sound drivers and playing a test soundfile) may fail because you probably have the oss kernel modules for your soundcard loaded at this point (the alsa kernel modules cannot load if the oss kernel modules are loaded and using the soundcard).
Caveat: alsaconf will not automatically detect USB soundcards. If you have a USB card you also probably have another soundcard in your motherboard, so you probably want to read through the rest of the instructions (I know it is boring reading but go through it anyway), and then go to the section on configuring multiple soundcards. Also read the extra instructions for USB soundcards.
Caveat: if alsaconf succeded in configuring your soundcard and you want your sound modules to stay loaded at all times add these couple of lines at the very end of the /etc/modules.conf file that was changed by alsaconf:
|
# -- Keep modules from being autocleaned
add options -k snd-card-0 |
RedHat has an autoclean process that runs every 10 minutes and removes kernel modules that have not been used for a while.
If alsaconf succeeded in configuring your card and you heard the sample sound play back from your setup you can jump to the section that deals with configuring the mixer so that you can double check the settings.
If the card was detected and configured but you heard no sound (assuming the audio connections are fine), then most probably the ALSA drivers could not be loaded because you still have the OSS drivers loaded. In that case jump to the section that deals with unloading the oss drivers, otherwise go ahead with the rest.
If alsaconf was not successful in detecting your card then you can try to do the configuration process manually:
If you don't have /sbin/lspci install it by doing:
|
apt-get install pciutils
|
02:0b.0 Multimedia audio controller: Ensoniq ES1370 [AudioPCI]
Subsystem: Unknown device 4942:4c4c
Flags: bus master, slow devsel, latency 64, IRQ 10
I/O ports at 4080 [size=64]
|
You could now have a look at the ALSA soundcard matrix to find out which driver name can be used for the chipset you found. If you found the name of the module you have to use, jump to the section on configuring your /etc/modules.conf file.
You can try searching for the module in the modules directory tree for your kernel. In this example the chipset is probably the es1370. Looking through the available sound modules we find the following (substitute the version of the kernel in all examples with either 2.4.26-1.ll for single processor machines or 2.4.26-1.llsmpfor multiprocessor machines):
# find /lib/modules/2.4.26-1.ll.rh90.ccrma/ -name \*1370\* /lib/modules/2.4.26-1.ll.rh90.ccrma/kernel/drivers/sound/es1370.o /lib/modules/2.4.26-1.ll.rh90.ccrma/kernel/drivers/sound/pci/snd-ens1370.o |
Of the two kernel modules found the one that interests us is the second (because alsa drivers always start with snd-). The other module one is the OSS Free driver that is included with the standard kernel.
Another, more complicated example. Here is the lspci -v output for a Midiman Delta 66:
03:05.0 Multimedia audio controller: IC Ensemble Inc ICE1712 [Envy24]
Subsystem: IC Ensemble Inc: Unknown device d632
Flags: bus master, medium devsel, latency 32, IRQ 21
I/O ports at a000 [size=32]
I/O ports at a400 [size=16]
I/O ports at a800 [size=16]
I/O ports at ac00 [size=64]
Capabilities: [80] Power Management version 1
|
What is the chipset for this card? It could be envy24 or ice1712. A quick search shows which one is the one:
# find /lib/modules/2.4.26-1.ll.rh90.ccrma/ -name \*envy24\* # find /lib/modules/2.4.26-1.ll.rh90.ccrma/ -name \*ice1712\* /lib/modules/2.4.26-1.ll.rh90.ccrma/kernel/drivers/sound/pci/snd-ice1712.o |
Things are not always that easy as there are some drivers that support more than one closely related chip and thus have a more generic name that is not going to match your chipset number.
If you have an ISA soundcard that has PNP you can try ``pnpdump'' to try to find out what it is.
If your card was automatically configured to work under RedHat with the OSS Free sound drivers then look at your current /etc/modules.conf file. There will be an entry for the OSS Free module that will also give you a clue of the chipset involved. Look for a similarly named module that starts with ``snd-'' instead.
# --- ALSA configuration alias char-major-116 snd alias char-major-14 soundcore alias snd-card-0 snd-ens1370 #--- OSS compatibility alias 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 #--- Options options snd major=116 cards_limit=1 \backslash device_mode=0666 device_gid=0 device_uid=0 options snd-ens1370 index=0 id=SBPCI128 #--- Keep modules from being autocleaned add options -k snd-card-0 #--- ALSA configuration END |
For other cards use this as a template and replace ``snd-ens1370'' with the name of the module that handles your soundcard.
Don't forget to disable any lines in /etc/modules.conf that correspond to the oss sound driver kernel modules.
[TODO: how to find which lines to comment out, maybe not necessary as alsaconf is now doing that automatically]
After you are done editing the file, use depmod to parse it again and determine module dependencies:
|
/sbin/depmod -a
|
|
/etc/rc.d/init.d/alsasound start
|
If everything is fine you should see the familiar [OK] startup aknowledgements from the script and the sound driver kernel modules should load.
|
/usr/sbin/alsactl store
|
This will write a file to /etc/asound.state that contains all the current settings of the mixer. It is a readable ASCII file that you can also change with your favorite text editor.
Alsactl can also restore a previously stored configuration (this is automatically done by the alsa sound startup script):
|
/usr/sbin/alsactl restore
|
|
aplay -device="plughw" soundfile.wav
|
``aplay'' is an example program and only understands .wav files so it will not be able to play any other format.
[WARNING]: skip this step if you are not confortable editing files! It is possible to mess up the shutdown procedure if you make a mistake while editing this critical system file.
The halt script lives in /etc/rc.d/init.d/halt. These are the lines I comment out, they try to save the state of the oss mixer, that does not make sense for the alsa drivers (which have their own program to save and restore mixer settings).
# Save mixer settings, here for lack of a better place. grep -q "\(sparcaudio\|sound\)" /proc/devices if [ $? = 0 -a -x /bin/aumix-minimal ]; then runcmd $"Saving mixer settings" /bin/aumix-minimal -f /etc/.aumixrc -S fi |
Just comment the previous lines out (put a ``#'' at the beginning of each line).
|
/sbin/chkconfig --add alsasound
|
If you want, you can check that the script was added by doing:
|
/sbin/chkconfig --list alsasound
|
At this point you should be able to reboot your computer and have the alsa sound driver start automatically.
There are some caveats when dealing with USB soundcards. Alsaconf will not detect them automatically. The ALSA kernel module name for USB soundcards is ``snd-usb-audio'' (you can take the modules.conf template for single cards and use snd-usb-audio for the kernel module name).
|
audio
usb-midi |
This will disable only the USB OSS drivers. You can also add:
| snd-usb-audio |
so that your USB soundcard will be started with the rest of the ALSA soundcards (if there are more). Otherwise hotplug will start it early in the boot sequencer (but there's no harm in that).
If you have multiple sound cards you will need to manually edit your /etc/modules.conf file to add the proper kernel modules for all of them so that the alsa startup script will load them all.
Alsaconf will not find USB soundcards. If your second (or first) card is a USB soundcard then the name of the corresponding kernel module is ``snd-usb-audio''.
|
# -- ALSA configuration
alias char-major-116 snd alias char-major-14 soundcore alias snd-card-0 snd-CARD_0 ... alias snd-card-N snd-CARD_N #-- OSS compatibility alias 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 sound-slot-N snd-card-N alias sound-service-N-0 snd-mixer-oss alias sound-service-N-3 snd-pcm-oss alias sound-service-N-12 snd-pcm-oss #-- Options options snd major=116 cards_limit=N+1 device_mode=0666 device_gid=0 device_uid=0 options snd-CARD_0 index=0 ... options snd-CARD_N index=N #-- Keep modules from being autocleaned add options -k snd-card-0 ... add options -k snd-card-N #-- ALSA configuration END |
In this template ``...'' stands for more lines here, one for each extra card (don't copy the dots! :-) ``CARD_N'' is the name of the kernel module that corresponds to the card you want in position ``N'' (N=0 is the first card, usually the default device used by all programs). ``N+1'' is the total number of soundcards in your system. Just fill in the kernel module names that corresponds to your cards. Please note that the OSS section for the first card (the ``sound-service-*'' part) is different than the ones for subsequent cards. The OSS sequencer lines have to appear only once, there is only one sequencer for all midi ports in the system.
Here is a filled in example that includes three cards (the last one being an USB soundcard).
# --- ALSA configuration alias char-major-116 snd alias char-major-14 soundcore alias snd-card-0 snd-ice1712 alias snd-card-1 snd-ens1370 alias snd-card-2 snd-usb-audio #--- OSS compatibility alias 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 sound-slot-1 snd-card-1 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 sound-slot-2 snd-card-2 alias sound-service-2-0 snd-mixer-oss alias sound-service-2-3 snd-pcm-oss alias sound-service-2-12 snd-pcm-oss #--- Options options snd major=116 cards_limit=3 \backslash device_mode=0666 device_gid=0 device_uid=0 options snd-ice1712 index=0 options snd-ens1372 index=1 options snd-usb-audio index=2 #--- Keep modules from being autocleaned add options -k snd-card-0 add options -k snd-card-1 add options -k snd-card-2 #--- ALSA configuration END |
|
/sbin/depmod -a
|
|
/etc/rc.d/init.d/alsasound stop
|
Then start it again:
|
/etc/rc.d/init.d/alsasound start
|
It should load all the modules for all your soundcards.
© Copyright 2001...2005 Fernando Lopez-Lezcano, CCRMA, Stanford University.
All rights reserved.