Difference between revisions of "Problem with broken sound on some ThinkPads"

From ThinkWiki
Jump to: navigation, search
m (Affected Models: had same problem on my x60s)
(Great! 2 totally different *unrelated* issues mixed up. Intel sound issue was resolved in 2.6.23 so I am removing it)
Line 1: Line 1:
 
Information about the phenomena of broken sound on some ThinkPad models.
 
Information about the phenomena of broken sound on some ThinkPad models.
  
==Problem description==
+
==Dual sound chip problem description==
 
There are two sound chips in these machines, a PCI based [[CS4610|Crystal SoundFusion 4610]], and an ISA based [[CS4239|Crystal SoundFusion 4239]].
 
There are two sound chips in these machines, a PCI based [[CS4610|Crystal SoundFusion 4610]], and an ISA based [[CS4239|Crystal SoundFusion 4239]].
  
Line 10: Line 10:
 
A good thread on the problem can be found in the [http://www.mail-archive.com/alsa-devel@lists.sourceforge.net/msg01181.html alsa-devel mailing list]
 
A good thread on the problem can be found in the [http://www.mail-archive.com/alsa-devel@lists.sourceforge.net/msg01181.html alsa-devel mailing list]
  
There is also a separate issue with recent ALSA builds and the Intel AD1981-1984 chip.  [[http://www.linuxquestions.org/questions/showthread.php?p=2879174]]  This causes problems starting with alsa shipped with kernel 2.6.22.  Workarounds include manually updating ALSA or using your distributions version rather than the kernel version.  Also see [[AD1984]] for patches.
+
===Affected Models===
 
+
==Affected Models==
+
 
*ThinkPad {{600E}}
 
*ThinkPad {{600E}}
 
*ThinkPad {{770X}}, {{770Z}}
 
*ThinkPad {{770X}}, {{770Z}}
*Thinkpad {{T43p}}, {{T60}}, {{T61}}
 
*ThinkPad {{x60s}}
 
  
==Solutions==
+
===Solutions===
===Activating the devices===
+
====Activating the devices====
 +
{{Todo|This should no longer be necessary with any recent distribution, if anyone can validate, and if so remove this section}}
 
First you must make sure that the sound devices are activated.
 
First you must make sure that the sound devices are activated.
  
Line 44: Line 41:
 
:{{cmdroot|cat /sys/devices/pnp0/00:06/resources}}
 
:{{cmdroot|cat /sys/devices/pnp0/00:06/resources}}
  
===Using ALSA===
+
====Using ALSA====
 
Compile the sound driver as a module and load it after everything else.
 
Compile the sound driver as a module and load it after everything else.
 
You can add the following line to a boot script, ie. {{path|rc.local}} for that:
 
You can add the following line to a boot script, ie. {{path|rc.local}} for that:
 
  /sbin/modprobe snd-cs4236 index=0 port=0x530 cport=0x538 irq=5 dma1=1 dma2=0 isapnp=0
 
  /sbin/modprobe snd-cs4236 index=0 port=0x530 cport=0x538 irq=5 dma1=1 dma2=0 isapnp=0
  
This is reported to work at least with kernel 2.6.9, 2.6.13 and 2.6.15.
+
This is reported to work at least with kernel 2.6.15.
  
 
On the 770x using kernel 2.6.16/2.6.17 you may try this:
 
On the 770x using kernel 2.6.16/2.6.17 you may try this:
Line 55: Line 52:
  
 
There is a [[Script for configuring the CS4239 sound chip in PnP mode|nice script]] which can do all this for you, including activation of the device and detecting the correct resource settings to use.
 
There is a [[Script for configuring the CS4239 sound chip in PnP mode|nice script]] which can do all this for you, including activation of the device and detecting the correct resource settings to use.
 
===Using OSS===
 
Add the following lines to a boot script, ie. {{path|rc.local}}:
 
modprobe sound
 
insmod ad1848
 
insmod uart401
 
insmod cs4232 io=0x530 irq=5 dma=1 dma2=0
 
 
or try from commandline:
 
 
modprobe cs4232 io=0x530 irq=5 dma=1 dma2=0 mpuio=0x330 mpuirq=7 synthio=0x330 synthirq=7 (parameter not necessarily)
 
 
In case an insmod or modprobe of cs4232 fails with the following error appearing at the console, via dmesg, or in {{path|/var/log/messages}}, double-check you have ''QUICKBOOT (in the BIOS) disabled''.
 
modprobe: FATAL: Error inserting cs4232: No such device
 
 
====Audio loops====
 
If your OSS module loads like it should, but audio loops or sounds choppy then reloading the module should help:
 
:{{cmdroot|rmmod cs4232 && modprobe cs4232}}
 
 
(For the modprobe command to work without IRQ/IO/DMA parameters, you'll probably want to add the correct parameters as an "options" clause in {{path|/etc/modprobe.conf}}).
 

Revision as of 12:34, 19 March 2009

Information about the phenomena of broken sound on some ThinkPad models.

Dual sound chip problem description

There are two sound chips in these machines, a PCI based Crystal SoundFusion 4610, and an ISA based Crystal SoundFusion 4239.

The Linux drivers for the CS4610 (both OSS and ALSA) expect to find it paired with an AC'97 codec chip, while instead the CS4610 is paired with the ISA CS4239. This was done, because at the time this allowed DOS games to output sound using SoundBlaster Pro emulation.

To get sound under Linux you will have to use the OSS cs4232 or ALSA snd-cs4236 driver for the ISA soundchip instead.

A good thread on the problem can be found in the alsa-devel mailing list

Affected Models

Solutions

Activating the devices

TODO
This should no longer be necessary with any recent distribution, if anyone can validate, and if so remove this section

First you must make sure that the sound devices are activated.

Disable "Quick Boot" in your ThinkPad BIOS, otherwise the sound devices will not be activated by the BIOS. To enter the BIOS, power cycle your ThinkPad and press F1 when the ThinkPad screen shows.

You can also manually activate the sound card once booted:

  • With apm and pnpbios, this is done with setpnp from the pcmcia package:
# setpnp 0x0e on
# setpnp 0x0f on
  • With acpi and pnpacpi, use these commands:
# echo 'activate' > /sys/devices/pnp0/00:05/resources
# echo 'activate' > /sys/devices/pnp0/00:06/resources

It seems that with very new kernels and ACPI enabled, you will need to manually enable the device even if you have correctly disabled "Quick Boot".

This only works with newer kernels that fully support pnpacpi, and provided that this patch has been applied (applied to Linus' tree in july 2005).

It seems that the default dma numbers change when pnpacpi is used (to dma1=1 dma2=3, for instance).

If you're using acpi and pnpacpi, you can see which resources the sound card is using like this:

# cat /sys/devices/pnp0/00:05/resources
# cat /sys/devices/pnp0/00:06/resources

Using ALSA

Compile the sound driver as a module and load it after everything else. You can add the following line to a boot script, ie. rc.local for that:

/sbin/modprobe snd-cs4236 index=0 port=0x530 cport=0x538 irq=5 dma1=1 dma2=0 isapnp=0

This is reported to work at least with kernel 2.6.15.

On the 770x using kernel 2.6.16/2.6.17 you may try this:

/sbin/modprobe snd-cs4232 port=0x530 cport=0x120 irq=5 dma1=1 dma2=0 isapnp=0

There is a nice script which can do all this for you, including activation of the device and detecting the correct resource settings to use.