[ltp] TP770Z Sound (FC2): Update
Mendel Cooper
linux-thinkpad@linux-thinkpad.org
Thu, 3 Jun 2004 21:57:29 -0700 (MST)
This is a progress report on getting sound to work on a Thinkpad 770Z
(cs4232 sound chipset) under Fedora Core 2.
I've been about 90% successful in getting sound to work. That is, sound
now *does* work, but there's one minor task left.
-----------------------------------------------------------------------
The reason sound doesn't work with the stock kernel is that ISAPNP
is enabled. Somehow this interferes with the ALSA snd-cs4232 driver.
So, it's necessary to rebuild the kernel.
How to build a custom kernel so that sound works:
1) Make sure that the kernel source rpm (it's on one of the FC2 CDs) is
installed. This will take a huge chunk of hard drive space -- several
hundred MB.
Do the following steps as root:
2) cd to /usr/src/linux-2.6.5-1.358.
3) make mrproper
This cleans up any leftovers from a previous kernel build.
It shouldn't be necessary on a fresh kernel source installation,
but it won't hurt anything.
4) make gconfig
a) You can pretty much use the default configuration, but with the
following changes.
* Disable ISA PNP detection.
* The default CPU architecture is Pentium Pro. You can safely
change this to Pentium II. This speeds up the kernel a bit.
* Disable any drivers you won't use. That will shrink down the
size of the new kernel.
5) make bzImage
This builds a compressed kernel. It takes maybe 25 minutes on a
TP 770Z.
6) make modules
This builds the modules. It takes a couple of hours!
7) make modules_install
This installs the new set of modules into /lib/modules/2.6.5-1.358custom.
8) makeinitrd initrd-2.6.5-1.358.img 2.5.5-1.358
This builds the new ramdisk for the modules to load from at bootup
time.
Now the really tricky part. You'll have to copy the new kernel, system
map, and initrd files to /boot, then set up some symbolic links. WARNING:
Changing things in /boot is *dangerous*. If you make a mistake you'll
end up with an unbootable system.
The point of no return . . .
9) Renaming the files, and copying to /boot:
mv initrd-2.6.5-1.358.img initrd-2.6.5-1.358.img.custom
cp /usr/src/linux-2.6.5-1.358/initrd-2.6.5-1.358.img.custom /boot
cp /usr/src/linux-2.6.5-1.358/arch/i386/boot/bzImage /boot
cp System.map /boot
10) Changing the files in /boot:
cd /boot
mv System.map-2.6.5-1.358 System.map-2.6.5-1.358.BAK
(Keep a backup copy, just in case.)
ln -s System.map System.map-2.6.5-1.358
cp /boot/initrd-2.6.5-1.358.img /boot/initrd-2.6.5-1.358.img.BAK
(Keep a backup copy, just in case.)
ln -s initrd-2.6.5-1.358.img.custom initrd-2.6.5-1.358
cp System.map-2.6.5-1.358 System.map-2.6.5-1.358.BAK
(Keep a backup copy, just in case.)
ln -s System.map System.map-2.6.5-1.358
11) Renaming the modules directory:
cd /lib/modules
mv 2.6.5-1.358 2.5.5-1.358OLD
ln -s 2.5.5-1.358custom 2.5.5-1.358
Note: Steps 9 - 11 could have been greatly simplified by modifying the
/boot/grub.conf file, but I'm not knowledgeable enough about grub to mess with
it.
12) Reboot the computer, and pray.
WARNING AND DISCLAIMERS:
Rebuilding and installing a custom kernel is not for the faint of heart. If
you are a newbie at this and/or are not adept at using a rescue disk, then
DON'T try it. You'll almost certainly make mistakes and end up with an
unbootable system. YOU HAVE BEEN WARNED!!!
=======================================================================
Assuming that you've successfully installed the custom kernel, all you
have to do is try to install the cs4232 module.
As root,
modprobe snd-cs4232 port=0x530 cport=0x330 irq=5 dma1=1 dma2=2
If you get no error messages, then . . .
cd to /usr/share/sounds and try to play a few of the sound files there.
Can't hear anything? The sound level is too low. Invoke aumix or xaumix,
and adjust all the levels to near maximum. Try playing some sounds again.
=======================================================================
It worked for me. And now I've got sound with FC2 on my TP 770Z.
There's only one slight problem. I haven't yet figured what to put in
/etc/modprobe.conf to get the cs4232 module installed and configured at
bootup. I've kludged it by putting the above modprobe line into
/etc/rc.d/rc.local, and that works, but . . .
I need to reset the mixer setting every time I boot up.
All right, fellas, I've done the heavy lifting. Maybe someone else will
come up with a workable /etc/modprobe.conf file and/or a fix for the
sound level settings annoyance.
Bye for now.
Mendel