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

From ThinkWiki
Jump to: navigation, search
m (Problem with broken sound on ThinkPad 600 moved to Problem with broken sound on some ThinkPads)
(Add some model facts from the discussion page)
Line 1: Line 1:
Information about the phenomena of broken sound on some ThinkPad models (see affected/unaffected model lists below).
+
Information about the phenomena of broken sound on some ThinkPad models.
  
 
==Problem description==
 
==Problem description==
First of all, be aware that even though the sound chip is a Crystal SoundFusion 4610, you'll have to use the cs4236 driver to enable sound on this machine, since this driver supports the CS4239 emulation that the 4610 chip offers.
+
Even though the sound chip is a Crystal SoundFusion 4610, you'll have to use the cs4236 driver to enable sound on this machine, since this driver supports the CS4239 emulation that the 4610 chip offers.
  
 
==Affected Models==
 
==Affected Models==
*ThinkPad {{600}}, {{600E}}
+
*ThinkPad {{600E}}
*ThinkPad {{770Z}}
+
*ThinkPad {{770X}}, {{770Z}}
  
==Unaffected Models==
+
==Unaffected 6xx/7xx Models==
 
*ThinkPad {{600X}}
 
*ThinkPad {{600X}}
  
==Affected Operating Systems==
+
The ThinkPad 600X sports a newer CS4624 sound chip, which apparently has the AC'97 codec part that the Linux driver requires.
*Linux, all flavours
+
 
 +
==Unrelated models==
 +
* ThinkPad {{600}}, {{600D}}
 +
* ThinkPad {{770}}, {{770D}}, {{770E}}, {{770ED}}
 +
 
 +
According to one report, these models have only an ISA-based sound chip, namely a CS4237B.
 +
Just use the snd-cs4236 ALSA driver or cs4232 OSS driver for these models.
  
 
==Status==
 
==Status==
 
The PCI chip that you see in lspci (in my 770x case 4610) is the DSP half of the soundcard.  You also need a codec to do conversion between digital and analog, audio routing, etc.  The CS46xx driver expects to find an [http://www.intel.com/design/chipsets/audio/ AC'97-compatible] chip addressible through the PCI Cirrus logic chip to do these tasks.
 
The PCI chip that you see in lspci (in my 770x case 4610) is the DSP half of the soundcard.  You also need a codec to do conversion between digital and analog, audio routing, etc.  The CS46xx driver expects to find an [http://www.intel.com/design/chipsets/audio/ AC'97-compatible] chip addressible through the PCI Cirrus logic chip to do these tasks.
  
However, in the affected laptops there is no AC'97 chip.  Instead there is an older, ISA-based soundcard to do these tasks as well as providing legacy app support.  The cs46xx driver cannot find the AC'97 chip, nor can it support the ISA soundcard for codec duties, so closes finding no soundcards.  The current solution is to ignore this PCI chip and use sound though the legacy ISA chip only, either through the cs4236 or cs4232 driver.
+
However, in the affected laptops there is no AC'97 chip.  Instead the sound chip has an integrated ISA-based soundcard to do these tasks as well as providing legacy app support.  The cs46xx driver cannot find the AC'97 chip, nor can it support the ISA part for codec duties, so it dies with an error.  The current solution is to ignore the PCI part entirely and use sound though the legacy ISA part only, either through the ALSA snd-cs4236 or OSS cs4232 driver.
  
Alternatively, I have tried removing the dependency on the existence on a AC'97 codec in the cs46xx driver, theory being that it may be possible to use the cs4236 driver for the mixing functions.  This resulted in the driver loading and detecting all the resources of the cs4610, however interrupt issues seemed to be preventing it from outputting sound.
+
Alternatively, I have tried removing the dependency on the existence of an AC'97 codec in the cs46xx driver, theory being that it may be possible to use the cs4236 driver for the mixing functions.  This resulted in the driver loading and detecting all the resources of the cs4610, however interrupt issues seemed to be preventing it from outputting sound.
  
 
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]
  
Here's an older explanation of what happens:
+
Here's some more information about sound hardware in the 600 series:
 
+
The 600 series has not one, not two, but THREE chips that look like sound cards to Linux. The actual Crystal chip is one of them, the mwave is another, and the video chipset has a DSP that can be used as sound circuitry if a designer opted to do so.
The problem with the 600 series is that there is not one, not two, but THREE  
 
chips that look like sound cards to Linux. The actual Crystal chip is one of  
 
them, the mwave is another, and the video chipset has a DSP that can be used  
 
as sound circuitry if a designer opted to do so.
 
  
 
==Solutions==
 
==Solutions==
Line 43: Line 45:
  
 
===Solution #2===
 
===Solution #2===
Make sure that the bios quick boot feature is disabled.<br />
+
Make sure that the bios quick boot feature is disabled.
 
Add the following lines to one of your init process files, i.e, {{path|rc.local}}:
 
Add the following lines to one of your init process files, i.e, {{path|rc.local}}:
 
  modprobe sound
 
  modprobe sound

Revision as of 23:25, 14 February 2006

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

Problem description

Even though the sound chip is a Crystal SoundFusion 4610, you'll have to use the cs4236 driver to enable sound on this machine, since this driver supports the CS4239 emulation that the 4610 chip offers.

Affected Models

Unaffected 6xx/7xx Models

The ThinkPad 600X sports a newer CS4624 sound chip, which apparently has the AC'97 codec part that the Linux driver requires.

Unrelated models

According to one report, these models have only an ISA-based sound chip, namely a CS4237B. Just use the snd-cs4236 ALSA driver or cs4232 OSS driver for these models.

Status

The PCI chip that you see in lspci (in my 770x case 4610) is the DSP half of the soundcard. You also need a codec to do conversion between digital and analog, audio routing, etc. The CS46xx driver expects to find an AC'97-compatible chip addressible through the PCI Cirrus logic chip to do these tasks.

However, in the affected laptops there is no AC'97 chip. Instead the sound chip has an integrated ISA-based soundcard to do these tasks as well as providing legacy app support. The cs46xx driver cannot find the AC'97 chip, nor can it support the ISA part for codec duties, so it dies with an error. The current solution is to ignore the PCI part entirely and use sound though the legacy ISA part only, either through the ALSA snd-cs4236 or OSS cs4232 driver.

Alternatively, I have tried removing the dependency on the existence of an AC'97 codec in the cs46xx driver, theory being that it may be possible to use the cs4236 driver for the mixing functions. This resulted in the driver loading and detecting all the resources of the cs4610, however interrupt issues seemed to be preventing it from outputting sound.

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

Here's some more information about sound hardware in the 600 series: The 600 series has not one, not two, but THREE chips that look like sound cards to Linux. The actual Crystal chip is one of them, the mwave is another, and the video chipset has a DSP that can be used as sound circuitry if a designer opted to do so.

Solutions

Solution #1

Compile the sound driver as module and load it after everything else. You can create a boot script with the following line 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.9.

If the above line fails, quick boot is probably activated in the bios. In that case you need to manually activate the sound card:

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

This only works with a kernel that fully supports pnpacpi, and provided that this patch has been applied. It seems that the dma numbers change with pnpacpi (dma1=1, dma2=5 for instance).

Solution #2

Make sure that the bios quick boot feature is disabled. Add the following lines to one of your init process files, i.e, rc.local:

modprobe sound
insmod ad1848
insmod uart401
insmod cs4232 io=0x530 irq=5 dma=1 dma2=0

In case an insmod or modprobe of cs4232 fails with the following error appearing at the console, via dmesg, or in /var/log/messages, double-check you have quick boot disabled!

kernel: kobject_register failed for cs4232 (-17)
kernel:  [<c0190b16>] kobject_register+0x32/0x48
kernel:  [<c01d4bee>] bus_add_driver+0x3e/0x98
kernel:  [<c01d50ec>] driver_register+0x34/0x38
kernel:  [<c01adb90>] pnp_register_driver+0x28/0x5c
kernel:  [<cedfb483>] init_cs4232+0x33/0xec [cs4232]
kernel:  [<c01294eb>] sys_init_module+0xe3/0x1c4
kernel:  [<c01054b5>] sysenter_past_esp+0x52/0x71
modprobe: FATAL: Error inserting cs4232 (/lib/modules/2.6.9/kernel/sound/oss/cs4232.ko): No such device

Solution #3

If your module loads like it should, but audio loops or sounds choppy then reloading module should help:

# rmmod cs4232 && modprobe cs4232