nVidia MCP51 and ALSA

March 7, 2006

I recently built an Athlon 64 system with a Biostar 6100–939 motherboard and for the most part, installing Ubuntu (Dapper Drake Flight CD 4, 2.6.15 Kernel) went very well. I did have problems getting the onboard LAN working, both with the forcedeth and nvnet modules, but I have finally managed to get the onboard sound working. I should mention that I have a friend with the same board and forcedeth is working perfectly for him.

The nVidia nForce drivers for Linux include the nvsound module for the onboard audio. While this worked, the sound was terrible and the optical S/PDIF output would not even power up. There was persistent static and crackling with this driver that almost made me go buy another sound card. Furthermore, the nVidia nVidia driver is an OSS driver. There is no ALSA support.

Instead, I finally got the ALSA drivers working. I had heard rumors that ALSA supported nForce4 cards with the intel8x0 module but the module would never detect the card. However, after installing the latest development version of ALSA (alsa-driver–1.0.11rc3), it found the card and everything is working great. No more crackling and digital output!

The hardware ID of my card is 10de:026b (rev a2). Some additional information:

# lspci -vv
0000:00:10.2 Multimedia audio controller: nVidia Corporation MCP51 AC97 \
    Audio Controller (rev a2)
        Subsystem: Biostar Microtech Int'l Corp: Unknown device 8213
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- \
            ParErr- Stepping- SERR- FastB2B-
        Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=fast \
            >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Latency: 0 (500ns min, 1250ns max)
        Interrupt: pin C routed to IRQ 209
        Region 0: I/O ports at dc00 [size=256]
        Region 1: I/O ports at d800 [size=256]
        Region 2: Memory at fe02c000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: [44] Power Management version 2
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,\
                    D3hot-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-
# cat /proc/asound/cards 
 0 [ICH            ]: NFORCE - Intel ICH
                      Intel ICH with ALC655 at 0xfe02c000, irq 209

To upgrade your ALSA drivers download the latest alsa-driver package, extract the source, build the modules, and install them as root:

$ ./configure
$ make
# make install-modules

Note that you will need a copy of the kernel source and the standard development tools (make, gcc, etc.) installed in order to build the modules.

Then, make sure you don’t have any other sound modules (like nvsound) loaded and load the snd-intel-8x0 module. My kernel reported the following:

[46732.368570] ACPI: PCI Interrupt 0000:00:10.2[C] -> Link [APCJ] -> GSI 23 \
    (level, low) -> IRQ 209
[46732.368771] PCI: Setting latency timer of device 0000:00:10.2 to 64
[46732.541967] intel8x0_measure_ac97_clock: measured 51692 usecs
[46732.542032] intel8x0: clocking to 46815

To enable playback over the S/PDIF ports, issue the following commands:

amixer set 'IEC958 Playback AC97-SPSA' 0
amixer set 'IEC958' on

The first command sets the IEC958 playback source to PCM and the second command enables IEC958 playback.

Adding the following to the snd_intel8x0_ids array in sound/pci/intel8x0.c in the 2.6.15 kernel might also allow your current version of ALSA to detect the card:

{ 0x10de, 0x026b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DEVICE_NFORCE }, /* MCP51 */

I haven’t tried this but it seems to be the main difference in the new version of ALSA that allows the module to bind to the card.

Revisions

References