|
Next: Installing Planet CCRMA on Up: Planet CCRMA at home Previous: Installing Planet CCRMA on
|
| If you have the original Fedora Core 2 or 3 cdroms, a working linux machine with enough disk space and a working cdwriter you can recreate the apt-enabled images yourself. That will save the bandwidth and time of the download. Follow the instructions in the ``creating the apt-enabled RedHat or Fedora Core cdroms'' appendix. |
Check the integrity of the image before burning the cd. Here are the md5sum checksums for all the images:
e14f111916d29101a6188748173fee5e FC3-i386-disc1-apt.iso
ca58f4cb73f3d774d5db0eb3647faeb3 FC3-i386-disc2-apt.iso
7fd9374d496279f755805e12518ae991 FC3-i386-disc3-apt.iso
452326249b2149c0772ce90cb5b480ac FC3-i386-disc4-apt.iso
ecf4a09f3f939264f78a5708fe8c1b5f FC2-i386-disc1-apt.iso
f8e59ebce95a65ed53f622d1caad34df FC2-i386-disc2-apt.iso
ea288b3896f5cca91adb4db17d63a9b3 FC2-i386-disc3-apt.iso
16bedc736bd786291eaf1cb1042f5cfa FC2-i386-disc4-apt.iso
Once you have the cdrom or dvd images proceed with the install.
When you are done with the install you should have a machine with at least one normal non-root user (created during the reboot process, just after finishing the installation) and your soundcard properly configured and working. Now you are ready to start installing the Planet CCRMA audio and video packages.
There are two cdroms for each Fedora Core release. The ``Planet CCRMA Core'' cdrom contains the kernels and alsa sound drivers. The ``Planet CCRMA'' cdrom contains all the sound, music and video applications.
The ``Planet CCRMA'' cdrom also contains a snapshot of the Planet CCRMA documentation, just open ``file:///mnt/cdrom/software/index.html'' in your favorite browser (assuming the cdrom is mounted on /mnt/cdrom, Fedora Core 3 will mount them in a subdirectory of /media instead).
Check the integrity of the image before burning the cd. Here are the md5sum checksums for all the images:
dcef3962b2818375b6dd2118dd6e7ed9 planetccrma-3-20050519.iso 77348fc1de5015bc56d5afad38301cd9 planetccrma-core-3-20050519.iso 41d82ebc670dd8b2ac0de7f2873f72ea planetccrma-2-20050519.iso 59e5c4306b3f7eb7d80304a4f56ea75a planetccrma-core-2-20050519.iso
You should also optionally download one of the following images depending on the version of Fedora Core you have installed, they contain the latest updates from the Fedora Core project (at the time the images were created):
Beware: I don't know how useful these images could be, they are way over the size of a cdrom (700M) and I have not tested them in a dvd so I don't know if they will work. Here they are anyway, they do contain all the updates, of course.
Check the integrity of the image before burning the cd. Here are the md5sum checksums for the images:
471c1a410e2a7a5794270eb09aa4cee1 planetccrma-fedora-updates-3-20050519.iso 55156e6b2e4d7bbe10b516215c376d0e planetccrma-fedora-updates-2-20050519.iso
All packages in the Fedora Core 2 and 3 repositories are signed (that is, rpm will know if the package has been altered if you have the proper signature installed).
First install the GPG signature key for Planet CCRMA, if you are connected to the Internet just do:
| rpm --import http://ccrma.stanford.edu/planetccrma/RPM-GPG-KEY.planetccrma.txt |
(or dowload the RPM-GPG-KEY.planetccrma.txt file and import it manually)
If you are not connected to the Internet and you are using the cdrom images, the key can also be found in the root directory of the Planet CCRMA cdrom image.
If you are not already using apt jump to the next item...
Otherwise you need to properly configure your installed apt package to access the Planet CCRMA repositories. Two things are needed, a proper apt configuration file and an addition to the list of urls that apt uses to access the repositories.
First, make sure that your /etc/apt/apt.conf file has an Allow-Duplicated section that looks like this:
Allow-Duplicated {
"^kernel(-(BOOT|smp|bigmem|debug|doc|source.*)|)$";
"^gpg-pubkey$";
};
|
This change is needed to allow for the proper kernel related duplicated packages. It is also helpful to have this option:
Install-Options { "--oldpackage" };
|
This one is useful when installing multiple kernels. It would be impossible to always ``upgrade'' a kernel to a numerically newer version, so having this option here enables you to install an ``older'' kernel without apt complaining.
Then add entries to enable access to the Planet CCRMA repositories. Depending on the version of apt you have installed you may be able to add this to the /etc/apt/sources.list, or else you could create a new file in /etc/apt/sources.list.d (named, for example, ``planetccrma.list'') that includes the following urls:
for Fedora Core 3:
|
# Planet CCRMA RPM Repository for Fedora Core 3
rpm http://ccrma.stanford.edu/planetccrma/apt fedora/3/i386 core updates rpm http://ccrma.stanford.edu/planetccrma/apt fedora/3/i386 planetccrma rpm http://ccrma.stanford.edu/planetccrma/apt fedora/3/i386 planetcore |
or for Fedora Core 2:
|
# Planet CCRMA RPM Repository for Fedora Core 2
rpm http://ccrma.stanford.edu/planetccrma/apt fedora/2/i386 core updates rpm http://ccrma.stanford.edu/planetccrma/apt fedora/2/i386 planetccrma rpm http://ccrma.stanford.edu/planetccrma/apt fedora/2/i386 planetcore |
The ``planetcore'' repository hosts the kernel and alsa related packages and the ``planetccrma'' repository hosts all the applications. The ``core'' and ``updates'' repositories host the original Fedora Core 3 release and all official updates (you may ommit these last two if you are pointing to some other repository for the same functionality).
The Planet CCRMA package collection is managed through the apt apt (Advanced Package Tool) utilities. The first step is to add apt to the programs that are already installed in your Fedora Core machine to be able to access the Planet CCRMA online repository and/or the Planet CCRMA cdroms.
| To do this, and almost all subsequent installation and configuration work, you must be ``root''. So fire up a terminal and ``su'' root to aquire the mythical root superpowers. You can run most programs from your normal login account, but to install and upgrade software you need to be root. |
Fedora Core 3: go ahead and install apt (using rpm):
|
rpm -Uvh http://ccrma.stanford.edu/planetccrma/apt/rpms/apt-0.5.15cnc6-3.rhfc3.ccrma.i386.rpm
|
This will install apt and its configuration files for accessing Planet CCRMA, and several other well known repositories. Only the Planet CCRMA configuration is supported, all others are disabled by default.
Fedora Core 2: the integrated package is not available yet, go to the Getting Apt section of the old install guide, download and configure the proper apt package and return here...
All cdrom images available from the Planet CCRMA site include full apt databases of their contents. If you are using a cdrom downloaded from the Planet CCRMA site you should add it to your apt configuration before proceeding with the install.
If you currently have a cdrom mounted, first unmount it and then type:
|
apt-cdrom add
|
For Fedora Core 3 you should use this line instead (the default mount point for cdrom drives has changed and that change has not been yet incorporated in the apt package - make sure you use the proper mount point, look for it in the /media subdirectory):
|
apt-cdrom --cdrom=/media/cdrom add
|
Insert the first cdrom (it does not matter which) when prompted, and press enter when ready so that apt-cdrom can scan it. When it is done it will prompt for a name for that particular cdrom, just type in whatever you scribbled on it to differentiate it from the other(s). Do the same with the other cdrom(s).
If you now look at the /etc/apt/sources.list file you will see that apt-cdrom has added several lines before the ones that were there before. They start with ``rpm cdrom:'' instead of ``rpm http:'' and point to the cdroms you just inserted. From now on apt-get knows about your cdroms (in addition to the Planet CCRMA apt repository) and your cdroms will have precedence over the network when versions match (the network URLs will override the cdrom if the online version of a package is newer than the cdrom version).
If you ever want to get rid of the cdroms just erase those lines from /etc/apt/sources.list (or comment them out by prepending a ``#'') and do an ``apt-get update''.
That's it. If something you want to install is in the cdroms you will be prompted by apt-get (or synaptic, see below) to insert it and the packages will be copied from it to the hard disk before the installation begins. If there is a newer version in the CCRMA apt repository it will be downloaded instead.
If you do not have a network connection at all in the install machine you should comment out all the /etc/apt/sources.list entries that begin with ``rpm http:''. In that way apt will not try to load the network repository apt databases. Caveat: if you do not have the full set of Planet CCRMA cdroms (including the custom RedHat install cdroms) you may not be able to install all Planet CCRMA packages if you did not originally install all Fedora Core packages. Some Planet CCRMA packages may depend on original Fedora Core packages that are not installed in your computer, and the apt database only knows about what you have installed and the cdroms you have fed to apt-cdrom.
Now you are ready to tell apt to find out what packages are available in the Planet CCRMA repository. Just type:
|
apt-get update
|
This will load the apt package database from the Planet CCRMA repository. Remember: you will have to do this whenever you start a new session of upgrades or installs as the repository might have changed since the last time you accessed it.
Planet CCRMA provides a version (actually two at the time of this writing) of the Linux kernel with two key differences from the standard Fedora Core kernel: better low latency performace and the inclusion of the realtime Linux Security Module, which will enable you to run programs like Jack with realtime privileges from a normal non-root account.
To install the Planet CCRMA kernel type:
|
apt-get install planetccrma-core
|
Or if you are running a machine with more than one processor (or a computer with a Pentium 4 chip with hyperthreading enabled), install the multiprocessor kernel:
|
apt-get install planetccrma-core-smp
|
Fedora Core 3: if you are using the cdrom images with apt you should add an option to the apt-get command line so that it looks in the proper directory when mounting the cdrom. The following is an example, look into /media to see what is the subdirectory you should use. The command line will be something similar to:
|
apt-get -o Acquire::cdrom::mount=/media/cdrom install planetccrma-core
|
|
apt-get -o Acquire::cdrom::mount=/media/cdrom install planetccrma-core-smp
|
The planetccrma-core packages are empty but they require all the packages needed, and with the proper versions. The core packages include the kernel itself and newer, more up to date versions of the ALSA sound drivers (including some tools and packages that are not part of the normal Fedora Core install).
A second kernel is available. This kernel has much better low latency performance (it includes Ingo Molnar's realtime preemption patch configured with PREEMPT_DESKTOP), but it will probably not work on all machines, or if it works it may be unstable. You can install it alongside the normal Planet CCRMA kernel and test drive it. If it works in your hardware it will provide better performance. If you want to try it type:
|
apt-get install planetccrma-core-edge
|
Or for multiprocessor machines:
|
apt-get install planetccrma-core-edge-smp
|
At this point you can cross your fingers and reboot the machine. At the grub prompt select the kernel you want to try. Version 2.6.10-2.1.ll is the most stable and the one you should try first. If that one works fine you can reboot again and try 2.6.10-0.1.rdt, it is less stable at the time of this writing, but if it works fine with your hardware, it will provide a much better low latency performance.
Once you are happy with a given kernel you can make it the default boot kernel by editing the /boot/grub/grub.conf file and changing the ``default='' line to point to the kernel you want to boot by default. Kernels are indexed with a zero base, ``0'' being the first in the list of kernels that follows the default line. Depending on how many kernels you just installed, and which one you want to boot by default, the ``default='' line should read ``0'' or ``1''.
If you have multiple sound cards (including external usb MIDI controllers, which also count as a soundcard) you most probably want to define which one is going to be the default. For that you will have to (carefully) edit the "/etc/modprobe.conf" file. Otherwise cards whose kernel modules are loaded by the hotplug subsystem early in the boot process - such as usb soundcards - will automatically become the first card, probably not what you want if that soundcard is just a MIDI interface with no audio capabilities.
You can use the following template as an inspiration for what you have to add to modprobe.conf. Be aware that there will be more lines in your modules.conf file, including ``install'' and ``remove'' lines for the soundcards that Kudzu has configured, leave those lines alone:
|
alias snd-card-0 snd-CARD_0
options snd-CARD_0 index=0 ... alias snd-card-N snd-CARD_N options snd-CARD_N index=N |
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).
In the case of USB soundcards you will have to add the ``alias'' line manually as kudzu does not include it in modprobe.conf:
|
alias snd-card-N snd-usb-audio
options snd-usb-audio index=N |
Here is a filled in example that includes three cards (this ommits the ``install'' and ``remove'' lines):
alias snd-card-0 snd-ice1712 options snd-ice1712 index=0 alias snd-card-1 snd-ens1370 options snd-ens1370 index=1 alias snd-card-2 snd-usb-audio options snd-usb-audio index=2 |
And this is how the audio part of modprobe.conf looks like in my laptop configuration (wrapping of the install and remove lines added to better fit the width of this page):
alias snd-card-0 snd-intel8x0
options snd-intel8x0 index=0
install snd-intel8x0 /sbin/modprobe --ignore-install snd-intel8x0 && \
/usr/sbin/alsactl restore >/dev/null 2>&1 || :
remove snd-intel8x0 { /usr/sbin/alsactl store >/dev/null 2>&1 || : ; }; \
/sbin/modprobe -r --ignore-remove snd-intel8x0
alias snd-card-1 snd-usb-audio
options snd-usb-audio index=1
|
After you are done editing the file, use depmod to parse it again and determine module dependencies:
|
/sbin/depmod -a
|
You can now restart the sound driver to test it. If you are logged in into X you probably want to logout first and do this from a text console, as stopping the alsa system will kill the audio control panel in Gnome. Note: this will not test what happens when hotplug find an audio device early in the boot sequence, you will have to reboot to test that.
|
/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 in the specified order.
The ALSA sequencer kernel module is not automatically loaded. As a workaround you can enable the old alsasound startup script, it will force the load of the sequencer module:
|
/sbin/chkconfig alsasound on
|
If you have not already done it, you should update your machine to the latest version of the Fedora Core packages. They will provide important security and functionality upgrades. The Planet CCRMA repository includes the Fedora Core updates, you can install what is available by typing:
|
apt-get dist-upgrade
|
Most probably you will be looking at a long list of packages that need to be upgraded. Unless you keep your system up to date, of course. Answering ``n'' to the subsequent apt-get prompt will leave your system untouched, if that is what you want. Be aware that many of the upgrades are security fixes that might be vital if you are connected to the internet.
After you are done installing Planet CCRMA or just one of its continents or small islands you can periodically issue an:
|
apt-get update
apt-get dist-upgrade |
to see which packages (of the ones you have installed) have been upgraded to new versions. This will not only include the Planet CCRMA package collection but also any upgrades coming from RedHat (through the Planet CCRMA repository) as well.
Of course if you subscribe to the Planet CCRMA mailing list you will receive timely notices of all new or updated packages.
There are a lot of factors that affect the audio performance of a given system. I'll just detail a few of the most important. If your new kernel works and you are impatient to try out some cool software you can safely skip the following recommendations and come back here later to get the best performance from your system.
If your computer uses EIDE hard disks (instead of SCSI) it is vitally important to tune the driver. Although newer versions of Fedora Core do a good job by default, it is still a good idea to check the things. The linux kernel uses very very conservative settings for the IDE driver because of the possibility of data corruption in very old motherboards and drives. AFAIK all modern mobos and drives are fine so you should definitely tune your setup. Backup your important data before trying...
Use hdparm for that. To check what the current settings for your driver are type (replace /dev/hda with the drive you want to check):
|
/sbin/hdparm /dev/hda
|
This is one incantation I'm currently using:
|
/sbin/hdparm -c 3 -d 1 -m 16 -A1 /dev/hda
|
This means: '-c 3' enables 32 bit transfers with sync through the pci bus, '-d 1' enables DMA operation, '-m 16' turns on multisector transfers (with 16 sectors) and '-A1' enables the driver read ahead feature. Read the hdparm man page for all the gory details. Run '/sbin/hdparm -t' before and after each optimization to check for improvements. Some options ('-m' and '-u') are dangerous for some chipset and drive combinations and can lead to massive filesystem corruption. Test on a filesystem you don't mind losing (you do have backups right?). Actually, '-u' can make the latency worse (understandable if you read the man page) so don't turn it on for now.
Depending on what drivers and motherboard you have there might not be much improvement in the overall speed. Don't worry, even though it does not appear to be running any faster, the latency performance has improved (but hdparm cannot test for that). The latest RedHat releases are much better at optimizing hard disks so you might also find that most parameters are already tuned.
More enabled options do not necessarily mean better performance. For example, in my current laptop adding the '-u 1' flag actually makes the latency worse. Speaking of laptops with relatively recent hard disks, or hard disks that have ``acoustic management'' you should try ``/sbin/hdparm -M /dev/hda'' (assuming hda is your drive) to see if the drive understand the ``acoustic management'' interface. If it does you will get a boost in performance by using the '-M 254' parameter in your configuration file (at the cost of more seek noise).
And do not forget the hardware itself, in particular the cable connecting the drive to the motherboard. To use the newest high speed modes you will need to have a good quality 80 conductor cable, older 40 conductor ones will not give you the best speed (thanks to Martin Rocamora for this tip).
Once you are satisfied with the optimization you have selected you can change the /etc/sysconfig/harddisks configuration file to put your selected options there so they are activated automatically when you boot the computer.
See this page for the gains you can obtain by tuning your EIDE hard disks.
A nice article about hdparm and how to use it.
The RedHat boot process only optimizes hard disks. You can and should also optimize your cdrom (if it is EIDE). To see the current settings for your cdrom (assuming it is hdc) type:
|
/sbin/hdparm /dev/hdc
|
You will probably get some lines with data, and some ``Input/Output errors''. Those errors correspond to things the cdrom drive cannot do, so you can safely ignore them. Most probably you will be able to use dma and use 32 bit transfer modes and that's probably enough. To get that to be permanent copy /etc/sysconfig/harddisks to /etc/sysconfig/harddiskhdc (if your cdrom is hdc) and tune the parameters there according to the test you just did.
I plan on writing something simple and clear about these two important issues. They can have a huge impact in the latency you can get out of your system.
For now it is enough to say that it pays big time to try to set up your audio card to use one of the highest priority interrupts. You can find more details in this thread of the ardour-dev mailling list. The third response (from Mark Knecht) is particularly useful. On some motherboards you can actually use the BIOS to configure which interrupts go to which card slots, but that is not very common. Most of the time you will have to swap cards till you find the right combination.
Another issue is how the different cards and devices that are connected to the pci bus actually share (or not) it. It is possible to tell a card to use ``less'' pci bandwidth (or more) and significantly improve the overall performance. Please read this article by Daniel Robbins, it is a case study that includes very clear explanations of what is going on underneath the hood of your pc.
Some desktop environments periodically poll the cdrom drive to find out if a cdrom or cd has been inserted (and then automount it, or execute programs, or start a cd player application). Polling the cdrom can take a substantial ammount of time and might introduce latency hits (I never noticed this because I always disable cdrom polling, I like to mount things manually). So go to the control panel of your favorite desktop and disable this feature if you want to do low latency work.
If you use Gnome go to ``Settings'', then ``Peripherals'' and finally to ``CD Properties''. Turn off ``Automatically mount CD when inserted'' and ``Run command when CD is inserted''.
You are done with the hard stuff. At this point you have a machine that has a low latency kernel, matching alsa drivers and it has been tuned to get the best possible performance.
Now you have to install the actual applications and start having fun!
One way to do this is to just go ahead and browse the following pages. Each package includes a link to the web site of the package (where you can usually find more information on how to use it), a brief description of what it does, which version is hosted at Planet CCRMA and on which releases of RedHat it is currently available, and of course, the apt-get incantation you need to get it installed.
If you want to install almost everything in one go there is a shortcut you can take. There are two lists of applications that include most of the stuff in Planet CCRMA, one (this link points to the 9 version) includes only audio related applications, the other (this link points to the 9 version) includes both audio and video applications. You can install all those packages by installing the corresponding rpm through apt-get. For audio applications only type:
|
apt-get install planetccrma-audioapps
|
If you also want the video related applications type:
|
apt-get install planetccrma-audiovideoapps
|
After the first install subsequent ``apt-get dist-upgrade'' commands will update to a newer version of the required package list, if there is one, and will pull any new packages that made it into the list (but it will not erase any packages that are no longer in the list). As long as you have one of these packages installed you will not be able to individually erase applications that are listed as requirements. You can, at any point, erase either planetccrma-audioapps or planetccrma-audiovideoapps and take manual control of which applications are installed or removed.
There are two additional virtual packages you can install. They will install the developer packages that allow you to rebuild any of the source rpms or build other packages that are not part of Planet CCRMA but need them.
|
apt-get install planetccrma-audioapps-devel
|
If you also want the video related developer packages type:
|
apt-get install planetccrma-audiovideoapps-devel
|
Have fun!!
© Copyright 2001...2005 Fernando Lopez-Lezcano, CCRMA, Stanford University.
All rights reserved.