Differences between revisions 15 and 16
Revision 15 as of 2010-10-12 07:38:36
Size: 7934
Editor: GeoffSimmons
Comment: Remove Etch references.
Revision 16 as of 2011-02-06 04:29:25
Size: 7938
Editor: GeoffSimmons
Comment: Display Squeeze procedure first, amend supported devices.
Deletions are marked like this. Additions are marked like this.
Line 19: Line 19:

=== Lenny ===

The snd-cs46xx module is not present in Debian 2.6.26 kernel images.

The snd-cs46xx module is included in Debian 2.6.32 kernel images, which are available for Lenny systems from [[Backports|Debian Backports]]. You also are required to supply one firmware file for device use.

 1. Install the DebianPkg:alsa-base, DebianPkg:alsa-utils and DebianPkg:build-essential packages: {{{
$ su
# aptitude update && aptitude install alsa-base alsa-utils build-essential
# exit
}}}
 1. Download [[http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=sound/pci/cs46xx/cs46xx_image.h;hb=HEAD|cs46xx_image.h]] from Linus' kernel tree: {{{
$ wget 'http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob_plain;f=sound/pci/cs46xx/cs46xx_image.h;hb=HEAD' -O cs46xx_image.h
}}}
 1. Download [[attachment:write_images.c|source code]] for a [[http://bugs.debian.org/464197#34|program to write out firmware]] from {{{cs46xx_image.h}}}: {{{
$ wget 'http://wiki.debian.org/snd-cs46xx?action=AttachFile&do=get&target=write_images.c' -O write_images.c
}}}
 1. Download a [[http://bugs.debian.org/464197#181|patch]] against {{{cs46xx_image.h}}}: {{{
$ wget 'http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=181;att=0;bug=464197' -O cs46xx_image.diff
}}}
 1. Apply the patch: {{{
$ patch -i cs46xx_image.diff
}}}
 1. Compile the {{{write_images}}} program: {{{
$ gcc -o write_images write_images.c
}}}
 1. Execute the program to write out firmware: {{{
$ ./write_images
}}}
 1. Install the firmware: {{{
$ su
# mkdir -p /usr/local/lib/firmware/cs46xx
# cp cs46xx/cs46xx-old.fw /usr/local/lib/firmware/cs46xx
}}}
 1. Add the [[Backports|Debian Backports]] repository to {{{/etc/apt/sources.list}}}. For example: {{{
# Backported packages for Debian Lenny
deb http://backports.debian.org/debian-backports lenny-backports main
}}}
 1. Update the list of available packages: {{{
# aptitude update
}}}
 1. Install a Linux 2.6.32 kernel image appropriate for your system. For example: {{{
# aptitude -t lenny-backports install linux-image-2.6-$(uname -r | sed 's,.*-,,')
}}}
 1. If not already performed, add your user account to the {{{audio}}} group: {{{
# adduser yourusername audio
}}}
 1. Restart your system and boot with the newly installed kernel.

 1. Run [[DebianMan:1/alsamixer|alsamixer(1)]] to unmute channels and raise the volume levels.

 1. Test the sound device, for example: {{{
$ aplay /usr/share/sounds/alsa/Noise.wav
$ speaker-test -t sine -f 440 -c 2
$ speaker-test -t wav -c 2
}}}
Line 125: Line 68:
=== Lenny ===

The snd-cs46xx module is not present in Debian 2.6.26 kernel images.

The snd-cs46xx module is included in Debian 2.6.32 kernel images, which are available for Lenny systems from [[Backports|Debian Backports]]. You also are required to supply one firmware file for device use.

 1. Install the DebianPkg:alsa-base, DebianPkg:alsa-utils and DebianPkg:build-essential packages: {{{
$ su
# aptitude update && aptitude install alsa-base alsa-utils build-essential
# exit
}}}
 1. Download [[http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=sound/pci/cs46xx/cs46xx_image.h;hb=HEAD|cs46xx_image.h]] from Linus' kernel tree: {{{
$ wget 'http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob_plain;f=sound/pci/cs46xx/cs46xx_image.h;hb=HEAD' -O cs46xx_image.h
}}}
 1. Download [[attachment:write_images.c|source code]] for a [[http://bugs.debian.org/464197#34|program to write out firmware]] from {{{cs46xx_image.h}}}: {{{
$ wget 'http://wiki.debian.org/snd-cs46xx?action=AttachFile&do=get&target=write_images.c' -O write_images.c
}}}
 1. Download a [[http://bugs.debian.org/464197#181|patch]] against {{{cs46xx_image.h}}}: {{{
$ wget 'http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=181;att=0;bug=464197' -O cs46xx_image.diff
}}}
 1. Apply the patch: {{{
$ patch -i cs46xx_image.diff
}}}
 1. Compile the {{{write_images}}} program: {{{
$ gcc -o write_images write_images.c
}}}
 1. Execute the program to write out firmware: {{{
$ ./write_images
}}}
 1. Install the firmware: {{{
$ su
# mkdir -p /usr/local/lib/firmware/cs46xx
# cp cs46xx/cs46xx-old.fw /usr/local/lib/firmware/cs46xx
}}}
 1. Add the [[Backports|Debian Backports]] repository to {{{/etc/apt/sources.list}}}. For example: {{{
# Backported packages for Debian Lenny/5.0
deb http://backports.debian.org/debian-backports lenny-backports main
}}}
 1. Update the list of available packages: {{{
# aptitude update
}}}
 1. Install a Linux 2.6.32 kernel image appropriate for your system. For example: {{{
# aptitude -t lenny-backports install linux-image-2.6-$(uname -r | sed 's,.*-,,')
}}}
 1. If not already performed, add your user account to the {{{audio}}} group: {{{
# adduser yourusername audio
}}}
 1. Restart your system and boot with the newly installed kernel.

 1. Run [[DebianMan:1/alsamixer|alsamixer(1)]] to unmute channels and raise the volume levels.

 1. Test the sound device, for example: {{{
$ aplay /usr/share/sounds/alsa/Noise.wav
$ speaker-test -t sine -f 440 -c 2
$ speaker-test -t wav -c 2
}}}
Line 145: Line 145:
The following list is based on the ''alias'' fields of {{{modinfo snd-cs46xx}}} in Debian 2.6.32 (2.6.32-23) kernel images. The following list is based on the ''alias'' fields of {{{modinfo snd-cs46xx}}} in Debian 2.6.32 (2.6.32-30) kernel images.

Translation(s): none


Cirrus Logic Sound Fusion CS4280, CS461x, CS462x, CS463x devices

This page describes how to enable support for sound devices based on CS46xx chipsets on Debian systems.

snd-cs46xx is a Linux kernel module supporting Cirrus Logic's Sound Fusion CS46xx audio controllers. It is an ALSA driver provided in Linux 2.6 mainline kernels.

In linux-2.6 2.6.23-1, the binary-only firmware in this driver was removed (see the package changelog), due to discovered firmware licensing issues. The driver was disabled at this time. Firmware was also removed from the alsa-source package to resolve bug 483918.

In linux-2.6 2.6.31-1~experimental.1, the snd-cs46xx driver was re-enabled and patched to use firmware from userspace (resolving Debian bug 464197).

Device firmware is unable to be distributed by the Debian project, as the snd-cs46xx driver has no license.1 A free redistribution license has been requested from Cirrus Logic.2

Installation

Squeeze

The snd-cs46xx module is included in Debian 2.6.32 kernel images. You are required to supply one firmware file for device use.

  1. Install the alsa-base, alsa-utils and build-essential packages:

    $ su
    # aptitude update && aptitude install alsa-base alsa-utils build-essential
    # exit
  2. Download cs46xx_image.h from Linus' kernel tree:

    $ wget 'http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob_plain;f=sound/pci/cs46xx/cs46xx_image.h;hb=HEAD' -O cs46xx_image.h
  3. Download source code for a program to write out firmware from cs46xx_image.h:

    $ wget 'http://wiki.debian.org/snd-cs46xx?action=AttachFile&do=get&target=write_images.c' -O write_images.c
  4. Download a patch against cs46xx_image.h:

    $ wget 'http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=181;att=0;bug=464197' -O cs46xx_image.diff
  5. Apply the patch:

    $ patch -i cs46xx_image.diff
  6. Compile the write_images program:

    $ gcc -o write_images write_images.c
  7. Execute the program to write out firmware:

    $ ./write_images
  8. Install the firmware:

    $ su
    # mkdir -p /usr/local/lib/firmware/cs46xx
    # cp cs46xx/cs46xx-old.fw /usr/local/lib/firmware/cs46xx
  9. Reload the snd-cs46xx module:

    # modprobe -r snd-cs46xx ; modprobe snd-cs46xx
  10. If not already performed, add your user account to the audio group, then log out and log back into your system:

    # adduser yourusername audio
    # exit
    $ exit
  11. Run alsamixer(1) to unmute channels and raise the volume levels.

  12. Test the sound device, for example:

    $ aplay /usr/share/sounds/alsa/Noise.wav
    $ speaker-test -t sine -f 440 -c 2
    $ speaker-test -t wav -c 2

Lenny

The snd-cs46xx module is not present in Debian 2.6.26 kernel images.

The snd-cs46xx module is included in Debian 2.6.32 kernel images, which are available for Lenny systems from Debian Backports. You also are required to supply one firmware file for device use.

  1. Install the alsa-base, alsa-utils and build-essential packages:

    $ su
    # aptitude update && aptitude install alsa-base alsa-utils build-essential
    # exit
  2. Download cs46xx_image.h from Linus' kernel tree:

    $ wget 'http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob_plain;f=sound/pci/cs46xx/cs46xx_image.h;hb=HEAD' -O cs46xx_image.h
  3. Download source code for a program to write out firmware from cs46xx_image.h:

    $ wget 'http://wiki.debian.org/snd-cs46xx?action=AttachFile&do=get&target=write_images.c' -O write_images.c
  4. Download a patch against cs46xx_image.h:

    $ wget 'http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=181;att=0;bug=464197' -O cs46xx_image.diff
  5. Apply the patch:

    $ patch -i cs46xx_image.diff
  6. Compile the write_images program:

    $ gcc -o write_images write_images.c
  7. Execute the program to write out firmware:

    $ ./write_images
  8. Install the firmware:

    $ su
    # mkdir -p /usr/local/lib/firmware/cs46xx
    # cp cs46xx/cs46xx-old.fw /usr/local/lib/firmware/cs46xx
  9. Add the Debian Backports repository to /etc/apt/sources.list. For example:

    # Backported packages for Debian Lenny/5.0
    deb http://backports.debian.org/debian-backports lenny-backports main
  10. Update the list of available packages:

    # aptitude update
  11. Install a Linux 2.6.32 kernel image appropriate for your system. For example:

    # aptitude -t lenny-backports install linux-image-2.6-$(uname -r | sed 's,.*-,,')
  12. If not already performed, add your user account to the audio group:

    # adduser yourusername audio
  13. Restart your system and boot with the newly installed kernel.
  14. Run alsamixer(1) to unmute channels and raise the volume levels.

  15. Test the sound device, for example:

    $ aplay /usr/share/sounds/alsa/Noise.wav
    $ speaker-test -t sine -f 440 -c 2
    $ speaker-test -t wav -c 2

Troubleshooting

  • Examine the kernel ring buffer (dmesg(1)) to verify firmware is being loaded.

    • If output similar to the following is shown:

      [16576.681738] Sound Fusion CS46xx 0000:00:06.0: found PCI INT A -> IRQ 11
      [16576.681774] Sound Fusion CS46xx 0000:00:06.0: sharing IRQ 11 with 0000:00:02.0
      [16576.681827] Sound Fusion CS46xx 0000:00:06.0: sharing IRQ 11 with 0000:01:00.0
      [16577.224760] Sound Fusion CS46xx 0000:00:06.0: firmware: requesting cs46xx/cs46xx-old.fw
      [16577.403887] cs46xx: firmware hunk out of range
      [16577.406087] image download error
      [16577.412213] Sound Fusion CS46xx: probe of 0000:00:06.0 failed with error

      The firmware is not in the correct format.

      • Ensure the patch for cs46xx_image.h is applied prior to compiling write_images.c.

      • Ensure write_images is executed on a system where unsigned long is little-endian 32-bit.

Supported Devices

The page HowToIdentifyADevice/PCI explains how to identify a PCI device.

The following list is based on the alias fields of modinfo snd-cs46xx in Debian 2.6.32 (2.6.32-30) kernel images.

  • PCI: 1013:6001 Cirrus Logic CS 4610/11 [CrystalClear SoundFusion Audio Accelerator]
    PCI: 1013:6003 Cirrus Logic CS 4614/22/24/30 [CrystalClear SoundFusion Audio Accelerator]
    PCI: 1013:6004 Cirrus Logic CS 4614/22/24 [CrystalClear SoundFusion Audio Accelerator]

See Also


CategoryHardware | CategorySound