Page 1 of 34 12311 ... LastLast
Results 1 to 10 of 333

Thread: HOWTO: Nvidia nForce SoundStorm APU: Digital output, Surround and Hardware mixing

  1. #1
    Join Date
    Nov 2005
    Location
    Uppsala, Sweden
    Beans
    2,181
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Thumbs up HOWTO: Nvidia nForce SoundStorm APU: Digital output, Surround and Hardware mixing

    Note (March 5:th, 2010): My old desktop is nowadays enjoying a long deserved retirement (after six or seven years of faithful service). This means I have no reason to continue maintaining this thread, but if anyone feels up to it, you are very welcome to use, modify and distribute this thread and my patches in any way you like.



    This howto is for those of you who have an nforce mobo with SoundStorm hardware and want to take better advantage of it's capabilities.
    The open source alsa driver (intel8x0) is not capable of hardware mixing or dolby digital encoding.

    In my experience nvidias closed source oss drivers work (almost) perfectly.
    Note that these have not been developed at all since november '05, and nvidia have apparently decided that they will not provide any further linux nforce drivers, they just tell us to use the open source drivers. The main reason I wrote this howto was because I saw somewhere (forgot where) that nvidias drivers will not install on kernels 2.6.16 and later. I found a couple of hacks that works and decided to share them, together with everything else I do to get my sound work the way I want it.

    My setup:
    Motherboard: Gigabyte GA-7NNXP (nForce2, mcp-t southbridge)
    Other: Digital Output through SPDIF (both optical and rca cable works) to an external 5.1 reciever (never tried analog surround, but analog stereo works fine)

    Make sure you know you have SoundStorm before you try any of this. It's only present in nforce 2 motherboards, and only if they have an mcp-t southbridge.
    How can you check if you have SoundStorm?
    Check the result of running this command in a terminal:
    Code:
    lspci | grep audio
    This is what I get:
    Code:
    00:05.0 Multimedia audio controller: nVidia Corporation nForce Audio Processing Unit (rev a2)
    00:06.0 Multimedia audio controller: nVidia Corporation nForce2 AC97 Audio Controler (MCP) (rev a1)
    You have SoundStorm only if you see "nForce Audio Processing Unit"
    If you don't have SoundStorm, this howto will probably not help you in any way.
    ################################################## ########################
    Step 1:
    Get some dependencies (if you run dapper or older: change -generic in the last two to match your kernel (-k7/-686/-386, check the output of 'uname -r' if not sure):
    Code:
    sudo apt-get update
    sudo apt-get install build-essential libqt3-mt linux-generic linux-headers-generic
    The last two are metapackages that make sure you always have the headers and restricted modules matching your kernel (-generic is instead of -k7 or -686 in edgy/feisty). libqt3-mt is necessary to get nvmixer working.
    ################################################## ########################
    Step 2:
    Add your user to the "audio" group. A few users have reported permission problems that prevents users that are not members of the audio group from using the sound card:
    Code:
    sudo adduser $USER audio
    Prevent intel8x0 from loading:
    Code:
    gksudo gedit /etc/modprobe.d/blacklist.conf
    Add the following line anywhere:
    Code:
    blacklist snd_intel8x0
    This will make sure nvmixer loads your saved settings on each boot:
    Code:
    gksudo gedit /etc/modprobe.d/nvsound.conf
    Paste the following into it:
    Code:
    install nvsound /sbin/modprobe --ignore-install nvsound ; sleep 1; /usr/bin/nvmix-reg -f /etc/nvmixrc -L >/dev/null 2>&1 || :
    remove nvsound { /usr/bin/nvmix-reg -f /etc/nvmixrc -S >/dev/null 2>&1 || : ; }; /sbin/modprobe -r --ignore-remove nvsound
    Reboot before you continue to make sure intel8x0 is not loaded. It will prevent nvsound from loading properly.
    ################################################## ########################
    Step 3:
    Download nvidias driver package:
    Code:
    wget http://download.nvidia.com/XFree86/nforce/1.0-0310/NFORCE-Linux-x86-1.0-0310-pkg1.run
    ################################################## ########################
    Step 4:
    Install the nvsound module:

    I. Kernels older than 2.6.16 (got it to work in both breezy and dapper):
    Code:
    sudo sh NFORCE-Linux-x86-1.0-0310-pkg1.run
    If your internet connection is already working, you probably don't want to install nvnet.
    The installer should build the module for you.

    II. Kernel 2.6.16 or later needs some hacking before the module will build and load. This works in edgy, feisty, gutsy, and hardy (tested in alpha 3):

    First unpack the installer files:
    Code:
    sh NFORCE-Linux-x86-1.0-0310-pkg1.run -x
    Download the attached file nvsound-patch2.6.16-2.6.31.tar.gz to your desktop and extract it to the folder that contains the extracted installer files:
    Code:
    mv ~/Desktop/nvsound-patch2.6.16-2.6.31.tar.gz ~/NFORCE-Linux-x86-1.0-0310-pkg1
    cd  ~/NFORCE-Linux-x86-1.0-0310-pkg1
    tar -xvvzf nvsound-patch2.6.16-2.6.31.tar.gz
    Apply the appropriate patches and start the installer:
    a) For kernels between 2.6.16 to 2.6.20 (Edgy and Feisty):
    Code:
    ./2.6.16-patch
    sudo ./nforce-installer
    b) For kernel 2.6.22 (Gutsy) or 2.6.24 (Hardy):
    Code:
    ./2.6.24-patch
    sudo ./nforce-installer
    c) For kernel 2.6.27 (Intrepid) or 2.6.28 (Jaunty):
    Code:
    ./2.6.27-patch
    sudo ./nforce-installer
    d) For kernel 2.6.31 (Karmic development):
    Code:
    ./2.6.31-patch
    sudo ./nforce-installer
    The installer will build the module for you.
    Make sure you do not try to build the nvnet module, it will not work.
    To load the nvsound module without the need for reboot (as long as intel8x0 is not loaded):
    Code:
    sudo modprobe nvsound
    When this is done I can see "Dolby Digital" lighting up on my reciever and sound starts working.
    ################################################## ########################
    Step 5:
    a) Change sound settings:
    Code:
    nvmixer
    I've set the speaker tab to 5.1 speakers and surround to clone, which means I get hardware encoded Dolby digital 5.1 output to my reciever (if the sound is only stereo the rear channels are just cloned from the front channels, and the center is not used). I get perfect passthrough of dolby surround and DTS from DVDs (using xine or mplayer)

    If you get this error: "Nvsound: Unable to open the Mixer"; reboot and try again. If there was already a sound module loaded before you did step 4, nvmixer will not work unless you reboot.

    If you get this error: "nvmixer: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory" (Happened to me in a gutsy tribe 5 fresh install, but not in gutsy final. Again in hardy alpha 3), run this:
    Code:
    sudo ln -s /usr/lib/libstdc++.so.6 /usr/lib/libstdc++.so.5
    b) Save your new nvmixer settings (to keep your settings after shutdown / reboot):
    Code:
    sudo /usr/bin/nvmix-reg -f /etc/nvmixrc -S
    To manually load saved settings:
    Code:
    /usr/bin/nvmix-reg -f /etc/nvmixrc -L
    ################################################## ########################
    Step 6 (only gnome):
    Get esd to play system sounds through oss instead of alsa (this is for Ubuntu/gnome, I don't think it is necessary in kubuntu/xubuntu):
    Code:
    killall esd
    sudo apt-get update
    sudo apt-get install esound esound-clients esound-common libesd0
    Note: This will uninstall the pulseaudio esd wrapper and the meta package Ubuntu-desktop, this should be safe but you'll probably want to reinstall ubuntu-desktop before you upgrade to a new version of ubuntu.

    Restart esd (from a "run application" dialog (Alt-f2), otherwise esd will die when the terminal is closed):
    Code:
    esd

    WARNING: DON'T USE PULSEAUDIO IN HARDY OR later. It will cause your system to freeze as soon as it loads (but in gutsy it's ok).

    (bugs have been reported but rejected by both the ubuntu and pulseaudio developers, the problem is probably in nvidia's code, which will never be fixed.)
    Set all applications to use oss instead of alsa:
    Run the following from a terminal and select oss in all menus. This will take care of many applications.
    Code:
    gstreamer-properties
    Code:
    gnome-sound-properties
    Others, like mplayer and beep-media-player you'll need to set in the respective applications preferences.
    Some applications, like gaim, does not have the option to use oss, but will work if you set it to use esd instead.
    ################################################## ########################
    Step 7: (only gnome)
    Get gdm to play sound through an oss capable player instead of aplay (this must be the least important step in this howto, it will only enable that silly little drum sound when the login screen is ready).
    I got it working with mplayer (you'll of course need to install mplayer to get this working):
    Code:
    sudo gedit /usr/lib/gdmplay
    make it look like this:
    Code:
    #!/bin/sh
    #/usr/bin/aplay -q -N $@ 2> /dev/null
    mplayer -msglevel all=-1 -ao oss $@ 2> /dev/null
    ################################################## ########################

    Revert to your original settings:
    Code:
    sudo apt-get install libesd-alsa0 ubuntu-desktop
    Code:
    sudo gedit /etc/modprobe.d/blacklist
    delete or put a # before "blacklist snd_intel8x0"
    Code:
    sudo gedit /usr/lib/gdmplay
    make it look like this:
    Code:
    #!/bin/sh
    /usr/bin/aplay -q -N $@ 2> /dev/null
    #mplayer -msglevel all=-1 -ao oss $@ 2> /dev/null
    Manually uninstall the nforce drivers (the built-in uninstaller apparently does not work properly):
    Code:
    sudo rm -rf /usr/bin/nforce-installer /usr/bin/nforce-bug-report.sh /usr/bin/nvmixer /usr/bin/nvmix-reg /usr/local/lib/libnvopenal.a /usr/local/lib/libnvalut.a /lib/modules/`uname -r`/kernel/sound/oss/nvsound.ko /etc/modprobe.d/nvsound /usr/share/doc/nforce/ReleaseNotes.html /var/lib/nvidia-nforce/nforce_log_audio /var/lib/nvidia-nforce /var/log/nvidia-nforce-installer.log /etc/nvmixrc
    Reboot
    ################################################## #######################
    Remaining problems: Volume control does not work in any program, except those that have a software volume controller (but this may be because I use digital output through SPDIF, I remember having the same problem with some apps in windows if they were set to use SPDIF)

    Get sound to work with flash 9:

    Check this post (Thanks to Pseudonym for sorting it out for us.)

    Acknowledgements:

    Some of the steps are directly ripped from other posts on these forums (thank you girls and boys). Other parts I figured out by trial and error with help of nvidias cryptic release notes. The hack for making the module build properly on kernel 2.6.17 I ripped from post #3 in this thread and the second hack to get the module to load without errors I figured out my self with some help from this thread.
    Attached Files Attached Files
    Last edited by jocko; March 5th, 2010 at 10:26 PM. Reason: Updated patches, now works fine with kernel 2.6.31

  2. #2
    Join Date
    May 2006
    Beans
    1

    Re: HOWTO: Nvidia nForce SoundStorm APU: Digital output, Surround and Hardware mixing

    THANKS!!!

  3. #3
    Join Date
    Jun 2006
    Location
    Germany
    Beans
    Hidden!
    Distro
    Edgy Eft Testing

    Re: HOWTO: Nvidia nForce SoundStorm APU: Digital output, Surround and Hardware mixing

    In the name of a friend of mine who has Soundstorm: Thanks for this!!

  4. #4
    Join Date
    Nov 2005
    Location
    Uppsala, Sweden
    Beans
    2,181
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: HOWTO: Nvidia nForce SoundStorm APU: Digital output, Surround and Hardware mixing

    I just realized a mistake in the install procedure for newer kernels. The howto is updated to correct that. (nvmixer only get installed from the installer, not by "make install").

  5. #5
    Join Date
    Nov 2005
    Location
    Uppsala, Sweden
    Beans
    2,181
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: HOWTO: Nvidia nForce SoundStorm APU: Digital output, Surround and Hardware mixing

    Just one more update. Added one thing under "step 2" that is necessary to keep the settings after reboot. Hope this helps anyone.

  6. #6
    Join Date
    Aug 2006
    Beans
    6

    Re: HOWTO: Nvidia nForce SoundStorm APU: Digital output, Surround and Hardware mixing

    Is this also working on kernel 2.6.18? I can't get it working with that kernel...

  7. #7
    Join Date
    Nov 2005
    Location
    Uppsala, Sweden
    Beans
    2,181
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: HOWTO: Nvidia nForce SoundStorm APU: Digital output, Surround and Hardware mixing

    Quote Originally Posted by mouse256 View Post
    Is this also working on kernel 2.6.18? I can't get it working with that kernel...
    I haven't tried it in 2.6.18. Do you get any error messages when you try to install it?

  8. #8
    Join Date
    Dec 2005
    Beans
    2

    Re: HOWTO: Nvidia nForce SoundStorm APU: Digital output, Surround and Hardware mixing

    Hello,

    I just realized this good Howto and I don't have any problems to install the Nvidia nForce SoundStorm APU. But, now I have a problem... I have a analog 5.1 input system sorround system, and I don't do activate de subwoofer... The wizard of the nvmixer don't work, and I don't turn on this option (to activate the 5.1 sorround sound) --> LFE Crossover Frequency.

    I using a ubuntu 6.0.6.1 LTS with 2.6.15-27-k7 kernel, and Nvidia GeForce 6800 installed on this.

    Any suggestions?


    PD: Sorry for my english...and thanks for the pacience to read this! xD

  9. #9
    Join Date
    Nov 2005
    Location
    Uppsala, Sweden
    Beans
    2,181
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: HOWTO: Nvidia nForce SoundStorm APU: Digital output, Surround and Hardware mixing

    Quote Originally Posted by Hansi View Post
    Hello,

    I just realized this good Howto and I don't have any problems to install the Nvidia nForce SoundStorm APU. But, now I have a problem... I have a analog 5.1 input system sorround system, and I don't do activate de subwoofer... The wizard of the nvmixer don't work, and I don't turn on this option (to activate the 5.1 sorround sound) --> LFE Crossover Frequency.

    I using a ubuntu 6.0.6.1 LTS with 2.6.15-27-k7 kernel, and Nvidia GeForce 6800 installed on this.

    Any suggestions?


    PD: Sorry for my english...and thanks for the pacience to read this! xD
    If I understood you correctly I have the same problem. Some of the options in nvmixer are greyed out, and not possible to change. The speaker wizard doesn't work, and there is no way to activate LFE or move the LFE slider.
    I think one way to activate LFE would be to manually edit the file that contains the nvmixer settings.
    Try this:
    Code:
    sudo gedit /etc/nvmixrc
    Find these two lines:
    Code:
    LfeSet:0
    LfeSlider:0
    Try changing to:
    Code:
    LfeSet:1
    LfeSlider:200
    Save the file. To load the new settings:
    Code:
    sudo /usr/bin/nvmix-reg -f /etc/nvmixrc -L >/dev/null 2>&1
    NOTE: I don't know what value LfeSlider should have, you'll have to find it out by trial and error.

    Edit: I've tried this myself, and the LFE slider actually works. However I do not notice that it actually does anything (but that may be because I use digital output?).
    If it works, save the new settings of the slider by:
    Code:
    sudo /usr/bin/nvmix-reg -f /etc/nvmixrc -s >/dev/null 2>&1
    Let us know if it works

    Good luck
    Last edited by jocko; September 24th, 2006 at 02:52 PM.

  10. #10
    Join Date
    Dec 2004
    Location
    LV-426
    Beans
    616
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: Nvidia nForce SoundStorm APU: Digital output, Surround and Hardware mixing

    Just wanted to say thanks for your great howto! I am now running a custom 2.6.17 kernel on Xubuntu Dapper, and the nvsound driver compiled without issues and is working perfectly.

    Like you I only use S/PDIF output, and when I saw the Dolby Digital LED light up on my Creative 5.1 digital speakers, I was indeed a happy chappy!

    I have an ASUS A7N8X Deluxe M/B which I don't plan on upgrading any time soon. Before I read your post I was resigned to switching to alsa when the next flavour of Ubuntu comes out, or when Debian Etch gets released (nothing against alsa, of course, just that it only half works with Soundstorm chips). Now I no longer have to.

    Thanks again!
    AMD Athlon64 X2 5600 on Abit KN9 Ultra nForce 570
    2GB Corsair TwinX DDR2-800
    Gigabyte ATI HD4850 1GB on ASUS PW201 20" WS LCD
    Ubuntu 9.10 64-bit / Wintendo

Page 1 of 34 12311 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •