Page 1 of 16 12311 ... LastLast
Results 1 to 10 of 152

Thread: Howto: Happy ALSA, OSS, ESD, with Duplex - Sound Settings

  1. #1
    Join Date
    Nov 2004
    Location
    Las Vegas
    Beans
    329
    Distro
    Ubuntu 6.06

    Lightbulb Howto: Happy ALSA, OSS, ESD, with Duplex - Sound Settings

    I know it's been done before, but I don't think anybody has compiled all the settings into a single happy set of instructions.

    This setup should work with most sound systems, it is from my Nforce2 setup at home, it makes everything work quite nicely together, OSS, ESD, ALSA and make your Mic work while sound is playing (great for UT2004!!).

    These instructions assume you know how to edit config files on your system and add/remove packages on your own.

    1. Goto System->Preferences->Sound and disable "Enable Sound Server Startup"
    2. Install libesd-alsa0 which will remove libesd0, but that's ok.
    3. Make /etc/esound/esd.conf look like this:
      Code:
      [esd]
      auto_spawn=1
      spawn_options=-terminate -nobeeps -as 2 -d default
      spawn_wait_ms=100
      # default options are used in spawned and non-spawned mode
      default_options=
    4. Make /etc/asound.conf look like this:
      Code:
      # Set default sound card
      # Useful so that all settings can be changed to a different card here.
      pcm.snd_card {
           type hw
           card 0
      }
      
      # Allow mixing of multiple output streams to this device
      pcm.dmixer {
           type dmix
           ipc_key 1024
           slave.pcm "snd_card"
           slave {
                # This stuff provides some fixes for latency issues.
                # buffer_size should be set for your audio chipset.
                period_time 0
                period_size 1024
                buffer_size 4096
                # rate 44100
           }
      
           bindings {
                0 0
                1 1
           }
      }
      
      # Allow reading from the default device.
      # Also known as record or capture.
      pcm.dsnooper {
           type dsnoop
           ipc_key 2048
           slave.pcm "snd_card"
      
           bindings {
                0 0
                1 1
           }
      }
      
      # This is what we want as our default device
      # a fully duplex (read/write) audio device.
      pcm.duplex {
           type asym
           playback.pcm "dmixer"
           capture.pcm "dsnooper"
      }
      
      ###################
      # CONVERSION PLUG #
      ###################
      # Setting the default pcm device allows the conversion
      # rate to be selected on the fly.
      # duplex mode allows any alsa enabled app to read/write
      # to the dmix plug (Fixes a problem with wine).
      
      pcm.!default {
           type asym
           playback.pcm "dmixer"
           capture.pcm "dsnooper"
      }
      
      ########
      # AOSS #
      ########
      # OSS dsp0 device (OSS needs only output support, duplex will break some stuff)
      pcm.dsp0 {
           type plug
           slave.pcm "dmixer"
      }
      
      # OSS control for dsp0 (needed?...this might not be useful)
      ctl.dsp0 {
           type plug
           slave.pcm "snd_card"
      }
      
      # OSS control for dsp0 (default old OSS is mixer0)
      ctl.mixer0 {
           type plug
           slave.pcm "snd_card"
      }
      If you look, the first setting will let you select a different sound card as your primary if you have multiple sound cards.
    5. Make /etc/libao.conf look like this:
      Code:
      default_driver=alsa
    6. Reboot to make sure all the systems startup correctly.

    OSS stuff will still tie up the sound card, but they don't run all the time. Just configure most things to use ALSA and you'll be good.

    Side-Effect: The Ubuntu startup sounds will go away, but i think the trade-off is worth it.

    Note: If stuff plays a little static through ESD, in /etc/esound/esd.conf try changing
    spawn_options=-terminate -nobeeps -as 2 -d default
    to
    spawn_options=-terminate -nobeeps -as 2 -d duplex
    Last edited by intangible; June 27th, 2005 at 06:42 PM. Reason: SlyDexic
    Computer science has as much to do with computers as astronomy has to do with telescopes.
    - Edsger Wybe Dijkstra


    Intangible's Desktop

  2. #2
    Join Date
    Nov 2004
    Beans
    177
    Distro
    Dapper Drake

    Re: Howto: Happy ALSA, OSS, ESD, with Duplex - Sound Settings

    Quote Originally Posted by intangible
    [*] Install libesd0-alsa which will remove libesd0, but that's ok.
    I did not find this pkg but I got a libesd-alsa0. So I installed that one. Wonder if this is just a typo...

  3. #3
    Join Date
    Nov 2004
    Location
    Las Vegas
    Beans
    329
    Distro
    Ubuntu 6.06

    Re: Howto: Happy ALSA, OSS, ESD, with Duplex - Sound Settings

    It was a typo, fixed.
    Computer science has as much to do with computers as astronomy has to do with telescopes.
    - Edsger Wybe Dijkstra


    Intangible's Desktop

  4. #4
    Join Date
    Nov 2004
    Beans
    177
    Distro
    Dapper Drake

    Re: Howto: Happy ALSA, OSS, ESD, with Duplex - Sound Settings

    Quote Originally Posted by intangible
    It was a typo, fixed.
    I tried it, but looks like it gave me a disaster. My screen resolution keeps on 640x480 after reboot and I cannot get it back to what it was before... its totally broken. I've noticed that when I install the libesd-alsa0 pkg, it told me that a bunch of pkgs need libesd0 but it still went ahead removed libesd0 and installed libesd-alsa0.... Even I replaced back the libesd0, the screen never came back... xorg.conf seems not changed, but gnome-display-properties can only see 640x408@60Hz... I need help

  5. #5
    Join Date
    Dec 2004
    Location
    Santiago, Chile
    Beans
    311
    Distro
    Ubuntu Breezy 5.10

    Re: Howto: Happy ALSA, OSS, ESD, with Duplex - Sound Settings

    what should I select in system > preferences > multimedia ??

    Input: alsa ?
    Output: OSS ?

  6. #6
    Join Date
    Nov 2004
    Location
    Las Vegas
    Beans
    329
    Distro
    Ubuntu 6.06

    Re: Howto: Happy ALSA, OSS, ESD, with Duplex - Sound Settings

    Alsa for both
    Last edited by intangible; June 27th, 2005 at 08:47 PM.
    Computer science has as much to do with computers as astronomy has to do with telescopes.
    - Edsger Wybe Dijkstra


    Intangible's Desktop

  7. #7
    Join Date
    Nov 2004
    Location
    Las Vegas
    Beans
    329
    Distro
    Ubuntu 6.06

    Re: Howto: Happy ALSA, OSS, ESD, with Duplex - Sound Settings

    libesd-alsa0 should've taken over all the dependencies that wanted libesd0

    It sounds like somehow something else got uninstalled, it's worked flawlessly on the three Ubuntu computers I've tried, I'm sorry you had problems. I just went through the install procedure again on another installation to make sure I didn't feed you bad info.

    If you removed the old libesd0 first without letting apt-get or synaptic handle removing that automatically when you told it to install libesd-alsa0, that might have caused a problem.
    Try seeing if ubuntu-desktop is still installed, if not, add it back.
    Computer science has as much to do with computers as astronomy has to do with telescopes.
    - Edsger Wybe Dijkstra


    Intangible's Desktop

  8. #8
    Join Date
    Nov 2004
    Beans
    177
    Distro
    Dapper Drake

    Re: Howto: Happy ALSA, OSS, ESD, with Duplex - Sound Settings

    Quote Originally Posted by intangible
    libesd-alsa0 should've taken over all the dependencies that wanted libesd0

    It sounds like somehow something else got uninstalled, it's worked flawlessly on the three Ubuntu computers I've tried, I'm sorry you had problems. I just went through the install procedure again on another installation to make sure I didn't feed you bad info.

    If you removed the old libesd0 first without letting apt-get or synaptic handle removing that automatically when you told it to install libesd-alsa0, that might have caused a problem.
    Try seeing if ubuntu-desktop is still installed, if not, add it back.
    I did not manually remove anything, I was just installing the libesd-alsa0 and it said a bunch of things like such such pkg is depending on libesd0... (I remember, gdk, gedit, and some other gnome apps) however, libesd-alsa0 will be installed... and apt did go ahead to remove libesd and install the libesd-alsa0 even that. Since apt did not get any panic on this action, I was thinking everything should be fine but...

  9. #9
    Join Date
    Nov 2004
    Location
    Las Vegas
    Beans
    329
    Distro
    Ubuntu 6.06

    Re: Howto: Happy ALSA, OSS, ESD, with Duplex - Sound Settings

    That sounds like the normal procedure, are you sure you haven't upgraded anything else recently, maybe a kernel update or video card drivers?
    Computer science has as much to do with computers as astronomy has to do with telescopes.
    - Edsger Wybe Dijkstra


    Intangible's Desktop

  10. #10
    Join Date
    Nov 2004
    Beans
    177
    Distro
    Dapper Drake

    Re: Howto: Happy ALSA, OSS, ESD, with Duplex - Sound Settings

    Quote Originally Posted by intangible
    That sounds like the normal procedure, are you sure you haven't upgraded anything else recently, maybe a kernel update or video card drivers?
    Yes, I upgraded kernel to 2.6.10--34.3.

Page 1 of 16 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
  •