Differences between revisions 1 and 28 (spanning 27 versions)
Revision 1 as of 2009-02-09 17:55:24
Size: 5261
Editor: GeoffSimmons
Comment: Initial revision.
Revision 28 as of 2015-03-06 20:33:00
Size: 6865
Editor: GeoffSimmons
Comment: Update driver history (DSP blob actually moved out at 3.14), add Jessie procedure.
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
||<tablestyle="width: 100%;" style="border: 0px hidden">~-[:DebianWiki/EditorGuide#translation:Translation(s)]: none-~||<style="text-align: right;border: 0px hidden"> (!) [:/Discussion:Discussion]|| ~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: [[fr/snd-cs46xx|Français]] - [[it/snd-cs46xx|Italiano]]-~
Line 6: Line 6:
This page describes the state of support for sound devices based on CS46xx chipsets on Debian systems. This page describes how to enable support for sound devices based on CS46xx chipsets on Debian systems.
Line 8: Line 8:
[[TableOfContents(3)]] <<TableOfContents(3)>>
Line 10: Line 10:
snd-cs46xx is a kernel module supporting Cirrus Logic's Sound Fusion CS46xx audio controllers. It is an ["ALSA"] driver provided in Linux 2.6 mainline kernels. snd-cs46xx is a Linux kernel module supporting Cirrus Logic's Sound Fusion CS46xx audio controllers. It is an [[ALSA]] driver included in the Linux kernel.
Line 12: Line 12:
In [wiki:DebPkg:src:linux-2.6 linux-2.6] 2.6.23-1, the binary-only firmware in this driver was removed (see the [http://packages.debian.org/changelogs/pool/main/l/linux-2.6/linux-2.6_2.6.26-13/changelog#versionversion2.6.23-1 package changelog]), due to discovered [:KernelFirmwareLicensing:firmware licensing issues]. The driver was disabled at this time. Firmware was also removed from the DebPkg:alsa-source package to resolve bug Bug:483918. At [[DebianPkg:src:linux-2.6|linux-2.6]] 2.6.23-1, the binary-only firmware in this driver was removed due to [[KernelFirmwareLicensing|licensing issues]]. The driver was disabled at this time. Firmware was also removed from the DebianPkg:alsa-source package to resolve bug DebianBug:483918.
Line 14: Line 14:
The firmware is unable to be distributed by the Debian project, as the snd-cs46xx driver has no license[[FootNote([http://bugzilla.kernel.org/show_bug.cgi?id=10750 CS46xx sound driver carries no license] - Kernel Bug Tracker Bug 10750)]]. A free redistribution license has been requested from Cirrus Logic[[FootNote([wiki:Self:KernelFirmwareLicensing#head-3565057df6494cdf78b26fb1f0875d032b54c167 cs46xx_image.h (sound/pci/cs46xx)] - ["KernelFirmwareLicensing"])]]. At [[DebianPkg:src:linux2.6|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 DebianBug:464197).

At Linux 3.14, the binary-only firmware was [[https://git.kernel.org/linus/ad233a5f0f33a894f48c7d968ec207f46cbcae03|moved out of the kernel tree]], with the driver modified to load this externally. Device firmware is part of ALSA releases since version 1.0.28.<<FootNote([[http://www.alsa-project.org/main/index.php/Changes_v1.0.27.2_v1.0.28#alsa-firmware|ALSA project: Changelog between 1.0.27 and 1.0.28 releases]])>>

Device firmware is unable to be distributed by the Debian project, as the snd-cs46xx driver has no license.<<FootNote([[https://bugzilla.kernel.org/show_bug.cgi?id=10750|CS46xx sound driver carries no license]] - Kernel Bug Tracker Bug 10750)>> A free redistribution license has been requested from Cirrus Logic.<<FootNote([[KernelFirmwareLicensing#cs46xx_image.h_.28sound.2Fpci.2Fcs46xx.29|cs46xx_image.h (sound/pci/cs46xx)]] - [[KernelFirmwareLicensing]])>>
Line 17: Line 21:
<<Anchor(squeeze)>>
<<Anchor(wheezy)>>
=== Debian 7 "Wheezy", Debian 6.0 "Squeeze" ===
Line 18: Line 25:
=== Lenny === You are required to supply one firmware file for device use.
Line 20: Line 27:
The snd-cs46xx module is not present within 2.6.26 Debian kernel images. See Debian bug Bug:464197 and ["KernelFirmwareLicensing"].

=== Etch ===

==== 2.6.18 kernel ====

The snd-cs46xx module is included within 2.6.18 Debian kernel images.

==== 2.6.24 kernel ====
## this won't build on 2.6.25 and later kernels due to Debian bug #490710
## also, alsa-source 1.0.13-5etch1 won't build on 2.6.24
The following procedure can be used to provide the snd-cs46xx module, using an DebPkg:alsa-source package generated from a deprecated [wiki:DebPkg:src:alsa-driver alsa-driver] version.

 1. Install the DebPkg:build-essential, DebPkg:debconf-utils, DebPkg:devscripts, DebPkg:fakeroot, relevant linux-headers and DebPkg:module-assistant packages: {{{
 1. Install the DebianPkg:alsa-base, DebianPkg:alsa-utils and DebianPkg:build-essential packages: {{{
Line 35: Line 29:
# aptitude update
#
aptitude install build-essential debconf-utils devscripts fakeroot linux-headers-$(uname -r) module-assistant
# aptitude update && aptitude install alsa-base alsa-utils build-essential
#
exit
Line 38: Line 32:
 1. Add the [:Backports:Debian Backports] repository to {{{/etc/apt/sources.list}}}, for example: {{{
# Backported packages for Debian Etch
deb http://www.backports.org/debian etch-backports main
 1. Download [[https://github.com/torvalds/linux/blob/v3.2/sound/pci/cs46xx/cs46xx_image.h|cs46xx_image.h]] from Linus' kernel tree: {{{
$ wget https://raw.github.com/torvalds/linux/v3.2/sound/pci/cs46xx/cs46xx_image.h
Line 42: Line 35:
 1. Update the list of available packages and install the DebPkg:etch-backports/debian-backports-keyring package: {{{
# aptitude update
# aptitude -t etch-backports install debian-backports-keyring
 1. Download [[attachment:write_images.c|source code]] for a [[https://bugs.debian.org/464197#34|program to write out firmware]] from {{{cs46xx_image.h}}}: {{{
$ wget 'https://wiki.debian.org/snd-cs46xx?action=AttachFile&do=get&target=write_images.c' -O write_images.c
Line 46: Line 38:
 As your system does not yet have the GnuPG archive key of the backports.org repository installed, you will be asked to confirm installation of a package from an untrusted repository. Enter {{{Yes}}} when prompted.

 1. Install the DebPkg:etch-backports/debhelper and DebPkg:etch-backports/quilt packages: {{{
# aptitude -t etch-backports install debhelper quilt
$ exit
 1. Download a [[https://bugs.debian.org/464197#181|patch]] against {{{cs46xx_image.h}}}: {{{
$ wget 'https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=181;att=0;bug=464197' -O cs46xx_image.diff
Line 52: Line 41:
 1. Acquire a deprecated [wiki:DebPkg:src:alsa-driver alsa-driver] source package: {{{
$ dget -x http://snapshot.debian.net/archive/2008/04/07/debian/pool/main/a/alsa-driver/alsa-driver_1.0.16-1.1.dsc
 1. Apply the patch: {{{
$ patch -i cs46xx_image.diff
Line 55: Line 44:
 1. Build the binary packages: {{{
$ cd alsa-driver-1.0.16
$ dpkg-buildpackage -b -uc -rfakeroot
 1. Compile the {{{write_images}}} program: {{{
$ gcc -o write_images write_images.c
Line 59: Line 47:
 1. Install the alsa-source package: {{{
$ cd ..
 1. Execute the program to write out firmware: {{{
$ ./write_images
}}}
 1. Install the firmware: {{{
Line 62: Line 52:
# dpkg -i ./alsa-source*deb
$ exit
# mkdir /lib/firmware/cs46xx
# cp cs46xx/cs46xx-old.fw /lib/firmware/cs46xx
Line 65: Line 55:
 1. Build an alsa-modules-* package for your system: {{{
$ m-a -u /tmp build alsa
}}}
 1. Install the alsa-modules-* package: {{{
$ su
# dpkg -i /tmp/alsa-modules*deb
}}}
 1. If not already performed, install the DebPkg:alsa-base and DebPkg:alsa-utils packages: {{{
# aptitude install alsa-base alsa-utils
}}}
 1. Reload the ALSA modules and load the snd-cs46xx module: {{{
# invoke-rc.d alsa reload
# modprobe snd-cs46xx
 1. Reload the snd-cs46xx module: {{{
# modprobe -r snd-cs46xx ; modprobe snd-cs46xx
Line 84: Line 63:
 1. Run [http://manpages.debian.net/man/1/alsamixer alsamixer], unmute channels and raise sound levels: {{{
$ alsamixer
}}}

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

 1. Test the sound device, for example: {{{
Line 89: Line 67:
$ speaker-test -t sine -f 440 -c 2
$ speaker-test -t wav -c 2
Line 91: Line 71:
==== Troubleshooting ====

 * Examine the kernel ring buffer ([[DebianMan:1/dmesg|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.

<<Anchor(jessie)>>
=== Debian 8 "Jessie" ===

You are required to supply several firmware files for device use, which can be acquired from the [[http://www.alsa-project.org|ALSA project]].

 1. Install the DebianPkg:alsa-utils package: {{{
$ su
# aptitude update && aptitude install alsa-utils
# exit
}}}
 1. Acquire an alsa-firmware tarball (≥ v1.0.28) from the ALSA project's server, for example: {{{
$ wget ftp://ftp.alsa-project.org/pub/firmware/alsa-firmware-1.0.28.tar.bz2
}}}
 1. Extract the tarball, for example: {{{
$ tar xvf alsa-firmware-1.0.28.tar.bz2
}}}
 1. Install the firmware to your system, for example: {{{
$ cd alsa-firmware-1.0.28/cs46xx
$ su
# mkdir /lib/firmware/cs46xx
# cp ba1 cwc4630 cwcasync cwcbinhack cwcdma cwcsnoop /lib/firmware/cs46xx
}}}
 1. Reload the snd-cs46xx module: {{{
# modprobe -r snd-cs46xx ; modprobe snd-cs46xx
}}}
 1. 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
}}}
 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 93: Line 125:
The page ["HowToIdentifyADevice/PCI"] explains how to identify a PCI device. The page [[HowToIdentifyADevice/PCI]] explains how to identify a PCI device.
Line 95: Line 127:
The following list is based on the ''alias'' fields of {{{modinfo snd-cs46xx}}} on Etch. The following list is based on the ''alias'' fields of {{{modinfo snd-cs46xx}}} in Debian 3.2.0 (3.2.65-1+deb7u2) kernel images.
Line 99: Line 131:
PCI: 1013:6003 Cirrus Logic CS 4614/22/24 [CrystalClear SoundFusion Audio Accelerator] PCI: 1013:6003 Cirrus Logic CS 4614/22/24/30 [CrystalClear SoundFusion Audio Accelerator]
Line 104: Line 136:
 * ["ALSA"]
 * Debian bug reports: Bug:464197, Bug:483918
 *
["KernelFirmwareLicensing"]
 * [[ALSA]]
 * [[KernelFirmwareLicensing]]

Translation(s): Français - Italiano


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 included in the Linux kernel.

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

At 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).

At Linux 3.14, the binary-only firmware was moved out of the kernel tree, with the driver modified to load this externally. Device firmware is part of ALSA releases since version 1.0.28.1

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

Installation

Debian 7 "Wheezy", Debian 6.0 "Squeeze"

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 https://raw.github.com/torvalds/linux/v3.2/sound/pci/cs46xx/cs46xx_image.h
  3. Download source code for a program to write out firmware from cs46xx_image.h:

    $ wget 'https://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 'https://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 /lib/firmware/cs46xx
    # cp cs46xx/cs46xx-old.fw /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

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.

Debian 8 "Jessie"

You are required to supply several firmware files for device use, which can be acquired from the ALSA project.

  1. Install the alsa-utils package:

    $ su
    # aptitude update && aptitude install alsa-utils
    # exit
  2. Acquire an alsa-firmware tarball (≥ v1.0.28) from the ALSA project's server, for example:

    $ wget ftp://ftp.alsa-project.org/pub/firmware/alsa-firmware-1.0.28.tar.bz2
  3. Extract the tarball, for example:

    $ tar xvf alsa-firmware-1.0.28.tar.bz2
  4. Install the firmware to your system, for example:

    $ cd alsa-firmware-1.0.28/cs46xx
    $ su
    # mkdir /lib/firmware/cs46xx
    # cp ba1 cwc4630 cwcasync cwcbinhack cwcdma cwcsnoop /lib/firmware/cs46xx
  5. Reload the snd-cs46xx module:

    # modprobe -r snd-cs46xx ; modprobe snd-cs46xx
  6. 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
  7. Run alsamixer(1) to unmute channels and raise the volume levels.

  8. 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

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 3.2.0 (3.2.65-1+deb7u2) 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