Difference between revisions of "CS4299"

From ThinkWiki
Jump to: navigation, search
(switched categorization)
 
(14 intermediate revisions by 6 users not shown)
Line 4: Line 4:
 
<div style="margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;">
 
<div style="margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;">
 
=== CS4299 ===
 
=== CS4299 ===
This is a Cirrus Logic AC'97 Audio controller
+
This is a Cirrus Logic AC'97 Audio codec
  
 
This chip is sometimes incorrectly called CS4229 in IBM documentation
 
This chip is sometimes incorrectly called CS4229 in IBM documentation
 +
 
=== Features ===
 
=== Features ===
 
* Chipset: CS4299
 
* Chipset: CS4299
 
* Interface: AC'97 2.1
 
* Interface: AC'97 2.1
 +
</div>
 +
|style="vertical-align:top" |
 +
|}
 +
=== Linux ALSA driver ===
 +
This sound chip is supported by the snd-intel8x0 kernel module.
  
=== Other Information ===
+
=== T23 Fast Sound ===
This soundcard is cheap pile of absolute rubbish. The sound quality is poor. Worst of all, it is incapable of playing multiple PCM streams or hardware mixing. To get around this, you need to set up dmix in ALSA. This may sound simple, but it is not; there is very little documentation on the subject and there can be a multitude of other problems to overcome. Also, you will need to manually configure every application to use dmix, and all OSS-only applications will have to have their commands aliased (or similar) so that they use the aoss compatibility wrapper. If anyone can provide more information on the configuration of all this then please add it.
+
On at least one t23 (mine) the ALSA intel8x0 driver plays sound too fast. The following {{path|/etc/asound.conf}} restores normal operation: 
Sorry about the bad news to any who owns a ThinkPad with one of these cards.
 
If you are considering buying a ThinkPad with one of these then please take this into account when making your decision. I upgraded from a T20 to a T23 because of the T23's 16Mb graphics card and the dual USB ports. Had I known about this I wouldn't have bothered- the T20's sound card was excellent. If you are considering getting a T2x series ThinkPad it would probably be better to sacrifice the better graphics and the dual USB ports in favour of a decent sound card.
 
  
==== Dmixing CS4299 ====
+
  pcm.intel8x0-hw {
For me it worked out of the box adding this to {{path|/etc/asound.conf}} :
+
  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 {{path|/etc/asound.conf}} :
 
   pcm.dsp0 {
 
   pcm.dsp0 {
 
       type plug
 
       type plug
Line 29: Line 66:
 
   }
 
   }
  
 +
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: [http://bugs.xmms.org/show_bug.cgi?id=1716 XMMS bug 1716], [http://bugs.xmms.org/show_bug.cgi?id=2009 XMMS bug 2009] and [http://bugs.xmms.org/show_bug.cgi?id=1991 XMMS bug 1991]
  
</div>
+
You also need to disable mmap and increase the buffer and period time in the advanced options.
|style="vertical-align:top" |
 
|}
 
  
=== Linux OSS driver ===
+
=== No sound after suspending to RAM ===
This sound chip is supported by the i810_audio kernel module.
+
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
  
=== Linux ALSA driver ===
+
Other mixers you might want to add are Line (Line in on the laptop) and Aux (Line in on the docking station).
This sound chip is supported by the snd-intel8x0 kernel module.
+
Note that the case of the mixer names is important ("Master" not "master").
  
=== ThinkPad's this chip may be found in ===
+
=== ThinkPads this chip may be found in ===
 
* {{A21e}}, {{A22e}}
 
* {{A21e}}, {{A22e}}
 
* {{A30}}, {{A30p}}
 
* {{A30}}, {{A30p}}
Line 48: Line 94:
 
* {{i1300}}, {{i1330}}, {{i1370}}
 
* {{i1300}}, {{i1330}}, {{i1370}}
  
[[Category:Components]]
+
[[Category:Audio Devices]]

Latest revision as of 14:20, 15 November 2020

CS4299

This is a Cirrus Logic AC'97 Audio codec

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