<- Other hacks
linux es1373 sound driver

Get digital S/PDIF sound from your cheap soundcard

The Ensoniq es1373 sound chip found in most low-cost PCI sound cards from Creative Labs (mine is a soundblaster PCI 128) is supported in linux through the es1371 driver. One improvement found in this chip over the original es1371 is the presence of a digital spdif output that allows you to connect your PC to a digital receiver (like most "home theatre" stereo systems) and get rid of all noise that your PC environment might generate. This is not documented on any Creative board and is not obvious since the digital output is multiplexed with the analog output on the "line out" plug.

There are two ways to find out if your soundblaster has a digital output: Either look at the chip itself or check how the card is identified by the PCI protocol (in /proc/pci). If the chip reads "es1371", you're out of luck. If it reads "es1373", it's the good one. If the chip reads anything else (like CT5880), it might be a relooked 1373 because Creative bought Ensoniq recently, so they now use their "very own" sound chips that are nothing more than es1373 with a different name. In /proc/pci, you'll now you have an spdif output if you have a card labeled "Ensoniq ES1371" with a revision of 4 or higher.

The driver found in 2.2 kernels can activate the digital output of the card but it has several problems: First, there is no way to control the volume of the digital output. Second, because both analog and digital signals go through the same output plug, you need to deactivate analog audio before using digital mode if you want your receiver to get a clear digital signal.

Thoses two problems are addressed by this patch. It has been included into the es1371 driver found in 2.4 kernels, but not earlier stable kernels. You can get the patch for kernel 2.2.18 here.

When you load the module, there are two options you can use to control digital output:

  • By setting spdif to 1, you activate the digital output and deactivate the analog. From this point on, you can connect your card to the spdif input of you receiver using an RCA cable and a jack adapter to plug into your line output (only one channel is used). The "master" volume control does nothing and the "pcm" volume control will drive the digital output.
  • By default, the es1373 mixes the sampled input signal (from the A/D converter) back to the spdif output. It can be a high source of noise, so it can be deactivated by setting the nomix option to 1.

Update 2001/3/13: I just bought a new SB PCI 128 with a CT5880 chip. It has revision ID 2 and the 2.4.0 es1371 driver assumes that it doesn't have the S/PDIF out ability, but it does! I have sent a mail to the maintainer of the driver about this but I got no answer. So before a patched version is out, if you want the S/PDIF output to be activated with a CT5880, all you have to do is to modify the driver so that it activates the digital output regardless of the version ID. If you need help in doing so, just ask me.

Update 2001/5/7: For those interested in fiddling with the chip, here are the necessary white papers from Ensoniq: as gzipped postscript or as a Word document.

Update 2001/5/9: I've had reports that the Creative card sold as "Sound Blaster 64" is based on an es1373 chip, but that the spdif output doesn't work. It might be that the layout of the card doesn't take the spdif output of the chip into account and doesn't multiplex it to the analog output jack.

Update 2003/3/24: I've had several people asking me about using the es1373 to output AC3 (also known as Dolby Digital, usually found on video DVDs). For now, this does *not* work with the kernel driver, and I don't think it works with the ALSA driver either. I've worked on it for quite some time and I've made progresses, but I didn't get it to work and now, the project is on stall. I'll get back to it eventually, but if anyone is interested in picking it up, I'll be glad to provide all my findings so far.

© 2000-2014 Mikael Bouillot (last updated 2003-03-24)