Page 1 of 3 123 LastLast
Results 1 to 10 of 27

Thread: HOWTO Set sound if you have 2 soundcards

  1. #1
    Join Date
    Apr 2005
    Location
    Tallinn, Estonia
    Beans
    7

    Lightbulb HOWTO Set sound if you have 2 soundcards

    Foreword

    If you have 2 soundcards and don't hear anything then this HOWTO should help you.

    Actually it's fully based on dusu's Thread about sound in Hoary and Linux and comments I've found there: http://www.ubuntuforums.org/showthread.php?t=26567 I've just modified it a bit and included some optimizations.

    Configuration

    1. We need to kill ESD. So open terminal and type:
    Code:
    sudo killall esd
    2. Now we need to tell ESD not to run when one does not need it. Open esd.conf file:
    Code:
    sudo gedit /etc/esound/esd.conf
    and insert this (for some people "dafault" parameter is not suitable so they should use "mixer" instead):
    Code:
    [esd]
    auto_spawn=1
    spawn_options=-terminate -nobeeps -as 2 -d default // use "mixer" instead of "default" if you don't have sound
    spawn_wait_ms=100
    # default options are used in spawned and non-spawned mode
    default_options=
    3. We need to "allow" use of many sounds at the same time. So we need to install libesd-alsa0:
    Code:
    sudo apt-get install libesd-alsa0
    4. Now create asound file:
    Code:
    sudo gedit /etc/asound.conf
    and edit it like this:
    Code:
    pcm.card0 {
    type hw
    card 0
    }
    
    pcm.!default {
    type plug
    slave.pcm "dmixer"
    
    }
    
    
    pcm.dmixer {
    type dmix
    ipc_key 1025
    slave {
    pcm "hw:1,0"
    period_time 0
    period_size 2048
    buffer_size 32768
    rate 48000
    }
    bindings {
    0 0
    1 1
    }
    }
    What I did here is changed period_size and buffer_size for better performance. Rate is also changed to hear high quality sounds. And pcm is also changed here from "hw:0,0" (first soundcard) to "hw:1,0" (second soundcard (my default one)). This helped me and I hope it'll help you too.

    4. Last step: allowing sound in Flash files:
    Code:
    sudo ln -s /usr/lib/libesd.so.0 /usr/lib/libesd.so.1
    5. Restart ALSA:
    Code:
    sudo /etc/init.d/alsa restart
    and logout from your session. When you login next time you should be able to hear Gnome Welcome Sound

    In the end

    I want to thank all the people around this forum, especially dusu, ploum and wrochal whole ubuntu support team and of course developers of the best linux distro I've ever used.

  2. #2
    Join Date
    Apr 2005
    Beans
    2

    Re: HOWTO Set sound if you have 2 soundcards

    Hi there.

    I'm happy as a happy man can be!

    I perused many posts about this whole double sound card confusion on the last Ubuntu release, and the only post that solved my problems was this one!

    Love Ubuntu, but the sound was important for me. Again, thank you very much for taking the time to collect all this useful information in an organized way.^^,

  3. #3
    Join Date
    Nov 2004
    Location
    Olympia, WA USA
    Beans
    93
    Distro
    Dapper Drake Testing/

    Re: HOWTO Set sound if you have 2 soundcards

    Hmmm... I'm not sure if I'm any better off since I applied these changes. This howto looked like it'd be perfect for me since I've also a preferable second soundcard and would like multiple sounds capability.

    I have selected Alsa from System>Preferences>Multimedia Systems Selector, still I cannot play music files if I've enabled sound server startup from System>Preferences>Sound.
    I should also note that since it was necessary for me to use "mixer" instead of "default" in this code:

    Code:
    [esd]
    auto_spawn=1
    spawn_options=-terminate -nobeeps -as 2 -d default // use "mixer" instead of "default" if you don't have sound
    spawn_wait_ms=100
    # default options are used in spawned and non-spawned mode
    default_options=
    it was also necessary for me to use "mixer" instead of "default" in the line shown below as "pcm.!default {"

    Code:
    pcm.card0 {
    type hw
    card 0
    }
    
    pcm.!default {
    type plug
    slave.pcm "dmixer"
    
    }
    
    
    pcm.dmixer {
    type dmix
    ipc_key 1025
    slave {
    pcm "hw:1,0"
    period_time 0
    period_size 2048
    buffer_size 32768
    rate 48000
    }
    bindings {
    0 0
    1 1
    }
    }

    I'd like to be able to have those system sounds while playing music files and such. I was hoping this howto would get me there, but it looks like I've still got some adjustments to make. What else can I do to get Rhythmbox and system sounds to coexist?

    Thanks for your efforts MonoLT, they are much appreciated.
    Last edited by Brian McConnell; April 30th, 2005 at 11:12 PM.

  4. #4
    Join Date
    Nov 2004
    Location
    Olympia, WA USA
    Beans
    93
    Distro
    Dapper Drake Testing/

    Re: HOWTO Set sound if you have 2 soundcards

    Well, it appears that selecting esd from the system>preference>multimedia systems selector did the trick for having Rhythmbox run while sound server is enabled at startup. I can play video files on Totem at the same time as well, but no sound. Probably something to do with the sound server at startup, as that seems to be the biggest chink in the chain (Fockers reference, there).

  5. #5
    Join Date
    Jun 2005
    Beans
    314

    Re: HOWTO Set sound if you have 2 soundcards

    Hi, this howto fixed my exact problem. Usually, I just disable esd server startup undre "souns" applet, but this works regardless.

    I wonder why it exists anyways? So many motherboards come with onboard that people just install a soundblaster live into.

  6. #6
    Join Date
    Jul 2005
    Location
    KRK, Poland
    Beans
    180
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: HOWTO Set sound if you have 2 soundcards

    Hi everyone. Im total noob in linux world. Installed Kubuntu 2 days ago and with the help of You guys Im able to do everything I want to do . Setting 2 soundcards was essential to my hobby. Thanks a lot MonoLT and the rest of ppl here. This howto rocks

    copter :]

  7. #7
    Join Date
    Aug 2005
    Beans
    2

    Re: HOWTO Set sound if you have 2 soundcards

    Can i ask 1 question...

    How can i switch between my 2 sound cards?

  8. #8
    Join Date
    Jul 2005
    Location
    Cambridge, MA
    Beans
    18
    Distro
    Ubuntu Breezy 5.10

    Smile Re: HOWTO Set sound if you have 2 soundcards

    This is a nice HOW-TO, but I have a quick suggestion...

    It seems that Ubuntu is very close to being able to go "prime-time" but lacks a few of the more user friendly options that Joe-Computer-User needs. Based on the number of people that found this thread helpful, maybe someone who understands the sound architecture stuff really well could write an app for the next release of ubuntu that allows for configuration with ComboBoxes or something else more intuitive.

    Audio has been managable for me, but it's been a lot of digging through configuration files to make things work. (I have VIA on-board audio that I don't use, and a soundblaster card which works great after digging through setup/config files)

    Ubuntu is great! let's fill in the small gaps to broaden its friendlyness to more users!

  9. #9
    Join Date
    Apr 2005
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: HOWTO Set sound if you have 2 soundcards

    I've also got to give a big thank you for this one. My Logitech Quick Cam Zoom camera has audio capture and apparently being set as the first sound device. It has long fallen behind the desk and I sort of forgot about it. After several flawless installs on some spare GX150's at work I tried Ubuntu on my home machine - only problem was the sound - not bad at all.

  10. #10
    Join Date
    Sep 2005
    Location
    Texas
    Beans
    111
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: HOWTO Set sound if you have 2 soundcards

    WOW thank you soo much, before this i was having to go into my bios and disable my onboard sound so ubuntu would default and run my soundcard instead...thats all fine and dandy except for the fact that i dual boot between it and windows xp pro, so i can finally use my soundcard on both easily

    im using onboard + sounblaster live 24

    i think my soundcard is faulty though were as i cant get the darn mic to work on it in windows or ubuntu :/ been forced to use soundcard for output and onboard for input(mic)....hope i can get this figured out soon!

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