Linux, sound, and the Asus A8N-E motherboard

These Notes

These notes are in reverse chronological order. In other words I add new materail to the start of this guide, and old material gets pushed towards the bottom.

As an aside, I just had a novel experience, namely that linux sound just worked! This was not on the Asus A8N-E however, but it was an amazing and novel experience to have sound actually work on a linux system, what I did on this system was:

locate *.au
play drip.au

Current Status

The present state of the on-the-motherboard sound on my Asus A8N-E motherboard as of November, 2008 is that it does not work. I do need to try this once again now that I have Fedora 11 on my machine.

So, if you are reading this hoping to find out how to make your system work, sorry. (but keep checking back).

A linux user (running ubuntu) seems to have his ASUS A8N-E sound working, but just is not satisfied about getting the full 7.1 audio thing happening. This is promising.

Here is a link to the manual for the A8N-E. (4 megabytes, 120 pages), which is happens to be the hardware in my machine cholla at this time.

The ASUS A8N-E sound hardware

The A8N-E motherboard is an AMD socket 939 board, which in my case hosts a dual core Athlon processor.

The heart of this motherboard is the Nvidia nForce 4 Ultra chipset. In particular the Nvidia CK804 is a high integration chip with USB controllers, ATA controllers, SATA controllers, PCI bridges, ethernet controllers, a bridge to the PCI Express video system, legacy ISA devices, a memory controller, and a partridge in a pear tree.

Trying to learn about the Nvidia CK804 leads to multiple sources of confusion. Some documentation indicates that the CK804 includes on-board gigabit ethernet, yet there is an outboard Marvell 88E1115 gigabit LAN chip. Documentation also indicates that the Nvidia chip includes sound (in particular an AC97 style sound facility), yet the motherboard includes the Realtek ALC850 sound chip. (It says it does anyway, I have yet to actually lay eyes on it). My guess is that access to the realtek sound chip is done through the CK804 in some fashion, namely the CK804 provides the PCI bus interface to the sound hardware.

First and foremost (for my purposes at present), there is the Realtek ALC850 8 channel codec, which is described as "AC97 2.3 compatible" (presumably that is a good thing). The Realtek site describes the ALC850 as an AC'97 Rev 2.3 Audio Codec with 2 16 bit stereo channel DAC's (4 channels in all) and a stereo 16 bit ADC, that can run at 48 kHz. Here is a link to the whole datasheet (56 pages).

The lspci command on this system yields:

00:00.0 Memory controller: nVidia Corporation CK804 Memory Controller (rev a3)
00:01.0 ISA bridge: nVidia Corporation CK804 ISA Bridge (rev a3)
00:01.1 SMBus: nVidia Corporation CK804 SMBus (rev a2)
00:02.0 USB Controller: nVidia Corporation CK804 USB Controller (rev a2)
00:02.1 USB Controller: nVidia Corporation CK804 USB Controller (rev a3)
00:04.0 Multimedia audio controller: nVidia Corporation CK804 AC'97 Audio Controller (rev a2)
00:06.0 IDE interface: nVidia Corporation CK804 IDE (rev f2)
00:07.0 IDE interface: nVidia Corporation CK804 Serial ATA Controller (rev f3)
00:08.0 IDE interface: nVidia Corporation CK804 Serial ATA Controller (rev f3)
00:09.0 PCI bridge: nVidia Corporation CK804 PCI Bridge (rev a2)
00:0a.0 Bridge: nVidia Corporation CK804 Ethernet Controller (rev a3)
00:0b.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)
00:0c.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)
00:0d.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)
00:0e.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)
00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
01:00.0 VGA compatible controller: nVidia Corporation NV42 [GeForce 6800 XT] (rev a2)

Notice that neither the Realtek ALC850 nor the Marvell 88E1115 show up in this list, so apparently they are both accessed through the CK804.

The lspci -vv command on this system yields the following for the sound subsystem:

00:04.0 Multimedia audio controller: nVidia Corporation CK804 AC'97 Audio Controller (rev a2)
	Subsystem: ASUSTeK Computer Inc. K8N4-E or A8N-E Mainboard
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- SERR- 
	Kernel driver in use: Intel ICH
	Kernel modules: snd-intel8x0

The aplay -l command on this system yields:

**** List of PLAYBACK Hardware Devices ****
card 1: CK804 [NVidia CK804], device 0: Intel ICH [NVidia CK804]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: CK804 [NVidia CK804], device 2: Intel ICH - IEC958 [NVidia CK804 - IEC958]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
So the single PCI sound device presents itself as two sound subsystems.

Just to add to the confusion, there is also a digital output device that gets identified as a "IEC958 device" (and gets assigned the MPU401 driver?). This could be part of the CK804, or part of the ALC850 (but I don't think so), or a third piece of silicon.
Whatever the case, this is what drives the SPDIF connectors (at 96 kHz?) SPDIF by the way stands for Sony/Philips Digital Interface Format.

Care has to be taken that the motherboard is set up properly to deliver center channel sound to the back panel line-out jack (lime green). There is a connector on the motherboard, right behind the back panel audio connectors. If you want front panel sound, you can remove any jumpers from this header, and plug a cable into it that routes the signals to the case front panel (which would be nice for headphone use). If this is done, there will be no signal present on the lime green back panel line-out. You need to have two jumpers installed on this header if you want back panel output (see the manual, my machine has the jumpers installed).
The photo below shows my motherboard with the two jumpers (on the left) installed. The big chip is the outboard Marvell gigabit LAN chip.

Just for the record, the six sound connectors on the back are like so, when viewed from the back with the motherboard down:

	1  4
	2  5
	3  6
--------------------- motherboard

1 = grey, rear speaker
2 = black, side speakers
3 = yellow, center/subwoofer
4 = blue, line in
5 = lime green, line out
6 = pink, microphone in

The left photo above shows my machine with a cable plugged into the pink line-out connector. The photo on the right is the back panel from the A8N-SLI, which is a little different, but does have the sound connections in just the same places. The six colored sound connectors on the right are what are diagramed above. The yellow RCA jack near the keyboard connector is the copper SPDIF connector, with the greyish rectangle just to the right of that being the fiber SPDIF "jack" This SPDIF hardware could be good for some nice things (at 96 kHz), if the software will ever cooperate.

November, 2008 with Fedora Core 9

It is late November of 2008. I am running Fedora Core 9 on my machine. Fedora Core 10 coming is scheduled for release in less than two weeks.

The system-config-soundcard utility that I have used with indifferent success is gone now. Here are some words from the FC9 release notes:

The system-config-soundcard utility has been removed, due to numerous legacy design and implementation issues. Modern technologies, including udev and the HAL, have made certain sound cards work out of the box. Any sound card not working out of the box should be reported as a bug. Preferences can still be fine-tuned within the desktop environment, using, among others, the PulseAudio tools.
Apparently (among other things) it would sometimes do bad thing to /etc/modprobe.conf.

The command lsmod | grep snd yields the following:

Module                  Size  Used by
snd_usb_audio         100352  0 
snd_usb_lib            24576  1 snd_usb_audio
snd_hwdep              16392  1 snd_usb_audio
snd_mpu401             17304  0 
snd_mpu401_uart        15872  1 snd_mpu401
snd_rawmidi            30848  2 snd_usb_lib,snd_mpu401_uart
snd_intel8x0           41256  3 
snd_ac97_codec        121032  1 snd_intel8x0
ac97_bus               10112  1 snd_ac97_codec
snd_seq_dummy          11396  0 
snd_seq_oss            39232  0 
snd_seq_midi_event     14848  1 snd_seq_oss
snd_seq                62096  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
snd_seq_device         15252  4 snd_rawmidi,snd_seq_dummy,snd_seq_oss,snd_seq
snd_pcm_oss            52096  0 
snd_mixer_oss          23168  1 snd_pcm_oss
snd_pcm                85640  4 snd_usb_audio,snd_intel8x0,snd_ac97_codec,snd_pcm_oss
snd_timer              30480  2 snd_seq,snd_pcm
snd                    69240  22 snd_usb_audio,snd_usb_lib,snd_hwdep,snd_mpu401,snd_mpu401_uart,snd_rawmidi,snd_intel8x0,snd_ac97_codec,snd_seq_dummy,snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer
soundcore              14992  1 snd
snd_page_alloc         16656  2 snd_intel8x0,snd_pcm
It would seem that the snd_intel8x0 driver has been assigned to the ALC850 sound system, and the snd_mpu401 driver to the SPDIF subsystem. Any driver (so I am told) that begins with the prefix snd_ is an ALSA driver.
We also have USB sound thrown in for added confusion.

April, 2008 with Fedora Core 8

I am running Fedora Core 8, circa April, 2008, on my ASUS A8N-E motherboard.

I connect to the "tuner" input on my integrated amp with a stereo 1/8 inch cable, and touch my finger to the center conductor and hear a nice hum on the speakers, so I know I have my amplifier switches right, and the cable is OK. I plug this into the lime green "line out" connections on the back panel. Then I run system-config-soundcard as root and try to play the sample sound .... nothing.

Now it is time to do google searches and see if I get lucky enough to get advice from someone else who has solved this issue. I find advice that I must remove the front panel audio cable, and put jumpers on pins 5-6 and 9-10 on that connector on the motherboard. I do this (the keyed location on this cable, with the missing pin, is 7-8 according to the Asus manual (which does not mention this business, but does show pins 5-6 being Line-out right, and 9-10 being Line-out left.

It still doesn't work, testing by using system->administration->Soundcard detection (which runs system-config-soundcard) under gnome and supplying the root password. It tells me that it detects an NVidia CK804 AC'97 Audio controller and intends to use the snd-intel8x0 module to run it for me. I am testing by using their sound test buttons. I do hear noise on the speakers when I move the volume slider around (now THAT is encouraging!).

I take a look at the alsa mixer (/usr/bin/alsamixer) and crank up the line out volume, but still no dice. Then I crank up ALL the volume and level settings, still nothing. Then I turn the machine off, and reboot to check the BIOS settings and it says AC97 Audio Enabled!, so far no good.

Here is a nice sound troubleshooting guide (not that it has yet helped me to solve my problems, but it is a nice guide):

Poking around through posts dug up via google searches, I discover that some people have had luck by specifying ac97 "quirks" to the sound driver. This is done by editing the file /etc/modprobe.conf, and in my case rebooting the system. So far, no joy here either.


Have any comments? Questions? Drop me a line!

Adventures in Computing / tom@mmto.org