Audio fix for old Thinkpads (and maybe others)

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

Audio fix for old Thinkpads (and maybe others)

#1 Post by tempestuous »

Apparently some ALSA audio drivers have stopped working under recent kernels. This can be due to the way that some audio chipsets (particularly ISA ones) need to be enabled either by bios or by the plug-and-play routines of the operating system.
There's a good explanation of the problem here -
http://www.thinkwiki.org/wiki/Problem_w ... _ThinkPads

As you can see, quite a number of Thinkpad models are affected:
600E, 770X, 770Z, T43p, T60, T61, X60s

The solution (in theory) is to force the activation of the audio device with a command such as this -

Code: Select all

echo 'activate' > /sys/devices/pnp0/00:05/resources
However, some diagnosis is in order, because the resource value I just quoted (00:05) can vary.

For the Thinkpads there is a script which will determine all the correct values, and then enable the device. I have packaged this script as a dotpet, now attached. Instructions:

1. Install the dotpet.
2. Open /etc/modprobe.conf in Geany, and delete all reference to "snd-cs4236".
3. Blacklist "snd-cs46xx"
4. Reboot.
5. Run the script -

Code: Select all

soundcard-on
Don't run the ALSA configuration wizard!

If sound works, you can make this fix permanent by adding "soundcard-on" to the end of /etc/rc.d/rc.local

EDIT Feb 5 2009 dotpet revised to fix script error.
Very silly that only one person out of the four who downloaded this package had the sense to report this error.
Attachments
snd-cs4236-soundcard-enable.pet
(1.06 KiB) Downloaded 893 times
Last edited by tempestuous on Thu 05 Feb 2009, 10:59, edited 1 time in total.

ssme
Posts: 81
Joined: Thu 15 Jan 2009, 14:40

#2 Post by ssme »

hi, i just tried the fix on the thinkpad 560x (cs4237b sound chip) running pup 4.1.2 retro.

i deleted the sound config from modprobe.conf. i couldn't find anything like cs46xx to blacklist. i rebooted and ran the script from the terminal. the output i get is:

Code: Select all

/usr/local/bin/soundcard-on: line 34 [: =: unary operator expected
FATAL: Error inserting snd_cs4236 (/lib/modules/2.6.21.7/kernel/sound/isa/cs423x/snd-cs4236.ko): Invalid argument
i can get rid of the first error (unary operator) by deleting a bit of whitespace in the appropriate line of code, but i don't know if that actually fixes anything! and the second, fatal, error persists.

am i being incredibly stupid and doing something wrong?

thanks!

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#3 Post by tempestuous »

ssme, the issue relates specifically to the matching of a CS4610 chip with a CS4239 chip, which is unconventional. Your Thinkpad 560x is not listed as affected, so the script will not be compatible.

As a longshot, you could try these two commands to see if your audio device is enabled -

Code: Select all

echo 'activate' > /sys/devices/pnp0/00:05/resources
echo 'activate' > /sys/devices/pnp0/00:06/resources

ssme
Posts: 81
Joined: Thu 15 Jan 2009, 14:40

#4 Post by ssme »

sorry, my mistake.

i got the sound working on the 560x with a hack, copying the ALSA-generated code from puppy 1.0.8 into the 4.1.2 modprobe file. it worked fine, and then it stopped working. back to the drawing board... :P

User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#5 Post by vtpup »

Tempestuous
I have a piece of information to add about the TP600e after testing it for 2 days, now. This is with BIOS INET36WW and Puppy 4.1.2 retro.

It is critical to include all 4 port addresses (for example using mfr default sound ports: cport=0x538 port=0x530 sb_port=0x220 fm_port=0x388).

Often fewer ports are thought necessary than the 4 above, but I tested against them eliminating one by one, and it failed to operate properly without the full complement. Symptoms were continuous white noise when the usual shortened list was used. This was tested against a clean new BIOS flash with the BIOS initialized and quick boot turned off.

Even the Thinkwiki url you referenced includes the shortened port list (sb port unnecessary). I don't know if this would apply to other model Thinkpads, but definitely applies to the specific test case above.

These port specific assignments are not written in stone, by the way, many utilities in Windows (including the Device Manager I believe) and at least one in DOS can alter port assignments on a Thinkpad. Initializing the BIOS will revert port assignments to factory default settings but may affect other programs in Windows in a dual boot system if the ports were set up for a custom configuration.

I did not have to activate as you mentioned earlier in this thread, but maybe this was due to the earlier kernel of retro?

I have also come across a thread here where activating 00:11 (as I remember it) was the key for someone. I'll try to find that thread. EDIT Sorry, no, turned out to be a Dell Inspiron using the same sound chips.)

Thanks for all your work in getting sound going for these computers.

User avatar
obxjerry
Posts: 390
Joined: Fri 29 Jan 2010, 22:34
Location: Louisville, Kentucky

#6 Post by obxjerry »

I have a Thinkpad 600e running Puppy 421 retro. I got my sound working last night by following these steps.

1. Check your bios to make sure that you have "QuickBoot = OFF".
2. Open /etc/modprobe.conf in Geany and delete all reference to "snd-cs4236".
This will be in a section marked "ALSA configuration".
3. Open /etc/rc.d/rc.local in Geany and add this line

modprobe snd-cs4236 isapnp=0 cport=0x538 port=0x530 sb_port=0x220 fm_port=0x388 irq=5 dma1=1 dma2=0

 4. Save. Reboot.

Using modprobe snd-cs4236 index=0 port=0x530 cport=0x538 isapnp=0 dma1=1 dma2=0 irq=5 produced nothing but squelch (static)

Jerry

sindi
Posts: 1087
Joined: Sun 16 Aug 2009, 13:30
Location: Ann Arbor MI USA

560x and cs4232 (really 4236) fixed with pnpbios=off acpi=of

#7 Post by sindi »

I followed someone's suggestion for a different Thinkpad with the same sound chip. It is apparently ISA not PCI. When booting (I used loadlin) add pnpbios=off and acpi=off (the latter may be irrelevant). alsaconf then skips looking for pnp sound chips and goes straight to the legacy section. Uncheck all but cs4236. (If you don't do this the chip is incorrectly identified as cs4232 and it does not work). The wizard then correctly sets up cs4236 sound and it barks at you.

It might also work to choose sb, which is how I got it working with OSS sound in an older linux. io=0x220 irq=5 dma=1 dma16=5 . The chip does soundblaster emulation.

Other PII thinkpads have the same chip and problem.

modules.conf now ends in three lines involving snd-cs4236.
isapnp=0 port=0x530 cport=0x538 dma1= dma2=0

I don't know how to use aplaymidi to test if midi works (it wants a port).

I am hoping to set this 233MHz laptop (upped to 160MB RAM with a 128MB EDO DIMM!) for use with Wary 5.5 and gtk-youtube-viewer but I cannot get lilo to work and puppy 5 will not boot with loadlin though puppy 4 does. It will at least work as an internet radio now with puppy 4.

Post Reply