Difference between revisions of "CS4299"

From ThinkWiki
Jump to: navigation, search
(remove ancient OSS driver reference)
Line 14: Line 14:
 
|}
 
|}
  
=== Linux OSS driver ===
+
 
This sound chip is supported by the i810_audio kernel module.
 
  
 
=== Linux ALSA driver ===
 
=== Linux ALSA driver ===

Revision as of 22:53, 18 March 2009

CS4299

This is a Cirrus Logic AC'97 Audio controller

This chip is sometimes incorrectly called CS4229 in IBM documentation

Features

  • Chipset: CS4299
  • Interface: AC'97 2.1


Linux ALSA driver

This sound chip is supported by the snd-intel8x0 kernel module.

T23 Fast Sound

On at least one t23 (mine) the ALSA intel8x0 driver plays sound too fast. The following /etc/asound.conf restores normal operation:

  pcm.intel8x0-hw {
  type hw
  card 0
  }
  
  pcm.!default {
  type plug
  slave.pcm "intel8x0"
  }
  
  pcm.intel8x0 {
  type dmix
  ipc_key 1234
  slave {
  pcm "hw:0,0"
  period_time 0
  period_size 512
  buffer_size 4096
  rate 44100
  }
  }
  
  ctl.intel8x0-hw {
  type hw
  card 0
  }


Dmixing

The CS4299 is not capable of hardware mixing. This means that only one sound stream can be played at any time. You must get the software to do the mixing for it (this will load your CPU). The ALSA implementation of this is called DMIX. You can also run sound servers like ESD or ArtsD, but not all applications will use them. Recent ALSA distributions have dmixing setup and enabled by default.

Otherwise just add the following to /etc/asound.conf :

  pcm.dsp0 {
      type plug
      slave.pcm dmix
  }
  # mixer0 can stay unchanged, because
  # it isn't used anyway, I guess ;)
  ctl.mixer0 {
      type hw
      card 0
  }

Now the only problem is how to tell applications to use the DMIX channel instead of dsp0. Most applications work by specifying "dmix" as the device. For command line apps use "aoss".

Hint: XMMS does not work well with dmix and the intel8x0. You will probably need to patch and recompile.

See: XMMS bug 1716, XMMS bug 2009 and XMMS bug 1991

You also need to disable mmap and increase the buffer and period time in the advanced options.

No sound after suspending to RAM

Fortunately it is not necessary to remove and reinsert the snd-intel8x0 module. Simply mute and unmute all the mixer controls using alsamixer or amixer. You might want to create the following script and run it after your suspend commands:

#!/bin/bash
mixers="Master PCM CD"
for mixer in $mixers ; do
  amixer sset $mixer mute
  amixer sset $mixer unmute
done

Other mixers you might want to add are Line (Line in on the laptop) and Aux (Line in on the docking station). Note that the case of the mixer names is important ("Master" not "master").

ThinkPads this chip may be found in