Page 1 of 37 12311 ... LastLast
Results 1 to 10 of 366

Thread: [SOLVED] Multiple Sound Solution (ALSA w Pulseaudio)

  1. #1
    Join Date
    Apr 2008
    Beans
    4,377
    Distro
    Ubuntu 9.10 Karmic Koala

    [SOLVED] Multiple Sound Solution (ALSA w Pulseaudio)

    [SOLVED] Multiple Sound Solution (ALSA w Pulseaudio)
    The 10,000 Page Guide to Sound Troubleshooting and Configuration for Hardy Heron 8.04 and Intrepid 8.10 and Jaunty 9.04


    THIS GUIDE IS OUTDATED. There is some, but not much, help here if you are using Karmic Koala 9.10 but there are many links still active and you will learn a lot by looking through this. Much of the information here is no longer relevant and the OP has not been updated since May 2009, use it at your own risk.

    Many thanks to everyone who participated and best regards,

    mark

    Pulseaudio is the sound server for Ubuntu Hardy and Intrepid and the new Jaunty. It will continue to be so for the foreseeable future. This guide is geared towards first getting your sound hardware working and then getting Pulseaudio set up properly. If you are using KDE4/Kubuntu Intrepid Phonon is replacing aRts as the sound server. Since Phonon is so new some functionality has not yet been implemented. There is a link below for using Pulseaudio to fill the gaps.

    If you are using Intrepid you must read this before continuing
    The sound scheme in Intrepid 8.10 is fundamentally the same as that in Hardy 8.04 with few exceptions. ALSA 1.0.17 is now installed with Intrepid so more hardware works out of the box. The PulseAudio Volume Control now has a Recording tab. The link for the Multimedia overhaul has been updated for Intrepid and works, use it to get the dvd decoders and other restricted codecs from the medibuntu repository, it will also update some packages you got with the ubuntu-restricted-extras package. Flash 10 is now included in the ubuntu-restricted-extras package for both 32 and 64 bit users. Many of the other links have also been updated for Intrepid. If you know of some other helpful links, please let me know and I will include them here. It has been reported that Skype now works out of the box with Intrepid so if you are having problems it is either with your Skype setup or something more fundamental.

    If your sound sort of works I have written a little quick start guide here just for you:

    Quick Start Guide for Intrepid and Hardy

    http://ubuntuforums.org/showthread.php?t=997506

    KDE4 Phonon and Pulseaudio
    If you are using Intrepid with KDE4/Kubuntu and need Pulseaudio because you have multiple sound hardware devices or for any other reason

    http://ubuntuforums.org/showthread.php?t=1055591

    Jaunty 9.04
    Jaunty is released with Pulseaudio 0.9.14. There is a Jaunty Sound Solutions guide here

    http://ubuntuforums.org/showthread.php?t=1130384

    Pulseaudio 0.9.15
    Pulseaudio 0.9.15 includes new hal detection for digital and other devices which is missing in 0.9.10-0.9.14, better bluetooth and HDMI detection/support and many other new features. It also includes an entirely new pavucontrol which is the Pulseaudio volume control. As soon as I can, I will write a guide for using it. Pulseaudio 0.9.15 also requires ALSA 1.0.19 which is also available through Luke's ppa. There are also packages for Intrepid and Hardy. Remember that these are experimental so it is possible that things will not work smoothly. You will be performing testing and bug reports are needed for any problems you encounter.

    Discussion thread for Pulseaudio 0.9.15. (This thread is in Jaunty testing forum and is closed for new posts)

    http://ubuntuforums.org/showthread.php?t=1066212

    Luke Yelavich's PPA for Pulseaudio 0.9.15, also includes debs for ALSA 1.0.19

    https://launchpad.net/~themuso/+archive/ppa


    The Ubuntu Sound Scheme
    If you are looking for a general explanation of the Ubuntu Hardy Heron 8.04/Intrepid 8.10 sound scheme, I have written a little something here for you:

    http://ubuntuforums.org/showthread.php?p=5931543

    Introduction
    This guide begins with a short basic troubleshooting section followed by a more comprehensive hardware Drivers troubleshooting area that deals with specific solutions for your hardware. You can skip this if your sound basically works. Next is the ALSA Trouble section. This tells you how to restart ALSA without rebooting, how to reload ALSA completely, and how to obtain the latest ALSA version.

    Following that is a Other Hardware Issues section on getting your Surround Sound and Digital output and multiple sound cards/devices USB and bluetooth stuff working. You should get your basic hardware and sound server set up properly first before doing anything here.

    The Sound Server Setup section is about setting up the system so all your sound applications will work together properly. it tells you what packages you need and how to use all those crazy sound setting applications scattered all over your menus.

    Following that is some info on getting a few specific applications setup and working properly, network streaming, and some other technical details that most people can just skip over.

    The last section is about Ubuntu Studio and Jack. If you are serious about recording or contemplating using Ubuntu for recording/performing, it is very important that you read this section.

    One important piece of advice if you are going to get any use out of this guide, a lot of important information that you need is in the links.

    ************************************************** ************************************************** *****************************
    Basic Troubleshooting

    If you can hear anything
    If you can hear the login sound but all other sound is not working you should first try Try This First and This may or may not work for you. If you have sound in some applications but not others then you can skip all the way down to the Sound Server Setup section. Either way it means your sound driver is working, lucky you.

    If your sound stops
    If your sound is generally working Ok but after a while just fades out or stops and you are not doing anything in particular to make this happen, like installing updates or fooling around with the sound settings or the applications and sound returns like normal when you reboot, this seems to be a particular bug in the hda-intel driver or kernel problems with Intrepid so we must wait for it to be fixed and an update made available. You can avoid having to reboot by restarting ALSA and PulseAudio following the directions in ALSA Trouble below for now.

    If you sound goes missing after an update
    If you just got a bunch of updates and rebooted and your sound no longer works it is most likely because some or all of your sound setting have been reset from where you put them. If you remember how you had everything set up, reset what was changed. If you do not remember... first check your volume controls. Next, go to Try This First below. If you edited some file to get your sound working, check that and reedit as necessary. If you got an application update check its preferences or settings. If you are really lost just go through the guide again. You should also check that your users and root are members of the following groups which you can check in System/Administration/Users and Groups since these sometimes are removed with updates.
    pulse
    pulse-rt
    pulse-access

    Scratchy, glitchy sound
    If you have an HDA-Intel device try turning up the PCM slider in the volume control. If PCM is set to 0 it makes the sound scratchy for some of those devices.

    Otherwise if your sound is scratchy or stuttering you can edit these lines in the file /etc/pulse/daemon.conf to look like this
    Code:
    default-fragments = 5
    default-fragment-size =25
    There are also some sound cards/chips that can only be fixed with an ALSA upgrade so you may want to consider that if this does not work for you.

    If your sound works randomly
    If your sound works sometimes when you boot but not all the time this problem is very common when multiple hadware sound devices are present. Nvidia and ATI include HDMI devices in their gpus now so that means if you have one of them you have multiple sound devices. If you have a USB headset or speakers you have multiple sound devices. If you have a tv card you have multiple sound devices and of course, if you have a plug in sound card and a sound chip on the motherboard you have multiple sound hardware. What happens is that the devices are on the PCI bus and are detected and assigned somewhat randomly. This means that sometimes your motherboard sound chip is detected first and becomes the default and sometimes the HDMI or your plugin sound card or some other device is detected first and becomes the default sound device. In any case, this is an issue with Multiple Sound Devices which is a section of this guide below so you should look in there for help.

    No sound at all
    There are many links here for specific sound cards/chips and the answer you need may not be in the OP so you should look through the entire thread if it seems to be relevant to your problem. You should also post in that thread instead of starting a new one if possible. (Starting a new thread just fragments information and makes it more difficult for people to find answers so please try to avoid that.) Posting in a running thread will push it the the top and more people will notice it and reply. Someone will be along to help you if they can so please be patient. If you get no answer after one day, it is OK to bump the thread.

    If you still have no sound after going through this guide and all the relevant links, you should do a search either in these forums or with google for your specific sound card/problem because there is about a %100 chance that someone has figured out your problem already. You can also try looking in the Mandriva and Fedora and SUSE and Debian forums, there are many smart people there. If you still cannot find any help, it is OK to start a new thread. If you find any information somewhere else that you think others might need, please bring it back.

    Missing Volume Controls
    If you seem to be missing some items from the volume control in your panel ( the little speaker icon) you most likely just need to make them visible. Right click on the little speaker and choose Open Volume Control. Make sure the Device: xxxxxxxxxx is your hardware device. It should be something like
    Device: HDA ATI SB (Alsa mixer) or Device: HDA Intel(Alsa mixer) or Device:C-Media 8768 (Alsa mixer) etc, in other words, a hardware device with an Alsa mixer.
    Once you have the proper device selected click on Preferences down at the lower right. This will show you a list of check boxes. Check all the items you want to appear in the volume control and close the box.

    Try This First
    Go to System/Preferences/Sound and switch everything except Default Mixer Tracks to ALSA or Pulse Audio. if you see ...HDMI... in Default Mixer Tracks, change it to your sound card/chip, Realtecxxxx or Emuxxx or ATI SB or HDA INTEL or something like that, anything but HDMI that is not Capture or Playback or OSS.

    Right click on the speaker icon on the top panel and choose Open Volume Control. Click File/Change Device and make sure you have the correct device chosen. Go to Edit/Preferences and check the following boxes: Main, PCM, CD, PC Speaker, Mic, mic boost, mic capture, mic boost capture, etc. You may or may not have these and more. In the Playback tab make sure the sliders are up and there are no red x over the little speakers. In the Recording tab, do the same. In the Switches tab check any boxes marked mix, 3D control, mic boost, capture, etc. In the Options tab, make sure the Line in mode and Mic-on mode and any other option is like how you have your speakers plugged in. (Some surround sound outputs are also line in and mic inputs and can be switched here.) Make sure any SPDIF or IEC958 or External Amplifier boxes are unchecked. (With some sound cards/chips these will turn off your sound so for now leave them off.) Close that window, right click on the icon again and choose Preferences. Make sure the device listed in the box is your sound card and select Master. Close the window. Now left click on the speaker icon and move the slider all the way up.

    Try to play something, Rythmbox is a good choice, so is totem or mplayer. (Firefox/flash is not such a good choice at this time since it may not be working for other reasons). If you still get no sound, read on.

    This may or may not work for you
    One easy way that some people have fixed their sound problems is by creating a new user in System/Administration/Users and Groups and then logging in with that. It seems the generic system defaults for new users are different from the initial user defaults that Ubuntu installs. You should try that first before resorting to some of the more drastic steps below, It is a simple thing to do and will make no changes to your system. And if it works, you will know it is just a user configuration problem and you can compare the hidden user default files in the respective home directories to find and fix the problems or just transfer your personal files to the new user directory.

    If you still get no sound, get up and walk around for a minute, get something to drink. This could take a while.

    OK, sit back down and start reading.

    ************************************************** ************************************************** ****************
    Drivers
    Drivers are low level software code that connects the hardware to the software operating system so applications can make use of it. The sound drivers live in the kernel which is the heart of the operating system. ALSA sound drivers are included in the installation. New and updated hardware drivers for sound are generally provided through automatic updates and version upgrades to ALSA. This means that, for the most part, you do not have to worry about hunting down drivers and installing them yourself to get your hardware working. It can also mean that if there is no open source linux driver and your hardware manufacturer does not supply a proprietary one you could just be out of luck with your hardware but that is a pretty rare circumstance.

    Sound Cards/On Board Chips and other Devices
    If you want to find out if your sound card is supported by ALSA and other information you should try the ALSA Wiki ( According to the ALSA developers all usb compliant sound devices should work with no special setup.):

    http://alsa.opensrc.org/index.php/Main_Page

    If you are having trouble determining which module or module option you need for your sound card the entire list of supported cards and options is already on your computer ( the driver directory where this file resides also has all sorts of miscellaneous information on specific sound cards/devices):

    /user/share/doc/alsa-base/driver/ALSA-Configuration.tar.gz

    Getting Information from your Machine
    Much of the information you will need for further troubleshooting you will need to gather yourself from your machine. This will involve using a few very simple and easy commands from the terminal. Do not be afraid, just follow this guide here. It is written for total noobs.

    http://ubuntuforums.org/showthread.php?p=6628921

    HDA sound chips
    snd-hda-intel
    The Intel Hda sound chip is widely used and can be found on almost every desktop and laptop PC manufactured over the last few years. There are numerous versions of this chip and a zillion configurations that OEMs have made by programming them for their particular needs. This has created a nightmare for the driver writers since the OEMs are very lazy about publishing the details. Nevertheless the driver writers are forging on in the total pitch black using only sputtering candles to light their way and have come up with numerous options you can use to configure this driver for your particular machine. You should send them roses, or candy, or beer, or even just a thank you for taking on this near-impossible task.

    If you are having problems with the HDA card/chip on your laptop or aplay -l reports one of these:

    HD Audio (ICH6, ICH6M, ESB2, ICH7, ICH8, ICH9, ICH10 ),
    ATI SB, SB450, SB600, RS600,
    VIA VT8251/VT8237A,
    SIS966, ULI M5461
    Many people have reported success with their problematic HDA sound problems by upgrading to ALSA 1.0.17, 1.0.18 or 1.0.19 and/or Intrepid 8.10 which includes ALSA1.0.17. You might want to consider one of these options if you continue to have difficulties after trying the following. If you have an ALC 861 or ALC 888 chip people have reported that ALSA 1.0.17 provides more switches and options than 1.0.16. if you experience very low volumes with your ICH8-10 you should consider upgrading. The drivers are being updated regularly and each release supports more chips/cards and options so if your card/chip or some option is missing from your current driver you should seriously consider upgrading. (Directions for that are in the ALSA Trouble Section below)

    First, you should get some information from your machine. The section immediately above has a link to how to do that. Next, open this file with your file manager

    /user/share/doc/alsa-base/driver/ALSA-Configuration.tar.gz

    Scroll down to the Module snd-hda-intel section and, using the information you just got, look for your sound chip. If you are lucky you will find a listing for your particular machine. If not, at least you know which options are available for that chip. You can also look here which has a list by manufacturer I am trying to get together. If you fix your machine but it is not on any of the lists, please post there so we can add you to the list.

    http://ubuntuforums.org/showthread.php?t=1043568

    Once you find something that looks hopeful you need to get it into the /etc/modprobe.d/alsa-base file. Save it in a notepad. Open a terminal and copy this into it. In Jaunty the file name has been changed to alsa-base.conf to conform to configuration file naming conventions.

    Code:
    sudo gedit /etc/modprobe.d/alsa-base
    It will ask for your password and then open the file for you to edit. Add this to the end of the file
    Code:
    options snd-hda-intel xxxxxxxxxxxxx
    Replace the xxxxxxxxx with whatever option you want to use.
    Reboot or restart alsa (directions for that are below in ALSA Trouble). If it works you should now have your sound working, YAY! If it doesn't you may need to try the other options until you find one that does, meh. You can also try this option which seems to work for some machines where the listed options fail.

    Code:
    options snd-hda-intel probe_mask=1
    If you are having problems with headphone/speaker control with your HDA sound device you can try this thread:

    http://ubuntuforums.org/showthread.php?t=806620

    ALC1200
    If you have an ALC 1200 sound chip (ASUS P5QL-EM mobo) you need ALSA 1.0.17 or 1.0.18 or 1.0.19 which there is a link to below. Upgrade and add the following line to the end of the /etc/modprobe.d/alsa-base file:
    Code:
    options snd-hda-intel probe_mask=1
    Nvidia HDA
    If you have a new Nvidia HDA sound chip and it sounds scratchy, this is a known problem and is fixed in the 2.6.27 kernel( It is part of Intrepid so you may want to consider upgrading):

    http://ubuntuforums.org/showthread.php?t=925409

    Creative Soundblaster Cards
    Creative cards have been nothing but a big pain in linux forever. Creative has been completely unwilling to make any technical information about their cards available to driver the open source community so drivers have had to be reverse engineered. Creative has released a few proprietary linux drivers but these have proven to be generally unusable. Just recently, after the latest fiasco with their proprietary X-FI driver, Creative has thrown in the towel and announced that they will make technical information available so the open source community can write proper drivers. OSS4 has drivers for the X_Fi cards now but there is no ALSA driver included in the ALSA packages yet.

    X-FI
    If you are having problems getting your Creative X-FI card to work you can try the newest driver from creative, it seems to actually work for a few people:

    http://ubuntuforums.org/showthread.php?t=870001

    Or you can switch to OSS4:

    https://help.ubuntu.com/community/OpenSound

    http://ubuntuforums.org/showthread.php?t=780961

    Or you can recompile your kernel with a patch. To recompile your kernel and apply the patch (take extreme care doing this, recompiling a kernel is serious business and can break your system. Do not do this unless you are absolutely sure you know what you are doing):

    http://ubuntuforums.org/showpost.php...&postcount=675

    The ALSA x-fi driver has finally been completed and will be released in the 2.6.31 kernel.

    Audigy
    If your Creative Audigy card is not giving you any sound, make sure the analog/digital check box in your sound mixer is unchecked. Updates seem to reset this switch regularly so keep this in mind.

    AWE64, SB16
    If you have dug out an old Soundblaster AWE 64 or SB16 ISA card and were wondering if you could get it to work

    http://ubuntuforums.org/showthread.php?t=1011516

    ICE1712
    If you have a sound card with the ICE1712 chip, like a M-audio Delta 44, M-Audio 2496, ST Audio Media 7.1 and others and are having trouble getting it working with pulseaudio you can try this:

    http://ubuntuforums.org/showpost.php...&postcount=989

    Cards that need firmware
    The following devices do not come with the software necessary for them to function (firmware) embedded into the device. It must be loaded each time the device is attached or turned on. Newer versions of ALSA should automatically load this firmware upon detecting the device but there are some exceptions...If you seem to have an unsupported device and are dual booting with windows one trick that people use is to boot up with windows and load the firmware and then soft restart the computer and boot into Ubuntu while leaving the device plugged in and powered up.

    MobilePre, Sonica. Ozone, Transit. Audiophile USB devices
    Firmware needs to be loaded into these devices before they will work properly. Here are directions for doing that for older devices(newer devices should work without needing to do this):

    http://ubuntuforums.org/showthread.php?t=846621

    Tascam US 122
    If you have a Tascam US122 you also need a firmware loader:

    http://ubuntuforums.org/showpost.php...09&postcount=3

    EMU404
    If you have an EMU404 and it does not work chances are that it is an early model. If that is the case you are out of luck because there is no firmware loader for that card or any plans to make one. Later models should work without problems.Cards that will work have a hardware identifier 1102:0008. Cards that do not work have an identifier of 1102:0004. There is an ongoing discussion about this issue here

    http://ubuntuforums.org/showthread.php?t=768934

    Other Sound card and chip Drivers
    Most other sound cards and chips should work without any problems but if you are having problems getting you AC'97 chip or any other card or chip working, the file

    /user/share/doc/alsa-base/driver/ALSA-Configuration.tar.gz

    also contains many options for those. You can follow the directions in the HDA sound chip section to apply them. Of course, you need to replace snd-hda-intel with the name of the driver you are using. Many AC'97 chips can be made to work with the "quirk" options.

    ************************************************** ************************************************** ***************************
    ALSA Trouble

    If you are having problems with ALSA the first thing you should try is to reload the alsa drivers. In a terminal type:

    Code:
    killall pulseaudio
    
    sudo alsa force-reload
    
    pulseaudio -D
    This is a temporary fix for many people who have problems with sound fading out or strange messages from ALSA caused by buggy drivers. More permanent fixes can only come from driver updates.

    Reinstalling ALSA
    It is also possible something has gone really wrong with the ALSA drivers or there is a problem with some configuration file that got messed up with all that fooling around from above. You can try purging and reinstalling ALSA. (I recently had to do this after replacing my motherboard, the new on-board sound card was correctly detected but my existing pci sound card was not, weird...)


    (1) Remove the ALSA packages
    Code:
    sudo apt-get --purge remove linux-sound-base alsa-base alsa-utils
    (2) Reinstall the same packages
    Code:
    sudo apt-get install linux-sound-base alsa-base alsa-utils
    Packages gdm and ubuntu-desktop are also removed in this process if you are using Gnome. They need to be reinstalled:
    Code:
    sudo apt-get install gdm ubuntu-desktop
    If you are using xubuntu this will also happen to you
    Code:
    sudo apt-get install gdm xubuntu-desktop
    (3) Reboot.

    Upgrading ALSA

    ALSA 1.0.19

    If you want or need to upgrade to ALSA 1.0.19 you can get the debs from Luke Yelavich's PPA which has packages for Hardy and Intrepid and Jaunty. The best way to do it is to add the ppa to your sources list and then use apt or Synaptic to install the packages.

    https://launchpad.net/~themuso/+archive/ppa


    Still no Sound
    If you still have absolutely no sound at all or the above did not seem to offer anything helpful for you, you can try these guides:

    https://help.ubuntu.com/community/SoundTroubleshooting

    https://wiki.ubuntu.com/DebuggingSoundProblems

    http://ubuntuforums.org/showthread.php?t=205449

    ************************************************** ************************************************** **********
    Other Hardware Issues
    A single sound card/chip providing stereo sound to a pair of speakers is no longer the model for computer sound. Surround Sound, digital output, HDMI, USB , Bluetooth, multiple cards, all are having an impact on the way people want sound to come out of their computers and the linux community has risen to the challenge. This section is all about getting those things working with your Ubuntu. If your sound drivers are working and your sound server is set up properly these guides should work for you.

    Surround Sound

    Many sound cards/chips have configurable plugs that can be used for things like line-in or rear speaker outputs. You should check in the Volume Control/Options and /Switches that you have these correctly chosen and that your speakers are plugged into the proper plugs. If you are dual booting with windows take care because windows may configure your speakers even though they are in the wrong plugs.

    If you are not getting surround sound but have some sound then try this:

    http://www.automaticable.com/2008-05...-ubuntu-hardy/

    If you have 2.1, 4.1. or 6.0 Surround Sound, or a custom configuration, try this guide:

    http://ubuntuforums.org/showthread.php?t=795525

    If that doesn't work for you, you can try editing your /.asoundrc file like this:

    http://ubuntuforums.org/showthread.php?t=899139

    Digital Output
    Digital output has two different formats. S/PDIF and IEC958. The easiest way to get your digital output working is to just turn it on in your mixer by checking the box labeled S/PDIF or IEC958. You may have number of these boxes so you need to play around with them to find the ones that work for you. If you have a IEC958 or S/PDIF Capture box and you check that, it may direct your microphone to the digital output which will make it unavailable for recording so be careful with that. Some cards will disable the analog sound when digital is selected so be aware of that. These boxes may not appear in the Volume Control and so may need to be accessed directly in the mixer. I highly recommend the gnome-alsamixer for this (see below). If checking any of these boxes causes your sound to disappear, uncheck them. You also may need to reboot before these changes take place as some hardware configuration files are only read at startup.

    Mplayer, has an option for AC3 passthrough. VLC has an option to use S/PDIF when available. These options will redirect the audio stream from these players directly to the digital output. Players without these options will use the digital outputs through the ALSA sound server and driver. Older versions of Mplayer have a bug that does not allow the release of the digital output when Mplayer is closed. This is fixed in later versions. More in depth information about getting digital output working with ALSA is available here:

    http://alsa.opensrc.org/index.php/DigitalOut

    Digital Output and Pulse Audio
    If you are using Pulse Audio, you may have noticed that your digital outputs are unavailable to Pulse Audio. You can still control them in your alsa mixer and their use should not effect your use of Pulse Audio. If you would like to make them available in Pulse Audio, you can follow this guide:

    http://ubuntuforums.org/showthread.php?t=776958

    NOTE: This problem is fixed with PulseAudio 0.9.15 which is just released. There is a PPA at Launchpad for rc1 for Jaunty testers (as of now, Feb11, it will not be included in Jaunty (meh). You also need ALSA 1.0.19. Luke Yelavich has provided the PPA. (It is Jaunty specific so will probably not work with Hardy or Intrepid due to dependency problems). There are links to the discussion thread and the PPA at the beginning of this guide in Jaunty 9.04
    More on that soon....

    HDMI
    If you are trying to get your HDMI working with your ati card, you need the 8.9 or later driver, if you have an nvidia card, you need the update 177.78 or later. These have been reported to work by some desktop users and some laptop users, but not all so if it still does not work for you, you may have to wait for a later update. Check that the HDMI or SPDIF/IEC958 output is switched on in the ALSA mixer. HDMI may be in a separate section in alsa mixer or gnome-alsamixer if you have a pci card. Also, because these devices are not generally device 0 on the video card, they may have to be added manually to be used with PulseAudio. See the section immediately above for all that and more general digital output help.

    Multiple Sound Devices, Hardware
    Multiple sound devices are becoming more and more common these days. If you have a newer Nvidia or ATI graphics processor that includes HDMI output you have multiple sound device hardware. If you want to be able to control them you should look here. If one of them is HDMI you should also read the HDMI section directly above.

    http://ubuntuforums.org/showthread.php?t=922860

    USB Headsets, speakers, sound cards, etc
    Once you have Pulseaudio set up properly you can easily use your USB Headset/Headphones/Microphone and other USB audio device.
    They should appear in the Input and Output Devices of the Pulse Audio Volume Control as something like:

    ALSA PCM on front 2: (USB Audio) via DMA

    You can right click on them to make them the default device, adjust the volume by moving the slider and mute them by clicking on the little speaker icon. You can also move streams to or from them in Playback by right clicking on the stream and choosing move stream. You can make your usb device mic the default device by right clicking on it in the PA Volume Control Input Device section.

    If the volume control for your usb headset is not working properly in the panel volume control or in your alsamixer (gnome-alsamixer included), more specifically when you move the slider the left one always goes to zero, this is a known bug and is being worked on. Meanwhile, you can use the slider in the PulseAudio volume control as it is not effected by this bug.

    You can also use your usb device simultaneously with your sound card and other audio devices with the PA Device Chooser/Configure Local Sound Server/Simultaneous Output and check the "Add virtual output device for simultaneous output on all local sound cards" box. This will add a virtual simultaneous output device in Output Devices and you can select it in Playback, adjust the volume etc like any other device.

    [b] Bluetooth[/b
    The bluetooth problems with pulseaudio have finally been solved. While none of the required parts necessary to make this work are part of any current Ubuntu distribution *this is still good news.

    *Requirements

    *bluez 4.35 or later
    *pulseaudio 0.9.15
    *alsa 1.0.19
    *Kernel 2.6.29
    *gnome bluetooth 2.27.4

    *Make sure module-bluetooth-discover is loaded in /etc/pulse/default.pa or the default.pa in your home directory if you are using one

    If you are trying to use bluetooth with Hardy or Intrepid or Jaunty it is still somewhat of a work in progress.

    https://help.ubuntu.com/community/BluetoothHeadset

    http://wiki.bluez.org/wiki/HOWTO/AudioDevices

    http://forums.overclockers.com.au/sh...d.php?t=694010


    ************************************************** *********************************************

    Sound Server Setup
    The sound server is a critical part of the Ubuntu sound system. It is the interface between your sound using applications and the drivers for your sound card/chip. In Hardy 8.04 and Intrepid 8.10 and Jaunty 9.04 Pulseaudio is the default sound server. Unfortunately, Pulseaudio is not set up properly by default. This has caused untold amounts of trouble and heartache for many many Ubuntu users myself included. While this section appears to be very long and involved it is not really. A lot of it is just explanation about what you need, how things work, and how to use stuff, all in one place. You will have a much better understanding about how your sound works by reading it.

    If you have already followed the Interpid Sound Solutions guide it is just a compressed version of this section so a lot of this will seem redundant.

    Anyway, this section will help you to get your sound scheme set up properly for maximum usability.

    Multimedia
    If you are not able to play your mp3s or other formats, you can use the Synaptic package manager to get:

    ubuntu-restricted-extras

    This will get you the codecs for many formats and a bunch of other useful stuff like java and flash.

    If you need a total multimedia overhaul follow this guide ( I alway do this immediately after any install):

    http://ubuntuforums.org/showthread.php?t=766683

    Because some codecs are proprietary and not available through a general use license or their use or distribution is not allowed in all countries they are excluded from the regular Ubuntu repositories. But, you can get them from the medibuntu repositories so If you just want the plugins and w32codecs and libdvdcss2 to play restricted dvds and other proprietary formats follow this guide.

    http://ubuntutip.googlepages.com/multimediaubuntustep1
    http://ubuntutip.googlepages.com/multimediaubuntustep2

    Flash and java
    If you have flash9, you need to have
    libflashsupport
    to get your audio to work properly. If you have flash10 or higher, you do not need libflashsupport and should remove it. You should not need to do anthing like this if you are using Intrepid and got flash with the ubuntu-restricted-extras package. If you got flash from somewhere else you are on your own. If you are having problems with flash you can try installing libflashsupport anyway, it may help, it may make thing worse.

    If you are using amd64 Hardy be sure to read the sticky guides at the top of the 64bit forum to get 32bit flash and java working. The ubuntu-restricted-extras package should set you up properly but if you are having problems with missing 32 bit libs or crashing etc.

    http://ubuntuforums.org/showthread.php?t=772490

    http://ubuntuforums.org/showthread.php?t=774956

    Multiple Application Sound Sharing
    It is assumed you are using Hardy Heron 8.04 amd64, i386, or Hardy UbuntuStudio8.04 i386 and amd64 or Intrepid. If you are testing Jaunty, it is somewhat different and subject to change so bear that in mind while you follow this guide.

    It is very unlikely that anything you try here will put your sound into an unusable state that cannot be easily remedied by you after you read this.

    This has been tested on i386 and amd64 Hardy8.04, UbuntuStudio8.04.1 i386 and amd64, Intrepid i386 and amd64 Gnome2.2.1 and KDE4 and Intrepid UbuntuStudio. Jaunty testing is underway.I have an HDA ALC883 sound chip, a C-Media 8768 7.1 PCI sound card, a Plantronics USB Headset and a Logitec webcam and they all work all the time. I have 21 devices in my volume control. I just got a bluetooth dongle and headset and as soon as I figure them out I will provide an update in the bluetooth section. Things I have used and tested: amarok, audacious, rythmbox, xmms, ardour, hydrogen, rosegarden, vlc, mplayer, totem, miro, streamtuner, tunapie, firefox, opera, ZynAddSubFx, Banshee, jackrack, soundrecorder, sound converter, timidity, beast, djplay, Qsynth, mixx, muse,.....and many many more.

    Restore Default Configurations
    Default sound configurations are of two types, system wide configurations and user configurations. . System wide configuration files are /etc/asoundrc and in /etc/pulse. The file etc/asoundrc is not normally necessary or included so it is OK if it is not there. It is used for setting up special configurations for system wide use. User configurations are hidden in the users home directory under ~ /.asoundrc and ~/.pulseThe files ~/.asound.rc and ~/.pulse/default.pa are used for the same thing but per user. In general you will have a ~/.asoundrc file but no ~/.pulse directory since there is generally no need for per user settings for pulseaudio.

    If you edited asoundrc to get your surround sound working and were successful, leave that part. If you changed the sample size and/or rate to eliminate stuttering in /etc/pulse/daemon.conf and it worked, you can leave those changes. If you have edited your pulse/default.pa for multiple sound card devices or used combine and it works, you can leave those parts alone too. Otherwise, if you have an etc/asoundrc file, rename it to asoundrc.back so it won't be used. If you have edited your ~/.asound.rc for any reason but those mentioned above, then you should reload the backup you saved. If you edited your etc/pulse/default.pa for equalizer support you should re-edit and comment those lines out for now, same thing if you have a ~./pulse/default.pa. You can try the other changes you made again once everything is working properly.

    Keep the new libs and anything else you installed following this guide from psyke83 if you have already been there:
    http://ubuntuforums.org/showthread.php?p=4928900

    Packages
    Check with Synaptic that these are all installed(You probably already have most of them. Some are specific to specific applications/servers, if you do not use these, they are not necessary. If you are not sure, get them anyway):

    AlSA Packages (search alsa)

    aconnectgui (ALSA MIDI connection utility)
    alsa-oss (alsa wrapper for OSS apps)
    alsaplayer-alsa (PCM player for alsa)
    alsa-utils (command line utilities)
    asoundconf-gtk (choose default alsa sound card)
    gnome-alsamixer (GUI alsa mixer for Gnome)
    gstreamer0.10-alsa (gstreamer plugin)
    xmms2-plugin-alsa (xmms2 plugin)
    libasound2 (alsa libs and plugins)
    libasound2-plugins (jack, OSS, pulseaudio plugins for libasound2)
    libesd-alsa0 Enlightened Sound Demon (allows multiple audio streams on one device, not really necessary)

    PulseAudio Packages (search pulseaudio will find most of them)

    audacious-plugins-extra (audacious plugin)
    gstreamer0.10-pulseaudio (gstreamer plugin)
    libao-pulse (libao plugin)
    libpulse0 (client libraries)
    libpulse-browse0 (client libraries)
    libpulsecore5 (core services modules)
    libpulse-mainloop-glib0 (client libraries)
    padevchooser ( device chooser for setting up networking)
    paman (PulseAudio Device Manager)
    paprefs (Pulse Audio Preferences)
    pavucontrol (Pulse Audio Volume Control)
    pavumeter(Pulse Audio VU Meters)
    pulseaudio( The Pulse Audio Daemon)
    pulseaudio-esound-compat( Pulse Audio Esound drop in replacement for libesd for multiple audio streams)
    pulseaudio-module-gconf (gconf module)
    pulseaudio-module-hal (hal module, discover new sound devices via hal)
    pulseadio-module-x11 (replace x11 bell/beep with PA sounds)
    pulseaudio-module-zeroconf (Avahi, mdns, network help)
    pulseaudio-utils (command line tools)
    vlc-plugin-pulse (vlc plugin)
    libsdl1.2debian-pulseaudio (plugin for sdl apps)

    Many of the above user applications can be found in Applications/Sound and Video after they are installed, others are in System/Preferences. Others are command line programs that need to be run in a terminal or libs that you do not need to access or plugins available in or to applications.

    Default Sound Card
    What we are doing here is routing the ALSA plugins and players through Pulse Audio so it can manage them. Some applications have an ALSA plugin but no Pulse Audio support so they go through ALSA to Pulse Audio and on to the ALSA low level sound device drivers. Contrary to popular belief this does not increase latency since pulseaudio adds zero latency but actually reduces it since applications sharing sound no longer need to go through dmix.

    System/Preferences/Default Sound Card, ( this is asoundconf-gtk) choose Pulse Audio.

    System/Preferences/Multimedia Systems Selector/Audio set Plugin to Pulse Audio.

    System/Preferences/Sound, set all to Pulse Audio except Default mixer tracks which should be set to "your sound card" (i.e. ATI IXP (ALSA )mixer) probably the first choice 0. If you have more than one hardware device, choose the one you want to use/control. If you set your defaults to automatic some applications will bypass Pulse Audio and grab exclusive control of the sound card. We want to avoid this.

    Reboot. If you are having trouble changing settings in Multimedia Systems Selector or Sound, reboot and then make the changes and reboot again. You need to reboot because some configuration files are only read at boot.

    Volume Control
    The Volume control is the little speaker on your top panel. If you left click on it you can adjust the volume. This can get a little tricky if you have more than one device. To choose the device to control right click on it and choose Preferences. This will open a little window where you can choose which device to control. You can also choose what sliders you want to control. You should select Master but you can play around with it to see what it can do.If you hold down the sift key you can select more than one control. If you want to control the volume with your multimedia keys you need to select the device in System/Preferences/Sound.

    For now though, right click on the Volume Control on the Panel and choose Open Volume Control/File/Change Device and make sure it is set to the same device as in System/Preferences/Sound. Go to Recording if that section is available and put the capture slider up about 1/3 to 1/2 and make sure the icons on the bottom are not x-ed out. If available, go to to Switches and check mix. If you have an Options section, check to make sure they are set to the proper configuration for where your speakers and mic are attached. If you get feedback, mute the microphone, it is working just fine. If you do not have these sections, do not worry, they are not available for all devices. If you only have one hardware device to choose, that is also OK.

    Sound Mixer
    Open any alsa mixer, I use gnome-alsamixer. Turn stuff on and put up the sliders. check mix, capture, cd, mic, etc, unmute, mute, blah blah blah... If you have a usb mic or headphones tab over to that section and turn them on and set the levels etc. Some of this is redundant but it doesn't hurt and gets you familiar with your mixer. This is the same controls as the volume control in your panel. If you adjust the sliders and switches they will adjust in every other volume control.

    Pulse Audio Device Chooser padevchooser
    The Pulse Audio Device Chooser is a small applet that lives on your panel. From it you can open all the Pulse Audio interfaces, the Pulse Audio Manager and Pulse Audio Volume Control, the Pulse Audio Meters, and also Configure Local Sound Server and PulseAudio Preferences. You can put this in your panel by opening it from the Applications/Sound and Video menu and then clicking on Preferences/Start applet on session login. You can tell it to start up automatically when you login by choosing Preferences and selecting Start Applet on session login.

    Pulse Audio Volume Control, pavucontrol
    This is the control center for Pulse Audio. It has tabs as follows. You can find it in Applications/Sound and Video or open it from the Pulse Audio Device Chooser.
    Playback
    You can adjust the volume of the individual streams by moving the sliders, You can change which output device they use by right clicking on the stream and choosing move stream,
    Output Devices
    You can set the default output device in the Output Device section by right clicking on it. This section also lists any Virtual Output Devices you have if you set Show: ALL Output Devices, like one for Simultaneous Output and one for RTP Multicast for network streaming or one for jack. You can select these in Playback just like any of your hardware devices.
    Input Device
    You can set the default input device in the Input Device Section by right clicking on it. You can set the Default Input Device to a monitor of one of the Output Devices so you can record what you are playing. You can set Show to All Input Devices of Show: Monitors to see the monitors.
    Recording
    This is new in Intrepid. It operates the same as Playback but for recording.

    If you do not see an application playing in the Pulse Audio Volume Control then it is using the sound device directly. and is most likely an OSS or Jack or other type application. If you can, change their audio output to alsa or pulseaudio. OSS applications may need to be launched with aoss which is the alsa wrapper for oss . You can also try launching them with padsp which is the pulseaudio wrapper for OSS. Edit the launchers as necessary by putting either aoss or padsp before the application name. If it is a jack application, see the jack section below. If the application uses Portaudio or some other sound server then you may need to use the pasuspender command.

    Pulse Audio Manager, paman
    Go to Applications/Sound and Video/Pulse Audio Manager or use the padevchooser and you should see in Server Information:

    Default Sink: alsa_output.pci_1002_4370_sound_card_0_alsa_playba ck_0
    Defalt Source: alsa_input.pci_1002_4370_sound_card_0_alsa_capture _0

    or something like that or completely not like that but with alsa as the first word.

    All of your applications are listed in the Devices section of Pulse Audio Device Manager as #1, #2, #18 etc, under the line for what sink it is using. You can highlight one of them and click on properties to see what client/plugin it is using and other useful information.

    The PulseAudio Manager is being deprecated and will not appear in future versions of PulseAudio. It is not recommended to use the PA Manager for controlling PulseAudio. The padevchoser is also being deprecated so the Configure Local Sound Server will be found in PulseAudio Preferences along with the rtp network controls.

    Testing
    Test with Rythmbox, vlc, totem, firefox flash, firefox mplayer, and other plugins, etc. configure preferences to ALSA or Pulseaudio if available/possible. Play a cd or dvd or both. Run them all at once, or as many as you want/can. You should hear them all, together and see them in Pulseaudio Volume Control/Playback.

    Testing, Recording
    To control your input for recording you can set your System/Preferences/Sound/Audio Conferencing/Sound capture to PulseAudio Sound Server and use PulseAudio Volume Control/Input Devices to choose which device to record from. This is very handy as you can quickly switch between your sound card pcm stream or microphone to your webcam mic or usb headset. All you need to do is open the PulseAudio Volume Control/Input Devices and right click on any available device to make it the default then open the application. You can choose any (ALSA) hardware device available or one of the "monitor" virtual devices. So, if you are listening to some music in your speakers you can choose the monitor for your Output Device to record. Just make sure that "capture" is enabled and turned up in the panel volume control or your alsa based mixer if you are trying to use a hardware input device.

    If you are using Intrepid you can move the recording application to another Input device in the recording tab of the Pulseaudio Volume Control and adjust the levels, mute etc.

    PulseAudio Volume Meters
    You should now have a PulseAudio Volume Meter (capture) you can use to test your microphone or other capture inputs available in your sound mixer or volume control. Once you have chosen your default device, you can open sound recorder and record it. If you choose a monitor device, you can record whatever is going through the comparable Output Device.
    You can use the PulseAudio Volume Meter (Playback) for monitoring playback streams. The volume meters work on the default streams.

    If you are using a microphone for recording and wish to not hear the microphone input to prevent feedback, you can just mute the microphone playback in the panel volume control or ALSA sound mixer. It is the Capture settings that are the only important ones for recording.

    If you are using jack this will not work for you. As far as I can tell you can only change jack inputs in jack control setup/input device and then restart jack. For using jack with PulseAudio, see the Ubuntu Studio and jack section below.

    Starting and Stopping Pulse Audio
    To start Pulseaudio from a terminal.
    Code:
    pulseaudio -D
    The -D option starts pulseaudio as a daemon so it is OK to close the terminal after using it to start Pulseaudio.
    If you want to kill the pulseaudio daemon:
    Code:
    killall pulseaudio
    Troubleshooting Pulseaudio
    If you are having weird problems using pulseaudio then you can kill pulseaudio and restart it from a terminal with
    Code:
    pulseaudio -vvv
    This will run pulseaudio in the terminal in verbose mode so all the messages about what pulseaudio is doing will be written to the terminal. When you close the terminal Pulseaudio will exit. These messages can pinpoint problems with ALSA drivers or application plugins or network streaming issues etc along with problems with pulseaudio itself.
    Bugs in pulseaudio can be reported by opening new ticket. Make sure you search the tickets before filing a new bug. You can also talk to the devs at the mailing list or with IRC which have links from the home page:

    http://www.pulseaudio.org/

    ************************************************** ************************************************** **********************
    Application Specific Solutions and other misc info
    There are some applications that need specific configurations to work properly with Pulseaudio. In most cases these can be found in the Preferences or Settings menus. If available choose Pulseaudio or ALSA plugins. Applications using gstreamer will use the gstreamer defaults you set in Multimedia Systems Selector. You can set the xine defaults in the xine application.

    For vlc set ALSA to default, for mplayer set audio to ALSA, for Audacious you can choose Pulseaudio Output Plugin. For Miro set the Preferences/Playback to gstreamer. Some people have have success choosing xine so you can try that too. In wine, try the OSS setting for audio and launch wine with padsp wine.

    Audacity, Wine, Skype and other troublesome applications
    There are some applications that have trouble working with Pulseaudio. This is usually caused by the developers who write the ALSA plugins for these applications making assumptions about hardware or seeking to take control of it. Since the ALSA sound drivers have moved to the kernel this is no longer allowed due to security issues. Pulseaudio strictly enforces these rules. So, if you are having problems getting your application to work do not blame Pulseaudio.

    Nonetheless, there is information about running specific applications including Audacity, Wine and others with Pulse Audio here and more info below:

    http://pulseaudio.org/wiki/PerfectSetup

    SKYPE and Pulse Audio
    Since so many people are having such a hard time getting their skype to work, I finally installed it and true, it does not work out of the box but the solution is fairly simple for Hardy and has been posted to here:

    http://ubuntuforums.org/showthread.php?t=937323

    It has been reported by that Skype works out of the box with Intrepid but many also report problems ,mostly with getting their mic to work. If your mic is not working in skype, try to get it working in any other application first.

    A special note on Audacity
    Audacity was originally written for the Portaudio sound server which is not used in Ubuntu and many other major distributions anymore. The audacity developers have implemented plugins for alsa and oss and jack. While these plugins work in general with a standalone alsa or jack situation, they have bugs due to their non-standard implementation that causes them to not work in all circumstances or share the sound device properly with other applications in alsa, oss or jack and Audacity will not work at all with pulseaudio which enforces strict standard alsa protocols. We can only hope that they are working on these issues.

    You can try compiling Audacity yourself from source with jack support. This will allow you to use other jack applications and the jackrack effects etc with Audacity but will not give you full jack connection integration.

    http://ubuntuforums.org/showthread.php?t=982577

    It has been reported that audacity now launches correctly with padsp audacity in Intrepid. There is a post around here about that,

    http://ubuntuforums.org/showthread.php?t=1005196

    If Audacity is giving you too many problems you should consider using ardour. It is a professional quality digital audio workstation fully integrated with jack ( it is written by the same people). For more information see Ubuntu Studio and Jack below

    Second Life
    I do not use Second Life myself so these links are getting a little old. If you are a Second Life user please let me know if this information is still valid or if it needs to be updated, otherwise this section will be deleted.

    http://vboards.stratics.com/showthread.php?p=836114

    http://jira.secondlife.com/browse/VWR-5708

    xmms
    If you miss your xmms (not xmms2) and would like to have it back:
    i386:

    https://launchpad.net/ubuntu/hardy/i...070601-1build2

    amd64:

    https://launchpad.net/ubuntu/hardy/a...070601-1build2

    Beware of dependency problems with libglib1.2 and libglib1.2dbl on the amd64 build, i386 is no problem. You can read about that here:

    http://ubuntuforums.org/showthread.php?t=774461

    Change the output plugin to alsa and you should be good to go.
    These debs are also reported to work with Intrepid, give them a try.

    Streaming Audio Over a Network with PulseAudio
    If you are wanting to use PulseAudio to stream audio over your local or home network, it is very easy, you can use this guide here (this will not work for macs and windows boxes are difficult to setup this way):

    http://x4.6times7.org/dokuwiki/doku....ith_pulseaudio

    Streaming Audio to the Internet

    If you want to do local network music streaming to non-linux boxes or to the internet you can start here

    http://www.yolinux.com/TUTORIALS/Lin...Streaming.html

    For more technical information about Pulseaudio and about setting up surround sound and for network streaming, etc go here:

    http://pulseaudio.org/wiki/FAQ

    Setting up a automatic PulseAudio server on startup
    If you have a media server and would like to set it up as a Pulseaudio server on startup then 13iggs has figured it out for you here. This is very handy if you have a headless server.

    http://ubuntuforums.org/showpost.php...26&postcount=5

    Just be aware that setting up Pulseaudio as a system wide daemon is not especially recommended by the PulseAudio developers due to security concerns so take precautions like using the auth-ip... if you are running this on an open network.

    Pulse Audio Modules
    Pulse Audio loads its modules in etc/default.pa. You can edit this file to control which modules are loaded when Pulse Audio starts up.

    You can also load modules dynamically (while it is running) into the Pulse Audio daemon with the pactl command.

    If your sound setup is being changed back to the wrong default settings every time you reboot, you can try this:

    Look In etc/pulse/default.pa for the line:
    Code:
    load-module module-default-device-restore
    comment this line out (put a # at the start of the line). Save the file. You will have to be sudo to do this. If you have a ~/.pulse/default.pa you can do it there for yourself as an individual user instead without being sudo.

    You can find more info about the Pulse Audio modules here:

    http://pulseaudio.org/wiki/Modules

    And about pactl here:

    http://linux.die.net/man/1/pactl


    ************************************************** *************************************************

    Ubuntu Studio and Jack
    UbuntuStudio has three basic parts, audio, video, and graphics. This is about UbuntuStudio-audio exclusively.


    Ubuntu Studio comes with the Jack Audio Connection Kit which is designed for one thing only, quality tools for professionals in the music business. This is a powerful utility that sits on top of the hardware drivers and provides connection and control services and real time priority for jack aware applications whose demands are time critical like for live recording and performance. With it you can synchronize playback and recording across multiple jack aware applications. One common use is to sync ardour with rosegarden and hydrogen for easy playback/recording of multiple midi and audio sources at the same time on multiple tracks. Jack and jack applications are used in many environments, from garages and basements to high end studios that charge $100s per hour, from internet DJs wth tiny audiences to live performance with audiences in the thousands. Jack performs, jack delivers.

    If you are using jackd and are not using UbuntuStudio you should at least install:
    ubuntustudio-audio-plugins
    jackd (the jack daemon)
    qjackctl (Jack Control)
    jackeq (Jack EQ)
    jack-rack(effects rack)
    jack-tools(command line tools)
    patchage (patchbay)
    linuxrt (real time kernel)

    Getting UbuntuStudio
    If you want a real recording setup just get the ubuntustudio-audio and ubuntustudio-audio-plugins metapackages available in the repositories, ubuntustudio-audio includes jack and the rt kernel and all kinds of audio production applications. (It is a big download, took about an hour on my dsl connection.)

    Warning Ubuntu Studio for Intrepid 8.10 has some serious problems with the rt kernel, among them are no support for multiple core cpus. It is strongly recommended that Ubuntu Studio users stay with or install 8.04 Hardy until these issues are resolved though many users have reported no problems with using Intrepid for sound mixing and editing.

    If you are installing the rt kernel and are using the ati or nvidia restricted drivers that you downloaded directly from ati or nvidia, it is highly recommended that you remove these drivers from your system and replace your etc/X11/xorg.conf with the original generic version. If you are not sure which file that is, copy the xorg.conf.failsafe file into xorg.conf. You can reinstall the driver after the rt kernel is working and should have no problems with it in Hardy or Intrepid. NOTE: The ati 9.1 driver build for Hardy is missing a patch for the rt kernel and so should be avoided by rt kernel users for now. There are scattered reports of similar issues with some nvidia drivers with certain nvidia cards. You can try these drivers, just be prepared to remove them and reinstall previous ones that worked.

    If you are having basic jack setup problems, or you just want to know where to start:

    http://en.wikipedia.org/wiki/JACK_Audio_Connection_Kit

    If you are having trouble setting up jack in UbuntuStudio:

    http://en.wikipedia.org/wiki/JACK_Audio_Connection_Kit

    https://help.ubuntu.com/community/Ub...GettingStarted

    http://hubpages.com/hub/Recording-in...io-Workstation

    Excellent ardour tutorial here:

    http://out-of-order.nfshost.com/tutorials/ardour/

    If you are wondering how to sync applications together through jack:

    https://help.ubuntu.com/community/Ho...CtlConnections

    http://www.ubustu.com/globe/2007/09/...n-with-ardour/

    http://www.rosegardenmusic.com/

    Unlocking memory and setting priority for audio applications
    UbuntuStudio in Intrepid and Jaunty now comes with an UnbuntuStudio settings manager to control these options but if you are using previous versions...
    and you are getting memory limit or memory lock messages when running any audio application, try this:
    Edit /etc/security/limits.conf and add or modify these lines

    Code:
    @audio - memlock unlimited
    @audio - nice -10
    @audio - rtprio 99

    * The 'memlock' line determines the amount of memory available to users in the group "audio".
    * The 'nice' line, has to do with how long the processor will wait for processes queued from group "audio".
    * The 'rtprio' line assigns an extremely high priority to the group "audio".

    The nice and rtprio settings will basically give your audio top priority at the cpu which is a necessity for live work.

    jack and Pulse Audio with more than one sound card
    If you have more than one sound card, you can configure jack to use one of them exclusively with Jack Control and set Pulse Audio to use the other one In the Pulse Audio Volume Control. They should both work at the same time if they are using different hardware devices and when you close jack, Pulse Audio can use that card again. Make sure you do not have any application using the Pulse Audio sink for the sound card you configured jack to use or jack will not start.

    Unless you are using professional quality sound cards that are made to share clocks, using two sound cards together can be problematic as their clocks/timing will drift apart. Pulse Audio, through the module combine can hold two cards in sync fairly well but some deviation is inevitable and glitches will occur as the clocks are periodically resynchronized. This is not a big problem with playback only but is not recommended for recording or live performance unless you have actually tested this with your hardware and are satisfied with it. I have not yet figured out how to get this to work with jack but it seems promising. If you have figured this out, please make a post.

    Pulse Audio through jack
    If you want to set up Pulse Audio to play through jack you can do so. This has been tested on Hardy 386, amd64 generic and Ubuntu Studio and on Intrepid 386, amd64 and Intrepid Studio ( it is from debian of course which is the base of Ubuntu).

    First of all, you need to install the pulseaudio-module-jack from the debian lenny repository:

    http://packages.debian.org/lenny/sou...io-module-jack

    If you are using Jaunty 9.04 and you are using pulseaudio0.9.14, the pulseaudio-module-jack in Debian unstable has been removed so you will need to build it from source. It would be better if you upgraded to pulseaudio 0,9,15 which is much improved from Pulseaudio0.9.14 (which the pulse devs actually did not recommend for distribution use). There is a link at the beginning of this post to Luke Yelavich,s PPA for Pulseaudio 0.9.15 which also includes ALSA1.0.19 which you will need.

    The pulseaudio-module-jack is no longer included in luke Yelavich's PPA for pulseaudio 0.9.15 so you need to get it from Debian sid

    http://packages.debian.org/sid/pulseaudio-module-jack

    Download the appropriate deb by clicking on one of the mirror sites and install it with the gdebi package manager ( 386 and amd64 versions work for both Hardy and Intrepid).

    Then you need to make a little script. I keep mine in a /scripts directory in my /home directory. Just make a new file with Natilus called jack_startup and make it executable and put these lines in it.

    Code:
    #load pulseaudio jack modules
    #!/bin/bash
    
    pactl load-module module-jack-sink
    pactl load-module module-jack-source
    Then start up jack control and go to Setup/Options/Execute script after Startup. click on the... box and go to where the script is and click open. and then after you make sure the path is correct click the box on the left so it has an x in it. Click OK at the bottom and make sure no application is using the sound card before you start jack or jack will not start.

    If the jack sink disappears from the Pulse Audio Volume Control after a few seconds or you do not see it, adjust the timeout in the jack control setup menu to 1000-5000. Applications that just play back audio streams through Pulse Audio are very lazy about talking to their sound server and this will prevent jack from timing out the connection. (Read the pactl and modules links above to change the default options which should work for most people. It has been reported that the m-audio 1010 card needs the channels=2 option)

    You should now have jack sinks and sources in the Pulse Audio Volume Control and in the Volume Control on the panel. And a Pulse Audio JACK Sink and Pulse Audio JACK Source in the jack connection bay in the Audio section all connected up to system playback and system source automatically. When you close jack, the jack sinks and sources will automatically go away.

    You can now start up any non-jack application and it will play through the pulseaudio-jack sink if you select it with move stream in the Pulse Audio Volume Control. And all your jack applications should work too, at the same time. You can connect the pulse audio sink to any jack application in the jack connections bay and record, add effects, eq, pretty much anything you want that jack can hook you up with.

    You can also route the mic/line inputs from the sound card by setting the jack control/setup/Input Device to the hardware device ie hw:0 or hw:1, etc. They will show up in the connections box as system capture inputs. You should hear them through the speakers. If you do not want to hear your mic in the speakers you can mute the mic input in the playback tab of your volume control and leave the captures on so you will still be able to record. If you have a usb mic, you can make that the default in the PA Volume Control and it will show up in jack/connections/audio/system capture and you will not hear it through the speakers unless you hook it to an output.

    If you change the input, you will have to shut down jack, close jack control and restart. You will also have to make sure the input you are trying to use is properly enabled and turned up in whatever alsa-mixer you are using.

    Now that you have pulse-jack working you can try these quick and easy fun projects to learn about using the pulse audio sinks and sources with jack:

    http://ubuntuforums.org/showthread.php?t=986966

    Closing jack
    If you close jack before you stop or close any application playing through the Pulse Audio jack sink, Pulse Audio may crash and need to be restarted if you do not disconnect the pulseaudio sink and source before closing jack. You can go to connections and choose disconnect all before stopping jack and your applications should not crash when you stop jack.

    Jack and Pulse on one sound device
    If you have only one sound device your pulse applications may be orphaned when you close jack and their connection to pulseaudio may fail. You can try adding a null-sink and module-rescue-streams should move them to that when the jack sink closes and then they can be moved again when pulse regains control of the sound card. However, this does not seem to be a surefire thing and may not work for you so you may need to restart your pulseaudio applications after closing jack and after pulseaudio regains the sound device sink. There is a pulse audio module, module-always-sink, that would alleviate this problem but this module does not seem to be available in the Hardy and Intrepid pulse audio 0.9.10 but should be available in Jaunty which is using 0.9.14.

    ************************************************** ******************************************

    If this guide doesn't work for you, or you would like me to add/subtract/edit it, post a reply. Also, please post if this works as is or if you had to change anything.

    Good Luck and best regards,
    mark
    Last edited by markbuntu; December 8th, 2009 at 11:47 PM.

  2. #2
    Join Date
    Sep 2006
    Beans
    112

    Re: Multiple Sound Solution (ALSA w Pulseaudio)

    Thanks!
    I was having constant sound problems on my 8.04 32 bit setup. Often after a reboot I would have no sound. I would get sound back if I monkey around with the sound preferences and switch it to all Pulse Audio. My hardware is realtek ALC885 (HDA Intel) on my Gigabyte EX38 motherboard (custom built PC).
    I do not have sound in flash as of now. In the past I would have sound either in flash or in everything else. At least right now it is working on everything else and not messing up on reboots. I have XP PRO installed in a virtual machine so everytime I want to see something in flash, I have to open it inside the virtual machine and I get sound then.
    Your guide introduced me to all these sound managers and mixers I didn't know existed. I was able to record sound in linux for the first time too.

  3. #3
    Join Date
    Aug 2007
    Beans
    19

    Angry Re: Multiple Sound Solution (ALSA w Pulseaudio)

    really great! Thanks!

    my soundcard is ASUS sigmaTel C-Major Audio and snd-intel8x0 of the laptop of ASUS M2N, the applications have been correctly installed according to your instruction, but there is no trace for me to see my soundcard in options of /pref.../sound or some default mixer tracks, I couldn't open /system/preference/default sound card.

    could you please give some advice? Thank you very much!

  4. #4
    Join Date
    Apr 2008
    Beans
    4,377
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Multiple Sound Solution (ALSA w Pulseaudio)

    Is the ASUS sound card recognized and enabled in the bios?

    Did it ever make sound?

  5. #5
    Join Date
    Aug 2007
    Beans
    19

    Re: Multiple Sound Solution (ALSA w Pulseaudio)

    Quote Originally Posted by markbuntu View Post
    Is the ASUS sound card recognized and enabled in the bios?

    Did it ever make sound?
    I don't think the ASUS sound card was recognized, but I didn't check the bios and I never heard any sound.

    Anyway, I have switched 8.04 back to 6.06, it works fine.

    Thanks for your help! for me the sound problem is too difficult, when the 8.10 is released, I will be glad to try.

  6. #6
    Join Date
    Nov 2006
    Beans
    1,134

    Re: Multiple Sound Solution (ALSA w Pulseaudio)

    I just switched from 7.10 to 8.04.1 and immediately ran into the notorious Pulse Audio problem. On 7.10 all my applications used ALSA, except for Second Life which required ESD. ALSA and ESD clients worked perfectly side by side, so this setup was 100% trouble-free. SL voice chat, Skype, Flash, Totem, VLC, MPlayer, Blender, Audacity ... everything worked without any conflicts.

    These are the steps to configure 8.04 the same way as 7.10:
    1. In System-->Preferences-->Sound, set all devices to ALSA (instead of Autodetect). Disable system sounds but leave software mixing enabled.
    2. In Synaptic, mark "esound" for installation and "pulseaudio" for removal. "pulseaudio-esound-compat" and "ubuntu-desktop" will automatically be marked for removal as well. Apply the changes.
    3. Reboot.

  7. #7
    Join Date
    Dec 2004
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Multiple Sound Solution (ALSA w Pulseaudio)

    Thanks alot - this finally got me to be able to look into movies without turning my online-radio off.

    Now everything on my Asus A6000 is working like a charm - well, need to look into this firefox-crashing-on-some-embedded movies, but thats hardly something I desperately need.

  8. #8
    Join Date
    Jul 2008
    Location
    FL
    Beans
    40
    Distro
    Ubuntu Gnome 14.04 Trusty Tahr

    Re: Multiple Sound Solution (ALSA w Pulseaudio)

    OK I can hear my sources all at the same time. I want to record them using Audacity. I previously was using Ardour + JACK but couldn't get that to work as advertised, at least not without much difficulty and never the same way twice and/or without reboots/reconfig at terminal/wasting time. Since Ardour seems to only play nice with JACK I ditched it for now. I'm trying the Audacity + ALSA + PulseAudio approach.

    PulseAudio record meters are indicating sound from my sources which are Hydrogen and a Line In.

    I can hear everything on my soundcard when the above listed sources are providing input.

    When using Audacity I cannot set the Preferences-> Audio I/O -> Playback or Recording selections to ALSA, Pulseaudio, or my desired soundcard, none of these options are listed. My choices are:
    OSS...
    ALSA, Intel...(onboard sound, not desired)
    JACK Audio Connection

    Also I don't appear to boot into the right config, still working on that to. When setting pulseaudio devices to default using Pulseaudio Volume Control, does that persist after a reboot? I'm about find out.

    Man I'm tired of rebooting. I want to jam.

    Suggestions?

    Ed

  9. #9
    Join Date
    Jul 2008
    Location
    FL
    Beans
    40
    Distro
    Ubuntu Gnome 14.04 Trusty Tahr

    Cool Re: Multiple Sound Solution (ALSA w Pulseaudio)

    Progress
    After reboot I can make desired selections in Audacity. good

    Default config appears correct. OK

    Hydrogen and Line In both simultaneously record to Audacity. Now I'm getting somewhere (BTW Audacity is ver 1.3.4 Beta).

    Attempting to playback Audacity while Hydrogen running (playing or not) caused Audacity to complain about drivers.

    I think part of the problem is Hydrogen and Audacity both attempting to get control of ALSA. I can't select Pulseaudio as an input or output source in Hydrogen or Audacity. In Audacity->Pref.."ALSA default" works for recording/playback.

    Using Pulseaudio volume meters for playback there is no movement yet I hear sound. Should I try a stable ver of Audacity and dump the Beta? Or is there some other magic?

    I'm still not sure if this is going to work for me. I'm not comfortable with pulseaudio as another software layer, thats what Pulseaudio appears to be. The problem is that my apps don't seem to recognize pulse audio so there is some gray area when configuring audio sources and playback destinations.
    I liked the principle behind JACK, I could see where I was "patching" audio. My apps "saw" JACK, know JACK, maybe they even love JACK. but it wasn't working 100% either. JACK is another software layer but I have better luck with it. I'm going to reinstall ardour and give it another shot now that I think I have my default config working better.

    Back to the front! Maybe I'll get to play guitar today.

    Ed

  10. #10
    Join Date
    Apr 2008
    Beans
    4,377
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Multiple Sound Solution (ALSA w Pulseaudio)

    Well, jack is a more direct control layer with very low latency for your time crtical apps like live recording etc. If you really want to use jack for that kind of stuff you need the real time kernel, linux rt. But many people have complaints about that and it is a whole other nightmare.

    If you open the Pulse Audio Manager, you should be able to see if they are using pulse as they will be listed in devices as #3, # 18, etc. You can highlight one and click on properties to see which one it is, ie which plug in it is using, etc. If you do not see it, then it is using alsa directly. In the devices property section you can also adjust the volume.

    If the app is using PA, it should show up on both playback and capture Volume Meters. If you have

    libesd-alsa0 Enlightened Sound Demon (allows multiple audio streams on one device)

    and

    alsa-oss should smoothly integrate anything looking for oss into your sound set up.

    Then multiple streams in alsa should not be a problem but I have heard that the libasound2 in the repos has a few bugs and that may be you problem. There is a newer version available at launchpad but I can't find my notes right now about where it can be found. I think that is the one I am using and I seem to remember I got it from a link at the xmms site in launchpad.

    The problem with hydrogen and audacity on playback may have to do with jack.

    Yes, the default choice you make in PA Manager should persist.

Page 1 of 37 12311 ... LastLast

Tags for this Thread

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
  •