Results 1 to 4 of 4

Thread: HOWTO: Install OSS4 in Lucid for better sound quality

  1. #1
    Join Date
    Jan 2009
    Location
    Amsterdam
    Beans
    3
    Distro
    Ubuntu 10.04 Lucid Lynx

    HOWTO: Install OSS4 in Lucid for better sound quality

    After upgrading to Lucid I was happy to find that sound finally seemed to work in all applications, but rather appalled at its quality (and the CPU-load of Pulseaudio). So I finally decided to give the OSS4 audio-drivers a try (after having audiophile friends recommend them to me for ages ).

    The various instructions that I found online are mostly for older versions of Ubuntu, and make the installation seem quite a hassle. But in fact, installation turned out to be not that difficult, and I think the resulting improvement in sound quality was well worth it! So I put detailed instructions on my site, but these turn out to be difficult to find with Google. And as these instructions may be useful for people here as well, here's how to do it:

    • In a terminal, run
      Code:
      sudo dpkg-reconfigure linux-sound-base
      Choose OSS. This should, among other things, prevent the ALSA modules from loading. Reboot.


    • There are (at least) three ways to install OSS4:

      • Install from the Ubuntu repositories:
        Code:
        sudo apt-get install oss4-base oss4-dkms oss4-source oss4-gtk
        This will automatically rebuild the OSS modules when your kernel is updated, and is the preferred way of installing third-party kernel modules. However, the oss4-dkms package is currently broken for Ubuntu (bug #519577), so for the time being use the package from the Opensound website (recommended, see below) or from this PPA (not recommended as it currently breaks sound in the Adobe Flash plugin).

      • Download the OSS4 binaries as a DEB package from http://www.opensound.com/download.cgi and install it. This is currently the easiest way, but you'll manually need to reinstall the package every time your kernel is updated. Also, this package is not GPL but has a commercial one-year license.



    • If you get errors about snd_pcm being in use, try rebooting and running
      Code:
      sudo soundon
      If the problem persists, use lsmod to check if any ALSA modules are still loaded. If so, blacklist them manually. For instance, I had to blacklist the saa7134_alsa module by creating a configuration file /etc/modprobe.d/blacklist-saa7134_alsa.conf with the line
      Code:
      blacklist saa7134_alsa


    • Either configure Pulseaudio to use OSS4 or remove it altogether.

      • To configure Pulseaudio with OSS4:
        Edit the default configuration file:
        Code:
        gksu gedit /etc/pulse/default.pa
        Comment out the modules for automatic hardware detection.
        Add the following line:
        Code:
        load-module module-oss device="/dev/dsp" sink_name=output source_name=input mmap=0

      • To remove Pulseaudio (recommended):
        Code:
        sudo apt-get remove pulseaudio
        Note that this will remove the volume manager icon from your panel.



    • Configure Gstreamer for OSS4 output:
      Install the package gstreamer0.10-plugins-bad
      Run the command gstreamer-properties and set input and output to OSS.


    • Add ppa:dtl131/ppa to your Software Sources and run update-manager.
      The packages from this PPA will enable Gnome audio output and volume management to use Gstreamer instead of Pulseaudio.


    • Right-click over your panel, select "Add to panel" and add the volume control applet. Alternatively, you can add a button to your panel or menu to start the OSS4 mixer (/usr/bin/ossxmix) instead of the normal Gnome volume manager.


    • Start gconf-editor. Open system/gstreamer/0.10/audio/default. The keys musicaudiosink and chataudiosink are probably still set to "pulsesink". If so, change them to "osssink". This will switch applications such as Rhythmbox, Movie Player and Skype to OSS output.


    • Set up ALSA (or rather libasound) to output through OSS4 instead of the native ALSA drivers. Create a configuration file:
      Code:
      gedit ~/.asoundrc
      Insert the following:

      Code:
       pcm.!default
       {
         type oss
         device /dev/dsp
       }
       mixer.!default
       {
         type oss
         device /dev/dsp
       }


    • Configure applications that natively support it (e.g. Audacious, Audacity, Kdenlive, SMPlayer, VLC, Wine, etc.) to use OSS output. Many applications don't (or no longer) have native support for OSS. This is no problem, these should continue to work fine through Gstreamer or ALSA emulation (or Pulseaudio if you decide to keep it).


    References:
    http://levien.zonnetjes.net/?q=oss4
    https://help.ubuntu.com/community/OpenSound
    http://www.opensound.com/wiki/index....ions_for_OSSv4
    http://insanecoding.blogspot.com/200...-so-sorry.html

  2. #2
    Join Date
    Nov 2010
    Beans
    6

    Smile Re: HOWTO: Install OSS4 in Lucid for better sound quality

    Thank you for the nice tutorial! Pleased to report that these instructions also work for up-to-date Maverick x64. I completely removed pulseaudio and sound mixing works with my on-board Intel card. Sweet!

  3. #3
    Join Date
    Aug 2009
    Location
    Bulgaria
    Beans
    28
    Distro
    Kubuntu 10.10 Maverick Meerkat

    Re: HOWTO: Install OSS4 in Lucid for better sound quality

    No sound at all... i don't have "/dev/dsp"
    CPU: AMD Sempron 2600+ (1.6ghz) | GPU: Nvidia GeForce 6100/PCI/SSE/3DNOW! (nForce 400 ) | MB: Biostar Geforce 6100 M7 | HD: Western Digital WD5000AADS-0 SATAII/32mb Cache (465.8gb) | RAM: DDR 400/200mhz (937.48mb)

  4. #4
    Join Date
    Nov 2009
    Location
    Chicago
    Beans
    121

    Re: HOWTO: Install OSS4 in Lucid for better sound quality

    Just curious, what kind of problems were you having w/ALSA, and how does this change affect system performance? I'm thinking of trying this because my sound is currently broken and I haven't a clue what the problem is...
    HP Compaq Evo N610c, P4M 2.8gHz, 768mb, ATI Radeon m7500
    Mint XFCE, Mint Isadora Fluxbox, #! Statler/CompizWM, Mint Katya, Windows XP

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
  •